qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jiang Liu <liuj97@gmail.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: linux-pci@vger.kernel.org, seabios@seabios.org,
	qemu-devel@nongnu.org, jbarnes@virtuousgeek.org, rjw@sisk.pl,
	alex.williamson@redhat.com, kevin@koconnor.net,
	Amos Kong <akong@redhat.com>
Subject: Re: [Qemu-devel] [RESEND PATCH v3] hotplug: add device per func in ACPI DSDT tables
Date: Fri, 11 May 2012 01:46:17 +0800	[thread overview]
Message-ID: <4FABFEE9.9060501@gmail.com> (raw)
In-Reply-To: <20120510174257.GD14647@redhat.com>

On 05/11/2012 01:42 AM, Michael S. Tsirkin wrote:
> On Fri, May 11, 2012 at 01:17:38AM +0800, Jiang Liu wrote:
>> On 05/09/2012 03:24 PM, Amos Kong wrote:
>>
>>> ---
>>>  src/ssdt-pcihp.dsl |   17 
>>>  src/ssdt-pcihp.hex | 8869 +++++++++++++++++++++++++++++++++++++++++++++++++++-
>>>  2 files changed, 8781 insertions(+), 105 deletions(-)
>>>
>>> diff --git a/src/ssdt-pcihp.dsl b/src/ssdt-pcihp.dsl
>>> index 4b435b8..2a3c326 100644
>>> --- a/src/ssdt-pcihp.dsl
>>> +++ b/src/ssdt-pcihp.dsl
>>> @@ -17,14 +17,23 @@ DefinitionBlock ("ssdt-pcihp.aml", "SSDT", 0x01, "BXPC", "BXSSDTPCIHP", 0x1)
>>>          // at runtime, if the slot is detected to not support hotplug.
>>>          // Extract the offset of the address dword and the
>>>          // _EJ0 name to allow this patching.
>>> -#define hotplug_slot(slot)                              \
>>> -        Device (S##slot) {                              \
>>> +#define hotplug_func(slot, fn)                          \
>>> +        Device (S##slot##fn) {                          \
>>>             ACPI_EXTRACT_NAME_DWORD_CONST aml_adr_dword  \
>>> -           Name (_ADR, 0x##slot##0000)                  \
>>> +           Name (_ADR, 0x##slot##000##fn)               \
>>>             ACPI_EXTRACT_METHOD_STRING aml_ej0_name      \
>>>             Method (_EJ0, 1) { Return(PCEJ(0x##slot)) }  \
>>>             Name (_SUN, 0x##slot)                        \
>>>          }
>> It would be perfect if the Device object could also support _PS0 and _STA
>> methods.
> 
> It needs qemu support, and some backward compatibility hack.
> Why?
> 
>> Could we re-add the slot back after hot-removing it from the guest
>> OS with this ACPI implementation? Say execute following scripts from guest OS.
>> echo 0 > /sys/bus/pci/slot/xx/power
>> echo 1 > /sys/bus/pci/slot/xx/power
> 
> No because qemu removes device after eject.
> Do you have a need for this functionality? What is it?

I'm not familiar with qemu:(
On native OS, admin could trigger PCI device hotplug operations through
/sys/bus/pci/slot/xx/power. Not sure whether that's needed for guest OS too. 

  reply	other threads:[~2012-05-10 17:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20111214010645.GA2044@morn.localdomain>
2012-05-09  7:24 ` [Qemu-devel] [RESEND PATCH v3] hotplug: add device per func in ACPI DSDT tables Amos Kong
2012-05-09  7:35   ` Amos Kong
2012-05-09  8:46   ` Michael S. Tsirkin
2012-05-09  8:59     ` Amos Kong
2012-05-09  9:53       ` Amos Kong
2012-05-09 13:47   ` Alex Williamson
2012-05-09 16:08     ` Amos Kong
2012-05-10 16:50     ` Jiang Liu
2012-05-10 17:03       ` Michael S. Tsirkin
2012-05-10 17:17   ` Jiang Liu
2012-05-10 17:42     ` Michael S. Tsirkin
2012-05-10 17:46       ` Jiang Liu [this message]
2012-05-10 23:40         ` Amos Kong
2012-05-11 10:14         ` [Qemu-devel] [SeaBIOS] " Gleb Natapov
2012-05-11 15:44           ` Jiang Liu
2012-05-11 17:04             ` Gleb Natapov

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=4FABFEE9.9060501@gmail.com \
    --to=liuj97@gmail.com \
    --cc=akong@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=kevin@koconnor.net \
    --cc=linux-pci@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rjw@sisk.pl \
    --cc=seabios@seabios.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).