projects/linux·commit bf98ecbb

Merge tag 'for-linus-5.16b-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

bf98ecbb · Linus Torvalds <[email protected]> · 2021-11-10 11:14:21 -08:00

Pull xen updates from Juergen Gross:

 - a series to speed up the boot of Xen PV guests

 - some cleanups in Xen related code

 - replacement of license texts with the appropriate SPDX headers and
   fixing of wrong SPDX headers in Xen header files

 - a small series making paravirtualized interrupt masking much simpler
   and at the same time removing complaints of objtool

 - a fix for Xen ballooning hogging workqueues for too long

 - enablement of the Xen pciback driver for Arm

 - some further small fixes/enhancements

* tag 'for-linus-5.16b-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: (22 commits)
  xen/balloon: fix unused-variable warning
  xen/balloon: rename alloc/free_xenballooned_pages
  xen/balloon: add late_initcall_sync() for initial ballooning done
  x86/xen: remove 32-bit awareness from startup_xen
  xen: remove highmem remnants
  xen: allow pv-only hypercalls only with CONFIG_XEN_PV
  x86/xen: remove 32-bit pv leftovers
  xen-pciback: allow compiling on other archs than x86
  x86/xen: switch initial pvops IRQ functions to dummy ones
  x86/xen: remove xen_have_vcpu_info_placement flag
  x86/pvh: add prototype for xen_pvh_init()
  xen: Fix implicit type conversion
  xen: fix wrong SPDX headers of Xen related headers
  xen/pvcalls-back: Remove redundant 'flush_workqueue()' calls
  x86/xen: Remove redundant irq_enter/exit() invocations
  xen-pciback: Fix return in pm_ctrl_init()
  xen/x86: restrict PV Dom0 identity mapping
  xen/x86: there's no highmem anymore in PV mode
  xen/x86: adjust handling of the L3 user vsyscall special page table
  xen/x86: adjust xen_set_fixmap()
  ...
Commit
bf98ecbbae3edf3bb3ec254c3e318aa3f75fd15e
Parents
4287af35 · 501586ea

Merge commit. Changes below are compared with the first parent: 4287af35.

Changes

72 files changed · +496 −968

FileStatusAddDelContent
Documentation/admin-guide/kernel-parameters.txtmodified+7−0View file
arch/arm/xen/enlighten.cmodified+0−1View file
arch/arm/xen/hypercall.Smodified+0−1View file
arch/arm64/xen/hypercall.Smodified+0−1View file
arch/x86/include/asm/paravirt_types.hmodified+2−0View file
arch/x86/include/asm/xen/hypercall.hmodified+102−131View file
arch/x86/include/asm/xen/hypervisor.hmodified+4−0View file
arch/x86/include/asm/xen/pci.hmodified+0−19View file
arch/x86/kernel/paravirt.cmodified+12−1View file
arch/x86/pci/xen.cmodified+1−75View file
arch/x86/xen/enlighten.cmodified+26−90View file
arch/x86/xen/enlighten_hvm.cmodified+3−3View file
arch/x86/xen/enlighten_pv.cmodified+5−30View file
arch/x86/xen/irq.cmodified+4−58View file
arch/x86/xen/mmu_pv.cmodified+37−15View file
arch/x86/xen/setup.cmodified+3−7View file
arch/x86/xen/smp.cmodified+0−28View file
arch/x86/xen/smp_pv.cmodified+0−2View file
arch/x86/xen/xen-head.Smodified+6−6View file
arch/x86/xen/xen-ops.hmodified+1−3View file
drivers/xen/Kconfigmodified+24−0View file
drivers/xen/Makefilemodified+1−1View file
drivers/xen/balloon.cmodified+78−35View file
drivers/xen/mem-reservation.cmodified+10−17View file
drivers/xen/pci.cmodified+76−0View file
drivers/xen/pvcalls-back.cmodified+0−1View file
drivers/xen/xen-acpi-processor.cmodified+3−3View file
drivers/xen/xen-pciback/Makefilemodified+7−0View file
drivers/xen/xen-pciback/conf_space_capability.cmodified+1−1View file
drivers/xen/xen-pciback/conf_space_header.cmodified+6−2View file
drivers/xen/xen-pciback/pci_stub.cmodified+2−1View file
drivers/xen/xen-pciback/pciback.hmodified+5−0View file
drivers/xen/xen-pciback/xenbus.cmodified+6−2View file
include/xen/arm/hypercall.hmodified+0−15View file
include/xen/balloon.hmodified+0−3View file
include/xen/interface/callback.hmodified+1−18View file
include/xen/interface/elfnote.hmodified+1−18View file
include/xen/interface/event_channel.hmodified+1−1View file
include/xen/interface/features.hmodified+1−1View file
include/xen/interface/grant_table.hmodified+1−18View file
include/xen/interface/hvm/dm_op.hmodified+1−18View file
include/xen/interface/hvm/hvm_op.hmodified+1−19View file
include/xen/interface/hvm/hvm_vcpu.hmodified+1−18View file
include/xen/interface/hvm/params.hmodified+1−19View file
include/xen/interface/hvm/start_info.hmodified+1−18View file
include/xen/interface/io/9pfs.hmodified+1−18View file
include/xen/interface/io/blkif.hmodified+1−1View file
include/xen/interface/io/console.hmodified+1−1View file
include/xen/interface/io/displif.hmodified+1−18View file
include/xen/interface/io/fbif.hmodified+1−18View file
include/xen/interface/io/kbdif.hmodified+1−18View file
include/xen/interface/io/netif.hmodified+1−18View file
include/xen/interface/io/pciif.hmodified+1−18View file
include/xen/interface/io/protocols.hmodified+1−1View file
include/xen/interface/io/pvcalls.hmodified+2−0View file
include/xen/interface/io/ring.hmodified+1−18View file
include/xen/interface/io/sndif.hmodified+1−18View file
include/xen/interface/io/vscsiif.hmodified+1−18View file
include/xen/interface/io/xenbus.hmodified+1−1View file
include/xen/interface/io/xs_wire.hmodified+1−1View file
include/xen/interface/memory.hmodified+1−1View file
include/xen/interface/nmi.hmodified+1−1View file
include/xen/interface/physdev.hmodified+1−19View file
include/xen/interface/platform.hmodified+1−18View file
include/xen/interface/sched.hmodified+1−18View file
include/xen/interface/vcpu.hmodified+1−18View file
include/xen/interface/version.hmodified+1−1View file
include/xen/interface/xen-mca.hmodified+1−0View file
include/xen/interface/xen.hmodified+1−18View file
include/xen/interface/xenpmu.hmodified+1−1View file
include/xen/pci.hadded+28−0View file
include/xen/xen.hmodified+0−6View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/admin-guide/kernel-parameters.txt

View file
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 0905d2c..f65b959 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -6379,6 +6379,13 @@
improve timer resolution at the expense of processing
more timer interrupts.
+ xen.balloon_boot_timeout= [XEN]
+ The time (in seconds) to wait before giving up to boot
+ in case initial ballooning fails to free enough memory.
+ Applies only when running as HVM or PVH guest and
+ started with less memory configured than allowed at
+ max. Default is 180.
+
xen.event_eoi_delay= [XEN]
How long to delay EOI handling in case of event
storms (jiffies). Default is 10.

arch/arm/xen/enlighten.c

View file
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
index 7f1c106..7619fbf 100644
--- a/arch/arm/xen/enlighten.c
+++ b/arch/arm/xen/enlighten.c
@@ -442,7 +442,6 @@ EXPORT_SYMBOL_GPL(HYPERVISOR_hvm_op);
EXPORT_SYMBOL_GPL(HYPERVISOR_memory_op);
EXPORT_SYMBOL_GPL(HYPERVISOR_physdev_op);
EXPORT_SYMBOL_GPL(HYPERVISOR_vcpu_op);
-EXPORT_SYMBOL_GPL(HYPERVISOR_tmem_op);
EXPORT_SYMBOL_GPL(HYPERVISOR_platform_op_raw);
EXPORT_SYMBOL_GPL(HYPERVISOR_multicall);
EXPORT_SYMBOL_GPL(HYPERVISOR_vm_assist);

arch/arm/xen/hypercall.S

View file
diff --git a/arch/arm/xen/hypercall.S b/arch/arm/xen/hypercall.S
index b11bba5..f794dac 100644
--- a/arch/arm/xen/hypercall.S
+++ b/arch/arm/xen/hypercall.S
@@ -88,7 +88,6 @@ HYPERCALL2(hvm_op);
HYPERCALL2(memory_op);
HYPERCALL2(physdev_op);
HYPERCALL3(vcpu_op);
-HYPERCALL1(tmem_op);
HYPERCALL1(platform_op_raw);
HYPERCALL2(multicall);
HYPERCALL2(vm_assist);

arch/arm64/xen/hypercall.S

View file
diff --git a/arch/arm64/xen/hypercall.S b/arch/arm64/xen/hypercall.S
index 5b09aca..9d01361 100644
--- a/arch/arm64/xen/hypercall.S
+++ b/arch/arm64/xen/hypercall.S
@@ -80,7 +80,6 @@ HYPERCALL2(hvm_op);
HYPERCALL2(memory_op);
HYPERCALL2(physdev_op);
HYPERCALL3(vcpu_op);
-HYPERCALL1(tmem_op);
HYPERCALL1(platform_op_raw);
HYPERCALL2(multicall);
HYPERCALL2(vm_assist);

arch/x86/include/asm/paravirt_types.h

View file
diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h
index d9d6b02..fc1151e 100644
--- a/arch/x86/include/asm/paravirt_types.h
+++ b/arch/x86/include/asm/paravirt_types.h
@@ -577,7 +577,9 @@ void paravirt_leave_lazy_mmu(void);
void paravirt_flush_lazy_mmu(void);
void _paravirt_nop(void);
+void paravirt_BUG(void);
u64 _paravirt_ident_64(u64);
+unsigned long paravirt_ret0(void);
#define paravirt_nop ((void *)_paravirt_nop)

arch/x86/include/asm/xen/hypercall.h

View file
diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen/hypercall.h
index 4a7ff8b..0575f58 100644
--- a/arch/x86/include/asm/xen/hypercall.h
+++ b/arch/x86/include/asm/xen/hypercall.h
@@ -248,6 +248,7 @@ privcmd_call(unsigned int call,
return res;
}
+#ifdef CONFIG_XEN_PV
static inline int
HYPERVISOR_set_trap_table(struct trap_info *table)
{
@@ -281,6 +282,107 @@ HYPERVISOR_callback_op(int cmd, void *arg)
}
static inline int
+HYPERVISOR_set_debugreg(int reg, unsigned long value)
+{
+ return _hypercall2(int, set_debugreg, reg, value);
+}
+
+static inline unsigned long
+HYPERVISOR_get_debugreg(int reg)
+{
+ return _hypercall1(unsigned long, get_debugreg, reg);
+}
+
+static inline int
+HYPERVISOR_update_descriptor(u64 ma, u64 desc)
+{
+ return _hypercall2(int, update_descriptor, ma, desc);
+}
+
+static inline int
+HYPERVISOR_update_va_mapping(unsigned long va, pte_t new_val,
+ unsigned long flags)
+{
+ return _hypercall3(int, update_va_mapping, va, new_val.pte, flags);
+}
+
+static inline int
+HYPERVISOR_set_segment_base(int reg, unsigned long value)
+{
+ return _hypercall2(int, set_segment_base, reg, value);
+}
+
+static inline void
+MULTI_fpu_taskswitch(struct multicall_entry *mcl, int set)
+{
+ mcl->op = __HYPERVISOR_fpu_taskswitch;
+ mcl->args[0] = set;
+
+ trace_xen_mc_entry(mcl, 1);
+}
+
+static inline void
+MULTI_update_va_mapping(struct multicall_entry *mcl, unsigned long va,
+ pte_t new_val, unsigned long flags)
+{
+ mcl->op = __HYPERVISOR_update_va_mapping;
+ mcl->args[0] = va;
+ mcl->args[1] = new_val.pte;
+ mcl->args[2] = flags;
+
+ trace_xen_mc_entry(mcl, 3);
+}
+
+static inline void
+MULTI_update_descriptor(struct multicall_entry *mcl, u64 maddr,
+ struct desc_struct desc)
+{
+ mcl->op = __HYPERVISOR_update_descriptor;
+ mcl->args[0] = maddr;
+ mcl->args[1] = *(unsigned long *)&desc;
+
+ trace_xen_mc_entry(mcl, 2);
+}
+
+static inline void
+MULTI_mmu_update(struct multicall_entry *mcl, struct mmu_update *req,
+ int count, int *success_count, domid_t domid)
+{
+ mcl->op = __HYPERVISOR_mmu_update;
+ mcl->args[0] = (unsigned long)req;
+ mcl->args[1] = count;
+ mcl->args[2] = (unsigned long)success_count;
+ mcl->args[3] = domid;
+
+ trace_xen_mc_entry(mcl, 4);
+}
+
+static inline void
+MULTI_mmuext_op(struct multicall_entry *mcl, struct mmuext_op *op, int count,
+ int *success_count, domid_t domid)
+{
+ mcl->op = __HYPERVISOR_mmuext_op;
+ mcl->args[0] = (unsigned long)op;
+ mcl->args[1] = count;
+ mcl->args[2] = (unsigned long)success_count;
+ mcl->args[3] = domid;
+
+ trace_xen_mc_entry(mcl, 4);
+}
+
+static inline void
+MULTI_stack_switch(struct multicall_entry *mcl,
+ unsigned long ss, unsigned long esp)
+{
+ mcl->op = __HYPERVISOR_stack_switch;
+ mcl->args[0] = ss;
+ mcl->args[1] = esp;
+
+ trace_xen_mc_entry(mcl, 2);
+}
+#endif
+
+static inline int
HYPERVISOR_sched_op(int cmd, void *arg)
{
return _hypercall2(int, sched_op, cmd, arg);
@@ -308,26 +410,6 @@ HYPERVISOR_platform_op(struct xen_platform_op *op)
return _hypercall1(int, platform_op, op);
}
-static __always_inline int
-HYPERVISOR_set_debugreg(int reg, unsigned long value)
-{
- return _hypercall2(int, set_debugreg, reg, value);
-}
-
-static __always_inline unsigned long
-HYPERVISOR_get_debugreg(int reg)
-{
- return _hypercall1(unsigned long, get_debugreg, reg);
-}
-
-static inline int
-HYPERVISOR_update_descriptor(u64 ma, u64 desc)
-{
- if (sizeof(u64) == sizeof(long))
- return _hypercall2(int, update_descriptor, ma, desc);
- return _hypercall4(int, update_descriptor, ma, ma>>32, desc, desc>>32);
-}
-
static inline long
HYPERVISOR_memory_op(unsigned int cmd, void *arg)
{
@@ -341,18 +423,6 @@ HYPERVISOR_multicall(void *call_list, uint32_t nr_calls)
}
static inline int
-HYPERVISOR_update_va_mapping(unsigned long va, pte_t new_val,
- unsigned long flags)
-{
- if (sizeof(new_val) == sizeof(long))
- return _hypercall3(int, update_va_mapping, va,
- new_val.pte, flags);
- else
- return _hypercall4(int, update_va_mapping, va,
- new_val.pte, new_val.pte >> 32, flags);
-}
-
-static inline int
HYPERVISOR_event_channel_op(int cmd, void *arg)
{
return _hypercall2(int, event_channel_op, cmd, arg);
@@ -394,14 +464,6 @@ HYPERVISOR_vcpu_op(int cmd, int vcpuid, void *extra_args)
return _hypercall3(int, vcpu_op, cmd, vcpuid, extra_args);
}
-#ifdef CONFIG_X86_64
-static inline int
-HYPERVISOR_set_segment_base(int reg, unsigned long value)
-{
- return _hypercall2(int, set_segment_base, reg, value);
-}
-#endif
-
static inline int
HYPERVISOR_suspend(unsigned long start_info_mfn)
{
@@ -423,13 +485,6 @@ HYPERVISOR_hvm_op(int op, void *arg)
}
static inline int
-HYPERVISOR_tmem_op(
- struct tmem_op *op)
-{
- return _hypercall1(int, tmem_op, op);
-}
-
-static inline int
HYPERVISOR_xenpmu_op(unsigned int op, void *arg)
{
return _hypercall2(int, xenpmu_op, op, arg);
@@ -446,88 +501,4 @@ HYPERVISOR_dm_op(
return ret;
}
-static inline void
-MULTI_fpu_taskswitch(struct multicall_entry *mcl, int set)
-{
- mcl->op = __HYPERVISOR_fpu_taskswitch;
- mcl->args[0] = set;
-
- trace_xen_mc_entry(mcl, 1);
-}
-
-static inline void
-MULTI_update_va_mapping(struct multicall_entry *mcl, unsigned long va,
- pte_t new_val, unsigned long flags)
-{
- mcl->op = __HYPERVISOR_update_va_mapping;
- mcl->args[0] = va;
- if (sizeof(new_val) == sizeof(long)) {
- mcl->args[1] = new_val.pte;
- mcl->args[2] = flags;
- } else {
- mcl->args[1] = new_val.pte;
- mcl->args[2] = new_val.pte >> 32;
- mcl->args[3] = flags;
- }
-
- trace_xen_mc_entry(mcl, sizeof(new_val) == sizeof(long) ? 3 : 4);
-}
-
-static inline void
-MULTI_update_descriptor(struct multicall_entry *mcl, u64 maddr,
- struct desc_struct desc)
-{
- mcl->op = __HYPERVISOR_update_descriptor;
- if (sizeof(maddr) == sizeof(long)) {
- mcl->args[0] = maddr;
- mcl->args[1] = *(unsigned long *)&desc;
- } else {
- u32 *p = (u32 *)&desc;
-
- mcl->args[0] = maddr;
- mcl->args[1] = maddr >> 32;
- mcl->args[2] = *p++;
- mcl->args[3] = *p;
- }
-
- trace_xen_mc_entry(mcl, sizeof(maddr) == sizeof(long) ? 2 : 4);
-}
-
-static inline void
-MULTI_mmu_update(struct multicall_entry *mcl, struct mmu_update *req,
- int count, int *success_count, domid_t domid)
-{
- mcl->op = __HYPERVISOR_mmu_update;
- mcl->args[0] = (unsigned long)req;
- mcl->args[1] = count;
- mcl->args[2] = (unsigned long)success_count;
- mcl->args[3] = domid;
-
- trace_xen_mc_entry(mcl, 4);
-}
-
-static inline void
-MULTI_mmuext_op(struct multicall_entry *mcl, struct mmuext_op *op, int count,
- int *success_count, domid_t domid)
-{
- mcl->op = __HYPERVISOR_mmuext_op;
- mcl->args[0] = (unsigned long)op;
- mcl->args[1] = count;
- mcl->args[2] = (unsigned long)success_count;
- mcl->args[3] = domid;
-
- trace_xen_mc_entry(mcl, 4);
-}
-
-static inline void
-MULTI_stack_switch(struct multicall_entry *mcl,
- unsigned long ss, unsigned long esp)
-{
- mcl->op = __HYPERVISOR_stack_switch;
- mcl->args[0] = ss;
- mcl->args[1] = esp;
-
- trace_xen_mc_entry(mcl, 2);
-}
-
#endif /* _ASM_X86_XEN_HYPERCALL_H */

arch/x86/include/asm/xen/hypervisor.h

View file
diff --git a/arch/x86/include/asm/xen/hypervisor.h b/arch/x86/include/asm/xen/hypervisor.h
index ff4b52e..4957f59 100644
--- a/arch/x86/include/asm/xen/hypervisor.h
+++ b/arch/x86/include/asm/xen/hypervisor.h
@@ -62,4 +62,8 @@ void xen_arch_register_cpu(int num);
void xen_arch_unregister_cpu(int num);
#endif
+#ifdef CONFIG_PVH
+void __init xen_pvh_init(struct boot_params *boot_params);
+#endif
+
#endif /* _ASM_X86_XEN_HYPERVISOR_H */

arch/x86/include/asm/xen/pci.h

View file
diff --git a/arch/x86/include/asm/xen/pci.h b/arch/x86/include/asm/xen/pci.h
index 4557f7c..9015b88 100644
--- a/arch/x86/include/asm/xen/pci.h
+++ b/arch/x86/include/asm/xen/pci.h
@@ -22,25 +22,6 @@ static inline int __init pci_xen_initial_domain(void)
return -1;
}
#endif
-#ifdef CONFIG_XEN_DOM0
-int xen_find_device_domain_owner(struct pci_dev *dev);
-int xen_register_device_domain_owner(struct pci_dev *dev, uint16_t domain);
-int xen_unregister_device_domain_owner(struct pci_dev *dev);
-#else
-static inline int xen_find_device_domain_owner(struct pci_dev *dev)
-{
- return -1;
-}
-static inline int xen_register_device_domain_owner(struct pci_dev *dev,
- uint16_t domain)
-{
- return -1;
-}
-static inline int xen_unregister_device_domain_owner(struct pci_dev *dev)
-{
- return -1;
-}
-#endif
#if defined(CONFIG_PCI_MSI)
#if defined(CONFIG_PCI_XEN)

arch/x86/kernel/paravirt.c

View file
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
index ebc4536..7157c2d 100644
--- a/arch/x86/kernel/paravirt.c
+++ b/arch/x86/kernel/paravirt.c
@@ -46,6 +46,17 @@ asm (".pushsection .entry.text, \"ax\"\n"
".type _paravirt_nop, @function\n\t"
".popsection");
+/* stub always returning 0. */
+asm (".pushsection .entry.text, \"ax\"\n"
+ ".global paravirt_ret0\n"
+ "paravirt_ret0:\n\t"
+ "xor %" _ASM_AX ", %" _ASM_AX ";\n\t"
+ "ret\n\t"
+ ".size paravirt_ret0, . - paravirt_ret0\n\t"
+ ".type paravirt_ret0, @function\n\t"
+ ".popsection");
+
+
void __init default_banner(void)
{
printk(KERN_INFO "Booting paravirtualized kernel on %s\n",
@@ -53,7 +64,7 @@ void __init default_banner(void)
}
/* Undefined instruction for dealing with missing ops pointers. */
-static void paravirt_BUG(void)
+noinstr void paravirt_BUG(void)
{
BUG();
}

arch/x86/pci/xen.c

View file
diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
index 5debe4a..12da005 100644
--- a/arch/x86/pci/xen.c
+++ b/arch/x86/pci/xen.c
@@ -23,6 +23,7 @@
#include <xen/features.h>
#include <xen/events.h>
+#include <xen/pci.h>
#include <asm/xen/pci.h>
#include <asm/xen/cpuid.h>
#include <asm/apic.h>
@@ -585,78 +586,3 @@ int __init pci_xen_initial_domain(void)
}
#endif
-#ifdef CONFIG_XEN_DOM0
-
-struct xen_device_domain_owner {
- domid_t domain;
- struct pci_dev *dev;
- struct list_head list;
-};
-
-static DEFINE_SPINLOCK(dev_domain_list_spinlock);
-static struct list_head dev_domain_list = LIST_HEAD_INIT(dev_domain_list);
-
-static struct xen_device_domain_owner *find_device(struct pci_dev *dev)
-{
- struct xen_device_domain_owner *owner;
-
- list_for_each_entry(owner, &dev_domain_list, list) {
- if (owner->dev == dev)
- return owner;
- }
- return NULL;
-}
-
-int xen_find_device_domain_owner(struct pci_dev *dev)
-{
- struct xen_device_domain_owner *owner;
- int domain = -ENODEV;
-
- spin_lock(&dev_domain_list_spinlock);
- owner = find_device(dev);
- if (owner)
- domain = owner->domain;
- spin_unlock(&dev_domain_list_spinlock);
- return domain;
-}
-EXPORT_SYMBOL_GPL(xen_find_device_domain_owner);
-
-int xen_register_device_domain_owner(struct pci_dev *dev, uint16_t domain)
-{
- struct xen_device_domain_owner *owner;
-
- owner = kzalloc(sizeof(struct xen_device_domain_owner), GFP_KERNEL);
- if (!owner)
- return -ENODEV;
-
- spin_lock(&dev_domain_list_spinlock);
- if (find_device(dev)) {
- spin_unlock(&dev_domain_list_spinlock);
- kfree(owner);
- return -EEXIST;
- }
- owner->domain = domain;
- owner->dev = dev;
- list_add_tail(&owner->list, &dev_domain_list);
- spin_unlock(&dev_domain_list_spinlock);
- return 0;
-}
-EXPORT_SYMBOL_GPL(xen_register_device_domain_owner);
-
-int xen_unregister_device_domain_owner(struct pci_dev *dev)
-{
- struct xen_device_domain_owner *owner;
-
- spin_lock(&dev_domain_list_spinlock);
- owner = find_device(dev);
- if (!owner) {
- spin_unlock(&dev_domain_list_spinlock);
- return -ENODEV;
- }
- list_del(&owner->list);
- spin_unlock(&dev_domain_list_spinlock);
- kfree(owner);
- return 0;
-}
-EXPORT_SYMBOL_GPL(xen_unregister_device_domain_owner);
-#endif /* CONFIG_XEN_DOM0 */

arch/x86/xen/enlighten.c

View file
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 95d9703..30c6e98 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -31,25 +31,10 @@ EXPORT_SYMBOL_GPL(hypercall_page);
* Pointer to the xen_vcpu_info structure or
* &HYPERVISOR_shared_info->vcpu_info[cpu]. See xen_hvm_init_shared_info
* and xen_vcpu_setup for details. By default it points to share_info->vcpu_info
- * but if the hypervisor supports VCPUOP_register_vcpu_info then it can point
- * to xen_vcpu_info. The pointer is used in __xen_evtchn_do_upcall to
- * acknowledge pending events.
- * Also more subtly it is used by the patched version of irq enable/disable
- * e.g. xen_irq_enable_direct and xen_iret in PV mode.
- *
- * The desire to be able to do those mask/unmask operations as a single
- * instruction by using the per-cpu offset held in %gs is the real reason
- * vcpu info is in a per-cpu pointer and the original reason for this
- * hypercall.
- *
+ * but during boot it is switched to point to xen_vcpu_info.
+ * The pointer is used in __xen_evtchn_do_upcall to acknowledge pending events.
*/
DEFINE_PER_CPU(struct vcpu_info *, xen_vcpu);
-
-/*
- * Per CPU pages used if hypervisor supports VCPUOP_register_vcpu_info
- * hypercall. This can be used both in PV and PVHVM mode. The structure
- * overrides the default per_cpu(xen_vcpu, cpu) value.
- */
DEFINE_PER_CPU(struct vcpu_info, xen_vcpu_info);
/* Linux <-> Xen vCPU id mapping */
@@ -84,21 +69,6 @@ EXPORT_SYMBOL(xen_start_flags);
*/
struct shared_info *HYPERVISOR_shared_info = &xen_dummy_shared_info;
-/*
- * Flag to determine whether vcpu info placement is available on all
- * VCPUs. We assume it is to start with, and then set it to zero on
- * the first failure. This is because it can succeed on some VCPUs
- * and not others, since it can involve hypervisor memory allocation,
- * or because the guest failed to guarantee all the appropriate
- * constraints on all VCPUs (ie buffer can't cross a page boundary).
- *
- * Note that any particular CPU may be using a placed vcpu structure,
- * but we can only optimise if the all are.
- *
- * 0: not available, 1: available
- */
-int xen_have_vcpu_info_placement = 1;
-
static int xen_cpu_up_online(unsigned int cpu)
{
xen_init_lock_cpu(cpu);
@@ -124,10 +94,8 @@ int xen_cpuhp_setup(int (*cpu_up_prepare_cb)(unsigned int),
return rc >= 0 ? 0 : rc;
}
-static int xen_vcpu_setup_restore(int cpu)
+static void xen_vcpu_setup_restore(int cpu)
{
- int rc = 0;
-
/* Any per_cpu(xen_vcpu) is stale, so reset it */
xen_vcpu_info_reset(cpu);
@@ -136,11 +104,8 @@ static int xen_vcpu_setup_restore(int cpu)
* be handled by hotplug.
*/
if (xen_pv_domain() ||
- (xen_hvm_domain() && cpu_online(cpu))) {
- rc = xen_vcpu_setup(cpu);
- }
-
- return rc;
+ (xen_hvm_domain() && cpu_online(cpu)))
+ xen_vcpu_setup(cpu);
}
/*
@@ -150,7 +115,7 @@ static int xen_vcpu_setup_restore(int cpu)
*/
void xen_vcpu_restore(void)

This diff is incomplete. Download the complete patch.

arch/x86/xen/enlighten_hvm.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/xen/enlighten_pv.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/xen/irq.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/xen/mmu_pv.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/xen/setup.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/xen/smp.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/xen/smp_pv.c

View file

This diff is incomplete. Download the complete patch.

arch/x86/xen/xen-head.S

View file

This diff is incomplete. Download the complete patch.

arch/x86/xen/xen-ops.h

View file

This diff is incomplete. Download the complete patch.

drivers/xen/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/xen/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/xen/balloon.c

View file

This diff is incomplete. Download the complete patch.

drivers/xen/mem-reservation.c

View file

This diff is incomplete. Download the complete patch.

drivers/xen/pci.c

View file

This diff is incomplete. Download the complete patch.

drivers/xen/pvcalls-back.c

View file

This diff is incomplete. Download the complete patch.

drivers/xen/xen-acpi-processor.c

View file

This diff is incomplete. Download the complete patch.

drivers/xen/xen-pciback/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/xen/xen-pciback/conf_space_capability.c

View file

This diff is incomplete. Download the complete patch.

drivers/xen/xen-pciback/conf_space_header.c

View file

This diff is incomplete. Download the complete patch.

drivers/xen/xen-pciback/pci_stub.c

View file

This diff is incomplete. Download the complete patch.

drivers/xen/xen-pciback/pciback.h

View file

This diff is incomplete. Download the complete patch.

drivers/xen/xen-pciback/xenbus.c

View file

This diff is incomplete. Download the complete patch.

include/xen/arm/hypercall.h

View file

This diff is incomplete. Download the complete patch.

include/xen/balloon.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/callback.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/elfnote.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/event_channel.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/features.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/grant_table.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/hvm/dm_op.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/hvm/hvm_op.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/hvm/hvm_vcpu.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/hvm/params.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/hvm/start_info.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/io/9pfs.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/io/blkif.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/io/console.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/io/displif.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/io/fbif.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/io/kbdif.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/io/netif.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/io/pciif.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/io/protocols.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/io/pvcalls.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/io/ring.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/io/sndif.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/io/vscsiif.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/io/xenbus.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/io/xs_wire.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/memory.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/nmi.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/physdev.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/platform.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/sched.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/vcpu.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/version.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/xen-mca.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/xen.h

View file

This diff is incomplete. Download the complete patch.

include/xen/interface/xenpmu.h

View file

This diff is incomplete. Download the complete patch.

include/xen/pci.h

View file

This diff is incomplete. Download the complete patch.

include/xen/xen.h

View file

This diff is incomplete. Download the complete patch.