From: Jason Baron <jbaron@redhat.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: bhelgaas@google.com, linux-pci@vger.kernel.org, mst@redhat.com
Subject: Re: [PATCH] pci hotplug: rescan bridge after device hotplug
Date: Wed, 23 May 2012 14:44:49 -0400 [thread overview]
Message-ID: <20120523184449.GB23940@redhat.com> (raw)
In-Reply-To: <CAE9FiQWPpKE5vmzZqw-E_L_0Lt1QpqV=xk=Hu6Stzva5vXk1_g@mail.gmail.com>
On Wed, May 23, 2012 at 10:16:06AM -0700, Yinghai Lu wrote:
> On Wed, May 23, 2012 at 8:53 AM, Jason Baron <jbaron@redhat.com> wrote:
> >> > but still would prefer you to make qemu to support pciehp.
> >>
> >> another solution could be:
> >>
> >> in qemu acpi dsdt, you could set bridge size for new added bridge.
> >>
> >> current pbus_size_mem() will not shrink the old bridge resource size.
> >
> > ok, I also tried hard-wiring the bridge io/mem base and limit registers on the
> > qemu side. That seems to work without any guest-side hotplug code changes. And
> > would seem to be more flexible than putting the limits in acpi.
>
> that should be acpi asl code or SMI work. and should make sure that
> range is not overlapped with resources that are used by other bridges
> and pci devices.
>
Ok. So you are saying to define a 'Name (_CRS, ResourceTemplate() {
Memory() IO() })' block for each bridge? The acpi code I currently have,
has one 'Device()' definition for each top-level hotplug slot. Would it
be ok to have the '_CRS' apply to either one?
Also, I'm wondering where in the acpiphp code it picks up the memory/io
ranges to configure them as bridge ranges?
I also see in ACPIspec40a.pdf, section "9.11 Module Device":
"
If no _CRS object is present, OSPM will assume that the module device is
a simple container object that does not produce the resources consumed by its
child devices. In this case, OSPM will assign resources to the child devices as
if they were direct children of the module device's parent object.
"
So not sure if that applies to hotplug, but that is not what acpiphp is
doing atm.
Finally, I don't see why putting the bridge window range logic into qemu is a
bad solution. Qemu knows memory ranges consumed by various resoures,
looking at 'info mtree', so why can't qemu hand out the bridge ranges
dynamically? In that way, it can re-size the windows more optimally than
something hard-coded into acpi. So to me, it seems like a better
approach.
Thanks,
-Jason
next prev parent reply other threads:[~2012-05-23 18:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-22 20:11 [PATCH] pci hotplug: rescan bridge after device hotplug Jason Baron
2012-05-22 20:34 ` Yinghai Lu
2012-05-22 21:18 ` Yinghai Lu
2012-05-22 21:21 ` Yinghai Lu
2012-05-23 2:43 ` Jason Baron
2012-05-23 3:31 ` Yinghai Lu
2012-05-23 4:07 ` Yinghai Lu
2012-05-23 15:53 ` Jason Baron
2012-05-23 17:16 ` Yinghai Lu
2012-05-23 18:44 ` Jason Baron [this message]
2012-05-23 19:08 ` Michael S. Tsirkin
2012-05-23 19:20 ` Michael S. Tsirkin
2012-05-23 20:53 ` Yinghai Lu
2012-05-23 21:18 ` Michael S. Tsirkin
2012-05-23 20:31 ` Yinghai Lu
2012-05-23 20:49 ` Michael S. Tsirkin
2012-05-23 19:13 ` Michael S. Tsirkin
2012-05-23 20:52 ` Jason Baron
2012-05-24 0:00 ` Yinghai Lu
2012-05-24 13:43 ` Jason Baron
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=20120523184449.GB23940@redhat.com \
--to=jbaron@redhat.com \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=mst@redhat.com \
--cc=yinghai@kernel.org \
/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).