All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tmem stub for 3.4
@ 2009-03-19 14:42 Dan Magenheimer
  2009-03-19 15:00 ` Jan Beulich
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Magenheimer @ 2009-03-19 14:42 UTC (permalink / raw)
  To: Xen-Devel (E-mail); +Cc: Keir Fraser

[-- Attachment #1: Type: text/plain, Size: 3574 bytes --]

After lengthy discussion with Keir and Ian, we agreed that
it is too close to 3.4 freeze to put in the transcendent memory
(tmem) patch.  Instead, it will be added as soon as xen-unstable
unfreezes following 3.4.

This patch reserves the hypercall number for tmem and
adds a stub to allow tmem-modified guests to fail gracefully
on the 3.4 release.

(Patch also attached in case my mailer messes up the formatting.)

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>

diff -r 2039e8271051 xen/arch/x86/x86_32/entry.S
--- a/xen/arch/x86/x86_32/entry.S	Wed Mar 18 17:30:13 2009 +0000
+++ b/xen/arch/x86/x86_32/entry.S	Thu Mar 19 08:31:35 2009 -0600
@@ -703,6 +703,7 @@ ENTRY(hypercall_table)
         .long do_sysctl             /* 35 */
         .long do_domctl
         .long do_kexec_op
+        .long do_tmem_op
         .rept __HYPERVISOR_arch_0-((.-hypercall_table)/4)
         .long do_ni_hypercall
         .endr
@@ -750,6 +751,7 @@ ENTRY(hypercall_args_table)
         .byte 1 /* do_sysctl            */  /* 35 */
         .byte 1 /* do_domctl            */
         .byte 2 /* do_kexec_op          */
+        .byte 1 /* do_tmem_op           */
         .rept __HYPERVISOR_arch_0-(.-hypercall_args_table)
         .byte 0 /* do_ni_hypercall      */
         .endr
diff -r 2039e8271051 xen/arch/x86/x86_64/compat/entry.S
--- a/xen/arch/x86/x86_64/compat/entry.S	Wed Mar 18 17:30:13 2009 +0000
+++ b/xen/arch/x86/x86_64/compat/entry.S	Thu Mar 19 08:31:35 2009 -0600
@@ -408,6 +408,7 @@ ENTRY(compat_hypercall_table)
         .quad do_sysctl                 /* 35 */
         .quad do_domctl
         .quad compat_kexec_op
+        .quad do_tmem_op
         .rept __HYPERVISOR_arch_0-((.-compat_hypercall_table)/8)
         .quad compat_ni_hypercall
         .endr
@@ -455,6 +456,7 @@ ENTRY(compat_hypercall_args_table)
         .byte 1 /* do_sysctl                */  /* 35 */
         .byte 1 /* do_domctl                */
         .byte 2 /* compat_kexec_op          */
+        .byte 1 /* do_tmem_op               */
         .rept __HYPERVISOR_arch_0-(.-compat_hypercall_args_table)
         .byte 0 /* compat_ni_hypercall      */
         .endr
diff -r 2039e8271051 xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S	Wed Mar 18 17:30:13 2009 +0000
+++ b/xen/arch/x86/x86_64/entry.S	Thu Mar 19 08:31:35 2009 -0600
@@ -692,6 +692,7 @@ ENTRY(hypercall_table)
         .quad do_sysctl             /* 35 */
         .quad do_domctl
         .quad do_kexec_op
+        .quad do_tmem_op
         .rept __HYPERVISOR_arch_0-((.-hypercall_table)/8)
         .quad do_ni_hypercall
         .endr
@@ -739,6 +740,7 @@ ENTRY(hypercall_args_table)
         .byte 1 /* do_sysctl            */  /* 35 */
         .byte 1 /* do_domctl            */
         .byte 2 /* do_kexec             */
+        .byte 1 /* do_tmem_op           */
         .rept __HYPERVISOR_arch_0-(.-hypercall_args_table)
         .byte 0 /* do_ni_hypercall      */
         .endr
diff -r 2039e8271051 xen/common/memory.c
--- a/xen/common/memory.c	Wed Mar 18 17:30:13 2009 +0000
+++ b/xen/common/memory.c	Thu Mar 19 08:31:35 2009 -0600
@@ -560,6 +560,19 @@ long do_memory_op(unsigned long cmd, XEN
     return rc;
 }
 
+/* temporary placeholder for tmem hypercall */
+int do_tmem_op(void *tmem_op)
+{
+    static int warned = 0;
+
+    if ( !warned )
+    {
+        printk("tmem: not implemented\n");
+        warned = 1;
+    }
+    return -ENODEV;
+}
+
 /*
  * Local variables:
  * mode: C

[-- Attachment #2: tmem-min.patch --]
[-- Type: application/octet-stream, Size: 3005 bytes --]

diff -r 2039e8271051 xen/arch/x86/x86_32/entry.S
--- a/xen/arch/x86/x86_32/entry.S	Wed Mar 18 17:30:13 2009 +0000
+++ b/xen/arch/x86/x86_32/entry.S	Thu Mar 19 08:31:35 2009 -0600
@@ -703,6 +703,7 @@ ENTRY(hypercall_table)
         .long do_sysctl             /* 35 */
         .long do_domctl
         .long do_kexec_op
+        .long do_tmem_op
         .rept __HYPERVISOR_arch_0-((.-hypercall_table)/4)
         .long do_ni_hypercall
         .endr
@@ -750,6 +751,7 @@ ENTRY(hypercall_args_table)
         .byte 1 /* do_sysctl            */  /* 35 */
         .byte 1 /* do_domctl            */
         .byte 2 /* do_kexec_op          */
+        .byte 1 /* do_tmem_op           */
         .rept __HYPERVISOR_arch_0-(.-hypercall_args_table)
         .byte 0 /* do_ni_hypercall      */
         .endr
diff -r 2039e8271051 xen/arch/x86/x86_64/compat/entry.S
--- a/xen/arch/x86/x86_64/compat/entry.S	Wed Mar 18 17:30:13 2009 +0000
+++ b/xen/arch/x86/x86_64/compat/entry.S	Thu Mar 19 08:31:35 2009 -0600
@@ -408,6 +408,7 @@ ENTRY(compat_hypercall_table)
         .quad do_sysctl                 /* 35 */
         .quad do_domctl
         .quad compat_kexec_op
+        .quad do_tmem_op
         .rept __HYPERVISOR_arch_0-((.-compat_hypercall_table)/8)
         .quad compat_ni_hypercall
         .endr
@@ -455,6 +456,7 @@ ENTRY(compat_hypercall_args_table)
         .byte 1 /* do_sysctl                */  /* 35 */
         .byte 1 /* do_domctl                */
         .byte 2 /* compat_kexec_op          */
+        .byte 1 /* do_tmem_op               */
         .rept __HYPERVISOR_arch_0-(.-compat_hypercall_args_table)
         .byte 0 /* compat_ni_hypercall      */
         .endr
diff -r 2039e8271051 xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S	Wed Mar 18 17:30:13 2009 +0000
+++ b/xen/arch/x86/x86_64/entry.S	Thu Mar 19 08:31:35 2009 -0600
@@ -692,6 +692,7 @@ ENTRY(hypercall_table)
         .quad do_sysctl             /* 35 */
         .quad do_domctl
         .quad do_kexec_op
+        .quad do_tmem_op
         .rept __HYPERVISOR_arch_0-((.-hypercall_table)/8)
         .quad do_ni_hypercall
         .endr
@@ -739,6 +740,7 @@ ENTRY(hypercall_args_table)
         .byte 1 /* do_sysctl            */  /* 35 */
         .byte 1 /* do_domctl            */
         .byte 2 /* do_kexec             */
+        .byte 1 /* do_tmem_op           */
         .rept __HYPERVISOR_arch_0-(.-hypercall_args_table)
         .byte 0 /* do_ni_hypercall      */
         .endr
diff -r 2039e8271051 xen/common/memory.c
--- a/xen/common/memory.c	Wed Mar 18 17:30:13 2009 +0000
+++ b/xen/common/memory.c	Thu Mar 19 08:31:35 2009 -0600
@@ -560,6 +560,19 @@ long do_memory_op(unsigned long cmd, XEN
     return rc;
 }
 
+/* temporary placeholder for tmem hypercall */
+int do_tmem_op(void *tmem_op)
+{
+    static int warned = 0;
+
+    if ( !warned )
+    {
+        printk("tmem: not implemented\n");
+        warned = 1;
+    }
+    return -ENODEV;
+}
+
 /*
  * Local variables:
  * mode: C

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-03-19 15:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-19 14:42 [PATCH] tmem stub for 3.4 Dan Magenheimer
2009-03-19 15:00 ` Jan Beulich
2009-03-19 15:10   ` Dan Magenheimer

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.