Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Retire XEN_COMPAT_030001 as detailed on port-xen@:
details: https://anonhg.NetBSD.org/src/rev/02859ff4ff1f
branches: trunk
changeset: 779905:02859ff4ff1f
user: jym <jym%NetBSD.org@localhost>
date: Wed Jun 27 00:37:07 2012 +0000
description:
Retire XEN_COMPAT_030001 as detailed on port-xen@:
http://mail-index.netbsd.org/port-xen/2012/06/25/msg007431.html
The xen_p2m API comes next.
ok bouyer@.
Tested on i386 PAE and amd64 (Xen 3.3 on private test bed, and
Xen 3.4 for Amazon EC2).
FWIW, Amazon always reported:
hypervisor0 at mainbus0: Xen version 3.4.3-kaos_t1micro
multiple times for Europe and US West-1, so I guess they are now at
3.4 (32 and 64 bits).
diffstat:
sys/arch/amd64/amd64/machdep.c | 6 +++---
sys/arch/i386/conf/XEN3_DOMU | 3 +--
sys/arch/i386/i386/locore.S | 15 ++++-----------
sys/arch/i386/i386/machdep.c | 6 +++---
sys/arch/xen/conf/files.xen | 4 ++--
sys/arch/xen/include/i386/hypercalls.h | 12 +-----------
sys/arch/xen/include/xenpmap.h | 23 ++++-------------------
sys/arch/xen/x86/x86_xpmap.c | 6 +++---
sys/arch/xen/x86/xen_bus_dma.c | 15 ++++++---------
sys/arch/xen/xen/balloon.c | 9 ++++-----
sys/arch/xen/xen/if_xennet_xenbus.c | 15 +++++++--------
sys/arch/xen/xen/privcmd.c | 8 ++------
sys/arch/xen/xen/xennetback_xenbus.c | 11 +++++------
13 files changed, 45 insertions(+), 88 deletions(-)
diffs (truncated from 474 to 300 lines):
diff -r 9923ed8524eb -r 02859ff4ff1f sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c Tue Jun 26 20:15:57 2012 +0000
+++ b/sys/arch/amd64/amd64/machdep.c Wed Jun 27 00:37:07 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.186 2012/06/16 20:47:04 dsl Exp $ */
+/* $NetBSD: machdep.c,v 1.187 2012/06/27 00:37:07 jym Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.186 2012/06/16 20:47:04 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.187 2012/06/27 00:37:07 jym Exp $");
/* #define XENDEBUG_LOW */
@@ -1723,7 +1723,7 @@
/* Determine physical address space */
avail_start = first_avail;
avail_end = ctob(xen_start_info.nr_pages);
- pmap_pa_start = XPMAP_OFFSET;
+ pmap_pa_start = 0;
pmap_pa_end = pmap_pa_start + ctob(xen_start_info.nr_pages);
__PRINTK(("pmap_pa_start 0x%lx avail_start 0x%lx avail_end 0x%lx\n",
pmap_pa_start, avail_start, avail_end));
diff -r 9923ed8524eb -r 02859ff4ff1f sys/arch/i386/conf/XEN3_DOMU
--- a/sys/arch/i386/conf/XEN3_DOMU Tue Jun 26 20:15:57 2012 +0000
+++ b/sys/arch/i386/conf/XEN3_DOMU Wed Jun 27 00:37:07 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOMU,v 1.43 2012/03/10 21:51:53 joerg Exp $
+# $NetBSD: XEN3_DOMU,v 1.44 2012/06/27 00:37:08 jym Exp $
include "arch/xen/conf/std.xen"
@@ -166,7 +166,6 @@
#options NFS_BOOTSTATIC_SERVER="\"server:/path/to/root\""
#options __XEN_INTERFACE_VERSION__=0x00030205 # Xen 3.1 interface
-options XEN_COMPAT_030001 #compatible with Xen3 before 3.0.2
options MAXPHYS=32768 #xbd doesn't handle 64k transfers
config netbsd root on ? type ?
diff -r 9923ed8524eb -r 02859ff4ff1f sys/arch/i386/i386/locore.S
--- a/sys/arch/i386/i386/locore.S Tue Jun 26 20:15:57 2012 +0000
+++ b/sys/arch/i386/i386/locore.S Wed Jun 27 00:37:07 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.S,v 1.100 2012/06/16 17:30:19 chs Exp $ */
+/* $NetBSD: locore.S,v 1.101 2012/06/27 00:37:08 jym Exp $ */
/*
* Copyright-o-rama!
@@ -129,7 +129,7 @@
*/
#include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.100 2012/06/16 17:30:19 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.101 2012/06/27 00:37:08 jym Exp $");
#include "opt_compat_oldboot.h"
#include "opt_ddb.h"
@@ -169,18 +169,11 @@
*/
.section __xen_guest
.ascii "GUEST_OS=netbsd,GUEST_VER=3.0,XEN_VER=xen-3.0"
-#if defined(DOM0OPS) || !defined(XEN_COMPAT_030001)
.ascii ",VIRT_BASE=0xc0000000" /* KERNBASE */
.ascii ",ELF_PADDR_OFFSET=0xc0000000" /* KERNBASE */
-#else
- .ascii ",VIRT_BASE=0xc0100000" /* KERNTEXTOFF */
- .ascii ",ELF_PADDR_OFFSET=0xc0100000" /* KERNTEXTOFF */
-#endif
.ascii ",VIRT_ENTRY=0xc0100000" /* KERNTEXTOFF */
-#if !defined(XEN_COMPAT_030001)
.ascii ",HYPERCALL_PAGE=0x00000101"
/* (???+HYPERCALL_PAGE_OFFSET)/PAGE_SIZE) */
-#endif
#ifdef PAE
.ascii ",PAE=yes[extended-cr3]"
#endif
@@ -824,13 +817,13 @@
addl $PDE_SIZE,%esp # pop paddr_t
call _C_LABEL(main)
-#if defined(XEN) && !defined(XEN_COMPAT_030001)
+#if defined(XEN)
/* space for the hypercall call page */
#define HYPERCALL_PAGE_OFFSET 0x1000
.org HYPERCALL_PAGE_OFFSET
ENTRY(hypercall_page)
.skip 0x1000
-#endif /* defined(XEN) && !defined(XEN_COMPAT_030001) */
+#endif /* defined(XEN) */
/*
* void lgdt_finish(void);
diff -r 9923ed8524eb -r 02859ff4ff1f sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c Tue Jun 26 20:15:57 2012 +0000
+++ b/sys/arch/i386/i386/machdep.c Wed Jun 27 00:37:07 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.728 2012/06/02 21:36:41 dsl Exp $ */
+/* $NetBSD: machdep.c,v 1.729 2012/06/27 00:37:08 jym Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.728 2012/06/02 21:36:41 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.729 2012/06/27 00:37:08 jym Exp $");
#include "opt_beep.h"
#include "opt_compat_ibcs2.h"
@@ -1364,7 +1364,7 @@
/* Make sure the end of the space used by the kernel is rounded. */
first_avail = round_page(first_avail);
avail_start = first_avail;
- avail_end = ctob((paddr_t)xen_start_info.nr_pages) + XPMAP_OFFSET;
+ avail_end = ctob((paddr_t)xen_start_info.nr_pages);
pmap_pa_start = (KERNTEXTOFF - KERNBASE);
pmap_pa_end = pmap_pa_start + ctob((paddr_t)xen_start_info.nr_pages);
mem_clusters[0].start = avail_start;
diff -r 9923ed8524eb -r 02859ff4ff1f sys/arch/xen/conf/files.xen
--- a/sys/arch/xen/conf/files.xen Tue Jun 26 20:15:57 2012 +0000
+++ b/sys/arch/xen/conf/files.xen Wed Jun 27 00:37:07 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.xen,v 1.126 2012/05/07 17:45:29 jym Exp $
+# $NetBSD: files.xen,v 1.127 2012/06/27 00:37:09 jym Exp $
# NetBSD: files.x86,v 1.10 2003/10/08 17:30:00 bouyer Exp
# NetBSD: files.i386,v 1.254 2004/03/25 23:32:10 jmc Exp
@@ -391,7 +391,7 @@
include "dev/pcmcia/files.pcmcia"
# Domain-0 operations
-defflag opt_xen.h DOM0OPS XEN_COMPAT_030001
+defflag opt_xen.h DOM0OPS
file arch/xen/xen/privcmd.c dom0ops
file arch/xen/x86/xen_shm_machdep.c dom0ops
file arch/x86/pci/pci_machdep.c hypervisor & pci & dom0ops
diff -r 9923ed8524eb -r 02859ff4ff1f sys/arch/xen/include/i386/hypercalls.h
--- a/sys/arch/xen/include/i386/hypercalls.h Tue Jun 26 20:15:57 2012 +0000
+++ b/sys/arch/xen/include/i386/hypercalls.h Wed Jun 27 00:37:07 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hypercalls.h,v 1.14 2011/12/07 16:01:39 cegger Exp $ */
+/* $NetBSD: hypercalls.h,v 1.15 2012/06/27 00:37:09 jym Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -59,7 +59,6 @@
#include <machine/pte.h> /* pt_entry_t */
-#if !defined(XEN_COMPAT_030001)
/* hypercall via the hypercall call page */
#define __str(x) #x
#define _str(x) __str(x)
@@ -69,15 +68,6 @@
: output_const \
: input_const \
: "memory" )
-#else
-/* traditionnal hypercall via int 0x82 */
-#define _hypercall(name, input_const, output_const) \
- __asm volatile ( \
- TRAP_INSTR \
- : output_const \
- : "0" (name), input_const \
- : "memory" )
-#endif
#define _harg(...) __VA_ARGS__
diff -r 9923ed8524eb -r 02859ff4ff1f sys/arch/xen/include/xenpmap.h
--- a/sys/arch/xen/include/xenpmap.h Tue Jun 26 20:15:57 2012 +0000
+++ b/sys/arch/xen/include/xenpmap.h Wed Jun 27 00:37:07 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xenpmap.h,v 1.35 2012/06/24 18:31:52 jym Exp $ */
+/* $NetBSD: xenpmap.h,v 1.36 2012/06/27 00:37:09 jym Exp $ */
/*
*
@@ -76,20 +76,6 @@
extern unsigned long *xpmap_phys_to_machine_mapping;
-/*
- * On Xen-2, the start of the day virtual memory starts at KERNTEXTOFF
- * (0xc0100000). On Xen-3 for domain0 it starts at KERNBASE (0xc0000000).
- * So the offset between physical and virtual address is different on
- * Xen-2 and Xen-3 for domain0.
- * starting with xen-3.0.2, we can add notes so that virtual memory starts
- * at KERNBASE for domU as well.
- */
-#if defined(DOM0OPS) || !defined(XEN_COMPAT_030001)
-#define XPMAP_OFFSET 0
-#else
-#define XPMAP_OFFSET (KERNTEXTOFF - KERNBASE)
-#endif
-
#define mfn_to_pfn(mfn) (machine_to_phys_mapping[(mfn)])
#define pfn_to_mfn(pfn) (xpmap_phys_to_machine_mapping[(pfn)])
@@ -97,8 +83,7 @@
xpmap_mtop_masked(paddr_t mpa)
{
return (
- ((paddr_t)machine_to_phys_mapping[mpa >> PAGE_SHIFT] << PAGE_SHIFT)
- + XPMAP_OFFSET);
+ (paddr_t)machine_to_phys_mapping[mpa >> PAGE_SHIFT] << PAGE_SHIFT);
}
static __inline paddr_t
@@ -110,8 +95,8 @@
static __inline paddr_t
xpmap_ptom_masked(paddr_t ppa)
{
- return (((paddr_t)xpmap_phys_to_machine_mapping[(ppa -
- XPMAP_OFFSET) >> PAGE_SHIFT]) << PAGE_SHIFT);
+ return (((paddr_t)xpmap_phys_to_machine_mapping[(ppa) >> PAGE_SHIFT])
+ << PAGE_SHIFT);
}
static __inline paddr_t
diff -r 9923ed8524eb -r 02859ff4ff1f sys/arch/xen/x86/x86_xpmap.c
--- a/sys/arch/xen/x86/x86_xpmap.c Tue Jun 26 20:15:57 2012 +0000
+++ b/sys/arch/xen/x86/x86_xpmap.c Wed Jun 27 00:37:07 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: x86_xpmap.c,v 1.44 2012/06/06 22:22:41 rmind Exp $ */
+/* $NetBSD: x86_xpmap.c,v 1.45 2012/06/27 00:37:10 jym 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.44 2012/06/06 22:22:41 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.45 2012/06/27 00:37:10 jym Exp $");
#include "opt_xen.h"
#include "opt_ddb.h"
@@ -235,7 +235,7 @@
"\n", (int64_t)ma, (int64_t)pa));
xpq_queue[xpq_idx].ptr = ma | MMU_MACHPHYS_UPDATE;
- xpq_queue[xpq_idx].val = (pa - XPMAP_OFFSET) >> PAGE_SHIFT;
+ xpq_queue[xpq_idx].val = pa >> PAGE_SHIFT;
xpq_increment_idx();
#ifdef XENDEBUG_SYNC
xpq_flush_queue();
diff -r 9923ed8524eb -r 02859ff4ff1f sys/arch/xen/x86/xen_bus_dma.c
--- a/sys/arch/xen/x86/xen_bus_dma.c Tue Jun 26 20:15:57 2012 +0000
+++ b/sys/arch/xen/x86/xen_bus_dma.c Wed Jun 27 00:37:07 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xen_bus_dma.c,v 1.23 2011/07/01 18:37:08 dyoung Exp $ */
+/* $NetBSD: xen_bus_dma.c,v 1.24 2012/06/27 00:37:10 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.23 2011/07/01 18:37:08 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_bus_dma.c,v 1.24 2012/06/27 00:37:10 jym Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -91,7 +91,7 @@
pa = VM_PAGE_TO_PHYS(pg);
mfn = xpmap_ptom(pa) >> PAGE_SHIFT;
xpmap_phys_to_machine_mapping[
- (pa - XPMAP_OFFSET) >> PAGE_SHIFT] = INVALID_P2M_ENTRY;
+ pa >> PAGE_SHIFT] = INVALID_P2M_ENTRY;
xenguest_handle(res.extent_start) = &mfn;
res.nr_extents = 1;
res.extent_order = 0;
@@ -104,8 +104,7 @@
"failed: err %d (pa %#" PRIxPADDR " mfn %#lx)\n",
error, pa, mfn);
#endif
- xpmap_phys_to_machine_mapping[
- (pa - XPMAP_OFFSET) >> PAGE_SHIFT] = mfn;
+ xpmap_phys_to_machine_mapping[pa >> PAGE_SHIFT] = mfn;
error = ENOMEM;
goto failed;
@@ -133,8 +132,7 @@
for (pg = mlistp->tqh_first, i = 0; pg != NULL; pg = pgnext, i++) {
pgnext = pg->pageq.queue.tqe_next;
pa = VM_PAGE_TO_PHYS(pg);
- xpmap_phys_to_machine_mapping[
- (pa - XPMAP_OFFSET) >> PAGE_SHIFT] = mfn+i;
+ xpmap_phys_to_machine_mapping[pa >> PAGE_SHIFT] = mfn+i;
xpq_queue_machphys_update(((paddr_t)(mfn+i)) << PAGE_SHIFT, pa);
/* while here, give extra pages back to UVM */
if (i >= npagesreq) {
Home |
Main Index |
Thread Index |
Old Index