From: Wei Wang <wei.wang2@amd.com>
To: JBeulich@suse.com, Ian.Jackson@eu.citrix.com,
Ian.Campbell@citrix.com, keir@xen.org
Cc: xen-devel@lists.xensource.com
Subject: [PATCH 12 of 14 V3] libxc: add wrappers for new hypercalls
Date: Tue, 10 Jan 2012 18:07:18 +0100 [thread overview]
Message-ID: <2dc60e3398dd602a34eb.1326215238@gran.amd.com> (raw)
In-Reply-To: <patchbomb.1326215226@gran.amd.com>
# HG changeset patch
# User Wei Wang <wei.wang2@amd.com>
# Date 1326213617 -3600
# Node ID 2dc60e3398dd602a34ebdf92103a3957b97c02c5
# Parent 01d2c1d4e3b992997f170d95dccc2195b9206b04
libxc: add wrappers for new hypercalls
Signed-off-by: Wei Wang <wei.wang2@amd.com>
diff -r 01d2c1d4e3b9 -r 2dc60e3398dd tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c Tue Jan 10 17:40:14 2012 +0100
+++ b/tools/libxc/xc_domain.c Tue Jan 10 17:40:17 2012 +0100
@@ -1352,6 +1352,59 @@ int xc_domain_bind_pt_isa_irq(
PT_IRQ_TYPE_ISA, 0, 0, 0, machine_irq));
}
+int xc_domain_update_iommu_msi(
+ xc_interface *xch,
+ uint32_t domid,
+ uint8_t vector,
+ uint8_t dest,
+ uint8_t dest_mode,
+ uint8_t delivery_mode,
+ uint8_t trig_mode)
+{
+ int rc;
+ DECLARE_DOMCTL;
+ xen_domctl_guest_iommu_op_t * iommu_op;
+
+ domctl.cmd = XEN_DOMCTL_guest_iommu_op;
+ domctl.domain = (domid_t)domid;
+
+ iommu_op = &(domctl.u.guest_iommu_op);
+ iommu_op->op = XEN_DOMCTL_GUEST_IOMMU_OP_SET_MSI;
+ iommu_op->u.msi.vector = vector;
+ iommu_op->u.msi.dest = dest;
+ iommu_op->u.msi.dest_mode = dest_mode;
+ iommu_op->u.msi.delivery_mode = delivery_mode;
+ iommu_op->u.msi.trig_mode = trig_mode;
+
+ rc = do_domctl(xch, &domctl);
+ return rc;
+}
+
+int xc_domain_bind_pt_bdf(xc_interface *xch,
+ uint32_t domid,
+ uint16_t gseg,
+ uint16_t gbdf,
+ uint16_t mseg,
+ uint16_t mbdf)
+{
+ int rc;
+ DECLARE_DOMCTL;
+ xen_domctl_guest_iommu_op_t * guest_op;
+
+ domctl.cmd = XEN_DOMCTL_guest_iommu_op;
+ domctl.domain = (domid_t)domid;
+
+ guest_op = &(domctl.u.guest_iommu_op);
+ guest_op->op = XEN_DOMCTL_GUEST_IOMMU_OP_BIND_BDF;
+ guest_op->u.bdf_bind.g_seg = gseg;
+ guest_op->u.bdf_bind.g_bdf = gbdf;
+ guest_op->u.bdf_bind.m_seg = mseg;
+ guest_op->u.bdf_bind.m_bdf = mbdf;
+
+ rc = do_domctl(xch, &domctl);
+ return rc;
+}
+
int xc_domain_memory_mapping(
xc_interface *xch,
uint32_t domid,
diff -r 01d2c1d4e3b9 -r 2dc60e3398dd tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h Tue Jan 10 17:40:14 2012 +0100
+++ b/tools/libxc/xenctrl.h Tue Jan 10 17:40:17 2012 +0100
@@ -1697,6 +1697,21 @@ int xc_domain_bind_pt_isa_irq(xc_interfa
uint32_t domid,
uint8_t machine_irq);
+int xc_domain_bind_pt_bdf(xc_interface *xch,
+ uint32_t domid,
+ uint16_t gseg,
+ uint16_t gbdf,
+ uint16_t mseg,
+ uint16_t mbdf);
+
+int xc_domain_update_iommu_msi(xc_interface *xch,
+ uint32_t domid,
+ uint8_t vector,
+ uint8_t dest,
+ uint8_t dest_mode,
+ uint8_t delivery_mode,
+ uint8_t trig_mode);
+
int xc_domain_set_machine_address_size(xc_interface *xch,
uint32_t domid,
unsigned int width);
next prev parent reply other threads:[~2012-01-10 17:07 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-10 17:07 [PATCH 00 of 14 V3] amd iommu: support ATS device passthru on IOMMUv2 systems Wei Wang
2012-01-10 17:07 ` [PATCH 01 of 14 V3] amd iommu: Refactoring iommu ring buffer definition Wei Wang
2012-01-10 17:07 ` [PATCH 02 of 14 V3] amd iommu: Introduces new helper functions to simplify bitwise operations Wei Wang
2012-01-10 17:07 ` [PATCH 03 of 14 V3] amd iommu: Add iommu emulation for hvm guest Wei Wang
2012-01-12 11:36 ` Jan Beulich
2012-01-16 10:29 ` Wei Wang
2012-01-10 17:07 ` [PATCH 04 of 14 V3] amd iommu: Enable ppr log Wei Wang
2012-01-10 17:07 ` [PATCH 05 of 14 V3] amd iommu: Enable guest level translation Wei Wang
2012-01-10 17:07 ` [PATCH 06 of 14 V3] amd iommu: add ppr log processing into iommu interrupt handling Wei Wang
2012-01-10 17:07 ` [PATCH 07 of 14 V3] amd iommu: Add 2 hypercalls for libxc Wei Wang
2012-01-10 17:07 ` [PATCH 08 of 14 V3] amd iommu: Add a new flag to indication iommuv2 feature enabled or not Wei Wang
2012-01-10 17:07 ` [PATCH 09 of 14 V3] amd iommu: Add a hypercall for hvmloader Wei Wang
2012-01-10 17:07 ` [PATCH 10 of 14 V3] amd iommu: Enable FC bit in iommu host level PTE Wei Wang
2012-01-10 17:07 ` [PATCH 11 of 14 V3] hvmloader: Build IVRS table Wei Wang
2012-01-10 17:07 ` Wei Wang [this message]
2012-01-10 17:07 ` [PATCH 13 of 14 V3] libxl: bind virtual bdf to physical bdf after device assignment Wei Wang
2012-01-10 17:13 ` Ian Jackson
2012-01-10 17:35 ` Wei Wang2
2012-01-10 17:07 ` [PATCH 14 of 14 V3] libxl: Introduce a new guest config file parameter Wei Wang
2011-12-23 11:29 ` [PATCH 00 of 16] [V2] amd iommu: support ATS device passthru on IOMMUv2 systems Wei Wang
2011-12-23 11:29 ` [PATCH 01 of 16] amd iommu: Refactoring iommu ring buffer definition Wei Wang
2012-01-02 12:44 ` Jan Beulich
2011-12-23 11:29 ` [PATCH 02 of 16] amd iommu: Introduces new helper functions to simplify iommu bitwise operations Wei Wang
2012-01-02 12:52 ` Jan Beulich
2011-12-23 11:29 ` [PATCH 03 of 16] amd iommu: Add iommu emulation for hvm guest Wei Wang
2011-12-23 11:29 ` [PATCH 04 of 16] amd iommu: Enable ppr log Wei Wang
2012-01-02 13:10 ` Jan Beulich
2011-12-23 11:29 ` [PATCH 05 of 16] amd iommu: Enable guest level translation Wei Wang
2011-12-23 11:29 ` [PATCH 06 of 16] amd iommu: add ppr log processing into iommu interrupt handling Wei Wang
2012-01-02 13:13 ` Jan Beulich
2012-01-03 8:58 ` Wei Wang2
2011-12-23 11:29 ` [PATCH 07 of 16] amd iommu: Add 2 hypercalls for libxc Wei Wang
2012-01-02 12:15 ` Jan Beulich
2011-12-23 11:29 ` [PATCH 08 of 16] amd iommu: Add a hypercall for hvmloader Wei Wang
2012-01-02 11:41 ` Jan Beulich
2011-12-23 11:29 ` [PATCH 09 of 16] amd iommu: add iommu mmio handler Wei Wang
2012-01-02 11:39 ` Jan Beulich
2011-12-23 11:29 ` [PATCH 10 of 16] amd iommu: Enable FC bit in iommu host level PTE Wei Wang
2012-01-02 11:36 ` Jan Beulich
2012-01-03 10:05 ` Wei Wang2
2012-01-03 10:12 ` Jan Beulich
2012-01-03 10:37 ` Wei Wang2
2011-12-23 11:29 ` [PATCH 11 of 16] amd iommu: Add a new flag to indication iommuv2 feature enabled or not Wei Wang
2012-01-02 11:29 ` Jan Beulich
2011-12-23 11:29 ` [PATCH 12 of 16] hvmloader: Build IVRS table Wei Wang
2011-12-23 11:36 ` Ian Campbell
2011-12-23 11:52 ` Wei Wang2
2011-12-23 11:29 ` [PATCH 13 of 16] libxc: add wrappers for new hypercalls Wei Wang
2011-12-23 11:29 ` [PATCH 14 of 16] libxl: bind virtual bdf to physical bdf after device assignment Wei Wang
2011-12-23 11:37 ` Ian Campbell
2011-12-23 11:56 ` Wei Wang2
2012-01-03 16:03 ` Ian Jackson
2011-12-23 11:29 ` [PATCH 15 of 16] libxl: Introduce a new guest config file parameter Wei Wang
2012-01-03 16:02 ` Ian Jackson
2012-01-10 17:12 ` [PATCH 15 of 16] libxl: Introduce a new guest config file parameter [and 1 more messages] Ian Jackson
2012-01-11 10:20 ` Wei Wang2
2012-01-23 13:59 ` Ian Jackson
2011-12-23 11:29 ` [PATCH 16 of 16] libxl: pass iommu parameter to qemu-dm Wei Wang
2012-01-11 8:43 ` [PATCH 14 of 14 V3] libxl: Introduce a new guest config file parameter Ian Campbell
2012-01-11 10:47 ` Wei Wang2
2012-01-11 15:04 ` [PATCH 00 of 14 V3] amd iommu: support ATS device passthru on IOMMUv2 systems Jan Beulich
2012-01-11 17:36 ` Wei Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2dc60e3398dd602a34eb.1326215238@gran.amd.com \
--to=wei.wang2@amd.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).