Patent ID: 8527673

Claim:
In a virtualized computer system in which a guest operating system runs on a virtual machine, a computer-implemented method comprising: obtaining first configuration register information corresponding to a hardware device using a passthrough module included within virtualization software, the hardware device connected to the virtualized computer system via a communication interface; creating, via the passthrough module, a passthrough device within the virtualization software by copying at least part of the first configuration register information to generate second configuration register information corresponding to the passthrough device, wherein the passthrough device allows for access to the hardware device in either trap mode or non-trap mode, and wherein in trap mode, the guest operating system is allowed access to the hardware device via the passthrough module and in non-trap mode, the guest operation system is allowed to directly access the hardware device without intervention from the passthrough module; receiving an input/output (I/O) request from the guest operating system with a first guest physical address corresponding to the second configuration register information of the passthrough device; when operating in trap mode, issuing, from the passthrough module, a proxy I/O operation with a first machine address corresponding to the first guest physical address to access the hardware device using the first machine address; and when operating in non-trap mode, performing: mapping, by the passthrough module, the first guest physical address to the first machine address corresponding to the hardware device; performing, by the virtualization software, an I/O operation with the first machine address; and allowing the guest operating system to perform a subsequent I/O operation using the first guest physical address directly with the hardware device due to the mapping.