* [Qemu-devel] [PATCH 0/3] Qemu: Add Xen vIOMMU interrupt remapping function support
@ 2017-06-29 5:49 ` Lan Tianyu
0 siblings, 0 replies; 22+ messages in thread
From: Lan Tianyu @ 2017-06-29 5:49 UTC (permalink / raw)
To: qemu-devel, xen-devel
Cc: Lan Tianyu, anthony.perard, marcel, mst, sstabellini, chao.gao,
kevin.tian
This patchset is to deal with MSI interrupt remapping request when guest
updates MSI registers.
Chao Gao (3):
i386/msi: Correct mask of destination ID in MSI address
xen-pt: bind/unbind interrupt remapping format MSI
msi: Handle remappable format interrupt request
configure | 54 +++++++++++++++++++++++++++++++++++++++++++
hw/pci/msi.c | 5 ++--
hw/pci/msix.c | 4 +++-
hw/xen/xen_pt_msi.c | 52 ++++++++++++++++++++++++++++++-----------
include/hw/i386/apic-msidef.h | 3 ++-
include/hw/xen/xen.h | 2 +-
include/hw/xen/xen_common.h | 25 ++++++++++++++++++++
xen-hvm-stub.c | 2 +-
xen-hvm.c | 8 ++++++-
9 files changed, 134 insertions(+), 21 deletions(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH 0/3] Qemu: Add Xen vIOMMU interrupt remapping function support
@ 2017-06-29 5:49 ` Lan Tianyu
0 siblings, 0 replies; 22+ messages in thread
From: Lan Tianyu @ 2017-06-29 5:49 UTC (permalink / raw)
To: qemu-devel, xen-devel
Cc: Lan Tianyu, kevin.tian, sstabellini, mst, marcel, anthony.perard,
chao.gao
This patchset is to deal with MSI interrupt remapping request when guest
updates MSI registers.
Chao Gao (3):
i386/msi: Correct mask of destination ID in MSI address
xen-pt: bind/unbind interrupt remapping format MSI
msi: Handle remappable format interrupt request
configure | 54 +++++++++++++++++++++++++++++++++++++++++++
hw/pci/msi.c | 5 ++--
hw/pci/msix.c | 4 +++-
hw/xen/xen_pt_msi.c | 52 ++++++++++++++++++++++++++++++-----------
include/hw/i386/apic-msidef.h | 3 ++-
include/hw/xen/xen.h | 2 +-
include/hw/xen/xen_common.h | 25 ++++++++++++++++++++
xen-hvm-stub.c | 2 +-
xen-hvm.c | 8 ++++++-
9 files changed, 134 insertions(+), 21 deletions(-)
--
1.8.3.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Qemu-devel] [PATCH 1/3] i386/msi: Correct mask of destination ID in MSI address
2017-06-29 5:49 ` Lan Tianyu
@ 2017-06-29 5:49 ` Lan Tianyu
-1 siblings, 0 replies; 22+ messages in thread
From: Lan Tianyu @ 2017-06-29 5:49 UTC (permalink / raw)
To: qemu-devel, xen-devel
Cc: Chao Gao, mst, marcel, sstabellini, anthony.perard, kevin.tian,
Lan Tianyu
From: Chao Gao <chao.gao@intel.com>
According to SDM 10.11.1, only [19:12] bits of MSI address are
Destination ID, change the mask to avoid ambiguity for VT-d spec
has used the bit 4 to indicate a remappable interrupt request.
Signed-off-by: Chao Gao <chao.gao@intel.com>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
---
include/hw/i386/apic-msidef.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/hw/i386/apic-msidef.h b/include/hw/i386/apic-msidef.h
index 8b4d4cc..420b411 100644
--- a/include/hw/i386/apic-msidef.h
+++ b/include/hw/i386/apic-msidef.h
@@ -26,6 +26,6 @@
#define MSI_ADDR_DEST_ID_SHIFT 12
#define MSI_ADDR_DEST_IDX_SHIFT 4
-#define MSI_ADDR_DEST_ID_MASK 0x00ffff0
+#define MSI_ADDR_DEST_ID_MASK 0x000ff000
#endif /* HW_APIC_MSIDEF_H */
--
1.8.3.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 1/3] i386/msi: Correct mask of destination ID in MSI address
@ 2017-06-29 5:49 ` Lan Tianyu
0 siblings, 0 replies; 22+ messages in thread
From: Lan Tianyu @ 2017-06-29 5:49 UTC (permalink / raw)
To: qemu-devel, xen-devel
Cc: Lan Tianyu, kevin.tian, sstabellini, mst, anthony.perard, marcel,
Chao Gao
From: Chao Gao <chao.gao@intel.com>
According to SDM 10.11.1, only [19:12] bits of MSI address are
Destination ID, change the mask to avoid ambiguity for VT-d spec
has used the bit 4 to indicate a remappable interrupt request.
Signed-off-by: Chao Gao <chao.gao@intel.com>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
---
include/hw/i386/apic-msidef.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/hw/i386/apic-msidef.h b/include/hw/i386/apic-msidef.h
index 8b4d4cc..420b411 100644
--- a/include/hw/i386/apic-msidef.h
+++ b/include/hw/i386/apic-msidef.h
@@ -26,6 +26,6 @@
#define MSI_ADDR_DEST_ID_SHIFT 12
#define MSI_ADDR_DEST_IDX_SHIFT 4
-#define MSI_ADDR_DEST_ID_MASK 0x00ffff0
+#define MSI_ADDR_DEST_ID_MASK 0x000ff000
#endif /* HW_APIC_MSIDEF_H */
--
1.8.3.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Qemu-devel] [PATCH 2/3] xen-pt: bind/unbind interrupt remapping format MSI
2017-06-29 5:49 ` Lan Tianyu
@ 2017-06-29 5:49 ` Lan Tianyu
-1 siblings, 0 replies; 22+ messages in thread
From: Lan Tianyu @ 2017-06-29 5:49 UTC (permalink / raw)
To: qemu-devel, xen-devel
Cc: Chao Gao, mst, marcel, sstabellini, anthony.perard, kevin.tian,
Lan Tianyu
From: Chao Gao <chao.gao@intel.com>
If a vIOMMU is exposed to guest, guest will configure the msi to remapping
format. The original code isn't suitable to the new format. A new pair
bind/unbind interfaces are added for this usage. This patch recognizes
this case and uses new interfaces to bind/unbind msi.
Signed-off-by: Chao Gao <chao.gao@intel.com>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
---
configure | 54 +++++++++++++++++++++++++++++++++++++++++++
hw/xen/xen_pt_msi.c | 50 ++++++++++++++++++++++++++++-----------
include/hw/i386/apic-msidef.h | 1 +
include/hw/xen/xen_common.h | 25 ++++++++++++++++++++
4 files changed, 117 insertions(+), 13 deletions(-)
diff --git a/configure b/configure
index 476210b..b3ac49f 100755
--- a/configure
+++ b/configure
@@ -1982,6 +1982,60 @@ EOF
/*
* If we have stable libs the we don't want the libxc compat
* layers, regardless of what CFLAGS we may have been given.
+ */
+#undef XC_WANT_COMPAT_EVTCHN_API
+#undef XC_WANT_COMPAT_GNTTAB_API
+#undef XC_WANT_COMPAT_MAP_FOREIGN_API
+#include <xenctrl.h>
+#include <xenstore.h>
+#include <xenevtchn.h>
+#include <xengnttab.h>
+#include <xenforeignmemory.h>
+#include <stdint.h>
+#include <xen/hvm/hvm_info_table.h>
+#if !defined(HVM_MAX_VCPUS)
+# error HVM_MAX_VCPUS not defined
+#endif
+int main(void) {
+ xc_interface *xc = NULL;
+ xenforeignmemory_handle *xfmem;
+ xenevtchn_handle *xe;
+ xengnttab_handle *xg;
+ xen_domain_handle_t handle;
+ xengnttab_grant_copy_segment_t* seg = NULL;
+
+ xs_daemon_open();
+
+ xc = xc_interface_open(0, 0, 0);
+ xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
+ xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
+ xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000);
+ xc_hvm_create_ioreq_server(xc, 0, HVM_IOREQSRV_BUFIOREQ_ATOMIC, NULL);
+ xc_domain_create(xc, 0, handle, 0, NULL, NULL);
+
+ xfmem = xenforeignmemory_open(0, 0);
+ xenforeignmemory_map(xfmem, 0, 0, 0, 0, 0);
+
+ xe = xenevtchn_open(0, 0);
+ xenevtchn_fd(xe);
+
+ xg = xengnttab_open(0, 0);
+ xengnttab_grant_copy(xg, 0, seg);
+
+ xc_domain_update_msi_irq_remapping(xc, 0, 0, 0, 0, 0 ,0);
+
+ return 0;
+}
+EOF
+ compile_prog "" "$xen_libs $xen_stable_libs"
+ then
+ xen_ctrl_version=4100
+ xen=yes
+ elif
+ cat > $TMPC <<EOF &&
+/*
+ * If we have stable libs the we don't want the libxc compat
+ * layers, regardless of what CFLAGS we may have been given.
*
* Also, check if xengnttab_grant_copy_segment_t is defined and
* grant copy operation is implemented.
diff --git a/hw/xen/xen_pt_msi.c b/hw/xen/xen_pt_msi.c
index 62add06..26a69d9 100644
--- a/hw/xen/xen_pt_msi.c
+++ b/hw/xen/xen_pt_msi.c
@@ -163,16 +163,23 @@ static int msi_msix_update(XenPCIPassthroughState *s,
int rc = 0;
uint64_t table_addr = 0;
- XEN_PT_LOG(d, "Updating MSI%s with pirq %d gvec %#x gflags %#x"
- " (entry: %#x)\n",
- is_msix ? "-X" : "", pirq, gvec, gflags, msix_entry);
-
if (is_msix) {
table_addr = s->msix->mmio_base_addr;
}
- rc = xc_domain_update_msi_irq(xen_xc, xen_domid, gvec,
- pirq, gflags, table_addr);
+ if (addr & MSI_ADDR_IF_MASK) {
+ XEN_PT_LOG(d, "Updating MSI%s with addr %#" PRIx64 " data %#x\n",
+ is_msix ? "-X" : "", addr, data);
+ rc = xc_domain_update_msi_irq_remapping(xen_xc, xen_domid, pirq,
+ d->devfn, data, addr, table_addr);
+ } else {
+ XEN_PT_LOG(d, "Updating MSI%s with pirq %d gvec %#x gflags %#x"
+ " (entry: %#x)\n",
+ is_msix ? "-X" : "", pirq, gvec, gflags, msix_entry);
+
+ rc = xc_domain_update_msi_irq(xen_xc, xen_domid, gvec,
+ pirq, gflags, table_addr);
+ }
if (rc) {
XEN_PT_ERR(d, "Updating of MSI%s failed. (err: %d)\n",
@@ -204,13 +211,30 @@ static int msi_msix_disable(XenPCIPassthroughState *s,
}
if (is_binded) {
- XEN_PT_LOG(d, "Unbind MSI%s with pirq %d, gvec %#x\n",
- is_msix ? "-X" : "", pirq, gvec);
- rc = xc_domain_unbind_msi_irq(xen_xc, xen_domid, gvec, pirq, gflags);
- if (rc) {
- XEN_PT_ERR(d, "Unbinding of MSI%s failed. (err: %d, pirq: %d, gvec: %#x)\n",
- is_msix ? "-X" : "", errno, pirq, gvec);
- return rc;
+ if (addr & MSI_ADDR_IF_MASK) {
+ XEN_PT_LOG(d, "Unbinding of MSI%s . ( pirq: %d, data: %x, "
+ "addr: %#" PRIx64 ")\n",
+ is_msix ? "-X" : "", pirq, data, addr);
+ rc = xc_domain_unbind_msi_irq_remapping(xen_xc, xen_domid, pirq,
+ d->devfn, data, addr);
+ if (rc) {
+ XEN_PT_ERR(d, "Unbinding of MSI%s . (error: %d, pirq: %d, "
+ "data: %x, addr: %#" PRIx64 ")\n",
+ is_msix ? "-X" : "", rc, pirq, data, addr);
+ return rc;
+ }
+
+ } else {
+ XEN_PT_LOG(d, "Unbind MSI%s with pirq %d, gvec %#x\n",
+ is_msix ? "-X" : "", pirq, gvec);
+ rc = xc_domain_unbind_msi_irq(xen_xc, xen_domid, gvec,
+ pirq, gflags);
+ if (rc) {
+ XEN_PT_ERR(d, "Unbinding of MSI%s failed. (err: %d, pirq: %d, "
+ "gvec: %#x)\n",
+ is_msix ? "-X" : "", errno, pirq, gvec);
+ return rc;
+ }
}
}
diff --git a/include/hw/i386/apic-msidef.h b/include/hw/i386/apic-msidef.h
index 420b411..a2b52d9 100644
--- a/include/hw/i386/apic-msidef.h
+++ b/include/hw/i386/apic-msidef.h
@@ -27,5 +27,6 @@
#define MSI_ADDR_DEST_ID_SHIFT 12
#define MSI_ADDR_DEST_IDX_SHIFT 4
#define MSI_ADDR_DEST_ID_MASK 0x000ff000
+#define MSI_ADDR_IF_MASK 0x00000010
#endif /* HW_APIC_MSIDEF_H */
diff --git a/include/hw/xen/xen_common.h b/include/hw/xen/xen_common.h
index 8e1580d..4ba43a8 100644
--- a/include/hw/xen/xen_common.h
+++ b/include/hw/xen/xen_common.h
@@ -438,4 +438,29 @@ static inline int xengnttab_grant_copy(xengnttab_handle *xgt, uint32_t count,
}
#endif
+/* Xen before 4.10 */
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 4100
+
+static inline int xc_domain_update_msi_irq_remapping(xc_interface *xc,
+ uint32_t domid,
+ uint32_t pirq,
+ uint32_t source_id,
+ uint32_t data,
+ uint64_t addr,
+ uint64_t gtable)
+{
+ return -ENOSYS;
+}
+
+static inline int xc_domain_unbind_msi_irq_remapping(xc_interface *xc,
+ uint32_t domid,
+ uint32_t pirq,
+ uint32_t source_id,
+ uint32_t data,
+ uint64_t addr)
+{
+ return -ENOSYS;
+}
+#endif
+
#endif /* QEMU_HW_XEN_COMMON_H */
--
1.8.3.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 2/3] xen-pt: bind/unbind interrupt remapping format MSI
@ 2017-06-29 5:49 ` Lan Tianyu
0 siblings, 0 replies; 22+ messages in thread
From: Lan Tianyu @ 2017-06-29 5:49 UTC (permalink / raw)
To: qemu-devel, xen-devel
Cc: Lan Tianyu, kevin.tian, sstabellini, mst, anthony.perard, marcel,
Chao Gao
From: Chao Gao <chao.gao@intel.com>
If a vIOMMU is exposed to guest, guest will configure the msi to remapping
format. The original code isn't suitable to the new format. A new pair
bind/unbind interfaces are added for this usage. This patch recognizes
this case and uses new interfaces to bind/unbind msi.
Signed-off-by: Chao Gao <chao.gao@intel.com>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
---
configure | 54 +++++++++++++++++++++++++++++++++++++++++++
hw/xen/xen_pt_msi.c | 50 ++++++++++++++++++++++++++++-----------
include/hw/i386/apic-msidef.h | 1 +
include/hw/xen/xen_common.h | 25 ++++++++++++++++++++
4 files changed, 117 insertions(+), 13 deletions(-)
diff --git a/configure b/configure
index 476210b..b3ac49f 100755
--- a/configure
+++ b/configure
@@ -1982,6 +1982,60 @@ EOF
/*
* If we have stable libs the we don't want the libxc compat
* layers, regardless of what CFLAGS we may have been given.
+ */
+#undef XC_WANT_COMPAT_EVTCHN_API
+#undef XC_WANT_COMPAT_GNTTAB_API
+#undef XC_WANT_COMPAT_MAP_FOREIGN_API
+#include <xenctrl.h>
+#include <xenstore.h>
+#include <xenevtchn.h>
+#include <xengnttab.h>
+#include <xenforeignmemory.h>
+#include <stdint.h>
+#include <xen/hvm/hvm_info_table.h>
+#if !defined(HVM_MAX_VCPUS)
+# error HVM_MAX_VCPUS not defined
+#endif
+int main(void) {
+ xc_interface *xc = NULL;
+ xenforeignmemory_handle *xfmem;
+ xenevtchn_handle *xe;
+ xengnttab_handle *xg;
+ xen_domain_handle_t handle;
+ xengnttab_grant_copy_segment_t* seg = NULL;
+
+ xs_daemon_open();
+
+ xc = xc_interface_open(0, 0, 0);
+ xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
+ xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
+ xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000);
+ xc_hvm_create_ioreq_server(xc, 0, HVM_IOREQSRV_BUFIOREQ_ATOMIC, NULL);
+ xc_domain_create(xc, 0, handle, 0, NULL, NULL);
+
+ xfmem = xenforeignmemory_open(0, 0);
+ xenforeignmemory_map(xfmem, 0, 0, 0, 0, 0);
+
+ xe = xenevtchn_open(0, 0);
+ xenevtchn_fd(xe);
+
+ xg = xengnttab_open(0, 0);
+ xengnttab_grant_copy(xg, 0, seg);
+
+ xc_domain_update_msi_irq_remapping(xc, 0, 0, 0, 0, 0 ,0);
+
+ return 0;
+}
+EOF
+ compile_prog "" "$xen_libs $xen_stable_libs"
+ then
+ xen_ctrl_version=4100
+ xen=yes
+ elif
+ cat > $TMPC <<EOF &&
+/*
+ * If we have stable libs the we don't want the libxc compat
+ * layers, regardless of what CFLAGS we may have been given.
*
* Also, check if xengnttab_grant_copy_segment_t is defined and
* grant copy operation is implemented.
diff --git a/hw/xen/xen_pt_msi.c b/hw/xen/xen_pt_msi.c
index 62add06..26a69d9 100644
--- a/hw/xen/xen_pt_msi.c
+++ b/hw/xen/xen_pt_msi.c
@@ -163,16 +163,23 @@ static int msi_msix_update(XenPCIPassthroughState *s,
int rc = 0;
uint64_t table_addr = 0;
- XEN_PT_LOG(d, "Updating MSI%s with pirq %d gvec %#x gflags %#x"
- " (entry: %#x)\n",
- is_msix ? "-X" : "", pirq, gvec, gflags, msix_entry);
-
if (is_msix) {
table_addr = s->msix->mmio_base_addr;
}
- rc = xc_domain_update_msi_irq(xen_xc, xen_domid, gvec,
- pirq, gflags, table_addr);
+ if (addr & MSI_ADDR_IF_MASK) {
+ XEN_PT_LOG(d, "Updating MSI%s with addr %#" PRIx64 " data %#x\n",
+ is_msix ? "-X" : "", addr, data);
+ rc = xc_domain_update_msi_irq_remapping(xen_xc, xen_domid, pirq,
+ d->devfn, data, addr, table_addr);
+ } else {
+ XEN_PT_LOG(d, "Updating MSI%s with pirq %d gvec %#x gflags %#x"
+ " (entry: %#x)\n",
+ is_msix ? "-X" : "", pirq, gvec, gflags, msix_entry);
+
+ rc = xc_domain_update_msi_irq(xen_xc, xen_domid, gvec,
+ pirq, gflags, table_addr);
+ }
if (rc) {
XEN_PT_ERR(d, "Updating of MSI%s failed. (err: %d)\n",
@@ -204,13 +211,30 @@ static int msi_msix_disable(XenPCIPassthroughState *s,
}
if (is_binded) {
- XEN_PT_LOG(d, "Unbind MSI%s with pirq %d, gvec %#x\n",
- is_msix ? "-X" : "", pirq, gvec);
- rc = xc_domain_unbind_msi_irq(xen_xc, xen_domid, gvec, pirq, gflags);
- if (rc) {
- XEN_PT_ERR(d, "Unbinding of MSI%s failed. (err: %d, pirq: %d, gvec: %#x)\n",
- is_msix ? "-X" : "", errno, pirq, gvec);
- return rc;
+ if (addr & MSI_ADDR_IF_MASK) {
+ XEN_PT_LOG(d, "Unbinding of MSI%s . ( pirq: %d, data: %x, "
+ "addr: %#" PRIx64 ")\n",
+ is_msix ? "-X" : "", pirq, data, addr);
+ rc = xc_domain_unbind_msi_irq_remapping(xen_xc, xen_domid, pirq,
+ d->devfn, data, addr);
+ if (rc) {
+ XEN_PT_ERR(d, "Unbinding of MSI%s . (error: %d, pirq: %d, "
+ "data: %x, addr: %#" PRIx64 ")\n",
+ is_msix ? "-X" : "", rc, pirq, data, addr);
+ return rc;
+ }
+
+ } else {
+ XEN_PT_LOG(d, "Unbind MSI%s with pirq %d, gvec %#x\n",
+ is_msix ? "-X" : "", pirq, gvec);
+ rc = xc_domain_unbind_msi_irq(xen_xc, xen_domid, gvec,
+ pirq, gflags);
+ if (rc) {
+ XEN_PT_ERR(d, "Unbinding of MSI%s failed. (err: %d, pirq: %d, "
+ "gvec: %#x)\n",
+ is_msix ? "-X" : "", errno, pirq, gvec);
+ return rc;
+ }
}
}
diff --git a/include/hw/i386/apic-msidef.h b/include/hw/i386/apic-msidef.h
index 420b411..a2b52d9 100644
--- a/include/hw/i386/apic-msidef.h
+++ b/include/hw/i386/apic-msidef.h
@@ -27,5 +27,6 @@
#define MSI_ADDR_DEST_ID_SHIFT 12
#define MSI_ADDR_DEST_IDX_SHIFT 4
#define MSI_ADDR_DEST_ID_MASK 0x000ff000
+#define MSI_ADDR_IF_MASK 0x00000010
#endif /* HW_APIC_MSIDEF_H */
diff --git a/include/hw/xen/xen_common.h b/include/hw/xen/xen_common.h
index 8e1580d..4ba43a8 100644
--- a/include/hw/xen/xen_common.h
+++ b/include/hw/xen/xen_common.h
@@ -438,4 +438,29 @@ static inline int xengnttab_grant_copy(xengnttab_handle *xgt, uint32_t count,
}
#endif
+/* Xen before 4.10 */
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 4100
+
+static inline int xc_domain_update_msi_irq_remapping(xc_interface *xc,
+ uint32_t domid,
+ uint32_t pirq,
+ uint32_t source_id,
+ uint32_t data,
+ uint64_t addr,
+ uint64_t gtable)
+{
+ return -ENOSYS;
+}
+
+static inline int xc_domain_unbind_msi_irq_remapping(xc_interface *xc,
+ uint32_t domid,
+ uint32_t pirq,
+ uint32_t source_id,
+ uint32_t data,
+ uint64_t addr)
+{
+ return -ENOSYS;
+}
+#endif
+
#endif /* QEMU_HW_XEN_COMMON_H */
--
1.8.3.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Qemu-devel] [PATCH 3/3] msi: Handle remappable format interrupt request
2017-06-29 5:49 ` Lan Tianyu
@ 2017-06-29 5:49 ` Lan Tianyu
-1 siblings, 0 replies; 22+ messages in thread
From: Lan Tianyu @ 2017-06-29 5:49 UTC (permalink / raw)
To: qemu-devel, xen-devel
Cc: Chao Gao, mst, marcel, sstabellini, anthony.perard, kevin.tian,
Lan Tianyu
From: Chao Gao <chao.gao@intel.com>
According to VT-d spec Interrupt Remapping and Interrupt Posting ->
Interrupt Remapping -> Interrupt Request Formats On Intel 64
Platforms, fields of MSI data register have changed. This patch
avoids wrongly regarding a remappable format interrupt request as
an interrupt binded with an event channel.
Signed-off-by: Chao Gao <chao.gao@intel.com>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
---
hw/pci/msi.c | 5 +++--
hw/pci/msix.c | 4 +++-
hw/xen/xen_pt_msi.c | 2 +-
include/hw/xen/xen.h | 2 +-
xen-hvm-stub.c | 2 +-
xen-hvm.c | 8 +++++++-
6 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/hw/pci/msi.c b/hw/pci/msi.c
index a87b227..3713ea6 100644
--- a/hw/pci/msi.c
+++ b/hw/pci/msi.c
@@ -289,7 +289,7 @@ void msi_reset(PCIDevice *dev)
static bool msi_is_masked(const PCIDevice *dev, unsigned int vector)
{
uint16_t flags = pci_get_word(dev->config + msi_flags_off(dev));
- uint32_t mask, data;
+ uint32_t mask, data, addr_lo;
bool msi64bit = flags & PCI_MSI_FLAGS_64BIT;
assert(vector < PCI_MSI_VECTORS_MAX);
@@ -298,7 +298,8 @@ static bool msi_is_masked(const PCIDevice *dev, unsigned int vector)
}
data = pci_get_word(dev->config + msi_data_off(dev, msi64bit));
- if (xen_is_pirq_msi(data)) {
+ addr_lo = pci_get_long(dev->config + msi_address_lo_off(dev));
+ if (xen_is_pirq_msi(addr_lo, data)) {
return false;
}
diff --git a/hw/pci/msix.c b/hw/pci/msix.c
index 0ec1cb1..6dda83c 100644
--- a/hw/pci/msix.c
+++ b/hw/pci/msix.c
@@ -81,9 +81,11 @@ static bool msix_vector_masked(PCIDevice *dev, unsigned int vector, bool fmask)
{
unsigned offset = vector * PCI_MSIX_ENTRY_SIZE;
uint8_t *data = &dev->msix_table[offset + PCI_MSIX_ENTRY_DATA];
+ uint8_t *addr_lo = &dev->msix_table[offset + PCI_MSIX_ENTRY_LOWER_ADDR];
/* MSIs on Xen can be remapped into pirqs. In those cases, masking
* and unmasking go through the PV evtchn path. */
- if (xen_enabled() && xen_is_pirq_msi(pci_get_long(data))) {
+ if (xen_enabled() && xen_is_pirq_msi(pci_get_long(addr_lo),
+ pci_get_long(data))) {
return false;
}
return fmask || dev->msix_table[offset + PCI_MSIX_ENTRY_VECTOR_CTRL] &
diff --git a/hw/xen/xen_pt_msi.c b/hw/xen/xen_pt_msi.c
index 26a69d9..68da0e4 100644
--- a/hw/xen/xen_pt_msi.c
+++ b/hw/xen/xen_pt_msi.c
@@ -114,7 +114,7 @@ static int msi_msix_setup(XenPCIPassthroughState *s,
assert((!is_msix && msix_entry == 0) || is_msix);
- if (xen_is_pirq_msi(data)) {
+ if (xen_is_pirq_msi(addr, data)) {
*ppirq = msi_ext_dest_id(addr >> 32) | msi_dest_id(addr);
if (!*ppirq) {
/* this probably identifies an misconfiguration of the guest,
diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
index a8f3afb..b1ef41e 100644
--- a/include/hw/xen/xen.h
+++ b/include/hw/xen/xen.h
@@ -33,7 +33,7 @@ int xen_pci_slot_get_pirq(PCIDevice *pci_dev, int irq_num);
void xen_piix3_set_irq(void *opaque, int irq_num, int level);
void xen_piix_pci_write_config_client(uint32_t address, uint32_t val, int len);
void xen_hvm_inject_msi(uint64_t addr, uint32_t data);
-int xen_is_pirq_msi(uint32_t msi_data);
+int xen_is_pirq_msi(uint32_t msi_addr_lo, uint32_t msi_data);
qemu_irq *xen_interrupt_controller_init(void);
diff --git a/xen-hvm-stub.c b/xen-hvm-stub.c
index c500325..a3a3bb3 100644
--- a/xen-hvm-stub.c
+++ b/xen-hvm-stub.c
@@ -31,7 +31,7 @@ void xen_hvm_inject_msi(uint64_t addr, uint32_t data)
{
}
-int xen_is_pirq_msi(uint32_t msi_data)
+int xen_is_pirq_msi(uint32_t msi_addr_lo, uint32_t msi_data)
{
return 0;
}
diff --git a/xen-hvm.c b/xen-hvm.c
index 0892361..9f1a7bd 100644
--- a/xen-hvm.c
+++ b/xen-hvm.c
@@ -146,8 +146,14 @@ void xen_piix_pci_write_config_client(uint32_t address, uint32_t val, int len)
}
}
-int xen_is_pirq_msi(uint32_t msi_data)
+int xen_is_pirq_msi(uint32_t msi_addr_lo, uint32_t msi_data)
{
+ /* If the MSI address is configured in remapping format, the MSI will not
+ * be remapped into a pirq.
+ */
+ if (msi_addr_lo & MSI_ADDR_IF_MASK) {
+ return 0;
+ }
/* If vector is 0, the msi is remapped into a pirq, passed as
* dest_id.
*/
--
1.8.3.1
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 3/3] msi: Handle remappable format interrupt request
@ 2017-06-29 5:49 ` Lan Tianyu
0 siblings, 0 replies; 22+ messages in thread
From: Lan Tianyu @ 2017-06-29 5:49 UTC (permalink / raw)
To: qemu-devel, xen-devel
Cc: Lan Tianyu, kevin.tian, sstabellini, mst, anthony.perard, marcel,
Chao Gao
From: Chao Gao <chao.gao@intel.com>
According to VT-d spec Interrupt Remapping and Interrupt Posting ->
Interrupt Remapping -> Interrupt Request Formats On Intel 64
Platforms, fields of MSI data register have changed. This patch
avoids wrongly regarding a remappable format interrupt request as
an interrupt binded with an event channel.
Signed-off-by: Chao Gao <chao.gao@intel.com>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
---
hw/pci/msi.c | 5 +++--
hw/pci/msix.c | 4 +++-
hw/xen/xen_pt_msi.c | 2 +-
include/hw/xen/xen.h | 2 +-
xen-hvm-stub.c | 2 +-
xen-hvm.c | 8 +++++++-
6 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/hw/pci/msi.c b/hw/pci/msi.c
index a87b227..3713ea6 100644
--- a/hw/pci/msi.c
+++ b/hw/pci/msi.c
@@ -289,7 +289,7 @@ void msi_reset(PCIDevice *dev)
static bool msi_is_masked(const PCIDevice *dev, unsigned int vector)
{
uint16_t flags = pci_get_word(dev->config + msi_flags_off(dev));
- uint32_t mask, data;
+ uint32_t mask, data, addr_lo;
bool msi64bit = flags & PCI_MSI_FLAGS_64BIT;
assert(vector < PCI_MSI_VECTORS_MAX);
@@ -298,7 +298,8 @@ static bool msi_is_masked(const PCIDevice *dev, unsigned int vector)
}
data = pci_get_word(dev->config + msi_data_off(dev, msi64bit));
- if (xen_is_pirq_msi(data)) {
+ addr_lo = pci_get_long(dev->config + msi_address_lo_off(dev));
+ if (xen_is_pirq_msi(addr_lo, data)) {
return false;
}
diff --git a/hw/pci/msix.c b/hw/pci/msix.c
index 0ec1cb1..6dda83c 100644
--- a/hw/pci/msix.c
+++ b/hw/pci/msix.c
@@ -81,9 +81,11 @@ static bool msix_vector_masked(PCIDevice *dev, unsigned int vector, bool fmask)
{
unsigned offset = vector * PCI_MSIX_ENTRY_SIZE;
uint8_t *data = &dev->msix_table[offset + PCI_MSIX_ENTRY_DATA];
+ uint8_t *addr_lo = &dev->msix_table[offset + PCI_MSIX_ENTRY_LOWER_ADDR];
/* MSIs on Xen can be remapped into pirqs. In those cases, masking
* and unmasking go through the PV evtchn path. */
- if (xen_enabled() && xen_is_pirq_msi(pci_get_long(data))) {
+ if (xen_enabled() && xen_is_pirq_msi(pci_get_long(addr_lo),
+ pci_get_long(data))) {
return false;
}
return fmask || dev->msix_table[offset + PCI_MSIX_ENTRY_VECTOR_CTRL] &
diff --git a/hw/xen/xen_pt_msi.c b/hw/xen/xen_pt_msi.c
index 26a69d9..68da0e4 100644
--- a/hw/xen/xen_pt_msi.c
+++ b/hw/xen/xen_pt_msi.c
@@ -114,7 +114,7 @@ static int msi_msix_setup(XenPCIPassthroughState *s,
assert((!is_msix && msix_entry == 0) || is_msix);
- if (xen_is_pirq_msi(data)) {
+ if (xen_is_pirq_msi(addr, data)) {
*ppirq = msi_ext_dest_id(addr >> 32) | msi_dest_id(addr);
if (!*ppirq) {
/* this probably identifies an misconfiguration of the guest,
diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
index a8f3afb..b1ef41e 100644
--- a/include/hw/xen/xen.h
+++ b/include/hw/xen/xen.h
@@ -33,7 +33,7 @@ int xen_pci_slot_get_pirq(PCIDevice *pci_dev, int irq_num);
void xen_piix3_set_irq(void *opaque, int irq_num, int level);
void xen_piix_pci_write_config_client(uint32_t address, uint32_t val, int len);
void xen_hvm_inject_msi(uint64_t addr, uint32_t data);
-int xen_is_pirq_msi(uint32_t msi_data);
+int xen_is_pirq_msi(uint32_t msi_addr_lo, uint32_t msi_data);
qemu_irq *xen_interrupt_controller_init(void);
diff --git a/xen-hvm-stub.c b/xen-hvm-stub.c
index c500325..a3a3bb3 100644
--- a/xen-hvm-stub.c
+++ b/xen-hvm-stub.c
@@ -31,7 +31,7 @@ void xen_hvm_inject_msi(uint64_t addr, uint32_t data)
{
}
-int xen_is_pirq_msi(uint32_t msi_data)
+int xen_is_pirq_msi(uint32_t msi_addr_lo, uint32_t msi_data)
{
return 0;
}
diff --git a/xen-hvm.c b/xen-hvm.c
index 0892361..9f1a7bd 100644
--- a/xen-hvm.c
+++ b/xen-hvm.c
@@ -146,8 +146,14 @@ void xen_piix_pci_write_config_client(uint32_t address, uint32_t val, int len)
}
}
-int xen_is_pirq_msi(uint32_t msi_data)
+int xen_is_pirq_msi(uint32_t msi_addr_lo, uint32_t msi_data)
{
+ /* If the MSI address is configured in remapping format, the MSI will not
+ * be remapped into a pirq.
+ */
+ if (msi_addr_lo & MSI_ADDR_IF_MASK) {
+ return 0;
+ }
/* If vector is 0, the msi is remapped into a pirq, passed as
* dest_id.
*/
--
1.8.3.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] i386/msi: Correct mask of destination ID in MSI address
2017-06-29 5:49 ` Lan Tianyu
@ 2017-06-30 13:49 ` Anthony PERARD
-1 siblings, 0 replies; 22+ messages in thread
From: Anthony PERARD @ 2017-06-30 13:49 UTC (permalink / raw)
To: Lan Tianyu
Cc: qemu-devel, xen-devel, Chao Gao, mst, marcel, sstabellini, kevin.tian
On Thu, Jun 29, 2017 at 01:49:52AM -0400, Lan Tianyu wrote:
> From: Chao Gao <chao.gao@intel.com>
>
> According to SDM 10.11.1, only [19:12] bits of MSI address are
> Destination ID, change the mask to avoid ambiguity for VT-d spec
> has used the bit 4 to indicate a remappable interrupt request.
>
> Signed-off-by: Chao Gao <chao.gao@intel.com>
> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
> ---
> include/hw/i386/apic-msidef.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/hw/i386/apic-msidef.h b/include/hw/i386/apic-msidef.h
> index 8b4d4cc..420b411 100644
> --- a/include/hw/i386/apic-msidef.h
> +++ b/include/hw/i386/apic-msidef.h
> @@ -26,6 +26,6 @@
>
> #define MSI_ADDR_DEST_ID_SHIFT 12
> #define MSI_ADDR_DEST_IDX_SHIFT 4
> -#define MSI_ADDR_DEST_ID_MASK 0x00ffff0
> +#define MSI_ADDR_DEST_ID_MASK 0x000ff000
>
> #endif /* HW_APIC_MSIDEF_H */
--
Anthony PERARD
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 1/3] i386/msi: Correct mask of destination ID in MSI address
@ 2017-06-30 13:49 ` Anthony PERARD
0 siblings, 0 replies; 22+ messages in thread
From: Anthony PERARD @ 2017-06-30 13:49 UTC (permalink / raw)
To: Lan Tianyu
Cc: kevin.tian, sstabellini, mst, qemu-devel, xen-devel, marcel, Chao Gao
On Thu, Jun 29, 2017 at 01:49:52AM -0400, Lan Tianyu wrote:
> From: Chao Gao <chao.gao@intel.com>
>
> According to SDM 10.11.1, only [19:12] bits of MSI address are
> Destination ID, change the mask to avoid ambiguity for VT-d spec
> has used the bit 4 to indicate a remappable interrupt request.
>
> Signed-off-by: Chao Gao <chao.gao@intel.com>
> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
> ---
> include/hw/i386/apic-msidef.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/hw/i386/apic-msidef.h b/include/hw/i386/apic-msidef.h
> index 8b4d4cc..420b411 100644
> --- a/include/hw/i386/apic-msidef.h
> +++ b/include/hw/i386/apic-msidef.h
> @@ -26,6 +26,6 @@
>
> #define MSI_ADDR_DEST_ID_SHIFT 12
> #define MSI_ADDR_DEST_IDX_SHIFT 4
> -#define MSI_ADDR_DEST_ID_MASK 0x00ffff0
> +#define MSI_ADDR_DEST_ID_MASK 0x000ff000
>
> #endif /* HW_APIC_MSIDEF_H */
--
Anthony PERARD
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 2/3] xen-pt: bind/unbind interrupt remapping format MSI
2017-06-29 5:49 ` Lan Tianyu
@ 2017-06-30 15:48 ` Anthony PERARD
-1 siblings, 0 replies; 22+ messages in thread
From: Anthony PERARD @ 2017-06-30 15:48 UTC (permalink / raw)
To: Lan Tianyu
Cc: qemu-devel, xen-devel, Chao Gao, mst, marcel, sstabellini, kevin.tian
On Thu, Jun 29, 2017 at 01:49:53AM -0400, Lan Tianyu wrote:
> From: Chao Gao <chao.gao@intel.com>
>
> If a vIOMMU is exposed to guest, guest will configure the msi to remapping
> format. The original code isn't suitable to the new format. A new pair
> bind/unbind interfaces are added for this usage. This patch recognizes
> this case and uses new interfaces to bind/unbind msi.
>
> Signed-off-by: Chao Gao <chao.gao@intel.com>
> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Hi,
The patch series is going to need to be rebased on top of QEMU upstream.
For starter, configure have changed a bit.
> ---
> configure | 54 +++++++++++++++++++++++++++++++++++++++++++
> hw/xen/xen_pt_msi.c | 50 ++++++++++++++++++++++++++++-----------
> include/hw/i386/apic-msidef.h | 1 +
> include/hw/xen/xen_common.h | 25 ++++++++++++++++++++
> 4 files changed, 117 insertions(+), 13 deletions(-)
>
> diff --git a/configure b/configure
> index 476210b..b3ac49f 100755
> --- a/configure
> +++ b/configure
> @@ -1982,6 +1982,60 @@ EOF
> /*
> * If we have stable libs the we don't want the libxc compat
> * layers, regardless of what CFLAGS we may have been given.
> + */
> +#undef XC_WANT_COMPAT_EVTCHN_API
> +#undef XC_WANT_COMPAT_GNTTAB_API
> +#undef XC_WANT_COMPAT_MAP_FOREIGN_API
> +#include <xenctrl.h>
> +#include <xenstore.h>
> +#include <xenevtchn.h>
> +#include <xengnttab.h>
> +#include <xenforeignmemory.h>
> +#include <stdint.h>
> +#include <xen/hvm/hvm_info_table.h>
> +#if !defined(HVM_MAX_VCPUS)
> +# error HVM_MAX_VCPUS not defined
> +#endif
> +int main(void) {
> + xc_interface *xc = NULL;
> + xenforeignmemory_handle *xfmem;
> + xenevtchn_handle *xe;
> + xengnttab_handle *xg;
> + xen_domain_handle_t handle;
> + xengnttab_grant_copy_segment_t* seg = NULL;
> +
> + xs_daemon_open();
> +
> + xc = xc_interface_open(0, 0, 0);
> + xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
> + xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
> + xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000);
> + xc_hvm_create_ioreq_server(xc, 0, HVM_IOREQSRV_BUFIOREQ_ATOMIC, NULL);
> + xc_domain_create(xc, 0, handle, 0, NULL, NULL);
> +
> + xfmem = xenforeignmemory_open(0, 0);
> + xenforeignmemory_map(xfmem, 0, 0, 0, 0, 0);
> +
> + xe = xenevtchn_open(0, 0);
> + xenevtchn_fd(xe);
> +
> + xg = xengnttab_open(0, 0);
> + xengnttab_grant_copy(xg, 0, seg);
> +
> + xc_domain_update_msi_irq_remapping(xc, 0, 0, 0, 0, 0 ,0);
> +
> + return 0;
> +}
> +EOF
> + compile_prog "" "$xen_libs $xen_stable_libs"
> + then
> + xen_ctrl_version=4100
> + xen=yes
There have been some change/refactoring in configure, so this won't
work. The xen_ctrl_version got one more digit.
Can you try with this patch? Which is also simpler.
diff --git a/configure b/configure
index c571ad14e5..a06f2c0b92 100755
--- a/configure
+++ b/configure
@@ -2021,6 +2021,24 @@ EOF
# Xen unstable
elif
cat > $TMPC <<EOF &&
+#include <xenctrl.h>
+int main(void) {
+ xc_interface *xc = NULL;
+
+ xc_domain_update_msi_irq_remapping(xc, 0, 0, 0, 0, 0 ,0);
+
+ return 0;
+}
+EOF
+ compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
+ then
+ xen_stable_libs="-lxendevicemodel $xen_stable_libs"
+ xen_ctrl_version=41000
+ xen=yes
+
+ # Xen 4.9
+ elif
+ cat > $TMPC <<EOF &&
#undef XC_WANT_COMPAT_DEVICEMODEL_API
#define __XEN_TOOLS__
#include <xendevicemodel.h>
> index 8e1580d..4ba43a8 100644
> --- a/include/hw/xen/xen_common.h
> +++ b/include/hw/xen/xen_common.h
> @@ -438,4 +438,29 @@ static inline int xengnttab_grant_copy(xengnttab_handle *xgt, uint32_t count,
> }
> #endif
>
> +/* Xen before 4.10 */
> +#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 4100
This will needs to be
CONFIG_XEN_CTRL_INTERFACE_VERSION < 41000
The rest of the patch is good, Thanks,
--
Anthony PERARD
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PATCH 2/3] xen-pt: bind/unbind interrupt remapping format MSI
@ 2017-06-30 15:48 ` Anthony PERARD
0 siblings, 0 replies; 22+ messages in thread
From: Anthony PERARD @ 2017-06-30 15:48 UTC (permalink / raw)
To: Lan Tianyu
Cc: kevin.tian, sstabellini, mst, qemu-devel, xen-devel, marcel, Chao Gao
On Thu, Jun 29, 2017 at 01:49:53AM -0400, Lan Tianyu wrote:
> From: Chao Gao <chao.gao@intel.com>
>
> If a vIOMMU is exposed to guest, guest will configure the msi to remapping
> format. The original code isn't suitable to the new format. A new pair
> bind/unbind interfaces are added for this usage. This patch recognizes
> this case and uses new interfaces to bind/unbind msi.
>
> Signed-off-by: Chao Gao <chao.gao@intel.com>
> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Hi,
The patch series is going to need to be rebased on top of QEMU upstream.
For starter, configure have changed a bit.
> ---
> configure | 54 +++++++++++++++++++++++++++++++++++++++++++
> hw/xen/xen_pt_msi.c | 50 ++++++++++++++++++++++++++++-----------
> include/hw/i386/apic-msidef.h | 1 +
> include/hw/xen/xen_common.h | 25 ++++++++++++++++++++
> 4 files changed, 117 insertions(+), 13 deletions(-)
>
> diff --git a/configure b/configure
> index 476210b..b3ac49f 100755
> --- a/configure
> +++ b/configure
> @@ -1982,6 +1982,60 @@ EOF
> /*
> * If we have stable libs the we don't want the libxc compat
> * layers, regardless of what CFLAGS we may have been given.
> + */
> +#undef XC_WANT_COMPAT_EVTCHN_API
> +#undef XC_WANT_COMPAT_GNTTAB_API
> +#undef XC_WANT_COMPAT_MAP_FOREIGN_API
> +#include <xenctrl.h>
> +#include <xenstore.h>
> +#include <xenevtchn.h>
> +#include <xengnttab.h>
> +#include <xenforeignmemory.h>
> +#include <stdint.h>
> +#include <xen/hvm/hvm_info_table.h>
> +#if !defined(HVM_MAX_VCPUS)
> +# error HVM_MAX_VCPUS not defined
> +#endif
> +int main(void) {
> + xc_interface *xc = NULL;
> + xenforeignmemory_handle *xfmem;
> + xenevtchn_handle *xe;
> + xengnttab_handle *xg;
> + xen_domain_handle_t handle;
> + xengnttab_grant_copy_segment_t* seg = NULL;
> +
> + xs_daemon_open();
> +
> + xc = xc_interface_open(0, 0, 0);
> + xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
> + xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
> + xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000);
> + xc_hvm_create_ioreq_server(xc, 0, HVM_IOREQSRV_BUFIOREQ_ATOMIC, NULL);
> + xc_domain_create(xc, 0, handle, 0, NULL, NULL);
> +
> + xfmem = xenforeignmemory_open(0, 0);
> + xenforeignmemory_map(xfmem, 0, 0, 0, 0, 0);
> +
> + xe = xenevtchn_open(0, 0);
> + xenevtchn_fd(xe);
> +
> + xg = xengnttab_open(0, 0);
> + xengnttab_grant_copy(xg, 0, seg);
> +
> + xc_domain_update_msi_irq_remapping(xc, 0, 0, 0, 0, 0 ,0);
> +
> + return 0;
> +}
> +EOF
> + compile_prog "" "$xen_libs $xen_stable_libs"
> + then
> + xen_ctrl_version=4100
> + xen=yes
There have been some change/refactoring in configure, so this won't
work. The xen_ctrl_version got one more digit.
Can you try with this patch? Which is also simpler.
diff --git a/configure b/configure
index c571ad14e5..a06f2c0b92 100755
--- a/configure
+++ b/configure
@@ -2021,6 +2021,24 @@ EOF
# Xen unstable
elif
cat > $TMPC <<EOF &&
+#include <xenctrl.h>
+int main(void) {
+ xc_interface *xc = NULL;
+
+ xc_domain_update_msi_irq_remapping(xc, 0, 0, 0, 0, 0 ,0);
+
+ return 0;
+}
+EOF
+ compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
+ then
+ xen_stable_libs="-lxendevicemodel $xen_stable_libs"
+ xen_ctrl_version=41000
+ xen=yes
+
+ # Xen 4.9
+ elif
+ cat > $TMPC <<EOF &&
#undef XC_WANT_COMPAT_DEVICEMODEL_API
#define __XEN_TOOLS__
#include <xendevicemodel.h>
> index 8e1580d..4ba43a8 100644
> --- a/include/hw/xen/xen_common.h
> +++ b/include/hw/xen/xen_common.h
> @@ -438,4 +438,29 @@ static inline int xengnttab_grant_copy(xengnttab_handle *xgt, uint32_t count,
> }
> #endif
>
> +/* Xen before 4.10 */
> +#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 4100
This will needs to be
CONFIG_XEN_CTRL_INTERFACE_VERSION < 41000
The rest of the patch is good, Thanks,
--
Anthony PERARD
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 3/3] msi: Handle remappable format interrupt request
2017-06-29 5:49 ` Lan Tianyu
@ 2017-06-30 15:52 ` Anthony PERARD
-1 siblings, 0 replies; 22+ messages in thread
From: Anthony PERARD @ 2017-06-30 15:52 UTC (permalink / raw)
To: Lan Tianyu
Cc: qemu-devel, xen-devel, Chao Gao, mst, marcel, sstabellini, kevin.tian
On Thu, Jun 29, 2017 at 01:49:54AM -0400, Lan Tianyu wrote:
> From: Chao Gao <chao.gao@intel.com>
>
> According to VT-d spec Interrupt Remapping and Interrupt Posting ->
> Interrupt Remapping -> Interrupt Request Formats On Intel 64
> Platforms, fields of MSI data register have changed. This patch
> avoids wrongly regarding a remappable format interrupt request as
> an interrupt binded with an event channel.
>
> Signed-off-by: Chao Gao <chao.gao@intel.com>
> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
The patch needs to be rebased on top of QEMU upstream.
Beside that:
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Thanks,
--
Anthony PERARD
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 3/3] msi: Handle remappable format interrupt request
@ 2017-06-30 15:52 ` Anthony PERARD
0 siblings, 0 replies; 22+ messages in thread
From: Anthony PERARD @ 2017-06-30 15:52 UTC (permalink / raw)
To: Lan Tianyu
Cc: kevin.tian, sstabellini, mst, qemu-devel, xen-devel, marcel, Chao Gao
On Thu, Jun 29, 2017 at 01:49:54AM -0400, Lan Tianyu wrote:
> From: Chao Gao <chao.gao@intel.com>
>
> According to VT-d spec Interrupt Remapping and Interrupt Posting ->
> Interrupt Remapping -> Interrupt Request Formats On Intel 64
> Platforms, fields of MSI data register have changed. This patch
> avoids wrongly regarding a remappable format interrupt request as
> an interrupt binded with an event channel.
>
> Signed-off-by: Chao Gao <chao.gao@intel.com>
> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
The patch needs to be rebased on top of QEMU upstream.
Beside that:
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Thanks,
--
Anthony PERARD
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 2/3] xen-pt: bind/unbind interrupt remapping format MSI
2017-06-30 15:48 ` Anthony PERARD
@ 2017-07-04 1:52 ` Lan Tianyu
-1 siblings, 0 replies; 22+ messages in thread
From: Lan Tianyu @ 2017-07-04 1:52 UTC (permalink / raw)
To: Anthony PERARD
Cc: qemu-devel, xen-devel, Chao Gao, mst, marcel, sstabellini, kevin.tian
Hi Anthony:
On 2017年06月30日 23:48, Anthony PERARD wrote:
> On Thu, Jun 29, 2017 at 01:49:53AM -0400, Lan Tianyu wrote:
>> From: Chao Gao <chao.gao@intel.com>
>>
>> If a vIOMMU is exposed to guest, guest will configure the msi to remapping
>> format. The original code isn't suitable to the new format. A new pair
>> bind/unbind interfaces are added for this usage. This patch recognizes
>> this case and uses new interfaces to bind/unbind msi.
>>
>> Signed-off-by: Chao Gao <chao.gao@intel.com>
>> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
>
> Hi,
>
> The patch series is going to need to be rebased on top of QEMU upstream.
> For starter, configure have changed a bit.
Thanks for your reminder. Will do that.
>
>> ---
>> configure | 54 +++++++++++++++++++++++++++++++++++++++++++
>> hw/xen/xen_pt_msi.c | 50 ++++++++++++++++++++++++++++-----------
>> include/hw/i386/apic-msidef.h | 1 +
>> include/hw/xen/xen_common.h | 25 ++++++++++++++++++++
>> 4 files changed, 117 insertions(+), 13 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 476210b..b3ac49f 100755
>> --- a/configure
>> +++ b/configure
>> @@ -1982,6 +1982,60 @@ EOF
>> /*
>> * If we have stable libs the we don't want the libxc compat
>> * layers, regardless of what CFLAGS we may have been given.
>> + */
>> +#undef XC_WANT_COMPAT_EVTCHN_API
>> +#undef XC_WANT_COMPAT_GNTTAB_API
>> +#undef XC_WANT_COMPAT_MAP_FOREIGN_API
>> +#include <xenctrl.h>
>> +#include <xenstore.h>
>> +#include <xenevtchn.h>
>> +#include <xengnttab.h>
>> +#include <xenforeignmemory.h>
>> +#include <stdint.h>
>> +#include <xen/hvm/hvm_info_table.h>
>> +#if !defined(HVM_MAX_VCPUS)
>> +# error HVM_MAX_VCPUS not defined
>> +#endif
>> +int main(void) {
>> + xc_interface *xc = NULL;
>> + xenforeignmemory_handle *xfmem;
>> + xenevtchn_handle *xe;
>> + xengnttab_handle *xg;
>> + xen_domain_handle_t handle;
>> + xengnttab_grant_copy_segment_t* seg = NULL;
>> +
>> + xs_daemon_open();
>> +
>> + xc = xc_interface_open(0, 0, 0);
>> + xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
>> + xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
>> + xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000);
>> + xc_hvm_create_ioreq_server(xc, 0, HVM_IOREQSRV_BUFIOREQ_ATOMIC, NULL);
>> + xc_domain_create(xc, 0, handle, 0, NULL, NULL);
>> +
>> + xfmem = xenforeignmemory_open(0, 0);
>> + xenforeignmemory_map(xfmem, 0, 0, 0, 0, 0);
>> +
>> + xe = xenevtchn_open(0, 0);
>> + xenevtchn_fd(xe);
>> +
>> + xg = xengnttab_open(0, 0);
>> + xengnttab_grant_copy(xg, 0, seg);
>> +
>> + xc_domain_update_msi_irq_remapping(xc, 0, 0, 0, 0, 0 ,0);
>> +
>> + return 0;
>> +}
>> +EOF
>> + compile_prog "" "$xen_libs $xen_stable_libs"
>> + then
>> + xen_ctrl_version=4100
>> + xen=yes
>
> There have been some change/refactoring in configure, so this won't
> work. The xen_ctrl_version got one more digit.
>
> Can you try with this patch? Which is also simpler.
Sure. Thanks.
> diff --git a/configure b/configure
> index c571ad14e5..a06f2c0b92 100755
> --- a/configure
> +++ b/configure
> @@ -2021,6 +2021,24 @@ EOF
> # Xen unstable
> elif
> cat > $TMPC <<EOF &&
> +#include <xenctrl.h>
> +int main(void) {
> + xc_interface *xc = NULL;
> +
> + xc_domain_update_msi_irq_remapping(xc, 0, 0, 0, 0, 0 ,0);
> +
> + return 0;
> +}
> +EOF
> + compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
> + then
> + xen_stable_libs="-lxendevicemodel $xen_stable_libs"
> + xen_ctrl_version=41000
> + xen=yes
> +
> + # Xen 4.9
> + elif
> + cat > $TMPC <<EOF &&
> #undef XC_WANT_COMPAT_DEVICEMODEL_API
> #define __XEN_TOOLS__
> #include <xendevicemodel.h>
>
>
>> index 8e1580d..4ba43a8 100644
>> --- a/include/hw/xen/xen_common.h
>> +++ b/include/hw/xen/xen_common.h
>> @@ -438,4 +438,29 @@ static inline int xengnttab_grant_copy(xengnttab_handle *xgt, uint32_t count,
>> }
>> #endif
>>
>> +/* Xen before 4.10 */
>> +#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 4100
>
> This will needs to be
> CONFIG_XEN_CTRL_INTERFACE_VERSION < 41000
>
Will update.
--
Best regards
Tianyu Lan
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 2/3] xen-pt: bind/unbind interrupt remapping format MSI
@ 2017-07-04 1:52 ` Lan Tianyu
0 siblings, 0 replies; 22+ messages in thread
From: Lan Tianyu @ 2017-07-04 1:52 UTC (permalink / raw)
To: Anthony PERARD
Cc: kevin.tian, sstabellini, mst, qemu-devel, xen-devel, marcel, Chao Gao
Hi Anthony:
On 2017年06月30日 23:48, Anthony PERARD wrote:
> On Thu, Jun 29, 2017 at 01:49:53AM -0400, Lan Tianyu wrote:
>> From: Chao Gao <chao.gao@intel.com>
>>
>> If a vIOMMU is exposed to guest, guest will configure the msi to remapping
>> format. The original code isn't suitable to the new format. A new pair
>> bind/unbind interfaces are added for this usage. This patch recognizes
>> this case and uses new interfaces to bind/unbind msi.
>>
>> Signed-off-by: Chao Gao <chao.gao@intel.com>
>> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
>
> Hi,
>
> The patch series is going to need to be rebased on top of QEMU upstream.
> For starter, configure have changed a bit.
Thanks for your reminder. Will do that.
>
>> ---
>> configure | 54 +++++++++++++++++++++++++++++++++++++++++++
>> hw/xen/xen_pt_msi.c | 50 ++++++++++++++++++++++++++++-----------
>> include/hw/i386/apic-msidef.h | 1 +
>> include/hw/xen/xen_common.h | 25 ++++++++++++++++++++
>> 4 files changed, 117 insertions(+), 13 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 476210b..b3ac49f 100755
>> --- a/configure
>> +++ b/configure
>> @@ -1982,6 +1982,60 @@ EOF
>> /*
>> * If we have stable libs the we don't want the libxc compat
>> * layers, regardless of what CFLAGS we may have been given.
>> + */
>> +#undef XC_WANT_COMPAT_EVTCHN_API
>> +#undef XC_WANT_COMPAT_GNTTAB_API
>> +#undef XC_WANT_COMPAT_MAP_FOREIGN_API
>> +#include <xenctrl.h>
>> +#include <xenstore.h>
>> +#include <xenevtchn.h>
>> +#include <xengnttab.h>
>> +#include <xenforeignmemory.h>
>> +#include <stdint.h>
>> +#include <xen/hvm/hvm_info_table.h>
>> +#if !defined(HVM_MAX_VCPUS)
>> +# error HVM_MAX_VCPUS not defined
>> +#endif
>> +int main(void) {
>> + xc_interface *xc = NULL;
>> + xenforeignmemory_handle *xfmem;
>> + xenevtchn_handle *xe;
>> + xengnttab_handle *xg;
>> + xen_domain_handle_t handle;
>> + xengnttab_grant_copy_segment_t* seg = NULL;
>> +
>> + xs_daemon_open();
>> +
>> + xc = xc_interface_open(0, 0, 0);
>> + xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
>> + xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
>> + xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000);
>> + xc_hvm_create_ioreq_server(xc, 0, HVM_IOREQSRV_BUFIOREQ_ATOMIC, NULL);
>> + xc_domain_create(xc, 0, handle, 0, NULL, NULL);
>> +
>> + xfmem = xenforeignmemory_open(0, 0);
>> + xenforeignmemory_map(xfmem, 0, 0, 0, 0, 0);
>> +
>> + xe = xenevtchn_open(0, 0);
>> + xenevtchn_fd(xe);
>> +
>> + xg = xengnttab_open(0, 0);
>> + xengnttab_grant_copy(xg, 0, seg);
>> +
>> + xc_domain_update_msi_irq_remapping(xc, 0, 0, 0, 0, 0 ,0);
>> +
>> + return 0;
>> +}
>> +EOF
>> + compile_prog "" "$xen_libs $xen_stable_libs"
>> + then
>> + xen_ctrl_version=4100
>> + xen=yes
>
> There have been some change/refactoring in configure, so this won't
> work. The xen_ctrl_version got one more digit.
>
> Can you try with this patch? Which is also simpler.
Sure. Thanks.
> diff --git a/configure b/configure
> index c571ad14e5..a06f2c0b92 100755
> --- a/configure
> +++ b/configure
> @@ -2021,6 +2021,24 @@ EOF
> # Xen unstable
> elif
> cat > $TMPC <<EOF &&
> +#include <xenctrl.h>
> +int main(void) {
> + xc_interface *xc = NULL;
> +
> + xc_domain_update_msi_irq_remapping(xc, 0, 0, 0, 0, 0 ,0);
> +
> + return 0;
> +}
> +EOF
> + compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs"
> + then
> + xen_stable_libs="-lxendevicemodel $xen_stable_libs"
> + xen_ctrl_version=41000
> + xen=yes
> +
> + # Xen 4.9
> + elif
> + cat > $TMPC <<EOF &&
> #undef XC_WANT_COMPAT_DEVICEMODEL_API
> #define __XEN_TOOLS__
> #include <xendevicemodel.h>
>
>
>> index 8e1580d..4ba43a8 100644
>> --- a/include/hw/xen/xen_common.h
>> +++ b/include/hw/xen/xen_common.h
>> @@ -438,4 +438,29 @@ static inline int xengnttab_grant_copy(xengnttab_handle *xgt, uint32_t count,
>> }
>> #endif
>>
>> +/* Xen before 4.10 */
>> +#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 4100
>
> This will needs to be
> CONFIG_XEN_CTRL_INTERFACE_VERSION < 41000
>
Will update.
--
Best regards
Tianyu Lan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] i386/msi: Correct mask of destination ID in MSI address
2017-06-29 5:49 ` Lan Tianyu
@ 2017-07-04 2:31 ` Peter Xu
-1 siblings, 0 replies; 22+ messages in thread
From: Peter Xu @ 2017-07-04 2:31 UTC (permalink / raw)
To: Lan Tianyu
Cc: qemu-devel, xen-devel, kevin.tian, sstabellini, mst,
anthony.perard, marcel, Chao Gao
On Thu, Jun 29, 2017 at 01:49:52AM -0400, Lan Tianyu wrote:
> From: Chao Gao <chao.gao@intel.com>
>
> According to SDM 10.11.1, only [19:12] bits of MSI address are
> Destination ID, change the mask to avoid ambiguity for VT-d spec
> has used the bit 4 to indicate a remappable interrupt request.
>
> Signed-off-by: Chao Gao <chao.gao@intel.com>
> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
> ---
> include/hw/i386/apic-msidef.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/hw/i386/apic-msidef.h b/include/hw/i386/apic-msidef.h
> index 8b4d4cc..420b411 100644
> --- a/include/hw/i386/apic-msidef.h
> +++ b/include/hw/i386/apic-msidef.h
> @@ -26,6 +26,6 @@
>
> #define MSI_ADDR_DEST_ID_SHIFT 12
> #define MSI_ADDR_DEST_IDX_SHIFT 4
> -#define MSI_ADDR_DEST_ID_MASK 0x00ffff0
> +#define MSI_ADDR_DEST_ID_MASK 0x000ff000
>
> #endif /* HW_APIC_MSIDEF_H */
> --
> 1.8.3.1
>
>
--
Peter Xu
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] i386/msi: Correct mask of destination ID in MSI address
@ 2017-07-04 2:31 ` Peter Xu
0 siblings, 0 replies; 22+ messages in thread
From: Peter Xu @ 2017-07-04 2:31 UTC (permalink / raw)
To: Lan Tianyu
Cc: kevin.tian, xen-devel, mst, qemu-devel, marcel, sstabellini,
anthony.perard, Chao Gao
On Thu, Jun 29, 2017 at 01:49:52AM -0400, Lan Tianyu wrote:
> From: Chao Gao <chao.gao@intel.com>
>
> According to SDM 10.11.1, only [19:12] bits of MSI address are
> Destination ID, change the mask to avoid ambiguity for VT-d spec
> has used the bit 4 to indicate a remappable interrupt request.
>
> Signed-off-by: Chao Gao <chao.gao@intel.com>
> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
> ---
> include/hw/i386/apic-msidef.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/hw/i386/apic-msidef.h b/include/hw/i386/apic-msidef.h
> index 8b4d4cc..420b411 100644
> --- a/include/hw/i386/apic-msidef.h
> +++ b/include/hw/i386/apic-msidef.h
> @@ -26,6 +26,6 @@
>
> #define MSI_ADDR_DEST_ID_SHIFT 12
> #define MSI_ADDR_DEST_IDX_SHIFT 4
> -#define MSI_ADDR_DEST_ID_MASK 0x00ffff0
> +#define MSI_ADDR_DEST_ID_MASK 0x000ff000
>
> #endif /* HW_APIC_MSIDEF_H */
> --
> 1.8.3.1
>
>
--
Peter Xu
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 0/3] Qemu: Add Xen vIOMMU interrupt remapping function support
2017-06-29 5:49 ` Lan Tianyu
@ 2017-07-06 23:50 ` no-reply
-1 siblings, 0 replies; 22+ messages in thread
From: no-reply @ 2017-07-06 23:50 UTC (permalink / raw)
To: tianyu.lan
Cc: famz, qemu-devel, xen-devel, kevin.tian, sstabellini, mst,
marcel, anthony.perard, chao.gao
Hi,
This series seems to have some coding style problems. See output below for
more information:
Subject: [Qemu-devel] [PATCH 0/3] Qemu: Add Xen vIOMMU interrupt remapping function support
Message-id: 1498715394-16402-1-git-send-email-tianyu.lan@intel.com
Type: series
=== TEST SCRIPT BEGIN ===
#!/bin/bash
BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0
git config --local diff.renamelimit 0
git config --local diff.renames True
commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
failed=1
echo
fi
n=$((n+1))
done
exit $failed
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
fatal: Cannot update paths and switch to branch 'test' at the same time.
Did you intend to checkout 'origin/patchew/1498715394-16402-1-git-send-email-tianyu.lan@intel.com' which can not be resolved as commit?
Traceback (most recent call last):
File "/home/fam/bin/patchew", line 440, in test_one
git_clone_repo(clone, r["repo"], r["head"], logf)
File "/home/fam/bin/patchew", line 53, in git_clone_repo
cwd=clone)
File "/usr/lib64/python3.5/subprocess.py", line 271, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'checkout', 'origin/patchew/1498715394-16402-1-git-send-email-tianyu.lan@intel.com', '-b', 'test']' returned non-zero exit status 128
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 0/3] Qemu: Add Xen vIOMMU interrupt remapping function support
@ 2017-07-06 23:50 ` no-reply
0 siblings, 0 replies; 22+ messages in thread
From: no-reply @ 2017-07-06 23:50 UTC (permalink / raw)
Cc: tianyu.lan, kevin.tian, xen-devel, famz, mst, qemu-devel,
anthony.perard, sstabellini, marcel, chao.gao
Hi,
This series seems to have some coding style problems. See output below for
more information:
Subject: [Qemu-devel] [PATCH 0/3] Qemu: Add Xen vIOMMU interrupt remapping function support
Message-id: 1498715394-16402-1-git-send-email-tianyu.lan@intel.com
Type: series
=== TEST SCRIPT BEGIN ===
#!/bin/bash
BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0
git config --local diff.renamelimit 0
git config --local diff.renames True
commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
failed=1
echo
fi
n=$((n+1))
done
exit $failed
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
fatal: Cannot update paths and switch to branch 'test' at the same time.
Did you intend to checkout 'origin/patchew/1498715394-16402-1-git-send-email-tianyu.lan@intel.com' which can not be resolved as commit?
Traceback (most recent call last):
File "/home/fam/bin/patchew", line 440, in test_one
git_clone_repo(clone, r["repo"], r["head"], logf)
File "/home/fam/bin/patchew", line 53, in git_clone_repo
cwd=clone)
File "/usr/lib64/python3.5/subprocess.py", line 271, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'checkout', 'origin/patchew/1498715394-16402-1-git-send-email-tianyu.lan@intel.com', '-b', 'test']' returned non-zero exit status 128
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 0/3] Qemu: Add Xen vIOMMU interrupt remapping function support
2017-07-06 23:50 ` no-reply
@ 2017-07-07 0:02 ` Fam Zheng
-1 siblings, 0 replies; 22+ messages in thread
From: Fam Zheng @ 2017-07-07 0:02 UTC (permalink / raw)
To: qemu-devel
Cc: tianyu.lan, kevin.tian, xen-devel, mst, anthony.perard,
sstabellini, marcel, chao.gao
On Thu, 07/06 16:50, no-reply@patchew.org wrote:
> Hi,
>
> This series seems to have some coding style problems. See output below for
> more information:
>
> Subject: [Qemu-devel] [PATCH 0/3] Qemu: Add Xen vIOMMU interrupt remapping function support
> Message-id: 1498715394-16402-1-git-send-email-tianyu.lan@intel.com
> Type: series
>
> === TEST SCRIPT BEGIN ===
> #!/bin/bash
>
> BASE=base
> n=1
> total=$(git log --oneline $BASE.. | wc -l)
> failed=0
>
> git config --local diff.renamelimit 0
> git config --local diff.renames True
>
> commits="$(git log --format=%H --reverse $BASE..)"
> for c in $commits; do
> echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
> if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
> failed=1
> echo
> fi
> n=$((n+1))
> done
>
> exit $failed
> === TEST SCRIPT END ===
>
> Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
> fatal: Cannot update paths and switch to branch 'test' at the same time.
> Did you intend to checkout 'origin/patchew/1498715394-16402-1-git-send-email-tianyu.lan@intel.com' which can not be resolved as commit?
> Traceback (most recent call last):
> File "/home/fam/bin/patchew", line 440, in test_one
> git_clone_repo(clone, r["repo"], r["head"], logf)
> File "/home/fam/bin/patchew", line 53, in git_clone_repo
> cwd=clone)
> File "/usr/lib64/python3.5/subprocess.py", line 271, in check_call
> raise CalledProcessError(retcode, cmd)
> subprocess.CalledProcessError: Command '['git', 'checkout', 'origin/patchew/1498715394-16402-1-git-send-email-tianyu.lan@intel.com', '-b', 'test']' returned non-zero exit status 128
Ignore this please, patchew is recovering from a bad state.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 0/3] Qemu: Add Xen vIOMMU interrupt remapping function support
@ 2017-07-07 0:02 ` Fam Zheng
0 siblings, 0 replies; 22+ messages in thread
From: Fam Zheng @ 2017-07-07 0:02 UTC (permalink / raw)
To: qemu-devel
Cc: tianyu.lan, kevin.tian, xen-devel, mst, marcel, sstabellini,
anthony.perard, chao.gao
On Thu, 07/06 16:50, no-reply@patchew.org wrote:
> Hi,
>
> This series seems to have some coding style problems. See output below for
> more information:
>
> Subject: [Qemu-devel] [PATCH 0/3] Qemu: Add Xen vIOMMU interrupt remapping function support
> Message-id: 1498715394-16402-1-git-send-email-tianyu.lan@intel.com
> Type: series
>
> === TEST SCRIPT BEGIN ===
> #!/bin/bash
>
> BASE=base
> n=1
> total=$(git log --oneline $BASE.. | wc -l)
> failed=0
>
> git config --local diff.renamelimit 0
> git config --local diff.renames True
>
> commits="$(git log --format=%H --reverse $BASE..)"
> for c in $commits; do
> echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
> if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
> failed=1
> echo
> fi
> n=$((n+1))
> done
>
> exit $failed
> === TEST SCRIPT END ===
>
> Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
> fatal: Cannot update paths and switch to branch 'test' at the same time.
> Did you intend to checkout 'origin/patchew/1498715394-16402-1-git-send-email-tianyu.lan@intel.com' which can not be resolved as commit?
> Traceback (most recent call last):
> File "/home/fam/bin/patchew", line 440, in test_one
> git_clone_repo(clone, r["repo"], r["head"], logf)
> File "/home/fam/bin/patchew", line 53, in git_clone_repo
> cwd=clone)
> File "/usr/lib64/python3.5/subprocess.py", line 271, in check_call
> raise CalledProcessError(retcode, cmd)
> subprocess.CalledProcessError: Command '['git', 'checkout', 'origin/patchew/1498715394-16402-1-git-send-email-tianyu.lan@intel.com', '-b', 'test']' returned non-zero exit status 128
Ignore this please, patchew is recovering from a bad state.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2017-07-07 0:02 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-29 5:49 [Qemu-devel] [PATCH 0/3] Qemu: Add Xen vIOMMU interrupt remapping function support Lan Tianyu
2017-06-29 5:49 ` Lan Tianyu
2017-06-29 5:49 ` [Qemu-devel] [PATCH 1/3] i386/msi: Correct mask of destination ID in MSI address Lan Tianyu
2017-06-29 5:49 ` Lan Tianyu
2017-06-30 13:49 ` [Qemu-devel] " Anthony PERARD
2017-06-30 13:49 ` Anthony PERARD
2017-07-04 2:31 ` [Qemu-devel] " Peter Xu
2017-07-04 2:31 ` Peter Xu
2017-06-29 5:49 ` [Qemu-devel] [PATCH 2/3] xen-pt: bind/unbind interrupt remapping format MSI Lan Tianyu
2017-06-29 5:49 ` Lan Tianyu
2017-06-30 15:48 ` [Qemu-devel] " Anthony PERARD
2017-06-30 15:48 ` Anthony PERARD
2017-07-04 1:52 ` [Qemu-devel] " Lan Tianyu
2017-07-04 1:52 ` Lan Tianyu
2017-06-29 5:49 ` [Qemu-devel] [PATCH 3/3] msi: Handle remappable format interrupt request Lan Tianyu
2017-06-29 5:49 ` Lan Tianyu
2017-06-30 15:52 ` [Qemu-devel] " Anthony PERARD
2017-06-30 15:52 ` Anthony PERARD
2017-07-06 23:50 ` [Qemu-devel] [PATCH 0/3] Qemu: Add Xen vIOMMU interrupt remapping function support no-reply
2017-07-06 23:50 ` no-reply
2017-07-07 0:02 ` Fam Zheng
2017-07-07 0:02 ` Fam Zheng
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.