Module Name: src
Committed By: jym
Date: Fri Feb 12 01:55:46 UTC 2010
Modified Files:
src/sys/arch/x86/x86: pmap.c
src/sys/arch/xen/x86: x86_xpmap.c xen_bus_dma.c xenfunc.c
Log Message:
Starting with Xen 3 API, MMU_EXTENDED_COMMAND (tlb flush, cache flush, page
pinning/unpinning, set_ldt, invlpg) operations cannot be queued in the
xpq_queue[] any more, as they use their own specific hypercall, mmuext_op().
Their associated xpq_queue_*() functions already call xpq_flush_queue()
before issuing the mmuext_op() hypercall, which makes these xpq_flush_queue()
calls not necessary.
Rapidly discussed with bouyer@ in private mail. XEN3_DOM0/XEN3PAE_DOM0 tested
through a build.sh release, amd64 was only compile tested. No regression
expected.
To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/arch/x86/x86/pmap.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/xen/x86/x86_xpmap.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/xen/x86/xen_bus_dma.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/xen/x86/xenfunc.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/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.102 src/sys/arch/x86/x86/pmap.c:1.103
--- src/sys/arch/x86/x86/pmap.c:1.102 Wed Feb 10 00:39:30 2010
+++ src/sys/arch/x86/x86/pmap.c Fri Feb 12 01:55:45 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.102 2010/02/10 00:39:30 jym Exp $ */
+/* $NetBSD: pmap.c,v 1.103 2010/02/12 01:55:45 jym Exp $ */
/*
* Copyright (c) 2007 Manuel Bouyer.
@@ -149,7 +149,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.102 2010/02/10 00:39:30 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.103 2010/02/12 01:55:45 jym Exp $");
#include "opt_user_ldt.h"
#include "opt_lockdebug.h"
@@ -855,7 +855,6 @@
xpq_queue_invlpg(
(vaddr_t)&pmap->pm_pdir[PDIR_SLOT_PTE + i]);
}
- xpq_flush_queue();
if (pmap_valid_entry(opde))
pmap_apte_flush(ourpmap);
splx(s);
@@ -2132,7 +2131,6 @@
(void)pmap_extract(pmap_kernel(), object, &pdirpa);
xpq_queue_pin_table(xpmap_ptom_masked(pdirpa));
#endif
- xpq_flush_queue();
splx(s);
#endif /* XEN */
@@ -2166,7 +2164,6 @@
xpq_queue_pte_update(xpmap_ptetomach(pte), *pte | PG_RW);
xpq_queue_invlpg((vaddr_t)object);
}
- xpq_flush_queue();
splx(s);
#endif /* XEN */
}
@@ -2743,7 +2740,6 @@
if ((new_pgd[i] & PG_V) || (old_pgd[i] & PG_V))
xpq_queue_pte_update(addr, new_pgd[i]);
}
- xpq_flush_queue(); /* XXXtlb */
tlbflush();
xen_set_user_pgd(pmap_pdirpa(pmap, 0));
xen_current_user_pgd = pmap_pdirpa(pmap, 0);
@@ -2784,7 +2780,6 @@
xpmap_ptom(pmap->pm_pdirpa[i]) | PG_V);
}
tlbflush();
- xpq_flush_queue();
splx(s);
}
#else /* PAE */
Index: src/sys/arch/xen/x86/x86_xpmap.c
diff -u src/sys/arch/xen/x86/x86_xpmap.c:1.17 src/sys/arch/xen/x86/x86_xpmap.c:1.18
--- src/sys/arch/xen/x86/x86_xpmap.c:1.17 Fri Oct 23 02:32:34 2009
+++ src/sys/arch/xen/x86/x86_xpmap.c Fri Feb 12 01:55:45 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: x86_xpmap.c,v 1.17 2009/10/23 02:32:34 snj Exp $ */
+/* $NetBSD: x86_xpmap.c,v 1.18 2010/02/12 01:55:45 jym Exp $ */
/*
* Copyright (c) 2006 Mathieu Ropert <[email protected]>
@@ -69,7 +69,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.17 2009/10/23 02:32:34 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.18 2010/02/12 01:55:45 jym Exp $");
#include "opt_xen.h"
#include "opt_ddb.h"
@@ -153,7 +153,6 @@
}
s = splvm();
xpq_queue_set_ldt(base, entries);
- xpq_flush_queue();
splx(s);
}
Index: src/sys/arch/xen/x86/xen_bus_dma.c
diff -u src/sys/arch/xen/x86/xen_bus_dma.c:1.16 src/sys/arch/xen/x86/xen_bus_dma.c:1.17
--- src/sys/arch/xen/x86/xen_bus_dma.c:1.16 Sat Jan 23 22:32:42 2010
+++ src/sys/arch/xen/x86/xen_bus_dma.c Fri Feb 12 01:55:46 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: xen_bus_dma.c,v 1.16 2010/01/23 22:32:42 cegger Exp $ */
+/* $NetBSD: xen_bus_dma.c,v 1.17 2010/02/12 01:55:46 jym Exp $ */
/* NetBSD bus_dma.c,v 1.21 2005/04/16 07:53:35 yamt Exp */
/*-
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xen_bus_dma.c,v 1.16 2010/01/23 22:32:42 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_bus_dma.c,v 1.17 2010/02/12 01:55:46 jym Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -142,7 +142,6 @@
}
/* Flush updates through and flush the TLB */
xpq_queue_tlb_flush();
- xpq_flush_queue();
splx(s);
return 0;
@@ -185,7 +184,6 @@
}
/* Flush updates through and flush the TLB */
xpq_queue_tlb_flush();
- xpq_flush_queue();
splx(s);
return error;
}
Index: src/sys/arch/xen/x86/xenfunc.c
diff -u src/sys/arch/xen/x86/xenfunc.c:1.9 src/sys/arch/xen/x86/xenfunc.c:1.10
--- src/sys/arch/xen/x86/xenfunc.c:1.9 Fri Oct 23 02:32:34 2009
+++ src/sys/arch/xen/x86/xenfunc.c Fri Feb 12 01:55:46 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: xenfunc.c,v 1.9 2009/10/23 02:32:34 snj Exp $ */
+/* $NetBSD: xenfunc.c,v 1.10 2010/02/12 01:55:46 jym Exp $ */
/*
*
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xenfunc.c,v 1.9 2009/10/23 02:32:34 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xenfunc.c,v 1.10 2010/02/12 01:55:46 jym Exp $");
#include <sys/param.h>
@@ -55,7 +55,6 @@
{
int s = splvm();
xpq_queue_invlpg(addr);
- xpq_flush_queue();
splx(s);
}
@@ -104,7 +103,6 @@
{
int s = splvm();
xpq_queue_pt_switch(xpmap_ptom_masked(val));
- xpq_flush_queue();
splx(s);
}
#endif
@@ -114,7 +112,6 @@
{
int s = splvm();
xpq_queue_tlb_flush();
- xpq_flush_queue();
splx(s);
}