On Mon, Jun 01, 2009 at 04:22:03PM +0300, Avi Kivity wrote: > +static void svm_cache_reg(struct kvm_vcpu *vcpu, enum kvm_reg reg) > +{ > + switch (reg) { > + case VCPU_EXREG_PDPTR: > + BUG_ON(!npt_enabled); > + load_pdptrs(vcpu, vcpu->arch.cr3); > + break; > + default: > + BUG(); > + } > +} Don't we need to check for the return value of load_pdptrs() here and inject a #GP it it fails? > + > static void svm_set_vintr(struct vcpu_svm *svm) > { > svm->vmcb->control.intercept |= 1ULL << INTERCEPT_VINTR; > @@ -2286,12 +2298,6 @@ static int handle_exit(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) > } > vcpu->arch.cr0 = svm->vmcb->save.cr0; > vcpu->arch.cr3 = svm->vmcb->save.cr3; > - if (is_paging(vcpu) && is_pae(vcpu) && !is_long_mode(vcpu)) { > - if (!load_pdptrs(vcpu, vcpu->arch.cr3)) { > - kvm_inject_gp(vcpu, 0); > - return 1; > - } > - } ... as done here. Joerg -- | Advanced Micro Devices GmbH Operating | Karl-Hammerschmidt-Str. 34, 85609 Dornach bei München System | Research | Geschäftsführer: Thomas M. McCoy, Giuliano Meroni Center | Sitz: Dornach, Gemeinde Aschheim, Landkreis München | Registergericht München, HRB Nr. 43632 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html