Page MenuHomeFreeBSD

D29402.id86225.diff
No OneTemporary

D29402.id86225.diff

Index: sys/dev/xen/debug/debug.c
===================================================================
--- sys/dev/xen/debug/debug.c
+++ 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_support_evtchn_rebind())
return;
if (BUS_ADD_CHILD(parent, 0, "debug", 0) == NULL)
Index: sys/x86/include/xen/xen-os.h
===================================================================
--- sys/x86/include/xen/xen-os.h
+++ sys/x86/include/xen/xen-os.h
@@ -39,6 +39,13 @@
/* If non-zero, the hypervisor has been configured to use a direct vector */
extern int xen_vector_callback_enabled;
+static inline bool
+xen_support_evtchn_rebind(void)
+{
+
+ return (!xen_hvm_domain() || xen_vector_callback_enabled);
+}
+
#endif /* !__ASSEMBLY__ */
#endif /* _MACHINE_X86_XEN_XEN_OS_H_ */
Index: sys/x86/xen/xen_intr.c
===================================================================
--- sys/x86/xen/xen_intr.c
+++ sys/x86/xen/xen_intr.c
@@ -540,7 +540,7 @@
s = HYPERVISOR_shared_info;
v = DPCPU_GET(vcpu_info);
- if (xen_hvm_domain() && !xen_vector_callback_enabled) {
+ if (!xen_support_evtchn_rebind()) {
KASSERT((cpu == 0), ("Fired PCI event callback on wrong CPU"));
}
@@ -901,7 +901,7 @@
u_int to_cpu, vcpu_id;
int error, masked;
- if (xen_vector_callback_enabled == 0)
+ if (!xen_support_evtchn_rebind())
return (EOPNOTSUPP);
to_cpu = apic_cpuid(apic_id);

File Metadata

Mime Type
text/plain
Expires
Mon, Aug 3, 3:18 AM (5 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35887447
Default Alt Text
D29402.id86225.diff (1 KB)

Event Timeline