|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v1 2/2] x86/vvmx: add vmcs id check into vmptrld emulation
>>> On 01.03.17 at 12:01, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 01/03/17 09:13, Sergey Dyasli wrote:
>> --- a/xen/arch/x86/hvm/vmx/vvmx.c
>> +++ b/xen/arch/x86/hvm/vmx/vvmx.c
>> @@ -1633,6 +1633,17 @@ int nvmx_handle_vmptrld(struct cpu_user_regs *regs)
>> {
>> if ( writable )
>> {
>> + struct vmcs_struct *vvmcs = vvmcx;
>> +
>> + if ( ((vvmcs->vmcs_revision_id ^ vmx_basic_msr) &
>> + VMX_BASIC_REVISION_MASK) ||
>> + (!cpu_has_vmx_vmcs_shadowing &&
>> + (vvmcs->vmcs_revision_id & ~VMX_BASIC_REVISION_MASK))
>> )
>> + {
>> + hvm_unmap_guest_frame(vvmcx, 1);
>> + vmfail(regs, VMX_INSN_VMPTRLD_INCORRECT_VMCS_ID);
>
> A newline here please (can be fixed on commit if there are no other
> issues). Otherwise, Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>
>> + return X86EMUL_OKAY;
>> + }
I've added one, but commonly we require such only on the main
(final) return statement of a function.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |