Configuration snooping bridge
Systems and methods for configuration snooping are provided. A bridge identifies an initialization message of a central processing unit (CPU) for a device that is downstream of a primary interface of the bridge. The bridge identifies a response to the initialization message. The bridge determines the address range for the device. The bridge stores the address range for the device in a list in the bridge.
1. A method, comprising:
identifying, by a processing device of a bridge in a computing system, an initialization message of a central processing unit (CPU) for a device, the device being connected to a secondary interface of the bridge;
identifying, by the processing device, a device response to the initialization message;
determining, by the processing device, an address range for the device in view of the initialization message and the device response;
storing the address range for the device in a list in the bridge; and
enabling, by the processing device, access to the device in view of the list in the bridge before the bridge receives a system list from the CPU.
2. The method of claim 1 further comprising:
identifying a memory transaction to access the device; and
causing the memory transaction to be forwarded to the address of the device.
3. The method of claim 1 , wherein the initialization message is from one of an operating system or a Basic Input/Output System (BIOS) of the computing system.
4. The method of claim 1 , wherein the bridge connects a first Peripheral Component Interconnect (PCI) bus to a second PCI bus, wherein the device response comprises a request for a size of an address range for the device, the method further comprising:
identifying a first address of the address range for the device from the initialization message.
5. The method of claim 1 , wherein the device is a virtual device emulated by a hypervisor.
6. The method of claim 1 , wherein the bridge is a virtual bridge emulated by a hypervisor.
7. The method of claim 1 , wherein the device is a virtual device within a virtual machine running on a hypervisor in a virtual environment, the hypervisor having access to a physical device, the physical device having an address that corresponds to a host operating system, wherein determining, by the bridge, the address for the device in view of the device response comprises:
creating a translation table that translates the address of the virtual device in a guest operating system to the address of the physical device on the host operating system.
8. The method of claim 1 , wherein the list comprises address ranges for a plurality of devices, the method further comprising:
identifying a memory transaction to access the device; and
causing the memory transaction to be forwarded to an address of the device using the list.
9. An apparatus, comprising:
a memory; and
a processing device, operatively coupled with the memory, to:
identify an initialization message for a device, the device being connected to a secondary interface of a bridge;
identify a device response to the initialization message;
determine an address range for the device in view of the initialization message and the device response;
store the address range for the device in a list in the bridge; and
enable access to the device in view of the list in the bridge before the bridge receives a system list from the CPU.
10. The apparatus of claim 9 , the processing device further to:
identify a memory transaction to access the device, and
cause the memory transaction to be forwarded to the address of the device.
11. The apparatus of claim 9 , wherein the bridge connects a first Peripheral Component Interconnect (PCI) bus to a second PCI bus, wherein the device response comprises a request for a size of an address range for the device, and wherein the processing device further to:
identify a first address of the address range for the device from the initialization message.
12. The apparatus of claim 9 , wherein the device is a virtual device emulated by a hypervisor, and the bridge is a virtual bridge emulated by the hypervisor.
13. The apparatus of claim 9 , wherein the device is a virtual device within a virtual machine running on a hypervisor in a virtual environment, the hypervisor having access to a physical device, the physical device having an address that corresponds to a host operating system, wherein to determine the address for the device in view of the device response, the processing device is to:
create a translation table that translates the address of the virtual device in the a operating system to the address of the physical device on the host operating system.
14. The apparatus of claim 9 , wherein the list comprises address ranges for a plurality of devices, wherein the processing device further to:
identify a memory transaction to access the device; and
cause the memory transaction to be forwarded to an address of the device using the list.
15. A non-transitory computer readable storage medium including instructions that, when executed by a processing device of a bridge, cause the processing device to:
identify an initialization message of a central processing unit (CPU) for a device, the device being connected to a secondary interface of the bridge;
identify, by the processing device of the bridge, a device response to the initialization message;
determine, by the processing device of the bridge, an address range for the device in view of the initialization message and the device response;
store the address range for the device in a list in the bridge; and
enable access to the device in view of the list in the bridge before the bridge receives a system list from the CPU.
16. The non-transitory computer readable storage medium of claim 15 , the processing device further to:
identify a memory transaction to access the device; and
cause the memory transaction to be forwarded to the address of the device.
17. The non-transitory computer readable storage medium of claim 15 , wherein the bridge connects a first Peripheral Component Interconnect (PCI) bus to a second PCI bus, wherein the device response comprises a request for a size of an address range for the device, the processing device further to:
identify a first address of the address range for the device from the initialization message.
18. The non-transitory computer readable storage medium of claim 15 , wherein the device is a virtual device emulated by a hypervisor, and the bridge is a virtual bridge emulated by the hypervisor.
19. The non-transitory computer readable storage medium of claim 15 , wherein the device is a virtual device within a virtual machine running on a hypervisor in a virtual environment, the hypervisor having access to a physical device, the physical device having an address that corresponds to a host operating system, wherein to determine the address for the device in view of the device response, the processing device is to create a translation table that translates the address of the virtual device in a guest operating system to the address of the physical device on the host operating system.
20. The non-transitory computer readable storage medium of claim 15 , wherein the list comprises address ranges for a plurality of devices, the processing device further to:
identify a memory transaction to access the device; and
cause the memory transaction to be forwarded to an address of the device using the list.