From: Bart Van Assche Date: Sun, 28 Jun 2015 16:31:54 +0000 (+0000) Subject: xen: Add support for new sysctl and domctl interface versions X-Git-Tag: svn/VALGRIND_3_11_0~279 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c35715d20ada1c07ae07dc6932aec383f4b52725;p=thirdparty%2Fvalgrind.git xen: Add support for new sysctl and domctl interface versions The change causing the sysctl bump is not in an implemented subop yet, so no change is required. The change causing the domctl bump is in an implemented subop, but has also been reverted in favor of a different way of performing the same actions. Therefore, there is no net difference. Signed-off-by: Andrew Cooper git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15365 --- diff --git a/coregrind/m_syswrap/syswrap-xen.c b/coregrind/m_syswrap/syswrap-xen.c index a479d7ab68..75ec1662f4 100644 --- a/coregrind/m_syswrap/syswrap-xen.c +++ b/coregrind/m_syswrap/syswrap-xen.c @@ -441,6 +441,7 @@ PRE(sysctl) { case 0x00000008: case 0x00000009: case 0x0000000a: + case 0x0000000b: break; default: bad_intf_version(tid, layout, arrghs, status, flags, @@ -482,6 +483,7 @@ PRE(sysctl) { PRE_XEN_SYSCTL_READ(getdomaininfolist_00000009, buffer); break; case 0x0000000a: + case 0x0000000b: PRE_XEN_SYSCTL_READ(getdomaininfolist_0000000a, first_domain); PRE_XEN_SYSCTL_READ(getdomaininfolist_0000000a, max_domains); PRE_XEN_SYSCTL_READ(getdomaininfolist_0000000a, buffer); @@ -583,6 +585,7 @@ PRE(domctl) case 0x00000007: case 0x00000008: case 0x00000009: + case 0x0000000a: break; default: bad_intf_version(tid, layout, arrghs, status, flags, @@ -1107,6 +1110,7 @@ POST(sysctl) case 0x00000008: case 0x00000009: case 0x0000000a: + case 0x0000000b: break; default: return; @@ -1140,6 +1144,7 @@ POST(sysctl) * sysctl->u.getdomaininfolist_00000009.num_domains); break; case 0x0000000a: + case 0x0000000b: POST_XEN_SYSCTL_WRITE(getdomaininfolist_0000000a, num_domains); POST_MEM_WRITE((Addr)sysctl->u.getdomaininfolist_0000000a.buffer.p, sizeof(*sysctl->u.getdomaininfolist_0000000a.buffer.p) @@ -1184,6 +1189,7 @@ POST(sysctl) POST_XEN_SYSCTL_WRITE(physinfo_00000008, capabilities); break; case 0x0000000a: + case 0x0000000b: POST_XEN_SYSCTL_WRITE(physinfo_0000000a, threads_per_core); POST_XEN_SYSCTL_WRITE(physinfo_0000000a, cores_per_socket); POST_XEN_SYSCTL_WRITE(physinfo_0000000a, nr_cpus); @@ -1239,6 +1245,7 @@ POST(domctl){ case 0x00000007: case 0x00000008: case 0x00000009: + case 0x0000000a: break; default: return; @@ -1381,6 +1388,7 @@ POST(domctl){ POST_XEN_DOMCTL_WRITE(getdomaininfo_00000008, cpupool); break; case 0x00000009: + case 0x0000000a: POST_XEN_DOMCTL_WRITE(getdomaininfo_00000009, domain); POST_XEN_DOMCTL_WRITE(getdomaininfo_00000009, flags); POST_XEN_DOMCTL_WRITE(getdomaininfo_00000009, tot_pages); diff --git a/include/vki/vki-xen-domctl.h b/include/vki/vki-xen-domctl.h index b5037f202b..f90583f50f 100644 --- a/include/vki/vki-xen-domctl.h +++ b/include/vki/vki-xen-domctl.h @@ -5,9 +5,10 @@ * The domctl interface is versioned via the interface_version * field. This structures in this header supports domctl interfaces: * - * - 00000007: Xen 4.1 - * - 00000008: Xen 4.2 - * - 00000009: Xen 4.3 + * - 0x00000007: Xen 4.1 + * - 0x00000008: Xen 4.2 + * - 0x00000009: Xen 4.3 & 4.4 + * - 0x0000000a: Xen 4.5 * * When adding a new subop be sure to include the variants used by all * of the above, both here and in syswrap-xen.c @@ -156,6 +157,8 @@ struct vki_xen_domctl_getdomaininfo_00000009 { typedef struct vki_xen_domctl_getdomaininfo_00000009 vki_xen_domctl_getdomaininfo_00000009_t; DEFINE_VKI_XEN_GUEST_HANDLE(vki_xen_domctl_getdomaininfo_00000009_t); +/* vki_xen_domctl_getdomaininfo_0000000a is the same as 00000009 */ + /* Get/set the NUMA node(s) with which the guest has affinity with. */ /* XEN_DOMCTL_setnodeaffinity */ /* XEN_DOMCTL_getnodeaffinity */ diff --git a/include/vki/vki-xen-sysctl.h b/include/vki/vki-xen-sysctl.h index 1621b7abef..8f4eac124f 100644 --- a/include/vki/vki-xen-sysctl.h +++ b/include/vki/vki-xen-sysctl.h @@ -5,9 +5,10 @@ * The sysctl interface is versioned via the interface_version * field. This structures in this header supports sysctl interfaces: * - * - 00000008: Xen 4.1 - * - 00000009: Xen 4.2 - * - 0000000a: Xen 4.3 + * - 0x00000008: Xen 4.1 + * - 0x00000009: Xen 4.2 + * - 0x0000000a: Xen 4.3 & 4.4 + * - 0x0000000b: Xen 4.5 * * When adding a new subop be sure to include the variants used by all * of the above, both here and in syswrap-xen.c @@ -86,6 +87,8 @@ struct vki_xen_sysctl_getdomaininfolist_0000000a { vki_uint32_t num_domains; }; +/* vki_xen_sysctl_getdomaininfolist_0000000b is the same as 0000000a */ + #define VKI_XEN_SYSCTL_CPUPOOL_OP_CREATE 1 /* C */ #define VKI_XEN_SYSCTL_CPUPOOL_OP_DESTROY 2 /* D */ #define VKI_XEN_SYSCTL_CPUPOOL_OP_INFO 3 /* I */ @@ -156,6 +159,8 @@ struct vki_xen_sysctl_physinfo_0000000a { vki_uint32_t capabilities; }; +/* vki_xen_sysctl_physinfo_0000000b is the same as 0000000a */ + struct vki_xen_sysctl_sched_id { /* OUT variable. */ vki_uint32_t sched_id;