ia64/xen-unstable

changeset 9687:b5c2dba60b69

[IA64] vmx_vcpu_set_rr: check rid validity

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author awilliam@xenbuild.aw
date Fri Apr 14 14:21:54 2006 -0600 (2006-04-14)
parents 96bc87dd7ca9
children 042b695ffc69
files xen/arch/ia64/vmx/vmx_vcpu.c
line diff
     1.1 --- a/xen/arch/ia64/vmx/vmx_vcpu.c	Fri Apr 14 14:20:04 2006 -0600
     1.2 +++ b/xen/arch/ia64/vmx/vmx_vcpu.c	Fri Apr 14 14:21:54 2006 -0600
     1.3 @@ -210,8 +210,11 @@ IA64FAULT vmx_vcpu_set_rr(VCPU *vcpu, UI
     1.4      ia64_rr oldrr,newrr;
     1.5      thash_cb_t *hcb;
     1.6      extern void * pal_vaddr;
     1.7 +
     1.8      vcpu_get_rr(vcpu, reg, &oldrr.rrval);
     1.9      newrr.rrval=val;
    1.10 +    if (newrr.rid >= (1 << vcpu->domain->arch.rid_bits))
    1.11 +        panic_domain (NULL, "use of invalid rid %lx\n", newrr.rid);
    1.12      if(oldrr.ps!=newrr.ps){
    1.13          hcb = vmx_vcpu_get_vtlb(vcpu);
    1.14          thash_purge_all(hcb);