From: Marcel Apfelbaum <marcel@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: mst@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com,
kraxel@redhat.com, laine@redhat.com, pbonzini@redhat.com,
imammedo@redhat.com, lersek@redhat.com, rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH V3 3/3] hw/i386: extend pxb query for all PC machines
Date: Tue, 1 Dec 2015 16:55:57 +0200 [thread overview]
Message-ID: <565DB4FD.7050909@redhat.com> (raw)
In-Reply-To: <20151201144816.GI23717@thinpad.lan.raisama.net>
On 12/01/2015 04:48 PM, Eduardo Habkost wrote:
> On Tue, Dec 01, 2015 at 04:07:33PM +0200, Marcel Apfelbaum wrote:
>> On 11/30/2015 05:07 PM, Eduardo Habkost wrote:
>>> On Sun, Nov 29, 2015 at 10:46:03AM +0200, Marcel Apfelbaum wrote:
>>>> On 11/27/2015 07:28 PM, Eduardo Habkost wrote:
>>>>> On Thu, Nov 26, 2015 at 06:00:28PM +0200, Marcel Apfelbaum wrote:
>>>>>> Add bus property to PC machines and use it when looking
>>>>>> for primary PCI root bus (bus 0).
>>>>>>
>>>>>> Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
>>>>>
>>>>> I can't pretend I have reviewed the q35 part, but the changes are
>>>>> an improvement to the existing code that depended on
>>>>> find_i440fx().
>>>>>
>>>>> Acked-by: Eduardo Habkost <ehabkost@redhat.com>
>>>>
>>>> Thanks!
>>>>
>>>>>
>>>>> BTW, what's missing to allow us to change acpi_set_pci_info() to
>>>>> use PCMachine::bus instead of find_i440fx(), too? How much of the
>>>>> PCI hotplug stuff is different in q35?
>>>>
>>>> It is pretty different.
>>>> i440fx has acpi based hotplug while q35 has PCIe native hotplug. Since is
>>>> "native", no acpi info is necessary.
>>>>
>>>> Having said that, if we have an PCIe-PCI bridge, the pci devices behind it
>>>> cannot be hotplugged/unplugged right now.
>>>>
>>>> Once we decide to add hotplug support for this scenario, maybe we can get rid of
>>>> find_i440fx().
>>>
>>> Thanks for the explanation. I wonder if there's a better way to
>>> check if ACPI-based hotplug is needed by looking at
>>> PCMachineState or PCIBus, so we don't couple the ACPI code to
>>> piix.c.
>>>
>>
>> I suppose we can do something about it, like adding a property to PCMachineState,
>> lets say bool acpi_hotplug and set it false for Q35.
>>
>> Then we have:
>> pcm = PC_MACHINE(current_machine);
>> if(pcm->acpi_hotplug) {
>> bus = pcm->bus;
>> ...
>> }
>>
>> Sounds acceptable? If yes, I'll send a patch on top since is not directly related.S
>
> There's no existing field or method in PCIBus that can be already
> used for that?
Hmm, you can derive the info you need from pci_bus_is_express.
If express-> no acpi_hotplug. This is not 100% true, but since
we don't support acpi hotplug on PCIe machines, it should be OK for now.
If not, that sounds good to me. But I would move
> the field to PCMachineClass instead of PCMachineState.
Sure.
>
> Would you like me to do it? I am planning to submit other changes
> to remove q35/piix dependencies from acpi-build.c.
>
If you have the time, go for it :)
Is a "one liner", if applied on top of this series.
Thanks,
Marcel
next prev parent reply other threads:[~2015-12-01 14:56 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-26 16:00 [Qemu-devel] [PATCH V3 0/3] hw/pcie: Multi-root support for Q35 Marcel Apfelbaum
2015-11-26 16:00 ` [Qemu-devel] [PATCH V3 1/3] hw/acpi: merge pxb adjacent memory/IO ranges Marcel Apfelbaum
2015-11-26 16:00 ` [Qemu-devel] [PATCH V3 2/3] hw/pxb: introduce pxb-pcie expander for PCIe machines Marcel Apfelbaum
2015-11-26 16:00 ` [Qemu-devel] [PATCH V3 3/3] hw/i386: extend pxb query for all PC machines Marcel Apfelbaum
2015-11-27 17:28 ` Eduardo Habkost
2015-11-29 8:46 ` Marcel Apfelbaum
2015-11-30 15:07 ` Eduardo Habkost
2015-12-01 14:07 ` Marcel Apfelbaum
2015-12-01 14:48 ` Eduardo Habkost
2015-12-01 14:55 ` Marcel Apfelbaum [this message]
2015-12-01 15:09 ` Eduardo Habkost
2015-12-01 16:50 ` Marcel Apfelbaum
2015-12-01 17:10 ` Eduardo Habkost
2015-12-01 18:20 ` Eduardo Habkost
2015-12-01 20:53 ` Marcel Apfelbaum
2015-12-01 22:33 ` Eduardo Habkost
2015-11-26 17:01 ` [Qemu-devel] [PATCH V3 0/3] hw/pcie: Multi-root support for Q35 Laszlo Ersek
2015-11-26 18:35 ` Marcel Apfelbaum
2015-11-27 17:04 ` Igor Mammedov
2015-11-29 8:53 ` Marcel Apfelbaum
2015-11-29 12:37 ` Marcel Apfelbaum
2015-11-30 5:23 ` Laszlo Ersek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=565DB4FD.7050909@redhat.com \
--to=marcel@redhat.com \
--cc=armbru@redhat.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=kraxel@redhat.com \
--cc=laine@redhat.com \
--cc=lersek@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).