All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] also move compat mode VCPUOP_register_vcpu_info into common code
@ 2013-05-13 11:05 Jan Beulich
  2013-05-13 11:46 ` Keir Fraser
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2013-05-13 11:05 UTC (permalink / raw)
  To: xen-devel; +Cc: Keir Fraser, Stefano Stabellini

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

Otherwise, with arch_compat_vcpu_op() calling arch_do_vcpu_op() to
handle it, it results in -ENOSYS after 6ff9e4f7 ("xen: move
VCPUOP_register_vcpu_info to common code") for 32-bit x86 domains.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/x86_64/domain.c
+++ b/xen/arch/x86/x86_64/domain.c
@@ -9,14 +9,6 @@
 #include <xen/hypercall.h>
 #include <compat/vcpu.h>
 
-#define xen_vcpu_info vcpu_info
-CHECK_SIZE_(struct, vcpu_info);
-#undef xen_vcpu_info
-
-#define xen_vcpu_register_vcpu_info vcpu_register_vcpu_info
-CHECK_vcpu_register_vcpu_info;
-#undef xen_vcpu_register_vcpu_info
-
 #define xen_vcpu_get_physid vcpu_get_physid
 CHECK_vcpu_get_physid;
 #undef xen_vcpu_get_physid
@@ -63,7 +55,6 @@ arch_compat_vcpu_op(
         break;
     }
 
-    case VCPUOP_register_vcpu_info:
     case VCPUOP_get_physid:
         rc = arch_do_vcpu_op(cmd, v, arg);
         break;
--- a/xen/common/compat/domain.c
+++ b/xen/common/compat/domain.c
@@ -15,6 +15,14 @@
 CHECK_vcpu_set_periodic_timer;
 #undef xen_vcpu_set_periodic_timer
 
+#define xen_vcpu_info vcpu_info
+CHECK_SIZE_(struct, vcpu_info);
+#undef xen_vcpu_info
+
+#define xen_vcpu_register_vcpu_info vcpu_register_vcpu_info
+CHECK_vcpu_register_vcpu_info;
+#undef xen_vcpu_register_vcpu_info
+
 int compat_vcpu_op(int cmd, int vcpuid, XEN_GUEST_HANDLE_PARAM(void) arg)
 {
     struct domain *d = current->domain;
@@ -64,6 +72,7 @@ int compat_vcpu_op(int cmd, int vcpuid, 
     case VCPUOP_set_periodic_timer:
     case VCPUOP_stop_periodic_timer:
     case VCPUOP_stop_singleshot_timer:
+    case VCPUOP_register_vcpu_info:
     case VCPUOP_send_nmi:
         rc = do_vcpu_op(cmd, vcpuid, arg);
         break;




[-- Attachment #2: x86-32on64-register-vcpu-info.patch --]
[-- Type: text/plain, Size: 1811 bytes --]

also move compat mode VCPUOP_register_vcpu_info into common code

Otherwise, with arch_compat_vcpu_op() calling arch_do_vcpu_op() to
handle it, it results in -ENOSYS after 6ff9e4f7 ("xen: move
VCPUOP_register_vcpu_info to common code") for 32-bit x86 domains.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/x86_64/domain.c
+++ b/xen/arch/x86/x86_64/domain.c
@@ -9,14 +9,6 @@
 #include <xen/hypercall.h>
 #include <compat/vcpu.h>
 
-#define xen_vcpu_info vcpu_info
-CHECK_SIZE_(struct, vcpu_info);
-#undef xen_vcpu_info
-
-#define xen_vcpu_register_vcpu_info vcpu_register_vcpu_info
-CHECK_vcpu_register_vcpu_info;
-#undef xen_vcpu_register_vcpu_info
-
 #define xen_vcpu_get_physid vcpu_get_physid
 CHECK_vcpu_get_physid;
 #undef xen_vcpu_get_physid
@@ -63,7 +55,6 @@ arch_compat_vcpu_op(
         break;
     }
 
-    case VCPUOP_register_vcpu_info:
     case VCPUOP_get_physid:
         rc = arch_do_vcpu_op(cmd, v, arg);
         break;
--- a/xen/common/compat/domain.c
+++ b/xen/common/compat/domain.c
@@ -15,6 +15,14 @@
 CHECK_vcpu_set_periodic_timer;
 #undef xen_vcpu_set_periodic_timer
 
+#define xen_vcpu_info vcpu_info
+CHECK_SIZE_(struct, vcpu_info);
+#undef xen_vcpu_info
+
+#define xen_vcpu_register_vcpu_info vcpu_register_vcpu_info
+CHECK_vcpu_register_vcpu_info;
+#undef xen_vcpu_register_vcpu_info
+
 int compat_vcpu_op(int cmd, int vcpuid, XEN_GUEST_HANDLE_PARAM(void) arg)
 {
     struct domain *d = current->domain;
@@ -64,6 +72,7 @@ int compat_vcpu_op(int cmd, int vcpuid, 
     case VCPUOP_set_periodic_timer:
     case VCPUOP_stop_periodic_timer:
     case VCPUOP_stop_singleshot_timer:
+    case VCPUOP_register_vcpu_info:
     case VCPUOP_send_nmi:
         rc = do_vcpu_op(cmd, vcpuid, arg);
         break;

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

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

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

* Re: [PATCH] also move compat mode VCPUOP_register_vcpu_info into common code
  2013-05-13 11:05 [PATCH] also move compat mode VCPUOP_register_vcpu_info into common code Jan Beulich
@ 2013-05-13 11:46 ` Keir Fraser
  0 siblings, 0 replies; 2+ messages in thread
From: Keir Fraser @ 2013-05-13 11:46 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: Stefano Stabellini

On 13/05/2013 12:05, "Jan Beulich" <JBeulich@suse.com> wrote:

> Otherwise, with arch_compat_vcpu_op() calling arch_do_vcpu_op() to
> handle it, it results in -ENOSYS after 6ff9e4f7 ("xen: move
> VCPUOP_register_vcpu_info to common code") for 32-bit x86 domains.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Keir Fraser <keir@xen.org>

> --- a/xen/arch/x86/x86_64/domain.c
> +++ b/xen/arch/x86/x86_64/domain.c
> @@ -9,14 +9,6 @@
>  #include <xen/hypercall.h>
>  #include <compat/vcpu.h>
>  
> -#define xen_vcpu_info vcpu_info
> -CHECK_SIZE_(struct, vcpu_info);
> -#undef xen_vcpu_info
> -
> -#define xen_vcpu_register_vcpu_info vcpu_register_vcpu_info
> -CHECK_vcpu_register_vcpu_info;
> -#undef xen_vcpu_register_vcpu_info
> -
>  #define xen_vcpu_get_physid vcpu_get_physid
>  CHECK_vcpu_get_physid;
>  #undef xen_vcpu_get_physid
> @@ -63,7 +55,6 @@ arch_compat_vcpu_op(
>          break;
>      }
>  
> -    case VCPUOP_register_vcpu_info:
>      case VCPUOP_get_physid:
>          rc = arch_do_vcpu_op(cmd, v, arg);
>          break;
> --- a/xen/common/compat/domain.c
> +++ b/xen/common/compat/domain.c
> @@ -15,6 +15,14 @@
>  CHECK_vcpu_set_periodic_timer;
>  #undef xen_vcpu_set_periodic_timer
>  
> +#define xen_vcpu_info vcpu_info
> +CHECK_SIZE_(struct, vcpu_info);
> +#undef xen_vcpu_info
> +
> +#define xen_vcpu_register_vcpu_info vcpu_register_vcpu_info
> +CHECK_vcpu_register_vcpu_info;
> +#undef xen_vcpu_register_vcpu_info
> +
>  int compat_vcpu_op(int cmd, int vcpuid, XEN_GUEST_HANDLE_PARAM(void) arg)
>  {
>      struct domain *d = current->domain;
> @@ -64,6 +72,7 @@ int compat_vcpu_op(int cmd, int vcpuid,
>      case VCPUOP_set_periodic_timer:
>      case VCPUOP_stop_periodic_timer:
>      case VCPUOP_stop_singleshot_timer:
> +    case VCPUOP_register_vcpu_info:
>      case VCPUOP_send_nmi:
>          rc = do_vcpu_op(cmd, vcpuid, arg);
>          break;
> 
> 
> 

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

end of thread, other threads:[~2013-05-13 11:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-13 11:05 [PATCH] also move compat mode VCPUOP_register_vcpu_info into common code Jan Beulich
2013-05-13 11:46 ` Keir Fraser

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.