[Qemu-devel] [PATCH v10 0/3] EEH Support for VFIO PCI Device

2014-06-09 Thread Gavin Shan
eeh_pe_op::flags Gavin Shan (3): sPAPR: Implement EEH RTAS calls headers: Update kernel header sPAPR: Implement sPAPRPHBClass::eeh_handler hw/ppc/spapr_pci.c | 248 hw/ppc/spapr_pci_vfio.c | 56 ++ include/hw/pci-ho

[Qemu-devel] [PATCH v10 1/3] sPAPR: Implement EEH RTAS calls

2014-06-09 Thread Gavin Shan
call. Error codes from that ioctl() are transferred back to the guest. Signed-off-by: Gavin Shan --- hw/ppc/spapr_pci.c | 248 include/hw/pci-host/spapr.h | 7 ++ include/hw/ppc/spapr.h | 33 ++ 3 files changed, 288 insertions(+)

[Qemu-devel] [PATCH v10 2/3] headers: Update kernel header

2014-06-09 Thread Gavin Shan
This updates kernel header (vfio.h) for EEH support on VFIO PCI devices. Signed-off-by: Gavin Shan --- linux-headers/linux/vfio.h | 34 ++ 1 file changed, 34 insertions(+) diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h index f0aa97d

[Qemu-devel] [PATCH v10 3/3] sPAPR: Implement sPAPRPHBClass::eeh_handler

2014-06-09 Thread Gavin Shan
The patch implements sPAPRPHBClass::eeh_handler so that the EEH RTAS requests can be routed to VFIO for further handling. Signed-off-by: Gavin Shan --- hw/ppc/spapr_pci_vfio.c | 56 + 1 file changed, 56 insertions(+) diff --git a/hw/ppc

Re: [Qemu-devel] [PATCH v10 3/3] sPAPR: Implement sPAPRPHBClass::eeh_handler

2014-06-11 Thread Gavin Shan
On Wed, Jun 11, 2014 at 02:26:51PM -0600, Alex Williamson wrote: >On Tue, 2014-06-10 at 12:03 +1000, Gavin Shan wrote: >> The patch implements sPAPRPHBClass::eeh_handler so that the >> EEH RTAS requests can be routed to VFIO for further handling. >> >> Signed-off-by: Ga

Re: [Qemu-devel] [PATCH v10 3/3] sPAPR: Implement sPAPRPHBClass::eeh_handler

2014-06-15 Thread Gavin Shan
On Wed, Jun 11, 2014 at 07:37:48PM -0600, Alex Williamson wrote: >On Thu, 2014-06-12 at 10:02 +1000, Gavin Shan wrote: >> On Wed, Jun 11, 2014 at 02:26:51PM -0600, Alex Williamson wrote: >> >On Tue, 2014-06-10 at 12:03 +1000, Gavin Shan wrote: >> >> The patch impleme

[Qemu-devel] [PATCH v1 3/3] sPAPR: Export RTAS property

2014-06-22 Thread Gavin Shan
The patch exports RTAS property "ibm,errinjct-tokens", which is defined in PAPR spec and used to indicate various error types we can inject. Signed-off-by: Gavin Shan --- hw/ppc/spapr.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/p

[Qemu-devel] [PATCH v1 0/3] Support PCI Error Injection

2014-06-22 Thread Gavin Shan
injection for other types in future. It requires corresponding kernel changes as follows. Please comments, thanks! http://patchwork.ozlabs.org/patch/362637/ http://patchwork.ozlabs.org/patch/362638/ http://patchwork.ozlabs.org/patch/362639/ Gavin Shan (3): sPAPR: Implement PCI error injection RTA

[Qemu-devel] [PATCH v1 2/3] sPAPR: Implement sPAPRPHBClass::format_errinjct_cmd

2014-06-22 Thread Gavin Shan
The patch implements sPAPRPHBClass::format_errinjct_cmd to do the address translation (BUID+PE number to IOMMU group ID) and then come up with the formatted string for PCI error injection. Signed-off-by: Gavin Shan --- hw/ppc/spapr_pci_vfio.c | 19 +++ 1 file changed, 19

[Qemu-devel] [PATCH v1 1/3] sPAPR: Implement PCI error injection RTAS calls

2014-06-22 Thread Gavin Shan
er) to IOMMU group ID and then return the formated string back to spapr_rtas.c where the string is writen to firmware sysfs file "/sys/firmware/opal/errinjct" to do error injection. Signed-off-by: Gavin Shan --- hw/ppc/spapr_rtas.c | 198

Re: [Qemu-devel] [PATCH v1 1/3] sPAPR: Implement PCI error injection RTAS calls

2014-06-23 Thread Gavin Shan
On Mon, Jun 23, 2014 at 11:13:45PM +0200, Alexander Graf wrote: > >> Am 23.06.2014 um 23:03 schrieb Benjamin Herrenschmidt >> : >> >>> On Mon, 2014-06-23 at 18:18 +0200, Alexander Graf wrote: >>> Device emulation code shouldn't even remotely have an idea what host >>> it's running on. Also seman

Re: [Qemu-devel] [PATCH v1 1/3] sPAPR: Implement PCI error injection RTAS calls

2014-06-23 Thread Gavin Shan
On Mon, Jun 23, 2014 at 06:18:37PM +0200, Alexander Graf wrote: > >On 23.06.14 04:22, Gavin Shan wrote: >>The patch implements PCI error injection RTAS calls for sPAPR >>platform, which are defined PAPR spec as follows. Those RTAS >>calls are expected to be invoked in s

Re: [Qemu-devel] [PATCH v10 1/3] sPAPR: Implement EEH RTAS calls

2014-06-24 Thread Gavin Shan
On Tue, Jun 24, 2014 at 04:43:23PM +0200, Alexander Graf wrote: > >On 10.06.14 04:03, 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

[Qemu-devel] [RFC PATCH 1/2] VFIO: Drop vfio_container_do_ioctl()

2014-08-20 Thread Gavin Shan
The patch drops vfio_container_do_ioctl() and merges its logic to parent function call vfio_container_ioctl() so that the subsequent patches can reused the found VFIO group in vfio_container_ioctl(). Signed-off-by: Gavin Shan --- hw/misc/vfio.c | 33 +++-- 1 file

[Qemu-devel] [RFC PATCH 2/2] VFIO: Clear stale MSIx table during EEH reset

2014-08-20 Thread Gavin Shan
. The patch clears stale MSIx table before EEH PE reset so that MSIx table could be restored properly after EEH PE reset. Signed-off-by: Gavin Shan --- hw/misc/vfio.c | 24 1 file changed, 24 insertions(+) diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c index 1a3e7eb

[Qemu-devel] [RFC PATCH 0/2] Fix MSIx lost after PE reset

2014-08-20 Thread Gavin Shan
es are based on Alex Graf's "ppc-next" branch + the patchset supporting EEH for guest, which can be checked out from below link: g...@github.com:gwshan/qemu.git (branch: eeh) Gavin Shan (2): VFIO: Drop vfio_container_do_ioctl() VFIO: Clear stale MSIx table dur

Re: [Qemu-devel] [RFC PATCH 0/2] Fix MSIx lost after PE reset

2014-08-25 Thread Gavin Shan
On Wed, Aug 20, 2014 at 07:52:06PM +1000, Gavin Shan wrote: >The 2 patches fix MSIx lost after PE reset. Otherwise, the MSIx >entries can't be restored successfully after PE reset and the >EEH recovery fails on broadcom tg3 adapter (as tested) in guest. > >Note: The patchset &q

Re: [Qemu-devel] [RFC PATCH 2/2] VFIO: Clear stale MSIx table during EEH reset

2014-08-27 Thread Gavin Shan
On Tue, Aug 26, 2014 at 02:25:47PM -0600, Alex Williamson wrote: >On Wed, 2014-08-20 at 19:52 +1000, Gavin Shan wrote: >> The PCI device MSIx table is cleaned out in hardware after EEH PE >> reset. However, we still hold the stale MSIx entries in QEMU, which >> should b

Re: [Qemu-devel] [RFC PATCH 2/2] VFIO: Clear stale MSIx table during EEH reset

2014-08-29 Thread Gavin Shan
On Wed, Aug 27, 2014 at 07:29:41AM -0600, Alex Williamson wrote: >On Wed, 2014-08-27 at 23:15 +1000, Gavin Shan wrote: >> On Tue, Aug 26, 2014 at 02:25:47PM -0600, Alex Williamson wrote: >> >On Wed, 2014-08-20 at 19:52 +1000, Gavin Shan wrote: >> >> The PCI devic

[Qemu-devel] [RFC PATCH v2 1/2] VFIO: Drop vfio_container_do_ioctl()

2014-08-31 Thread Gavin Shan
The patch drops vfio_container_do_ioctl() and merges its logic to parent function call vfio_container_ioctl() so that the subsequent patches can reused the found VFIO group in vfio_container_ioctl(). Signed-off-by: Gavin Shan --- hw/misc/vfio.c | 33 +++-- 1 file

[Qemu-devel] [RFC PATCH v2 0/2] Fix MSIx lost after PE reset

2014-08-31 Thread Gavin Shan
es are based on Alex Graf's "ppc-next" branch + the patchset supporting EEH for guest, which can be checked out from below link: g...@github.com:gwshan/qemu.git (branch: eeh) Gavin Shan (2): VFIO: Drop vfio_container_do_ioctl() VFIO: Clear stale MSIx table dur

[Qemu-devel] [RFC PATCH v2 2/2] VFIO: Clear stale MSIx table during EEH reset

2014-08-31 Thread Gavin Shan
. The patch clears stale MSIx table before EEH PE reset so that MSIx table could be restored properly after EEH PE reset. Signed-off-by: Gavin Shan --- hw/misc/vfio.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/hw/misc/vfio.c b/hw/misc

Re: [Qemu-devel] [RFC PATCH v2 2/2] VFIO: Clear stale MSIx table during EEH reset

2014-09-02 Thread Gavin Shan
On Tue, Sep 02, 2014 at 02:10:42PM -0600, Alex Williamson wrote: >On Mon, 2014-09-01 at 10:53 +1000, Gavin Shan wrote: >> The PCI device MSIx table is cleaned out in hardware after EEH PE >> reset. However, we still hold the stale MSIx entries in QEMU, which >> should b

[Qemu-devel] [RFC PATCH v3 0/2] Fix MSIx lost after PE reset

2014-09-07 Thread Gavin Shan
git (branch: eeh) *** SUBJECT HERE *** *** BLURB HERE *** Gavin Shan (2): VFIO: Drop vfio_container_do_ioctl() VFIO: Clear stale interrupt vectors during reset hw/misc/vfio.c | 99 +- 1 file changed, 70 insertions(+), 29 deletions(-) -- 1.8.3.2

[Qemu-devel] [RFC PATCH v3 2/2] VFIO: Clear stale interrupt vectors during reset

2014-09-07 Thread Gavin Shan
) vectors. Otherwise, we will potentially lose chance to restore MSI or MSIx vectors when reenabling MSI or MSIx interrupts after reset. The patch clears stale MSI or MSIx vectors before machine/EEH reset so that MSI or MSIx vectors could be restored properly after EEH PE reset. Signed-off-by: Gavin

[Qemu-devel] [RFC PATCH v3 1/2] VFIO: Drop vfio_container_do_ioctl()

2014-09-07 Thread Gavin Shan
The patch drops vfio_container_do_ioctl() and merges its logic to parent function call vfio_container_ioctl() so that the subsequent patches can reused the found VFIO group in vfio_container_ioctl(). Signed-off-by: Gavin Shan --- hw/misc/vfio.c | 33 +++-- 1 file

Re: [Qemu-devel] [RFC PATCH v3 0/2] Fix MSIx lost after PE reset

2014-09-07 Thread Gavin Shan
On Mon, Sep 08, 2014 at 02:52:38PM +1000, Gavin Shan wrote: >The 2 patches fix MSIx lost after PE reset. Otherwise, the MSIx >entries can't be restored successfully after PE reset and the >EEH recovery fails on broadcom tg3 adapter (as tested) in guest. > >The reset path (res

[Qemu-devel] [PATCH] sPAPR/IOMMU: Fix TCE entry permission

2014-07-14 Thread Gavin Shan
The permission of TCE entry should exclude physical base address. Otherwise, unmapping TCE entry can be interpreted to mapping TCE entry wrongly for VFIO devices. Signed-off-by: Gavin Shan --- hw/misc/vfio.c | 2 +- hw/ppc/spapr_iommu.c | 4 ++-- 2 files changed, 3 insertions(+), 3

[Qemu-devel] [PATCH v12 2/4] sPAPR: Implement EEH RTAS calls

2014-07-15 Thread Gavin Shan
e the call. Error codes from that ioctl() are transferred back to the guest. [aik: defined RTAS tokens for EEH RTAS calls] Signed-off-by: Gavin Shan --- hw/ppc/spapr_pci.c | 246 include/hw/pci-host/spapr.h | 7 ++ include/hw/ppc/sp

[Qemu-devel] [PATCH v12 0/4] EEH Support for VFIO Devices

2014-07-15 Thread Gavin Shan
QEMU repository. Alexey Kardashevskiy (1): spapr_pci: Make find_phb()/find_dev() public Gavin Shan (3): sPAPR: Implement EEH RTAS calls headers: Update kernel header sPAPR: Implement sPAPRPHBClass::eeh_handler hw/misc/vfio.c | 1 + hw/ppc/spapr_pci.c |

[Qemu-devel] [PATCH v12 1/4] spapr_pci: Make find_phb()/find_dev() public

2014-07-15 Thread Gavin Shan
From: Alexey Kardashevskiy This makes find_phb()/find_dev() public and changed its names to spapr_pci_find_phb()/spapr_pci_find_dev() as they are going to be used from other parts of QEMU such as VFIO DDW (dynamic DMA window) or VFIO PCI error injection or VFIO EEH handling - in all these cases t

[Qemu-devel] [PATCH v12 3/4] headers: Update kernel header

2014-07-15 Thread Gavin Shan
This updates kernel header (vfio.h) for EEH support on VFIO PCI devices. Signed-off-by: Gavin Shan --- linux-headers/linux/vfio.h | 34 ++ 1 file changed, 34 insertions(+) diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h index 26c218e

[Qemu-devel] [PATCH v12 4/4] sPAPR: Implement sPAPRPHBClass::eeh_handler

2014-07-15 Thread Gavin Shan
The patch implements sPAPRPHBClass::eeh_handler so that the EEH RTAS requests can be routed to VFIO for further handling. Signed-off-by: Gavin Shan --- hw/misc/vfio.c | 1 + hw/ppc/spapr_pci_vfio.c | 56 + 2 files changed, 57 insertions

Re: [Qemu-devel] [PATCH v12 2/4] sPAPR: Implement EEH RTAS calls

2014-07-15 Thread Gavin Shan
On Wed, Jul 16, 2014 at 11:06:21AM +1000, Alexey Kardashevskiy wrote: >On 07/16/2014 10:20 AM, 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

Re: [Qemu-devel] [PATCH v12 3/4] headers: Update kernel header

2014-07-15 Thread Gavin Shan
On Wed, Jul 16, 2014 at 11:09:44AM +1000, Alexey Kardashevskiy wrote: >On 07/16/2014 10:20 AM, Gavin Shan wrote: >> This updates kernel header (vfio.h) for EEH support on VFIO PCI >> devices. > >Has this reached kernel upstream? The way linux headers update normally >ha

Re: [Qemu-devel] [PATCH v12 3/4] headers: Update kernel header

2014-07-15 Thread Gavin Shan
On Wed, Jul 16, 2014 at 11:32:13AM +1000, Alexey Kardashevskiy wrote: >On 07/16/2014 11:16 AM, Gavin Shan wrote: >> On Wed, Jul 16, 2014 at 11:09:44AM +1000, Alexey Kardashevskiy wrote: >>> On 07/16/2014 10:20 AM, Gavin Shan wrote: >>>> This updates kernel header (v

Re: [Qemu-devel] about kvmclock QOM

2012-03-14 Thread Gavin Shan
> > What you are looking for is the "parent" property which gets set up by > > [...adding a child property to some object. Many devices are not yet > > wired up as such...] > You mean that current device object should have one "parent" property? > Its parent device should have one "ch

[Qemu-devel] [PATCH v17 1/2] sPAPR: Implement EEH RTAS calls

2015-02-10 Thread Gavin Shan
ioctl() to the IOMMU container fd to complete the calls. Error codes from that ioctl() are transferred back to the guest. [aik: defined RTAS tokens for EEH RTAS calls] Signed-off-by: Gavin Shan --- hw/ppc/spapr_pci.c | 295 include/hw/pci

[Qemu-devel] [PATCH v17 2/2] sPAPR: Implement sPAPRPHBClass EEH callbacks

2015-02-10 Thread Gavin Shan
The patch implements sPAPRPHBClass EEH callbacks so that the EEH RTAS requests can be routed to VFIO for further handling. Signed-off-by: Gavin Shan --- hw/ppc/spapr_pci_vfio.c | 98 + hw/vfio/common.c| 1 + 2 files changed, 99 insertions

[Qemu-devel] [PATCH v17 0/2] EEH Support for VFIO Devices

2015-02-10 Thread Gavin Shan
s more precise and merge the condition checking on the option in rtas_ibm_get_config_addr_info2() to improve code readability * Return RTAS_OUT_PARAM_ERROR for invalid number of arguments to function rtas_ibm_slot_error_detail(), which is inconsistent with PAPR spec Ga

Re: [Qemu-devel] [PATCH v17 1/2] sPAPR: Implement EEH RTAS calls

2015-02-11 Thread Gavin Shan
On Thu, Feb 12, 2015 at 04:15:01PM +1100, David Gibson wrote: >On Wed, Feb 11, 2015 at 02:13:59PM +1100, 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 cons

[Qemu-devel] [PATCH v18 1/2] sPAPR: Implement EEH RTAS calls

2015-02-15 Thread Gavin Shan
ioctl() to the IOMMU container fd to complete the calls. Error codes from that ioctl() are transferred back to the guest. [aik: defined RTAS tokens for EEH RTAS calls] Signed-off-by: Gavin Shan --- hw/ppc/spapr_pci.c | 281 include/hw/pci

[Qemu-devel] [PATCH v18 2/2] sPAPR: Implement sPAPRPHBClass EEH callbacks

2015-02-15 Thread Gavin Shan
The patch implements sPAPRPHBClass EEH callbacks so that the EEH RTAS requests can be routed to VFIO for further handling. Signed-off-by: Gavin Shan --- hw/ppc/spapr_pci_vfio.c | 98 + hw/vfio/common.c| 1 + 2 files changed, 99 insertions

[Qemu-devel] [PATCH v18 0/2] EEH Support for VFIO Devices

2015-02-15 Thread Gavin Shan
ot;ppc-next" branch). * Drop the patch for header file (vfio.h) changes, which was merged to QEMU repository by commit a9fd1654 ("linux-headers: update to 3.17-rc7"). * Retested on Emulex adapter and EEH errors are recovered succ

Re: [Qemu-devel] [PATCH v18 1/2] sPAPR: Implement EEH RTAS calls

2015-02-15 Thread Gavin Shan
On Mon, Feb 16, 2015 at 12:52:48PM +1100, David Gibson wrote: >On Mon, Feb 16, 2015 at 10:16:01AM +1100, 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 cons

Re: [Qemu-devel] [PATCH v18 1/2] sPAPR: Implement EEH RTAS calls

2015-02-19 Thread Gavin Shan
On Mon, Feb 16, 2015 at 04:32:09PM +1100, Gavin Shan wrote: >On Mon, Feb 16, 2015 at 12:52:48PM +1100, David Gibson wrote: >>On Mon, Feb 16, 2015 at 10:16:01AM +1100, Gavin Shan wrote: >>> The emulation for EEH RTAS requests from guest isn't covered >>> by QEMU y

Re: [Qemu-devel] [PATCH v18 1/2] sPAPR: Implement EEH RTAS calls

2015-02-19 Thread Gavin Shan
On Wed, Feb 18, 2015 at 07:28:29PM -0600, Michael Roth wrote: >Quoting Gavin Shan (2015-02-15 23:32:09) >> On Mon, Feb 16, 2015 at 12:52:48PM +1100, David Gibson wrote: >> >On Mon, Feb 16, 2015 at 10:16:01AM +1100, Gavin Shan wrote: >> >> The emulation for EEH

Re: [Qemu-devel] [Qemu-ppc] [PATCH v18 1/2] sPAPR: Implement EEH RTAS calls

2015-02-19 Thread Gavin Shan
On Fri, Feb 20, 2015 at 10:40:53AM +1100, David Gibson wrote: >On Fri, Feb 20, 2015 at 09:50:45AM +1100, Gavin Shan wrote: >> On Wed, Feb 18, 2015 at 07:28:29PM -0600, Michael Roth wrote: >> >Quoting Gavin Shan (2015-02-15 23:32:09) >> >> On Mon, Feb 16, 2015 at

[Qemu-devel] [PATCH v19 1/2] sPAPR: Implement EEH RTAS calls

2015-02-19 Thread Gavin Shan
ioctl() to the IOMMU container fd to complete the calls. Error codes from that ioctl() are transferred back to the guest. [aik: defined RTAS tokens for EEH RTAS calls] Signed-off-by: Gavin Shan Reviewed-by: David Gibson --- hw/ppc/spapr_pci.c

[Qemu-devel] [PATCH v19 2/2] sPAPR: Implement sPAPRPHBClass EEH callbacks

2015-02-19 Thread Gavin Shan
The patch implements sPAPRPHBClass EEH callbacks so that the EEH RTAS requests can be routed to VFIO for further handling. Signed-off-by: Gavin Shan Reviewed-by: David Gibson --- hw/ppc/spapr_pci_vfio.c | 115 hw/vfio/common.c| 1 + 2

[Qemu-devel] [PATCH v19 0/2] EEH Support for VFIO Devices

2015-02-19 Thread Gavin Shan
e converting it to the corresponding class as pointed by Alex Graf. v12 -> v13: * Rebase to Alex Graf's QEMU repository ("ppc-next" branch). * Drop the patch for header file (vfio.h) changes, which was merged to QEMU repository by commit a9fd1654 ("linux-headers: up

[Qemu-devel] [PATCH v16 0/2] EEH Support for VFIO Devices

2015-02-03 Thread Gavin Shan
_handler() * Clear the argument buffer passed to ioctl() * Rename sPAPRPHBClass variable from "info" to "spc" Gavin Shan (2): sPAPR: Implement EEH RTAS calls sPAPR: Implement sPAPRPHBClass::eeh_handler hw/ppc/spapr_pci.c | 310 +++

[Qemu-devel] [PATCH v16 1/2] sPAPR: Implement EEH RTAS calls

2015-02-03 Thread Gavin Shan
e the call. Error codes from that ioctl() are transferred back to the guest. [aik: defined RTAS tokens for EEH RTAS calls] Signed-off-by: Gavin Shan --- hw/ppc/spapr_pci.c | 310 include/hw/pci-host/spapr.h | 7 + include/hw/ppc/sp

[Qemu-devel] [PATCH v16 2/2] sPAPR: Implement sPAPRPHBClass::eeh_handler

2015-02-03 Thread Gavin Shan
The patch implements sPAPRPHBClass::eeh_handler so that the EEH RTAS requests can be routed to VFIO for further handling. Signed-off-by: Gavin Shan --- hw/ppc/spapr_pci_vfio.c | 58 + hw/vfio/common.c| 1 + 2 files changed, 59 insertions

Re: [Qemu-devel] [PATCH v16 1/2] sPAPR: Implement EEH RTAS calls

2015-02-04 Thread Gavin Shan
On Thu, Feb 05, 2015 at 02:19:49PM +1100, David Gibson wrote: >On Wed, Feb 04, 2015 at 01:27:35PM +1100, 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 cons

Re: [Qemu-devel] [PATCH v16 2/2] sPAPR: Implement sPAPRPHBClass::eeh_handler

2015-02-04 Thread Gavin Shan
On Thu, Feb 05, 2015 at 02:26:16PM +1100, David Gibson wrote: >On Wed, Feb 04, 2015 at 01:27:36PM +1100, Gavin Shan wrote: >> The patch implements sPAPRPHBClass::eeh_handler so that the >> EEH RTAS requests can be routed to VFIO for further handling. >> >> Signed-off-by

Re: [Qemu-devel] [PATCH v16 1/2] sPAPR: Implement EEH RTAS calls

2015-02-05 Thread Gavin Shan
On Fri, Feb 06, 2015 at 11:58:25AM +1100, David Gibson wrote: >On Thu, Feb 05, 2015 at 04:50:06PM +1100, Gavin Shan wrote: >> On Thu, Feb 05, 2015 at 02:19:49PM +1100, David Gibson wrote: >> >On Wed, Feb 04, 2015 at 01:27:35PM +1100, Gavin Shan wrote: >> >> The emulat

Re: [Qemu-devel] [PATCH v2 1/3] VFIO: Clear stale MSIx table during EEH reset

2015-03-17 Thread Gavin Shan
On Tue, Mar 17, 2015 at 03:09:52PM -0600, Alex Williamson wrote: >On Tue, 2015-03-17 at 03:31 +1100, Gavin Shan wrote: >> The PCI device MSIx table is cleaned out in hardware after EEH PE >> reset. However, we still hold the stale MSIx entries in QEMU, which >> should b

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 2/3] VFIO: Disable INTx interrupt on EEH reset

2015-03-17 Thread Gavin Shan
On Tue, Mar 17, 2015 at 03:16:46PM -0600, Alex Williamson wrote: >On Tue, 2015-03-17 at 03:31 +1100, Gavin Shan wrote: >> When Linux guest recovers from EEH error on the following Emulex >> adapter, the MSIx interrupts are disabled and the INTx emulation >> is enabled.

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 2/3] VFIO: Disable INTx interrupt on EEH reset

2015-03-19 Thread Gavin Shan
On Wed, Mar 18, 2015 at 03:54:09PM +1100, Gavin Shan wrote: >On Tue, Mar 17, 2015 at 03:16:46PM -0600, Alex Williamson wrote: >>On Tue, 2015-03-17 at 03:31 +1100, Gavin Shan wrote: >>> When Linux guest recovers from EEH error on the following Emulex >>> adapter, the M

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 2/3] VFIO: Disable INTx interrupt on EEH reset

2015-03-19 Thread Gavin Shan
On Fri, Mar 20, 2015 at 03:01:43PM +1100, Gavin Shan wrote: >On Wed, Mar 18, 2015 at 03:54:09PM +1100, Gavin Shan wrote: >>On Tue, Mar 17, 2015 at 03:16:46PM -0600, Alex Williamson wrote: >>>On Tue, 2015-03-17 at 03:31 +1100, Gavin Shan wrote: >>>> When Linux guest

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 1/3] VFIO: Clear stale MSIx table during EEH reset

2015-03-19 Thread Gavin Shan
On Fri, Mar 20, 2015 at 05:04:01PM +1100, David Gibson wrote: >On Tue, Mar 17, 2015 at 03:31:24AM +1100, Gavin Shan wrote: >> The PCI device MSIx table is cleaned out in hardware after EEH PE >> reset. However, we still hold the stale MSIx entries in QEMU, which >> should b

Re: [Qemu-devel] [PATCH v2 1/3] VFIO: Clear stale MSIx table during EEH reset

2015-03-22 Thread Gavin Shan
On Wed, Mar 18, 2015 at 10:26:33AM +1100, Gavin Shan wrote: >On Tue, Mar 17, 2015 at 03:09:52PM -0600, Alex Williamson wrote: >>On Tue, 2015-03-17 at 03:31 +1100, Gavin Shan wrote: >>> The PCI device MSIx table is cleaned out in hardware after EEH PE >>> reset. Howev

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 1/3] VFIO: Clear stale MSIx table during EEH reset

2015-03-22 Thread Gavin Shan
On Mon, Mar 23, 2015 at 04:06:56PM +1100, David Gibson wrote: >On Fri, Mar 20, 2015 at 05:27:29PM +1100, Gavin Shan wrote: >> On Fri, Mar 20, 2015 at 05:04:01PM +1100, David Gibson wrote: >> >On Tue, Mar 17, 2015 at 03:31:24AM +1100, Gavin Shan wrote: >> >> The PCI de

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 1/3] VFIO: Clear stale MSIx table during EEH reset

2015-03-23 Thread Gavin Shan
On Tue, Mar 24, 2015 at 04:41:21PM +1100, David Gibson wrote: >On Mon, Mar 23, 2015 at 04:25:10PM +1100, Gavin Shan wrote: >> On Mon, Mar 23, 2015 at 04:06:56PM +1100, David Gibson wrote: >> >On Fri, Mar 20, 2015 at 05:27:29PM +1100, Gavin Shan wrote: >> >> On Fri, Ma

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 1/3] VFIO: Clear stale MSIx table during EEH reset

2015-03-25 Thread Gavin Shan
On Tue, Mar 24, 2015 at 06:53:29AM -0600, Alex Williamson wrote: >On Tue, 2015-03-24 at 17:54 +1100, David Gibson wrote: >> On Tue, Mar 24, 2015 at 05:24:55PM +1100, Gavin Shan wrote: >> > On Tue, Mar 24, 2015 at 04:41:21PM +1100, David Gibson wrote: >> > >On Mon, Ma

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 1/3] VFIO: Clear stale MSIx table during EEH reset

2015-03-25 Thread Gavin Shan
On Thu, Mar 26, 2015 at 12:10:52PM +1100, David Gibson wrote: >On Thu, Mar 26, 2015 at 11:53:48AM +1100, Gavin Shan wrote: >> On Tue, Mar 24, 2015 at 06:53:29AM -0600, Alex Williamson wrote: >> >On Tue, 2015-03-24 at 17:54 +1100, David Gibson wrote: >> >> On Tue, Ma

[Qemu-devel] [PATCH v3 0/2] Bug fixes for EEH on VFIO PCI devices

2015-03-25 Thread Gavin Shan
unction. Dropped vfio_put_group() on NULL group * Disabling INTx interrupt, instead of clearing INTx pending flag during PE reset. Gavin Shan (2): VFIO: Clear stale MSIx table during EEH reset sPAPR: Reenable EEH functionality on reboot hw/ppc/spapr_pci_vfio.c | 27 +++

[Qemu-devel] [PATCH v3 1/2] VFIO: Clear stale MSIx table during EEH reset

2015-03-25 Thread Gavin Shan
. The patch introduces function vfio_eeh_pe_reset(), which is called by sPAPR when asserting hot or fundamental reset, to clear stale MSIx table before EEH PE reset so that MSIx table could be restored properly after EEH PE reset. Signed-off-by: Gavin Shan --- hw/ppc/spapr_pci_vfio.c | 13

[Qemu-devel] [PATCH 2/2] sPAPR: Reenable EEH functionality on reboot

2015-03-25 Thread Gavin Shan
ity on PEs on PHB's reset callback, which will clear their frozen states if needed. Signed-off-by: Gavin Shan --- hw/ppc/spapr_pci_vfio.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr_pci_vfio.c b/hw/ppc/spapr_pci_vfio.c index 6fa3afe..25c1b

Re: [Qemu-devel] [PATCH v3 1/2] VFIO: Clear stale MSIx table during EEH reset

2015-03-30 Thread Gavin Shan
On Fri, Mar 27, 2015 at 05:00:25PM +1100, David Gibson wrote: >On Thu, Mar 26, 2015 at 04:35:01PM +1100, Gavin Shan wrote: >> The PCI device MSIx table is cleaned out in hardware after EEH PE >> reset. However, we still hold the stale MSIx entries in QEMU, which >> should b

Re: [Qemu-devel] [PATCH v3 1/2] VFIO: Clear stale MSIx table during EEH reset

2015-03-30 Thread Gavin Shan
On Mon, Mar 30, 2015 at 01:39:16PM +1100, David Gibson wrote: >On Thu, Mar 26, 2015 at 04:35:01PM +1100, Gavin Shan wrote: >> The PCI device MSIx table is cleaned out in hardware after EEH PE >> reset. However, we still hold the stale MSIx entries in QEMU, which >> should b

Re: [Qemu-devel] [PATCH 2/2] sPAPR: Reenable EEH functionality on reboot

2015-03-30 Thread Gavin Shan
On Mon, Mar 30, 2015 at 01:40:04PM +1100, David Gibson wrote: >On Thu, Mar 26, 2015 at 04:35:02PM +1100, Gavin Shan wrote: >> When rebooting the guest, some PEs might be in frozen state. The >> contained PCI devices won't work properly if their frozen states >> aren&#

Re: [Qemu-devel] [PATCH v3 1/2] VFIO: Clear stale MSIx table during EEH reset

2015-03-31 Thread Gavin Shan
On Tue, Mar 31, 2015 at 01:36:30PM -0600, Alex Williamson wrote: >On Mon, 2015-03-30 at 20:34 +1100, Gavin Shan wrote: >> On Mon, Mar 30, 2015 at 01:39:16PM +1100, David Gibson wrote: >> >On Thu, Mar 26, 2015 at 04:35:01PM +1100, Gavin Shan wrote: >> >> The PCI devic

Re: [Qemu-devel] [PATCH v3 1/2] VFIO: Clear stale MSIx table during EEH reset

2015-03-31 Thread Gavin Shan
On Tue, Mar 31, 2015 at 07:16:43PM -0600, Alex Williamson wrote: >On Wed, 2015-04-01 at 11:20 +1100, Gavin Shan wrote: >> On Tue, Mar 31, 2015 at 01:36:30PM -0600, Alex Williamson wrote: >> >On Mon, 2015-03-30 at 20:34 +1100, Gavin Shan wrote: >> >> On Mon, Mar 30, 2

Re: [Qemu-devel] [PATCH v13 2/3] sPAPR: Implement EEH RTAS calls

2014-12-24 Thread Gavin Shan
On Tue, Dec 23, 2014 at 03:22:06PM +1100, David Gibson wrote: >On Mon, Dec 15, 2014 at 11:15:07AM +1100, 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 cons

Re: [Qemu-devel] [PATCH v13 1/3] spapr_pci: Make find_phb()/find_dev() public

2014-12-24 Thread Gavin Shan
On Tue, Dec 23, 2014 at 03:24:58PM +1100, David Gibson wrote: >On Mon, Dec 15, 2014 at 11:15:06AM +1100, Gavin Shan wrote: >> From: Alexey Kardashevskiy >> >> This makes find_phb()/find_dev() public and changed its names >> to spapr_pci_find_phb()/spapr_pci_find_dev()

[Qemu-devel] [PATCH v15 0/2] EEH Support for VFIO Devices

2015-01-04 Thread Gavin Shan
* Return hardware error from RTAS call "ibm,set-eeh-option" and "ibm,set-slot-reset" for some cases according to PAPR spec. Gavin Shan (2): sPAPR: Implement EEH RTAS calls sPAPR: Implement sPAPRPHBClass::eeh_handler hw/ppc/spapr_pci.c | 275 ++

[Qemu-devel] [PATCH v15 2/2] sPAPR: Implement sPAPRPHBClass::eeh_handler

2015-01-04 Thread Gavin Shan
The patch implements sPAPRPHBClass::eeh_handler so that the EEH RTAS requests can be routed to VFIO for further handling. Signed-off-by: Gavin Shan --- hw/ppc/spapr_pci_vfio.c | 56 + hw/vfio/common.c| 1 + 2 files changed, 57 insertions

[Qemu-devel] [PATCH v15 1/2] sPAPR: Implement EEH RTAS calls

2015-01-04 Thread Gavin Shan
e the call. Error codes from that ioctl() are transferred back to the guest. [aik: defined RTAS tokens for EEH RTAS calls] Signed-off-by: Gavin Shan --- hw/ppc/spapr_pci.c | 275 include/hw/pci-host/spapr.h | 7 ++ include/hw/ppc/sp

Re: [Qemu-devel] [PATCH v15 1/2] sPAPR: Implement EEH RTAS calls

2015-01-14 Thread Gavin Shan
On Wed, Jan 14, 2015 at 12:39:35PM +1100, David Gibson wrote: >On Mon, Jan 05, 2015 at 11:26:27AM +1100, 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 cons

Re: [Qemu-devel] [PATCH v15 2/2] sPAPR: Implement sPAPRPHBClass::eeh_handler

2015-01-14 Thread Gavin Shan
On Wed, Jan 14, 2015 at 12:41:59PM +1100, David Gibson wrote: >On Mon, Jan 05, 2015 at 11:26:28AM +1100, Gavin Shan wrote: >> The patch implements sPAPRPHBClass::eeh_handler so that the >> EEH RTAS requests can be routed to VFIO for further handling. >> >> Signed-off-by

Re: [Qemu-devel] [PATCH v15 1/2] sPAPR: Implement EEH RTAS calls

2015-01-14 Thread Gavin Shan
On Thu, Jan 15, 2015 at 12:33:59PM +1100, David Gibson wrote: >On Thu, Jan 15, 2015 at 11:14:36AM +1100, Gavin Shan wrote: >> On Wed, Jan 14, 2015 at 12:39:35PM +1100, David Gibson wrote: >> >On Mon, Jan 05, 2015 at 11:26:27AM +1100, Gavin Shan wrote: >> >> The emulat

[Qemu-devel] [PATCH v13 1/3] spapr_pci: Make find_phb()/find_dev() public

2014-12-14 Thread Gavin Shan
there are RTAS calls which are addressed to BUID+config_addr in IEEE1275 format. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Gavin Shan --- hw/ppc/spapr_pci.c | 22 +++--- include/hw/pci-host/spapr.h | 4 2 files changed, 15 insertions(+), 11 deletions

[Qemu-devel] [PATCH v13 2/3] sPAPR: Implement EEH RTAS calls

2014-12-14 Thread Gavin Shan
e the call. Error codes from that ioctl() are transferred back to the guest. [aik: defined RTAS tokens for EEH RTAS calls] Signed-off-by: Gavin Shan --- hw/ppc/spapr_pci.c | 246 include/hw/pci-host/spapr.h | 7 ++ include/hw/ppc/sp

[Qemu-devel] [PATCH v13 3/3] sPAPR: Implement sPAPRPHBClass::eeh_handler

2014-12-14 Thread Gavin Shan
The patch implements sPAPRPHBClass::eeh_handler so that the EEH RTAS requests can be routed to VFIO for further handling. Signed-off-by: Gavin Shan --- hw/misc/vfio.c | 1 + hw/ppc/spapr_pci_vfio.c | 56 + 2 files changed, 57 insertions

[Qemu-devel] [PATCH v13 0/3] EEH Support for VFIO Devices

2014-12-14 Thread Gavin Shan
anch). * Drop the patch for header file (vfio.h) changes, which was merged to QEMU repository by commit a9fd1654 ("linux-headers: update to 3.17-rc7"). * Retested on Emulex adapter and EEH errors are recovered successfully. Alexey Kardashevskiy (1): spapr_pci:

Re: [Qemu-devel] [PATCH v13 2/3] sPAPR: Implement EEH RTAS calls

2014-12-15 Thread Gavin Shan
On Mon, Dec 15, 2014 at 03:52:17PM +0100, Alexander Graf wrote: >On 15.12.14 01:15, 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

Re: [Qemu-devel] [PATCH v13 2/3] sPAPR: Implement EEH RTAS calls

2014-12-15 Thread Gavin Shan
On Tue, Dec 16, 2014 at 12:13:03AM +0100, Alexander Graf wrote: >On 16.12.14 00:08, Gavin Shan wrote: >> On Mon, Dec 15, 2014 at 03:52:17PM +0100, Alexander Graf wrote: >>> On 15.12.14 01:15, Gavin Shan wrote: >>>> The emulation for EEH RTAS requests from guest isn&

Re: [Qemu-devel] [PATCH v13 2/3] sPAPR: Implement EEH RTAS calls

2014-12-15 Thread Gavin Shan
On Tue, Dec 16, 2014 at 01:08:52AM +0100, Alexander Graf wrote: > > >On 16.12.14 00:29, Gavin Shan wrote: >> On Tue, Dec 16, 2014 at 12:13:03AM +0100, Alexander Graf wrote: >>> On 16.12.14 00:08, Gavin Shan wrote: >>>> On Mon, Dec 15, 2014 at 03:52:17PM +

[Qemu-devel] [PATCH v14 0/3] EEH Support for VFIO Devices

2014-12-15 Thread Gavin Shan
HBState instance is valid before converting it to the corresponding class as pointed by Alex Graf. Alexey Kardashevskiy (1): spapr_pci: Make find_phb()/find_dev() public Gavin Shan (2): sPAPR: Implement EEH RTAS calls sPAPR: Implement sPAPRPHBClass::eeh_han

[Qemu-devel] [PATCH v14 1/3] spapr_pci: Make find_phb()/find_dev() public

2014-12-15 Thread Gavin Shan
there are RTAS calls which are addressed to BUID+config_addr in IEEE1275 format. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Gavin Shan --- hw/ppc/spapr_pci.c | 22 +++--- include/hw/pci-host/spapr.h | 4 2 files changed, 15 insertions(+), 11 deletions

[Qemu-devel] [PATCH v14 2/3] sPAPR: Implement EEH RTAS calls

2014-12-15 Thread Gavin Shan
e the call. Error codes from that ioctl() are transferred back to the guest. [aik: defined RTAS tokens for EEH RTAS calls] Signed-off-by: Gavin Shan --- hw/ppc/spapr_pci.c | 261 include/hw/pci-host/spapr.h | 7 ++ include/hw/ppc/sp

[Qemu-devel] [PATCH v14 3/3] sPAPR: Implement sPAPRPHBClass::eeh_handler

2014-12-15 Thread Gavin Shan
The patch implements sPAPRPHBClass::eeh_handler so that the EEH RTAS requests can be routed to VFIO for further handling. Signed-off-by: Gavin Shan --- hw/misc/vfio.c | 1 + hw/ppc/spapr_pci_vfio.c | 56 + 2 files changed, 57 insertions

Re: [Qemu-devel] [PATCH v19 0/2] EEH Support for VFIO Devices

2015-03-02 Thread Gavin Shan
On Fri, Feb 20, 2015 at 03:58:51PM +1100, Gavin Shan wrote: agraf, could you help taking a look on this when you have available time? Thanks, Gavin >The series of patches adds support EEH for VFIO PCI devices on sPAPR platform. >It requires corresponding host kernel support, which was

[Qemu-devel] [PATCH 1/3] VFIO: Clear stale MSIx table during EEH reset

2015-03-10 Thread Gavin Shan
. The patch clears stale MSIx table before EEH PE reset so that MSIx table could be restored properly after EEH PE reset. Signed-off-by: Gavin Shan --- hw/vfio/common.c | 6 +- hw/vfio/pci.c | 39 +++ include/hw/vfio/vfio.h | 3 ++- 3 files

[Qemu-devel] [PATCH 2/3] VFIO: Clear INTx pending state on EEH reset

2015-03-10 Thread Gavin Shan
.pending" after EEH reset is completed on the PE, which contains the adapter. In turn, the mmap'ed BAR regions can be reenabled to avoid EEH recovery failure. Signed-off-by: Gavin Shan --- hw/vfio/pci.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/hw/vfio/pci.c b/h

[Qemu-devel] [PATCH 3/3] sPAPR: Reenable EEH functionality on reboot

2015-03-10 Thread Gavin Shan
ity on PEs on PHB's reset callback, which will clear their frozen states if needed. Signed-off-by: Gavin Shan --- hw/ppc/spapr_pci_vfio.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr_pci_vfio.c b/hw/ppc/spapr_pci_vfio.c index 99a1be5..0cd96

[Qemu-devel] [PATCH 2/3] sPAPR: Support RTAS call ibm, {open, close}-errinjct

2015-03-10 Thread Gavin Shan
The patch supports RTAS calls "ibm,{open,close}-errinjct" to manupliate the token, which is passed to RTAS call "ibm,errinjct" to indicate the valid context for error injection. Each VM is permitted to have only one token at once and we simply have one random number for that.

[Qemu-devel] [PATCH 0/3] Support EEH Error Injection

2015-03-10 Thread Gavin Shan
njection. Finally, to return the open-token by calling "ibm,close-errinject". "ibm,errinjct" can be used to inject various errors, not limited to EEH errors. However, this patchset is going to support injecting EEH errors only for VFIO PCI devices. Gavin Shan (3): linux-headers: S

  1   2   3   4   5   6   7   8   9   10   >