Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144591400
D29402.1775618582.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D29402.1775618582.diff
View Options
diff --git a/sys/dev/xen/debug/debug.c b/sys/dev/xen/debug/debug.c
--- a/sys/dev/xen/debug/debug.c
+++ b/sys/dev/xen/debug/debug.c
@@ -97,7 +97,7 @@
KASSERT(xen_domain(),
("Trying to add Xen debug device to non-xen guest"));
- if (xen_hvm_domain() && !xen_vector_callback_enabled)
+ if (!xen_has_percpu_evtchn())
return;
if (BUS_ADD_CHILD(parent, 0, "debug", 0) == NULL)
diff --git a/sys/x86/include/xen/xen-os.h b/sys/x86/include/xen/xen-os.h
--- a/sys/x86/include/xen/xen-os.h
+++ b/sys/x86/include/xen/xen-os.h
@@ -49,6 +49,13 @@
/* tunable for disabling PV nics */
extern int xen_disable_pv_nics;
+static inline bool
+xen_has_percpu_evtchn(void)
+{
+
+ return (!xen_hvm_domain() || xen_vector_callback_enabled);
+}
+
static inline bool
xen_pv_shutdown_handler(void)
{
diff --git a/sys/x86/xen/xen_intr.c b/sys/x86/xen/xen_intr.c
--- a/sys/x86/xen/xen_intr.c
+++ b/sys/x86/xen/xen_intr.c
@@ -510,7 +510,7 @@
s = HYPERVISOR_shared_info;
v = DPCPU_GET(vcpu_info);
- if (xen_hvm_domain() && !xen_vector_callback_enabled) {
+ if (!xen_has_percpu_evtchn()) {
KASSERT((cpu == 0), ("Fired PCI event callback on wrong CPU"));
}
@@ -859,7 +859,7 @@
u_int to_cpu, vcpu_id;
int error, masked;
- if (xen_vector_callback_enabled == 0)
+ if (!xen_has_percpu_evtchn())
return (EOPNOTSUPP);
to_cpu = apic_cpuid(apic_id);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 8, 3:23 AM (6 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28297501
Default Alt Text
D29402.1775618582.diff (1 KB)
Attached To
Mode
D29402: xen: introduce xen_support_evtchn_bind()
Attached
Detach File
Event Timeline
Log In to Comment