1. In a virtualized computer system in which a guest operating system runs on a virtual machine of a virtualized computer system and has direct access to a hardware device coupled to the virtualized computer system via a communication interface, a computer-implemented method of handling interrupts from the hardware device to the guest operating system, the method comprising: receiving a physical interrupt from the hardware device on a shared interrupt line of an interrupt controller; masking the shared interrupt line of the interrupt controller; generating a virtual interrupt corresponding to the physical interrupt to the guest operating system; and the guest operating system executing an interrupt service routine.