File valgrind.xen-4.14-new-sysctl-value.patch of Package valgrind

From: Olaf Hering <olaf@aepfle.de>
Date: Tue, 28 Jan 2020 13:26:12 +0100
Subject: xen-4.14: new sysctl value

Add 0x13 as sysctl value of xen-4.14

bz#390553
---
 coregrind/m_syswrap/syswrap-xen.c | 4 ++++
 include/vki/vki-xen-sysctl.h      | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

--- a/coregrind/m_syswrap/syswrap-xen.c
+++ b/coregrind/m_syswrap/syswrap-xen.c
@@ -664,24 +664,27 @@ PRE(sysctl) {
    case 0x0000000f:
       vki_set_assumed_xenversion(vki_xenversion_409);
 	   break;
    case 0x00000010:
       vki_set_assumed_xenversion(vki_xenversion_410);
 	   break;
    case 0x00000011:
       vki_set_assumed_xenversion(vki_xenversion_411);
 	   break;
    case 0x00000012:
       vki_set_assumed_xenversion(vki_xenversion_412_or_413);
 	   break;
+   case 0x00000013:
+      vki_set_assumed_xenversion(vki_xenversion_414);
+	   break;
    default:
       bad_intf_version(tid, layout, arrghs, status, flags,
                        "__HYPERVISOR_sysctl", sysctl->interface_version);
       return;
    }
 
 #define __PRE_XEN_SYSCTL_READ(_sysctl, _union, _field)			\
       PRE_MEM_READ("XEN_SYSCTL_" #_sysctl " u." #_union "." #_field,	\
                    (Addr)&sysctl->u._union._field,			\
                    sizeof(sysctl->u._union._field))
 #define PRE_XEN_SYSCTL_READ(_sysctl, _field) \
       __PRE_XEN_SYSCTL_READ(_sysctl, _sysctl, _field)
@@ -2303,24 +2306,25 @@ POST(sysctl)
    {
    case 0x00000008:
    case 0x00000009:
    case 0x0000000a:
    case 0x0000000b:
    case 0x0000000c:
    case 0x0000000d:
    case 0x0000000e:
    case 0x0000000f:
    case 0x00000010:
    case 0x00000011:
    case 0x00000012:
+   case 0x00000013:
 	   break;
    default:
       return;
    }
 
 #define __POST_XEN_SYSCTL_WRITE(_sysctl, _union, _field)        \
       POST_MEM_WRITE((Addr)&sysctl->u._union._field,            \
                      sizeof(sysctl->u._union._field))
 #define POST_XEN_SYSCTL_WRITE(_sysctl, _field) \
       __POST_XEN_SYSCTL_WRITE(_sysctl, _sysctl, _field)
 
    switch (sysctl->cmd) {
--- a/include/vki/vki-xen-sysctl.h
+++ b/include/vki/vki-xen-sysctl.h
@@ -10,25 +10,26 @@
  * - 0x00000006: Xen 3.2 (unhandled)
  * - 0x00000007: Xen 4.0 (unhandled)
  * - 0x00000008: Xen 4.1
  * - 0x00000009: Xen 4.2
  * - 0x0000000a: Xen 4.3 & 4.4
  * - 0x0000000b: Xen 4.5
  * - 0x0000000c: Xen 4.6
  * - 0x0000000d: Xen 4.7
  * - 0x0000000e: Xen 4.8
  * - 0x0000000f: Xen 4.9
  * - 0x00000010: Xen 4.10
  * - 0x00000011: Xen 4.11
- * - 0x00000012: Xen 4.12
+ * - 0x00000012: Xen 4.12 & 4.13
+ * - 0x00000013: Xen 4.14
  *
  * When adding a new subop be sure to include the variants used by all
  * of the above, both here and in syswrap-xen.c
  *
  * Structs which are identical in all supported versions have no
  * version suffix. Structs which do differ are defined multiple times
  * and use the suffix of the earliest version to contain that particular
  * variant.
  */
 
 #define VKI_XEN_SYSCTL_readconsole                    1
 #define VKI_XEN_SYSCTL_tbuf_op                        2
openSUSE Build Service is sponsored by