Page MenuHomeFreeBSD

D29913.id90112.diff
No OneTemporary

D29913.id90112.diff

Index: sys/x86/include/xen/xen-os.h
===================================================================
--- sys/x86/include/xen/xen-os.h
+++ sys/x86/include/xen/xen-os.h
@@ -43,6 +43,9 @@
/* If non-zero, the hypervisor has been configured to use a direct vector */
extern int xen_vector_callback_enabled;
+/* from 27c36a12f1584b53d2454dac238eeed3dedc82ba */
+extern bool xen_evtchn_needs_ack;
+
/* tunable for disabling PV disks */
extern int xen_disable_pv_disks;
Index: sys/x86/include/xen/xen_intr_x86.h
===================================================================
--- /dev/null
+++ sys/x86/include/xen/xen_intr_x86.h
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * xen_intr_x86.h
+ *
+ * APIs for managing Xen event channel, virtual IRQ, and physical IRQ
+ * notifications.
+ *
+ * Copyright (c) 2004, K A Fraser
+ * Copyright (c) 2012, Spectra Logic Corporation
+ *
+ * This file may be distributed separately from the Linux kernel, or
+ * incorporated into other software packages, subject to the following license:
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this source file (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy, modify,
+ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ * $FreeBSD$
+ */
+#ifndef _XEN_INTR_X86_H_
+#define _XEN_INTR_X86_H_
+
+#include <xen/interface/event_channel.h>
+
+/**
+ * Allocate a local event channel port for servicing interprocessor
+ * interupts and, if successful, associate the port with the specified
+ * interrupt handler.
+ *
+ * \param cpu The cpu receiving the IPI.
+ * \param filter The interrupt filter servicing this IPI.
+ * \param irqflags Interrupt handler flags. See sys/bus.h.
+ * \param handlep Pointer to an opaque handle used to manage this
+ * registration.
+ *
+ * \returns 0 on success, otherwise an errno.
+ */
+int xen_intr_alloc_and_bind_ipi(u_int cpu,
+ driver_filter_t filter, enum intr_type irqflags,
+ xen_intr_handle_t *handlep);
+
+#endif /* _XEN_INTR_X86_H_ */
Index: sys/x86/xen/xen_apic.c
===================================================================
--- sys/x86/xen/xen_apic.c
+++ sys/x86/xen/xen_apic.c
@@ -54,6 +54,8 @@
#include <xen/hvm.h>
#include <xen/xen_intr.h>
+#include <x86/xen/xen_intr_x86.h>
+
#include <xen/interface/vcpu.h>
/*--------------------------------- Macros -----------------------------------*/
Index: sys/x86/xen/xen_intr.c
===================================================================
--- sys/x86/xen/xen_intr.c
+++ sys/x86/xen/xen_intr.c
@@ -59,7 +59,6 @@
#include <machine/xen/synch_bitops.h>
#include <xen/xen-os.h>
-#include <xen/hvm.h>
#include <xen/hypervisor.h>
#include <xen/xen_intr.h>
#include <xen/evtchn/evtchnvar.h>
@@ -67,6 +66,10 @@
#include <dev/xen/xenpci/xenpcivar.h>
#include <dev/pci/pcivar.h>
+#if defined(__amd64__) || defined(__i386__)
+#include <x86/xen/xen_intr_x86.h>
+#endif
+
#ifdef DDB
#include <ddb/ddb.h>
#endif
Index: sys/xen/hvm.h
===================================================================
--- sys/xen/hvm.h
+++ sys/xen/hvm.h
@@ -105,6 +105,5 @@
void xen_handle_shared_info(const void *__unused);
extern uint32_t hvm_start_flags;
-extern bool xen_evtchn_needs_ack;
#endif /* __XEN_HVM_H__ */
Index: sys/xen/xen_intr.h
===================================================================
--- sys/xen/xen_intr.h
+++ sys/xen/xen_intr.h
@@ -135,23 +135,6 @@
driver_filter_t filter, driver_intr_t handler,
void *arg, enum intr_type irqflags, xen_intr_handle_t *handlep);
-/**
- * Allocate a local event channel port for servicing interprocessor
- * interupts and, if successful, associate the port with the specified
- * interrupt handler.
- *
- * \param cpu The cpu receiving the IPI.
- * \param filter The interrupt filter servicing this IPI.
- * \param irqflags Interrupt handler flags. See sys/bus.h.
- * \param handlep Pointer to an opaque handle used to manage this
- * registration.
- *
- * \returns 0 on success, otherwise an errno.
- */
-int xen_intr_alloc_and_bind_ipi(u_int cpu,
- driver_filter_t filter, enum intr_type irqflags,
- xen_intr_handle_t *handlep);
-
/**
* Unbind an interrupt handler from its interrupt source.
*

File Metadata

Mime Type
text/plain
Expires
Mon, Apr 20, 1:09 PM (2 m, 45 s ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31841432
Default Alt Text
D29913.id90112.diff (5 KB)

Event Timeline