--- /dev/null
+From c1e0ddbf0a97e1704d7f13b4934f9acca002402d Mon Sep 17 00:00:00 2001
+From: Yinghai Lu <yinghai@kernel.org>
+Date: Fri, 17 Sep 2010 23:26:24 -0700
+Subject: ACPI: Handle ACPI0007 Device in acpi_early_set_pdc
+
+From: Yinghai Lu <yinghai@kernel.org>
+
+commit c1e0ddbf0a97e1704d7f13b4934f9acca002402d upstream.
+
+After
+| commit d8191fa4a33fdc817277da4f2b7f771ff605a41c
+| Author: Alex Chiang <achiang@hp.com>
+| Date: Mon Feb 22 12:11:39 2010 -0700
+|
+| ACPI: processor: driver doesn't need to evaluate _PDC
+|
+| Now that the early _PDC evaluation path knows how to correctly
+| evaluate _PDC on only physically present processors, there's no
+| need for the processor driver to evaluate it later when it loads.
+|
+| To cover the hotplug case, push _PDC evaluation down into the
+| hotplug paths.
+
+only cpu with Processor Statement get processed with _PDC
+
+If bios is using Device object instead of Processor statement.
+SSDTs for Pstate/Cstate/Tstate can not be loaded dynamically.
+
+Need to try to scan ACPI0007 in addition to Processor.
+
+That commit is between 2.6.34-rc1 and 2.6.34-rc2, so stable tree for 2.6.34+
+need this patch.
+
+Signed-off-by: Yinghai Lu <yinghai@kernel.org>
+Reviewed-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/acpi/processor_core.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/acpi/processor_core.c
++++ b/drivers/acpi/processor_core.c
+@@ -352,4 +352,5 @@ void __init acpi_early_processor_set_pdc
+ acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT,
+ ACPI_UINT32_MAX,
+ early_init_pdc, NULL, NULL, NULL);
++ acpi_get_devices("ACPI0007", early_init_pdc, NULL, NULL);
+ }
--- /dev/null
+From 478971600e47cb83ff2d3c63c5c24f2b04b0d6a1 Mon Sep 17 00:00:00 2001
+From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
+Date: Fri, 17 Sep 2010 00:46:42 +0900
+Subject: [SCSI] bsg: fix incorrect device_status value
+
+From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
+
+commit 478971600e47cb83ff2d3c63c5c24f2b04b0d6a1 upstream.
+
+bsg incorrectly returns sg's masked_status value for device_status.
+
+[jejb: fix up expression logic]
+Reported-by: Douglas Gilbert <dgilbert@interlog.com>
+Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
+Signed-off-by: James Bottomley <James.Bottomley@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ block/bsg.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/block/bsg.c
++++ b/block/bsg.c
+@@ -426,7 +426,7 @@ static int blk_complete_sgv4_hdr_rq(stru
+ /*
+ * fill in all the output members
+ */
+- hdr->device_status = status_byte(rq->errors);
++ hdr->device_status = rq->errors & 0xff;
+ hdr->transport_status = host_byte(rq->errors);
+ hdr->driver_status = driver_byte(rq->errors);
+ hdr->info = 0;
--- /dev/null
+From 16d3ea26f82271fef9b1c4523b5e1ea31fa39eec Mon Sep 17 00:00:00 2001
+From: Martin K. Petersen <martin.petersen@oracle.com>
+Date: Fri, 10 Sep 2010 01:20:27 -0400
+Subject: [SCSI] Fix VPD inquiry page wrapper
+
+From: Martin K. Petersen <martin.petersen@oracle.com>
+
+commit 16d3ea26f82271fef9b1c4523b5e1ea31fa39eec upstream.
+
+Fix two bugs in the VPD page wrapper:
+
+ - Don't return failure if the user asked for page 0
+
+ - The end of buffer check failed to account for the page header size
+ and consequently didn't work
+
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: James Bottomley <James.Bottomley@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/scsi/scsi.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/scsi/scsi.c
++++ b/drivers/scsi/scsi.c
+@@ -1046,13 +1046,13 @@ int scsi_get_vpd_page(struct scsi_device
+
+ /* If the user actually wanted this page, we can skip the rest */
+ if (page == 0)
+- return -EINVAL;
++ return 0;
+
+ for (i = 0; i < min((int)buf[3], buf_len - 4); i++)
+ if (buf[i + 4] == page)
+ goto found;
+
+- if (i < buf[3] && i > buf_len)
++ if (i < buf[3] && i >= buf_len - 4)
+ /* ran off the end of the buffer, give us benefit of doubt */
+ goto found;
+ /* The device claims it doesn't support the requested page */
--- /dev/null
+From 54a834043314c257210db2a9d59f8cc605571639 Mon Sep 17 00:00:00 2001
+From: Michael Neuling <mikey@neuling.org>
+Date: Wed, 25 Aug 2010 21:04:25 +0000
+Subject: powerpc: Don't use kernel stack with translation off
+
+From: Michael Neuling <mikey@neuling.org>
+
+commit 54a834043314c257210db2a9d59f8cc605571639 upstream.
+
+In f761622e59433130bc33ad086ce219feee9eb961 we changed
+early_setup_secondary so it's called using the proper kernel stack
+rather than the emergency one.
+
+Unfortunately, this stack pointer can't be used when translation is off
+on PHYP as this stack pointer might be outside the RMO. This results in
+the following on all non zero cpus:
+ cpu 0x1: Vector: 300 (Data Access) at [c00000001639fd10]
+ pc: 000000000001c50c
+ lr: 000000000000821c
+ sp: c00000001639ff90
+ msr: 8000000000001000
+ dar: c00000001639ffa0
+ dsisr: 42000000
+ current = 0xc000000016393540
+ paca = 0xc000000006e00200
+ pid = 0, comm = swapper
+
+The original patch was only tested on bare metal system, so it never
+caught this problem.
+
+This changes __secondary_start so that we calculate the new stack
+pointer but only start using it after we've called early_setup_secondary.
+
+With this patch, the above problem goes away.
+
+Signed-off-by: Michael Neuling <mikey@neuling.org>
+Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/powerpc/kernel/head_64.S | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+--- a/arch/powerpc/kernel/head_64.S
++++ b/arch/powerpc/kernel/head_64.S
+@@ -575,13 +575,19 @@ __secondary_start:
+ /* Initialize the kernel stack. Just a repeat for iSeries. */
+ LOAD_REG_ADDR(r3, current_set)
+ sldi r28,r24,3 /* get current_set[cpu#] */
+- ldx r1,r3,r28
+- addi r1,r1,THREAD_SIZE-STACK_FRAME_OVERHEAD
+- std r1,PACAKSAVE(r13)
++ ldx r14,r3,r28
++ addi r14,r14,THREAD_SIZE-STACK_FRAME_OVERHEAD
++ std r14,PACAKSAVE(r13)
+
+ /* Do early setup for that CPU (stab, slb, hash table pointer) */
+ bl .early_setup_secondary
+
++ /*
++ * setup the new stack pointer, but *don't* use this until
++ * translation is on.
++ */
++ mr r1, r14
++
+ /* Clear backchain so we get nice backtraces */
+ li r7,0
+ mtlr r7
--- /dev/null
+From f761622e59433130bc33ad086ce219feee9eb961 Mon Sep 17 00:00:00 2001
+From: Matt Evans <matt@ozlabs.org>
+Date: Thu, 12 Aug 2010 20:58:28 +0000
+Subject: powerpc: Initialise paca->kstack before early_setup_secondary
+
+From: Matt Evans <matt@ozlabs.org>
+
+commit f761622e59433130bc33ad086ce219feee9eb961 upstream.
+
+As early setup calls down to slb_initialize(), we must have kstack
+initialised before checking "should we add a bolted SLB entry for our kstack?"
+
+Failing to do so means stack access requires an SLB miss exception to refill
+an entry dynamically, if the stack isn't accessible via SLB(0) (kernel text
+& static data). It's not always allowable to take such a miss, and
+intermittent crashes will result.
+
+Primary CPUs don't have this issue; an SLB entry is not bolted for their
+stack anyway (as that lives within SLB(0)). This patch therefore only
+affects the init of secondaries.
+
+Signed-off-by: Matt Evans <matt@ozlabs.org>
+Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/powerpc/kernel/head_64.S | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/arch/powerpc/kernel/head_64.S
++++ b/arch/powerpc/kernel/head_64.S
+@@ -572,9 +572,6 @@ __secondary_start:
+ /* Set thread priority to MEDIUM */
+ HMT_MEDIUM
+
+- /* Do early setup for that CPU (stab, slb, hash table pointer) */
+- bl .early_setup_secondary
+-
+ /* Initialize the kernel stack. Just a repeat for iSeries. */
+ LOAD_REG_ADDR(r3, current_set)
+ sldi r28,r24,3 /* get current_set[cpu#] */
+@@ -582,6 +579,9 @@ __secondary_start:
+ addi r1,r1,THREAD_SIZE-STACK_FRAME_OVERHEAD
+ std r1,PACAKSAVE(r13)
+
++ /* Do early setup for that CPU (stab, slb, hash table pointer) */
++ bl .early_setup_secondary
++
+ /* Clear backchain so we get nice backtraces */
+ li r7,0
+ mtlr r7
kvm-x86-move-tsc-reset-out-of-vmcb_init.patch
kvm-fix-irqfd-assign-deassign-race.patch
kvm-fix-reboot-on-intel-hosts.patch
+bsg-fix-incorrect-device_status-value.patch
+fix-vpd-inquiry-page-wrapper.patch
+virtio-console-don-t-block-entire-guest-if-host-doesn-t-read-data.patch
+acpi-handle-acpi0007-device-in-acpi_early_set_pdc.patch
+powerpc-initialise-paca-kstack-before-early_setup_secondary.patch
+powerpc-don-t-use-kernel-stack-with-translation-off.patch
--- /dev/null
+From 531295e63be8c2b8b909d7400739e8b8df60d61f Mon Sep 17 00:00:00 2001
+From: Amit Shah <amit.shah@redhat.com>
+Date: Wed, 20 Oct 2010 13:45:43 +1030
+Subject: virtio: console: Don't block entire guest if host doesn't read data
+
+From: Amit Shah <amit.shah@redhat.com>
+
+commit 531295e63be8c2b8b909d7400739e8b8df60d61f upstream.
+
+If the host is slow in reading data or doesn't read data at all,
+blocking write calls not only blocked the program that called write()
+but the entire guest itself.
+
+To overcome this, let's not block till the host signals it has given
+back the virtio ring element we passed it. Instead, send the buffer to
+the host and return to userspace. This operation then becomes similar
+to how non-blocking writes work, so let's use the existing code for this
+path as well.
+
+This code change also ensures blocking write calls do get blocked if
+there's not enough room in the virtio ring as well as they don't return
+-EAGAIN to userspace.
+
+Signed-off-by: Amit Shah <amit.shah@redhat.com>
+Acked-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/virtio_console.c | 17 ++++++++++++++---
+ 1 file changed, 14 insertions(+), 3 deletions(-)
+
+--- a/drivers/char/virtio_console.c
++++ b/drivers/char/virtio_console.c
+@@ -459,9 +459,12 @@ static ssize_t send_buf(struct port *por
+
+ /*
+ * Wait till the host acknowledges it pushed out the data we
+- * sent. This is done for ports in blocking mode or for data
+- * from the hvc_console; the tty operations are performed with
+- * spinlocks held so we can't sleep here.
++ * sent. This is done for data from the hvc_console; the tty
++ * operations are performed with spinlocks held so we can't
++ * sleep here. An alternative would be to copy the data to a
++ * buffer and relax the spinning requirement. The downside is
++ * we need to kmalloc a GFP_ATOMIC buffer each time the
++ * console driver writes something out.
+ */
+ while (!virtqueue_get_buf(out_vq, &len))
+ cpu_relax();
+@@ -626,6 +629,14 @@ static ssize_t port_fops_write(struct fi
+ goto free_buf;
+ }
+
++ /*
++ * We now ask send_buf() to not spin for generic ports -- we
++ * can re-use the same code path that non-blocking file
++ * descriptors take for blocking file descriptors since the
++ * wait is already done and we're certain the write will go
++ * through to the host.
++ */
++ nonblock = true;
+ ret = send_buf(port, buf, count, nonblock);
+
+ if (nonblock && ret > 0)