From: Ian Campbell <Ian.Campbell@XenSource.com>
To: Doi.Tsunehisa@jp.fujitsu.com
Cc: Ky Srinivasan <ksrinivasan@novell.com>, xen-devel@lists.xensource.com
Subject: Re: [PATCH][RESEND] PV drivers for HVM guests
Date: Thu, 26 Oct 2006 15:15:06 +0100 [thread overview]
Message-ID: <1161872106.22514.170.camel@localhost.localdomain> (raw)
In-Reply-To: <200610260358.k9Q3w4F20001@photon.sky.yk.fujitsu.co.jp>
On Thu, 2006-10-26 at 12:58 +0900, Doi.Tsunehisa@jp.fujitsu.com 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@jp.fujitsu.com 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@xensource.com>
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
next prev parent reply other threads:[~2006-10-26 14:15 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-18 13:51 [PATCH][RESEND] PV drivers for HVM guests Ky Srinivasan
2006-10-18 23:56 ` Doi.Tsunehisa
2006-10-19 13:53 ` Ky Srinivasan
2006-10-20 10:12 ` Doi.Tsunehisa
2006-10-20 13:54 ` Ky Srinivasan
2006-10-23 1:45 ` Doi.Tsunehisa
2006-10-24 2:54 ` DOI Tsunehisa
2006-10-24 15:26 ` Ian Campbell
2006-10-24 23:54 ` Doi.Tsunehisa
2006-10-25 3:11 ` Doi.Tsunehisa
2006-10-25 11:03 ` Ian Campbell
2006-10-26 0:13 ` Doi.Tsunehisa
2006-10-26 3:58 ` Doi.Tsunehisa
2006-10-26 6:37 ` Doi.Tsunehisa
2006-10-26 14:15 ` Ian Campbell [this message]
2006-10-27 4:11 ` [Xen-devel][PATCH][RESEND] " Doi.Tsunehisa
2006-10-27 9:40 ` [PATCH][RESEND] " Ian Campbell
[not found] ` <00a201c6f96a$811feac0$dab2220a@VF03007L>
[not found] ` <1161943070.13318.53.camel@localhost.localdomain>
2006-10-27 11:43 ` Kasai Takanori
[not found] ` <03b301c6fa5a$8cc725a0$dab2220a@VF03007L>
2006-11-01 23:55 ` [PATCH][RESEND] PV drivers for HVMguests Kasai Takanori
2006-11-02 10:01 ` Ian Campbell
2006-10-25 11:03 ` [PATCH][RESEND] PV drivers for HVM guests Ian Campbell
2006-10-26 0:16 ` Doi.Tsunehisa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1161872106.22514.170.camel@localhost.localdomain \
--to=ian.campbell@xensource.com \
--cc=Doi.Tsunehisa@jp.fujitsu.com \
--cc=ksrinivasan@novell.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.