Deleted Added
full compact
xen_intr.c (279325) xen_intr.c (282274)
1/******************************************************************************
2 * xen_intr.c
3 *
1/******************************************************************************
2 * xen_intr.c
3 *
4 * Xen event and interrupt services for x86 PV and HVM guests.
4 * Xen event and interrupt services for x86 HVM guests.
5 *
6 * Copyright (c) 2002-2005, K A Fraser
7 * Copyright (c) 2005, Intel Corporation <xiaofeng.ling@intel.com>
8 * Copyright (c) 2012, Spectra Logic Corporation
9 *
10 * This file may be distributed separately from the Linux kernel, or
11 * incorporated into other software packages, subject to the following license:
12 *

--- 12 unchanged lines hidden (view full) ---

25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
29 * IN THE SOFTWARE.
30 */
31
32#include <sys/cdefs.h>
5 *
6 * Copyright (c) 2002-2005, K A Fraser
7 * Copyright (c) 2005, Intel Corporation <xiaofeng.ling@intel.com>
8 * Copyright (c) 2012, Spectra Logic Corporation
9 *
10 * This file may be distributed separately from the Linux kernel, or
11 * incorporated into other software packages, subject to the following license:
12 *

--- 12 unchanged lines hidden (view full) ---

25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
29 * IN THE SOFTWARE.
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/x86/xen/xen_intr.c 279325 2015-02-26 16:05:09Z royger $");
33__FBSDID("$FreeBSD: head/sys/x86/xen/xen_intr.c 282274 2015-04-30 15:48:48Z jhb $");
34
35#include "opt_ddb.h"
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/bus.h>
40#include <sys/malloc.h>
41#include <sys/kernel.h>

--- 817 unchanged lines hidden (view full) ---

859xen_intr_assign_cpu(struct intsrc *base_isrc, u_int apic_id)
860{
861#ifdef SMP
862 struct evtchn_bind_vcpu bind_vcpu;
863 struct xenisrc *isrc;
864 u_int to_cpu, vcpu_id;
865 int error, masked;
866
34
35#include "opt_ddb.h"
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/bus.h>
40#include <sys/malloc.h>
41#include <sys/kernel.h>

--- 817 unchanged lines hidden (view full) ---

859xen_intr_assign_cpu(struct intsrc *base_isrc, u_int apic_id)
860{
861#ifdef SMP
862 struct evtchn_bind_vcpu bind_vcpu;
863 struct xenisrc *isrc;
864 u_int to_cpu, vcpu_id;
865 int error, masked;
866
867#ifdef XENHVM
868 if (xen_vector_callback_enabled == 0)
869 return (EOPNOTSUPP);
867 if (xen_vector_callback_enabled == 0)
868 return (EOPNOTSUPP);
870#endif
871
872 to_cpu = apic_cpuid(apic_id);
873 vcpu_id = pcpu_find(to_cpu)->pc_vcpu_id;
874 xen_intr_intrcnt_add(to_cpu);
875
876 mtx_lock(&xen_intr_isrc_lock);
877 isrc = (struct xenisrc *)base_isrc;
878 if (!is_valid_evtchn(isrc->xi_port)) {

--- 756 unchanged lines hidden ---
869
870 to_cpu = apic_cpuid(apic_id);
871 vcpu_id = pcpu_find(to_cpu)->pc_vcpu_id;
872 xen_intr_intrcnt_add(to_cpu);
873
874 mtx_lock(&xen_intr_isrc_lock);
875 isrc = (struct xenisrc *)base_isrc;
876 if (!is_valid_evtchn(isrc->xi_port)) {

--- 756 unchanged lines hidden ---