To merge with your valgrind series, for simplicity. ~Andrew
Andrew Cooper
2013-Jun-11 13:06 UTC
[PATCH 1 of 2] valgrind/xen: VKI_XEN_SYSCTL_sched_id hypercall
Xen takes a pointer to a sysctl_sched_id struct, and writes a single uint32_t into it. There are no memory reads, and a single memory write. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> diff -r b3399fbed618 -r 0ed676b7bd46 coregrind/m_syswrap/syswrap-xen.c --- a/coregrind/m_syswrap/syswrap-xen.c +++ b/coregrind/m_syswrap/syswrap-xen.c @@ -400,6 +400,10 @@ PRE(sysctl) { } break; + case VKI_XEN_SYSCTL_sched_id: + /* No inputs */ + break; + case VKI_XEN_SYSCTL_cpupool_op: PRE_XEN_SYSCTL_READ(cpupool_op, op); @@ -783,6 +787,10 @@ POST(sysctl) } break; + case VKI_XEN_SYSCTL_sched_id: + POST_XEN_SYSCTL_WRITE(sched_id, sched_id); + break; + case VKI_XEN_SYSCTL_cpupool_op: if (sysctl->u.cpupool_op.op == VKI_XEN_SYSCTL_CPUPOOL_OP_CREATE || sysctl->u.cpupool_op.op == VKI_XEN_SYSCTL_CPUPOOL_OP_INFO) diff -r b3399fbed618 -r 0ed676b7bd46 include/vki/vki-xen-sysctl.h --- a/include/vki/vki-xen-sysctl.h +++ b/include/vki/vki-xen-sysctl.h @@ -54,6 +54,11 @@ struct vki_xen_sysctl_getdomaininfolist_ vki_uint32_t num_domains; }; +struct vki_xen_sysctl_sched_id { + /* OUT variable. */ + vki_uint32_t sched_id; +}; + #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 */ @@ -110,7 +115,7 @@ struct vki_xen_sysctl { struct vki_xen_sysctl_physinfo physinfo; struct vki_xen_sysctl_topologyinfo topologyinfo; struct vki_xen_sysctl_numainfo numainfo; - //struct vki_xen_sysctl_sched_id sched_id; + struct vki_xen_sysctl_sched_id sched_id; //struct vki_xen_sysctl_perfc_op perfc_op; struct vki_xen_sysctl_getdomaininfolist_00000008 getdomaininfolist_00000008; struct vki_xen_sysctl_getdomaininfolist_00000009 getdomaininfolist_00000009;
Andrew Cooper
2013-Jun-11 13:06 UTC
[PATCH 2 of 2] valgrind/xen - VKI_XENMEM_get_sharing_{freed, shared}_pages hypercall
These hypercalls take no parameters and their return value is stright from the ioctl() on privcmd. There are no memory read/writes. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> diff -r 1f531a813c0c -r b3399fbed618 coregrind/m_syswrap/syswrap-xen.c --- a/coregrind/m_syswrap/syswrap-xen.c +++ b/coregrind/m_syswrap/syswrap-xen.c @@ -148,6 +148,11 @@ PRE(memory_op) break; } + case VKI_XENMEM_get_sharing_freed_pages: + case VKI_XENMEM_get_sharing_shared_pages: + /* No inputs */ + break; + default: bad_subop(tid, layout, arrghs, status, flags, "__HYPERVISOR_memory_op", ARG1); @@ -651,6 +656,11 @@ POST(memory_op) sizeof(vki_xen_pfn_t) * memory_reservation->nr_extents); break; } + + case VKI_XENMEM_get_sharing_freed_pages: + case VKI_XENMEM_get_sharing_shared_pages: + /* No outputs */ + break; } }
On Tue, 2013-06-11 at 14:06 +0100, Andrew Cooper wrote:> To merge with your valgrind series, for simplicity.Got them, thanks. I need to find an hour or so to put together a batch of valgrind fixes -- not sure when I''ll get that chance but these are on my radar. Ian