ia64/xen-unstable

changeset 11049:37b25baa3a75

[IA64] HMVOP_get_param return parameter value

HMVOP_get_param return parameter value within the provided
parameter struct for IPF

Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
author awilliam@xenbuild.aw
date Tue Aug 22 14:40:48 2006 -0600 (2006-08-22)
parents d42e9a6f5378
children 909c0cdda57f
files xen/arch/ia64/vmx/vmx_hypercall.c
line diff
     1.1 --- a/xen/arch/ia64/vmx/vmx_hypercall.c	Fri Aug 18 15:01:04 2006 -0600
     1.2 +++ b/xen/arch/ia64/vmx/vmx_hypercall.c	Tue Aug 22 14:40:48 2006 -0600
     1.3 @@ -59,21 +59,23 @@ do_hvm_op(unsigned long op, XEN_GUEST_HA
     1.4          }
     1.5          else if (IS_PRIV(current->domain)) {
     1.6              d = find_domain_by_id(a.domid);
     1.7 -            if (!d)
     1.8 +            if (d == NULL)
     1.9                  return -ESRCH;
    1.10          }
    1.11          else
    1.12              return -EPERM;
    1.13  
    1.14          if (op == HVMOP_set_param) {
    1.15 +            d->arch.hvm_domain.params[a.index] = a.value;
    1.16              rc = 0;
    1.17 -            d->arch.hvm_domain.params[a.index] = a.value;
    1.18          }
    1.19 -        else
    1.20 -            rc = d->arch.hvm_domain.params[a.index];
    1.21 +        else {
    1.22 +            a.value = d->arch.hvm_domain.params[a.index];
    1.23 +            rc = copy_to_guest(arg, &a, 1) ? -EFAULT : 0;
    1.24 +        }
    1.25  
    1.26          put_domain(d);
    1.27 -        return rc;
    1.28 +        break;
    1.29      }
    1.30  
    1.31      default: