WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] libxc: add new operation in HVMOP to deli

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxc: add new operation in HVMOP to deliver emulated MSI.
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Thu, 16 Jun 2011 11:11:55 +0100
Delivery-date: Thu, 16 Jun 2011 03:18:17 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Wei Liu <liuw@xxxxxxxxx>
# Date 1306418477 -3600
# Node ID a7383a7a00006a6983fc3b9587363ffc7c53e156
# Parent  5024faf7c92986a86843b977bd63b3c54d688647
libxc: add new operation in HVMOP to deliver emulated MSI.

Signed-off-by: Wei Liu <liuw@xxxxxxxxx>
---


diff -r 5024faf7c929 -r a7383a7a0000 tools/libxc/xc_misc.c
--- a/tools/libxc/xc_misc.c     Thu May 26 14:58:28 2011 +0100
+++ b/tools/libxc/xc_misc.c     Thu May 26 15:01:17 2011 +0100
@@ -417,6 +417,35 @@
     return rc;
 }
 
+int xc_hvm_inject_msi(
+    xc_interface *xch, domid_t dom, uint64_t addr, uint32_t data)
+{
+    DECLARE_HYPERCALL;
+    DECLARE_HYPERCALL_BUFFER(struct xen_hvm_inj_msi, arg);
+    int rc;
+
+    arg = xc_hypercall_buffer_alloc(xch, arg, sizeof(*arg));
+    if ( arg == NULL )
+    {
+        PERROR("Could not allocate memory for xc_hvm_inj_msi hypercall");
+        return -1;
+    }
+
+    hypercall.op     = __HYPERVISOR_hvm_op;
+    hypercall.arg[0] = HVMOP_inj_msi;
+    hypercall.arg[1] = HYPERCALL_BUFFER_AS_ARG(arg);
+
+    arg->domid = dom;
+    arg->addr  = addr;
+    arg->data  = data;
+
+    rc = do_xen_hypercall(xch, &hypercall);
+
+    xc_hypercall_buffer_free(xch, arg);
+
+    return rc;
+}
+
 int xc_hvm_track_dirty_vram(
     xc_interface *xch, domid_t dom,
     uint64_t first_pfn, uint64_t nr,
diff -r 5024faf7c929 -r a7383a7a0000 tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h     Thu May 26 14:58:28 2011 +0100
+++ b/tools/libxc/xenctrl.h     Thu May 26 15:01:17 2011 +0100
@@ -1398,6 +1398,8 @@
 int xc_hvm_set_pci_link_route(
     xc_interface *xch, domid_t dom, uint8_t link, uint8_t isa_irq);
 
+int xc_hvm_inject_msi(
+    xc_interface *xch, domid_t dom, uint64_t addr, uint32_t data);
 
 /*
  * Track dirty bit changes in the VRAM area

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxc: add new operation in HVMOP to deliver emulated MSI., Xen patchbot-unstable <=