• R
    bhyve: fix SATA address allocation · 803966c7
    Roman Bogorodskiy 提交于
    As bhyve for a long time didn't have a notion of the explicit SATA
    controller and created a controller for each drive, the bhyve driver
    in libvirt acted in a similar way and didn't care about the SATA
    controllers and assigned PCI addresses to drives directly, as
    the generated command will look like this anyway:
    
     2:0,ahci-hd,somedisk.img
    
    This no longer makes sense because:
    
     1. After commit c07d1c1c it's not possible to assign
        PCI addresses to disks
     2. Bhyve now supports multiple disk drives for a controller,
        so it's going away from 1:1 controller:disk mapping, so
        the controller object starts to make more sense now
    
    So, this patch does the following:
    
     - Assign PCI address to SATA controllers (previously we didn't do this)
     - Assign disk addresses instead of PCI addresses for disks. Now, when
       building a bhyve command, we take PCI address not from the disk
       itself but from its controller
     - Assign addresses at XML parsing time using the
       assignAddressesCallback. This is done mainly for being able to
       verify address allocation via xml2xml tests
     - Adjust existing bhyvexml2{xml,argv} tests to chase the new
       address allocation
    
    This patch is largely based on work of Fabian Freyer.
    803966c7
bhyvexml2xmlout-grub-bootorder.xml 1.6 KB