diff options
author | Dario Faggioli <dario.faggioli@citrix.com> | 2013-01-24 12:47:57 +0000 |
---|---|---|
committer | Dario Faggioli <dario.faggioli@citrix.com> | 2013-01-24 12:47:57 +0000 |
commit | 0c9dab50b15202f68c3025841c38272820128b2c (patch) | |
tree | 6e66480446e73d9887421c86c3876bec58283b48 /tools/libxc/xc_private.c | |
parent | 553fd4753c3bcf25dd3824a75d459746f3380ef6 (diff) | |
download | xen-0c9dab50b15202f68c3025841c38272820128b2c.tar.gz xen-0c9dab50b15202f68c3025841c38272820128b2c.tar.bz2 xen-0c9dab50b15202f68c3025841c38272820128b2c.zip |
libxc: match types of 'subject' and 'foreigndom' between struct xc_mmu and do_mmu_update
In do_mmu_update() (in the hypervisor) the parameter 'foreigndom' is
'unsigned int' and both its high (bits 31-16) and low (bits 15-0) are
parts utilised, as explained here:
http://xenbits.xen.org/docs/unstable/hypercall/include,public,xen.h.html#Func_HYPERVISOR_mmu_update
However, the actual parameter, i.e., the 'subject' field in
struct xc_mmu is declared as domid_t, which typedef-s to uint16_t.
This means we are never able to pass anything via the higher 16 bits
of 'foreigndom', which in turns may cause the hypercall to fail when
called on an actual foreign domain.
Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxc/xc_private.c')
-rw-r--r-- | tools/libxc/xc_private.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/libxc/xc_private.c b/tools/libxc/xc_private.c index 3e03a91fba..c0b73a620d 100644 --- a/tools/libxc/xc_private.c +++ b/tools/libxc/xc_private.c @@ -478,13 +478,13 @@ static int flush_mmu_updates(xc_interface *xch, struct xc_mmu *mmu) return err; } -struct xc_mmu *xc_alloc_mmu_updates(xc_interface *xch, domid_t dom) +struct xc_mmu *xc_alloc_mmu_updates(xc_interface *xch, unsigned int subject) { struct xc_mmu *mmu = malloc(sizeof(*mmu)); if ( mmu == NULL ) return mmu; mmu->idx = 0; - mmu->subject = dom; + mmu->subject = subject; return mmu; } |