Module Name:    src
Committed By:   bouyer
Date:           Thu Apr 16 20:21:04 UTC 2020

Modified Files:
        src/sys/arch/xen/xen [bouyer-xenpvh]: hypervisor.c

Log Message:
switch vm_guest to VM_GUEST_XENPVHVM only after all tests succeeded.


To generate a diff of this commit:
cvs rdiff -u -r1.73.2.4 -r1.73.2.5 src/sys/arch/xen/xen/hypervisor.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/xen/hypervisor.c
diff -u src/sys/arch/xen/xen/hypervisor.c:1.73.2.4 src/sys/arch/xen/xen/hypervisor.c:1.73.2.5
--- src/sys/arch/xen/xen/hypervisor.c:1.73.2.4	Thu Apr 16 19:23:50 2020
+++ src/sys/arch/xen/xen/hypervisor.c	Thu Apr 16 20:21:04 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: hypervisor.c,v 1.73.2.4 2020/04/16 19:23:50 bouyer Exp $ */
+/* $NetBSD: hypervisor.c,v 1.73.2.5 2020/04/16 20:21:04 bouyer Exp $ */
 
 /*
  * Copyright (c) 2005 Manuel Bouyer.
@@ -53,7 +53,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.73.2.4 2020/04/16 19:23:50 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.73.2.5 2020/04/16 20:21:04 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -251,8 +251,6 @@ hypervisor_match(device_t parent, cfdata
 		/* XXX: vtophys(&hypercall_page) */
 		wrmsr(descs[1], (uintptr_t)&hypercall_page - KERNBASE);
 
-		vm_guest = VM_GUEST_XENPVHVM; /* Be more specific */
-
 	} else {
 		return 0;
 	}
@@ -427,7 +425,7 @@ hypervisor_match(device_t parent, cfdata
 	bi.common.len = sizeof(struct btinfo_rootdevice);
 
 	/* From i386/multiboot.c */
-	/*	$NetBSD: hypervisor.c,v 1.73.2.4 2020/04/16 19:23:50 bouyer Exp $	*/
+	/*	$NetBSD: hypervisor.c,v 1.73.2.5 2020/04/16 20:21:04 bouyer Exp $	*/
 	int i, len;
 	vaddr_t data;
 	extern struct bootinfo	bootinfo;
@@ -456,6 +454,8 @@ hypervisor_match(device_t parent, cfdata
 	events_default_setup();
 	delay_func = xen_delay;
 	initclock_func = xen_initclocks;
+	vm_guest = VM_GUEST_XENPVHVM; /* Be more specific */
+
 #endif /* XENPVHVM */
 
 	/* If we got here, it must mean we matched */

Reply via email to