Re: [PATCH] KVM: nVMX/nSVM: Don't intercept #UD when running L2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/11/2017 12:02, Liran Alon wrote:
>>
>> It's a nit, but since you have to send a v2, I'd prefer to keep
>> UD_VECTOR above and clear it here.
> I think your suggestion could be problematic.
> In case (to_vmx(vcpu)->rmode.vm86_active == true) then we would like to
> intercept all exceptions and therefore not clear UD_VECTOR.
> This is why I preferred this approach.

You're right.  There is this

        if (to_vmx(vcpu)->rmode.vm86_active)
                eb = ~0;

but of course it would not take care of #UD due to where the line is
placed.  You could either move the "if" at the end, or rewrite it as

	if (to_vmx(vcpu)->rmode.vm86_active) {
		vmcs_write32(EXCEPTION_BITMAP, ~0);
		return;
	}

and place it at the very beginning of update_exception_bitmap.  But as I
said, it's just a nit and I'm okay with the code as is.

Thanks,

Paolo



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux