qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH RFC 0/6] q35: add acpi pci hotplug support


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH RFC 0/6] q35: add acpi pci hotplug support
Date: Fri, 30 Jun 2017 02:17:52 +0300

On Fri, Jun 30, 2017 at 12:55:56AM +0300, Aleksandr Bezzubikov wrote:
> The series adds hotplug support to legacy PCI buses for Q35 machines.
> The ACPI hotplug code is emitted if at least one legacy pci-bridge is present.
> 
> This series is mostly based on past Marcel's series 
> https://lists.gnu.org/archive/html/qemu-devel/2016-05/msg05681.html,
> but rebased on current master with some minor changes according to current 
> codebase.
> 
> ACPI code emission approach used in this series can be called "static", 
> because it checkswhether a bridge exists only at initial DSDT generation 
> moment. 
> The main goal is to enable AML PCI hotplug-related code to be generated 
> dynamically. 
> In other words, the bridge plugged in - a new acpi definition block is
> loaded (using LoadTable method). 
> This is necessary for PCIE-PCI bridge hotplugging feature. 

I wonder whether we really need ACPI hotplug.
Most modern systems are limited to native PCIE.

I do understand the need to add PCI devices sometimes,
but maybe we can find a way to do this with native hotplug.

For example, how about the following approach


- PCIE downstream port - X - PCIE-to-PCI bridge - PCI device


By hotplugging the bridge+device combination into a downstream
port (point X) we can potentially make devices enumerate
properly.

This might cause some issues with IO port assignment (uses 4K
io port space due to bridge aperture limitations)
but maybe we do not need so many legacy PCI devices -
people who do can simply use piix.


For this to work we need a way to create bridge instance
that is invisible to the guest. There is already a
way to do this for multifunction devices:

create bridge in function != 0
attach device
then create a dummy function 0

Inelegant - it would be cleaner to support this for function 0
as well - but should allow you to test the idea directly.



> Aleksandr Bezzubikov (6):
>   hw/acpi: remove dead acpi code
>   hw/acpi: simplify dsdt building code
>   hw/acpi: fix pcihp io initialization
>   hw/acpi: prepare pci hotplug IO for ich9
>   hw/acpi: extend acpi pci hotplug support for pci express
>   hw/ich9: enable acpi pci hotplug
> 
>  hw/acpi/ich9.c         |  31 +++++++++++++
>  hw/i386/acpi-build.c   | 116 
> ++++++++++++++++++++++++-------------------------
>  hw/isa/lpc_ich9.c      |  12 +++++
>  include/hw/acpi/ich9.h |   4 ++
>  include/hw/i386/pc.h   |   7 ++-
>  5 files changed, 111 insertions(+), 59 deletions(-)
> 
> -- 
> 2.7.4



reply via email to

[Prev in Thread] Current Thread [Next in Thread]