version 3.7.4-1
As usually with updated patches and removed already included in upstream release. Also remove kernel version from patch filenames.
This commit is contained in:
parent
b754a6b36e
commit
f6ab40c53e
1243
config-pvops
1243
config-pvops
File diff suppressed because it is too large
Load Diff
@ -38,8 +38,8 @@ index 610001d..68cf060 100644
|
|||||||
-extern int acpi_suspend_lowlevel(void);
|
-extern int acpi_suspend_lowlevel(void);
|
||||||
+extern int (*acpi_suspend_lowlevel)(void);
|
+extern int (*acpi_suspend_lowlevel)(void);
|
||||||
|
|
||||||
extern const unsigned char acpi_wakeup_code[];
|
/* Physical address to resume after wakeup */
|
||||||
#define acpi_wakeup_address (__pa(TRAMPOLINE_SYM(acpi_wakeup_code)))
|
#define acpi_wakeup_address ((unsigned long)(real_mode_header->wakeup_start))
|
||||||
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
|
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
|
||||||
index ce664f3..c3a5b95 100644
|
index ce664f3..c3a5b95 100644
|
||||||
--- a/arch/x86/kernel/acpi/boot.c
|
--- a/arch/x86/kernel/acpi/boot.c
|
||||||
@ -70,8 +70,8 @@ index 103b6ab..4d2d0b1 100644
|
|||||||
--- a/arch/x86/kernel/acpi/sleep.c
|
--- a/arch/x86/kernel/acpi/sleep.c
|
||||||
+++ b/arch/x86/kernel/acpi/sleep.c
|
+++ b/arch/x86/kernel/acpi/sleep.c
|
||||||
@@ -25,12 +25,12 @@ static char temp_stack[4096];
|
@@ -25,12 +25,12 @@ static char temp_stack[4096];
|
||||||
acpi_enter_sleep_state(3, wake_sleep_flags);
|
#endif
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
- * acpi_suspend_lowlevel - save kernel state
|
- * acpi_suspend_lowlevel - save kernel state
|
||||||
+ * x86_acpi_suspend_lowlevel - save kernel state
|
+ * x86_acpi_suspend_lowlevel - save kernel state
|
||||||
@ -82,8 +82,8 @@ index 103b6ab..4d2d0b1 100644
|
|||||||
-int acpi_suspend_lowlevel(void)
|
-int acpi_suspend_lowlevel(void)
|
||||||
+int x86_acpi_suspend_lowlevel(void)
|
+int x86_acpi_suspend_lowlevel(void)
|
||||||
{
|
{
|
||||||
struct wakeup_header *header;
|
struct wakeup_header *header =
|
||||||
/* address in low memory of the wakeup routine. */
|
(struct wakeup_header *) __va(real_mode_header->wakeup_header);
|
||||||
diff --git a/arch/x86/kernel/acpi/sleep.h b/arch/x86/kernel/acpi/sleep.h
|
diff --git a/arch/x86/kernel/acpi/sleep.h b/arch/x86/kernel/acpi/sleep.h
|
||||||
index 416d4be..4d3feb5 100644
|
index 416d4be..4d3feb5 100644
|
||||||
--- a/arch/x86/kernel/acpi/sleep.h
|
--- a/arch/x86/kernel/acpi/sleep.h
|
@ -32,7 +32,7 @@ index 48a9c01..ebaabbb 100644
|
|||||||
+ * we can skip that and just go straight to
|
+ * we can skip that and just go straight to
|
||||||
+ * the suspend.
|
+ * the suspend.
|
||||||
+ */
|
+ */
|
||||||
+ acpi_enter_sleep_state(ACPI_STATE_S3, 0);
|
+ acpi_enter_sleep_state(ACPI_STATE_S3);
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
@ -35,10 +35,10 @@ diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
|
|||||||
index f788eb8..cbb0961 100644
|
index f788eb8..cbb0961 100644
|
||||||
--- a/drivers/usb/host/Kconfig
|
--- a/drivers/usb/host/Kconfig
|
||||||
+++ b/drivers/usb/host/Kconfig
|
+++ b/drivers/usb/host/Kconfig
|
||||||
@@ -638,3 +638,26 @@ config USB_OCTEON_OHCI
|
@@ -675,3 +675,26 @@ config USB_OCTEON_OHCI
|
||||||
config USB_OCTEON2_COMMON
|
for ehci and ohci.
|
||||||
bool
|
|
||||||
default y if USB_OCTEON_EHCI || USB_OCTEON_OHCI
|
If unsure, say N.
|
||||||
+
|
+
|
||||||
+config XEN_USBDEV_FRONTEND
|
+config XEN_USBDEV_FRONTEND
|
||||||
+ tristate "Xen pvusb device frontend driver"
|
+ tristate "Xen pvusb device frontend driver"
|
||||||
@ -66,13 +66,15 @@ diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
|
|||||||
index 0982bcc..d62fe38 100644
|
index 0982bcc..d62fe38 100644
|
||||||
--- a/drivers/usb/host/Makefile
|
--- a/drivers/usb/host/Makefile
|
||||||
+++ b/drivers/usb/host/Makefile
|
+++ b/drivers/usb/host/Makefile
|
||||||
@@ -40,4 +40,6 @@ obj-$(CONFIG_USB_HWA_HCD) += hwa-hc.o
|
@@ -40,6 +40,8 @@ obj-$(CONFIG_USB_HWA_HCD) += hwa-hc.o
|
||||||
obj-$(CONFIG_USB_IMX21_HCD) += imx21-hcd.o
|
obj-$(CONFIG_USB_IMX21_HCD) += imx21-hcd.o
|
||||||
obj-$(CONFIG_USB_FSL_MPH_DR_OF) += fsl-mph-dr-of.o
|
obj-$(CONFIG_USB_FSL_MPH_DR_OF) += fsl-mph-dr-of.o
|
||||||
obj-$(CONFIG_USB_OCTEON2_COMMON) += octeon2-common.o
|
obj-$(CONFIG_USB_OCTEON2_COMMON) += octeon2-common.o
|
||||||
+obj-$(CONFIG_XEN_USBDEV_FRONTEND) += xen-usbfront.o
|
+obj-$(CONFIG_XEN_USBDEV_FRONTEND) += xen-usbfront.o
|
||||||
+obj-$(CONFIG_XEN_USBDEV_BACKEND) += xen-usbback/
|
+obj-$(CONFIG_XEN_USBDEV_BACKEND) += xen-usbback/
|
||||||
obj-$(CONFIG_MIPS_ALCHEMY) += alchemy-common.o
|
obj-$(CONFIG_MIPS_ALCHEMY) += alchemy-common.o
|
||||||
|
obj-$(CONFIG_USB_HCD_BCMA) += bcma-hcd.o
|
||||||
|
obj-$(CONFIG_USB_HCD_SSB) += ssb-hcd.o
|
||||||
diff --git a/drivers/usb/host/xen-usbback/Makefile b/drivers/usb/host/xen-usbback/Makefile
|
diff --git a/drivers/usb/host/xen-usbback/Makefile b/drivers/usb/host/xen-usbback/Makefile
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..9f3628c
|
index 0000000..9f3628c
|
@ -1,197 +0,0 @@
|
|||||||
From 9b10575276a220543b8791f2cb8268fbd4a0bc2e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
|
||||||
Date: Thu, 8 Dec 2011 17:32:23 +0800
|
|
||||||
Subject: xen/acpi/sleep: Enable ACPI sleep via the __acpi_os_prepare_sleep
|
|
||||||
|
|
||||||
Provide the registration callback to call in the Xen's
|
|
||||||
ACPI sleep functionality. This means that during S3/S5
|
|
||||||
we make a hypercall XENPF_enter_acpi_sleep with the
|
|
||||||
proper PM1A/PM1B registers.
|
|
||||||
|
|
||||||
Based of Ke Yu's <ke.yu@intel.com> initial idea.
|
|
||||||
[ From http://xenbits.xensource.com/linux-2.6.18-xen.hg
|
|
||||||
change c68699484a65 ]
|
|
||||||
|
|
||||||
[v1: Added Copyright and license]
|
|
||||||
[v2: Added check if PM1A/B the 16-bits MSB contain something. The spec
|
|
||||||
only uses 16-bits but might have more in future]
|
|
||||||
Signed-off-by: Liang Tang <liang.tang@oracle.com>
|
|
||||||
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
|
||||||
---
|
|
||||||
arch/x86/xen/enlighten.c | 3 ++
|
|
||||||
drivers/xen/Makefile | 2 +-
|
|
||||||
drivers/xen/acpi.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++
|
|
||||||
include/xen/acpi.h | 58 +++++++++++++++++++++++++++++++++++++++++++
|
|
||||||
4 files changed, 124 insertions(+), 1 deletions(-)
|
|
||||||
create mode 100644 drivers/xen/acpi.c
|
|
||||||
create mode 100644 include/xen/acpi.h
|
|
||||||
|
|
||||||
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
|
|
||||||
index 12eb07b..a5277c2 100644
|
|
||||||
--- a/arch/x86/xen/enlighten.c
|
|
||||||
+++ b/arch/x86/xen/enlighten.c
|
|
||||||
@@ -42,6 +42,7 @@
|
|
||||||
#include <xen/page.h>
|
|
||||||
#include <xen/hvm.h>
|
|
||||||
#include <xen/hvc-console.h>
|
|
||||||
+#include <xen/acpi.h>
|
|
||||||
|
|
||||||
#include <asm/paravirt.h>
|
|
||||||
#include <asm/apic.h>
|
|
||||||
@@ -1275,6 +1276,8 @@ asmlinkage void __init xen_start_kernel(void)
|
|
||||||
|
|
||||||
/* Make sure ACS will be enabled */
|
|
||||||
pci_request_acs();
|
|
||||||
+
|
|
||||||
+ xen_acpi_sleep_register();
|
|
||||||
}
|
|
||||||
#ifdef CONFIG_PCI
|
|
||||||
/* PCI BIOS service won't work from a PV guest. */
|
|
||||||
diff --git a/drivers/xen/Makefile b/drivers/xen/Makefile
|
|
||||||
index aa31337..77a845f 100644
|
|
||||||
--- a/drivers/xen/Makefile
|
|
||||||
+++ b/drivers/xen/Makefile
|
|
||||||
@@ -17,7 +17,7 @@ obj-$(CONFIG_XEN_SYS_HYPERVISOR) += sys-hypervisor.o
|
|
||||||
obj-$(CONFIG_XEN_PVHVM) += platform-pci.o
|
|
||||||
obj-$(CONFIG_XEN_TMEM) += tmem.o
|
|
||||||
obj-$(CONFIG_SWIOTLB_XEN) += swiotlb-xen.o
|
|
||||||
-obj-$(CONFIG_XEN_DOM0) += pci.o
|
|
||||||
+obj-$(CONFIG_XEN_DOM0) += pci.o acpi.o
|
|
||||||
obj-$(CONFIG_XEN_PCIDEV_BACKEND) += xen-pciback/
|
|
||||||
obj-$(CONFIG_XEN_PRIVCMD) += xen-privcmd.o
|
|
||||||
obj-$(CONFIG_XEN_ACPI_PROCESSOR) += xen-acpi-processor.o
|
|
||||||
diff --git a/drivers/xen/acpi.c b/drivers/xen/acpi.c
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..119d42a
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/drivers/xen/acpi.c
|
|
||||||
@@ -0,0 +1,62 @@
|
|
||||||
+/******************************************************************************
|
|
||||||
+ * acpi.c
|
|
||||||
+ * acpi file for domain 0 kernel
|
|
||||||
+ *
|
|
||||||
+ * Copyright (c) 2011 Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
|
||||||
+ * Copyright (c) 2011 Yu Ke ke.yu@intel.com
|
|
||||||
+ *
|
|
||||||
+ * This program is free software; you can redistribute it and/or
|
|
||||||
+ * modify it under the terms of the GNU General Public License version 2
|
|
||||||
+ * as published by the Free Software Foundation; or, when distributed
|
|
||||||
+ * separately from the Linux kernel or incorporated into other
|
|
||||||
+ * software packages, subject to the following license:
|
|
||||||
+ *
|
|
||||||
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
+ * of this source file (the "Software"), to deal in the Software without
|
|
||||||
+ * restriction, including without limitation the rights to use, copy, modify,
|
|
||||||
+ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
|
||||||
+ * and to permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
+ * the following conditions:
|
|
||||||
+ *
|
|
||||||
+ * The above copyright notice and this permission notice shall be included in
|
|
||||||
+ * all copies or substantial portions of the Software.
|
|
||||||
+ *
|
|
||||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
||||||
+ * IN THE SOFTWARE.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#include <xen/acpi.h>
|
|
||||||
+#include <xen/interface/platform.h>
|
|
||||||
+#include <asm/xen/hypercall.h>
|
|
||||||
+#include <asm/xen/hypervisor.h>
|
|
||||||
+
|
|
||||||
+int xen_acpi_notify_hypervisor_state(u8 sleep_state,
|
|
||||||
+ u32 pm1a_cnt, u32 pm1b_cnt)
|
|
||||||
+{
|
|
||||||
+ struct xen_platform_op op = {
|
|
||||||
+ .cmd = XENPF_enter_acpi_sleep,
|
|
||||||
+ .interface_version = XENPF_INTERFACE_VERSION,
|
|
||||||
+ .u = {
|
|
||||||
+ .enter_acpi_sleep = {
|
|
||||||
+ .pm1a_cnt_val = (u16)pm1a_cnt,
|
|
||||||
+ .pm1b_cnt_val = (u16)pm1b_cnt,
|
|
||||||
+ .sleep_state = sleep_state,
|
|
||||||
+ },
|
|
||||||
+ },
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ if ((pm1a_cnt & 0xffff0000) || (pm1b_cnt & 0xffff0000)) {
|
|
||||||
+ WARN(1, "Using more than 16bits of PM1A/B 0x%x/0x%x!"
|
|
||||||
+ "Email xen-devel@lists.xensource.com Thank you.\n", \
|
|
||||||
+ pm1a_cnt, pm1b_cnt);
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ HYPERVISOR_dom0_op(&op);
|
|
||||||
+ return 1;
|
|
||||||
+}
|
|
||||||
diff --git a/include/xen/acpi.h b/include/xen/acpi.h
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..48a9c01
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/include/xen/acpi.h
|
|
||||||
@@ -0,0 +1,58 @@
|
|
||||||
+/******************************************************************************
|
|
||||||
+ * acpi.h
|
|
||||||
+ * acpi file for domain 0 kernel
|
|
||||||
+ *
|
|
||||||
+ * Copyright (c) 2011 Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
|
||||||
+ * Copyright (c) 2011 Yu Ke <ke.yu@intel.com>
|
|
||||||
+ *
|
|
||||||
+ * This program is free software; you can redistribute it and/or
|
|
||||||
+ * modify it under the terms of the GNU General Public License version 2
|
|
||||||
+ * as published by the Free Software Foundation; or, when distributed
|
|
||||||
+ * separately from the Linux kernel or incorporated into other
|
|
||||||
+ * software packages, subject to the following license:
|
|
||||||
+ *
|
|
||||||
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
+ * of this source file (the "Software"), to deal in the Software without
|
|
||||||
+ * restriction, including without limitation the rights to use, copy, modify,
|
|
||||||
+ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
|
||||||
+ * and to permit persons to whom the Software is furnished to do so, subject to
|
|
||||||
+ * the following conditions:
|
|
||||||
+ *
|
|
||||||
+ * The above copyright notice and this permission notice shall be included in
|
|
||||||
+ * all copies or substantial portions of the Software.
|
|
||||||
+ *
|
|
||||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
||||||
+ * IN THE SOFTWARE.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#ifndef _XEN_ACPI_H
|
|
||||||
+#define _XEN_ACPI_H
|
|
||||||
+
|
|
||||||
+#include <linux/types.h>
|
|
||||||
+
|
|
||||||
+#ifdef CONFIG_XEN_DOM0
|
|
||||||
+#include <asm/xen/hypervisor.h>
|
|
||||||
+#include <xen/xen.h>
|
|
||||||
+#include <linux/acpi.h>
|
|
||||||
+
|
|
||||||
+int xen_acpi_notify_hypervisor_state(u8 sleep_state,
|
|
||||||
+ u32 pm1a_cnt, u32 pm1b_cnd);
|
|
||||||
+
|
|
||||||
+static inline void xen_acpi_sleep_register(void)
|
|
||||||
+{
|
|
||||||
+ if (xen_initial_domain())
|
|
||||||
+ acpi_os_set_prepare_sleep(
|
|
||||||
+ &xen_acpi_notify_hypervisor_state);
|
|
||||||
+}
|
|
||||||
+#else
|
|
||||||
+static inline void xen_acpi_sleep_register(void)
|
|
||||||
+{
|
|
||||||
+}
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#endif /* _XEN_ACPI_H */
|
|
||||||
--
|
|
||||||
1.7.6.4
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
|
|
||||||
index 698b905..e31ebff 100644
|
|
||||||
--- a/drivers/net/xen-netfront.c
|
|
||||||
+++ b/drivers/net/xen-netfront.c
|
|
||||||
@@ -1953,9 +1953,6 @@ static int __init netif_init(void)
|
|
||||||
if (!xen_domain())
|
|
||||||
return -ENODEV;
|
|
||||||
|
|
||||||
- if (xen_initial_domain())
|
|
||||||
- return 0;
|
|
||||||
-
|
|
||||||
if (xen_hvm_domain() && !xen_platform_pci_unplug)
|
|
||||||
return -ENODEV;
|
|
||||||
|
|
||||||
@@ -1965,9 +1962,6 @@ module_init(netif_init);
|
|
||||||
|
|
||||||
static void __exit netif_exit(void)
|
|
||||||
{
|
|
||||||
- if (xen_initial_domain())
|
|
||||||
- return;
|
|
||||||
-
|
|
||||||
xenbus_unregister_driver(&netfront_driver);
|
|
||||||
}
|
|
||||||
module_exit(netif_exit);
|
|
@ -1,60 +0,0 @@
|
|||||||
Subject: [Xen-devel] [PATCH] xen/netback: calculate correctly the SKB slots.
|
|
||||||
Date: Mon, 21 May 2012 13:36:33 -0400
|
|
||||||
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
|
||||||
To: xen-devel@lists.xensource.com, ian.campbell@citrix.com,
|
|
||||||
netdev@vger.kernel.org, davem@davemloft.net, linux-kernel@vger.kernel.org
|
|
||||||
CC: Adnan Misherfi <adnan.misherfi@oracle.com>, Konrad Rzeszutek Wilk
|
|
||||||
<konrad.wilk@oracle.com>
|
|
||||||
|
|
||||||
From: Adnan Misherfi <adnan.misherfi@oracle.com>
|
|
||||||
|
|
||||||
A programming error cause the calculation of receive SKB slots to be
|
|
||||||
wrong, which caused the RX ring to be erroneously declared full,
|
|
||||||
and the receive queue to be stopped. The problem shows up when two
|
|
||||||
guest running on the same server tries to communicates using large
|
|
||||||
MTUs. Each guest is connected to a bridge with VLAN over bond
|
|
||||||
interface, so traffic from one guest leaves the server on one bridge
|
|
||||||
and comes back to the second guest on the second bridge. This can be
|
|
||||||
reproduces using ping, and one guest as follow:
|
|
||||||
|
|
||||||
- Create active-back bond (bond0)
|
|
||||||
- Set up VLAN 5 on bond0 (bond0.5)
|
|
||||||
- Create a bridge (br1)
|
|
||||||
- Add bond0.5 to a bridge (br1)
|
|
||||||
- Start a guest and connect it to br1
|
|
||||||
- Set MTU of 9000 across the link
|
|
||||||
|
|
||||||
Ping the guest from an external host using packet sizes of 3991, and
|
|
||||||
4054; ping -s 3991 -c 128 "Guest-IP-Address"
|
|
||||||
|
|
||||||
At the beginning ping works fine, but after a while ping packets do
|
|
||||||
not reach the guest because the RX ring becomes full, and the queue
|
|
||||||
get stopped. Once the problem accrued, the only way to get out of it
|
|
||||||
is to reboot the guest, or use xm network-detach/network-attach.
|
|
||||||
|
|
||||||
ping works for packets sizes 3990,3992, and many other sizes including
|
|
||||||
4000,5000,9000, and 1500 ..etc. MTU size of 3991,4054 are the sizes
|
|
||||||
that quickly reproduce this problem.
|
|
||||||
|
|
||||||
Signed-off-by: Adnan Misherfi <adnan.misherfi@oracle.com>
|
|
||||||
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
|
||||||
---
|
|
||||||
drivers/net/xen-netback/netback.c | 2 +-
|
|
||||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/net/xen-netback/netback.c
|
|
||||||
b/drivers/net/xen-netback/netback.c
|
|
||||||
index 957cf9d..e382e5b 100644
|
|
||||||
--- a/drivers/net/xen-netback/netback.c
|
|
||||||
+++ b/drivers/net/xen-netback/netback.c
|
|
||||||
@@ -212,7 +212,7 @@ unsigned int xenvif_count_skb_slots(struct xenvif *vif, struct sk_buff *skb)
|
|
||||||
int i, copy_off;
|
|
||||||
|
|
||||||
count = DIV_ROUND_UP(
|
|
||||||
- offset_in_page(skb->data)+skb_headlen(skb), PAGE_SIZE);
|
|
||||||
+ offset_in_page(skb->data + skb_headlen(skb)), PAGE_SIZE);
|
|
||||||
|
|
||||||
copy_off = skb_headlen(skb) % PAGE_SIZE;
|
|
||||||
|
|
||||||
--
|
|
||||||
1.7.7.5
|
|
@ -1,141 +0,0 @@
|
|||||||
From 6878c32e5cc0e40980abe51d1f02fb453e27493e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
|
||||||
Date: Fri, 25 May 2012 17:34:51 -0400
|
|
||||||
Subject: [PATCH 3/3] xen/blkfront: Add WARN to deal with misbehaving
|
|
||||||
backends.
|
|
||||||
|
|
||||||
Part of the ring structure is the 'id' field which is under
|
|
||||||
control of the frontend. The frontend stamps it with "some"
|
|
||||||
value (this some in this implementation being a value less
|
|
||||||
than BLK_RING_SIZE), and when it gets a response expects
|
|
||||||
said value to be in the response structure. We have a check
|
|
||||||
for the id field when spolling new requests but not when
|
|
||||||
de-spolling responses.
|
|
||||||
|
|
||||||
We also add an extra check in add_id_to_freelist to make
|
|
||||||
sure that the 'struct request' was not NULL - as we cannot
|
|
||||||
pass a NULL to __blk_end_request_all, otherwise that crashes
|
|
||||||
(and all the operations that the response is dealing with
|
|
||||||
end up with __blk_end_request_all).
|
|
||||||
|
|
||||||
Lastly we also print the name of the operation that failed.
|
|
||||||
|
|
||||||
[v1: s/BUG/WARN/ suggested by Stefano]
|
|
||||||
[v2: Add extra check in add_id_to_freelist]
|
|
||||||
[v3: Redid op_name per Jan's suggestion]
|
|
||||||
[v4: add const * and add WARN on failure returns]
|
|
||||||
Acked-by: Jan Beulich <jbeulich@suse.com>
|
|
||||||
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
|
|
||||||
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
|
||||||
---
|
|
||||||
drivers/block/xen-blkfront.c | 58 +++++++++++++++++++++++++++++++++--------
|
|
||||||
1 files changed, 46 insertions(+), 12 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
|
|
||||||
index 60eed4b..e4fb337 100644
|
|
||||||
--- a/drivers/block/xen-blkfront.c
|
|
||||||
+++ b/drivers/block/xen-blkfront.c
|
|
||||||
@@ -141,14 +141,36 @@ static int get_id_from_freelist(struct blkfront_info *info)
|
|
||||||
return free;
|
|
||||||
}
|
|
||||||
|
|
||||||
-static void add_id_to_freelist(struct blkfront_info *info,
|
|
||||||
+static int add_id_to_freelist(struct blkfront_info *info,
|
|
||||||
unsigned long id)
|
|
||||||
{
|
|
||||||
+ if (info->shadow[id].req.u.rw.id != id)
|
|
||||||
+ return -EINVAL;
|
|
||||||
+ if (info->shadow[id].request == NULL)
|
|
||||||
+ return -EINVAL;
|
|
||||||
info->shadow[id].req.u.rw.id = info->shadow_free;
|
|
||||||
info->shadow[id].request = NULL;
|
|
||||||
info->shadow_free = id;
|
|
||||||
+ return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
+static const char *op_name(int op)
|
|
||||||
+{
|
|
||||||
+ static const char *const names[] = {
|
|
||||||
+ [BLKIF_OP_READ] = "read",
|
|
||||||
+ [BLKIF_OP_WRITE] = "write",
|
|
||||||
+ [BLKIF_OP_WRITE_BARRIER] = "barrier",
|
|
||||||
+ [BLKIF_OP_FLUSH_DISKCACHE] = "flush",
|
|
||||||
+ [BLKIF_OP_DISCARD] = "discard" };
|
|
||||||
+
|
|
||||||
+ if (op < 0 || op >= ARRAY_SIZE(names))
|
|
||||||
+ return "unknown";
|
|
||||||
+
|
|
||||||
+ if (!names[op])
|
|
||||||
+ return "reserved";
|
|
||||||
+
|
|
||||||
+ return names[op];
|
|
||||||
+}
|
|
||||||
static int xlbd_reserve_minors(unsigned int minor, unsigned int nr)
|
|
||||||
{
|
|
||||||
unsigned int end = minor + nr;
|
|
||||||
@@ -746,20 +768,36 @@ static irqreturn_t blkif_interrupt(int irq, void *dev_id)
|
|
||||||
|
|
||||||
bret = RING_GET_RESPONSE(&info->ring, i);
|
|
||||||
id = bret->id;
|
|
||||||
+ /*
|
|
||||||
+ * The backend has messed up and given us an id that we would
|
|
||||||
+ * never have given to it (we stamp it up to BLK_RING_SIZE -
|
|
||||||
+ * look in get_id_from_freelist.
|
|
||||||
+ */
|
|
||||||
+ if (id >= BLK_RING_SIZE) {
|
|
||||||
+ WARN(1, "%s: response to %s has incorrect id (%ld)\n",
|
|
||||||
+ info->gd->disk_name, op_name(bret->operation), id);
|
|
||||||
+ /* We can't safely get the 'struct request' as
|
|
||||||
+ * the id is busted. */
|
|
||||||
+ continue;
|
|
||||||
+ }
|
|
||||||
req = info->shadow[id].request;
|
|
||||||
|
|
||||||
if (bret->operation != BLKIF_OP_DISCARD)
|
|
||||||
blkif_completion(&info->shadow[id]);
|
|
||||||
|
|
||||||
- add_id_to_freelist(info, id);
|
|
||||||
+ if (add_id_to_freelist(info, id)) {
|
|
||||||
+ WARN(1, "%s: response to %s (id %ld) couldn't be recycled!\n",
|
|
||||||
+ info->gd->disk_name, op_name(bret->operation), id);
|
|
||||||
+ continue;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
error = (bret->status == BLKIF_RSP_OKAY) ? 0 : -EIO;
|
|
||||||
switch (bret->operation) {
|
|
||||||
case BLKIF_OP_DISCARD:
|
|
||||||
if (unlikely(bret->status == BLKIF_RSP_EOPNOTSUPP)) {
|
|
||||||
struct request_queue *rq = info->rq;
|
|
||||||
- printk(KERN_WARNING "blkfront: %s: discard op failed\n",
|
|
||||||
- info->gd->disk_name);
|
|
||||||
+ printk(KERN_WARNING "blkfront: %s: %s op failed\n",
|
|
||||||
+ info->gd->disk_name, op_name(bret->operation));
|
|
||||||
error = -EOPNOTSUPP;
|
|
||||||
info->feature_discard = 0;
|
|
||||||
info->feature_secdiscard = 0;
|
|
||||||
@@ -771,18 +809,14 @@ static irqreturn_t blkif_interrupt(int irq, void *dev_id)
|
|
||||||
case BLKIF_OP_FLUSH_DISKCACHE:
|
|
||||||
case BLKIF_OP_WRITE_BARRIER:
|
|
||||||
if (unlikely(bret->status == BLKIF_RSP_EOPNOTSUPP)) {
|
|
||||||
- printk(KERN_WARNING "blkfront: %s: write %s op failed\n",
|
|
||||||
- info->flush_op == BLKIF_OP_WRITE_BARRIER ?
|
|
||||||
- "barrier" : "flush disk cache",
|
|
||||||
- info->gd->disk_name);
|
|
||||||
+ printk(KERN_WARNING "blkfront: %s: %s op failed\n",
|
|
||||||
+ info->gd->disk_name, op_name(bret->operation));
|
|
||||||
error = -EOPNOTSUPP;
|
|
||||||
}
|
|
||||||
if (unlikely(bret->status == BLKIF_RSP_ERROR &&
|
|
||||||
info->shadow[id].req.u.rw.nr_segments == 0)) {
|
|
||||||
- printk(KERN_WARNING "blkfront: %s: empty write %s op failed\n",
|
|
||||||
- info->flush_op == BLKIF_OP_WRITE_BARRIER ?
|
|
||||||
- "barrier" : "flush disk cache",
|
|
||||||
- info->gd->disk_name);
|
|
||||||
+ printk(KERN_WARNING "blkfront: %s: empty %s op failed\n",
|
|
||||||
+ info->gd->disk_name, op_name(bret->operation));
|
|
||||||
error = -EOPNOTSUPP;
|
|
||||||
}
|
|
||||||
if (unlikely(error)) {
|
|
||||||
--
|
|
||||||
1.7.4.4
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
|||||||
From 8605067fb9b8e34aecf44ec258657c9cc009fc5a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jan Beulich <JBeulich@suse.com>
|
|
||||||
Date: Thu, 5 Apr 2012 16:04:52 +0100
|
|
||||||
Subject: [PATCH 1/3] xen-blkfront: module exit handling adjustments
|
|
||||||
|
|
||||||
The blkdev major must be released upon exit, or else the module can't
|
|
||||||
attach to devices using the same majors upon being loaded again. Also
|
|
||||||
avoid leaking the minor tracking bitmap.
|
|
||||||
|
|
||||||
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
|
||||||
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
|
|
||||||
---
|
|
||||||
drivers/block/xen-blkfront.c | 4 +++-
|
|
||||||
1 files changed, 3 insertions(+), 1 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
|
|
||||||
index 4f2b460..60eed4b 100644
|
|
||||||
--- a/drivers/block/xen-blkfront.c
|
|
||||||
+++ b/drivers/block/xen-blkfront.c
|
|
||||||
@@ -1500,7 +1500,9 @@ module_init(xlblk_init);
|
|
||||||
|
|
||||||
static void __exit xlblk_exit(void)
|
|
||||||
{
|
|
||||||
- return xenbus_unregister_driver(&blkfront_driver);
|
|
||||||
+ xenbus_unregister_driver(&blkfront_driver);
|
|
||||||
+ unregister_blkdev(XENVBD_MAJOR, DEV_NAME);
|
|
||||||
+ kfree(minors);
|
|
||||||
}
|
|
||||||
module_exit(xlblk_exit);
|
|
||||||
|
|
||||||
--
|
|
||||||
1.7.4.4
|
|
||||||
|
|
@ -1,19 +1,12 @@
|
|||||||
# ACPI S3
|
# ACPI S3
|
||||||
patches.xen/pvops-3.4-0001-x86-acpi-sleep-Provide-registration-for-acpi_suspend.patch
|
patches.xen/pvops-0001-x86-acpi-sleep-Provide-registration-for-acpi_suspend.patch
|
||||||
patches.xen/pvops-3.4-0002-xen-acpi-sleep-Enable-ACPI-sleep-via-the-__acpi_os_p.patch
|
patches.xen/pvops-0003-xen-acpi-sleep-Register-to-the-acpi_suspend_lowlevel.patch
|
||||||
patches.xen/pvops-3.4-0003-xen-acpi-sleep-Register-to-the-acpi_suspend_lowlevel.patch
|
|
||||||
|
|
||||||
# Fixes which should will go in 3.5
|
|
||||||
patches.xen/pvops-xen-blkfront-module-exit-handling-adjustments.patch
|
|
||||||
patches.xen/pvops-xen-blkfront-Add-WARN-to-deal-with-misbehaving-backe.patch
|
|
||||||
patches.xen/pvops-3.4-enable-netfront-in-dom0.patch
|
|
||||||
patches.xen/pvops-netback-calculate-correctly-the-SKB-slots.patch
|
|
||||||
|
|
||||||
# fix for GPU performance (revert workaround and apply proper fix), should go in 3.5
|
# fix for GPU performance (revert workaround and apply proper fix), should go in 3.5
|
||||||
patches.xen/pvops-3.4-Revert-xen-pat-Disable-PAT-support-for-now.patch
|
patches.xen/pvops-3.4-Revert-xen-pat-Disable-PAT-support-for-now.patch
|
||||||
patches.xen/pvops-3.4-x86-cpa-Use-pte_attrs-instead-of-pte_flags-on-CPA-se.patch
|
patches.xen/pvops-3.4-x86-cpa-Use-pte_attrs-instead-of-pte_flags-on-CPA-se.patch
|
||||||
|
|
||||||
# Additional features
|
# Additional features
|
||||||
patches.xen/pvops-3.4-0100-usb-xen-pvusb-driver.patch
|
patches.xen/pvops-0100-usb-xen-pvusb-driver.patch
|
||||||
patches.xen/pvops-blkfront-removable-flag.patch
|
patches.xen/pvops-blkfront-removable-flag.patch
|
||||||
patches.xen/pvops-blkfront-eject-support.patch
|
patches.xen/pvops-blkfront-eject-support.patch
|
||||||
|
@ -1 +1 @@
|
|||||||
3.4.18
|
3.7.4
|
||||||
|
Loading…
Reference in New Issue
Block a user