[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 3/5] hw/i386/acpi-build: Add ACPI PCI hot-plug methods to
From: |
Gerd Hoffmann |
Subject: |
Re: [RFC PATCH 3/5] hw/i386/acpi-build: Add ACPI PCI hot-plug methods to q35 |
Date: |
Wed, 15 Jul 2020 08:57:51 +0200 |
On Mon, Jul 13, 2020 at 04:39:54PM +0200, Igor Mammedov wrote:
> On Thu, 9 Jul 2020 00:46:13 +0200
> Julia Suvorova <jusual@redhat.com> wrote:
>
> > Implement notifications and gpe to support q35 ACPI PCI hot-plug.
> > The addresses specified in [1] remain the same to make fewer changes.
> >
> > [1] docs/spec/acpi_pci_hotplug.txt
>
> CCing Gerd his opinion on reusing piix4 IO port range for q35
Oh no, please don't. Grabbing random io ports is asking for trouble,
especially on q35 where you only need enough pcie devices to have the
port range 0xae00 -> 0xae0f actually overlap with a pci bridge window.
Ideally we'll find some unused spot in the hidden pci bar of the ich9
pm device. At least the qemu implementation has some room:
0000000000000600-000000000000067f (prio 0, i/o): ich9-pm
0000000000000600-0000000000000603 (prio 0, i/o): acpi-evt
0000000000000604-0000000000000605 (prio 0, i/o): acpi-cnt
0000000000000608-000000000000060b (prio 0, i/o): acpi-tmr
0000000000000620-000000000000062f (prio 0, i/o): acpi-gpe0
0000000000000630-0000000000000637 (prio 0, i/o): acpi-smi
0000000000000660-000000000000067f (prio 0, i/o): sm-tco
Offset 0x40 seems to be unused for example (but better check the chipset
specs to see if that is really unused or whenever the qemu emulation is
incomplete).
If that doesn't work out pick an io range which is unlikely to conflict
with something. That excludes anything above > 0x1000 (pci bridge
windows) and anything below 0x3ff (legacy isa). From the remaining
range 0x400 -> 0xfff the 0xc00 -> 0xcff block is the best candidate
I think. Because of the pci config registers being there it is unlikely
that the firmware places something in that range.
Oh, I see the cpu hotplug registers are already there:
[ ... ]
0000000000000700-000000000000073f (prio 1, i/o): pm-smbus
0000000000000cd8-0000000000000ce3 (prio 0, i/o): acpi-cpu-hotplug
0000000000000cf8-0000000000000cfb (prio 0, i/o): pci-conf-idx
0000000000000cf9-0000000000000cf9 (prio 1, i/o): lpc-reset-control
0000000000000cfc-0000000000000cff (prio 0, i/o): pci-conf-data
[ ... ]
So placing the pci hotplug registers next to them (say at 0xcc8) looks
like a good pick to me.
While being at it: Shouldn't we reserve these port ranges somehow?
Using an acpi device for example, simliar to fw_cfg? The guest OS
should better know there is something at those ports ...
take care,
Gerd
[RFC PATCH 4/5] hw/i386/acpi-build: Turn off support of PCIe native hot-plug and SHPC in _OSC, Julia Suvorova, 2020/07/08
[RFC PATCH 5/5] hw/acpi/ich9: Enable ACPI PCI hot-plug, Julia Suvorova, 2020/07/08