Module Name: src
Committed By: cherry
Date: Mon Feb 4 18:14:54 UTC 2019
Modified Files:
src/sys/arch/amd64/conf: std.xen
src/sys/arch/xen/conf: std.xen
src/sys/arch/xen/include: hypervisor.h xen.h
src/sys/arch/xen/x86: x86_xpmap.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/amd64/conf/std.xen
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/xen/conf/std.xen
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/xen/include/hypervisor.h
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/xen/include/xen.h
cvs rdiff -u -r1.81 -r1.82 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/amd64/conf/std.xen
diff -u src/sys/arch/amd64/conf/std.xen:1.10 src/sys/arch/amd64/conf/std.xen:1.11
--- src/sys/arch/amd64/conf/std.xen:1.10 Sat Feb 2 12:32:54 2019
+++ src/sys/arch/amd64/conf/std.xen Mon Feb 4 18:14:53 2019
@@ -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 @@ machine xen amd64
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
Index: src/sys/arch/xen/conf/std.xen
diff -u src/sys/arch/xen/conf/std.xen:1.9 src/sys/arch/xen/conf/std.xen:1.10
--- src/sys/arch/xen/conf/std.xen:1.9 Sat Feb 2 12:32:54 2019
+++ src/sys/arch/xen/conf/std.xen Mon Feb 4 18:14:53 2019
@@ -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
Index: src/sys/arch/xen/include/hypervisor.h
diff -u src/sys/arch/xen/include/hypervisor.h:1.48 src/sys/arch/xen/include/hypervisor.h:1.49
--- src/sys/arch/xen/include/hypervisor.h:1.48 Sat Feb 2 14:50:15 2019
+++ src/sys/arch/xen/include/hypervisor.h Mon Feb 4 18:14:53 2019
@@ -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 @@ struct xen_npx_attach_args {
#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 @@ struct xen_npx_attach_args {
#define xen_mb() membar_sync()
#define xen_rmb() membar_producer()
#define xen_wmb() membar_consumer()
+#endif /* __XEN_INTERFACE_VERSION */
#include <machine/hypercalls.h>
Index: src/sys/arch/xen/include/xen.h
diff -u src/sys/arch/xen/include/xen.h:1.42 src/sys/arch/xen/include/xen.h:1.43
--- src/sys/arch/xen/include/xen.h:1.42 Sat Feb 2 12:32:55 2019
+++ src/sys/arch/xen/include/xen.h Mon Feb 4 18:14:53 2019
@@ -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 @@ void printk(const char *, ...);
/* 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);
Index: src/sys/arch/xen/x86/x86_xpmap.c
diff -u src/sys/arch/xen/x86/x86_xpmap.c:1.81 src/sys/arch/xen/x86/x86_xpmap.c:1.82
--- src/sys/arch/xen/x86/x86_xpmap.c:1.81 Sun Jul 29 08:02:24 2018
+++ src/sys/arch/xen/x86/x86_xpmap.c Mon Feb 4 18:14:53 2019
@@ -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 @@ xen_mcast_invlpg(vaddr_t va, kcpuset_t *
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 @@ xen_mcast_tlbflush(kcpuset_t *kc)
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__);