Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:olh:xen-buildrequires
valgrind
valgrind.xen-4.13-implement-XEN_DOMCTL_set_cpu_...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File valgrind.xen-4.13-implement-XEN_DOMCTL_set_cpu_policy.patch of Package valgrind
From: Olaf Hering <olaf@aepfle.de> Date: Fri, 7 Feb 2020 19:45:20 +0100 Subject: xen-4.13: implement XEN_DOMCTL_set_cpu_policy bz#390553 --- coregrind/m_syswrap/syswrap-xen.c | 38 ++++++++++++++++++++++++++++++++++++++ include/vki/vki-xen-domctl.h | 10 ++++++++++ 2 files changed, 48 insertions(+) --- a/coregrind/m_syswrap/syswrap-xen.c +++ b/coregrind/m_syswrap/syswrap-xen.c @@ -1831,24 +1831,43 @@ PRE(domctl) PRE_XEN_DOMCTL_READ(set_gnttab_limits_0000000e, maptrack_frames); break; case VKI_XEN_DOMCTL_get_cpu_policy: switch (domctl->interface_version) { case 0x00000011: PRE_XEN_DOMCTL_READ(cpu_policy_00000011, nr_leaves); PRE_XEN_DOMCTL_READ(cpu_policy_00000011, nr_msrs); break; } break; + case VKI_XEN_DOMCTL_set_cpu_policy: + switch (domctl->interface_version) { + case 0x00000012: + PRE_XEN_DOMCTL_READ(cpu_policy_00000012, nr_leaves); + PRE_XEN_DOMCTL_READ(cpu_policy_00000012, nr_msrs); + if (domctl->u.cpu_policy_00000012.cpuid_policy.p) + PRE_MEM_READ("XEN_DOMCTL_set_cpu_policy_00000012 *u.cpu_policy_00000012.cpuid_policy.p", + (Addr)domctl->u.cpu_policy_00000012.cpuid_policy.p, + sizeof(vki_xen_cpuid_leaf_00000012_t) * + domctl->u.cpu_policy_00000012.nr_leaves); + if (domctl->u.cpu_policy_00000012.msr_policy.p) + PRE_MEM_READ("XEN_DOMCTL_set_cpu_policy_00000012 *u.cpu_policy_00000012.msr_policy.p", + (Addr)domctl->u.cpu_policy_00000012.msr_policy.p, + sizeof(vki_xen_msr_entry_00000012_t) * + domctl->u.cpu_policy_00000012.nr_msrs); + break; + } + break; + default: bad_subop(tid, layout, arrghs, status, flags, "__HYPERVISOR_domctl", domctl->cmd); break; } #undef PRE_XEN_DOMCTL_READ #undef __PRE_XEN_DOMCTL_READ } PRE(hvm_op) { unsigned long op = ARG1; @@ -3042,24 +3061,43 @@ POST(domctl){ case 0x00000011: POST_XEN_DOMCTL_WRITE(cpu_policy_00000011, nr_leaves); POST_XEN_DOMCTL_WRITE(cpu_policy_00000011, nr_msrs); if (domctl->u.cpu_policy_00000011.cpuid_policy.p) POST_MEM_WRITE((Addr)domctl->u.cpu_policy_00000011.cpuid_policy.p, domctl->u.cpu_policy_00000011.nr_leaves); if (domctl->u.cpu_policy_00000011.msr_policy.p) POST_MEM_WRITE((Addr)domctl->u.cpu_policy_00000011.msr_policy.p, domctl->u.cpu_policy_00000011.nr_msrs); break; } break; + case VKI_XEN_DOMCTL_set_cpu_policy: + switch (domctl->interface_version) { + case 0x00000012: + POST_XEN_DOMCTL_WRITE(cpu_policy_00000012, nr_leaves); + POST_XEN_DOMCTL_WRITE(cpu_policy_00000012, nr_msrs); + POST_XEN_DOMCTL_WRITE(cpu_policy_00000012, err_leaf); + POST_XEN_DOMCTL_WRITE(cpu_policy_00000012, err_subleaf); + POST_XEN_DOMCTL_WRITE(cpu_policy_00000012, err_msr); + if (domctl->u.cpu_policy_00000012.cpuid_policy.p) + POST_MEM_WRITE((Addr)domctl->u.cpu_policy_00000012.cpuid_policy.p, + sizeof(vki_xen_cpuid_leaf_00000012_t) * + domctl->u.cpu_policy_00000012.nr_leaves); + if (domctl->u.cpu_policy_00000012.msr_policy.p) + POST_MEM_WRITE((Addr)domctl->u.cpu_policy_00000012.msr_policy.p, + sizeof(vki_xen_msr_entry_00000012_t) * + domctl->u.cpu_policy_00000012.nr_msrs); + break; + } + break; } #undef POST_XEN_DOMCTL_WRITE #undef __POST_XEN_DOMCTL_WRITE } POST(hvm_op) { unsigned long op = ARG1; void *arg = (void *)(unsigned long)ARG2; #define __POST_XEN_HVMOP_WRITE(_hvm_op, _type, _field) \ --- a/include/vki/vki-xen-domctl.h +++ b/include/vki/vki-xen-domctl.h @@ -127,24 +127,25 @@ #define VKI_XEN_DOMCTL_cacheflush 71 #define VKI_XEN_DOMCTL_get_vcpu_msrs 72 #define VKI_XEN_DOMCTL_set_vcpu_msrs 73 #define VKI_XEN_DOMCTL_setvnumainfo 74 #define VKI_XEN_DOMCTL_psr_cmt_op 75 #define VKI_XEN_DOMCTL_arm_configure_domain 76 #define VKI_XEN_DOMCTL_monitor_op 77 /* new in 4.6 */ #define VKI_XEN_DOMCTL_psr_cat_op 78 #define VKI_XEN_DOMCTL_soft_reset 79 #define VKI_XEN_DOMCTL_set_gnttab_limits 80 #define VKI_XEN_DOMCTL_vuart_op 81 #define VKI_XEN_DOMCTL_get_cpu_policy 82 +#define VKI_XEN_DOMCTL_set_cpu_policy 83 #define VKI_XEN_DOMCTL_gdbsx_guestmemio 1000 #define VKI_XEN_DOMCTL_gdbsx_pausevcpu 1001 #define VKI_XEN_DOMCTL_gdbsx_unpausevcpu 1002 #define VKI_XEN_DOMCTL_gdbsx_domstatus 1003 struct vki_xen_domctl_createdomain_00000004 { /* IN parameters */ vki_uint32_t ssidref; vki_xen_domain_handle_t handle; vki_uint32_t flags; }; @@ -830,24 +831,32 @@ struct vki_xen_domctl_monitor_op_00000010 { struct vki_xen_domctl_set_gnttab_limits_0000000e { vki_uint32_t grant_frames; vki_uint32_t maptrack_frames; }; struct vki_xen_domctl_cpu_policy_00000011 { vki_uint32_t nr_leaves; vki_uint32_t nr_msrs; VKI_XEN_GUEST_HANDLE_64(vki_xen_cpuid_leaf_00000012_t) cpuid_policy; VKI_XEN_GUEST_HANDLE_64(vki_xen_msr_entry_00000012_t) msr_policy; }; +struct vki_xen_domctl_cpu_policy_00000012 { + vki_uint32_t nr_leaves; + vki_uint32_t nr_msrs; + VKI_XEN_GUEST_HANDLE_64(vki_xen_cpuid_leaf_00000012_t) cpuid_policy; + VKI_XEN_GUEST_HANDLE_64(vki_xen_msr_entry_00000012_t) msr_policy; + vki_uint32_t err_leaf, err_subleaf, err_msr; +}; + struct vki_xen_domctl { vki_uint32_t cmd; vki_uint32_t interface_version; /* XEN_DOMCTL_INTERFACE_VERSION */ vki_xen_domid_t domain; union { struct vki_xen_domctl_createdomain_00000004 createdomain_00000004; struct vki_xen_domctl_createdomain_0000000b createdomain_0000000b; struct vki_xen_domctl_createdomain_0000000c createdomain_0000000c; struct vki_xen_domctl_createdomain_00000011 createdomain_00000011; struct vki_xen_domctl_createdomain_00000012 createdomain_00000012; struct vki_xen_domctl_getdomaininfo_00000007 getdomaininfo_00000007; struct vki_xen_domctl_getdomaininfo_00000008 getdomaininfo_00000008; @@ -917,21 +926,22 @@ struct vki_xen_domctl { //struct vki_xen_domctl_gdbsx_domstatus gdbsx_domstatus; struct vki_xen_domctl_monitor_op_0000000b monitor_op_0000000b; struct vki_xen_domctl_monitor_op_0000000c monitor_op_0000000c; struct vki_xen_domctl_monitor_op_0000000e monitor_op_0000000e; struct vki_xen_domctl_monitor_op_00000010 monitor_op_00000010; //struct vki_xen_domctl_vnuma vnuma; //struct vki_xen_domctl_psr_cmt_op psr_cmt_op; //struct vki_xen_domctl_psr_cat_op psr_cat_op; //struct vki_xen_domctl_arm_configuredomain configuredomain; struct vki_xen_domctl_set_gnttab_limits_0000000e set_gnttab_limits_0000000e; //struct vki_xen_domctl_vuart_op vuart_op; struct vki_xen_domctl_cpu_policy_00000011 cpu_policy_00000011; + struct vki_xen_domctl_cpu_policy_00000012 cpu_policy_00000012; vki_uint8_t pad[128]; } u; }; #endif // __VKI_XEN_DOMCTL_H /*--------------------------------------------------------------------*/ /*--- end ---*/ /*--------------------------------------------------------------------*/
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor