direct-io.hg

changeset 14314:101a1ccfc3f7

Merge
author Tim Deegan <Tim.Deegan@xensource.com>
date Fri Mar 09 11:45:49 2007 +0000 (2007-03-09)
parents b46a92ba0b61 8af1a8250c13
children 26e034395b8e
files
line diff
     1.1 --- a/buildconfigs/linux-defconfig_xen0_ia64	Fri Mar 09 11:45:19 2007 +0000
     1.2 +++ b/buildconfigs/linux-defconfig_xen0_ia64	Fri Mar 09 11:45:49 2007 +0000
     1.3 @@ -1619,7 +1619,7 @@ CONFIG_CRYPTO_DES=y
     1.4  CONFIG_XEN_BALLOON=y
     1.5  CONFIG_XEN_REBOOT=y
     1.6  # CONFIG_XEN_SMPBOOT is not set
     1.7 -CONFIG_XEN_INTERFACE_VERSION=0x00030203
     1.8 +CONFIG_XEN_INTERFACE_VERSION=0x00030205
     1.9  
    1.10  #
    1.11  # XEN
     2.1 --- a/buildconfigs/linux-defconfig_xen0_x86_32	Fri Mar 09 11:45:19 2007 +0000
     2.2 +++ b/buildconfigs/linux-defconfig_xen0_x86_32	Fri Mar 09 11:45:49 2007 +0000
     2.3 @@ -1384,7 +1384,7 @@ CONFIG_CRYPTO_CRC32C=m
     2.4  #
     2.5  # CONFIG_CRYPTO_DEV_PADLOCK is not set
     2.6  CONFIG_XEN=y
     2.7 -CONFIG_XEN_INTERFACE_VERSION=0x00030203
     2.8 +CONFIG_XEN_INTERFACE_VERSION=0x00030205
     2.9  
    2.10  #
    2.11  # XEN
     3.1 --- a/buildconfigs/linux-defconfig_xen0_x86_64	Fri Mar 09 11:45:19 2007 +0000
     3.2 +++ b/buildconfigs/linux-defconfig_xen0_x86_64	Fri Mar 09 11:45:49 2007 +0000
     3.3 @@ -1334,7 +1334,7 @@ CONFIG_CRYPTO_CRC32C=m
     3.4  # Hardware crypto devices
     3.5  #
     3.6  CONFIG_XEN=y
     3.7 -CONFIG_XEN_INTERFACE_VERSION=0x00030203
     3.8 +CONFIG_XEN_INTERFACE_VERSION=0x00030205
     3.9  
    3.10  #
    3.11  # XEN
     4.1 --- a/buildconfigs/linux-defconfig_xenU_ia64	Fri Mar 09 11:45:19 2007 +0000
     4.2 +++ b/buildconfigs/linux-defconfig_xenU_ia64	Fri Mar 09 11:45:49 2007 +0000
     4.3 @@ -1471,7 +1471,7 @@ CONFIG_CRYPTO_DES=y
     4.4  CONFIG_XEN_BALLOON=y
     4.5  CONFIG_XEN_REBOOT=y
     4.6  # CONFIG_XEN_SMPBOOT is not set
     4.7 -CONFIG_XEN_INTERFACE_VERSION=0x00030203
     4.8 +CONFIG_XEN_INTERFACE_VERSION=0x00030205
     4.9  
    4.10  #
    4.11  # XEN
     5.1 --- a/buildconfigs/linux-defconfig_xenU_x86_32	Fri Mar 09 11:45:19 2007 +0000
     5.2 +++ b/buildconfigs/linux-defconfig_xenU_x86_32	Fri Mar 09 11:45:49 2007 +0000
     5.3 @@ -904,7 +904,7 @@ CONFIG_CRYPTO_CRC32C=m
     5.4  #
     5.5  # CONFIG_CRYPTO_DEV_PADLOCK is not set
     5.6  CONFIG_XEN=y
     5.7 -CONFIG_XEN_INTERFACE_VERSION=0x00030203
     5.8 +CONFIG_XEN_INTERFACE_VERSION=0x00030205
     5.9  
    5.10  #
    5.11  # XEN
     6.1 --- a/buildconfigs/linux-defconfig_xenU_x86_64	Fri Mar 09 11:45:19 2007 +0000
     6.2 +++ b/buildconfigs/linux-defconfig_xenU_x86_64	Fri Mar 09 11:45:49 2007 +0000
     6.3 @@ -1200,7 +1200,7 @@ CONFIG_CRYPTO_CRC32C=m
     6.4  # Hardware crypto devices
     6.5  #
     6.6  CONFIG_XEN=y
     6.7 -CONFIG_XEN_INTERFACE_VERSION=0x00030203
     6.8 +CONFIG_XEN_INTERFACE_VERSION=0x00030205
     6.9  
    6.10  #
    6.11  # XEN
     7.1 --- a/buildconfigs/linux-defconfig_xen_ia64	Fri Mar 09 11:45:19 2007 +0000
     7.2 +++ b/buildconfigs/linux-defconfig_xen_ia64	Fri Mar 09 11:45:49 2007 +0000
     7.3 @@ -1619,7 +1619,7 @@ CONFIG_CRYPTO_DES=y
     7.4  CONFIG_XEN_BALLOON=y
     7.5  CONFIG_XEN_REBOOT=y
     7.6  # CONFIG_XEN_SMPBOOT is not set
     7.7 -CONFIG_XEN_INTERFACE_VERSION=0x00030203
     7.8 +CONFIG_XEN_INTERFACE_VERSION=0x00030205
     7.9  
    7.10  #
    7.11  # XEN
     8.1 --- a/buildconfigs/linux-defconfig_xen_x86_32	Fri Mar 09 11:45:19 2007 +0000
     8.2 +++ b/buildconfigs/linux-defconfig_xen_x86_32	Fri Mar 09 11:45:49 2007 +0000
     8.3 @@ -3242,7 +3242,7 @@ CONFIG_CRYPTO_TEST=m
     8.4  #
     8.5  # CONFIG_CRYPTO_DEV_PADLOCK is not set
     8.6  CONFIG_XEN=y
     8.7 -CONFIG_XEN_INTERFACE_VERSION=0x00030203
     8.8 +CONFIG_XEN_INTERFACE_VERSION=0x00030205
     8.9  
    8.10  #
    8.11  # XEN
     9.1 --- a/buildconfigs/linux-defconfig_xen_x86_64	Fri Mar 09 11:45:19 2007 +0000
     9.2 +++ b/buildconfigs/linux-defconfig_xen_x86_64	Fri Mar 09 11:45:49 2007 +0000
     9.3 @@ -3072,7 +3072,7 @@ CONFIG_CRYPTO_TEST=m
     9.4  # Hardware crypto devices
     9.5  #
     9.6  CONFIG_XEN=y
     9.7 -CONFIG_XEN_INTERFACE_VERSION=0x00030203
     9.8 +CONFIG_XEN_INTERFACE_VERSION=0x00030205
     9.9  
    9.10  #
    9.11  # XEN
    10.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/cpu/mtrr/main-xen.c	Fri Mar 09 11:45:19 2007 +0000
    10.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/cpu/mtrr/main-xen.c	Fri Mar 09 11:45:49 2007 +0000
    10.3 @@ -14,11 +14,11 @@ static DEFINE_MUTEX(mtrr_mutex);
    10.4  void generic_get_mtrr(unsigned int reg, unsigned long *base,
    10.5  		      unsigned int *size, mtrr_type * type)
    10.6  {
    10.7 -	dom0_op_t op;
    10.8 +	struct xen_platform_op op;
    10.9  
   10.10 -	op.cmd = DOM0_READ_MEMTYPE;
   10.11 +	op.cmd = XENPF_read_memtype;
   10.12  	op.u.read_memtype.reg = reg;
   10.13 -	(void)HYPERVISOR_dom0_op(&op);
   10.14 +	(void)HYPERVISOR_platform_op(&op);
   10.15  
   10.16  	*size = op.u.read_memtype.nr_mfns;
   10.17  	*base = op.u.read_memtype.mfn;
   10.18 @@ -36,12 +36,12 @@ unsigned int *usage_table;
   10.19  
   10.20  static void __init set_num_var_ranges(void)
   10.21  {
   10.22 -	dom0_op_t op;
   10.23 +	struct xen_platform_op op;
   10.24  
   10.25  	for (num_var_ranges = 0; ; num_var_ranges++) {
   10.26 -		op.cmd = DOM0_READ_MEMTYPE;
   10.27 +		op.cmd = XENPF_read_memtype;
   10.28  		op.u.read_memtype.reg = num_var_ranges;
   10.29 -		if (HYPERVISOR_dom0_op(&op) != 0)
   10.30 +		if (HYPERVISOR_platform_op(&op) != 0)
   10.31  			break;
   10.32  	}
   10.33  }
   10.34 @@ -64,15 +64,15 @@ int mtrr_add_page(unsigned long base, un
   10.35  		  unsigned int type, char increment)
   10.36  {
   10.37  	int error;
   10.38 -	dom0_op_t op;
   10.39 +	struct xen_platform_op op;
   10.40  
   10.41  	mutex_lock(&mtrr_mutex);
   10.42  
   10.43 -	op.cmd = DOM0_ADD_MEMTYPE;
   10.44 +	op.cmd = XENPF_add_memtype;
   10.45  	op.u.add_memtype.mfn     = base;
   10.46  	op.u.add_memtype.nr_mfns = size;
   10.47  	op.u.add_memtype.type    = type;
   10.48 -	error = HYPERVISOR_dom0_op(&op);
   10.49 +	error = HYPERVISOR_platform_op(&op);
   10.50  	if (error) {
   10.51  		mutex_unlock(&mtrr_mutex);
   10.52  		BUG_ON(error > 0);
   10.53 @@ -117,7 +117,7 @@ int mtrr_del_page(int reg, unsigned long
   10.54  	unsigned long lbase;
   10.55  	unsigned int lsize;
   10.56  	int error = -EINVAL;
   10.57 -	dom0_op_t op;
   10.58 +	struct xen_platform_op op;
   10.59  
   10.60  	mutex_lock(&mtrr_mutex);
   10.61  
   10.62 @@ -141,10 +141,10 @@ int mtrr_del_page(int reg, unsigned long
   10.63  		goto out;
   10.64  	}
   10.65  	if (--usage_table[reg] < 1) {
   10.66 -		op.cmd = DOM0_DEL_MEMTYPE;
   10.67 +		op.cmd = XENPF_del_memtype;
   10.68  		op.u.del_memtype.handle = 0;
   10.69  		op.u.del_memtype.reg    = reg;
   10.70 -		error = HYPERVISOR_dom0_op(&op);
   10.71 +		error = HYPERVISOR_platform_op(&op);
   10.72  		if (error) {
   10.73  			BUG_ON(error > 0);
   10.74  			goto out;
    11.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/io_apic-xen.c	Fri Mar 09 11:45:19 2007 +0000
    11.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/io_apic-xen.c	Fri Mar 09 11:45:49 2007 +0000
    11.3 @@ -2510,10 +2510,10 @@ static int __init io_apic_bug_finalize(v
    11.4  	if(sis_apic_bug == -1)
    11.5  		sis_apic_bug = 0;
    11.6  	if (is_initial_xendomain()) {
    11.7 -		dom0_op_t op = { .cmd = DOM0_PLATFORM_QUIRK };
    11.8 +		struct xen_platform_op op = { .cmd = XENPF_platform_quirk };
    11.9  		op.u.platform_quirk.quirk_id = sis_apic_bug ?
   11.10  			QUIRK_IOAPIC_BAD_REGSEL : QUIRK_IOAPIC_GOOD_REGSEL;
   11.11 -		HYPERVISOR_dom0_op(&op);
   11.12 +		HYPERVISOR_platform_op(&op);
   11.13  	}
   11.14  	return 0;
   11.15  }
    12.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/ioport-xen.c	Fri Mar 09 11:45:19 2007 +0000
    12.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/ioport-xen.c	Fri Mar 09 11:45:49 2007 +0000
    12.3 @@ -81,7 +81,7 @@ asmlinkage long sys_ioperm(unsigned long
    12.4  		t->io_bitmap_ptr = bitmap;
    12.5  		set_thread_flag(TIF_IO_BITMAP);
    12.6  
    12.7 -		set_iobitmap.bitmap   = (char *)bitmap;
    12.8 +		set_xen_guest_handle(set_iobitmap.bitmap, (char *)bitmap);
    12.9  		set_iobitmap.nr_ports = IO_BITMAP_BITS;
   12.10  		HYPERVISOR_physdev_op(PHYSDEVOP_set_iobitmap, &set_iobitmap);
   12.11  	}
    13.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/microcode-xen.c	Fri Mar 09 11:45:19 2007 +0000
    13.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/microcode-xen.c	Fri Mar 09 11:45:49 2007 +0000
    13.3 @@ -71,12 +71,12 @@ static int do_microcode_update (const vo
    13.4  		return -ENOMEM;
    13.5  
    13.6  	if (copy_from_user(kbuf, ubuf, len) == 0) {
    13.7 -		dom0_op_t op;
    13.8 +		struct xen_platform_op op;
    13.9  
   13.10 -		op.cmd = DOM0_MICROCODE;
   13.11 +		op.cmd = XENPF_microcode_update;
   13.12  		set_xen_guest_handle(op.u.microcode.data, kbuf);
   13.13  		op.u.microcode.length = len;
   13.14 -		err = HYPERVISOR_dom0_op(&op);
   13.15 +		err = HYPERVISOR_platform_op(&op);
   13.16  	} else
   13.17  		err = -EFAULT;
   13.18  
    14.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c	Fri Mar 09 11:45:19 2007 +0000
    14.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c	Fri Mar 09 11:45:49 2007 +0000
    14.3 @@ -606,7 +606,8 @@ struct task_struct fastcall * __switch_t
    14.4  	}
    14.5  
    14.6  	if (unlikely(prev->io_bitmap_ptr || next->io_bitmap_ptr)) {
    14.7 -		iobmp_op.bitmap   = (char *)next->io_bitmap_ptr;
    14.8 +		set_xen_guest_handle(iobmp_op.bitmap,
    14.9 +				     (char *)next->io_bitmap_ptr);
   14.10  		iobmp_op.nr_ports = next->io_bitmap_ptr ? IO_BITMAP_BITS : 0;
   14.11  		mcl->op      = __HYPERVISOR_physdev_op;
   14.12  		mcl->args[0] = PHYSDEVOP_set_iobitmap;
    15.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/quirks-xen.c	Fri Mar 09 11:45:19 2007 +0000
    15.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/quirks-xen.c	Fri Mar 09 11:45:49 2007 +0000
    15.3 @@ -30,11 +30,11 @@ static void __devinit quirk_intel_irqbal
    15.4  	raw_pci_ops->read(0, 0, 0x40, 0x4c, 2, &word);
    15.5  
    15.6  	if (!(word & (1 << 13))) {
    15.7 -		dom0_op_t op;
    15.8 +		struct xen_platform_op op;
    15.9  		printk(KERN_INFO "Disabling irq balancing and affinity\n");
   15.10 -		op.cmd = DOM0_PLATFORM_QUIRK;
   15.11 +		op.cmd = XENPF_platform_quirk;
   15.12  		op.u.platform_quirk.quirk_id = QUIRK_NOIRQBALANCING;
   15.13 -		(void)HYPERVISOR_dom0_op(&op);
   15.14 +		(void)HYPERVISOR_platform_op(&op);
   15.15  	}
   15.16  
   15.17  	/* put back the original value for config space*/
    16.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c	Fri Mar 09 11:45:19 2007 +0000
    16.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c	Fri Mar 09 11:45:49 2007 +0000
    16.3 @@ -435,7 +435,7 @@ int do_settimeofday(struct timespec *tv)
    16.4  	s64 nsec;
    16.5  	unsigned int cpu;
    16.6  	struct shadow_time_info *shadow;
    16.7 -	dom0_op_t op;
    16.8 +	struct xen_platform_op op;
    16.9  
   16.10  	if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
   16.11  		return -EINVAL;
   16.12 @@ -460,11 +460,11 @@ int do_settimeofday(struct timespec *tv)
   16.13  	__normalize_time(&sec, &nsec);
   16.14  
   16.15  	if (is_initial_xendomain() && !independent_wallclock) {
   16.16 -		op.cmd = DOM0_SETTIME;
   16.17 +		op.cmd = XENPF_settime;
   16.18  		op.u.settime.secs        = sec;
   16.19  		op.u.settime.nsecs       = nsec;
   16.20  		op.u.settime.system_time = shadow->system_timestamp;
   16.21 -		HYPERVISOR_dom0_op(&op);
   16.22 +		HYPERVISOR_platform_op(&op);
   16.23  		update_wallclock();
   16.24  	} else if (independent_wallclock) {
   16.25  		nsec -= shadow->system_timestamp;
   16.26 @@ -488,7 +488,7 @@ static void sync_xen_wallclock(unsigned 
   16.27  {
   16.28  	time_t sec;
   16.29  	s64 nsec;
   16.30 -	dom0_op_t op;
   16.31 +	struct xen_platform_op op;
   16.32  
   16.33  	if (!ntp_synced() || independent_wallclock || !is_initial_xendomain())
   16.34  		return;
   16.35 @@ -499,11 +499,11 @@ static void sync_xen_wallclock(unsigned 
   16.36  	nsec = xtime.tv_nsec + ((jiffies - wall_jiffies) * (u64)NS_PER_TICK);
   16.37  	__normalize_time(&sec, &nsec);
   16.38  
   16.39 -	op.cmd = DOM0_SETTIME;
   16.40 +	op.cmd = XENPF_settime;
   16.41  	op.u.settime.secs        = sec;
   16.42  	op.u.settime.nsecs       = nsec;
   16.43  	op.u.settime.system_time = processed_system_time;
   16.44 -	HYPERVISOR_dom0_op(&op);
   16.45 +	HYPERVISOR_platform_op(&op);
   16.46  
   16.47  	update_wallclock();
   16.48  
    17.1 --- a/linux-2.6-xen-sparse/arch/i386/mm/hypervisor.c	Fri Mar 09 11:45:19 2007 +0000
    17.2 +++ b/linux-2.6-xen-sparse/arch/i386/mm/hypervisor.c	Fri Mar 09 11:45:49 2007 +0000
    17.3 @@ -146,7 +146,7 @@ void xen_tlb_flush_mask(cpumask_t *mask)
    17.4  	if ( cpus_empty(*mask) )
    17.5  		return;
    17.6  	op.cmd = MMUEXT_TLB_FLUSH_MULTI;
    17.7 -	op.arg2.vcpumask = mask->bits;
    17.8 +	set_xen_guest_handle(op.arg2.vcpumask, mask->bits);
    17.9  	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   17.10  }
   17.11  
   17.12 @@ -165,7 +165,7 @@ void xen_invlpg_mask(cpumask_t *mask, un
   17.13  		return;
   17.14  	op.cmd = MMUEXT_INVLPG_MULTI;
   17.15  	op.arg1.linear_addr = ptr & PAGE_MASK;
   17.16 -	op.arg2.vcpumask    = mask->bits;
   17.17 +	set_xen_guest_handle(op.arg2.vcpumask, mask->bits);
   17.18  	BUG_ON(HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0);
   17.19  }
   17.20  
    18.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/xcom_hcall.c	Fri Mar 09 11:45:19 2007 +0000
    18.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/xcom_hcall.c	Fri Mar 09 11:45:49 2007 +0000
    18.3 @@ -21,7 +21,7 @@
    18.4  #include <linux/gfp.h>
    18.5  #include <linux/module.h>
    18.6  #include <xen/interface/xen.h>
    18.7 -#include <xen/interface/dom0_ops.h>
    18.8 +#include <xen/interface/platform.h>
    18.9  #include <xen/interface/memory.h>
   18.10  #include <xen/interface/xencomm.h>
   18.11  #include <xen/interface/version.h>
    19.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/xcom_mini.c	Fri Mar 09 11:45:19 2007 +0000
    19.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/xcom_mini.c	Fri Mar 09 11:45:49 2007 +0000
    19.3 @@ -20,7 +20,7 @@
    19.4  #include <linux/kernel.h>
    19.5  #include <linux/module.h>
    19.6  #include <xen/interface/xen.h>
    19.7 -#include <xen/interface/dom0_ops.h>
    19.8 +#include <xen/interface/platform.h>
    19.9  #include <xen/interface/memory.h>
   19.10  #include <xen/interface/xencomm.h>
   19.11  #include <xen/interface/version.h>
    20.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/xcom_privcmd.c	Fri Mar 09 11:45:19 2007 +0000
    20.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/xcom_privcmd.c	Fri Mar 09 11:45:49 2007 +0000
    20.3 @@ -22,7 +22,7 @@
    20.4  #include <linux/gfp.h>
    20.5  #include <linux/module.h>
    20.6  #include <xen/interface/xen.h>
    20.7 -#include <xen/interface/dom0_ops.h>
    20.8 +#include <xen/interface/platform.h>
    20.9  #define __XEN__
   20.10  #include <xen/interface/domctl.h>
   20.11  #include <xen/interface/sysctl.h>
   20.12 @@ -40,25 +40,25 @@
   20.13  #define ROUND_DIV(v,s) (((v) + (s) - 1) / (s))
   20.14  
   20.15  static int
   20.16 -xencomm_privcmd_dom0_op(privcmd_hypercall_t *hypercall)
   20.17 +xencomm_privcmd_platform_op(privcmd_hypercall_t *hypercall)
   20.18  {
   20.19 -	dom0_op_t kern_op;
   20.20 -	dom0_op_t __user *user_op = (dom0_op_t __user *)hypercall->arg[0];
   20.21 +	struct xen_platform_op kern_op;
   20.22 +	struct xen_platform_op __user *user_op = (struct xen_platform_op __user *)hypercall->arg[0];
   20.23  	struct xencomm_handle *op_desc;
   20.24  	struct xencomm_handle *desc = NULL;
   20.25  	int ret = 0;
   20.26  
   20.27 -	if (copy_from_user(&kern_op, user_op, sizeof(dom0_op_t)))
   20.28 +	if (copy_from_user(&kern_op, user_op, sizeof(struct xen_platform_op)))
   20.29  		return -EFAULT;
   20.30  
   20.31 -	if (kern_op.interface_version != DOM0_INTERFACE_VERSION)
   20.32 +	if (kern_op.interface_version != XENPF_INTERFACE_VERSION)
   20.33  		return -EACCES;
   20.34  
   20.35  	op_desc = xencomm_create_inline(&kern_op);
   20.36  
   20.37  	switch (kern_op.cmd) {
   20.38  	default:
   20.39 -		printk("%s: unknown dom0 cmd %d\n", __func__, kern_op.cmd);
   20.40 +		printk("%s: unknown platform cmd %d\n", __func__, kern_op.cmd);
   20.41  		return -ENOSYS;
   20.42  	}
   20.43  
   20.44 @@ -67,10 +67,10 @@ xencomm_privcmd_dom0_op(privcmd_hypercal
   20.45  		return ret;
   20.46  	}
   20.47  
   20.48 -	ret = xencomm_arch_hypercall_dom0_op(op_desc);
   20.49 +	ret = xencomm_arch_hypercall_platform_op(op_desc);
   20.50  
   20.51  	/* FIXME: should we restore the handle?  */
   20.52 -	if (copy_to_user(user_op, &kern_op, sizeof(dom0_op_t)))
   20.53 +	if (copy_to_user(user_op, &kern_op, sizeof(struct xen_platform_op)))
   20.54  		ret = -EFAULT;
   20.55  
   20.56  	if (desc)
   20.57 @@ -638,8 +638,8 @@ int
   20.58  privcmd_hypercall(privcmd_hypercall_t *hypercall)
   20.59  {
   20.60  	switch (hypercall->op) {
   20.61 -	case __HYPERVISOR_dom0_op:
   20.62 -		return xencomm_privcmd_dom0_op(hypercall);
   20.63 +	case __HYPERVISOR_platform_op:
   20.64 +		return xencomm_privcmd_platform_op(hypercall);
   20.65  	case __HYPERVISOR_domctl:
   20.66  		return xencomm_privcmd_domctl(hypercall);
   20.67  	case __HYPERVISOR_sysctl:
    21.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/ioport-xen.c	Fri Mar 09 11:45:19 2007 +0000
    21.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/ioport-xen.c	Fri Mar 09 11:45:49 2007 +0000
    21.3 @@ -59,7 +59,7 @@ asmlinkage long sys_ioperm(unsigned long
    21.4  		memset(bitmap, 0xff, IO_BITMAP_BYTES);
    21.5  		t->io_bitmap_ptr = bitmap;
    21.6  
    21.7 -		set_iobitmap.bitmap   = (char *)bitmap;
    21.8 +		set_xen_guest_handle(set_iobitmap.bitmap, (char *)bitmap);
    21.9  		set_iobitmap.nr_ports = IO_BITMAP_BITS;
   21.10  		HYPERVISOR_physdev_op(PHYSDEVOP_set_iobitmap, &set_iobitmap);
   21.11  	}
    22.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c	Fri Mar 09 11:45:19 2007 +0000
    22.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c	Fri Mar 09 11:45:49 2007 +0000
    22.3 @@ -50,7 +50,7 @@
    22.4  #include <asm/pda.h>
    22.5  #include <asm/prctl.h>
    22.6  #include <asm/kdebug.h>
    22.7 -#include <xen/interface/dom0_ops.h>
    22.8 +#include <xen/interface/platform.h>
    22.9  #include <xen/interface/physdev.h>
   22.10  #include <xen/interface/vcpu.h>
   22.11  #include <asm/desc.h>
   22.12 @@ -540,7 +540,8 @@ static inline void __save_init_fpu( stru
   22.13  	}
   22.14  
   22.15  	if (unlikely(prev->io_bitmap_ptr || next->io_bitmap_ptr)) {
   22.16 -		iobmp_op.bitmap   = (char *)next->io_bitmap_ptr;
   22.17 +		set_xen_guest_handle(iobmp_op.bitmap,
   22.18 +				     (char *)next->io_bitmap_ptr);
   22.19  		iobmp_op.nr_ports = next->io_bitmap_ptr ? IO_BITMAP_BITS : 0;
   22.20  		mcl->op      = __HYPERVISOR_physdev_op;
   22.21  		mcl->args[0] = PHYSDEVOP_set_iobitmap;
    23.1 --- a/linux-2.6-xen-sparse/drivers/xen/Kconfig	Fri Mar 09 11:45:19 2007 +0000
    23.2 +++ b/linux-2.6-xen-sparse/drivers/xen/Kconfig	Fri Mar 09 11:45:49 2007 +0000
    23.3 @@ -13,7 +13,7 @@ config XEN
    23.4  if XEN
    23.5  config XEN_INTERFACE_VERSION
    23.6  	hex
    23.7 -	default 0x00030203
    23.8 +	default 0x00030205
    23.9  
   23.10  menu "XEN"
   23.11  
    24.1 --- a/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c	Fri Mar 09 11:45:19 2007 +0000
    24.2 +++ b/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c	Fri Mar 09 11:45:49 2007 +0000
    24.3 @@ -11,7 +11,6 @@
    24.4  #include <asm/mmu_context.h>
    24.5  #include <xen/evtchn.h>
    24.6  #include <asm/hypervisor.h>
    24.7 -#include <xen/interface/dom0_ops.h>
    24.8  #include <xen/xenbus.h>
    24.9  #include <linux/cpu.h>
   24.10  #include <linux/kthread.h>
    25.1 --- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c	Fri Mar 09 11:45:19 2007 +0000
    25.2 +++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c	Fri Mar 09 11:45:49 2007 +0000
    25.3 @@ -28,7 +28,6 @@
    25.4  #include <asm/hypervisor.h>
    25.5  #include <xen/public/privcmd.h>
    25.6  #include <xen/interface/xen.h>
    25.7 -#include <xen/interface/dom0_ops.h>
    25.8  #include <xen/xen_proc.h>
    25.9  
   25.10  static struct proc_dir_entry *privcmd_intf;
    26.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypercall.h	Fri Mar 09 11:45:19 2007 +0000
    26.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypercall.h	Fri Mar 09 11:45:49 2007 +0000
    26.3 @@ -201,11 +201,11 @@ HYPERVISOR_set_timer_op(
    26.4  }
    26.5  
    26.6  static inline int
    26.7 -HYPERVISOR_dom0_op(
    26.8 -	dom0_op_t *dom0_op)
    26.9 +HYPERVISOR_platform_op(
   26.10 +	struct xen_platform_op *platform_op)
   26.11  {
   26.12 -	dom0_op->interface_version = DOM0_INTERFACE_VERSION;
   26.13 -	return _hypercall1(int, dom0_op, dom0_op);
   26.14 +	platform_op->interface_version = XENPF_INTERFACE_VERSION;
   26.15 +	return _hypercall1(int, platform_op, platform_op);
   26.16  }
   26.17  
   26.18  static inline int
    27.1 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypervisor.h	Fri Mar 09 11:45:19 2007 +0000
    27.2 +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypervisor.h	Fri Mar 09 11:45:49 2007 +0000
    27.3 @@ -38,7 +38,7 @@
    27.4  #include <linux/version.h>
    27.5  #include <linux/errno.h>
    27.6  #include <xen/interface/xen.h>
    27.7 -#include <xen/interface/dom0_ops.h>
    27.8 +#include <xen/interface/platform.h>
    27.9  #include <xen/interface/event_channel.h>
   27.10  #include <xen/interface/physdev.h>
   27.11  #include <xen/interface/sched.h>
    28.1 --- a/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h	Fri Mar 09 11:45:19 2007 +0000
    28.2 +++ b/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h	Fri Mar 09 11:45:49 2007 +0000
    28.3 @@ -120,9 +120,9 @@ HYPERVISOR_set_timer_op(u64 timeout)
    28.4  }
    28.5  
    28.6  static inline int
    28.7 -xencomm_arch_hypercall_dom0_op(struct xencomm_handle *op)
    28.8 +xencomm_arch_hypercall_platform_op(struct xencomm_handle *op)
    28.9  {
   28.10 -	return _hypercall1(int, dom0_op, op);
   28.11 +	return _hypercall1(int, platform_op, op);
   28.12  }
   28.13  
   28.14  static inline int
    29.1 --- a/linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h	Fri Mar 09 11:45:19 2007 +0000
    29.2 +++ b/linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h	Fri Mar 09 11:45:49 2007 +0000
    29.3 @@ -51,7 +51,7 @@ extern int running_on_xen;
    29.4  #include <linux/version.h>
    29.5  #include <linux/errno.h>
    29.6  #include <xen/interface/xen.h>
    29.7 -#include <xen/interface/dom0_ops.h>
    29.8 +#include <xen/interface/platform.h>
    29.9  #include <xen/interface/event_channel.h>
   29.10  #include <xen/interface/physdev.h>
   29.11  #include <xen/interface/sched.h>
    30.1 --- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/hypercall.h	Fri Mar 09 11:45:19 2007 +0000
    30.2 +++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/hypercall.h	Fri Mar 09 11:45:49 2007 +0000
    30.3 @@ -204,11 +204,11 @@ HYPERVISOR_set_timer_op(
    30.4  }
    30.5  
    30.6  static inline int
    30.7 -HYPERVISOR_dom0_op(
    30.8 -	dom0_op_t *dom0_op)
    30.9 +HYPERVISOR_platform_op(
   30.10 +	struct xen_platform_op *platform_op)
   30.11  {
   30.12 -	dom0_op->interface_version = DOM0_INTERFACE_VERSION;
   30.13 -	return _hypercall1(int, dom0_op, dom0_op);
   30.14 +	platform_op->interface_version = XENPF_INTERFACE_VERSION;
   30.15 +	return _hypercall1(int, platform_op, platform_op);
   30.16  }
   30.17  
   30.18  static inline int