[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] linux-2.6.18: update to latest interface version
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> --- a/arch/i386/kernel/setup-xen.c +++ b/arch/i386/kernel/setup-xen.c @@ -1756,8 +1756,6 @@ void __init setup_arch(char **cmdline_p) * kernel parameter); shrink reservation with the HV */ struct xen_memory_reservation reservation = { - .address_bits = 0, - .extent_order = 0, .domid = DOMID_SELF }; unsigned int difference; --- a/arch/i386/mm/hypervisor.c +++ b/arch/i386/mm/hypervisor.c @@ -266,7 +266,7 @@ int xen_create_contiguous_region( .out = { .nr_extents = 1, .extent_order = order, - .address_bits = address_bits, + .mem_flags = XENMEMF_address_bits(address_bits), .domid = DOMID_SELF } }; @@ -457,7 +457,7 @@ int xen_limit_pages_to_max_mfn( }, .out = { .extent_order = 0, - .address_bits = address_bits, + .mem_flags = XENMEMF_address_bits(address_bits), .domid = DOMID_SELF } }; --- a/arch/x86_64/kernel/setup-xen.c +++ b/arch/x86_64/kernel/setup-xen.c @@ -787,8 +787,6 @@ void __init setup_arch(char **cmdline_p) * kernel parameter); shrink reservation with the HV */ struct xen_memory_reservation reservation = { - .address_bits = 0, - .extent_order = 0, .domid = DOMID_SELF }; unsigned int difference; --- a/drivers/xen/Kconfig +++ b/drivers/xen/Kconfig @@ -10,7 +10,7 @@ config XEN if XEN config XEN_INTERFACE_VERSION hex - default 0x00030207 + default 0x00040200 menu "XEN" --- a/drivers/xen/balloon/balloon.c +++ b/drivers/xen/balloon/balloon.c @@ -244,9 +244,7 @@ static int increase_reservation(unsigned struct page *page; long rc; struct xen_memory_reservation reservation = { - .address_bits = 0, - .extent_order = 0, - .domid = DOMID_SELF + .domid = DOMID_SELF }; if (nr_pages > ARRAY_SIZE(frame_list)) @@ -312,9 +310,7 @@ static int decrease_reservation(unsigned int need_sleep = 0; int ret; struct xen_memory_reservation reservation = { - .address_bits = 0, - .extent_order = 0, - .domid = DOMID_SELF + .domid = DOMID_SELF }; if (nr_pages > ARRAY_SIZE(frame_list)) --- a/drivers/xen/blkback/common.h +++ b/drivers/xen/blkback/common.h @@ -33,6 +33,7 @@ #include <linux/blkdev.h> #include <linux/wait.h> #include <asm/hypervisor.h> +#include <xen/barrier.h> #include <xen/blkif.h> #include <xen/driver_util.h> #include <xen/xenbus.h> --- a/drivers/xen/blkfront/block.h +++ b/drivers/xen/blkfront/block.h @@ -47,6 +47,7 @@ #include <linux/blkdev.h> #include <linux/major.h> #include <asm/hypervisor.h> +#include <xen/barrier.h> #include <xen/xenbus.h> #include <xen/gnttab.h> #include <xen/interface/xen.h> --- a/drivers/xen/blktap/common.h +++ b/drivers/xen/blktap/common.h @@ -32,6 +32,7 @@ #include <linux/slab.h> #include <linux/blkdev.h> #include <asm/hypervisor.h> +#include <xen/barrier.h> #include <xen/blkif.h> #include <xen/driver_util.h> #include <xen/xenbus.h> --- a/drivers/xen/blktap2/blktap.h +++ b/drivers/xen/blktap2/blktap.h @@ -6,6 +6,7 @@ #include <linux/cdev.h> #include <linux/init.h> #include <linux/scatterlist.h> +#include <xen/barrier.h> #include <xen/blkif.h> #include <xen/gnttab.h> --- a/drivers/xen/core/evtchn.c +++ b/drivers/xen/core/evtchn.c @@ -1065,7 +1065,8 @@ void irq_resume(void) struct physdev_pirq_eoi_gmfn eoi_gmfn; eoi_gmfn.gmfn = virt_to_machine(pirq_needs_eoi) >> PAGE_SHIFT; - if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_gmfn, &eoi_gmfn)) + if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_gmfn_v1, + &eoi_gmfn)) BUG(); } @@ -1162,7 +1163,7 @@ void __init xen_init_IRQ(void) pirq_needs_eoi = alloc_bootmem_pages(sizeof(unsigned long) * BITS_TO_LONGS(ALIGN(NR_PIRQS, PAGE_SIZE * 8))); eoi_gmfn.gmfn = virt_to_machine(pirq_needs_eoi) >> PAGE_SHIFT; - if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_gmfn, &eoi_gmfn) == 0) + if (HYPERVISOR_physdev_op(PHYSDEVOP_pirq_eoi_gmfn_v1, &eoi_gmfn) == 0) pirq_eoi_does_unmask = 1; /* No event channels are 'live' right now. */ --- a/drivers/xen/core/gnttab.c +++ b/drivers/xen/core/gnttab.c @@ -53,7 +53,7 @@ /* External tools reserve first few grant table entries. */ #define NR_RESERVED_ENTRIES 8 #define GNTTAB_LIST_END 0xffffffff -#define ENTRIES_PER_GRANT_FRAME (PAGE_SIZE / sizeof(grant_entry_t)) +#define ENTRIES_PER_GRANT_FRAME (PAGE_SIZE / sizeof(grant_entry_v1_t)) static grant_ref_t **gnttab_list; static unsigned int nr_grant_frames; @@ -62,7 +62,7 @@ static int gnttab_free_count; static grant_ref_t gnttab_free_head; static DEFINE_SPINLOCK(gnttab_list_lock); -static struct grant_entry *shared; +static struct grant_entry_v1 *shared; static struct gnttab_free_callback *gnttab_free_callback_list; --- a/drivers/xen/netback/common.h +++ b/drivers/xen/netback/common.h @@ -38,6 +38,7 @@ #include <linux/etherdevice.h> #include <linux/wait.h> #include <xen/interface/io/netif.h> +#include <xen/barrier.h> #include <xen/driver_util.h> #include <xen/xenbus.h> #include <xen/interface/event_channel.h> --- a/drivers/xen/netfront/netfront.c +++ b/drivers/xen/netfront/netfront.c @@ -719,7 +719,6 @@ static void network_alloc_rx_buffers(str struct page *page; int i, batch_target, notify; RING_IDX req_prod = np->rx.req_prod_pvt; - struct xen_memory_reservation reservation; grant_ref_t ref; unsigned long pfn; void *vaddr; @@ -824,16 +823,17 @@ no_skb: req->gref = ref; } - if ( nr_flips != 0 ) { + if (nr_flips) { + struct xen_memory_reservation reservation = { + .nr_extents = nr_flips, + .domid = DOMID_SELF, + }; + /* Tell the ballon driver what is going on. */ balloon_update_driver_allowance(i); set_xen_guest_handle(reservation.extent_start, np->rx_pfn_array); - reservation.nr_extents = nr_flips; - reservation.extent_order = 0; - reservation.address_bits = 0; - reservation.domid = DOMID_SELF; if (!xen_feature(XENFEAT_auto_translated_physmap)) { /* After all PTEs have been zapped, flush the TLB. */ --- a/drivers/xen/netfront/netfront.h +++ b/drivers/xen/netfront/netfront.h @@ -33,6 +33,7 @@ #ifndef NETFRONT_H #define NETFRONT_H +#include <xen/barrier.h> #include <xen/interface/io/netif.h> #include <linux/netdevice.h> #include <linux/skbuff.h> --- a/drivers/xen/scsiback/common.h +++ b/drivers/xen/scsiback/common.h @@ -47,6 +47,7 @@ #include <scsi/scsi_dbg.h> #include <scsi/scsi_eh.h> #include <asm/hypervisor.h> +#include <xen/barrier.h> #include <xen/driver_util.h> #include <xen/xenbus.h> #include <xen/interface/io/ring.h> --- a/drivers/xen/scsifront/common.h +++ b/drivers/xen/scsifront/common.h @@ -45,6 +45,7 @@ #include <scsi/scsi_device.h> #include <scsi/scsi.h> #include <scsi/scsi_host.h> +#include <xen/barrier.h> #include <xen/xenbus.h> #include <xen/gnttab.h> #include <xen/evtchn.h> --- a/drivers/xen/usbback/usbback.h +++ b/drivers/xen/usbback/usbback.h @@ -54,6 +54,7 @@ #include <linux/wait.h> #include <linux/list.h> #include <linux/kref.h> +#include <xen/barrier.h> #include <xen/driver_util.h> #include <xen/xenbus.h> #include <xen/interface/event_channel.h> --- a/drivers/xen/usbfront/usbfront.h +++ b/drivers/xen/usbfront/usbfront.h @@ -52,6 +52,7 @@ #include <linux/kthread.h> #include <linux/wait.h> #include <asm/io.h> +#include <xen/barrier.h> #include <xen/xenbus.h> #include <xen/evtchn.h> #include <xen/gnttab.h> --- /dev/null +++ b/include/xen/barrier.h @@ -0,0 +1,10 @@ +#ifndef __XEN_BARRIER_H__ +#define __XEN_BARRIER_H__ + +#include <asm/system.h> + +#define xen_mb() mb() +#define xen_rmb() rmb() +#define xen_wmb() wmb() + +#endif /* __XEN_BARRIER_H__ */ Attachment:
xen-interface.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |