Home Home > GIT Browse > vanilla
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2009-11-06 14:41:36 +0100
committerMichal Marek <mmarek@suse.cz>2009-11-06 14:41:36 +0100
commitdea5febbf92abbadc4334dcf0c2adbf9dfa4ad45 (patch)
tree0a972e83b9431f76f891b647eb7fabe0ee7915d4
parent2475c35587720761bdcf8990003157fc3328066b (diff)
parent030f428e33f9b3c03e5c5c8e7999c42b17205808 (diff)
Merge branch 'master' into SLE11-SP1rpm-2.6.32-0.4
-rw-r--r--arch/ia64/include/asm/xen/interface.h2
-rw-r--r--arch/x86/ia32/ia32entry-xen.S5
-rw-r--r--arch/x86/include/asm/uv/uv_hub.h2
-rw-r--r--arch/x86/include/asm/xen/interface.h13
-rw-r--r--arch/x86/include/asm/xen/interface_32.h2
-rw-r--r--arch/x86/include/asm/xen/interface_64.h2
-rw-r--r--arch/x86/include/mach-xen/asm/mmu_context.h5
-rw-r--r--arch/x86/include/mach-xen/asm/setup.h4
-rw-r--r--arch/x86/kernel/Makefile1
-rw-r--r--arch/x86/kernel/head32-xen.c5
-rw-r--r--arch/x86/kernel/irq-xen.c6
-rw-r--r--arch/x86/kernel/pci-dma-xen.c2
-rw-r--r--arch/x86/kernel/probe_roms_32.c5
-rw-r--r--arch/x86/kernel/setup-xen.c5
-rw-r--r--arch/x86/kernel/smp-xen.c1
-rw-r--r--arch/x86/kernel/time-xen.c3
-rw-r--r--arch/x86/mm/hypervisor.c17
-rw-r--r--arch/x86/mm/init_64-xen.c3
-rw-r--r--arch/x86/mm/pgtable-xen.c2
-rw-r--r--arch/x86/pci/pcifront.c2
-rw-r--r--drivers/firmware/dmi_scan.c5
-rw-r--r--drivers/net/Kconfig2
-rw-r--r--drivers/xen/Kconfig9
-rw-r--r--drivers/xen/blkfront/vcd.c2
-rw-r--r--drivers/xen/blktap2/blktap.h1
-rw-r--r--drivers/xen/blktap2/device.c33
-rw-r--r--drivers/xen/core/Makefile4
-rw-r--r--drivers/xen/core/domctl.c13
-rw-r--r--drivers/xen/core/evtchn.c1
-rw-r--r--drivers/xen/features.c5
-rw-r--r--drivers/xen/usbback/usbback.c32
-rw-r--r--drivers/xen/usbback/xenbus.c4
-rw-r--r--drivers/xen/xenbus/xenbus_xs.c57
-rw-r--r--include/xen/interface/arch-x86/xen.h2
-rw-r--r--include/xen/interface/event_channel.h2
-rw-r--r--include/xen/interface/grant_table.h14
-rw-r--r--include/xen/interface/memory.h6
-rw-r--r--include/xen/interface/sched.h4
-rw-r--r--include/xen/interface/vcpu.h8
-rw-r--r--include/xen/interface/xen.h6
40 files changed, 177 insertions, 120 deletions
diff --git a/arch/ia64/include/asm/xen/interface.h b/arch/ia64/include/asm/xen/interface.h
index 6b45ef54ae80..34fbebeba1e9 100644
--- a/arch/ia64/include/asm/xen/interface.h
+++ b/arch/ia64/include/asm/xen/interface.h
@@ -59,7 +59,7 @@
#define __DEFINE_XEN_GUEST_HANDLE(name, type) \
typedef struct { type *p; } __guest_handle_ ## name
-#define DEFINE_XEN_GUEST_HANDLE_STRUCT(name) \
+#define DEFINE_GUEST_HANDLE_STRUCT(name) \
__DEFINE_XEN_GUEST_HANDLE(name, struct name)
#define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name)
#define XEN_GUEST_HANDLE(name) __guest_handle_ ## name
diff --git a/arch/x86/ia32/ia32entry-xen.S b/arch/x86/ia32/ia32entry-xen.S
index 21c1fcf73d1f..73f28cb2a55a 100644
--- a/arch/x86/ia32/ia32entry-xen.S
+++ b/arch/x86/ia32/ia32entry-xen.S
@@ -175,7 +175,7 @@ sysenter_dispatch:
movl RDI-ARGOFFSET(%rsp),%r8d /* reload 5th syscall arg */
.endm
- .macro auditsys_exit exit,ebpsave=RBP
+ .macro auditsys_exit exit
testl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),TI_flags(%r10)
jnz ia32_ret_from_sys_call
TRACE_IRQS_ON
@@ -186,7 +186,6 @@ sysenter_dispatch:
movzbl %al,%edi /* zero-extend that into %edi */
inc %edi /* first arg, 0->1(AUDITSC_SUCCESS), 1->2(AUDITSC_FAILURE) */
call audit_syscall_exit
- movl \ebpsave-ARGOFFSET(%rsp),%ebp /* reload user register value */
movl $(_TIF_ALLWORK_MASK & ~_TIF_SYSCALL_AUDIT),%edi
CLEAR_RREGS -ARGOFFSET
DISABLE_INTERRUPTS(CLBR_NONE)
@@ -290,7 +289,7 @@ cstar_auditsys:
jmp cstar_dispatch
sysretl_audit:
- auditsys_exit sysretl_from_sys_call, RCX /* user %ebp in RCX slot */
+ auditsys_exit sysretl_from_sys_call
#endif
cstar_tracesys:
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h
index d1414af98559..bb90086c3622 100644
--- a/arch/x86/include/asm/uv/uv_hub.h
+++ b/arch/x86/include/asm/uv/uv_hub.h
@@ -11,7 +11,7 @@
#ifndef _ASM_X86_UV_UV_HUB_H
#define _ASM_X86_UV_UV_HUB_H
-#ifdef CONFIG_X86_64
+#ifdef CONFIG_X86_UV
#include <linux/numa.h>
#include <linux/percpu.h>
#include <linux/timer.h>
diff --git a/arch/x86/include/asm/xen/interface.h b/arch/x86/include/asm/xen/interface.h
index ae2b0ab53afe..a37497992755 100644
--- a/arch/x86/include/asm/xen/interface.h
+++ b/arch/x86/include/asm/xen/interface.h
@@ -10,14 +10,17 @@
#define _ASM_X86_XEN_INTERFACE_H
#ifdef __XEN__
-#define __DEFINE_XEN_GUEST_HANDLE(name, type) \
+#define ___DEFINE_XEN_GUEST_HANDLE(name, type) \
typedef struct { type *p; } __guest_handle_ ## name
#else
-#define __DEFINE_XEN_GUEST_HANDLE(name, type) \
+#define ___DEFINE_XEN_GUEST_HANDLE(name, type) \
typedef type * __guest_handle_ ## name
#endif
-#define DEFINE_XEN_GUEST_HANDLE_STRUCT(name) \
+#define __DEFINE_XEN_GUEST_HANDLE(name, type) \
+ ___DEFINE_XEN_GUEST_HANDLE(name, type); \
+ ___DEFINE_XEN_GUEST_HANDLE(const_##name, const type)
+#define DEFINE_GUEST_HANDLE_STRUCT(name) \
__DEFINE_XEN_GUEST_HANDLE(name, struct name)
#define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name)
#define XEN_GUEST_HANDLE(name) __guest_handle_ ## name
@@ -97,7 +100,7 @@ struct trap_info {
uint16_t cs; /* code selector */
unsigned long address; /* code offset */
};
-DEFINE_XEN_GUEST_HANDLE_STRUCT(trap_info);
+DEFINE_GUEST_HANDLE_STRUCT(trap_info);
struct arch_shared_info {
unsigned long max_pfn; /* max pfn that appears in table */
@@ -151,7 +154,7 @@ struct vcpu_guest_context {
uint64_t gs_base_user;
#endif
};
-DEFINE_XEN_GUEST_HANDLE_STRUCT(vcpu_guest_context);
+DEFINE_GUEST_HANDLE_STRUCT(vcpu_guest_context);
#endif /* !__ASSEMBLY__ */
/*
diff --git a/arch/x86/include/asm/xen/interface_32.h b/arch/x86/include/asm/xen/interface_32.h
index ce655327d60f..42a7e004ae5c 100644
--- a/arch/x86/include/asm/xen/interface_32.h
+++ b/arch/x86/include/asm/xen/interface_32.h
@@ -62,7 +62,7 @@ struct cpu_user_regs {
uint16_t fs, _pad4;
uint16_t gs, _pad5;
};
-DEFINE_XEN_GUEST_HANDLE_STRUCT(cpu_user_regs);
+DEFINE_GUEST_HANDLE_STRUCT(cpu_user_regs);
typedef uint64_t tsc_timestamp_t; /* RDTSC timestamp */
diff --git a/arch/x86/include/asm/xen/interface_64.h b/arch/x86/include/asm/xen/interface_64.h
index 26a645d45b77..100d2662b97c 100644
--- a/arch/x86/include/asm/xen/interface_64.h
+++ b/arch/x86/include/asm/xen/interface_64.h
@@ -136,7 +136,7 @@ struct cpu_user_regs {
uint16_t fs, _pad5[3]; /* Non-zero => takes precedence over fs_base. */
uint16_t gs, _pad6[3]; /* Non-zero => takes precedence over gs_base_usr. */
};
-DEFINE_XEN_GUEST_HANDLE_STRUCT(cpu_user_regs);
+DEFINE_GUEST_HANDLE_STRUCT(cpu_user_regs);
#undef __DECL_REG
diff --git a/arch/x86/include/mach-xen/asm/mmu_context.h b/arch/x86/include/mach-xen/asm/mmu_context.h
index 4075a1923d1b..f7386add1961 100644
--- a/arch/x86/include/mach-xen/asm/mmu_context.h
+++ b/arch/x86/include/mach-xen/asm/mmu_context.h
@@ -100,15 +100,14 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
/* Re-load page tables: load_cr3(next->pgd) */
op->cmd = MMUEXT_NEW_BASEPTR;
- op->arg1.mfn = pfn_to_mfn(__pa(next->pgd) >> PAGE_SHIFT);
+ op->arg1.mfn = virt_to_mfn(next->pgd);
op++;
/* xen_new_user_pt(next->pgd) */
#ifdef CONFIG_X86_64
op->cmd = MMUEXT_NEW_USER_BASEPTR;
upgd = __user_pgd(next->pgd);
- op->arg1.mfn = likely(upgd)
- ? pfn_to_mfn(__pa(upgd) >> PAGE_SHIFT) : 0;
+ op->arg1.mfn = likely(upgd) ? virt_to_mfn(upgd) : 0;
op++;
#endif
diff --git a/arch/x86/include/mach-xen/asm/setup.h b/arch/x86/include/mach-xen/asm/setup.h
index bc5f2d4607c4..722ad0598e13 100644
--- a/arch/x86/include/mach-xen/asm/setup.h
+++ b/arch/x86/include/mach-xen/asm/setup.h
@@ -1,4 +1,8 @@
+#ifndef __ASSEMBLY__
+
void xen_start_kernel(void);
void xen_arch_setup(void);
+#endif
+
#include_next <asm/setup.h>
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 0577ffe7d43f..da0bd98c52bb 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -137,3 +137,4 @@ endif
disabled-obj-$(CONFIG_XEN) := %_uv.o crash.o early-quirks.o hpet.o i8253.o \
i8259.o irqinit.o pci-swiotlb.o reboot.o smpboot.o tsc.o tsc_sync.o \
uv_%.o vsmp_64.o
+disabled-obj-$(CONFIG_XEN_UNPRIVILEGED_GUEST) += probe_roms_32.o
diff --git a/arch/x86/kernel/head32-xen.c b/arch/x86/kernel/head32-xen.c
index f99f076bb231..3375abf32845 100644
--- a/arch/x86/kernel/head32-xen.c
+++ b/arch/x86/kernel/head32-xen.c
@@ -19,8 +19,9 @@
static void __init i386_default_early_setup(void)
{
- /* Initilize 32bit specific setup functions */
- x86_init.resources.probe_roms = probe_roms;
+ /* Initialize 32bit specific setup functions */
+ if (is_initial_xendomain())
+ x86_init.resources.probe_roms = probe_roms;
x86_init.resources.reserve_resources = i386_reserve_resources;
#ifndef CONFIG_XEN
x86_init.mpparse.setup_ioapic_ids = setup_ioapic_ids_from_mpc;
diff --git a/arch/x86/kernel/irq-xen.c b/arch/x86/kernel/irq-xen.c
index 7df966484e95..cc776472f20f 100644
--- a/arch/x86/kernel/irq-xen.c
+++ b/arch/x86/kernel/irq-xen.c
@@ -67,10 +67,10 @@ static int show_other_interrupts(struct seq_file *p, int prec)
for_each_online_cpu(j)
seq_printf(p, "%10u ", irq_stats(j)->irq_spurious_count);
seq_printf(p, " Spurious interrupts\n");
- seq_printf(p, "%*s: ", prec, "CNT");
+ seq_printf(p, "%*s: ", prec, "PMI");
for_each_online_cpu(j)
seq_printf(p, "%10u ", irq_stats(j)->apic_perf_irqs);
- seq_printf(p, " Performance counter interrupts\n");
+ seq_printf(p, " Performance monitoring interrupts\n");
seq_printf(p, "%*s: ", prec, "PND");
for_each_online_cpu(j)
seq_printf(p, "%10u ", irq_stats(j)->apic_pending_irqs);
@@ -259,7 +259,6 @@ unsigned int __irq_entry do_IRQ(struct pt_regs *regs)
__func__, smp_processor_id(), vector, irq);
}
- run_local_timers();
irq_exit();
set_irq_regs(old_regs);
@@ -284,7 +283,6 @@ void smp_generic_interrupt(struct pt_regs *regs)
if (generic_interrupt_extension)
generic_interrupt_extension();
- run_local_timers();
irq_exit();
set_irq_regs(old_regs);
diff --git a/arch/x86/kernel/pci-dma-xen.c b/arch/x86/kernel/pci-dma-xen.c
index 5d60dbd64824..b78b8bad3395 100644
--- a/arch/x86/kernel/pci-dma-xen.c
+++ b/arch/x86/kernel/pci-dma-xen.c
@@ -392,7 +392,7 @@ void pci_iommu_shutdown(void)
amd_iommu_shutdown();
}
/* Must execute after PCI subsystem */
-fs_initcall(pci_iommu_init);
+rootfs_initcall(pci_iommu_init);
#ifdef CONFIG_PCI
/* Many VIA bridges seem to corrupt data for DAC. Disable it here */
diff --git a/arch/x86/kernel/probe_roms_32.c b/arch/x86/kernel/probe_roms_32.c
index e88e267ed70c..3ff078186a0c 100644
--- a/arch/x86/kernel/probe_roms_32.c
+++ b/arch/x86/kernel/probe_roms_32.c
@@ -99,11 +99,6 @@ void __init probe_roms(void)
unsigned char c;
int i;
-#ifdef CONFIG_XEN
- if (!is_initial_xendomain())
- return;
-#endif
-
/* video rom */
upper = adapter_rom_resources[0].start;
for (start = video_rom_resource.start; start < upper; start += 2048) {
diff --git a/arch/x86/kernel/setup-xen.c b/arch/x86/kernel/setup-xen.c
index b75bb18b2650..591d35a0e1e7 100644
--- a/arch/x86/kernel/setup-xen.c
+++ b/arch/x86/kernel/setup-xen.c
@@ -929,10 +929,11 @@ void __init setup_arch(char **cmdline_p)
if (efi_enabled)
efi_init();
- if (is_initial_xendomain())
+ if (is_initial_xendomain()) {
dmi_scan_machine();
- dmi_check_system(bad_bios_dmi_table);
+ dmi_check_system(bad_bios_dmi_table);
+ }
/*
* VMware detection requires dmi to be available, so this
diff --git a/arch/x86/kernel/smp-xen.c b/arch/x86/kernel/smp-xen.c
index c69aa2a4d753..70c0436f8cd6 100644
--- a/arch/x86/kernel/smp-xen.c
+++ b/arch/x86/kernel/smp-xen.c
@@ -180,7 +180,6 @@ void xen_smp_send_stop(void)
irqreturn_t smp_reschedule_interrupt(int irq, void *dev_id)
{
inc_irq_stat(irq_resched_count);
- run_local_timers();
return IRQ_HANDLED;
}
diff --git a/arch/x86/kernel/time-xen.c b/arch/x86/kernel/time-xen.c
index 63f3cf0cd75f..7bab3e4527b1 100644
--- a/arch/x86/kernel/time-xen.c
+++ b/arch/x86/kernel/time-xen.c
@@ -389,7 +389,8 @@ unsigned long profile_pc(struct pt_regs *regs)
#ifdef CONFIG_FRAME_POINTER
return *(unsigned long *)(regs->bp + sizeof(long));
#else
- unsigned long *sp = (unsigned long *)kernel_stack_pointer(regs);
+ unsigned long *sp =
+ (unsigned long *)kernel_stack_pointer(regs);
/*
* Return address is either directly at stack pointer
diff --git a/arch/x86/mm/hypervisor.c b/arch/x86/mm/hypervisor.c
index 662a3e4f9bff..9dc3a9afa21b 100644
--- a/arch/x86/mm/hypervisor.c
+++ b/arch/x86/mm/hypervisor.c
@@ -525,8 +525,9 @@ void xen_l4_entry_update(pgd_t *ptr, pgd_t val)
u[0].ptr = virt_to_machine(ptr);
u[0].val = __pgd_val(val);
if (((unsigned long)ptr & ~PAGE_MASK)
- < pgd_index(__HYPERVISOR_VIRT_START) * sizeof(*ptr)
- && (ptr = __user_pgd(ptr)) != NULL) {
+ <= pgd_index(TASK_SIZE_MAX) * sizeof(*ptr)) {
+ ptr = __user_pgd(ptr);
+ BUG_ON(!ptr);
u[1].ptr = virt_to_machine(ptr);
u[1].val = __pgd_val(val);
do_lN_entry_update(u, 2, page);
@@ -540,7 +541,7 @@ void xen_pt_switch(pgd_t *pgd)
{
struct mmuext_op op;
op.cmd = MMUEXT_NEW_BASEPTR;
- op.arg1.mfn = pfn_to_mfn(__pa(pgd) >> PAGE_SHIFT);
+ op.arg1.mfn = virt_to_mfn(pgd);
BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
}
@@ -550,7 +551,7 @@ void xen_new_user_pt(pgd_t *pgd)
pgd = __user_pgd(pgd);
op.cmd = MMUEXT_NEW_USER_BASEPTR;
- op.arg1.mfn = pgd ? pfn_to_mfn(__pa(pgd) >> PAGE_SHIFT) : 0;
+ op.arg1.mfn = pgd ? virt_to_mfn(pgd) : 0;
BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
}
#endif
@@ -628,12 +629,12 @@ void xen_pgd_pin(pgd_t *pgd)
unsigned int nr = NR_PGD_PIN_OPS;
op[0].cmd = MMUEXT_PIN_L3_TABLE;
- op[0].arg1.mfn = pfn_to_mfn(__pa(pgd) >> PAGE_SHIFT);
+ op[0].arg1.mfn = virt_to_mfn(pgd);
#ifdef CONFIG_X86_64
op[1].cmd = op[0].cmd = MMUEXT_PIN_L4_TABLE;
pgd = __user_pgd(pgd);
if (pgd)
- op[1].arg1.mfn = pfn_to_mfn(__pa(pgd) >> PAGE_SHIFT);
+ op[1].arg1.mfn = virt_to_mfn(pgd);
else
nr = 1;
#endif
@@ -647,12 +648,12 @@ void xen_pgd_unpin(pgd_t *pgd)
unsigned int nr = NR_PGD_PIN_OPS;
op[0].cmd = MMUEXT_UNPIN_TABLE;
- op[0].arg1.mfn = pfn_to_mfn(__pa(pgd) >> PAGE_SHIFT);
+ op[0].arg1.mfn = virt_to_mfn(pgd);
#ifdef CONFIG_X86_64
pgd = __user_pgd(pgd);
if (pgd) {
op[1].cmd = MMUEXT_UNPIN_TABLE;
- op[1].arg1.mfn = pfn_to_mfn(__pa(pgd) >> PAGE_SHIFT);
+ op[1].arg1.mfn = virt_to_mfn(pgd);
} else
nr = 1;
#endif
diff --git a/arch/x86/mm/init_64-xen.c b/arch/x86/mm/init_64-xen.c
index 101538cf01fa..35ca78a60406 100644
--- a/arch/x86/mm/init_64-xen.c
+++ b/arch/x86/mm/init_64-xen.c
@@ -796,8 +796,7 @@ void __init xen_finish_init_mapping(void)
/* Unpin the no longer used Xen provided page tables. */
mmuext.cmd = MMUEXT_UNPIN_TABLE;
- mmuext.arg1.mfn = pfn_to_mfn(__pa(xen_start_info->pt_base)
- >> PAGE_SHIFT);
+ mmuext.arg1.mfn = virt_to_mfn(xen_start_info->pt_base);
if (HYPERVISOR_mmuext_op(&mmuext, 1, NULL, DOMID_SELF))
BUG();
diff --git a/arch/x86/mm/pgtable-xen.c b/arch/x86/mm/pgtable-xen.c
index 480f7d69e8c7..56327d030b55 100644
--- a/arch/x86/mm/pgtable-xen.c
+++ b/arch/x86/mm/pgtable-xen.c
@@ -129,7 +129,7 @@ void ___pud_free_tlb(struct mmu_gather *tlb, pud_t *pud)
static void _pin_lock(struct mm_struct *mm, int lock) {
if (lock)
spin_lock(&mm->page_table_lock);
-#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS
+#if USE_SPLIT_PTLOCKS
/* While mm->page_table_lock protects us against insertions and
* removals of higher level page table pages, it doesn't protect
* against updates of pte-s. Such updates, however, require the
diff --git a/arch/x86/pci/pcifront.c b/arch/x86/pci/pcifront.c
index 7924860fbfc2..59fae7f439ba 100644
--- a/arch/x86/pci/pcifront.c
+++ b/arch/x86/pci/pcifront.c
@@ -6,6 +6,7 @@
*/
#include <linux/module.h>
#include <linux/init.h>
+#include <linux/irq.h>
#include <linux/pci.h>
#include <asm/acpi.h>
#include <asm/pci_x86.h>
@@ -15,6 +16,7 @@ static int pcifront_enable_irq(struct pci_dev *dev)
{
u8 irq;
pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
+ irq_to_desc_alloc_node(irq, numa_node_id());
evtchn_register_pirq(irq);
dev->irq = irq;
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
index 938100f14b16..8a059f02d0cb 100644
--- a/drivers/firmware/dmi_scan.c
+++ b/drivers/firmware/dmi_scan.c
@@ -424,6 +424,11 @@ static bool dmi_matches(const struct dmi_system_id *dmi)
{
int i;
+#ifdef CONFIG_XEN
+ if (!is_initial_xendomain())
+ return false;
+#endif
+
WARN(!dmi_initialized, KERN_ERR "dmi check: not initialized yet.\n");
for (i = 0; i < ARRAY_SIZE(dmi->matches); i++) {
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index de532d76b55e..fde94921bb2d 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -3235,7 +3235,7 @@ config VIRTIO_NET
config VMXNET3
tristate "VMware VMXNET3 ethernet driver"
- depends on PCI && X86 && INET
+ depends on PCI && X86 && !XEN && INET
help
This driver supports VMware's vmxnet3 virtual ethernet NIC.
To compile this driver as a module, choose M here: the
diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
index b98cd3bd1510..e970517055d9 100644
--- a/drivers/xen/Kconfig
+++ b/drivers/xen/Kconfig
@@ -28,6 +28,9 @@ config XEN_PRIVCMD
def_bool y
depends on PROC_FS
+config XEN_DOMCTL
+ tristate
+
config XEN_XENBUS_DEV
def_bool y
depends on PROC_FS
@@ -47,6 +50,7 @@ config XEN_BLKDEV_BACKEND
tristate "Block-device backend driver"
depends on XEN_BACKEND
default XEN_BACKEND
+ select XEN_DOMCTL
help
The block-device backend driver allows the kernel to export its
block devices to other guests via a high-performance shared-memory
@@ -56,6 +60,7 @@ config XEN_BLKDEV_TAP
tristate "Block-device tap backend driver"
depends on XEN_BACKEND
default XEN_BACKEND
+ select XEN_DOMCTL
help
The block tap driver is an alternative to the block back driver
and allows VM block requests to be redirected to userspace through
@@ -339,6 +344,9 @@ choice
config XEN_COMPAT_030300_AND_LATER
bool "3.3.0 and later"
+ config XEN_COMPAT_030400_AND_LATER
+ bool "3.4.0 and later"
+
config XEN_COMPAT_LATEST_ONLY
bool "no compatibility code"
@@ -347,6 +355,7 @@ endchoice
config XEN_COMPAT
hex
default 0xffffff if XEN_COMPAT_LATEST_ONLY
+ default 0x030400 if XEN_COMPAT_030400_AND_LATER
default 0x030300 if XEN_COMPAT_030300_AND_LATER
default 0x030200 if XEN_COMPAT_030200_AND_LATER
default 0x030100 if XEN_COMPAT_030100_AND_LATER
diff --git a/drivers/xen/blkfront/vcd.c b/drivers/xen/blkfront/vcd.c
index 357dcd063b3c..709689f0c360 100644
--- a/drivers/xen/blkfront/vcd.c
+++ b/drivers/xen/blkfront/vcd.c
@@ -75,7 +75,7 @@ static void submit_message(struct blkfront_info *info, void *sp)
req->flags |= REQ_BLOCK_PC;
#endif
req->__sector = 0;
- req->__data_len = 512;
+ req->__data_len = PAGE_SIZE;
req->timeout = 60*HZ;
blk_execute_rq(req->q, info->gd, req, 1);
diff --git a/drivers/xen/blktap2/blktap.h b/drivers/xen/blktap2/blktap.h
index be99ae0f2d86..0335867fb882 100644
--- a/drivers/xen/blktap2/blktap.h
+++ b/drivers/xen/blktap2/blktap.h
@@ -136,6 +136,7 @@ struct blktap_statistics {
int st_rd_req;
int st_wr_req;
int st_oo_req;
+ int st_pk_req;
int st_rd_sect;
int st_wr_sect;
s64 st_rd_cnt;
diff --git a/drivers/xen/blktap2/device.c b/drivers/xen/blktap2/device.c
index 070eb9632816..ffe04486797a 100644
--- a/drivers/xen/blktap2/device.c
+++ b/drivers/xen/blktap2/device.c
@@ -208,16 +208,6 @@ flush_tlb_kernel_page(unsigned long kvaddr)
#endif
}
-static void
-blktap_device_end_dequeued_request(struct blktap_device *dev,
- struct request *req, int uptodate, int ret)
-{
- spin_lock_irq(&dev->lock);
- ret = __blk_end_request(req, ret, blk_rq_bytes(req));
- spin_unlock_irq(&dev->lock);
- BUG_ON(ret);
-}
-
/*
* tap->tap_sem held on entry
*/
@@ -380,12 +370,13 @@ blktap_device_fail_pending_requests(struct blktap *tap)
BTERR("%u:%u: failing pending %s of %d pages\n",
blktap_device_major, tap->minor,
- (request->operation == BLKIF_OP_READ ?
+ (request->operation == BLKIF_OP_PACKET ?
+ "packet" : request->operation == BLKIF_OP_READ ?
"read" : "write"), request->nr_pages);
blktap_unmap(tap, request);
req = (struct request *)(unsigned long)request->id;
- blktap_device_end_dequeued_request(dev, req, 0, -ENODEV);
+ blk_end_request_all(req, -ENODEV);
blktap_request_free(tap, request);
}
@@ -408,16 +399,11 @@ blktap_device_finish_request(struct blktap *tap,
blkif_response_t *res,
struct blktap_request *request)
{
- int uptodate;
struct request *req;
- struct blktap_device *dev;
-
- dev = &tap->device;
blktap_unmap(tap, request);
req = (struct request *)(unsigned long)request->id;
- uptodate = (res->status == BLKIF_RSP_OKAY);
BTDBG("req %p res status %d operation %d/%d id %lld\n", req,
res->status, res->operation, request->operation,
@@ -426,10 +412,11 @@ blktap_device_finish_request(struct blktap *tap,
switch (request->operation) {
case BLKIF_OP_READ:
case BLKIF_OP_WRITE:
+ case BLKIF_OP_PACKET:
if (unlikely(res->status != BLKIF_RSP_OKAY))
BTERR("Bad return from device data "
"request: %x\n", res->status);
- blktap_device_end_dequeued_request(dev, req, uptodate,
+ blk_end_request_all(req,
res->status == BLKIF_RSP_OKAY ? 0 : -EIO);
break;
default:
@@ -660,6 +647,8 @@ blktap_device_process_request(struct blktap *tap,
blkif_req.handle = 0;
blkif_req.operation = rq_data_dir(req) ?
BLKIF_OP_WRITE : BLKIF_OP_READ;
+ if (unlikely(blk_pc_request(req)))
+ blkif_req.operation = BLKIF_OP_PACKET;
request->id = (unsigned long)req;
request->operation = blkif_req.operation;
@@ -726,7 +715,9 @@ blktap_device_process_request(struct blktap *tap,
wmb(); /* blktap_poll() reads req_prod_pvt asynchronously */
ring->ring.req_prod_pvt++;
- if (rq_data_dir(req)) {
+ if (unlikely(blk_pc_request(req)))
+ tap->stats.st_pk_req++;
+ else if (rq_data_dir(req)) {
tap->stats.st_wr_sect += nr_sects;
tap->stats.st_wr_req++;
} else {
@@ -871,7 +862,7 @@ blktap_device_run_queue(struct blktap *tap)
}
if (blk_barrier_rq(req)) {
- __blk_end_request_all(req, 0);
+ __blk_end_request_all(req, -EOPNOTSUPP);
continue;
}
@@ -901,7 +892,7 @@ blktap_device_run_queue(struct blktap *tap)
if (!err)
queued++;
else {
- blktap_device_end_dequeued_request(dev, req, 0, err);
+ blk_end_request_all(req, err);
blktap_request_free(tap, request);
}
diff --git a/drivers/xen/core/Makefile b/drivers/xen/core/Makefile
index f112a54153d6..4db0bf631945 100644
--- a/drivers/xen/core/Makefile
+++ b/drivers/xen/core/Makefile
@@ -2,7 +2,7 @@
# Makefile for the linux kernel.
#
-obj-y := evtchn.o gnttab.o reboot.o machine_reboot.o domctl.o
+obj-y := evtchn.o gnttab.o reboot.o machine_reboot.o
priv-$(CONFIG_PCI) += pci.o
obj-$(CONFIG_XEN_PRIVILEGED_GUEST) += firmware.o $(priv-y)
@@ -13,4 +13,6 @@ obj-$(CONFIG_XEN_SYSFS) += xen_sysfs.o
obj-$(CONFIG_XEN_SMPBOOT) += smpboot.o
obj-$(CONFIG_SMP) += spinlock.o
obj-$(CONFIG_KEXEC) += machine_kexec.o
+obj-$(CONFIG_XEN_DOMCTL) += domctl.o
+CFLAGS_domctl.o := -D__XEN_TOOLS__ -D__XEN_PUBLIC_XEN_H__ -imacros xen/interface/domctl.h
obj-$(CONFIG_XEN_XENCOMM) += xencomm.o
diff --git a/drivers/xen/core/domctl.c b/drivers/xen/core/domctl.c
index f29ac28fb84e..36f21d980da2 100644
--- a/drivers/xen/core/domctl.c
+++ b/drivers/xen/core/domctl.c
@@ -15,7 +15,8 @@
* we don't want to have dependencies between dom0 kernel and
* xen kernel versions. Now we have one. Ouch.
*/
-
+#undef __XEN_PUBLIC_XEN_H__
+#undef __XEN_TOOLS__
#include <linux/kernel.h>
#include <linux/module.h>
#include <asm/hypervisor.h>
@@ -26,7 +27,6 @@
/* stuff copied from xen/interface/domctl.h, which we can't
* include directly for the reasons outlined above .... */
-#define XEN_DOMCTL_get_address_size 36
typedef struct xen_domctl_address_size {
uint32_t size;
} xen_domctl_address_size_t;
@@ -44,7 +44,7 @@ union xen_domctl {
struct xen_domctl_address_size address_size;
uint64_t dummy_align;
uint8_t dummy_pad[128];
- } u;
+ };
} v4;
/* v5: upstream: xen 3.1 */
@@ -56,7 +56,7 @@ union xen_domctl {
struct xen_domctl_address_size address_size;
uint64_aligned_t dummy_align;
uint8_t dummy_pad[128];
- } u;
+ };
} v5;
};
@@ -77,7 +77,7 @@ int xen_guest_address_size(int domid)
domctl.v##ver.cmd = XEN_DOMCTL_get_address_size; \
domctl.v##ver.interface_version = low = ver; \
domctl.v##ver.domain = domid; \
- ret = hypervisor_domctl(&domctl) ?: domctl.v##ver.u.address_size.size; \
+ ret = hypervisor_domctl(&domctl) ?: domctl.v##ver.address_size.size; \
if (ret == 32 || ret == 64) { \
printk("v" #ver " domctl worked ok: dom%d is %d-bit\n", \
domid, ret); \
@@ -85,6 +85,7 @@ int xen_guest_address_size(int domid)
} \
} while (0)
+ BUILD_BUG_ON(XEN_DOMCTL_INTERFACE_VERSION > 5);
guest_address_size(5);
#if CONFIG_XEN_COMPAT < 0x030100
guest_address_size(4);
@@ -111,3 +112,5 @@ int xen_guest_blkif_protocol(int domid)
return BLKIF_PROTOCOL_NATIVE;
}
EXPORT_SYMBOL_GPL(xen_guest_blkif_protocol);
+
+MODULE_LICENSE("GPL");
diff --git a/drivers/xen/core/evtchn.c b/drivers/xen/core/evtchn.c
index 8847b81dd4d8..421aa8644341 100644
--- a/drivers/xen/core/evtchn.c
+++ b/drivers/xen/core/evtchn.c
@@ -415,7 +415,6 @@ asmlinkage void __irq_entry evtchn_do_upcall(struct pt_regs *regs)
percpu_write(upcall_count, 0);
} while (unlikely(count != 1));
- run_local_timers();
irq_exit();
set_irq_regs(old_regs);
}
diff --git a/drivers/xen/features.c b/drivers/xen/features.c
index ddbf5ad27551..14700cee48f5 100644
--- a/drivers/xen/features.c
+++ b/drivers/xen/features.c
@@ -11,6 +11,11 @@
#ifdef CONFIG_PARAVIRT_XEN
#include <asm/xen/hypercall.h>
+#else
+#include <asm/hypervisor.h>
+#endif
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
+#include <xen/platform-compat.h>
#endif
#include <xen/interface/xen.h>
diff --git a/drivers/xen/usbback/usbback.c b/drivers/xen/usbback/usbback.c
index e6f6528b09b5..073ab6e360a4 100644
--- a/drivers/xen/usbback/usbback.c
+++ b/drivers/xen/usbback/usbback.c
@@ -1095,14 +1095,12 @@ void detach_device_without_lock(usbif_t *usbif, struct usbstub *stub)
static int __init usbback_init(void)
{
- int i, rc, mmap_pages;
+ int i, mmap_pages;
+ int err = 0;
if (!is_running_on_xen())
return -ENODEV;
- if (usbstub_init())
- return -ENODEV;
-
mmap_pages = usbif_reqs * USBIF_MAX_SEGMENTS_PER_REQUEST;
pending_reqs = kmalloc(sizeof(pending_reqs[0]) *
usbif_reqs, GFP_KERNEL);
@@ -1110,8 +1108,10 @@ static int __init usbback_init(void)
mmap_pages, GFP_KERNEL);
pending_pages = alloc_empty_pages_and_pagevec(mmap_pages);
- if (!pending_reqs || !pending_grant_handles || !pending_pages)
- goto out_of_memory;
+ if (!pending_reqs || !pending_grant_handles || !pending_pages) {
+ err = -ENOMEM;
+ goto out_mem;
+ }
for (i = 0; i < mmap_pages; i++)
pending_grant_handles[i] = USBBACK_INVALID_HANDLE;
@@ -1122,21 +1122,23 @@ static int __init usbback_init(void)
for (i = 0; i < usbif_reqs; i++)
list_add_tail(&pending_reqs[i].free_list, &pending_free);
- rc = usbback_xenbus_init();
- if (rc)
- goto fail;
+ err = usbstub_init();
+ if (err)
+ goto out_mem;
+
+ err = usbback_xenbus_init();
+ if (err)
+ goto out_xenbus;
return 0;
- out_of_memory:
- printk("%s: out of memory\n", __FUNCTION__);
- rc = -ENOMEM;
- fail:
+out_xenbus:
+ usbstub_exit();
+out_mem:
kfree(pending_reqs);
kfree(pending_grant_handles);
free_empty_pages_and_pagevec(pending_pages, mmap_pages);
- usbstub_exit();
- return rc;
+ return err;
}
static void __exit usbback_exit(void)
diff --git a/drivers/xen/usbback/xenbus.c b/drivers/xen/usbback/xenbus.c
index d893ca87e0e3..c5d31da4d930 100644
--- a/drivers/xen/usbback/xenbus.c
+++ b/drivers/xen/usbback/xenbus.c
@@ -326,12 +326,12 @@ static struct xenbus_driver usbback_driver = {
.remove = usbback_remove,
};
-int usbback_xenbus_init(void)
+int __init usbback_xenbus_init(void)
{
return xenbus_register_backend(&usbback_driver);
}
-void usbback_xenbus_exit(void)
+void __exit usbback_xenbus_exit(void)
{
xenbus_unregister_driver(&usbback_driver);
}
diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
index 944022b82066..1fbf4dbcb3d3 100644
--- a/drivers/xen/xenbus/xenbus_xs.c
+++ b/drivers/xen/xenbus/xenbus_xs.c
@@ -84,6 +84,14 @@ struct xs_handle {
/*
* Mutex ordering: transaction_mutex -> watch_mutex -> request_mutex.
* response_mutex is never taken simultaneously with the other three.
+ *
+ * transaction_mutex must be held before incrementing
+ * transaction_count. The mutex is held when a suspend is in
+ * progress to prevent new transactions starting.
+ *
+ * When decrementing transaction_count to zero the wait queue
+ * should be woken up, the suspend code waits for count to
+ * reach zero.
*/
/* One request at a time. */
@@ -93,7 +101,9 @@ struct xs_handle {
struct mutex response_mutex;
/* Protect transactions against save/restore. */
- struct rw_semaphore transaction_mutex;
+ struct mutex transaction_mutex;
+ atomic_t transaction_count;
+ wait_queue_head_t transaction_wq;
/* Protect watch (de)register against save/restore. */
struct rw_semaphore watch_mutex;
@@ -165,6 +175,31 @@ static void *read_reply(enum xsd_sockmsg_type *type, unsigned int *len)
return body;
}
+static void transaction_start(void)
+{
+ mutex_lock(&xs_state.transaction_mutex);
+ atomic_inc(&xs_state.transaction_count);
+ mutex_unlock(&xs_state.transaction_mutex);
+}
+
+static void transaction_end(void)
+{
+ if (atomic_dec_and_test(&xs_state.transaction_count))
+ wake_up(&xs_state.transaction_wq);
+}
+
+static void transaction_suspend(void)
+{
+ mutex_lock(&xs_state.transaction_mutex);
+ wait_event(xs_state.transaction_wq,
+ atomic_read(&xs_state.transaction_count) == 0);
+}
+
+static void transaction_resume(void)
+{
+ mutex_unlock(&xs_state.transaction_mutex);
+}
+
void *xenbus_dev_request_and_reply(struct xsd_sockmsg *msg)
{
void *ret;
@@ -172,7 +207,7 @@ void *xenbus_dev_request_and_reply(struct xsd_sockmsg *msg)
int err;
if (req_msg.type == XS_TRANSACTION_START)
- down_read(&xs_state.transaction_mutex);
+ transaction_start();
mutex_lock(&xs_state.request_mutex);
@@ -188,7 +223,7 @@ void *xenbus_dev_request_and_reply(struct xsd_sockmsg *msg)
if ((req_msg.type == XS_TRANSACTION_END) ||
((req_msg.type == XS_TRANSACTION_START) &&
(msg->type == XS_ERROR)))
- up_read(&xs_state.transaction_mutex);
+ transaction_end();
return ret;
}
@@ -443,11 +478,11 @@ int xenbus_transaction_start(struct xenbus_transaction *t)
{
char *id_str;
- down_read(&xs_state.transaction_mutex);
+ transaction_start();
id_str = xs_single(XBT_NIL, XS_TRANSACTION_START, "", NULL);
if (IS_ERR(id_str)) {
- up_read(&xs_state.transaction_mutex);
+ transaction_end();
return PTR_ERR(id_str);
}
@@ -472,7 +507,7 @@ int xenbus_transaction_end(struct xenbus_transaction t, int abort)
err = xs_error(xs_single(t, XS_TRANSACTION_END, abortstr, NULL));
- up_read(&xs_state.transaction_mutex);
+ transaction_end();
return err;
}
@@ -677,7 +712,7 @@ EXPORT_SYMBOL_GPL(unregister_xenbus_watch);
void xs_suspend(void)
{
- down_write(&xs_state.transaction_mutex);
+ transaction_suspend();
down_write(&xs_state.watch_mutex);
mutex_lock(&xs_state.request_mutex);
mutex_lock(&xs_state.response_mutex);
@@ -694,7 +729,7 @@ void xs_resume(void)
mutex_unlock(&xs_state.response_mutex);
mutex_unlock(&xs_state.request_mutex);
- up_write(&xs_state.transaction_mutex);
+ transaction_resume();
/* No need for watches_lock: the watch_mutex is sufficient. */
list_for_each_entry(watch, &watches, list) {
@@ -710,7 +745,7 @@ void xs_suspend_cancel(void)
mutex_unlock(&xs_state.response_mutex);
mutex_unlock(&xs_state.request_mutex);
up_write(&xs_state.watch_mutex);
- up_write(&xs_state.transaction_mutex);
+ mutex_unlock(&xs_state.transaction_mutex);
}
#if defined(CONFIG_XEN) || defined(MODULE)
@@ -903,8 +938,10 @@ int xs_init(void)
mutex_init(&xs_state.request_mutex);
mutex_init(&xs_state.response_mutex);
- init_rwsem(&xs_state.transaction_mutex);
+ mutex_init(&xs_state.transaction_mutex);
init_rwsem(&xs_state.watch_mutex);
+ atomic_set(&xs_state.transaction_count, 0);
+ init_waitqueue_head(&xs_state.transaction_wq);
task = kthread_run(xenwatch_thread, NULL, "xenwatch");
if (IS_ERR(task))
diff --git a/include/xen/interface/arch-x86/xen.h b/include/xen/interface/arch-x86/xen.h
index 320b470a1206..368fd32bf851 100644
--- a/include/xen/interface/arch-x86/xen.h
+++ b/include/xen/interface/arch-x86/xen.h
@@ -50,7 +50,7 @@
#endif
/* Allow co-existing Linux 2.6.23+ Xen interface definitions. */
-#define DEFINE_XEN_GUEST_HANDLE_STRUCT(name) struct name
+#define DEFINE_GUEST_HANDLE_STRUCT(name) struct name
#if defined(__i386__)
#include "xen-x86_32.h"
diff --git a/include/xen/interface/event_channel.h b/include/xen/interface/event_channel.h
index 71fee4abdc88..05df7fa45d9f 100644
--- a/include/xen/interface/event_channel.h
+++ b/include/xen/interface/event_channel.h
@@ -250,7 +250,7 @@ struct evtchn_op {
struct evtchn_unmask unmask;
} u;
};
-DEFINE_XEN_GUEST_HANDLE_STRUCT(evtchn_op);
+DEFINE_GUEST_HANDLE_STRUCT(evtchn_op);
typedef struct evtchn_op evtchn_op_t;
DEFINE_XEN_GUEST_HANDLE(evtchn_op_t);
diff --git a/include/xen/interface/grant_table.h b/include/xen/interface/grant_table.h
index ac188c80b326..e5636461188f 100644
--- a/include/xen/interface/grant_table.h
+++ b/include/xen/interface/grant_table.h
@@ -194,7 +194,7 @@ struct gnttab_map_grant_ref {
grant_handle_t handle;
uint64_t dev_bus_addr;
};
-DEFINE_XEN_GUEST_HANDLE_STRUCT(gnttab_map_grant_ref);
+DEFINE_GUEST_HANDLE_STRUCT(gnttab_map_grant_ref);
typedef struct gnttab_map_grant_ref gnttab_map_grant_ref_t;
DEFINE_XEN_GUEST_HANDLE(gnttab_map_grant_ref_t);
@@ -218,7 +218,7 @@ struct gnttab_unmap_grant_ref {
/* OUT parameters. */
int16_t status; /* GNTST_* */
};
-DEFINE_XEN_GUEST_HANDLE_STRUCT(gnttab_unmap_grant_ref);
+DEFINE_GUEST_HANDLE_STRUCT(gnttab_unmap_grant_ref);
typedef struct gnttab_unmap_grant_ref gnttab_unmap_grant_ref_t;
DEFINE_XEN_GUEST_HANDLE(gnttab_unmap_grant_ref_t);
@@ -240,7 +240,7 @@ struct gnttab_setup_table {
int16_t status; /* GNTST_* */
XEN_GUEST_HANDLE(ulong) frame_list;
};
-DEFINE_XEN_GUEST_HANDLE_STRUCT(gnttab_setup_table);
+DEFINE_GUEST_HANDLE_STRUCT(gnttab_setup_table);
typedef struct gnttab_setup_table gnttab_setup_table_t;
DEFINE_XEN_GUEST_HANDLE(gnttab_setup_table_t);
@@ -255,7 +255,7 @@ struct gnttab_dump_table {
/* OUT parameters. */
int16_t status; /* GNTST_* */
};
-DEFINE_XEN_GUEST_HANDLE_STRUCT(gnttab_dump_table);
+DEFINE_GUEST_HANDLE_STRUCT(gnttab_dump_table);
typedef struct gnttab_dump_table gnttab_dump_table_t;
DEFINE_XEN_GUEST_HANDLE(gnttab_dump_table_t);
@@ -276,7 +276,7 @@ struct gnttab_transfer {
/* OUT parameters. */
int16_t status;
};
-DEFINE_XEN_GUEST_HANDLE_STRUCT(gnttab_transfer);
+DEFINE_GUEST_HANDLE_STRUCT(gnttab_transfer);
typedef struct gnttab_transfer gnttab_transfer_t;
DEFINE_XEN_GUEST_HANDLE(gnttab_transfer_t);
@@ -320,7 +320,7 @@ typedef struct gnttab_copy {
/* OUT parameters. */
int16_t status;
} gnttab_copy_t;
-DEFINE_XEN_GUEST_HANDLE_STRUCT(gnttab_copy);
+DEFINE_GUEST_HANDLE_STRUCT(gnttab_copy);
DEFINE_XEN_GUEST_HANDLE(gnttab_copy_t);
/*
@@ -339,7 +339,7 @@ struct gnttab_query_size {
uint32_t max_nr_frames;
int16_t status; /* GNTST_* */
};
-DEFINE_XEN_GUEST_HANDLE_STRUCT(gnttab_query_size);
+DEFINE_GUEST_HANDLE_STRUCT(gnttab_query_size);
typedef struct gnttab_query_size gnttab_query_size_t;
DEFINE_XEN_GUEST_HANDLE(gnttab_query_size_t);
diff --git a/include/xen/interface/memory.h b/include/xen/interface/memory.h
index ffb9c9bb8615..f52265698c69 100644
--- a/include/xen/interface/memory.h
+++ b/include/xen/interface/memory.h
@@ -85,7 +85,7 @@ struct xen_memory_reservation {
*/
domid_t domid;
};
-DEFINE_XEN_GUEST_HANDLE_STRUCT(xen_memory_reservation);
+DEFINE_GUEST_HANDLE_STRUCT(xen_memory_reservation);
typedef struct xen_memory_reservation xen_memory_reservation_t;
DEFINE_XEN_GUEST_HANDLE(xen_memory_reservation_t);
@@ -179,7 +179,7 @@ struct xen_machphys_mfn_list {
*/
unsigned int nr_extents;
};
-DEFINE_XEN_GUEST_HANDLE_STRUCT(xen_machphys_mfn_list);
+DEFINE_GUEST_HANDLE_STRUCT(xen_machphys_mfn_list);
typedef struct xen_machphys_mfn_list xen_machphys_mfn_list_t;
DEFINE_XEN_GUEST_HANDLE(xen_machphys_mfn_list_t);
@@ -219,7 +219,7 @@ struct xen_add_to_physmap {
/* GPFN where the source mapping page should appear. */
xen_pfn_t gpfn;
};
-DEFINE_XEN_GUEST_HANDLE_STRUCT(xen_add_to_physmap);
+DEFINE_GUEST_HANDLE_STRUCT(xen_add_to_physmap);
typedef struct xen_add_to_physmap xen_add_to_physmap_t;
DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_t);
diff --git a/include/xen/interface/sched.h b/include/xen/interface/sched.h
index 4393b71e6609..1974b3ec970a 100644
--- a/include/xen/interface/sched.h
+++ b/include/xen/interface/sched.h
@@ -67,7 +67,7 @@
struct sched_shutdown {
unsigned int reason; /* SHUTDOWN_* */
};
-DEFINE_XEN_GUEST_HANDLE_STRUCT(sched_shutdown);
+DEFINE_GUEST_HANDLE_STRUCT(sched_shutdown);
typedef struct sched_shutdown sched_shutdown_t;
DEFINE_XEN_GUEST_HANDLE(sched_shutdown_t);
@@ -82,7 +82,7 @@ struct sched_poll {
unsigned int nr_ports;
uint64_t timeout;
};
-DEFINE_XEN_GUEST_HANDLE_STRUCT(sched_poll);
+DEFINE_GUEST_HANDLE_STRUCT(sched_poll);
typedef struct sched_poll sched_poll_t;
DEFINE_XEN_GUEST_HANDLE(sched_poll_t);
diff --git a/include/xen/interface/vcpu.h b/include/xen/interface/vcpu.h
index c0a5f44bfdfd..a79995821d73 100644
--- a/include/xen/interface/vcpu.h
+++ b/include/xen/interface/vcpu.h
@@ -87,7 +87,7 @@ struct vcpu_runstate_info {
*/
uint64_t time[4];
};
-DEFINE_XEN_GUEST_HANDLE_STRUCT(vcpu_runstate_info);
+DEFINE_GUEST_HANDLE_STRUCT(vcpu_runstate_info);
typedef struct vcpu_runstate_info vcpu_runstate_info_t;
DEFINE_XEN_GUEST_HANDLE(vcpu_runstate_info_t);
@@ -143,7 +143,7 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_register_runstate_memory_area_t);
struct vcpu_set_periodic_timer {
uint64_t period_ns;
};
-DEFINE_XEN_GUEST_HANDLE_STRUCT(vcpu_set_periodic_timer);
+DEFINE_GUEST_HANDLE_STRUCT(vcpu_set_periodic_timer);
typedef struct vcpu_set_periodic_timer vcpu_set_periodic_timer_t;
DEFINE_XEN_GUEST_HANDLE(vcpu_set_periodic_timer_t);
@@ -157,7 +157,7 @@ struct vcpu_set_singleshot_timer {
uint64_t timeout_abs_ns; /* Absolute system time value in nanoseconds. */
uint32_t flags; /* VCPU_SSHOTTMR_??? */
};
-DEFINE_XEN_GUEST_HANDLE_STRUCT(vcpu_set_singleshot_timer);
+DEFINE_GUEST_HANDLE_STRUCT(vcpu_set_singleshot_timer);
typedef struct vcpu_set_singleshot_timer vcpu_set_singleshot_timer_t;
DEFINE_XEN_GUEST_HANDLE(vcpu_set_singleshot_timer_t);
@@ -181,7 +181,7 @@ struct vcpu_register_vcpu_info {
uint32_t offset; /* offset within page */
uint32_t rsvd; /* unused */
};
-DEFINE_XEN_GUEST_HANDLE_STRUCT(vcpu_register_vcpu_info);
+DEFINE_GUEST_HANDLE_STRUCT(vcpu_register_vcpu_info);
typedef struct vcpu_register_vcpu_info vcpu_register_vcpu_info_t;
DEFINE_XEN_GUEST_HANDLE(vcpu_register_vcpu_info_t);
diff --git a/include/xen/interface/xen.h b/include/xen/interface/xen.h
index a9cf2c1a6069..0294eb892bad 100644
--- a/include/xen/interface/xen.h
+++ b/include/xen/interface/xen.h
@@ -288,7 +288,7 @@ struct mmuext_op {
xen_pfn_t src_mfn;
} arg2;
};
-DEFINE_XEN_GUEST_HANDLE_STRUCT(mmuext_op);
+DEFINE_GUEST_HANDLE_STRUCT(mmuext_op);
typedef struct mmuext_op mmuext_op_t;
DEFINE_XEN_GUEST_HANDLE(mmuext_op_t);
#endif
@@ -374,7 +374,7 @@ struct mmu_update {
uint64_t ptr; /* Machine address of PTE. */
uint64_t val; /* New contents of PTE. */
};
-DEFINE_XEN_GUEST_HANDLE_STRUCT(mmu_update);
+DEFINE_GUEST_HANDLE_STRUCT(mmu_update);
typedef struct mmu_update mmu_update_t;
DEFINE_XEN_GUEST_HANDLE(mmu_update_t);
@@ -391,7 +391,7 @@ struct multicall_entry {
#endif
unsigned long args[6];
};
-DEFINE_XEN_GUEST_HANDLE_STRUCT(multicall_entry);
+DEFINE_GUEST_HANDLE_STRUCT(multicall_entry);
typedef struct multicall_entry multicall_entry_t;
DEFINE_XEN_GUEST_HANDLE(multicall_entry_t);