* [PATCH 1 of 5] xen: don't reload cr3 on suspend
2008-10-15 0:50 [PATCH 0 of 5] xen: fix some things which make ia64 upset Jeremy Fitzhardinge
@ 2008-10-15 0:50 ` Jeremy Fitzhardinge
2008-10-15 0:50 ` [PATCH 2 of 5] xen: portability clean up and some minor clean up for xencomm.c Jeremy Fitzhardinge
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Jeremy Fitzhardinge @ 2008-10-15 0:50 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel, Isaku Yamahata
It isn't necessary, and it makes the code needlessly non-portable.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
---
drivers/xen/manage.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -38,8 +38,6 @@
int err;
BUG_ON(!irqs_disabled());
-
- load_cr3(swapper_pg_dir);
err = device_power_down(PMSG_SUSPEND);
if (err) {
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2 of 5] xen: portability clean up and some minor clean up for xencomm.c
2008-10-15 0:50 [PATCH 0 of 5] xen: fix some things which make ia64 upset Jeremy Fitzhardinge
2008-10-15 0:50 ` [PATCH 1 of 5] xen: don't reload cr3 on suspend Jeremy Fitzhardinge
@ 2008-10-15 0:50 ` Jeremy Fitzhardinge
2008-10-15 0:50 ` [PATCH 3 of 5] xen-netfront: Avoid unaligned accesses to IP header Jeremy Fitzhardinge
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Jeremy Fitzhardinge @ 2008-10-15 0:50 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel, Isaku Yamahata
From: Isaku Yamahata <yamahata@valinux.co.jp>
clean up of xencomm.c. is_phys_contiguous() is arch dependent
function that depends on how virtual memory are laid out.
So split out the function into arch specific code.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
---
drivers/xen/xencomm.c | 25 ++++---------------------
1 file changed, 4 insertions(+), 21 deletions(-)
diff --git a/drivers/xen/xencomm.c b/drivers/xen/xencomm.c
--- a/drivers/xen/xencomm.c
+++ b/drivers/xen/xencomm.c
@@ -23,13 +23,7 @@
#include <asm/page.h>
#include <xen/xencomm.h>
#include <xen/interface/xen.h>
-#ifdef __ia64__
-#include <asm/xen/xencomm.h> /* for is_kern_addr() */
-#endif
-
-#ifdef HAVE_XEN_PLATFORM_COMPAT_H
-#include <xen/platform-compat.h>
-#endif
+#include <asm/xen/xencomm.h> /* for xencomm_is_phys_contiguous() */
static int xencomm_init(struct xencomm_desc *desc,
void *buffer, unsigned long bytes)
@@ -157,20 +151,11 @@
return 0;
}
-/* check if memory address is within VMALLOC region */
-static int is_phys_contiguous(unsigned long addr)
-{
- if (!is_kernel_addr(addr))
- return 0;
-
- return (addr < VMALLOC_START) || (addr >= VMALLOC_END);
-}
-
static struct xencomm_handle *xencomm_create_inline(void *ptr)
{
unsigned long paddr;
- BUG_ON(!is_phys_contiguous((unsigned long)ptr));
+ BUG_ON(!xencomm_is_phys_contiguous((unsigned long)ptr));
paddr = (unsigned long)xencomm_pa(ptr);
BUG_ON(paddr & XENCOMM_INLINE_FLAG);
@@ -202,7 +187,7 @@
int rc;
struct xencomm_desc *desc;
- if (is_phys_contiguous((unsigned long)ptr))
+ if (xencomm_is_phys_contiguous((unsigned long)ptr))
return xencomm_create_inline(ptr);
rc = xencomm_create(ptr, bytes, &desc, GFP_KERNEL);
@@ -219,7 +204,7 @@
int rc;
struct xencomm_desc *desc = NULL;
- if (is_phys_contiguous((unsigned long)ptr))
+ if (xencomm_is_phys_contiguous((unsigned long)ptr))
return xencomm_create_inline(ptr);
rc = xencomm_create_mini(ptr, bytes, xc_desc,
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3 of 5] xen-netfront: Avoid unaligned accesses to IP header
2008-10-15 0:50 [PATCH 0 of 5] xen: fix some things which make ia64 upset Jeremy Fitzhardinge
2008-10-15 0:50 ` [PATCH 1 of 5] xen: don't reload cr3 on suspend Jeremy Fitzhardinge
2008-10-15 0:50 ` [PATCH 2 of 5] xen: portability clean up and some minor clean up for xencomm.c Jeremy Fitzhardinge
@ 2008-10-15 0:50 ` Jeremy Fitzhardinge
2008-10-16 9:12 ` Jeff Garzik
2008-10-15 0:50 ` [PATCH 4 of 5] xen: compilation fix fo xen CPU hotplugging Jeremy Fitzhardinge
2008-10-15 0:50 ` [PATCH 5 of 5] xen: compilation fix of drivers/xen/events.c on IA64 Jeremy Fitzhardinge
4 siblings, 1 reply; 7+ messages in thread
From: Jeremy Fitzhardinge @ 2008-10-15 0:50 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-kernel, Isaku Yamahata, NetDev, Ingo Molnar
From: Isaku Yamahata <yamahata@valinux.co.jp>
Align ip header to a 16 byte boundary to avoid unaligned
access like other drivers.
Without this patch, xen-netfront doesn't work well on ia64.
[ Jeff, this is the only patch in the series which is in your
territory. -J ]
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
---
drivers/net/xen-netfront.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -239,10 +239,13 @@
*/
batch_target = np->rx_target - (req_prod - np->rx.rsp_cons);
for (i = skb_queue_len(&np->rx_batch); i < batch_target; i++) {
- skb = __netdev_alloc_skb(dev, RX_COPY_THRESHOLD,
+ skb = __netdev_alloc_skb(dev, RX_COPY_THRESHOLD + NET_IP_ALIGN,
GFP_ATOMIC | __GFP_NOWARN);
if (unlikely(!skb))
goto no_skb;
+
+ /* Align ip header to a 16 bytes boundary */
+ skb_reserve(skb, NET_IP_ALIGN);
page = alloc_page(GFP_ATOMIC | __GFP_NOWARN);
if (!page) {
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 3 of 5] xen-netfront: Avoid unaligned accesses to IP header
2008-10-15 0:50 ` [PATCH 3 of 5] xen-netfront: Avoid unaligned accesses to IP header Jeremy Fitzhardinge
@ 2008-10-16 9:12 ` Jeff Garzik
0 siblings, 0 replies; 7+ messages in thread
From: Jeff Garzik @ 2008-10-16 9:12 UTC (permalink / raw)
To: Jeremy Fitzhardinge; +Cc: linux-kernel, Isaku Yamahata, NetDev, Ingo Molnar
Jeremy Fitzhardinge wrote:
> From: Isaku Yamahata <yamahata@valinux.co.jp>
>
> Align ip header to a 16 byte boundary to avoid unaligned
> access like other drivers.
> Without this patch, xen-netfront doesn't work well on ia64.
>
> [ Jeff, this is the only patch in the series which is in your
> territory. -J ]
>
> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
> ---
> drivers/net/xen-netfront.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
applied
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 4 of 5] xen: compilation fix fo xen CPU hotplugging
2008-10-15 0:50 [PATCH 0 of 5] xen: fix some things which make ia64 upset Jeremy Fitzhardinge
` (2 preceding siblings ...)
2008-10-15 0:50 ` [PATCH 3 of 5] xen-netfront: Avoid unaligned accesses to IP header Jeremy Fitzhardinge
@ 2008-10-15 0:50 ` Jeremy Fitzhardinge
2008-10-15 0:50 ` [PATCH 5 of 5] xen: compilation fix of drivers/xen/events.c on IA64 Jeremy Fitzhardinge
4 siblings, 0 replies; 7+ messages in thread
From: Jeremy Fitzhardinge @ 2008-10-15 0:50 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel, Isaku Yamahata
From: Isaku Yamahata <yamahata@valinux.co.jp>
This patch fixes compilation error on ia64.
include asm/xen/hypervisor.h instead of asm-x86/xen/hypervisor.h
use xen_pv_domain() instead of is_running_on_xen()
> CC drivers/xen/cpu_hotplug.o
> In file included from /linux-2.6/drivers/xen/cpu_hotplug.c:5:
> /linux-2.6/include/asm-x86/xen/hypervisor.h:44:22: error: asm/desc.h: No such file or directory
> /linux-2.6/include/asm-x86/xen/hypervisor.h:66:1: warning: "MULTI_UVMFLAGS_INDEX" redefined
> In file included from /linux-2.6/include/asm-x86/xen/hypervisor.h:52,
> from /linux-2.6/drivers/xen/cpu_hotplug.c:5:
> /linux-2.6/arch/ia64/include/asm/xen/hypercall.h:233:1: warning: this is the location of the previous definition
> /linux-2.6/drivers/xen/cpu_hotplug.c: In function 'setup_vcpu_hotplug_event':
> /linux-2.6/drivers/xen/cpu_hotplug.c:81: error: implicit declaration of function 'is_running_on_xen'
> make[4]: *** [drivers/xen/cpu_hotplug.o] Error 1
> make[4]: *** Waiting for unfinished jobs....
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
---
drivers/xen/cpu_hotplug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/xen/cpu_hotplug.c b/drivers/xen/cpu_hotplug.c
--- a/drivers/xen/cpu_hotplug.c
+++ b/drivers/xen/cpu_hotplug.c
@@ -2,7 +2,7 @@
#include <xen/xenbus.h>
-#include <asm-x86/xen/hypervisor.h>
+#include <asm/xen/hypervisor.h>
#include <asm/cpu.h>
static void enable_hotplug_cpu(int cpu)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 5 of 5] xen: compilation fix of drivers/xen/events.c on IA64
2008-10-15 0:50 [PATCH 0 of 5] xen: fix some things which make ia64 upset Jeremy Fitzhardinge
` (3 preceding siblings ...)
2008-10-15 0:50 ` [PATCH 4 of 5] xen: compilation fix fo xen CPU hotplugging Jeremy Fitzhardinge
@ 2008-10-15 0:50 ` Jeremy Fitzhardinge
4 siblings, 0 replies; 7+ messages in thread
From: Jeremy Fitzhardinge @ 2008-10-15 0:50 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel, Isaku Yamahata
From: Isaku Yamahata <yamahata@valinux.co.jp>
use set_xen_guest_handle() instead of direct assigning.
> linux-2.6/drivers/xen/events.c: In function 'xen_poll_irq':
> linux-2.6/drivers/xen/events.c:757: error: incompatible types in assignment
> make[4]: *** [drivers/xen/events.o] Error 1
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
---
drivers/xen/events.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/xen/events.c b/drivers/xen/events.c
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -776,7 +776,7 @@
poll.nr_ports = 1;
poll.timeout = 0;
- poll.ports = &evtchn;
+ set_xen_guest_handle(poll.ports, &evtchn);
if (HYPERVISOR_sched_op(SCHEDOP_poll, &poll) != 0)
BUG();
^ permalink raw reply [flat|nested] 7+ messages in thread