From: Ross Philipson <ross.philipson@citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "Huangweidong (C)" <weidong.huang@huawei.com>,
"Gonglei (Arei)" <arei.gonglei@huawei.com>,
"Hanweidong (Randy)" <hanweidong@huawei.com>,
"mst@redhat.com" <mst@redhat.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
"fabio.fantoni@m2r.biz" <fabio.fantoni@m2r.biz>,
"johannes.krampf@googlemail.com" <johannes.krampf@googlemail.com>,
"kevin@koconnor.net" <kevin@koconnor.net>,
Stefano Stabellini <Stefano.Stabellini@citrix.com>,
"Gaowei (UVP)" <gao.gaowei@huawei.com>,
Jan Beulich <JBeulich@suse.com>,
Anthony Perard <anthony.perard@citrix.com>,
Paul Durrant <Paul.Durrant@citrix.com>
Subject: Re: [Qemu-devel] [Xen-devel] [PATCH v4] Hvmloader: Modify ACPI to only supply _EJ0 methods for PCIslots that support hotplug by runtime patching
Date: Fri, 9 May 2014 11:48:09 -0400 [thread overview]
Message-ID: <536CF8B9.40307@citrix.com> (raw)
In-Reply-To: <1399646760.561.38.camel@kazak.uk.xensource.com>
On 05/09/2014 10:46 AM, Ian Campbell wrote:
> On Fri, 2014-05-09 at 10:38 -0400, Ross Philipson wrote:
>>>> Can it be used to patch the DSDT? Or were you (Ian) thinking that the bulk
>>>> of the ACPI PCI stuff can be moved there ?
>>>
>>> I think it can "shadow" or extend existing DSDT stuff, I don't think it
>>> can patch as sych. But here we want to dynamically add an entire method
>>> I think? (or hide, but I don't think that is possible).
>>
>> Yea the SSDTs extend the DSDT. The DSDT is loaded to create the name
>> space and then SSDTs are loaded and added to the name space. If you need
>> to make runtime modifications like this, it is much easier to do it in
>> an SSDT as you suggest. What I don't know is whether you could extend
>> say a device, as in this case, with with a single method in a separate
>> SSDT. I have never really seen something like that before.
>
> So it could be used by having two template SSDTs (one for ejectable, one
> for not) and outputting the correct ones as necessary?
Yea you can have any combination of SSDTs. You could select the ones you
want at build time or can also make decisions at runtime on which get
loaded in a guest. I don't know if you can extend an existing device
described in the DSDT with additional methods in an SSDT. If you can,
this would be a pretty clean way to do it IMO. If you can't, this might
mean moving much more of the ASL that describes the PCI devices out of
the DSDT and into SSDTs.
>
>> WRT to hide vs. remove, I believe the intent is to effectively remove
>> the eject method from a given device by renaming it. It could simply be
>> removed making the device not eject-able but I think they are trying to
>> avoid having to recalculate and update the checksum on the DSDT.
>
> How does one make the device be not eject-able? I thought it was via the
> presence or absence of _EJ0 (hence the renaming hack).
By not have any _EJx methods. In this case, removing _EJ0 says the
device does not support hot removal. Renaming it is effectively removing
it since the OSPM would have no idea what the renamed method is. I am
guessing but it seems reasonable they went for the rename option because
a. they would have to strip out the whole method which would be hard and
b. they would then need to rerun a checksum on the DSDT and update it.
>
>> As to whether this has to be done at runtime, I don't know. If it does,
>> I wrote a lib that can generate basically any (rev2) AML on the fly. We
>> used it e.g. to generate WMI functionality in an SSDT at runtime. I
>> would be happy to share if it is useful.
>
> Thanks. hvmloader seems to generate various bits on the fly based on
> basic templates already, although perhaps those cases are simpler than
> this one.
>
> Ian.
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2014.0.4570 / Virus Database: 3931/7443 - Release Date: 05/05/14
>
--
Ross Philipson
next prev parent reply other threads:[~2014-05-09 15:48 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-09 8:47 [Qemu-devel] [PATCH v4] Hvmloader: Modify ACPI to only supply _EJ0 methods for PCIslots that support hotplug by runtime patching arei.gonglei
2014-05-09 9:35 ` Jan Beulich
2014-05-09 9:45 ` Gonglei (Arei)
2014-05-09 9:51 ` Jan Beulich
2014-05-09 9:57 ` Ian Campbell
2014-05-09 10:15 ` Gonglei (Arei)
2014-05-09 10:26 ` Ian Campbell
2014-05-09 13:25 ` [Qemu-devel] [Xen-devel] " Konrad Rzeszutek Wilk
2014-05-09 13:31 ` Ian Campbell
2014-05-09 14:38 ` Ross Philipson
2014-05-09 14:46 ` Ian Campbell
2014-05-09 14:56 ` Fabio Fantoni
2014-05-09 15:03 ` Ian Campbell
2014-05-09 15:48 ` Ross Philipson [this message]
2014-05-09 16:00 ` Konrad Rzeszutek Wilk
2014-05-09 16:12 ` Ian Campbell
2014-05-09 16:30 ` Ross Philipson
2014-05-09 16:34 ` Paul Durrant
2014-05-09 17:32 ` Ross Philipson
2014-05-09 17:55 ` Konrad Rzeszutek Wilk
2014-05-12 9:05 ` Ian Campbell
2014-05-12 9:14 ` Jan Beulich
2014-05-12 9:20 ` Ian Campbell
2014-05-12 14:32 ` Ross Philipson
2014-08-20 12:11 ` Fabio Fantoni
2014-08-20 22:30 ` Konrad Rzeszutek Wilk
2014-08-22 8:45 ` Gonglei (Arei)
2015-01-27 13:28 ` Pasi Kärkkäinen
2014-05-09 16:13 ` Ross Philipson
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=536CF8B9.40307@citrix.com \
--to=ross.philipson@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=Paul.Durrant@citrix.com \
--cc=Stefano.Stabellini@citrix.com \
--cc=anthony.perard@citrix.com \
--cc=arei.gonglei@huawei.com \
--cc=fabio.fantoni@m2r.biz \
--cc=gao.gaowei@huawei.com \
--cc=hanweidong@huawei.com \
--cc=johannes.krampf@googlemail.com \
--cc=kevin@koconnor.net \
--cc=konrad.wilk@oracle.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=weidong.huang@huawei.com \
--cc=xen-devel@lists.xen.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).