Patent ID: 8745276

Claim:
A method for data transfer, comprising: receiving in an input/output (I/O) operation by an I/O device data to be written to a specified virtual address in a host memory belonging to a host processor having a memory management unit (MMU) associated with the host memory, wherein the host processor is configured to maintain address translation tables, indicating a correspondence between virtual addresses used by applications running on the host processor and physical addresses in the host memory, and wherein the I/O device is coupled to receive the address translation tables from the host processor, and is configured to receive data to be written to specified virtual addresses in I/O operations and to refer to the address translation tables in order to write the received data directly to corresponding physical addresses in the host memory; detecting, using the address translation tables in the I/O device, upon receiving the data, that a first page that contains the specified virtual address is swapped out of the host memory; and responsively to detecting that the first page is swapped out, writing the received data from the I/O device to a second, free page in the host memory and remapping the specified virtual address to the free page.