Replace dom0_ops hypercall with three new hypercalls:
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 5 lines · Xen patchbot-unstable
Quoted 2 lines
From here on we hope to maintain dom0 kernel compatibility. This
promise is not extended to tool compatibility beyond the existing guarantee that compatibility will not be broken within a three-level stable release [3.0.2, 3.0.3, etc.].
That's not going to be true for PowerPC and soon IA64.
Because of Xen's use of pointers for hypercall parameters, we need the kernel to translate virtual addresses to physical addresses. That means any time a new hypercall is introduced to the tools, our kernel needs to change to translate the new data structure.
The same thing is true because of the 32/64-bit data structure size changes -- the kernel needs to translate data structures because of that as well.
Signature · 2 lines
Hollis Blanchard IBM Linux Technology Center
PATCH 1/1 remove include checks from domctl.h and sysctl.h
Quoted 7 lines · Hollis Blanchard
Quoted 5 lines · Xen patchbot-unstable
Quoted 2 lines
From here on we hope to maintain dom0 kernel compatibility. This
promise is not extended to tool compatibility beyond the existing guarantee that compatibility will not be broken within a three-level stable release [3.0.2, 3.0.3, etc.].
Quoted 6 lines
That's not going to be true for PowerPC and soon IA64.
Because of Xen's use of pointers for hypercall parameters, we need the kernel to translate virtual addresses to physical addresses. That means any time a new hypercall is introduced to the tools, our kernel needs to change to translate the new data structure.
Therefore, the following patch is required. Please apply.
[XEN] remove include checks from domctl.h and sysctl.h
xen/include/public/domctl.h Tue Sep 05 14:30:11 2006 -0500 renamed from xen/include/public/domctl.h Thu Aug 31 14:46:28 2006 +0100 +0 -4
@@ -9,10 +9,6 @@ #ifndef __XEN_PUBLIC_DOMCTL_H__ #define __XEN_PUBLIC_DOMCTL_H__ - -#if !defined(__XEN__) && !defined(__XEN_TOOLS__) -#error "domctl operations are intended for use by node control tools only" -#endif #include "xen.h"
xen/include/public/sysctl.h Tue Sep 05 14:30:41 2006 -0500 renamed from xen/include/public/sysctl.h Thu Aug 31 14:46:28 2006 +0100 +0 -4
@@ -8,10 +8,6 @@ #ifndef __XEN_PUBLIC_SYSCTL_H__ #define __XEN_PUBLIC_SYSCTL_H__ - -#if !defined(__XEN__) && !defined(__XEN_TOOLS__) -#error "sysctl operations are intended for use by node control tools only" -#endif #include "xen.h" #include "domctl.h"
Signature · 2 lines
Hollis Blanchard IBM Linux Technology Center
Re: [XenPPC] [PATCH][XEN] remove include checks from domctl.h and sysctl.h
Quoted 24 lines · Hollis Blanchard
Quoted 7 lines · Hollis Blanchard
Quoted 5 lines · Xen patchbot-unstable
Quoted 2 lines
From here on we hope to maintain dom0 kernel compatibility. This
promise is not extended to tool compatibility beyond the existing guarantee that compatibility will not be broken within a three-level stable release [3.0.2, 3.0.3, etc.].
Quoted 6 lines
That's not going to be true for PowerPC and soon IA64.
Because of Xen's use of pointers for hypercall parameters, we need the kernel to translate virtual addresses to physical addresses. That means any time a new hypercall is introduced to the tools, our kernel needs to change to translate the new data structure.
Therefore, the following patch is required. Please apply.
[XEN] remove include checks from
domctl.handsysctl.hSigned-off-by Hollis Blanchard <[email protected]>diff -r
2017f6e92bf8xen/include/public/domctl.h
xen/include/public/domctl.h Tue Sep 05 14:30:11 2006 -0500 line 13
Quoted 9 lines
xen/include/public/domctl.h Tue Sep 05 14:30:11 2006 -0500 renamed from xen/include/public/domctl.h Thu Aug 31 14:46:28 2006 +0100 +0
-4@@ -9,10 +9,6 @@ #ifndef __XEN_PUBLIC_DOMCTL_H__ #define __XEN_PUBLIC_DOMCTL_H__ - -#if !defined(__XEN__) && !defined(__XEN_TOOLS__) -#error "domctl operations are intended for use by node control tools only" -#endif #include "xen.h"
A very similar problem hits us when building Linux. Without __XEN__ or __XEN_TOOLS__ defined, Linux gets a __XEN_INTERFACE_VERSION__ of 0, and so the current API will never be used (regardless of what the tools tried to do).
Are you intentionally requiring that Linux do this? If so, in which Linux header file would you like this to go?
#define __XEN_INTERFACE_VERSION__ __XEN_LATEST_INTERFACE_VERSION__
Or perhaps, since the kernel is acting as a proxy for the tools, you would rather see this?
#define __XEN_TOOLS__
Signature · 2 lines
Hollis Blanchard IBM Linux Technology Center
Re: [XenPPC] [PATCH][XEN] remove include checks from domctl.h and sysctl.h
Quoted 8 lines · Hollis Blanchard
A very similar problem hits us when building Linux. Without
__XEN__or__XEN_TOOLS__defined, Linux gets a__XEN_INTERFACE_VERSION__of 0, and so the current API will never be used (regardless of what the tools tried to do).Are you intentionally requiring that Linux do this? If so, in which Linux header file would you like this to go?
#define__XEN_INTERFACE_VERSION____XEN_LATEST_INTERFACE_VERSION__
It's defined for you in drivers/xen/Kconfig. All other arches then fold it into CFLAGS in arch/<arch>/Makefile. This ensures that it is defined absolutely *everywhere*, avoiding the possibility of having it defined as latest versionin one place and zero in an other (which would be really confusing). That's what I'd recommend for powerpc as well, even though it probably requires you to modify a file that's otherwise 'Xen clean'.
Quoted 3 lines
Or perhaps, since the kernel is acting as a proxy for the tools, you would rather see this?
#define__XEN_TOOLS__
Yes, but only in the file that does the virt-to-phys conversions on the domctl/sysctl interfaces.
-- Keir
Re: [PATCH][XEN] remove include checks from domctl.h and sysctl.h
In reply to Hollis BlanchardQuoted 11 lines · Hollis Blanchard
Quoted 6 lines
That's not going to be true for PowerPC and soon IA64.
Because of Xen's use of pointers for hypercall parameters, we need the kernel to translate virtual addresses to physical addresses. That means any time a new hypercall is introduced to the tools, our kernel needs to change to translate the new data structure.
Therefore, the following patch is required. Please apply.
[XEN] remove include checks from
domctl.handsysctl.hSigned-off-by Hollis Blanchard <[email protected]>
No thanks: we really don't want inclusion of those header files to slip into use in kernel builds. I suggest limiting your touching of domctl/sysctl to one source file in Linux, and compile that file with -D__XEN_TOOLS__. This will help ensure that you can at least limit the kernel tainting to one (potentially upgradeable) module.
-- Keir
Quoted 10 lines · Xen patchbot-unstable
# HG changeset patch
# User [email protected]
# Node ID86d26e6ec89b3aba5512d981838caea043b157ab
# Parent9091331dfb353212781622f3c9020492cb049178Replacedom0_opshypercall with three new hypercalls:
1.platform_op-- used by dom0 kernel to perform actions on the hardware platform (e.g., MTRR access, microcode update, platform quirks, ...)
2. domctl -- used by management tools to control a specified domain
3. sysctl -- used by management tools for system-wide actions
I see this wasn't strictly moving code around... you made at least the following change:
-struct dom0_getmemlist {
- /* IN variables. */
- domid_t domain;
- uint64_t max_pfns;
- XEN_GUEST_HANDLE(xen_pfn_t) buffer;
- /* OUT variables. */
- uint64_t num_pfns;
-};
+struct xen_domctl_getmemlist {
+ /* IN variables. */
+ uint64_t max_pfns;
+ XEN_GUEST_HANDLE_64(ulong) buffer;
+ /* OUT variables. */
+ uint64_t num_pfns;+};
In particular, the handle changed from xen_pfn_t to ulong, and that breaks this code:
int xc_get_pfn_list(int xc_handle,
uint32_t domid,
xen_pfn_t *pfn_buf,
unsigned long max_pfns)
{
...
set_xen_guest_handle(domctl.u.getmemlist.buffer, pfn_buf);Revert build break from dom0_ops split.
xen/include/public/domctl.h Tue Aug 29 13:43:57 2006 -0500 renamed from xen/include/public/domctl.h Fri Aug 18 05:39:01 2006 -0400 +1 -1
@@ -73,7 +73,7 @@ struct xen_domctl_getmemlist { struct xen_domctl_getmemlist { /* IN variables. */ uint64_t max_pfns; - XEN_GUEST_HANDLE_64(ulong) buffer; + XEN_GUEST_HANDLE_64(xen_pfn_t) buffer; /* OUT variables. */ uint64_t num_pfns; };
Signature · 2 lines
Hollis Blanchard IBM Linux Technology Center