[Bug 216033] KVM VMX nested virtualization: VMXON does not check guest CR0 against IA32_VMX_CR0_FIXED0

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

 



https://bugzilla.kernel.org/show_bug.cgi?id=216033

--- Comment #5 from Sean Christopherson (seanjc@xxxxxxxxxx) ---
On Fri, Sep 02, 2022, bugzilla-daemon@xxxxxxxxxx wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=216033
> 
> --- Comment #4 from Eric Li (ercli@xxxxxxxxxxx) ---
> >       if (!nested_host_cr0_valid(vcpu, kvm_read_cr0(vcpu)) ||
> >           !nested_host_cr4_valid(vcpu, kvm_read_cr4(vcpu))) {
> >               kvm_queue_exception(vcpu, UD_VECTOR);
> >               return 1;
> >       }
> 
> Thanks for the reply. I think there is still a typo. Do you mean the
> following?

Yes, yes I did.

>         if (!nested_host_cr0_valid(vcpu, kvm_read_cr0(vcpu)) ||
>             !nested_host_cr4_valid(vcpu, kvm_read_cr4(vcpu))) {
>                 kvm_queue_exception_e(vcpu, GP_VECTOR, 0);
>                 return 1;
>         }
> 
> Or maybe:
> 
>         if (!nested_host_cr0_valid(vcpu, kvm_read_cr0(vcpu)) ||
>             !nested_host_cr4_valid(vcpu, kvm_read_cr4(vcpu))) {
>                 kvm_inject_gp(vcpu, 0);
>                 return 1;
>         }
> 
> I am not familiar with KVM code

Heh, for all the good that being familiar with KVM is doing me.

> so not sure which one should be used. Thanks again!

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.



[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