ia64/xen-unstable

changeset 15894:09b45357e492

[IA64] vmx_vcpu_tak: Fix bugs

Signed-off-by: Tristan Gingold <tgingold@free.fr>
author Alex Williamson <alex.williamson@hp.com>
date Fri Sep 21 12:49:31 2007 -0600 (2007-09-21)
parents f3173d151e1d
children b3862770cde2
files xen/arch/ia64/vmx/vmmu.c
line diff
     1.1 --- a/xen/arch/ia64/vmx/vmmu.c	Fri Sep 21 11:03:54 2007 -0600
     1.2 +++ b/xen/arch/ia64/vmx/vmmu.c	Fri Sep 21 12:49:31 2007 -0600
     1.3 @@ -671,18 +671,19 @@ IA64FAULT vmx_vcpu_tpa(VCPU *vcpu, u64 v
     1.4  u64 vmx_vcpu_tak(VCPU *vcpu, u64 vadr)
     1.5  {
     1.6      thash_data_t *data;
     1.7 -    PTA vpta;
     1.8      u64 key;
     1.9 -    vpta.val = vmx_vcpu_get_pta(vcpu);
    1.10 -    if(vpta.vf==0 || unimplemented_gva(vcpu, vadr)){
    1.11 -        key=1;
    1.12 +
    1.13 +    if (unimplemented_gva(vcpu, vadr)) {
    1.14 +        key = 1;
    1.15          return key;
    1.16      }
    1.17 +
    1.18 +    /* FIXME: if psr.dt is set, look in the guest VHPT.  */
    1.19      data = vtlb_lookup(vcpu, vadr, DSIDE_TLB);
    1.20 -    if(!data||!data->p){
    1.21 +    if (!data || !data->p)
    1.22          key = 1;
    1.23 -    }else{
    1.24 -        key = data->key;
    1.25 -    }
    1.26 +    else
    1.27 +        key = data->key << 8;
    1.28 +
    1.29      return key;
    1.30  }