On 9/28/21 12:54 PM, Ani Sinha wrote:


On Tue, Sep 28, 2021 at 10:17 PM Laine Stump <la...@redhat.com <mailto:la...@redhat.com>> wrote:

    On 9/28/21 4:44 AM, Daniel P. Berrangé wrote:
     > On Sun, Sep 12, 2021 at 08:56:29AM +0530, Ani Sinha wrote:
     >> This change introduces libvirt xml support for the following two
    pm options:
     >>
     >> <pm>
     >>    <acpi-hotplug-bridge enabled='no'/>
     >>    <acpi-root-hotplug enabled='yes'/>
     >> </pm>
     >
     >
     >> +``acpi-hotplug-bridge``
     >> +   :since:`Since 7.8.0` This option enables or disables BIOS
    ACPI based hotplug support
     >> +   for cold plugged bridges. It is available only for x86
    guests, both for q35 and pc
     >> +   machine types. For pc machines, the support is available
    from `QEMU 2.12`. For q35
     >> +   machines, the support is available from `QEMU 6.1`. Examples
    of cold plugged bridges
     >> +   include PCI-PCI bridges for pc machine types (pci-bridge
    controller). For q35 machines,
     >> +   it includes PCIE root ports (pcie-root-port controller).
    This is a global option that
     >> +   affects all bridges. No other bridge specific option is
    required to be specified.
     >
     > Can you confirm my understanding of the situation..
     >
     >   - i440fx / PCI topology - hotplug always uses ACPI
     >
     >   - q35 / PCIe topology - hotplug historically used native PCIe
    hotplug,
     >                           but in 6.1 switched to ACPI
     >
     > Given, the name "acpi-hotplug-bridge",  am I right that this option
     > has *no* effect, if the q35 machine is using native PCIe hotplug
     > approach ?  IOW, is it a no-op until 6.1 based machine types for
    q35 ?

    I *think* that in machinetypes where the default is native-pcie
    hotplug,
setting acpi-hotplug-bridge=on

6.1 not only introduced this option/command line in Qemu but also flipped the switch to make ACPI hotplug default for pcie root ports. So there are  no officially released  version of Qemu where this command line exists and the default is native pcie hotplug.

You're assuming that everyone will use the canonical "q35" machinetype rather than a specific versioned machinetype (e.g. "pc-q35-6.0"). For pre-6.1 machinetypes, the default will still be native-pcie hotplug, even when running qemu-6.1+.



    will simultaneously enable ACPI hotplug
    and disable native-pcie hotplug for all pcie-root-ports and
    pcie-downstream-ports.


This is for 6.1 based machines as well.

    Similarly on 6.1-based machinetypes, setting
    acpi-hotplug-bridge=off will disable ACPI hotplug and enable
    native-pcie
    hotplug.

    On 440fx, where the default has always been ACPI (and where SHPC
    hotplug
    has been disabled), acpi-hotplug-bridge=on will be a NOP, and
    acpi-hotplug-bridge=off will completely disable hotplug on any
    pci-bridge (but *not* on pci-root).

    As for the acpi-hotplug-root option, that is only valid for 440fx, is
    "on" by default, and when acpi-hotplug-root=off it will completely
    disable hotplug to any slot on pci-root.

    (for completeness - when a pcie-root-port or pcie-downstream-port has
    <target hotplug='off'/>, that will disable whatever hotplug mode would
    have been enabled for the controller - no hotplug at all will be
    possible on that controller. QEMU also has a "native_hotplug" option
    (not supported in libvirt) for pcie-root-ports and
    pcie-downstream-ports
    which can be used to enable native-pcie hotplug on a specific
    controller
    when it had been disabled (in favor of ACPI) with the global
    acpi-hotplug-bridge ).


Reply via email to