Claims
- 1. A method of assigning a device to a first virtual machine, the method comprising:
running the first virtual machine on a computer; running a second virtual machine on the computer; assigning the device to the first virtual machine for exclusive use by the first virtual machine, the device being connected, directly or indirectly, to the computer through an interconnect; and enforcing the assignment by inhibiting the second virtual machine from using the device.
- 2. The method of claim 1 wherein enforcing the assignment comprises inhibiting the second virtual machine from accessing a configuration data space for the device.
- 3. The method of claim 1 wherein enforcing the assignment comprises inhibiting the second virtual machine from configuring the device.
- 4. The method of claim 1 wherein enforcing the assignment comprises inhibiting the second virtual machine from detecting the device.
- 5. The method of claim 4 wherein:
the computer comprises a processor, and inhibiting the second virtual machine comprises causing a configuration data space for the device to be mapped to one or more entire pages of processor addressable space.
- 6. The method of claim 5 wherein:
the processor has at least three address spaces, including a memory address space, an input-output address space, and a third address space, and the one or more entire pages of processor addressable space are in the third address space.
- 7. The method of claim 5 wherein the processor has a memory address space and the one or more entire pages of processor addressable space are in the processor's memory address space.
- 8. The method of claim 4 wherein inhibiting the second virtual machine comprises handling a trapped instruction, the instruction being from the second virtual machine and being part of an attempt to detect the device.
- 9. The method of claim 8 wherein the trapped instruction is an atomic operation.
- 10. The method of claim 8 wherein the trapped instruction is a memory instruction.
- 11. The method of claim 8 wherein:
the computer comprises a processor that has at least three address spaces, including a memory address space, an input-output address space, and a third address space, and the instruction is a third-address-space instruction.
- 12. The method of claim 1 wherein enforcing the assignment comprises inhibiting the second virtual machine from detecting the device by mapping a configuration data space for the device exclusively to one or more entire pages of processor memory and trapping an instruction for an atomic operation from the second virtual machine, the instruction being part of an attempt to detect the device.
- 13. A computer program, residing on a computer-readable medium, for assigning a device to a first virtual machine, the computer program comprising instructions for causing a computer to perform the following operations:
run the first virtual machine on a computer; run a second virtual machine on the computer; assign the device to the first virtual machine for exclusive use by the first virtual machine, the device being connected, directly or indirectly, to the computer through an interconnect; and enforce the assignment by inhibiting the second virtual machine from using the device.
- 14. The computer program of claim 13 wherein the instructions for causing a computer to enforce the assignment comprise instructions for causing a computer to inhibit the second virtual machine from accessing a configuration data space for the device.
- 15. The computer program of claim 14 wherein the instructions for causing a computer to inhibit the second virtual machine comprise instructions for causing a computer to map a configuration data space for the device exclusively to one or more entire pages of processor addressable space.
- 16. The computer program of claim 14 wherein the instructions for causing a computer to inhibit the second virtual machine comprise instructions for causing a computer to handle a trapped instruction, the instruction being from the second virtual machine and being part of an attempt to detect the device.
- 17. An apparatus comprising:
a device; an interconnect; and a processor connected, directly or indirectly, to the device through the interconnect, the processor being programmed to: run a first virtual machine, run a second virtual machine, assign the device to the first virtual machine for exclusive use by the first virtual machine, and enforce the assignment by inhibiting the second virtual machine from using the device.
- 18. The apparatus of claim 17 wherein the processor is programmed to enforce the assignment by inhibiting the second virtual machine from accessing a configuration data space for the device.
- 19. The apparatus of claim 18 wherein the processor is programmed to inhibit access by causing the configuration data space to be mapped exclusively to one ore more entire pages of processor addressable space.
- 20. The apparatus of claim 18 wherein the processor is programmed to inhibit access by handling a trapped instruction, the instruction being from the second virtual machine and being part of an attempt to detect the device.
CROSS-REFERENCE TO RELATED APLICATIONS
[0001] This application is related to U.S. application Ser. No. ______ (Attorney Docket No. 10559/622001/P12967), entitled “Mapping of Interconnect Configuration Space,” which is being filed concurrently herewith.