On Mon, Sep 21, 2015 at 11:42:28AM +1000, David Gibson wrote:
>On Sat, Sep 19, 2015 at 04:22:47PM +1000, David Gibson wrote:
>> On Fri, Sep 18, 2015 at 09:47:32AM -0600, Alex Williamson wrote:
>> > On Fri, 2015-09-18 at 16:24 +1000, Gavin Shan wrote:
>> > > This al
On Mon, Sep 21, 2015 at 11:42:28AM +1000, David Gibson wrote:
>On Sat, Sep 19, 2015 at 04:22:47PM +1000, David Gibson wrote:
>> On Fri, Sep 18, 2015 at 09:47:32AM -0600, Alex Williamson wrote:
>> > On Fri, 2015-09-18 at 16:24 +1000, Gavin Shan wrote:
>> > > This al
are
affected as before.
Gavin Shan (2):
drivers/vfio: Support EEH API revision
drivers/vfio: Support IOMMU group for EEH operations
drivers/vfio/vfio_iommu_spapr_tce.c | 50 ++---
drivers/vfio/vfio_spapr_eeh.c | 46
This extends the return value from container's IOCTL command
(VFIO_CHECK_EXTENSION + VFIO_EEH) to EEH API revision. Also,
extra check is applied to return -ENOTTY if EEH functionality
is disabled in vfio_spapr_iommu_eeh_ioctl().
Signed-off-by: Gavin Shan
---
drivers/vfio/vfio_iommu_spapr_
o specify IOMMU
group (PE) ID when requesting EEH operation.
Signed-off-by: Gavin Shan
---
drivers/vfio/vfio_iommu_spapr_tce.c | 51 -
drivers/vfio/vfio_spapr_eeh.c | 39
include/linux/vfio.h| 7 ++---
include/ua
PE needs to be invalidated so does the patch.
>
>This does not change pnv_pci_ioda1_tce_invalidate() as there is no plan
>to enable TCE table sharing on PHBs older than IODA2.
>
>Signed-off-by: Alexey Kardashevskiy
Reviewed-by: Gavin Shan
>---
>Changes:
>v10:
>
and 64bit DMA was handled via
>bypass window (which has no table so no cache was used) but this is going
>to change with Dynamic DMA windows (DDW).
>
>Signed-off-by: Alexey Kardashevskiy
Reviewed-by: Gavin Shan
Thanks,
Gavin
>---
>Changes:
>v11:
>* s/pnv_pci_ioda2_tvt_inv
_pci_ioda2_setup_dma_pe as this is where DMA is actually initialized.
>This change is here because those lines had to be changed anyway.
>
>This should cause no behavioural change.
>
>Signed-off-by: Alexey Kardashevskiy
>[aw: for the vfio related changes]
>Acked-by: Alex Williamson
DMA windows, we will need to be able to release
>iommu_table even if it was used for VFIO in which case it_map is NULL
>so does the patch.
>
>Signed-off-by: Alexey Kardashevskiy
Reviewed-by: Gavin Shan
Thanks,
Gavin
>---
>Changes:
>v11:
>* fixed parameter checks
On Fri, May 29, 2015 at 06:44:57PM +1000, Alexey Kardashevskiy wrote:
>The existing implementation accounts the whole DMA window in
>the locked_vm counter. This is going to be worse with multiple
>containers and huge DMA windows. Also, real-time accounting would requite
>additional tracking of acco
On Tue, Mar 31, 2015 at 01:13:26PM -0600, Alex Williamson wrote:
>On Thu, 2015-03-26 at 16:42 +1100, Gavin Shan wrote:
>> The patch adds one more EEH sub-command (VFIO_EEH_PE_INJECT_ERR)
>> to inject the specified EEH error, which is represented by
>> (struct vfio_eeh_pe_err)
Signed-off-by: Gavin Shan
---
arch/powerpc/include/asm/eeh.h | 7 ++-
arch/powerpc/include/uapi/asm/eeh.h | 30 ++
2 files changed, 32 insertions(+), 5 deletions(-)
create mode 100644 arch/powerpc/include/uapi/asm/eeh.h
diff --git a/arch/powerpc/include/asm/ee
* Use offsetofend(), instead of sizeof(struct vfio_eeh_pe_op)
to calculate argument buffer size.
v1 -> v2:
* Use EEH_ERR_FUNC_{MIN,MAX} to validate PCI error function.
* Put additional arguments for error injection to union in
struct vfio_eeh_pe_op.
Gavin Shan (3
The patch defines PCI error types and functions in uapi/asm/eeh.h
and exports function eeh_pe_inject_err(), which will be called by
VFIO driver to inject the specified PCI error to the indicated
PE for testing purpose.
Signed-off-by: Gavin Shan
Reviewed-by: David Gibson
---
arch/powerpc
The patch adds one more EEH sub-command (VFIO_EEH_PE_INJECT_ERR)
to inject the specified EEH error, which is represented by
(struct vfio_eeh_pe_err), to the indicated PE for testing purpose.
Signed-off-by: Gavin Shan
Reviewed-by: David Gibson
---
Documentation/vfio.txt| 12
On Wed, Mar 25, 2015 at 07:55:41PM -0600, Alex Williamson wrote:
>On Thu, 2015-03-26 at 11:59 +1100, Gavin Shan wrote:
>> On Wed, Mar 25, 2015 at 06:46:28PM -0600, Alex Williamson wrote:
>> >On Thu, 2015-03-26 at 10:20 +1100, Gavin Shan wrote:
>> >> The set of cons
On Thu, Mar 26, 2015 at 12:01:57PM +1100, David Gibson wrote:
>On Wed, Mar 25, 2015 at 06:46:28PM -0600, Alex Williamson wrote:
>> On Thu, 2015-03-26 at 10:20 +1100, Gavin Shan wrote:
>> > The set of constants for PE states defined in uapi/linux/vfio.h is
>> > duplic
On Wed, Mar 25, 2015 at 06:46:28PM -0600, Alex Williamson wrote:
>On Thu, 2015-03-26 at 10:20 +1100, Gavin Shan wrote:
>> The set of constants for PE states defined in uapi/linux/vfio.h is
>> duplicated to uapi/asm/eeh.h. The patch removes the set from the
>> former.
>&g
The set of constants for PE states defined in uapi/linux/vfio.h is
duplicated to uapi/asm/eeh.h. The patch removes the set from the
former.
Signed-off-by: Gavin Shan
---
include/uapi/linux/vfio.h | 5 -
1 file changed, 5 deletions(-)
diff --git a/include/uapi/linux/vfio.h b/include/uapi
/asm/eeh.h to avoid maintaining two
equivalent sets of constants.
Suggested-by: David Gibson
Signed-off-by: Gavin Shan
---
arch/powerpc/include/asm/eeh.h | 7 ++-
arch/powerpc/include/uapi/asm/eeh.h | 30 ++
2 files changed, 32 insertions(+), 5 deletions
The patch adds one more EEH sub-command (VFIO_EEH_PE_INJECT_ERR)
to inject the specified EEH error, which is represented by
(struct vfio_eeh_pe_err), to the indicated PE for testing purpose.
Signed-off-by: Gavin Shan
Reviewed-by: David Gibson
---
Documentation/vfio.txt| 12
The patch defines PCI error types and functions in uapi/asm/eeh.h
and exports function eeh_pe_inject_err(), which will be called by
VFIO driver to inject the specified PCI error to the indicated
PE for testing purpose.
Signed-off-by: Gavin Shan
Reviewed-by: David Gibson
---
arch/powerpc
eeh_pe_op.
Gavin Shan (4):
powerpc/eeh: Eliminate duplicated PE states
powerpc/eeh: Introduce eeh_pe_inject_err()
drivers/vfio: Support EEH error injection
drivers/vfio: Remove duplicated PE states
Documentation/vfio.txt | 12
arch/powerpc/include/asm/eeh.h
On Tue, Mar 24, 2015 at 12:22:25PM +1100, David Gibson wrote:
>On Tue, Mar 24, 2015 at 09:47:54AM +1100, Gavin Shan wrote:
>> On Mon, Mar 23, 2015 at 10:14:59AM -0600, Alex Williamson wrote:
>> >On Mon, 2015-03-23 at 16:20 +1100, Gavin Shan wrote:
>> >> On Mon, Ma
On Mon, Mar 23, 2015 at 10:14:59AM -0600, Alex Williamson wrote:
>On Mon, 2015-03-23 at 16:20 +1100, Gavin Shan wrote:
>> On Mon, Mar 23, 2015 at 04:10:20PM +1100, David Gibson wrote:
>> >On Mon, Mar 23, 2015 at 04:03:59PM +1100, Gavin Shan wrote:
>> >> On Mon, Ma
On Mon, Mar 23, 2015 at 04:10:20PM +1100, David Gibson wrote:
>On Mon, Mar 23, 2015 at 04:03:59PM +1100, Gavin Shan wrote:
>> On Mon, Mar 23, 2015 at 02:43:03PM +1100, David Gibson wrote:
>> >On Mon, Mar 23, 2015 at 12:56:36PM +1100, Gavin Shan wrote:
>> >> On Mon, Ma
On Mon, Mar 23, 2015 at 02:43:03PM +1100, David Gibson wrote:
>On Mon, Mar 23, 2015 at 12:56:36PM +1100, Gavin Shan wrote:
>> On Mon, Mar 23, 2015 at 12:39:45PM +1100, David Gibson wrote:
>> >On Sat, Mar 21, 2015 at 06:58:45AM +1100, Gavin Shan wrote:
>> >> The patch
On Mon, Mar 23, 2015 at 12:39:45PM +1100, David Gibson wrote:
>On Sat, Mar 21, 2015 at 06:58:45AM +1100, Gavin Shan wrote:
>> The patch adds one more EEH sub-command (VFIO_EEH_PE_INJECT_ERR)
>> to inject the specified EEH error, which is represented by
>> (struct vfio_eeh_pe_e
The patch defines PCI error types and functions in eeh.h and
exports function eeh_pe_inject_err(), which will be called by
VFIO driver to inject the specified PCI error to the indicated
PE for testing purpose.
Signed-off-by: Gavin Shan
---
arch/powerpc/include/asm/eeh.h | 26
fer size.
v1 -> v2:
* Use EEH_ERR_FUNC_{MIN,MAX} to validate PCI error function.
* Put additional arguments for error injection to union in
struct vfio_eeh_pe_op.
Gavin Shan (2):
powerpc/eeh: Introduce eeh_pe_inject_err()
drivers/vfio: Support EEH error inj
The patch adds one more EEH sub-command (VFIO_EEH_PE_INJECT_ERR)
to inject the specified EEH error, which is represented by
(struct vfio_eeh_pe_err), to the indicated PE for testing purpose.
Signed-off-by: Gavin Shan
---
Documentation/vfio.txt| 12
drivers/vfio
On Tue, Mar 17, 2015 at 02:45:49PM -0600, Alex Williamson wrote:
>On Mon, 2015-03-16 at 18:01 +1100, Gavin Shan wrote:
>> The patch adds one more EEH sub-command (VFIO_EEH_PE_INJECT_ERR)
>> to inject the specified EEH error, which is represented by
>> (struct vfio_eeh_pe_err)
The patch adds one more EEH sub-command (VFIO_EEH_PE_INJECT_ERR)
to inject the specified EEH error, which is represented by
(struct vfio_eeh_pe_err), to the indicated PE for testing purpose.
Signed-off-by: Gavin Shan
---
v2: Put additional arguments for error injection to union
The patch defines PCI error types and functions in eeh.h and
exports function eeh_pe_inject_err(), which will be called by
VFIO driver to inject the specified PCI error to the indicated
PE for testing purpose.
Signed-off-by: Gavin Shan
---
v2: Use EEH_ERR_FUNC_{MIN,MAX} to validate PCI error
On Fri, Mar 13, 2015 at 02:35:18PM -0600, Alex Williamson wrote:
>On Wed, 2015-03-11 at 17:34 +1100, Gavin Shan wrote:
>> The patch adds one more EEH sub-command (VFIO_EEH_PE_INJECT_ERR)
>> to inject the specified EEH error, which is represented by
>> (struct vfio_eeh_pe_err)
On Fri, Mar 13, 2015 at 02:28:09PM -0600, Alex Williamson wrote:
>On Thu, 2015-03-12 at 15:21 +1100, David Gibson wrote:
>> On Thu, Mar 12, 2015 at 02:16:42PM +1100, Gavin Shan wrote:
>> > On Thu, Mar 12, 2015 at 11:57:21AM +1100, David Gibson wrote:
>> > >On Wed, Ma
On Fri, Mar 13, 2015 at 02:28:33PM -0600, Alex Williamson wrote:
>On Wed, 2015-03-11 at 17:34 +1100, Gavin Shan wrote:
>> The patch defines PCI error types and functions in eeh.h and
>> exports function eeh_pe_inject_err(), which will be called by
>> VFIO driver to inject th
On Thu, Mar 12, 2015 at 03:21:29PM +1100, David Gibson wrote:
>On Thu, Mar 12, 2015 at 02:16:42PM +1100, Gavin Shan wrote:
>> On Thu, Mar 12, 2015 at 11:57:21AM +1100, David Gibson wrote:
>> >On Wed, Mar 11, 2015 at 05:34:11PM +1100, Gavin Shan wrote:
>> >> The patch
On Thu, Mar 12, 2015 at 11:57:21AM +1100, David Gibson wrote:
>On Wed, Mar 11, 2015 at 05:34:11PM +1100, Gavin Shan wrote:
>> The patch adds one more EEH sub-command (VFIO_EEH_PE_INJECT_ERR)
>> to inject the specified EEH error, which is represented by
>> (struct vfio_eeh_pe_e
The patch defines PCI error types and functions in eeh.h and
exports function eeh_pe_inject_err(), which will be called by
VFIO driver to inject the specified PCI error to the indicated
PE for testing purpose.
Signed-off-by: Gavin Shan
---
arch/powerpc/include/asm/eeh.h | 24
The patch adds one more EEH sub-command (VFIO_EEH_PE_INJECT_ERR)
to inject the specified EEH error, which is represented by
(struct vfio_eeh_pe_err), to the indicated PE for testing purpose.
Signed-off-by: Gavin Shan
---
Documentation/vfio.txt| 47
The function should have been exported with EXPORT_SYMBOL_GPL()
as part of commit 92d18a68 ("drivers/vfio: Fix EEH build error").
Suggested-by: Alexey Kardashevskiy
Signed-off-by: Gavin Shan
---
drivers/vfio/vfio_spapr_eeh.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
di
The patch exports 2 MSI message relevant functions, which will be
used by VFIO PCI driver. The VFIO PCI driver would be built as
a module.
Signed-off-by: Gavin Shan
Acked-by: Bjorn Helgaas
---
drivers/pci/msi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pci/msi.c b/drivers
x the problem by restoring the host cached MSI message prior to
enabling each vector.
Reported-by: Wen Xiong
Signed-off-by: Gavin Shan
Signed-off-by: Alex Williamson
---
drivers/vfio/pci/vfio_pci_intrs.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/drivers/vfi
On Thu, Sep 25, 2014 at 09:46:44PM -0600, Alex Williamson wrote:
>On Fri, 2014-09-26 at 13:19 +1000, Gavin Shan wrote:
>> On Wed, Sep 10, 2014 at 06:13:42PM +1000, Gavin Shan wrote:
>> >On Mon, May 19, 2014 at 01:01:10PM +1000, Gavin Shan wrote:
>> >>The MSIx vecto
On Wed, Sep 10, 2014 at 06:13:42PM +1000, Gavin Shan wrote:
>On Mon, May 19, 2014 at 01:01:10PM +1000, Gavin Shan wrote:
>>The MSIx vector table lives in device memory, which may be cleared as
>>part of a backdoor device reset. This is the case on the IBM IPR HBA
>>when t
On Mon, May 19, 2014 at 01:01:10PM +1000, Gavin Shan wrote:
>The MSIx vector table lives in device memory, which may be cleared as
>part of a backdoor device reset. This is the case on the IBM IPR HBA
>when the BIST is run on the device. When assigned to a QEMU guest,
>the guest d
On Thu, Sep 04, 2014 at 04:57:36PM -0600, Bjorn Helgaas wrote:
>On Mon, May 19, 2014 at 01:01:07PM +1000, Gavin Shan wrote:
>> The patch exports 2 MSI message relevant functions, which will be
>> used by VFIO PCI driver. The VFIO PCI driver would be built as
>> a module.
supported
Gavin Shan (3):
powerpc/eeh: Export eeh_iommu_group_to_pe()
powerpc/eeh: Add warning message in eeh_dev_open()
drivers/vfio: Fix EEH build error
arch/powerpc/kernel/eeh.c | 6 +-
drivers/vfio/Kconfig | 6 ++
drivers/vfio/Makefile | 2 +-
drivers/vfio
)
vfio_spapr_eeh: Unknown symbol eeh_pe_reset (err 0)
vfio_spapr_eeh: Unknown symbol eeh_pe_get_state (err 0)
vfio_spapr_eeh: Unknown symbol eeh_iommu_group_to_pe (err 0)
vfio_spapr_eeh: Unknown symbol eeh_dev_open (err 0)
Signed-off-by: Alexey Kardashevskiy
Signed-off-by: Gavin Shan
---
drivers/vfio
undefined!
Reported-by: Alexey Kardashevskiy
Signed-off-by: Gavin Shan
Signed-off-by: Alexey Kardashevskiy
---
v3: Introduce CONFIG_VFIO_SPAPR_EEH and add "struct pci_dev" in vfio.h
v2: remove #include from vfio.c
---
drivers/vfio/Kconfig | 6 ++
drivers/vfio/Mak
lexey Kardashevskiy
Signed-off-by: Gavin Shan
---
v3: Drop return value of vfio_spapr_pci_eeh_open()
v4: Add warning message in eeh_dev_open() in PATCH[2/5]
---
drivers/vfio/pci/vfio_pci.c | 6 +-
drivers/vfio/vfio_spapr_eeh.c | 4 ++--
include/linux/vfio.h | 5 ++---
3 files chang
The function is used by VFIO driver, which might be built as a
dynamic module. So it should be exported.
Signed-off-by: Gavin Shan
---
arch/powerpc/kernel/eeh.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index 6043879..59a64f8
The patch adds one warning message in eeh_dev_open() in case the
PCI device can't be marked as passed through.
Suggested-by: Alexey Kardashevskiy
Signed-off-by: Gavin Shan
---
arch/powerpc/kernel/eeh.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/k
On Thu, Aug 07, 2014 at 12:10:07PM +1000, Gavin Shan wrote:
>On Wed, Aug 06, 2014 at 11:05:43PM +1000, Alexey Kardashevskiy wrote:
>>On 08/06/2014 10:50 PM, Alex Williamson wrote:
>>> On Wed, 2014-08-06 at 19:49 +1000, Gavin Shan wrote:
>>>> From: Alexey Kardash
On Wed, Aug 06, 2014 at 11:05:43PM +1000, Alexey Kardashevskiy wrote:
>On 08/06/2014 10:50 PM, Alex Williamson wrote:
>> On Wed, 2014-08-06 at 19:49 +1000, Gavin Shan wrote:
>>> From: Alexey Kardashevskiy
>>>
>>> The existing vfio_pci_o
The function is used by VFIO driver, which might be built as a
dynamic module. So it should be exported.
Signed-off-by: Gavin Shan
---
arch/powerpc/kernel/eeh.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index 6043879..59a64f8
undefined!
Reported-by: Alexey Kardashevskiy
Signed-off-by: Gavin Shan
Signed-off-by: Alexey Kardashevskiy
---
v3: Introduce CONFIG_VFIO_SPAPR_EEH and add "struct pci_dev" in vfio.h
v2: remove #include from vfio.c
---
drivers/vfio/Kconfig | 6 ++
drivers/vfio/Mak
supported
Gavin Shan (2):
powerpc/eeh: Export eeh_iommu_group_to_pe()
drivers/vfio: Fix EEH build error
arch/powerpc/kernel/eeh.c | 1 +
drivers/vfio/Kconfig | 6 ++
drivers/vfio/Makefile | 2 +-
drivers/vfio/pci/vfio_pci.c | 6 +-
drivers/vfio
lexey Kardashevskiy
Signed-off-by: Gavin Shan
---
v3: Drop return value of vfio_spapr_pci_eeh_open()
---
drivers/vfio/pci/vfio_pci.c | 6 +-
drivers/vfio/vfio_spapr_eeh.c | 4 ++--
include/linux/vfio.h | 5 ++---
3 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers
)
vfio_spapr_eeh: Unknown symbol eeh_pe_reset (err 0)
vfio_spapr_eeh: Unknown symbol eeh_pe_get_state (err 0)
vfio_spapr_eeh: Unknown symbol eeh_iommu_group_to_pe (err 0)
vfio_spapr_eeh: Unknown symbol eeh_dev_open (err 0)
Signed-off-by: Alexey Kardashevskiy
Signed-off-by: Gavin Shan
---
drivers/vfio
On Wed, Aug 06, 2014 at 04:33:29PM +1000, Alexey Kardashevskiy wrote:
>On 08/06/2014 01:54 PM, Gavin Shan wrote:
>> On Tue, Aug 05, 2014 at 09:12:50PM -0600, Alex Williamson wrote:
>>> On Wed, 2014-08-06 at 12:48 +1000, Alexey Kardashevskiy wrote:
>>>> From: Gavin Sh
On Tue, Aug 05, 2014 at 09:12:50PM -0600, Alex Williamson wrote:
>On Wed, 2014-08-06 at 12:48 +1000, Alexey Kardashevskiy wrote:
>> From: Gavin Shan
>>
>> The VFIO related components could be built as dynamic modules.
>> Unfortunately, CONFIG_EEH can't be confi
On Mon, Jun 02, 2014 at 10:57:05AM -0600, Bjorn Helgaas wrote:
>On Sat, May 31, 2014 at 5:42 AM, Gavin Shan wrote:
>> On Fri, May 30, 2014 at 04:12:32PM -0600, Bjorn Helgaas wrote:
>>>On Mon, May 19, 2014 at 01:01:10PM +1000, Gavin Shan wrote:
.../...
[ Remove the confusing
On Fri, May 30, 2014 at 04:12:32PM -0600, Bjorn Helgaas wrote:
>On Mon, May 19, 2014 at 01:01:10PM +1000, Gavin Shan wrote:
>> The MSIx vector table lives in device memory, which may be cleared as
>> part of a backdoor device reset. This is the case on the IBM IPR HBA
>> wh
On Mon, May 19, 2014 at 01:01:07PM +1000, Gavin Shan wrote:
>The patch exports 2 MSI message relevant functions, which will be
>used by VFIO PCI driver. The VFIO PCI driver would be built as
>a module.
>
>Signed-off-by: Gavin Shan
Bjorn, could you help ack it if you don't hav
x the problem by restoring the host cached MSI message prior to
enabling each vector.
Reported-by: Wen Xiong
Signed-off-by: Gavin Shan
Signed-off-by: Alex Williamson
---
drivers/vfio/pci/vfio_pci_intrs.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/drivers/vfi
According PCI local bus specification, the register of Message
Control for MSI (offset: 2, length: 2) has bit#0 to enable or
disable MSI logic and it shouldn't be part contributing to the
calculation of MSI interrupt count. The patch fixes the issue.
Signed-off-by: Gavin Shan
---
drivers
The macro offsetofend() introduces unnecessary temporary variable
"tmp". The patch avoids that and saves a bit memory in stack.
Signed-off-by: Gavin Shan
---
include/linux/vfio.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/include/linux/vfio.h b/include/li
The patch exports 2 MSI message relevant functions, which will be
used by VFIO PCI driver. The VFIO PCI driver would be built as
a module.
Signed-off-by: Gavin Shan
---
drivers/pci/msi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 955ab79
Changelog
=
v1 -> v2:
* Change the comments and commit log in PATCH[4/4] (Alex).
* Export 2 MSI relevant functions (Alex).
v2 -> v3:
* Add missed header file in PATCH[4/4].
Gavin Shan (4):
PCI: Export MSI message relevant functions
drivers/vfio:
On Tue, May 13, 2014 at 11:35:24AM +1000, Gavin Shan wrote:
>The MSIx vector table lives in device memory, which may be cleared as
>part of a backdoor device reset. This is the case on the IBM IPR HBA
>when the BIST is run on the device. When assigned to a QEMU guest,
>the guest d
The patch exports 2 MSI message relevant functions, which will be
used by VFIO PCI driver. The VFIO PCI driver would be built as
a module.
Signed-off-by: Gavin Shan
---
drivers/pci/msi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 955ab79
Changelog
=
v1 -> v2:
* Change the comments and commit log in PATCH[4/4] (Alex).
* Export 2 MSI relevant functions (Alex).
Gavin Shan (4):
PCI: Export MSI message relevant functions
drivers/vfio: Rework offsetofend()
drivers/vfio/pci: Fix wrong MSI interrupt co
x the problem by restoring the host cached MSI message prior to
enabling each vector.
Reported-by: Wen Xiong
Signed-off-by: Gavin Shan
Signed-off-by: Alex Williamson
---
drivers/vfio/pci/vfio_pci_intrs.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/drivers/vfi
The macro offsetofend() introduces unnecessary temporary variable
"tmp". The patch avoids that and saves a bit memory in stack.
Signed-off-by: Gavin Shan
---
include/linux/vfio.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/include/linux/vfio.h b/include/li
According PCI local bus specification, the register of Message
Control for MSI (offset: 2, length: 2) has bit#0 to enable or
disable MSI logic and it shouldn't be part contributing to the
calculation of MSI interrupt count. The patch fixes the issue.
Signed-off-by: Gavin Shan
---
drivers
On Mon, May 05, 2014 at 08:00:12AM -0600, Alex Williamson wrote:
>On Mon, 2014-05-05 at 13:56 +0200, Alexander Graf wrote:
>> On 05/05/2014 03:27 AM, Gavin Shan wrote:
>> > The series of patches intends to support EEH for PCI devices, which have
>> > been
>> &
The RTAS call "ibm,get-config-addr-info2" is being used by guest
to retrieve the corresponding PE number for the specified PCI device.
The patch implements the backend to support the emulation of the
RTAS call.
Signed-off-by: Gavin Shan
---
arch/powerpc/platforms/powernv/eeh-r
If we detects frozen state on PE that has been passed to guest, we
needn't handle it. Instead, we rely on the guest to detect and recover
it. The patch avoid EEH event on the frozen passed PE so that the guest
can have chance to handle that.
Signed-off-by: Gavin Shan
---
arch/powerpc/k
The patch introduces function kvm_vfio_eeh_dev_unmap(), which is
expected to be called on IOCTL command issued to the VM device, in
order to tear down the address mapping for VFIO PCI device.
Signed-off-by: Gavin Shan
---
arch/powerpc/kernel/eeh_pe.c | 82
The patch introduces function kvm_vfio_eeh_dev_map(), which is
expected to be called on IOCTL command issued to the VM device, in
order to build the address mapping for VFIO PCI device.
Signed-off-by: Gavin Shan
---
arch/powerpc/kernel/eeh_pe.c | 88
The RTAS call "ibm,set-slot-reset" is being used to reset one
particular PE, either foundamental or hot reset. The patche intends
to implement the backend to emulate the RTAS call.
Signed-off-by: Gavin Shan
---
arch/powerpc/platforms/powernv/eeh-rtas.c | 92
The RTAS call "ibm,set-eeh-option" is being used to enable/disable
EEH functionality on the specified PE, or enable MMIO/DMA for the
frozen PE. The patch emulates the RTAS call.
Signed-off-by: Gavin Shan
---
arch/powerpc/platforms/powernv/eeh-rtas.c | 83 +
The RTAS call "ibm,slot-error-detail" is being used to retrieve the
error log (either permanent or temporary) from the underlying firmware.
The patch implements the backend to emulate the RTAS call.
Signed-off-by: Gavin Shan
---
arch/powerpc/platforms/powernv/eeh-r
-off-by: Gavin Shan
---
arch/powerpc/include/asm/eeh.h | 49 ++
1 file changed, 49 insertions(+)
diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h
index 7782056..8bfb167 100644
--- a/arch/powerpc/include/asm/eeh.h
+++ b/arch
The RTAS call "ibm,configure-pe" is being used to restore everything
after PE reset. The patch implements the backend to emulate the
RTAS call. In that, we restores BARs for the affected PCI device in
host side because the guest might not have full access to the config
space.
Signed-off
The series of patches intends to support EEH for PCI devices, which have been
passed through to PowerKVM based guest via VFIO. The implementation is
straightforward based on the issues or problems we have to resolve to support
EEH for PowerKVM based guest.
- Emulation for EEH RTAS requests. Thanks
device or PE instance if necessary. The function
will be used by subsequent patches.
Signed-off-by: Gavin Shan
---
arch/powerpc/platforms/powernv/eeh-rtas.c | 52 +++
1 file changed, 52 insertions(+)
diff --git a/arch/powerpc/platforms/powernv/eeh-rtas.c
b/arch/powerpc
The patch introduces function eeh_vfio_dev_get() to search the EEH
device according to its guest address, which is made up of VM indicator,
PHB BUID, bus, slot and function number. The function is useful in the
backends for EEH RTAS emulation.
Signed-off-by: Gavin Shan
---
arch/powerpc/include
The patch introduces kernel configuration option KVM_ERRINJCT. It
enables emulating error injection RTAS services used on IBM POWER
(pSeries) servers.
Signed-off-by: Gavin Shan
---
arch/powerpc/kvm/Kconfig | 8
1 file changed, 8 insertions(+)
diff --git a/arch/powerpc/kvm/Kconfig b
to kvm layer.
The patch implements the infrastructure of powernv platform layer
for EEH RTAS emulation.
Signed-off-by: Gavin Shan
---
arch/powerpc/include/asm/eeh.h| 18 +
arch/powerpc/platforms/powernv/Makefile | 1 +
arch/powerpc/platforms/powernv/eeh-rtas.c | 64
The patch introduces function eeh_vfio_pe_get() to search the EEH
PE according to its guest address, which is made up of KVM indicator,
PHB ID and PE configuration address. The function will be useful in
backends for EEH RTAS emulation.
Signed-off-by: Gavin Shan
---
arch/powerpc/include/asm
The patch synchronizes OPAL header file with firmware so that the
host kernel can make OPAL call to do error injection.
Signed-off-by: Gavin Shan
---
arch/powerpc/include/asm/opal.h| 65 ++
arch/powerpc/platforms/powernv/opal-wrappers.S | 1 +
2 files
The RTAS call "ibm,read-slot-reset-state2" is being used to retrieve
the various states of the specified PE, e.g. reset state, frozen DMA,
frozen MMIO etc. The patch implements the backend to emulate the
RTAS call.
Signed-off-by: Gavin Shan
---
arch/powerpc/platforms/powernv/eeh-r
The address (domain/bus/slot/function) looks different from the
perspective of host and guest. We have to setup the mapping for
EEH and tear it down accordingly. The patch introduces additional
attributes to KVM VFIO device for address mapping or unmapping.
Signed-off-by: Gavin Shan
---
arch
The patch intends to connect the KVM module with the backend for
EEH RTAS emulation. In turn, we can handle the EEH RTAS services
from the guest.
Signed-off-by: Gavin Shan
---
arch/powerpc/include/asm/kvm_ppc.h | 7 +++
arch/powerpc/kvm/book3s_rtas.c | 40
e system.
So we maintain an array of handlers with error type as index. The array
supports dynamic registration.
Signed-off-by: Gavin Shan
---
arch/powerpc/include/asm/book3s_errinjct.h | 78 +++
arch/powerpc/kvm/Makefile | 3 +
arch/powerpc/kvm/book3s_errinjct.
The patch introduces the infrastructure of error injection backend
for PowerNV platform. For now, we just implement logic to inject
PCI errors. We need support injecting other types of errors in
future.
Signed-off-by: Gavin Shan
---
arch/powerpc/include/asm/book3s_errinjct.h | 19 +++
arch
When the VM is destroyed, the EEH devices and PEs that have been
marked as being owned by guest should be returned to host. The
patch introduces kvmppc_vfio_pci_free() to do it.
Signed-off-by: Gavin Shan
---
arch/powerpc/include/asm/eeh.h | 6 +-
arch/powerpc/kernel/eeh_pe.c | 42
1 - 100 of 114 matches
Mail list logo