US 12,169,733 B2
Fast device discovery for virtual machines
Michael Tsirkin, Yokneam Illit (IL); and Paolo Bonzini, Milan (IT)
Assigned to Red Hat, Inc., Raleigh, NC (US)
Filed by RED HAT, INC., Raleigh, NC (US)
Filed on Feb. 9, 2023, as Appl. No. 18/166,728.
Application 18/166,728 is a continuation of application No. 16/801,737, filed on Feb. 26, 2020, granted, now 11,586,458.
Prior Publication US 2023/0185599 A1, Jun. 15, 2023
This patent is subject to a terminal disclaimer.
Int. Cl. G06F 9/455 (2018.01); G06F 12/0882 (2016.01)
CPC G06F 9/45558 (2013.01) [G06F 12/0882 (2013.01); G06F 2009/45595 (2013.01)] 15 Claims
OG exemplary drawing
 
1. A method comprising:
evaluating, by a processing device of a host machine, a plurality of device slots of a communication bus to identify a device slot of the plurality of device slots as being an unoccupied device slot that is not occupied by a hardware device;
responsive to identifying the device slot as being an unoccupied device slot, generating, by the processing device, a memory page comprising a memory address of the unoccupied device slot;
mapping, by the processing device, an entry for the memory page within a page table;
detecting, by the processing device, a read access of the memory address of the unoccupied device slot by a guest executing on the host machine;
identifying, by the processing device, the entry for the memory page within the page table, wherein the entry for the memory page within the page table indicates that the memory page is a read-only memory page for the guest, and wherein the memory page comprises a value that indicates that the memory address is for a device slot that is unoccupied; and
in response to identifying the entry for the memory page within the page table, causing, by the processing device, the memory page to be provided to the guest.