Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Bump up XEN source API compatibility to 0x00030208 ...
details: https://anonhg.NetBSD.org/src/rev/ffa3ebf92b4f
branches: trunk
changeset: 448532:ffa3ebf92b4f
user: cherry <cherry%NetBSD.org@localhost>
date: Mon Feb 04 18:14:53 2019 +0000
description:
Bump up XEN source API compatibility to 0x00030208 from 0x00030201,
but maintain backwards source API compilation compatibility.
ie; sources with config(5)
options __XEN_INTERFACE_VERSION__=0x00030201 # Xen 3.1 interface
should compile and run without problems.
Not that API version 0x00030201 is the lowest version we support now.
diffstat:
sys/arch/amd64/conf/std.xen | 4 ++--
sys/arch/xen/conf/std.xen | 4 ++--
sys/arch/xen/include/hypervisor.h | 4 +++-
sys/arch/xen/include/xen.h | 8 +++++++-
sys/arch/xen/x86/x86_xpmap.c | 8 ++++----
5 files changed, 18 insertions(+), 10 deletions(-)
diffs (119 lines):
diff -r 7618eec6ab0d -r ffa3ebf92b4f sys/arch/amd64/conf/std.xen
--- a/sys/arch/amd64/conf/std.xen Mon Feb 04 15:13:54 2019 +0000
+++ b/sys/arch/amd64/conf/std.xen Mon Feb 04 18:14:53 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: std.xen,v 1.10 2019/02/02 12:32:54 cherry Exp $
+# $NetBSD: std.xen,v 1.11 2019/02/04 18:14:53 cherry Exp $
# NetBSD: std.i386,v 1.24 2003/02/26 21:33:36 fvdl Exp
#
# standard, required NetBSD/i386 'options'
@@ -7,7 +7,7 @@
include "conf/std" # MI standard options
options XEN #Xen support
-options __XEN_INTERFACE_VERSION__=0x00030201 # Xen 3.1 interface
+options __XEN_INTERFACE_VERSION__=0x00030208 # Xen 3.1 interface
#options __XEN_INTERFACE_VERSION__=0x00030205 # Xen 3.1 interface
options CPU_IN_CKSUM
diff -r 7618eec6ab0d -r ffa3ebf92b4f sys/arch/xen/conf/std.xen
--- a/sys/arch/xen/conf/std.xen Mon Feb 04 15:13:54 2019 +0000
+++ b/sys/arch/xen/conf/std.xen Mon Feb 04 18:14:53 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: std.xen,v 1.9 2019/02/02 12:32:54 cherry Exp $
+# $NetBSD: std.xen,v 1.10 2019/02/04 18:14:53 cherry Exp $
# NetBSD: std.i386,v 1.24 2003/02/26 21:33:36 fvdl Exp
#
# standard, required NetBSD/i386 'options'
@@ -6,7 +6,7 @@
machine xen i386
include "conf/std" # MI standard options
-options __XEN_INTERFACE_VERSION__=0x00030201 # Xen 3.1 interface
+options __XEN_INTERFACE_VERSION__=0x00030208 # Xen 3.1 interface
options EXEC_AOUT # exec a.out binaries
options EXEC_ELF32 # exec ELF binaries
diff -r 7618eec6ab0d -r ffa3ebf92b4f sys/arch/xen/include/hypervisor.h
--- a/sys/arch/xen/include/hypervisor.h Mon Feb 04 15:13:54 2019 +0000
+++ b/sys/arch/xen/include/hypervisor.h Mon Feb 04 18:14:53 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hypervisor.h,v 1.48 2019/02/02 14:50:15 cherry Exp $ */
+/* $NetBSD: hypervisor.h,v 1.49 2019/02/04 18:14:53 cherry Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -94,6 +94,7 @@
#include <xen/include/public/io/netif.h>
#include <xen/include/public/io/blkif.h>
+#if __XEN_INTERFACE_VERSION < 0x00030208
/* Undo namespace damage from xen/include/public/io/ring.h
* The proper fix is to get upstream to stop assuming that all OSs use
* mb(), rmb(), wmb().
@@ -105,6 +106,7 @@
#define xen_mb() membar_sync()
#define xen_rmb() membar_producer()
#define xen_wmb() membar_consumer()
+#endif /* __XEN_INTERFACE_VERSION */
#include <machine/hypercalls.h>
diff -r 7618eec6ab0d -r ffa3ebf92b4f sys/arch/xen/include/xen.h
--- a/sys/arch/xen/include/xen.h Mon Feb 04 15:13:54 2019 +0000
+++ b/sys/arch/xen/include/xen.h Mon Feb 04 18:14:53 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xen.h,v 1.42 2019/02/02 12:32:55 cherry Exp $ */
+/* $NetBSD: xen.h,v 1.43 2019/02/04 18:14:53 cherry Exp $ */
/*
*
@@ -122,6 +122,12 @@
/* Everything below this point is not included by assembler (.S) files. */
#ifndef _LOCORE
+/* Version Specific Glue */
+#if __XEN_INTERFACE_VERSION__ >= 0x00030203
+#define console_mfn console.domU.mfn
+#define console_evtchn console.domU.evtchn
+#endif
+
/* some function prototypes */
void trap_init(void);
void xpq_flush_cache(void);
diff -r 7618eec6ab0d -r ffa3ebf92b4f sys/arch/xen/x86/x86_xpmap.c
--- a/sys/arch/xen/x86/x86_xpmap.c Mon Feb 04 15:13:54 2019 +0000
+++ b/sys/arch/xen/x86/x86_xpmap.c Mon Feb 04 18:14:53 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: x86_xpmap.c,v 1.81 2018/07/29 08:02:24 maxv Exp $ */
+/* $NetBSD: x86_xpmap.c,v 1.82 2019/02/04 18:14:53 cherry Exp $ */
/*
* Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -95,7 +95,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.81 2018/07/29 08:02:24 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_xpmap.c,v 1.82 2019/02/04 18:14:53 cherry Exp $");
#include "opt_xen.h"
#include "opt_ddb.h"
@@ -349,7 +349,7 @@
op.cmd = MMUEXT_INVLPG_MULTI;
op.arg1.linear_addr = va;
- op.arg2.vcpumask = &xcpumask.xcpum_xm;
+ set_xen_guest_handle(op.arg2.vcpumask, &xcpumask.xcpum_xm);
if (HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0)
panic(__func__);
@@ -381,7 +381,7 @@
xpq_flush_queue();
op.cmd = MMUEXT_TLB_FLUSH_MULTI;
- op.arg2.vcpumask = &xcpumask.xcpum_xm;
+ set_xen_guest_handle(op.arg2.vcpumask, &xcpumask.xcpum_xm);
if (HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0)
panic(__func__);
Home |
Main Index |
Thread Index |
Old Index