# HG changeset patch # User tristan.gingold@xxxxxxxx # Node ID ff27768347b0da921d28476013ead1123d6db914 # Parent ef77d9331c6790e90d9bfb544fce0d8aa07df04d vmx_vcpu_set_rr: check wether rid is valid. Signed-off-by: Tristan Gingold diff -r ef77d9331c67 -r ff27768347b0 xen/arch/ia64/vmx/vmx_vcpu.c --- a/xen/arch/ia64/vmx/vmx_vcpu.c Fri Apr 14 08:14:02 2006 +++ b/xen/arch/ia64/vmx/vmx_vcpu.c Fri Apr 14 08:43:39 2006 @@ -210,8 +210,11 @@ ia64_rr oldrr,newrr; thash_cb_t *hcb; extern void * pal_vaddr; + vcpu_get_rr(vcpu, reg, &oldrr.rrval); newrr.rrval=val; + if (newrr.rid >= (1 << vcpu->domain->arch.rid_bits)) + panic_domain (NULL, "use of invalid rid %lx\n", newrr.rid); if(oldrr.ps!=newrr.ps){ hcb = vmx_vcpu_get_vtlb(vcpu); thash_purge_all(hcb);