Module Name: src Committed By: jnemeth Date: Sun Nov 10 01:19:13 UTC 2013
Modified Files: src/sys/arch/xen/x86: x86_xpmap.c Log Message: Change xpq_flush_cache to just do WBINVD letting the hypervisor trap and handle it as MMUEXT_FLUSH_CACHE is a privileged hypervisor operation. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/arch/xen/x86/x86_xpmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/xen/x86/x86_xpmap.c diff -u src/sys/arch/xen/x86/x86_xpmap.c:1.51 src/sys/arch/xen/x86/x86_xpmap.c:1.52 --- src/sys/arch/xen/x86/x86_xpmap.c:1.51 Fri Nov 8 02:23:52 2013 +++ src/sys/arch/xen/x86/x86_xpmap.c Sun Nov 10 01:19:13 2013 @@ -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 <m...@adviseo.fr> @@ -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 @@ xpq_queue_tlb_flush(void) 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 */ }