ia64/xen-unstable

changeset 17861:2363cf4ab4cb

hvm, 32-on-64: Allow a 32-bit x86 hvm guest access to any memory_op().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 13 13:50:23 2008 +0100 (2008-06-13)
parents 6e92603ed9f2
children 49c5d6723e35
files xen/arch/x86/hvm/hvm.c
line diff
     1.1 --- a/xen/arch/x86/hvm/hvm.c	Fri Jun 13 13:49:56 2008 +0100
     1.2 +++ b/xen/arch/x86/hvm/hvm.c	Fri Jun 13 13:50:23 2008 +0100
     1.3 @@ -1871,39 +1871,9 @@ static hvm_hypercall_t *hvm_hypercall32_
     1.4  
     1.5  static long hvm_memory_op_compat32(int cmd, XEN_GUEST_HANDLE(void) arg)
     1.6  {
     1.7 -    extern long do_add_to_physmap(struct xen_add_to_physmap *xatp);
     1.8 -    long rc;
     1.9 -
    1.10 -    switch ( cmd )
    1.11 -    {
    1.12 -    case XENMEM_add_to_physmap:
    1.13 -    {
    1.14 -        struct {
    1.15 -            domid_t domid;
    1.16 -            uint32_t space;
    1.17 -            uint32_t idx;
    1.18 -            uint32_t gpfn;
    1.19 -        } u;
    1.20 -        struct xen_add_to_physmap *h = (void *)COMPAT_ARG_XLAT_VIRT_BASE;
    1.21 -
    1.22 -        if ( copy_from_guest(&u, arg, 1) )
    1.23 -            return -EFAULT;
    1.24 -
    1.25 -        h->domid = u.domid;
    1.26 -        h->space = u.space;
    1.27 -        h->idx = u.idx;
    1.28 -        h->gpfn = u.gpfn;
    1.29 -
    1.30 -        rc = hvm_memory_op(cmd, guest_handle_from_ptr(h, void));
    1.31 -        break;
    1.32 -    }
    1.33 -
    1.34 -    default:
    1.35 -        gdprintk(XENLOG_WARNING, "memory_op %d.\n", cmd);
    1.36 -        rc = -ENOSYS;
    1.37 -        break;
    1.38 -    }
    1.39 -
    1.40 +    long rc = compat_memory_op(cmd, arg);
    1.41 +    if ( (cmd & MEMOP_CMD_MASK) == XENMEM_decrease_reservation )
    1.42 +        current->domain->arch.hvm_domain.qemu_mapcache_invalidate = 1;
    1.43      return rc;
    1.44  }
    1.45