Paravirtulized capability for device assignment
AssigneeRed Hat Israel, Ltd.
InventorsMichael Tsirkin, Alex Williamson
Life of this patent
Estimating the term…
Loading patent…
AssigneeRed Hat Israel, Ltd.
InventorsMichael Tsirkin, Alex Williamson
Estimating the term…
A hypervisor of a host detects a request by a guest or a hypervisor administrator to expose a device associated with the host to the guest. The hypervisor locates free space in a configuration space of the device. The hypervisor assigns a configuration space associated with the hypervisor to the located free space. The hypervisor notifies the guest of the configuration space associated with the hypervisor and a range of addresses associated with the free space. The hypervisor exposes the device to the guest. The configuration space associated with the hypervisor may be a message-signaled capability associated with the hypervisor.
A method, comprising:
A computer system comprising:
A non-transitory computer-readable storage medium including instructions that, when accessed by a processor, cause the processor to:
Dependencies are inferred from the claim text.
Drawings are temporarily unavailable. Open the PDF at USPTO
From the US filing history. Foreign family members aren’t listed.
No references of this kind are recorded.
Hypervisors; Virtual machine monitors: para-virtualisation, i.e. guest operating system has to be modified
Computing and data processing
About 9 years 11 months of term left · ends 10 Oct 2036 (estimated)
Embodiments of the present disclosure relate to a computer system, and more specifically, to permit a guest to have direct access to a physical device using a hypervisor.
Virtualization permits multiplexing of an underlying host machine between different virtual machines. The host machine allocates a certain amount of its resources to each of the virtual machines. Each virtual machine may then use the allocated resources to execute applications, including operating systems (referred to as guest operating systems (OS)). The software layer providing the virtualization is commonly referred to as a hypervisor and is also known as a virtual machine monitor (VMM), a kernel-based hypervisor, or a host operating system.
Currently, a virtual machine may access a device under the control of the host computer using three methods: device assignment, device emulation, and paravirtualization. In device assignment or pass through, a guest is granted access by a hypervisor to a device without intervention by the hypervisor or an attempt to access may be trapped by the hypervisor, but the hypervisor forwards the access requests to the device unchanged. In device emulation, a guest does not know that a hypervisor is present. The hypervisor emulates the underlying hardware of the host computer, rendering use of the virtual machine transparent to the guest operating system and the user of the computer. The guest operating system “believes” that a physical device is present and loads a virtual device driver for it, where the hypervisor traps attempted accesses to underlying physical devices and instead modifies or emulates the virtual devices of the guest and executes an appropriate command on the physical device on behalf of the guest.
FIG. 1 shows example formats of message-signaled interrupt capability tables associated with MSI interrupts or programmable configurations of PCI devices, respectively.
FIG. 2 is a block diagram that illustrates an example computing system in which examples of the present disclosure may operate.
FIG. 3A shows a device capability table having a used configuration space and an unused configuration space of an individual device.
Methods and systems for permitting a guest device driver to have a communication channel with a hypervisor associated with a device and to have direct access to a physical device though the hypervisor are disclosed. A hypervisor of a host detects a request (e.g., by a hypervisor administrator or a guest) to expose a device associated with the host to the guest. The hypervisor may be configured to expose the device to the guest on hypervisor startup. Exposing a device to a guest refers to making a device available for use by the guest. The hypervisor locates free space in a configuration space of the device. The hypervisor assigns a configuration space associated with the hypervisor to the located free space. The hypervisor notifies the guest of the configuration space associated with the hypervisor and a range of addresses associated with the free space. The configuration space associated with the hypervisor may be used to specify, for example, a message-signaled interrupt (MSI) capability associated with the hypervisor. A capability may refer to a data structure for permitting operating system software to enable a device to transmit message-signaled interrupts. In an example, the configuration space may be PCI configuration space or PCI express extended configuration space. In an example, the configuration space of the device may be apportioned into at least one message-signaled interrupt vector.
In an example, the hypervisor may determine an unused capability (empty slots or space in the capability portion) in the configuration space of the device. Determining an unused capability may comprise loading a device-specific module in the hypervisor and scanning configuration space of the device pointed to by the device-specific module. In another example, determining an unused capability may comprise inserting a capability of the hypervisor in a linked list of capabilities associated with the configuration space of the device.
In an example, the hypervisor may insert a capability of the hypervisor in a linked list of capabilities associated with the configuration space of the device. The hypervisor may traverse though the capability linked list associated with the configuration space of the device until a termination identifier of the linked list is found. The hypervisor may replace the termination identifier in the configuration space of the device exposed to the guest with a pointer to the capability of the hypervisor. The termination identifier may be part of a previous capability.