All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Gavin Shan <gwshan@linux.vnet.ibm.com>, qemu-ppc@nongnu.org
Cc: aik@ozlabs.ru, alex.williamson@redhat.com,
	qiudayu@linux.vnet.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v8 1/4] sPAPR: Implement EEH RTAS calls
Date: Thu, 05 Jun 2014 14:09:14 +0200	[thread overview]
Message-ID: <53905DEA.3050804@suse.de> (raw)
In-Reply-To: <1401951221-32613-2-git-send-email-gwshan@linux.vnet.ibm.com>


On 05.06.14 08:53, Gavin Shan wrote:
> The emulation for EEH RTAS requests from guest isn't covered
> by QEMU yet and the patch implements them.
>
> The patch defines constants used by EEH RTAS calls and adds
> callback sPAPRPHBClass::eeh_handler, which is going to be used
> this way:
>
> 1. RTAS calls are received in spapr_pci.c, sanity check is done
>     there.
> 2. RTAS handlers handle what they can. If there is something it
>     cannot handle and sPAPRPHBClass::eeh_handler callback is defined,
>     it is called.
> 3. sPAPRPHBClass::eeh_handler is only implemented for VFIO now. It
>     does ioctl() to the IOMMU container fd to complete the call. Error
>     codes from that ioctl() are transferred back to the guest.
>
> This adds 6 RTAS handlers, all defined in SPAPR specification:
>
> 1) ibm,set-eeh-option: disables/enables EEH on a device, removes PE from
> stopped state;
> 2) ibm,get-config-addr-info2 - returns fabric configuration address (upper
> PCI bridge or PHB if there is no bridge);
> 3) ibm,read-slot-reset-state2 - retrieve PE state;
> 4) ibm,set-slot-reset - issue PE reset;
> 5) ibm,configure-pe - configure PCI bridges in the affected PE;
> 6) ibm,slot-error-detail - retrieve EEH error log;
>
> All calls use fabric configuration address (a.k.a. PE address) as a target
> address except ibm,get-config-addr-info2 and one case (enable EEH on the
> specified PCI function) for ibm,set-eeh-option.
>
> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
> ---
>   hw/ppc/spapr_pci.c          | 248 ++++++++++++++++++++++++++++++++++++++++++++
>   include/hw/pci-host/spapr.h |   7 ++
>   include/hw/ppc/spapr.h      |  33 ++++++
>   3 files changed, 288 insertions(+)
>
> diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
> index a9f307a..423e4ff 100644
> --- a/hw/ppc/spapr_pci.c
> +++ b/hw/ppc/spapr_pci.c
> @@ -422,6 +422,241 @@ static void rtas_ibm_query_interrupt_source_number(PowerPCCPU *cpu,
>       rtas_st(rets, 2, 1);/* 0 == level; 1 == edge */
>   }
>   
> +static int rtas_finish_eeh_request(sPAPRPHBState *sphb,
> +                                   uint32_t req, uint32_t opt,
> +                                   target_ulong rets)

The only thing I dislike about this patch is the name of this function. 
It doesn't finish the eeh request - it actually does it :).


Alex

  reply	other threads:[~2014-06-05 12:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-05  6:53 [Qemu-devel] [PATCH v8 0/4] EEH Support for VFIO PCI Device Gavin Shan
2014-06-05  6:53 ` [Qemu-devel] [PATCH v8 1/4] sPAPR: Implement EEH RTAS calls Gavin Shan
2014-06-05 12:09   ` Alexander Graf [this message]
2014-06-06  0:59     ` Gavin Shan
2014-06-05  6:53 ` [Qemu-devel] [PATCH v8 2/4] headers: Update kernel header Gavin Shan
2014-06-05  6:53 ` [Qemu-devel] [PATCH v8 3/4] VFIO: Introduce helper vfio_pci_container_ioctl() Gavin Shan
2014-06-05 12:11   ` Alexander Graf
2014-06-06  1:00     ` Gavin Shan
2014-06-05 18:27   ` Alex Williamson
2014-06-06  1:05     ` Gavin Shan
2014-06-05  6:53 ` [Qemu-devel] [PATCH v8 4/4] sPAPR: Implement sPAPRPHBClass::eeh_handler Gavin Shan
2014-06-05 13:00   ` Alexander Graf
2014-06-05 13:13     ` Alexey Kardashevskiy
2014-06-05 12:12 ` [Qemu-devel] [PATCH v8 0/4] EEH Support for VFIO PCI Device Alexander Graf
2014-06-05 18:31   ` Alex Williamson

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=53905DEA.3050804@suse.de \
    --to=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=alex.williamson@redhat.com \
    --cc=gwshan@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qiudayu@linux.vnet.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.