Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/bouyer-xenpvh]: src/sys/arch/xen/xen Don't try to attach vcpu on !XENPV
details: https://anonhg.NetBSD.org/src/rev/8b648db0caaa
branches: bouyer-xenpvh
changeset: 982966:8b648db0caaa
user: bouyer <bouyer%NetBSD.org@localhost>
date: Wed Apr 22 20:49:08 2020 +0000
description:
Don't try to attach vcpu on !XENPV
remove debug printf and other misc cosmetic changes
diffstat:
sys/arch/xen/xen/hypervisor.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (71 lines):
diff -r 7169fe0da778 -r 8b648db0caaa sys/arch/xen/xen/hypervisor.c
--- a/sys/arch/xen/xen/hypervisor.c Wed Apr 22 16:51:56 2020 +0000
+++ b/sys/arch/xen/xen/hypervisor.c Wed Apr 22 20:49:08 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hypervisor.c,v 1.73.2.8 2020/04/20 11:29:01 bouyer Exp $ */
+/* $NetBSD: hypervisor.c,v 1.73.2.9 2020/04/22 20:49:08 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.8 2020/04/20 11:29:01 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hypervisor.c,v 1.73.2.9 2020/04/22 20:49:08 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -399,8 +399,6 @@
vm_guest = VM_GUEST_XENHVM;
return 0;
}
- printf("cpu %s ci_acpiid %d vcpuid %d domid %d\n",
- device_xname(ci->ci_dev), ci->ci_acpiid, descs[1], descs[2]);
ci->ci_vcpuid = descs[1];
ci->ci_vcpu = &HYPERVISOR_shared_info->vcpu_info[ci->ci_vcpuid];
@@ -434,9 +432,9 @@
* From FreeBSD:
* Trick toolstack to think we are enlightened
*/
+ xen_hvm_param.value = 1;
aprint_verbose_dev(ci->ci_dev,
"using event upcall vector: %d\n", xen_hvm_vec );
- xen_hvm_param.value = 1;
}
}
@@ -476,14 +474,14 @@
return 1;
}
-#ifdef MULTIPROCESSOR
+#if defined(MULTIPROCESSOR) && defined(XENPV)
static int
hypervisor_vcpu_print(void *aux, const char *parent)
{
/* Unconfigured cpus are ignored quietly. */
return (QUIET);
}
-#endif /* MULTIPROCESSOR */
+#endif /* MULTIPROCESSOR && XENPV */
/*
* Attach the hypervisor.
@@ -591,6 +589,7 @@
xengnt_init();
events_init();
+#ifdef XENPV
memset(&hac, 0, sizeof(hac));
hac.hac_vcaa.vcaa_name = "vcpu";
hac.hac_vcaa.vcaa_caa.cpu_number = 0;
@@ -622,6 +621,7 @@
}
#endif /* MULTIPROCESSOR */
+#endif /* XENPV */
#if NXENBUS > 0
extern struct x86_bus_dma_tag xenbus_bus_dma_tag;
Home |
Main Index |
Thread Index |
Old Index