[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] hvm: Provide an HVMOP_flush_tlbs to flush VCPU TLBs.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1188464229 -3600
# Node ID c398dad9d50a5d3f16155f0c3f6c5faf8907f9a7
# Parent  b485d8d7347ae33492490d1aca4b404af89b53e2
hvm: Provide an HVMOP_flush_tlbs to flush VCPU TLBs.
From: Peter Johnston <pjohnston@xxxxxxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/hvm.c          |   10 ++++++++++
 xen/include/public/hvm/hvm_op.h |    3 +++
 2 files changed, 13 insertions(+)

diff -r b485d8d7347a -r c398dad9d50a xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Wed Aug 29 15:47:55 2007 +0100
+++ b/xen/arch/x86/hvm/hvm.c    Thu Aug 30 09:57:09 2007 +0100
@@ -1164,6 +1164,12 @@ static int hvmop_set_pci_link_route(
  out:
     rcu_unlock_domain(d);
     return rc;
+}
+
+static int hvmop_flush_tlb_all(void)
+{
+    flush_tlb_mask(current->domain->domain_dirty_cpumask);
+    return 0;
 }
 
 long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE(void) arg)
@@ -1257,6 +1263,10 @@ long do_hvm_op(unsigned long op, XEN_GUE
             guest_handle_cast(arg, xen_hvm_set_pci_link_route_t));
         break;
 
+    case HVMOP_flush_tlbs:
+        rc = guest_handle_is_null(arg) ? hvmop_flush_tlb_all() : -ENOSYS;
+        break;
+
     default:
     {
         gdprintk(XENLOG_WARNING, "Bad HVM op %ld.\n", op);
diff -r b485d8d7347a -r c398dad9d50a xen/include/public/hvm/hvm_op.h
--- a/xen/include/public/hvm/hvm_op.h   Wed Aug 29 15:47:55 2007 +0100
+++ b/xen/include/public/hvm/hvm_op.h   Thu Aug 30 09:57:09 2007 +0100
@@ -70,4 +70,7 @@ typedef struct xen_hvm_set_pci_link_rout
 typedef struct xen_hvm_set_pci_link_route xen_hvm_set_pci_link_route_t;
 DEFINE_XEN_GUEST_HANDLE(xen_hvm_set_pci_link_route_t);
 
+/* Flushes all VCPU TLBs: @arg must be NULL. */
+#define HVMOP_flush_tlbs          5
+
 #endif /* __XEN_PUBLIC_HVM_HVM_OP_H__ */

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.