qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: skandasa@cisco.com, lmr@redhat.com, etmartin@cisco.com,
	wexu2@cisco.com, Markus Armbruster <armbru@redhat.com>,
	qemu-devel@nongnu.org, kraxel@redhat.com
Subject: Re: [Qemu-devel] Re: [PATCH v6 07/12] pcie/hotplug: introduce pushing attention button command
Date: Mon, 25 Oct 2010 06:15:37 +0200	[thread overview]
Message-ID: <20101025041537.GB1491@redhat.com> (raw)
In-Reply-To: <20101025032957.GQ31309@valinux.co.jp>

On Mon, Oct 25, 2010 at 12:29:57PM +0900, Isaku Yamahata wrote:
> On Fri, Oct 22, 2010 at 04:38:49PM +0200, Michael S. Tsirkin wrote:
> > On Fri, Oct 22, 2010 at 01:35:47PM +0200, Markus Armbruster wrote:
> > > "Michael S. Tsirkin" <mst@redhat.com> writes:
> > > 
> > > > On Wed, Oct 20, 2010 at 05:18:56PM +0900, Isaku Yamahata wrote:
> > > >> glue pcie_push_attention_button command.
> > > >> 
> > > >> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
> > > >
> > > > So as a high level command, I think we need to
> > > > think about how to tie this into pci_add/pci_del.
> > > > Right?
> > > [...]
> > > 
> > > Do we have consensus how our set of commands for hot plug should look
> > > like?  We talked about it, but did we reach consensus?  If yes, did we
> > > write it down somewhere?
> > 
> > I think for simple things yes:
> > - command to send hotplug notification to the guest
> > - command to immediately add/remove the device
> > - event to notify about guest ack
> > - way to poll status: did guest ack last command?
> 
> I'm not sure about guest ack. Let me check my understanding.


Your understanding is correct.

> The current qemu pci hot plug has its own hot plug controler,
> PIIX4_PM, which relies on ACPI.
> 
> - command to add the device into the slot
>   This corresponds to physically inserting the device into the slot.
>   - qemu pci hot plug case: device_add/pci_add command.
>     The qemu pci hot plug controller, PIIX4_PM, detects the insertion,
>     then notify the guest OS of the event via ACPI, _L01.
>     The guest OS would start to probe the device.
> 
>   - pci express native hot plug case: device_add/pci_add command.
>     The pcie hot plug controller detects the the insertion,
>     then notify the guest OS of the event via interrupt.
>     The guest OS would start to probe the device.
> 
> - command to remove the device from the slot
>   This corresponds to physically removing the device from the slot.
>   - qemu pci hot plug case: No corresponding command.
>     There is no way to remove the pci card forcibly from the slot.
> 
>   - pci express native hot plug case: device_del/pci_del
>     After the removal of the card, the hot plug controller notifies
>     the guest OS via interrupt.
> 
> - command to send hotplug notification to the guest
>   command to push attention button.
>   This corresponds to pushing the button near the slot.
>   - qemu pci hot plug case: device_del/pci_del command
>     Maybe the button is called an eject button.
>     When the button is pushed, the hot plug controller notifies
>     the guest OS via ACPI, _L01.
>     Then, guest OS reacts the event by calling ACPI \_SB.PCI0.S<n>._EJ0
>     method. It program the hot plug controller to eject the device
>     in the given slot. As a result, the device is removed from the slot.
>     If the guest OS doesn't call _EJ0 (nor programs the controller directly),
>     the device stays there.
>     There is no way to remove the pci card without the guest OS
>     intervention.
> 
>   - pci express native hot plug case:
>     pcie_push_attention_button command with my patch series.
>     The hot plug controller raise the interrupt to the guest OS.
>     There is no specified action from the OS.

Right. So what is suggested is that we have
A. a single command to push the attention button
B. a single command to remove pci card without guest OS interaction
C. a way to interact with the guest
management tools or human monitor will be able to tie A,B,C together
in various interesting ways

What I am also saying is that the same command should be able
to work for pci and express I think.

> - a way to get the slot status
>   new command for QMP/HMP? or enhance info pci?
> 
> - QMP event for qemu to notify the slot status change
>   e.g. when LED status is changed, qmp event will be sent.
> 
> > Existing ones will keep function:
> > - send notification and when acked remove device
> > - add device and send notification
> > These are useful for human monitor but maybe not
> > for management.
> > 
> > 
> > -- 
> > MST
> > 
> 
> -- 
> yamahata

  reply	other threads:[~2010-10-25  4:22 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-20  8:18 [Qemu-devel] [PATCH v6 00/12] pcie port switch emulators Isaku Yamahata
2010-10-20  8:18 ` [Qemu-devel] [PATCH v6 01/12] pcie: comment on hpev_intx Isaku Yamahata
2010-10-20  8:18 ` [Qemu-devel] [PATCH v6 02/12] pci/bridge: fix pci_bridge_reset() Isaku Yamahata
2010-10-20  8:49   ` [Qemu-devel] " Michael S. Tsirkin
2010-10-20  9:04     ` Isaku Yamahata
2010-10-20 10:00       ` Michael S. Tsirkin
2010-10-20  8:18 ` [Qemu-devel] [PATCH v6 03/12] pcie port: define struct PCIEPort/PCIESlot and helper functions Isaku Yamahata
2010-10-20  8:18 ` [Qemu-devel] [PATCH v6 04/12] ioh3420: pcie root port in X58 ioh Isaku Yamahata
2010-10-20  8:18 ` [Qemu-devel] [PATCH v6 05/12] x3130: pcie upstream port Isaku Yamahata
2010-10-20  8:18 ` [Qemu-devel] [PATCH v6 06/12] x3130: pcie downstream port Isaku Yamahata
2010-10-20  8:18 ` [Qemu-devel] [PATCH v6 07/12] pcie/hotplug: introduce pushing attention button command Isaku Yamahata
2010-10-20 10:00   ` [Qemu-devel] " Michael S. Tsirkin
2010-10-21  3:46     ` Isaku Yamahata
2010-10-21  8:02       ` Michael S. Tsirkin
2010-10-21  9:41         ` Isaku Yamahata
2010-10-22 11:35     ` Markus Armbruster
2010-10-22 14:38       ` Michael S. Tsirkin
2010-10-22 14:52         ` Anthony Liguori
2010-10-25  4:16           ` Michael S. Tsirkin
2010-10-25  3:29         ` Isaku Yamahata
2010-10-25  4:15           ` Michael S. Tsirkin [this message]
2010-10-25  5:53             ` Isaku Yamahata
2010-10-25  5:55               ` Michael S. Tsirkin
2010-10-25  7:02                 ` Isaku Yamahata
2010-10-25  7:27                   ` Michael S. Tsirkin
2010-10-27  1:47                   ` Isaku Yamahata
2010-10-27 13:31                     ` Michael S. Tsirkin
2010-10-20  8:18 ` [Qemu-devel] [PATCH v6 08/12] pcie/aer: helper functions for pcie aer capability Isaku Yamahata
2010-10-20  9:56   ` [Qemu-devel] " Michael S. Tsirkin
2010-10-21  5:15     ` Isaku Yamahata
2010-10-21  8:07       ` Michael S. Tsirkin
2010-10-21 23:53         ` Isaku Yamahata
2010-10-22  9:27           ` Michael S. Tsirkin
2010-10-22 11:28     ` Markus Armbruster
2010-10-20  8:18 ` [Qemu-devel] [PATCH v6 09/12] pcie/aer: glue aer error injection into qemu monitor Isaku Yamahata
2010-10-20  9:44   ` [Qemu-devel] " Michael S. Tsirkin
2010-10-20  8:18 ` [Qemu-devel] [PATCH v6 10/12] ioh3420: support aer Isaku Yamahata
2010-10-20  8:19 ` [Qemu-devel] [PATCH v6 11/12] x3130/upstream: " Isaku Yamahata
2010-10-20  8:19 ` [Qemu-devel] [PATCH v6 12/12] x3130/downstream: " Isaku Yamahata
2010-10-20 10:09 ` [Qemu-devel] Re: [PATCH v6 00/12] pcie port switch emulators Michael S. Tsirkin

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=20101025041537.GB1491@redhat.com \
    --to=mst@redhat.com \
    --cc=armbru@redhat.com \
    --cc=etmartin@cisco.com \
    --cc=kraxel@redhat.com \
    --cc=lmr@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=skandasa@cisco.com \
    --cc=wexu2@cisco.com \
    --cc=yamahata@valinux.co.jp \
    /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).