Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen/x86 Change xpq_flush_cache to just do WBINVD le...



details:   https://anonhg.NetBSD.org/src/rev/6332c61a7d50
branches:  trunk
changeset: 791245:6332c61a7d50
user:      jnemeth <jnemeth%NetBSD.org@localhost>
date:      Sun Nov 10 01:19:13 2013 +0000

description:
Change xpq_flush_cache to just do WBINVD letting the hypervisor trap and
handle it as MMUEXT_FLUSH_CACHE is a privileged hypervisor operation.

diffstat:

 sys/arch/xen/x86/x86_xpmap.c |  12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diffs (37 lines):

diff -r fbdd99e47452 -r 6332c61a7d50 sys/arch/xen/x86/x86_xpmap.c
--- a/sys/arch/xen/x86/x86_xpmap.c      Sun Nov 10 00:50:13 2013 +0000
+++ b/sys/arch/xen/x86/x86_xpmap.c      Sun Nov 10 01:19:13 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: x86_xpmap.c,v 1.51 2013/11/08 02:23:52 christos Exp $  */
+/*     $NetBSD: x86_xpmap.c,v 1.52 2013/11/10 01:19:13 jnemeth Exp $   */
 
 /*
  * Copyright (c) 2006 Mathieu Ropert <mro%adviseo.fr@localhost>
@@ -69,7 +69,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.51 2013/11/08 02:23:52 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.52 2013/11/10 01:19:13 jnemeth Exp $");
 
 #include "opt_xen.h"
 #include "opt_ddb.h"
@@ -348,16 +348,12 @@
 void
 xpq_flush_cache(void)
 {
-       struct mmuext_op op;
-       int s = splvm(), err;
+       int s = splvm();
 
        xpq_flush_queue();
 
        XENPRINTK2(("xpq_queue_flush_cache\n"));
-       op.cmd = MMUEXT_FLUSH_CACHE;
-       if ((err = HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF)) < 0) {
-               panic("xpq_flush_cache, err %d", err);
-       }
+       asm("wbinvd":::"memory");
        splx(s); /* XXX: removeme */
 }
 



Home | Main Index | Thread Index | Old Index