aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/include/pcpu.h
diff options
context:
space:
mode:
authorDoug Rabson <dfr@FreeBSD.org>2009-03-11 15:30:12 +0000
committerDoug Rabson <dfr@FreeBSD.org>2009-03-11 15:30:12 +0000
commit126780243806a6b6cf345b9b548f68010e921aec (patch)
tree633dc40712503605071c68975d2c972638554000 /sys/amd64/include/pcpu.h
parent802e54dc1f4ac7ebd3cc3f0091d2b825780a3c51 (diff)
Notes
Diffstat (limited to 'sys/amd64/include/pcpu.h')
-rw-r--r--sys/amd64/include/pcpu.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/amd64/include/pcpu.h b/sys/amd64/include/pcpu.h
index e9faf282c77a5..23818ca81328d 100644
--- a/sys/amd64/include/pcpu.h
+++ b/sys/amd64/include/pcpu.h
@@ -33,6 +33,24 @@
#error "sys/cdefs.h is a prerequisite for this file"
#endif
+#if defined(XEN) || defined(XENHVM)
+#ifndef NR_VIRQS
+#define NR_VIRQS 24
+#endif
+#ifndef NR_IPIS
+#define NR_IPIS 2
+#endif
+#endif
+
+#ifdef XENHVM
+#define PCPU_XEN_FIELDS \
+ ; \
+ unsigned int pc_last_processed_l1i; \
+ unsigned int pc_last_processed_l2i
+#else
+#define PCPU_XEN_FIELDS
+#endif
+
/*
* The SMP parts are setup in pmap.c and locore.s for the BSP, and
* mp_machdep.c sets up the data for the AP's to "see" when they awake.
@@ -49,7 +67,8 @@
register_t pc_scratch_rsp; /* User %rsp in syscall */ \
u_int pc_apic_id; \
u_int pc_acpi_id; /* ACPI CPU id */ \
- struct user_segment_descriptor *pc_gs32p
+ struct user_segment_descriptor *pc_gs32p \
+ PCPU_XEN_FIELDS
#ifdef _KERNEL