diff options
author | Gavin Shan <gwshan@linux.vnet.ibm.com> | 2015-03-26 08:42:09 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-05-12 13:33:35 +0300 |
commit | 68cbbc3a9d1fc231810b2490bca73b3b444ef542 (patch) | |
tree | aa46575bc541b0680021a47e80df098bcc16789b /include/uapi/linux/vfio.h | |
parent | ec33d36e5ab5d52d59a8f696f7efb682bfc58494 (diff) | |
download | linux-68cbbc3a9d1fc231810b2490bca73b3b444ef542.tar.xz |
drivers/vfio: Support EEH error injection
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 <gwshan@linux.vnet.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'include/uapi/linux/vfio.h')
-rw-r--r-- | include/uapi/linux/vfio.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h index b57b750c222f..e4fa1995f613 100644 --- a/include/uapi/linux/vfio.h +++ b/include/uapi/linux/vfio.h @@ -470,12 +470,23 @@ struct vfio_iommu_spapr_tce_info { * - unfreeze IO/DMA for frozen PE; * - read PE state; * - reset PE; - * - configure PE. + * - configure PE; + * - inject EEH error. */ +struct vfio_eeh_pe_err { + __u32 type; + __u32 func; + __u64 addr; + __u64 mask; +}; + struct vfio_eeh_pe_op { __u32 argsz; __u32 flags; __u32 op; + union { + struct vfio_eeh_pe_err err; + }; }; #define VFIO_EEH_PE_DISABLE 0 /* Disable EEH functionality */ @@ -492,6 +503,7 @@ struct vfio_eeh_pe_op { #define VFIO_EEH_PE_RESET_HOT 6 /* Assert hot reset */ #define VFIO_EEH_PE_RESET_FUNDAMENTAL 7 /* Assert fundamental reset */ #define VFIO_EEH_PE_CONFIGURE 8 /* PE configuration */ +#define VFIO_EEH_PE_INJECT_ERR 9 /* Inject EEH error */ #define VFIO_EEH_PE_OP _IO(VFIO_TYPE, VFIO_BASE + 21) |