Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2014-08-06 15:37:49 +0200
committerJan Beulich <jbeulich@suse.com>2014-08-06 15:37:49 +0200
commit0e31675b91f2087bc1b543ca380779d32dc821ed (patch)
tree3ab81179f805cc6f0383c73a81a0a40fa7b0a9fb
parentc485b2befbacb247775d31008158fb7338235bdb (diff)
- Update Xen patches to 3.16-final.
- vscsi: support larger transfer sizes (bnc#774818).
-rw-r--r--patches.xen/xen-privcmd-hcall-preemption4
-rw-r--r--patches.xen/xen-vscsi-large-requests784
-rw-r--r--patches.xen/xen3-auto-common.diff68
-rw-r--r--patches.xen/xen3-fixup-common6
-rw-r--r--patches.xen/xen3-patch-2.6.202
-rw-r--r--patches.xen/xen3-patch-2.6.2416
-rw-r--r--patches.xen/xen3-patch-2.6.2712
-rw-r--r--patches.xen/xen3-patch-2.6.314
-rw-r--r--patches.xen/xen3-patch-2.6.3310
-rw-r--r--patches.xen/xen3-patch-2.6.342
-rw-r--r--patches.xen/xen3-patch-3.136
-rw-r--r--patches.xen/xen3-patch-3.16 (renamed from patches.xen/xen3-patch-3.16-rc7)29
-rw-r--r--patches.xen/xen3-patch-3.232
-rw-r--r--patches.xen/xen3-stack-unwind4
-rw-r--r--patches.xen/xen3-x86_64-unwind-annotations10
-rw-r--r--series.conf3
16 files changed, 900 insertions, 92 deletions
diff --git a/patches.xen/xen-privcmd-hcall-preemption b/patches.xen/xen-privcmd-hcall-preemption
index 5528aae043..b6a3539b9d 100644
--- a/patches.xen/xen-privcmd-hcall-preemption
+++ b/patches.xen/xen-privcmd-hcall-preemption
@@ -35,9 +35,9 @@ References: bnc#861093
jmp ret_from_intr
CFI_ENDPROC
---- head.orig/arch/x86/kernel/entry_64-xen.S 2014-06-27 16:52:26.000000000 +0200
+--- head.orig/arch/x86/kernel/entry_64-xen.S 2014-08-06 12:41:19.000000000 +0200
+++ head/arch/x86/kernel/entry_64-xen.S 2014-01-16 09:58:42.000000000 +0100
-@@ -947,6 +947,17 @@ ENTRY(do_hypervisor_callback) # do_hyp
+@@ -942,6 +942,17 @@ ENTRY(do_hypervisor_callback) # do_hyp
popq %rsp
CFI_DEF_CFA_REGISTER rsp
decl PER_CPU_VAR(irq_count)
diff --git a/patches.xen/xen-vscsi-large-requests b/patches.xen/xen-vscsi-large-requests
new file mode 100644
index 0000000000..d9aaec3472
--- /dev/null
+++ b/patches.xen/xen-vscsi-large-requests
@@ -0,0 +1,784 @@
+From: jbeulich@suse.com
+Subject: vscsi: support larger transfer sizes
+Patch-mainline: n/a
+References: bnc#774818
+
+--- head.orig/drivers/xen/scsiback/common.h 2012-06-06 13:53:26.000000000 +0200
++++ head/drivers/xen/scsiback/common.h 2014-07-24 13:43:27.000000000 +0200
+@@ -95,10 +95,15 @@ struct vscsibk_info {
+ unsigned int waiting_reqs;
+ struct page **mmap_pages;
+
++ struct pending_req *preq;
++
++ union {
++ struct gnttab_map_grant_ref *gmap;
++ struct gnttab_unmap_grant_ref *gunmap;
++ };
+ };
+
+-typedef struct {
+- unsigned char act;
++typedef struct pending_req {
+ struct vscsibk_info *info;
+ struct scsi_device *sdev;
+
+@@ -115,7 +120,8 @@ typedef struct {
+
+ uint32_t request_bufflen;
+ struct scatterlist *sgl;
+- grant_ref_t gref[VSCSIIF_SG_TABLESIZE];
++ grant_ref_t *gref;
++ vscsiif_segment_t *segs;
+
+ int32_t rslt;
+ uint32_t resid;
+@@ -124,7 +130,7 @@ typedef struct {
+ struct list_head free_list;
+ } pending_req_t;
+
+-
++extern unsigned int vscsiif_segs;
+
+ #define scsiback_get(_b) (atomic_inc(&(_b)->nr_unreplied_reqs))
+ #define scsiback_put(_b) \
+@@ -164,7 +170,7 @@ void scsiback_release_translation_entry(
+
+ int scsiback_cmd_exec(pending_req_t *pending_req);
+ void scsiback_do_resp_with_sense(char *sense_buffer, int32_t result,
+- uint32_t resid, pending_req_t *pending_req);
++ uint32_t resid, pending_req_t *, uint8_t act);
+ void scsiback_fast_flush_area(pending_req_t *req);
+
+ void scsiback_rsp_emulation(pending_req_t *pending_req);
+--- head.orig/drivers/xen/scsiback/emulate.c 2014-07-03 11:37:04.000000000 +0200
++++ head/drivers/xen/scsiback/emulate.c 2014-07-24 13:43:27.000000000 +0200
+@@ -351,7 +351,7 @@ int scsiback_req_emulation_or_cmdexec(pe
+ scsiback_fast_flush_area(pending_req);
+ scsiback_do_resp_with_sense(pending_req->sense_buffer,
+ pending_req->rslt, pending_req->resid,
+- pending_req);
++ pending_req, VSCSIIF_ACT_SCSI_CDB);
+ return 0;
+ }
+
+--- head.orig/drivers/xen/scsiback/interface.c 2013-06-20 15:39:03.000000000 +0200
++++ head/drivers/xen/scsiback/interface.c 2013-06-20 16:00:38.000000000 +0200
+@@ -51,6 +51,13 @@ struct vscsibk_info *vscsibk_info_alloc(
+ if (!info)
+ return ERR_PTR(-ENOMEM);
+
++ info->gmap = kcalloc(max(sizeof(*info->gmap), sizeof(*info->gunmap)),
++ vscsiif_segs, GFP_KERNEL);
++ if (!info->gmap) {
++ kfree(info);
++ return ERR_PTR(-ENOMEM);
++ }
++
+ info->domid = domid;
+ spin_lock_init(&info->ring_lock);
+ atomic_set(&info->nr_unreplied_reqs, 0);
+@@ -122,6 +129,7 @@ void scsiback_disconnect(struct vscsibk_
+
+ void scsiback_free(struct vscsibk_info *info)
+ {
++ kfree(info->gmap);
+ kmem_cache_free(scsiback_cachep, info);
+ }
+
+--- head.orig/drivers/xen/scsiback/scsiback.c 2014-07-29 11:16:52.000000000 +0200
++++ head/drivers/xen/scsiback/scsiback.c 2014-07-24 14:27:47.000000000 +0200
+@@ -56,6 +56,10 @@ static unsigned int vscsiif_reqs = 128;
+ module_param_named(reqs, vscsiif_reqs, uint, 0);
+ MODULE_PARM_DESC(reqs, "Number of scsiback requests to allocate");
+
++unsigned int vscsiif_segs = VSCSIIF_SG_TABLESIZE;
++module_param_named(segs, vscsiif_segs, uint, 0);
++MODULE_PARM_DESC(segs, "Number of segments to allow per request");
++
+ static bool log_print_stat;
+ module_param(log_print_stat, bool, 0644);
+
+@@ -67,7 +71,7 @@ static grant_handle_t *pending_grant_han
+
+ static int vaddr_pagenr(pending_req_t *req, int seg)
+ {
+- return (req - pending_reqs) * VSCSIIF_SG_TABLESIZE + seg;
++ return (req - pending_reqs) * vscsiif_segs + seg;
+ }
+
+ static unsigned long vaddr(pending_req_t *req, int seg)
+@@ -82,7 +86,7 @@ static unsigned long vaddr(pending_req_t
+
+ void scsiback_fast_flush_area(pending_req_t *req)
+ {
+- struct gnttab_unmap_grant_ref unmap[VSCSIIF_SG_TABLESIZE];
++ struct gnttab_unmap_grant_ref *unmap = req->info->gunmap;
+ unsigned int i, invcount = 0;
+ grant_handle_t handle;
+ int err;
+@@ -117,6 +121,7 @@ static pending_req_t * alloc_req(struct
+ if (!list_empty(&pending_free)) {
+ req = list_entry(pending_free.next, pending_req_t, free_list);
+ list_del(&req->free_list);
++ req->nr_segments = 0;
+ }
+ spin_unlock_irqrestore(&pending_free_lock, flags);
+ return req;
+@@ -144,7 +149,8 @@ static void scsiback_notify_work(struct
+ }
+
+ void scsiback_do_resp_with_sense(char *sense_buffer, int32_t result,
+- uint32_t resid, pending_req_t *pending_req)
++ uint32_t resid, pending_req_t *pending_req,
++ uint8_t act)
+ {
+ vscsiif_response_t *ring_res;
+ struct vscsibk_info *info = pending_req->info;
+@@ -159,6 +165,7 @@ void scsiback_do_resp_with_sense(char *s
+ ring_res = RING_GET_RESPONSE(&info->ring, info->ring.rsp_prod_pvt);
+ info->ring.rsp_prod_pvt++;
+
++ ring_res->act = act;
+ ring_res->rslt = result;
+ ring_res->rqid = pending_req->rqid;
+
+@@ -186,7 +193,8 @@ void scsiback_do_resp_with_sense(char *s
+ if (notify)
+ notify_remote_via_irq(info->irq);
+
+- free_req(pending_req);
++ if (act != VSCSIIF_ACT_SCSI_SG_PRESET)
++ free_req(pending_req);
+ }
+
+ static void scsiback_print_status(char *sense_buffer, int errors,
+@@ -223,25 +231,25 @@ static void scsiback_cmd_done(struct req
+ scsiback_rsp_emulation(pending_req);
+
+ scsiback_fast_flush_area(pending_req);
+- scsiback_do_resp_with_sense(sense_buffer, errors, resid, pending_req);
++ scsiback_do_resp_with_sense(sense_buffer, errors, resid, pending_req,
++ VSCSIIF_ACT_SCSI_CDB);
+ scsiback_put(pending_req->info);
+
+ __blk_put_request(req->q, req);
+ }
+
+
+-static int scsiback_gnttab_data_map(vscsiif_request_t *ring_req,
+- pending_req_t *pending_req)
++static int scsiback_gnttab_data_map(const vscsiif_segment_t *segs,
++ unsigned int nr_segs,
++ pending_req_t *pending_req)
+ {
+ u32 flags;
+- int write;
+- int i, err = 0;
+- unsigned int data_len = 0;
+- struct gnttab_map_grant_ref map[VSCSIIF_SG_TABLESIZE];
++ int write, err = 0;
++ unsigned int i, j, data_len = 0;
+ struct vscsibk_info *info = pending_req->info;
+-
++ struct gnttab_map_grant_ref *map = info->gmap;
+ int data_dir = (int)pending_req->sc_data_direction;
+- unsigned int nr_segments = (unsigned int)pending_req->nr_segments;
++ unsigned int nr_segments = pending_req->nr_segments + nr_segs;
+
+ write = (data_dir == DMA_TO_DEVICE);
+
+@@ -262,14 +270,20 @@ static int scsiback_gnttab_data_map(vscs
+ if (write)
+ flags |= GNTMAP_readonly;
+
+- for (i = 0; i < nr_segments; i++)
++ for (i = 0; i < pending_req->nr_segments; i++)
+ gnttab_set_map_op(&map[i], vaddr(pending_req, i), flags,
+- ring_req->seg[i].gref,
++ pending_req->segs[i].gref,
+ info->domid);
++ for (j = 0; i < nr_segments; i++, j++)
++ gnttab_set_map_op(&map[i], vaddr(pending_req, i), flags,
++ segs[j].gref,
++ info->domid);
++
+
+ err = HYPERVISOR_grant_table_op(GNTTABOP_map_grant_ref, map, nr_segments);
+ BUG_ON(err);
+
++ j = 0;
+ for_each_sg (pending_req->sgl, sg, nr_segments, i) {
+ struct page *pg;
+
+@@ -292,8 +306,15 @@ static int scsiback_gnttab_data_map(vscs
+ set_phys_to_machine(page_to_pfn(pg),
+ FOREIGN_FRAME(map[i].dev_bus_addr >> PAGE_SHIFT));
+
+- sg_set_page(sg, pg, ring_req->seg[i].length,
+- ring_req->seg[i].offset);
++ if (i < pending_req->nr_segments)
++ sg_set_page(sg, pg,
++ pending_req->segs[i].length,
++ pending_req->segs[i].offset);
++ else {
++ sg_set_page(sg, pg, segs[j].length,
++ segs[j].offset);
++ ++j;
++ }
+ data_len += sg->length;
+
+ barrier();
+@@ -304,6 +325,8 @@ static int scsiback_gnttab_data_map(vscs
+
+ }
+
++ pending_req->nr_segments = nr_segments;
++
+ if (err)
+ goto fail_flush;
+ }
+@@ -473,7 +496,8 @@ static void scsiback_device_reset_exec(p
+ scsiback_get(info);
+ err = scsi_reset_provider(sdev, SCSI_TRY_RESET_DEVICE);
+
+- scsiback_do_resp_with_sense(NULL, err, 0, pending_req);
++ scsiback_do_resp_with_sense(NULL, err, 0, pending_req,
++ VSCSIIF_ACT_SCSI_RESET);
+ scsiback_put(info);
+
+ return;
+@@ -491,13 +515,11 @@ static int prepare_pending_reqs(struct v
+ {
+ struct scsi_device *sdev;
+ struct ids_tuple vir;
++ unsigned int nr_segs;
+ int err = -EINVAL;
+
+ DPRINTK("%s\n",__FUNCTION__);
+
+- pending_req->rqid = ring_req->rqid;
+- pending_req->act = ring_req->act;
+-
+ pending_req->info = info;
+
+ pending_req->v_chn = vir.chn = ring_req->channel;
+@@ -527,11 +549,10 @@ static int prepare_pending_reqs(struct v
+ goto invalid_value;
+ }
+
+- pending_req->nr_segments = ring_req->nr_segments;
++ nr_segs = ring_req->nr_segments;
+ barrier();
+- if (pending_req->nr_segments > VSCSIIF_SG_TABLESIZE) {
+- DPRINTK("scsiback: invalid parameter nr_seg = %d\n",
+- pending_req->nr_segments);
++ if (pending_req->nr_segments + nr_segs > vscsiif_segs) {
++ DPRINTK("scsiback: invalid nr_segs = %u\n", nr_segs);
+ err = -EINVAL;
+ goto invalid_value;
+ }
+@@ -548,7 +569,7 @@ static int prepare_pending_reqs(struct v
+
+ pending_req->timeout_per_command = ring_req->timeout_per_command;
+
+- if(scsiback_gnttab_data_map(ring_req, pending_req)) {
++ if (scsiback_gnttab_data_map(ring_req->seg, nr_segs, pending_req)) {
+ DPRINTK("scsiback: invalid buffer\n");
+ err = -EINVAL;
+ goto invalid_value;
+@@ -560,6 +581,20 @@ invalid_value:
+ return err;
+ }
+
++static void latch_segments(pending_req_t *pending_req,
++ const struct vscsiif_sg_list *sgl)
++{
++ unsigned int nr_segs = sgl->nr_segments;
++
++ barrier();
++ if (pending_req->nr_segments + nr_segs <= vscsiif_segs) {
++ memcpy(pending_req->segs + pending_req->nr_segments,
++ sgl->seg, nr_segs * sizeof(*sgl->seg));
++ pending_req->nr_segments += nr_segs;
++ }
++ else
++ DPRINTK("scsiback: invalid nr_segs = %u\n", nr_segs);
++}
+
+ static int _scsiback_do_cmd_fn(struct vscsibk_info *info)
+ {
+@@ -586,9 +621,11 @@ static int _scsiback_do_cmd_fn(struct vs
+ }
+
+ while ((rc != rp)) {
++ int act, rqid;
++
+ if (RING_REQUEST_CONS_OVERFLOW(ring, rc))
+ break;
+- pending_req = alloc_req(info);
++ pending_req = info->preq ?: alloc_req(info);
+ if (NULL == pending_req) {
+ more_to_do = 1;
+ break;
+@@ -597,9 +634,26 @@ static int _scsiback_do_cmd_fn(struct vs
+ ring_req = RING_GET_REQUEST(ring, rc);
+ ring->req_cons = ++rc;
+
+- err = prepare_pending_reqs(info, ring_req,
+- pending_req);
+- switch (err ?: pending_req->act) {
++ act = ring_req->act;
++ rqid = ring_req->rqid;
++ barrier();
++ if (!pending_req->nr_segments)
++ pending_req->rqid = rqid;
++ else if (pending_req->rqid != rqid)
++ DPRINTK("scsiback: invalid rqid %04x, expected %04x\n",
++ rqid, pending_req->rqid);
++
++ info->preq = NULL;
++ if (pending_req->rqid != rqid)
++ err = -EINVAL;
++ else if (act == VSCSIIF_ACT_SCSI_SG_PRESET) {
++ latch_segments(pending_req, (void *)ring_req);
++ info->preq = pending_req;
++ err = 0;
++ } else
++ err = prepare_pending_reqs(info, ring_req,
++ pending_req);
++ switch (err ?: act) {
+ case VSCSIIF_ACT_SCSI_CDB:
+ /* The Host mode is through as for Emulation. */
+ if (info->feature == VSCSI_TYPE_HOST ?
+@@ -608,7 +662,8 @@ static int _scsiback_do_cmd_fn(struct vs
+ scsiback_fast_flush_area(pending_req);
+ scsiback_do_resp_with_sense(NULL,
+ DRIVER_ERROR << 24,
+- 0, pending_req);
++ 0, pending_req,
++ act);
+ }
+ break;
+ case VSCSIIF_ACT_SCSI_RESET:
+@@ -616,19 +671,27 @@ static int _scsiback_do_cmd_fn(struct vs
+ scsiback_fast_flush_area(pending_req);
+ scsiback_device_reset_exec(pending_req);
+ break;
++ case VSCSIIF_ACT_SCSI_SG_PRESET:
++ scsiback_do_resp_with_sense(NULL, 0, 0, pending_req,
++ act);
++ break;
+ default:
+ if(!err) {
+ scsiback_fast_flush_area(pending_req);
+ if (printk_ratelimit())
+ pr_err("scsiback: invalid request %#x\n",
+- pending_req->act);
++ act);
+ }
+ scsiback_do_resp_with_sense(NULL, DRIVER_ERROR << 24,
+- 0, pending_req);
++ 0, pending_req, act);
++ break;
++ case -EINVAL:
++ scsiback_do_resp_with_sense(NULL, DRIVER_INVALID << 24,
++ 0, pending_req, act);
+ break;
+ case -ENODEV:
+ scsiback_do_resp_with_sense(NULL, DID_NO_CONNECT << 16,
+- 0, pending_req);
++ 0, pending_req, act);
+ break;
+ }
+
+@@ -700,17 +763,32 @@ static int __init scsiback_init(void)
+ if (!is_running_on_xen())
+ return -ENODEV;
+
+- mmap_pages = vscsiif_reqs * VSCSIIF_SG_TABLESIZE;
++ if (vscsiif_segs < VSCSIIF_SG_TABLESIZE)
++ vscsiif_segs = VSCSIIF_SG_TABLESIZE;
++ if (vscsiif_segs != (uint8_t)vscsiif_segs)
++ return -EINVAL;
++ mmap_pages = vscsiif_reqs * vscsiif_segs;
+
+ pending_reqs = kzalloc(sizeof(pending_reqs[0]) *
+ vscsiif_reqs, GFP_KERNEL);
++ if (!pending_reqs)
++ return -ENOMEM;
+ pending_grant_handles = kmalloc(sizeof(pending_grant_handles[0]) *
+ mmap_pages, GFP_KERNEL);
+ pending_pages = alloc_empty_pages_and_pagevec(mmap_pages);
+
+- if (!pending_reqs || !pending_grant_handles || !pending_pages)
++ if (!pending_grant_handles || !pending_pages)
+ goto out_of_memory;
+
++ for (i = 0; i < vscsiif_reqs; ++i) {
++ pending_reqs[i].gref = kcalloc(sizeof(*pending_reqs->gref),
++ vscsiif_segs, GFP_KERNEL);
++ pending_reqs[i].segs = kcalloc(sizeof(*pending_reqs->segs),
++ vscsiif_segs, GFP_KERNEL);
++ if (!pending_reqs[i].gref || !pending_reqs[i].segs)
++ goto out_of_memory;
++ }
++
+ for (i = 0; i < mmap_pages; i++)
+ pending_grant_handles[i] = SCSIBACK_INVALID_HANDLE;
+
+@@ -732,6 +810,10 @@ static int __init scsiback_init(void)
+ out_interface:
+ scsiback_interface_exit();
+ out_of_memory:
++ for (i = 0; i < vscsiif_reqs; ++i) {
++ kfree(pending_reqs[i].gref);
++ kfree(pending_reqs[i].segs);
++ }
+ kfree(pending_reqs);
+ kfree(pending_grant_handles);
+ free_empty_pages_and_pagevec(pending_pages, mmap_pages);
+@@ -742,12 +824,17 @@ out_of_memory:
+ #if 0
+ static void __exit scsiback_exit(void)
+ {
++ unsigned int i;
++
+ scsiback_xenbus_unregister();
+ scsiback_interface_exit();
++ for (i = 0; i < vscsiif_reqs; ++i) {
++ kfree(pending_reqs[i].gref);
++ kfree(pending_reqs[i].segs);
++ }
+ kfree(pending_reqs);
+ kfree(pending_grant_handles);
+- free_empty_pages_and_pagevec(pending_pages, (vscsiif_reqs * VSCSIIF_SG_TABLESIZE));
+-
++ free_empty_pages_and_pagevec(pending_pages, vscsiif_reqs * vscsiif_segs);
+ }
+ #endif
+
+--- head.orig/drivers/xen/scsiback/xenbus.c 2011-11-18 15:49:42.000000000 +0100
++++ head/drivers/xen/scsiback/xenbus.c 2012-12-18 12:30:30.000000000 +0100
+@@ -338,6 +338,13 @@ static int scsiback_probe(struct xenbus_
+ if (val)
+ be->info->feature = VSCSI_TYPE_HOST;
+
++ if (vscsiif_segs > VSCSIIF_SG_TABLESIZE) {
++ err = xenbus_printf(XBT_NIL, dev->nodename, "segs-per-req",
++ "%u", vscsiif_segs);
++ if (err)
++ xenbus_dev_error(dev, err, "writing segs-per-req");
++ }
++
+ err = xenbus_switch_state(dev, XenbusStateInitWait);
+ if (err)
+ goto fail;
+--- head.orig/drivers/xen/scsifront/common.h 2012-12-04 12:25:34.000000000 +0100
++++ head/drivers/xen/scsifront/common.h 2012-12-04 15:09:42.000000000 +0100
+@@ -91,7 +91,7 @@ struct vscsifrnt_shadow {
+
+ /* requested struct scsi_cmnd is stored from kernel */
+ struct scsi_cmnd *sc;
+- int gref[VSCSIIF_SG_TABLESIZE];
++ int gref[SG_ALL];
+ };
+
+ struct vscsifrnt_info {
+@@ -105,7 +105,6 @@ struct vscsifrnt_info {
+
+ grant_ref_t ring_ref;
+ struct vscsiif_front_ring ring;
+- struct vscsiif_response ring_res;
+
+ struct vscsifrnt_shadow shadow[VSCSIIF_MAX_REQS];
+ uint32_t shadow_free;
+@@ -115,6 +114,13 @@ struct vscsifrnt_info {
+ wait_queue_head_t wq_sync;
+ unsigned int waiting_resp:1;
+ unsigned int waiting_sync:1;
++
++ struct {
++ struct scsi_cmnd *sc;
++ unsigned int rqid;
++ unsigned int done;
++ vscsiif_segment_t segs[];
++ } active;
+ };
+
+ #define DPRINTK(_f, _a...) \
+--- head.orig/drivers/xen/scsifront/scsifront.c 2012-12-06 16:13:46.000000000 +0100
++++ head/drivers/xen/scsifront/scsifront.c 2012-12-04 15:09:43.000000000 +0100
+@@ -110,6 +110,66 @@ irqreturn_t scsifront_intr(int irq, void
+ return IRQ_HANDLED;
+ }
+
++static bool push_cmd_to_ring(struct vscsifrnt_info *info,
++ vscsiif_request_t *ring_req)
++{
++ unsigned int left, rqid = info->active.rqid;
++ struct scsi_cmnd *sc;
++
++ for (; ; ring_req = NULL) {
++ struct vscsiif_sg_list *sgl;
++
++ if (!ring_req) {
++ struct vscsiif_front_ring *ring = &info->ring;
++
++ ring_req = RING_GET_REQUEST(ring, ring->req_prod_pvt);
++ ring->req_prod_pvt++;
++ ring_req->rqid = rqid;
++ }
++
++ left = info->shadow[rqid].nr_segments - info->active.done;
++ if (left <= VSCSIIF_SG_TABLESIZE)
++ break;
++
++ sgl = (void *)ring_req;
++ sgl->act = VSCSIIF_ACT_SCSI_SG_PRESET;
++
++ if (left > VSCSIIF_SG_LIST_SIZE)
++ left = VSCSIIF_SG_LIST_SIZE;
++ memcpy(sgl->seg, info->active.segs + info->active.done,
++ left * sizeof(*sgl->seg));
++
++ sgl->nr_segments = left;
++ info->active.done += left;
++
++ if (RING_FULL(&info->ring))
++ return false;
++ }
++
++ sc = info->active.sc;
++
++ ring_req->act = VSCSIIF_ACT_SCSI_CDB;
++ ring_req->id = sc->device->id;
++ ring_req->lun = sc->device->lun;
++ ring_req->channel = sc->device->channel;
++ ring_req->cmd_len = sc->cmd_len;
++
++ if ( sc->cmd_len )
++ memcpy(ring_req->cmnd, sc->cmnd, sc->cmd_len);
++ else
++ memset(ring_req->cmnd, 0, VSCSIIF_MAX_COMMAND_SIZE);
++
++ ring_req->sc_data_direction = sc->sc_data_direction;
++ ring_req->timeout_per_command = sc->request->timeout / HZ;
++ ring_req->nr_segments = left;
++
++ memcpy(ring_req->seg, info->active.segs + info->active.done,
++ left * sizeof(*ring_req->seg));
++
++ info->active.sc = NULL;
++
++ return !RING_FULL(&info->ring);
++}
+
+ static void scsifront_gnttab_done(struct vscsifrnt_info *info, uint32_t id)
+ {
+@@ -206,6 +266,16 @@ static int scsifront_cmd_done(struct vsc
+
+ ring_res = RING_GET_RESPONSE(&info->ring, i);
+
++ if (info->host->sg_tablesize > VSCSIIF_SG_TABLESIZE) {
++ u8 act = ring_res->act;
++
++ if (act == VSCSIIF_ACT_SCSI_SG_PRESET)
++ continue;
++ if (act != info->shadow[ring_res->rqid].act)
++ DPRINTK("Bogus backend response (%02x vs %02x)\n",
++ act, info->shadow[ring_res->rqid].act);
++ }
++
+ if (info->shadow[ring_res->rqid].act == VSCSIIF_ACT_SCSI_CDB)
+ scsifront_cdb_cmd_done(info, ring_res);
+ else
+@@ -220,6 +290,11 @@ static int scsifront_cmd_done(struct vsc
+ info->ring.sring->rsp_event = i + 1;
+ }
+
++ if (info->active.sc && !RING_FULL(&info->ring)) {
++ push_cmd_to_ring(info, NULL);
++ scsifront_do_request(info);
++ }
++
+ info->waiting_sync = 0;
+
+ spin_unlock_irqrestore(info->host->host_lock, flags);
+@@ -257,7 +332,8 @@ int scsifront_schedule(void *data)
+
+
+ static int map_data_for_request(struct vscsifrnt_info *info,
+- struct scsi_cmnd *sc, vscsiif_request_t *ring_req, uint32_t id)
++ struct scsi_cmnd *sc,
++ struct vscsifrnt_shadow *shadow)
+ {
+ grant_ref_t gref_head;
+ struct page *page;
+@@ -269,7 +345,7 @@ static int map_data_for_request(struct v
+ if (sc->sc_data_direction == DMA_NONE || !data_len)
+ return 0;
+
+- err = gnttab_alloc_grant_references(VSCSIIF_SG_TABLESIZE, &gref_head);
++ err = gnttab_alloc_grant_references(info->host->sg_tablesize, &gref_head);
+ if (err) {
+ shost_printk(PREFIX(ERR), info->host,
+ "gnttab_alloc_grant_references() error\n");
+@@ -278,7 +354,7 @@ static int map_data_for_request(struct v
+
+ /* quoted scsi_lib.c/scsi_req_map_sg . */
+ nr_pages = PFN_UP(data_len + scsi_sglist(sc)->offset);
+- if (nr_pages > VSCSIIF_SG_TABLESIZE) {
++ if (nr_pages > info->host->sg_tablesize) {
+ shost_printk(PREFIX(ERR), info->host,
+ "Unable to map request_buffer for command!\n");
+ ref_cnt = -E2BIG;
+@@ -305,10 +381,10 @@ static int map_data_for_request(struct v
+ gnttab_grant_foreign_access_ref(ref, info->dev->otherend_id,
+ page_to_phys(page) >> PAGE_SHIFT, write);
+
+- info->shadow[id].gref[ref_cnt] = ref;
+- ring_req->seg[ref_cnt].gref = ref;
+- ring_req->seg[ref_cnt].offset = (uint16_t)off;
+- ring_req->seg[ref_cnt].length = (uint16_t)bytes;
++ shadow->gref[ref_cnt] = ref;
++ info->active.segs[ref_cnt].gref = ref;
++ info->active.segs[ref_cnt].offset = off;
++ info->active.segs[ref_cnt].length = bytes;
+
+ page++;
+ len -= bytes;
+@@ -347,33 +423,26 @@ static int scsifront_queuecommand(struct
+ return SCSI_MLQUEUE_HOST_BUSY;
+ }
+
++ if (info->active.sc && !push_cmd_to_ring(info, NULL)) {
++ scsifront_do_request(info);
++ spin_unlock_irqrestore(shost->host_lock, flags);
++ return SCSI_MLQUEUE_HOST_BUSY;
++ }
++
+ sc->result = 0;
+
+ ring_req = scsifront_pre_request(info);
+ rqid = ring_req->rqid;
+- ring_req->act = VSCSIIF_ACT_SCSI_CDB;
+-
+- ring_req->id = sc->device->id;
+- ring_req->lun = sc->device->lun;
+- ring_req->channel = sc->device->channel;
+- ring_req->cmd_len = sc->cmd_len;
+
+ BUG_ON(sc->cmd_len > VSCSIIF_MAX_COMMAND_SIZE);
+
+- if ( sc->cmd_len )
+- memcpy(ring_req->cmnd, sc->cmnd, sc->cmd_len);
+- else
+- memset(ring_req->cmnd, 0, VSCSIIF_MAX_COMMAND_SIZE);
+-
+- ring_req->sc_data_direction = (uint8_t)sc->sc_data_direction;
+- ring_req->timeout_per_command = (sc->request->timeout / HZ);
+-
+ info->shadow[rqid].sc = sc;
+ info->shadow[rqid].act = VSCSIIF_ACT_SCSI_CDB;
+
+- ref_cnt = map_data_for_request(info, sc, ring_req, rqid);
++ ref_cnt = map_data_for_request(info, sc, &info->shadow[rqid]);
+ if (ref_cnt < 0) {
+ add_id_to_freelist(info, rqid);
++ scsifront_do_request(info);
+ spin_unlock_irqrestore(shost->host_lock, flags);
+ if (ref_cnt == (-ENOMEM))
+ return SCSI_MLQUEUE_HOST_BUSY;
+@@ -382,9 +451,13 @@ static int scsifront_queuecommand(struct
+ return 0;
+ }
+
+- ring_req->nr_segments = (uint8_t)ref_cnt;
+ info->shadow[rqid].nr_segments = ref_cnt;
+
++ info->active.sc = sc;
++ info->active.rqid = rqid;
++ info->active.done = 0;
++ push_cmd_to_ring(info, ring_req);
++
+ scsifront_do_request(info);
+ spin_unlock_irqrestore(shost->host_lock, flags);
+
+--- head.orig/drivers/xen/scsifront/xenbus.c 2012-11-14 13:17:18.000000000 +0100
++++ head/drivers/xen/scsifront/xenbus.c 2012-12-04 15:09:46.000000000 +0100
+@@ -42,6 +42,10 @@
+ #define DEFAULT_TASK_COMM_LEN TASK_COMM_LEN
+ #endif
+
++static unsigned int max_nr_segs = VSCSIIF_SG_TABLESIZE;
++module_param_named(max_segs, max_nr_segs, uint, 0);
++MODULE_PARM_DESC(max_segs, "Maximum number of segments per request");
++
+ extern struct scsi_host_template scsifront_sht;
+
+ static void scsifront_free(struct vscsifrnt_info *info)
+@@ -180,7 +184,9 @@ static int scsifront_probe(struct xenbus
+ int i, err = -ENOMEM;
+ char name[DEFAULT_TASK_COMM_LEN];
+
+- host = scsi_host_alloc(&scsifront_sht, sizeof(*info));
++ host = scsi_host_alloc(&scsifront_sht,
++ offsetof(struct vscsifrnt_info,
++ active.segs[max_nr_segs]));
+ if (!host) {
+ xenbus_dev_fatal(dev, err, "fail to allocate scsi host");
+ return err;
+@@ -222,7 +228,7 @@ static int scsifront_probe(struct xenbus
+ host->max_id = VSCSIIF_MAX_TARGET;
+ host->max_channel = 0;
+ host->max_lun = VSCSIIF_MAX_LUN;
+- host->max_sectors = (VSCSIIF_SG_TABLESIZE - 1) * PAGE_SIZE / 512;
++ host->max_sectors = (host->sg_tablesize - 1) * PAGE_SIZE / 512;
+ host->max_cmd_len = VSCSIIF_MAX_COMMAND_SIZE;
+
+ err = scsi_add_host(host, &dev->dev);
+@@ -277,6 +283,23 @@ static int scsifront_disconnect(struct v
+ return 0;
+ }
+
++static void scsifront_read_backend_params(struct xenbus_device *dev,
++ struct vscsifrnt_info *info)
++{
++ unsigned int nr_segs;
++ int ret;
++ struct Scsi_Host *host = info->host;
++
++ ret = xenbus_scanf(XBT_NIL, dev->otherend, "segs-per-req", "%u",
++ &nr_segs);
++ if (ret == 1 && nr_segs > host->sg_tablesize) {
++ host->sg_tablesize = min(nr_segs, max_nr_segs);
++ dev_info(&dev->dev, "using up to %d SG entries\n",
++ host->sg_tablesize);
++ host->max_sectors = (host->sg_tablesize - 1) * PAGE_SIZE / 512;
++ }
++}
++
+ #define VSCSIFRONT_OP_ADD_LUN 1
+ #define VSCSIFRONT_OP_DEL_LUN 2
+
+@@ -367,6 +390,7 @@ static void scsifront_backend_changed(st
+ break;
+
+ case XenbusStateConnected:
++ scsifront_read_backend_params(dev, info);
+ if (xenbus_read_driver_state(dev->nodename) ==
+ XenbusStateInitialised) {
+ scsifront_do_lun_hotplug(info, VSCSIFRONT_OP_ADD_LUN);
+@@ -414,6 +438,11 @@ static DEFINE_XENBUS_DRIVER(scsifront, ,
+
+ int __init scsifront_xenbus_init(void)
+ {
++ if (max_nr_segs > SG_ALL)
++ max_nr_segs = SG_ALL;
++ if (max_nr_segs < VSCSIIF_SG_TABLESIZE)
++ max_nr_segs = VSCSIIF_SG_TABLESIZE;
++
+ return xenbus_register_frontend(&scsifront_driver);
+ }
+
diff --git a/patches.xen/xen3-auto-common.diff b/patches.xen/xen3-auto-common.diff
index 8442ed60bd..8adb3bad9a 100644
--- a/patches.xen/xen3-auto-common.diff
+++ b/patches.xen/xen3-auto-common.diff
@@ -23,7 +23,7 @@ take the forward porting patches:
2.6.35/kernel/time.c
3.4/drivers/acpi/acpica/hwsleep.c
---- head.orig/drivers/Makefile 2014-06-26 11:20:09.000000000 +0200
+--- head.orig/drivers/Makefile 2014-08-04 00:25:02.000000000 +0200
+++ head/drivers/Makefile 2013-12-02 16:28:30.000000000 +0100
@@ -63,6 +63,7 @@ obj-$(CONFIG_PARPORT) += parport/
obj-y += base/ block/ misc/ mfd/ nfc/
@@ -33,7 +33,7 @@ take the forward porting patches:
obj-$(CONFIG_IDE) += ide/
obj-$(CONFIG_SCSI) += scsi/
obj-$(CONFIG_ATA) += ata/
---- head.orig/drivers/acpi/Makefile 2014-06-26 11:20:09.000000000 +0200
+--- head.orig/drivers/acpi/Makefile 2014-08-04 00:25:02.000000000 +0200
+++ head/drivers/acpi/Makefile 2013-12-02 16:28:16.000000000 +0100
@@ -79,6 +79,9 @@ obj-$(CONFIG_ACPI_BGRT) += bgrt.o
processor-y := processor_driver.o processor_throttling.o
@@ -45,7 +45,7 @@ take the forward porting patches:
obj-$(CONFIG_ACPI_PROCESSOR_AGGREGATOR) += acpi_pad.o
---- head.orig/drivers/acpi/acpi_processor.c 2014-06-26 11:20:10.000000000 +0200
+--- head.orig/drivers/acpi/acpi_processor.c 2014-08-04 00:25:02.000000000 +0200
+++ head/drivers/acpi/acpi_processor.c 2014-02-17 17:58:09.000000000 +0100
@@ -283,7 +283,7 @@ static int acpi_processor_get_info(struc
*/
@@ -190,7 +190,7 @@ take the forward porting patches:
cpu_maps_update_begin();
cpu_hotplug_begin();
---- head.orig/drivers/acpi/processor_driver.c 2014-06-26 11:20:10.000000000 +0200
+--- head.orig/drivers/acpi/processor_driver.c 2014-08-04 00:25:02.000000000 +0200
+++ head/drivers/acpi/processor_driver.c 2013-12-02 16:28:11.000000000 +0100
@@ -174,17 +174,29 @@ static int __acpi_processor_start(struct
if (pr->flags.need_hotplug_init)
@@ -586,7 +586,7 @@ take the forward porting patches:
{
int result = 0;
acpi_status status = AE_OK;
---- head.orig/drivers/acpi/sleep.c 2014-06-26 11:20:10.000000000 +0200
+--- head.orig/drivers/acpi/sleep.c 2014-08-04 00:25:02.000000000 +0200
+++ head/drivers/acpi/sleep.c 2013-09-26 11:25:38.000000000 +0200
@@ -56,6 +56,7 @@ static struct notifier_block tts_notifie
static int acpi_sleep_prepare(u32 acpi_state)
@@ -604,7 +604,7 @@ take the forward porting patches:
ACPI_FLUSH_CPU_CACHE();
#endif
printk(KERN_INFO PREFIX "Preparing to enter system sleep state S%d\n",
---- head.orig/drivers/block/floppy.c 2014-07-03 10:47:19.000000000 +0200
+--- head.orig/drivers/block/floppy.c 2014-08-04 00:25:02.000000000 +0200
+++ head/drivers/block/floppy.c 2012-04-10 15:43:06.000000000 +0200
@@ -146,7 +146,9 @@
@@ -2105,7 +2105,7 @@ take the forward porting patches:
#endif
return 0;
}
---- head.orig/drivers/edac/edac_mc.c 2014-06-26 11:20:13.000000000 +0200
+--- head.orig/drivers/edac/edac_mc.c 2014-08-04 00:25:02.000000000 +0200
+++ head/drivers/edac/edac_mc.c 2013-12-02 16:29:03.000000000 +0100
@@ -862,6 +862,10 @@ static void edac_mc_scrub_block(unsigned
@@ -2839,7 +2839,7 @@ take the forward porting patches:
oprofilefs_create_file(root, "buffer", &event_buffer_fops);
oprofilefs_create_ulong(root, "buffer_size", &oprofile_buffer_size);
oprofilefs_create_ulong(root, "buffer_watershed", &oprofile_buffer_watershed);
---- head.orig/fs/aio.c 2014-07-29 10:33:10.000000000 +0200
+--- head.orig/fs/aio.c 2014-08-04 00:25:02.000000000 +0200
+++ head/fs/aio.c 2014-06-26 14:14:07.000000000 +0200
@@ -44,6 +44,11 @@
#include <asm/kmap_types.h>
@@ -3062,7 +3062,7 @@ take the forward porting patches:
};
/*
---- head.orig/include/acpi/processor.h 2014-06-26 11:21:10.000000000 +0200
+--- head.orig/include/acpi/processor.h 2014-08-04 00:25:02.000000000 +0200
+++ head/include/acpi/processor.h 2013-12-02 16:29:20.000000000 +0100
@@ -45,6 +45,17 @@
@@ -3282,7 +3282,7 @@ take the forward porting patches:
+#endif
+
#endif /* _LINUX_HIGHMEM_H */
---- head.orig/include/linux/interrupt.h 2014-06-26 11:21:11.000000000 +0200
+--- head.orig/include/linux/interrupt.h 2014-08-04 00:25:02.000000000 +0200
+++ head/include/linux/interrupt.h 2013-12-02 16:29:29.000000000 +0100
@@ -361,6 +361,11 @@ static inline int disable_irq_wake(unsig
return irq_set_irq_wake(irq, 0);
@@ -3426,7 +3426,7 @@ take the forward porting patches:
/**
* Create a file of the given name as a child of the given root, with
---- head.orig/include/linux/page-flags.h 2014-07-03 10:47:48.000000000 +0200
+--- head.orig/include/linux/page-flags.h 2014-08-04 00:25:02.000000000 +0200
+++ head/include/linux/page-flags.h 2013-12-02 16:29:42.000000000 +0100
@@ -109,6 +109,11 @@ enum pageflags {
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
@@ -3526,7 +3526,7 @@ take the forward porting patches:
- MODULE_ARCH_VERMAGIC
+ MODULE_VERMAGIC_XEN MODULE_ARCH_VERMAGIC
---- head.orig/kernel/irq/spurious.c 2014-06-26 11:21:16.000000000 +0200
+--- head.orig/kernel/irq/spurious.c 2014-08-04 00:25:02.000000000 +0200
+++ head/kernel/irq/spurious.c 2013-12-02 16:29:49.000000000 +0100
@@ -393,7 +393,7 @@ void note_interrupt(unsigned int irq, st
*/
@@ -3537,9 +3537,9 @@ take the forward porting patches:
desc->irqs_unhandled++;
desc->last_unhandled = jiffies;
}
---- head.orig/kernel/kexec.c 2014-07-03 10:47:48.000000000 +0200
+--- head.orig/kernel/kexec.c 2014-08-04 00:25:02.000000000 +0200
+++ head/kernel/kexec.c 2014-06-26 14:13:46.000000000 +0200
-@@ -363,13 +363,26 @@ static int kimage_is_destination_range(s
+@@ -364,13 +364,26 @@ static int kimage_is_destination_range(s
return 0;
}
@@ -3567,7 +3567,7 @@ take the forward porting patches:
pages->mapping = NULL;
set_page_private(pages, order);
count = 1 << order;
-@@ -433,10 +446,10 @@ static struct page *kimage_alloc_normal_
+@@ -434,10 +447,10 @@ static struct page *kimage_alloc_normal_
do {
unsigned long pfn, epfn, addr, eaddr;
@@ -3580,7 +3580,7 @@ take the forward porting patches:
epfn = pfn + count;
addr = pfn << PAGE_SHIFT;
eaddr = epfn << PAGE_SHIFT;
-@@ -470,6 +483,7 @@ static struct page *kimage_alloc_normal_
+@@ -471,6 +484,7 @@ static struct page *kimage_alloc_normal_
return pages;
}
@@ -3588,7 +3588,7 @@ take the forward porting patches:
static struct page *kimage_alloc_crash_control_pages(struct kimage *image,
unsigned int order)
{
-@@ -521,7 +535,7 @@ static struct page *kimage_alloc_crash_c
+@@ -522,7 +536,7 @@ static struct page *kimage_alloc_crash_c
}
/* If I don't overlap any segments I have found my hole! */
if (i == image->nr_segments) {
@@ -3597,7 +3597,7 @@ take the forward porting patches:
break;
}
}
-@@ -548,6 +562,13 @@ struct page *kimage_alloc_control_pages(
+@@ -549,6 +563,13 @@ struct page *kimage_alloc_control_pages(
return pages;
}
@@ -3611,7 +3611,7 @@ take the forward porting patches:
static int kimage_add_entry(struct kimage *image, kimage_entry_t entry)
{
-@@ -563,7 +584,7 @@ static int kimage_add_entry(struct kimag
+@@ -564,7 +585,7 @@ static int kimage_add_entry(struct kimag
return -ENOMEM;
ind_page = page_address(page);
@@ -3620,7 +3620,7 @@ take the forward porting patches:
image->entry = ind_page;
image->last_entry = ind_page +
((PAGE_SIZE/sizeof(kimage_entry_t)) - 1);
-@@ -622,13 +643,13 @@ static void kimage_terminate(struct kima
+@@ -623,13 +644,13 @@ static void kimage_terminate(struct kima
#define for_each_kimage_entry(image, ptr, entry) \
for (ptr = &image->head; (entry = *ptr) && !(entry & IND_DONE); \
ptr = (entry & IND_INDIRECTION) ? \
@@ -3636,7 +3636,7 @@ take the forward porting patches:
kimage_free_pages(page);
}
-@@ -640,6 +661,10 @@ static void kimage_free(struct kimage *i
+@@ -641,6 +662,10 @@ static void kimage_free(struct kimage *i
if (!image)
return;
@@ -3647,7 +3647,7 @@ take the forward porting patches:
kimage_free_extra_pages(image);
for_each_kimage_entry(image, ptr, entry) {
if (entry & IND_INDIRECTION) {
-@@ -714,7 +739,7 @@ static struct page *kimage_alloc_page(st
+@@ -715,7 +740,7 @@ static struct page *kimage_alloc_page(st
* have a match.
*/
list_for_each_entry(page, &image->dest_pages, lru) {
@@ -3656,7 +3656,7 @@ take the forward porting patches:
if (addr == destination) {
list_del(&page->lru);
return page;
-@@ -725,16 +750,16 @@ static struct page *kimage_alloc_page(st
+@@ -726,16 +751,16 @@ static struct page *kimage_alloc_page(st
kimage_entry_t *old;
/* Allocate a page, if we run out of memory give up */
@@ -3676,7 +3676,7 @@ take the forward porting patches:
/* If it is the destination page we want use it */
if (addr == destination)
-@@ -757,7 +782,7 @@ static struct page *kimage_alloc_page(st
+@@ -758,7 +783,7 @@ static struct page *kimage_alloc_page(st
struct page *old_page;
old_addr = *old & PAGE_MASK;
@@ -3685,7 +3685,7 @@ take the forward porting patches:
copy_highpage(page, old_page);
*old = addr | (*old & ~PAGE_MASK);
-@@ -812,7 +837,7 @@ static int kimage_load_normal_segment(st
+@@ -813,7 +838,7 @@ static int kimage_load_normal_segment(st
result = -ENOMEM;
goto out;
}
@@ -3694,7 +3694,7 @@ take the forward porting patches:
<< PAGE_SHIFT);
if (result < 0)
goto out;
-@@ -840,6 +865,7 @@ out:
+@@ -841,6 +866,7 @@ out:
return result;
}
@@ -3702,7 +3702,7 @@ take the forward porting patches:
static int kimage_load_crash_segment(struct kimage *image,
struct kexec_segment *segment)
{
-@@ -862,7 +888,7 @@ static int kimage_load_crash_segment(str
+@@ -863,7 +889,7 @@ static int kimage_load_crash_segment(str
char *ptr;
size_t uchunk, mchunk;
@@ -3711,7 +3711,7 @@ take the forward porting patches:
if (!page) {
result = -ENOMEM;
goto out;
-@@ -908,6 +934,13 @@ static int kimage_load_segment(struct ki
+@@ -909,6 +935,13 @@ static int kimage_load_segment(struct ki
return result;
}
@@ -3725,7 +3725,7 @@ take the forward porting patches:
/*
* Exec Kernel system call: for obvious reasons only root may call it.
-@@ -1015,6 +1048,13 @@ SYSCALL_DEFINE4(kexec_load, unsigned lon
+@@ -1016,6 +1049,13 @@ SYSCALL_DEFINE4(kexec_load, unsigned lon
if (flags & KEXEC_ON_CRASH)
crash_unmap_reserved_pages();
}
@@ -3750,7 +3750,7 @@ take the forward porting patches:
{
.procname = "acpi_video_flags",
.data = &acpi_realmode_flags,
---- head.orig/mm/gup.c 2014-06-26 11:21:17.000000000 +0200
+--- head.orig/mm/gup.c 2014-08-04 00:25:02.000000000 +0200
+++ head/mm/gup.c 2014-06-26 14:13:35.000000000 +0200
@@ -443,7 +443,32 @@ long __get_user_pages(struct task_struct
goto next_page;
@@ -3786,7 +3786,7 @@ take the forward porting patches:
return i ? : -EFAULT;
if (is_vm_hugetlb_page(vma)) {
i = follow_hugetlb_page(mm, vma, pages, vmas,
---- head.orig/mm/memory.c 2014-07-29 10:33:22.000000000 +0200
+--- head.orig/mm/memory.c 2014-08-04 00:25:02.000000000 +0200
+++ head/mm/memory.c 2014-06-26 14:13:39.000000000 +0200
@@ -750,6 +750,12 @@ struct page *vm_normal_page(struct vm_ar
{
@@ -3836,7 +3836,7 @@ take the forward porting patches:
/**
* zap_page_range_single - remove user pages in a given range
---- head.orig/mm/mmap.c 2014-06-26 11:21:17.000000000 +0200
+--- head.orig/mm/mmap.c 2014-08-04 00:25:02.000000000 +0200
+++ head/mm/mmap.c 2013-12-02 16:30:06.000000000 +0100
@@ -2365,6 +2365,14 @@ static void unmap_region(struct mm_struc
tlb_finish_mmu(&tlb, start, end);
@@ -3873,7 +3873,7 @@ take the forward porting patches:
vma = mm->mmap;
if (!vma) /* Can happen if dup_mmap() received an OOM */
return;
---- head.orig/mm/page_alloc.c 2014-07-29 10:33:22.000000000 +0200
+--- head.orig/mm/page_alloc.c 2014-08-04 00:25:02.000000000 +0200
+++ head/mm/page_alloc.c 2013-09-26 11:25:08.000000000 +0200
@@ -745,6 +745,13 @@ static bool free_pages_prepare(struct pa
int i;
@@ -3913,7 +3913,7 @@ take the forward porting patches:
# ===========================================================================
ifneq ($(strip $(lib-y) $(lib-m) $(lib-n) $(lib-)),)
---- head.orig/scripts/Makefile.lib 2014-06-26 11:21:21.000000000 +0200
+--- head.orig/scripts/Makefile.lib 2014-08-04 00:25:02.000000000 +0200
+++ head/scripts/Makefile.lib 2012-04-10 15:40:06.000000000 +0200
@@ -22,6 +22,12 @@ obj-m := $(filter-out $(obj-y),$(obj-m))
diff --git a/patches.xen/xen3-fixup-common b/patches.xen/xen3-fixup-common
index 7eacf4c01f..ae9849ddcd 100644
--- a/patches.xen/xen3-fixup-common
+++ b/patches.xen/xen3-fixup-common
@@ -110,7 +110,7 @@ Patch-mainline: n/a
#define SetPageBlkback(page) set_bit(PG_blkback, &(page)->flags)
--- head.orig/kernel/kexec.c 2014-06-26 14:13:46.000000000 +0200
+++ head/kernel/kexec.c 2014-06-26 14:26:46.000000000 +0200
-@@ -39,8 +39,10 @@
+@@ -40,8 +40,10 @@
#include <asm/io.h>
#include <asm/sections.h>
@@ -121,7 +121,7 @@ Patch-mainline: n/a
/* vmcoreinfo stuff */
static unsigned char vmcoreinfo_data[VMCOREINFO_BYTES];
-@@ -1237,6 +1239,7 @@ static void final_note(u32 *buf)
+@@ -1238,6 +1240,7 @@ static void final_note(u32 *buf)
memcpy(buf, &note, sizeof(note));
}
@@ -129,7 +129,7 @@ Patch-mainline: n/a
void crash_save_cpu(struct pt_regs *regs, int cpu)
{
struct elf_prstatus prstatus;
-@@ -1262,15 +1265,18 @@ void crash_save_cpu(struct pt_regs *regs
+@@ -1263,15 +1266,18 @@ void crash_save_cpu(struct pt_regs *regs
&prstatus, sizeof(prstatus));
final_note(buf);
}
diff --git a/patches.xen/xen3-patch-2.6.20 b/patches.xen/xen3-patch-2.6.20
index 6b9d282947..face3f29f7 100644
--- a/patches.xen/xen3-patch-2.6.20
+++ b/patches.xen/xen3-patch-2.6.20
@@ -4368,7 +4368,7 @@ Acked-by: jbeulich@novell.com
if (csum) {
--- head.orig/kernel/kexec.c 2014-06-26 14:26:46.000000000 +0200
+++ head/kernel/kexec.c 2014-01-07 16:22:45.000000000 +0100
-@@ -378,7 +378,7 @@ static struct page *kimage_alloc_pages(g
+@@ -379,7 +379,7 @@ static struct page *kimage_alloc_pages(g
if (limit == ~0UL)
address_bits = BITS_PER_LONG;
else
diff --git a/patches.xen/xen3-patch-2.6.24 b/patches.xen/xen3-patch-2.6.24
index f35cf12694..252915e7f8 100644
--- a/patches.xen/xen3-patch-2.6.24
+++ b/patches.xen/xen3-patch-2.6.24
@@ -239,7 +239,7 @@ Acked-by: jbeulich@novell.com
c->x86_clflush_size = 32;
memset(&c->x86_capability, 0, sizeof c->x86_capability);
---- head.orig/arch/x86/kernel/cpu/intel.c 2014-07-29 10:32:14.000000000 +0200
+--- head.orig/arch/x86/kernel/cpu/intel.c 2014-08-04 00:25:02.000000000 +0200
+++ head/arch/x86/kernel/cpu/intel.c 2014-07-29 11:03:48.000000000 +0200
@@ -299,6 +299,7 @@ static void srat_detect_node(struct cpui
#endif
@@ -2781,7 +2781,7 @@ Acked-by: jbeulich@novell.com
static inline int
---- head.orig/drivers/cpuidle/Kconfig 2014-06-26 11:20:12.000000000 +0200
+--- head.orig/drivers/cpuidle/Kconfig 2014-08-04 00:25:02.000000000 +0200
+++ head/drivers/cpuidle/Kconfig 2013-09-26 12:40:55.000000000 +0200
@@ -2,6 +2,7 @@ menu "CPU Idle"
@@ -2791,7 +2791,7 @@ Acked-by: jbeulich@novell.com
default y if ACPI || PPC_PSERIES
select CPU_IDLE_GOV_LADDER if (!NO_HZ && !NO_HZ_IDLE)
select CPU_IDLE_GOV_MENU if (NO_HZ || NO_HZ_IDLE)
---- head.orig/drivers/dma/Kconfig 2014-06-26 11:20:13.000000000 +0200
+--- head.orig/drivers/dma/Kconfig 2014-08-04 00:25:02.000000000 +0200
+++ head/drivers/dma/Kconfig 2014-01-07 16:24:29.000000000 +0100
@@ -63,7 +63,7 @@ config INTEL_IOATDMA
depends on PCI && X86
@@ -8390,7 +8390,7 @@ Acked-by: jbeulich@novell.com
+} while (0)
+
+#endif
---- head.orig/arch/x86/include/asm/mmu.h 2014-06-26 11:20:05.000000000 +0200
+--- head.orig/arch/x86/include/asm/mmu.h 2014-08-04 00:25:02.000000000 +0200
+++ head/arch/x86/include/asm/mmu.h 2014-06-26 14:34:30.000000000 +0200
@@ -16,6 +16,9 @@ typedef struct {
/* True if mm supports a task running in 32 bit compatibility mode. */
@@ -8564,7 +8564,7 @@ Acked-by: jbeulich@novell.com
int (*is_ready)(struct xenbus_device *dev);
--- head.orig/kernel/kexec.c 2014-01-07 16:22:45.000000000 +0100
+++ head/kernel/kexec.c 2014-04-30 10:16:53.000000000 +0200
-@@ -46,7 +46,11 @@ note_buf_t __percpu *crash_notes;
+@@ -47,7 +47,11 @@ note_buf_t __percpu *crash_notes;
/* vmcoreinfo stuff */
static unsigned char vmcoreinfo_data[VMCOREINFO_BYTES];
@@ -8577,7 +8577,7 @@ Acked-by: jbeulich@novell.com
size_t vmcoreinfo_size;
size_t vmcoreinfo_max_size = sizeof(vmcoreinfo_data);
-@@ -1282,6 +1286,7 @@ static int __init crash_notes_memory_ini
+@@ -1283,6 +1287,7 @@ static int __init crash_notes_memory_ini
subsys_initcall(crash_notes_memory_init);
@@ -8585,7 +8585,7 @@ Acked-by: jbeulich@novell.com
/*
* parsing the "crashkernel" commandline
*
-@@ -1554,6 +1559,7 @@ int __init parse_crashkernel_low(char *c
+@@ -1555,6 +1560,7 @@ int __init parse_crashkernel_low(char *c
return __parse_crashkernel(cmdline, system_ram, crash_size, crash_base,
"crashkernel=", suffix_tbl[SUFFIX_LOW]);
}
@@ -8593,7 +8593,7 @@ Acked-by: jbeulich@novell.com
static void update_vmcoreinfo_note(void)
{
-@@ -1609,7 +1615,18 @@ static int __init crash_save_vmcoreinfo_
+@@ -1610,7 +1616,18 @@ static int __init crash_save_vmcoreinfo_
VMCOREINFO_SYMBOL(init_uts_ns);
VMCOREINFO_SYMBOL(node_online_map);
#ifdef CONFIG_MMU
diff --git a/patches.xen/xen3-patch-2.6.27 b/patches.xen/xen3-patch-2.6.27
index e117c7d8b5..f06fe47cfb 100644
--- a/patches.xen/xen3-patch-2.6.27
+++ b/patches.xen/xen3-patch-2.6.27
@@ -2877,9 +2877,9 @@ have been needed - see SLE11 SPn).
cmpl $nr_syscalls,%eax
jb syscall_call
jmp syscall_exit
---- head.orig/arch/x86/kernel/entry_64.S 2014-06-26 11:21:34.000000000 +0200
+--- head.orig/arch/x86/kernel/entry_64.S 2014-08-06 12:00:17.000000000 +0200
+++ head/arch/x86/kernel/entry_64.S 2014-06-26 14:55:18.000000000 +0200
-@@ -1239,7 +1239,7 @@ ENTRY(arch_unwind_init_running)
+@@ -1231,7 +1231,7 @@ ENTRY(arch_unwind_init_running)
END(arch_unwind_init_running)
#endif
@@ -2888,7 +2888,7 @@ have been needed - see SLE11 SPn).
idtentry xen_hypervisor_callback xen_do_hypervisor_callback has_error_code=0
/*
-@@ -1339,7 +1339,7 @@ END(xen_failsafe_callback)
+@@ -1331,7 +1331,7 @@ END(xen_failsafe_callback)
apicinterrupt3 HYPERVISOR_CALLBACK_VECTOR \
xen_hvm_callback_vector xen_evtchn_do_upcall
@@ -13110,7 +13110,7 @@ have been needed - see SLE11 SPn).
void make_lowmem_page_readonly(void *va, unsigned int feature)
{
pte_t *pte;
---- head.orig/arch/x86/pci/amd_bus.c 2014-06-26 11:20:08.000000000 +0200
+--- head.orig/arch/x86/pci/amd_bus.c 2014-08-04 00:25:02.000000000 +0200
+++ head/arch/x86/pci/amd_bus.c 2014-04-30 10:34:31.000000000 +0200
@@ -327,6 +327,7 @@ static int __init early_root_info_init(v
@@ -16887,7 +16887,7 @@ have been needed - see SLE11 SPn).
#endif
#define DYNIRQ_BASE (PIRQ_BASE + NR_PIRQS)
---- head.orig/arch/x86/include/asm/traps.h 2014-06-26 11:20:06.000000000 +0200
+--- head.orig/arch/x86/include/asm/traps.h 2014-08-04 00:25:02.000000000 +0200
+++ head/arch/x86/include/asm/traps.h 2013-12-02 17:24:36.000000000 +0100
@@ -36,6 +36,9 @@ asmlinkage void alignment_check(void);
asmlinkage void machine_check(void);
@@ -17013,7 +17013,7 @@ have been needed - see SLE11 SPn).
__u32 port;
--- head.orig/kernel/kexec.c 2014-04-30 10:16:53.000000000 +0200
+++ head/kernel/kexec.c 2012-10-23 15:02:01.000000000 +0200
-@@ -48,7 +48,7 @@ note_buf_t __percpu *crash_notes;
+@@ -49,7 +49,7 @@ note_buf_t __percpu *crash_notes;
static unsigned char vmcoreinfo_data[VMCOREINFO_BYTES];
u32
#if defined(CONFIG_XEN) && defined(CONFIG_X86)
diff --git a/patches.xen/xen3-patch-2.6.31 b/patches.xen/xen3-patch-2.6.31
index aebe46b94d..375b78913f 100644
--- a/patches.xen/xen3-patch-2.6.31
+++ b/patches.xen/xen3-patch-2.6.31
@@ -2879,7 +2879,7 @@ Automatically created from "patches.kernel.org/patch-2.6.31" by xen-port-patches
nmi_stack_fixup:
--- head.orig/arch/x86/kernel/entry_64.S 2014-06-26 14:55:18.000000000 +0200
+++ head/arch/x86/kernel/entry_64.S 2014-06-26 14:58:58.000000000 +0200
-@@ -1349,7 +1349,7 @@ apicinterrupt3 HYPERVISOR_CALLBACK_VECTO
+@@ -1341,7 +1341,7 @@ apicinterrupt3 HYPERVISOR_CALLBACK_VECTO
idtentry debug do_debug has_error_code=0 paranoid=1 shift_ist=DEBUG_STACK
idtentry int3 do_int3 has_error_code=0 paranoid=1 shift_ist=DEBUG_STACK
idtentry stack_segment do_stack_segment has_error_code=1 paranoid=1
@@ -4880,7 +4880,7 @@ Automatically created from "patches.kernel.org/patch-2.6.31" by xen-port-patches
if (pgd == NULL)
goto out;
---- head.orig/arch/x86/pci/i386.c 2014-06-26 11:20:08.000000000 +0200
+--- head.orig/arch/x86/pci/i386.c 2014-08-04 00:25:02.000000000 +0200
+++ head/arch/x86/pci/i386.c 2014-06-26 14:59:27.000000000 +0200
@@ -395,12 +395,14 @@ void __init pcibios_resource_survey(void
pcibios_allocate_resources(bus, 1);
diff --git a/patches.xen/xen3-patch-2.6.33 b/patches.xen/xen3-patch-2.6.33
index 1a7b030bb7..da5b0fbdae 100644
--- a/patches.xen/xen3-patch-2.6.33
+++ b/patches.xen/xen3-patch-2.6.33
@@ -75,7 +75,7 @@ Automatically created from "patches.kernel.org/patch-2.6.33" by xen-port-patches
extern int assign_irq_vector(int, struct irq_cfg *, const struct cpumask *);
extern void send_cleanup_vector(struct irq_cfg *);
---- head.orig/arch/x86/include/asm/setup.h 2014-06-26 11:20:06.000000000 +0200
+--- head.orig/arch/x86/include/asm/setup.h 2014-08-04 00:25:02.000000000 +0200
+++ head/arch/x86/include/asm/setup.h 2014-02-18 17:26:23.000000000 +0100
@@ -31,7 +31,7 @@
extern u64 relocated_ramdisk;
@@ -4009,7 +4009,7 @@ Automatically created from "patches.kernel.org/patch-2.6.33" by xen-port-patches
.procname = "abi",
.mode = 0555,
.child = abi_table2
---- head.orig/drivers/gpu/drm/vmwgfx/Kconfig 2014-06-26 11:20:17.000000000 +0200
+--- head.orig/drivers/gpu/drm/vmwgfx/Kconfig 2014-08-04 00:25:02.000000000 +0200
+++ head/drivers/gpu/drm/vmwgfx/Kconfig 2014-06-26 15:00:32.000000000 +0200
@@ -1,6 +1,6 @@
config DRM_VMWGFX
@@ -4451,7 +4451,7 @@ Automatically created from "patches.kernel.org/patch-2.6.33" by xen-port-patches
depends on ACPI
depends on X86_IO_APIC
default !X86
---- head.orig/drivers/scsi/Kconfig 2014-06-26 11:20:48.000000000 +0200
+--- head.orig/drivers/scsi/Kconfig 2014-08-04 00:25:02.000000000 +0200
+++ head/drivers/scsi/Kconfig 2013-09-26 12:59:03.000000000 +0200
@@ -605,7 +605,7 @@ config SCSI_FLASHPOINT
@@ -4919,7 +4919,7 @@ Automatically created from "patches.kernel.org/patch-2.6.33" by xen-port-patches
#endif /* CONFIG_XEN_DOM0 */
--- head.orig/kernel/kexec.c 2012-10-23 15:02:01.000000000 +0200
+++ head/kernel/kexec.c 2014-01-07 16:34:22.000000000 +0100
-@@ -1155,6 +1155,7 @@ size_t crash_get_memory_size(void)
+@@ -1156,6 +1156,7 @@ size_t crash_get_memory_size(void)
return size;
}
@@ -4927,7 +4927,7 @@ Automatically created from "patches.kernel.org/patch-2.6.33" by xen-port-patches
void __weak crash_free_reserved_phys_range(unsigned long begin,
unsigned long end)
{
-@@ -1214,6 +1215,7 @@ unlock:
+@@ -1215,6 +1216,7 @@ unlock:
mutex_unlock(&kexec_mutex);
return ret;
}
diff --git a/patches.xen/xen3-patch-2.6.34 b/patches.xen/xen3-patch-2.6.34
index 02f7d7ca22..df0c3b3903 100644
--- a/patches.xen/xen3-patch-2.6.34
+++ b/patches.xen/xen3-patch-2.6.34
@@ -4018,7 +4018,7 @@ Automatically created from "patches.kernel.org/patch-2.6.34" by xen-port-patches
}
}
#endif
-@@ -6606,6 +6607,11 @@ static const struct trace_print_flags pa
+@@ -6609,6 +6610,11 @@ static const struct trace_print_flags pa
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
{1UL << PG_compound_lock, "compound_lock" },
#endif
diff --git a/patches.xen/xen3-patch-3.13 b/patches.xen/xen3-patch-3.13
index 258676bb35..d1f2ddde83 100644
--- a/patches.xen/xen3-patch-3.13
+++ b/patches.xen/xen3-patch-3.13
@@ -1153,7 +1153,7 @@ Acked-by: jbeulich@suse.com
#define MAX_CORE_ATTRS 4 /* Maximum no of basic attrs */
#define TOTAL_ATTRS (MAX_CORE_ATTRS + 1)
#define MAX_CORE_DATA (NUM_REAL_CORES + BASE_SYSFS_ATTR_NO)
---- head.orig/drivers/misc/mic/Kconfig 2014-06-30 08:57:51.000000000 +0200
+--- head.orig/drivers/misc/mic/Kconfig 2014-06-08 20:19:54.000000000 +0200
+++ head/drivers/misc/mic/Kconfig 2014-04-30 11:34:05.000000000 +0200
@@ -2,7 +2,7 @@ comment "Intel MIC Host Driver"
@@ -1427,9 +1427,9 @@ Acked-by: jbeulich@suse.com
/*
* Assume that all hw features are available for now. This set
---- head.orig/drivers/xen/pci.c 2014-02-18 17:29:14.000000000 +0100
+--- head.orig/drivers/xen/pci.c 2014-08-06 12:25:25.000000000 +0200
+++ head/drivers/xen/pci.c 2013-12-06 15:48:05.000000000 +0100
-@@ -207,7 +207,7 @@ static int __init register_xen_pci_notif
+@@ -212,7 +212,7 @@ static int __init register_xen_pci_notif
arch_initcall(register_xen_pci_notifier);
diff --git a/patches.xen/xen3-patch-3.16-rc7 b/patches.xen/xen3-patch-3.16
index 14c7ab6f96..ff232fe903 100644
--- a/patches.xen/xen3-patch-3.16-rc7
+++ b/patches.xen/xen3-patch-3.16
@@ -1,10 +1,10 @@
From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
-Subject: Linux: 3.16-rc7
-Patch-mainline: 3.16-rc7
+Subject: Linux: 3.16
+Patch-mainline: 3.16
- This patch contains the differences between 3.15 and 3.16-rc7.
+ This patch contains the differences between 3.15 and 3.16.
-Automatically created from "patch-3.16-rc7" by xen-port-patches.py
+Automatically created from "patch-3.16" by xen-port-patches.py
Acked-by: jbeulich@suse.com
--- head.orig/arch/x86/Kconfig 2014-06-10 12:26:03.000000000 +0200
@@ -1014,7 +1014,7 @@ Acked-by: jbeulich@suse.com
- */
- .popsection
--- head.orig/arch/x86/kernel/entry_64-xen.S 2014-01-22 14:23:28.000000000 +0100
-+++ head/arch/x86/kernel/entry_64-xen.S 2014-06-27 11:09:43.000000000 +0200
++++ head/arch/x86/kernel/entry_64-xen.S 2014-08-06 12:39:46.000000000 +0200
@@ -39,7 +39,7 @@
* - FIXUP_TOP_OF_STACK/RESTORE_TOP_OF_STACK - Fix up the hardware stack
* frame that is otherwise undefined after a SYSCALL
@@ -1264,7 +1264,7 @@ Acked-by: jbeulich@suse.com
#endif
/*
-@@ -999,79 +793,134 @@ ENTRY(retint_kernel)
+@@ -999,79 +793,129 @@ ENTRY(retint_kernel)
call preempt_schedule_irq
jmp retint_kernel /* check again */
#endif
@@ -1289,13 +1289,8 @@ Acked-by: jbeulich@suse.com
+ cmpl $__KERNEL_CS,CS(%rdi)
+ jne do_double_fault
+ movq RIP(%rdi),%rax
-+ cmpq $irq_return_iret,%rax
-+#ifdef CONFIG_PARAVIRT
-+ je 1f
-+ cmpq $native_iret,%rax
-+#endif
++ cmpq $native_irq_return_iret,%rax
+ jne do_double_fault /* This shouldn't happen... */
-+1:
+ movq PER_CPU_VAR(kernel_stack),%rax
+ subq $(6*8-KERNEL_STACK_OFFSET),%rax /* Reset to original stack */
+ movq %rax,RSP(%rdi)
@@ -1439,7 +1434,7 @@ Acked-by: jbeulich@suse.com
/*
* Copied from arch/xen/i386/kernel/entry.S
*/
-@@ -1181,18 +1030,18 @@ ENTRY(failsafe_callback)
+@@ -1181,18 +1025,18 @@ ENTRY(failsafe_callback)
jmp error_exit
CFI_ENDPROC
@@ -1470,7 +1465,7 @@ Acked-by: jbeulich@suse.com
/* Call softirq on interrupt stack. Interrupts are off. */
ENTRY(do_softirq_own_stack)
-@@ -1214,22 +1063,17 @@ ENTRY(do_softirq_own_stack)
+@@ -1214,22 +1058,17 @@ ENTRY(do_softirq_own_stack)
CFI_ENDPROC
END(do_softirq_own_stack)
@@ -1501,16 +1496,16 @@ Acked-by: jbeulich@suse.com
#endif
#ifndef CONFIG_XEN
-@@ -1339,7 +1183,7 @@ error_sti:
+@@ -1339,7 +1178,7 @@ error_sti:
*/
error_kernelspace:
incl %ebx
- leaq irq_return(%rip),%rcx
-+ leaq irq_return_iret(%rip),%rcx
++ leaq native_irq_return_iret(%rip),%rcx
cmpq %rcx,RIP+8(%rsp)
je error_swapgs
movl %ecx,%eax /* zero extend */
-@@ -1421,7 +1265,3 @@ ENTRY(ignore_sysret)
+@@ -1421,7 +1260,3 @@ ENTRY(ignore_sysret)
END(ignore_sysret)
#endif
diff --git a/patches.xen/xen3-patch-3.2 b/patches.xen/xen3-patch-3.2
index d6916a21d3..15a6f78393 100644
--- a/patches.xen/xen3-patch-3.2
+++ b/patches.xen/xen3-patch-3.2
@@ -1739,7 +1739,7 @@ Acked-by: jbeulich@suse.com
/*
* Clear/Set all flags overriden by options, need do it
---- head.orig/arch/x86/kernel/cpu/intel.c 2014-01-07 16:34:59.000000000 +0100
+--- head.orig/arch/x86/kernel/cpu/intel.c 2014-07-29 11:13:22.000000000 +0200
+++ head/arch/x86/kernel/cpu/intel.c 2013-03-21 15:29:01.000000000 +0100
@@ -42,6 +42,7 @@ static void early_init_intel(struct cpui
(c->x86 == 0x6 && c->x86_model >= 0x0e))
@@ -1857,7 +1857,7 @@ Acked-by: jbeulich@suse.com
#include <asm/apic.h>
#include <asm/io_apic.h>
---- head.orig/arch/x86/kernel/nmi.c 2014-06-26 11:20:07.000000000 +0200
+--- head.orig/arch/x86/kernel/nmi.c 2014-08-04 00:25:02.000000000 +0200
+++ head/arch/x86/kernel/nmi.c 2014-06-26 15:05:22.000000000 +0200
@@ -236,16 +236,13 @@ pci_serr_error(unsigned char reason, str
pr_emerg("Dazed and confused, but trying to continue\n");
@@ -3610,6 +3610,34 @@ Acked-by: jbeulich@suse.com
.ndo_set_mac_address = xennet_set_mac_address,
.ndo_validate_addr = eth_validate_addr,
.ndo_fix_features = xennet_fix_features,
+--- head.orig/drivers/xen/pci.c 2014-02-18 17:29:14.000000000 +0100
++++ head/drivers/xen/pci.c 2014-08-06 12:25:25.000000000 +0200
+@@ -50,11 +50,15 @@ static int xen_add_device(struct device
+ #endif
+
+ if (pci_seg_supported) {
+- struct physdev_pci_device_add add = {
++ struct {
++ struct physdev_pci_device_add ppda;
++ uint32_t optarr[1];
++ } add = { .ppda = {
+ .seg = pci_domain_nr(pci_dev->bus),
+ .bus = pci_dev->bus->number,
+ .devfn = pci_dev->devfn
+- };
++ }};
++#define add add.ppda
+ #ifdef CONFIG_ACPI
+ acpi_handle handle;
+ #endif
+@@ -101,6 +105,7 @@ static int xen_add_device(struct device
+ #if CONFIG_XEN_COMPAT < 0x040200
+ pci_seg_supported = false;
+ #endif
++#undef add
+ }
+
+ if (pci_domain_nr(pci_dev->bus))
--- head.orig/drivers/xen/pcifront/pci.c 2013-10-29 08:26:20.000000000 +0100
+++ head/drivers/xen/pcifront/pci.c 2011-11-18 15:48:41.000000000 +0100
@@ -3,8 +3,6 @@
diff --git a/patches.xen/xen3-stack-unwind b/patches.xen/xen3-stack-unwind
index 7ae701a72a..ba6db666aa 100644
--- a/patches.xen/xen3-stack-unwind
+++ b/patches.xen/xen3-stack-unwind
@@ -60,9 +60,9 @@ Automatically created from "patches.suse/stack-unwind" by xen-port-patches.py
#ifdef CONFIG_FUNCTION_TRACER
#ifdef CONFIG_DYNAMIC_FTRACE
---- head.orig/arch/x86/kernel/entry_64-xen.S 2014-06-27 11:09:43.000000000 +0200
+--- head.orig/arch/x86/kernel/entry_64-xen.S 2014-08-06 12:39:46.000000000 +0200
+++ head/arch/x86/kernel/entry_64-xen.S 2014-06-27 16:50:43.000000000 +0200
-@@ -1063,6 +1063,40 @@ ENTRY(do_softirq_own_stack)
+@@ -1058,6 +1058,40 @@ ENTRY(do_softirq_own_stack)
CFI_ENDPROC
END(do_softirq_own_stack)
diff --git a/patches.xen/xen3-x86_64-unwind-annotations b/patches.xen/xen3-x86_64-unwind-annotations
index dae00ee886..146712980f 100644
--- a/patches.xen/xen3-x86_64-unwind-annotations
+++ b/patches.xen/xen3-x86_64-unwind-annotations
@@ -6,7 +6,7 @@ References: bnc#472783
Automatically created from "patches.arch/x86_64-unwind-annotations" by xen-port-patches.py
--- head.orig/arch/x86/kernel/entry_64-xen.S 2014-06-27 16:50:43.000000000 +0200
-+++ head/arch/x86/kernel/entry_64-xen.S 2014-06-27 16:52:26.000000000 +0200
++++ head/arch/x86/kernel/entry_64-xen.S 2014-08-06 12:41:19.000000000 +0200
@@ -168,23 +168,16 @@ NMI_MASK = 0x80000000
.endm
@@ -98,7 +98,7 @@ Automatically created from "patches.arch/x86_64-unwind-annotations" by xen-port-
movl $1,%ebx
movl $MSR_GS_BASE,%ecx
rdmsr
-@@ -871,7 +867,7 @@ ENTRY(\sym)
+@@ -866,7 +862,7 @@ ENTRY(\sym)
call error_entry
.endif
@@ -107,7 +107,7 @@ Automatically created from "patches.arch/x86_64-unwind-annotations" by xen-port-
.if \paranoid
.if \shift_ist != -1
-@@ -1177,25 +1173,24 @@ END(paranoid_exit)
+@@ -1172,25 +1168,24 @@ END(paranoid_exit)
* returns in "no swapgs flag" in %ebx.
*/
ENTRY(error_entry)
@@ -148,11 +148,11 @@ Automatically created from "patches.arch/x86_64-unwind-annotations" by xen-port-
#ifndef CONFIG_XEN
xorl %ebx,%ebx
testl $3,CS+8(%rsp)
-@@ -1216,6 +1211,7 @@ error_sti:
+@@ -1211,6 +1206,7 @@ error_sti:
* compat mode. Check for these here too.
*/
error_kernelspace:
+ CFI_REL_OFFSET rcx, RCX+8
incl %ebx
- leaq irq_return_iret(%rip),%rcx
+ leaq native_irq_return_iret(%rip),%rcx
cmpq %rcx,RIP+8(%rsp)
diff --git a/series.conf b/series.conf
index 9ba7ac52e5..61bbd78264 100644
--- a/series.conf
+++ b/series.conf
@@ -597,7 +597,7 @@
patches.xen/xen3-patch-3.13
patches.xen/xen3-patch-3.14
patches.xen/xen3-patch-3.15
- patches.xen/xen3-patch-3.16-rc7
+ patches.xen/xen3-patch-3.16
# ports of other patches
patches.xen/xen3-stack-unwind
@@ -639,6 +639,7 @@
patches.xen/xen-netback-multiple-tasklets
patches.xen/xen-netback-kernel-threads
patches.xen/xen-netback-tx-queue-len
+ patches.xen/xen-vscsi-large-requests
patches.xen/xen-cxgb3
patches.xen/xen-dcdbas
patches.xen/xen-pv-on-hvm-skip-initialization-of-emulated-devices