mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christopher Li <lkml@chrisli.org>
To: William Lee Irwin III <wli@holomorphy.com>,
	Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.0-test9-mm4 (only) and vmware
Date: Wed, 19 Nov 2003 18:22:46 -0500	[thread overview]
Message-ID: <20031119232246.GA20840@64m.dyndns.org> (raw)
In-Reply-To: <20031120014718.GA22764@holomorphy.com>

Thanks,  I post a totally untested patch follows, but the testing of
which kernel has this feature is not completed yet.

Is there a way to reliably detect which kernel has this change?

Look at all the ifdef I need to make to keep the module working
with other kernels.  :-(

Best Regards,

Chris


--- /tmp/p5diffhtml.tmp1.27140	2003-11-19 18:28:07.000000000 -0800
+++ /modules/shared/linux/compat_version.h	2003-11-19 18:25:12.000000000 -0800
@@ -96,5 +96,10 @@
 #   define KERNEL_2_5_5
 #endif
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
+/*  New status return pointer in vmop->nopage() */
+/*  FIXME: We need to test against 2.6.0-test9-mm4 */
+#   define KERNEL_2_6_0_TEST9_MM4
+#endif
 
 #endif /* __COMPAT_VERSION_H__ */
--- /tmp/p5diffhtml.tmp1.27140	2003-11-19 18:28:07.000000000 -0800
+++ /modules/vmmon/linux/driver.c	2003-11-19 18:26:28.000000000 -0800
@@ -548,6 +548,11 @@
  *-----------------------------------------------------------------------------
  */
 
+#ifdef KERNEL_2_6_0_TEST9_MM4
+static struct page *LinuxDriverNoPage(struct vm_area_struct *vma, //IN
+				      unsigned long address, 	  //IN
+				      int *type)		  //OUT
+#else
 #ifdef KERNEL_2_4_0
 static struct page *LinuxDriverNoPage(struct vm_area_struct *vma, //IN
 				      unsigned long address, 	  //IN
@@ -557,6 +562,7 @@
 				       unsigned long address,	  //IN
 				       int write_access)	  //IN
 #endif
+#endif
 {
 	VMLinux *vmLinux = (VMLinux *) vma->vm_file->private_data;
 	unsigned long pg;
@@ -566,6 +572,11 @@
 		return 0;
 	}
 	get_page(virt_to_page(vmLinux->pages4Gb[pg]));
+#ifdef KERNEL_2_6_0_TEST9_MM4
+	if (type) {
+		*type = VM_FAULT_MINOR;
+	}
+#endif
 #ifdef KERNEL_2_4_0
 	return virt_to_page(vmLinux->pages4Gb[pg]);
 #else
On Wed, Nov 19, 2003 at 05:47:18PM -0800, William Lee Irwin III wrote:
> On Wed, Nov 19, 2003 at 05:34:25PM -0500, Christopher Li wrote:
> > Can send me a few more lines of the log file before and after that message? I can take
> > a look at what is going on there. Most likely vmmon driver get confused.
> 
> You should have a vm_ops->nopage() method that didn't get updated.
> The formerly-unused argument got turned into a status return pointer,
> so you need to do something like:
> 
> struct page *vmmon_nopage(struct vm_area_struct *vma, unsigned long addr, int *type)
> {
> 	...
> 	if (type)
> 		*type = VM_FAULT_MINOR;
> 	return page;
> }
> 
> It should also give off a big fat warning about initialization from
> incompatible pointer types when compiled.
> 
> 
> -- wli

  reply	other threads:[~2003-11-20  2:29 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-19 21:15 Gerardo Exequiel Pozzi
2003-11-19 21:38 ` Andrew Morton
2003-11-20  4:15   ` Gerardo Exequiel Pozzi
2003-11-19 22:34 ` Christopher Li
2003-11-20  1:47   ` William Lee Irwin III
2003-11-19 23:22     ` Christopher Li [this message]
2003-11-20  2:34       ` William Lee Irwin III
2003-11-19 23:40         ` Christopher Li
2003-11-20  2:57           ` William Lee Irwin III
2003-11-20 10:03             ` Voicu Liviu
     [not found]               ` <20031120101830.GH22764@holomorphy.com>
2003-11-20 10:23                 ` Voicu Liviu
2003-11-20 10:31                   ` William Lee Irwin III
2003-11-20 10:37                     ` Voicu Liviu
2003-11-20 10:42                       ` William Lee Irwin III
2003-11-20 10:51                         ` Voicu Liviu
2003-11-20 17:20                           ` Christopher Li
2003-11-20 21:38                             ` Jose Luis Domingo Lopez
2003-11-20 21:55                               ` William Lee Irwin III
2003-11-20 22:53                                 ` Jose Luis Domingo Lopez
2003-11-20 22:56                                   ` William Lee Irwin III
2003-11-21 20:10                                     ` Jose Luis Domingo Lopez
2003-11-21 23:08                                       ` Jose Luis Domingo Lopez
2003-11-20  0:21 ` Jose Luis Domingo Lopez
2003-11-20  1:02   ` Andrew Morton
2003-11-20  1:07     ` William Lee Irwin III
2003-11-20  1:12     ` William Lee Irwin III
2003-11-20  1:58       ` Andrew Morton
2003-11-20  2:12         ` William Lee Irwin III
2003-11-19 23:24           ` Christopher Li
2003-11-20  4:39           ` Gerardo Exequiel Pozzi
2003-11-20 10:35 Petr Vandrovec

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=20031119232246.GA20840@64m.dyndns.org \
    --to=lkml@chrisli.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vmlinuz386@yahoo.com.ar \
    --cc=wli@holomorphy.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®