[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel][PATCH][RESEND] PV drivers for HVM guests
On Thu, 2006-10-26 at 12:58 +0900, Doi.Tsunehisa@xxxxxxxxxxxxxx wrote: > I (Doi.Tsunehisa) said: > >> I not sure the typedef is needed at all -- nothing in unmodified_drivers > >> uses gpf_t as far as I can see. My current patchset doesn't define it at > >> all and builds ok on RHEL4.4. Perhaps it is an arch specific issue? > > > > Sorry, I might be confused. I'll check it. > > I've checked it. It's an ia64 arch specific issue indeed. I'd much prefer it if we can find a way to avoid encoding specific RHEL kernel versions as you had in your patch. I've gone with #define gfp_t unsigned which basically ignores any existing typedef. I think this is OK in this instance since gfp_t has always been On Thu, 2006-10-26 at 15:37 +0900, Doi.Tsunehisa@xxxxxxxxxxxxxx wrote: > BTW, I might find a issue about NET_IP_ALIGN in the compatible shim. > Currentry, its value is 0, but the value should be matched a value of > netback module. Thus, its value should be 2, I think. > > What do you think about the issue ? My thinking was that since those older kernels don't define NET_IP_ALIGN and don't hardcode the number 2 anywhere they don't expect any extra alignment. Therefore using 0 seems correct in terms of behaving the same as native drivers do on those versions. I'm not sure I would want to backport the addition of the extra padding in our drivers, the distros haven't seen the need for example... My current patch is below, it cross-compiles for IA64 without warnings against RHEL4.4 and SLES9sp3. Could you let me know if it works for you? If so would you mind submitting the ia64 bits via the ia64 maintainer. I'll apply the unmodified_drivers bits. Ian. Additional PV-on-HVM fixes for IA64. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxxxxx> diff -r a0a65da68861 linux-2.6-xen-sparse/arch/ia64/xen/xencomm.c --- a/linux-2.6-xen-sparse/arch/ia64/xen/xencomm.c Thu Oct 26 12:27:51 2006 +0100 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/xencomm.c Thu Oct 26 15:06:15 2006 +0100 @@ -20,6 +20,11 @@ #include <linux/mm.h> #include <xen/interface/xen.h> #include <asm/page.h> + +#ifdef HAVE_XEN_PLATFORM_COMPAT_H +#include <xen/platform-compat.h> +#endif + #include <asm/xen/xencomm.h> static int xencomm_debug = 0; diff -r a0a65da68861 linux-2.6-xen-sparse/include/asm-ia64/hypercall.h --- a/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h Thu Oct 26 12:27:51 2006 +0100 +++ b/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h Thu Oct 26 15:06:15 2006 +0100 @@ -283,6 +283,9 @@ static inline void exit_idle(void) {} #ifdef CONFIG_XEN #include <asm/xen/privop.h> #endif /* CONFIG_XEN */ +#ifdef HAVE_XEN_PLATFORM_COMPAT_H +#include <xen/platform-compat.h> +#endif static inline unsigned long __HYPERVISOR_ioremap(unsigned long ioaddr, unsigned long size) diff -r a0a65da68861 linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h --- a/linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h Thu Oct 26 12:27:51 2006 +0100 +++ b/linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h Thu Oct 26 15:06:15 2006 +0100 @@ -56,8 +56,8 @@ extern int running_on_xen; #include <xen/interface/event_channel.h> #include <xen/interface/physdev.h> #include <xen/interface/sched.h> +#include <asm/ptrace.h> #include <asm/hypercall.h> -#include <asm/ptrace.h> #include <asm/page.h> extern shared_info_t *HYPERVISOR_shared_info; diff -r a0a65da68861 unmodified_drivers/linux-2.6/compat-include/asm-generic/pgtable-nopud.h --- a/unmodified_drivers/linux-2.6/compat-include/asm-generic/pgtable-nopud.h Thu Oct 26 12:27:51 2006 +0100 +++ b/unmodified_drivers/linux-2.6/compat-include/asm-generic/pgtable-nopud.h Thu Oct 26 15:06:15 2006 +0100 @@ -9,6 +9,7 @@ #define pud_offset(d, va) d #define pud_none(pud) 0 #define pud_present(pud) 1 +#define pud_bad(pud) 0 #define PTRS_PER_PUD 1 #endif /* _PGTABLE_NOPUD_H */ diff -r a0a65da68861 unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h --- a/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h Thu Oct 26 12:27:51 2006 +0100 +++ b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h Thu Oct 26 15:06:15 2006 +0100 @@ -25,6 +25,21 @@ #define NET_IP_ALIGN 0 #endif +#if defined(_LINUX_ERR_H) && !defined(IS_ERR_VALUE) +#define IS_ERR_VALUE(x) unlikely((x) > (unsigned long)-1000L) +#endif + +#if defined(_ASM_IA64_PGTABLE_H) && !defined(_PGTABLE_NOPUD_H) +#include <asm-generic/pgtable-nopud.h> +#endif + +/* Some kernels have this typedef backported so we cannot reliably + * detect based on version number, hence we forcibly #define it. + */ +#if defined(__LINUX_TYPES_H) || defined(__LINUX_GFP_H) +#define gfp_t unsigned +#endif + #if defined(_LINUX_FS_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9) #define nonseekable_open(inode, filp) /* Nothing to do */ #endif diff -r a0a65da68861 unmodified_drivers/linux-2.6/mkbuildtree _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |