Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1684179

Re: [PATCH 2/3 v2] KVM: nVMX: Enable VMFUNC for the L1 hypervisor

From David Hildenbrand <david@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/3 v2] KVM: nVMX: Enable VMFUNC for the L1 hypervisor
Date 2017-07-10 14:20 +0200
Message-ID <u1FPs-4Ta-17@gated-at.bofh.it> (permalink)
References <u0o4h-3Nh-1@gated-at.bofh.it> <u0o4i-3Nh-29@gated-at.bofh.it> <u1D1g-375-21@gated-at.bofh.it> <u1EJH-4h6-5@gated-at.bofh.it>
Organization Red Hat GmbH

Show all headers | View raw


On 10.07.2017 13:03, Paolo Bonzini wrote:
> 
> 
> On 10/07/2017 11:17, David Hildenbrand wrote:
>>> +
>>> +	vmcs12 = get_vmcs12(vcpu);
>>> +	if ((vmcs12->vm_function_control & (1 << function)) == 0)
>> (learned that in c, shifting beyond the type size is undefined)
>>
>> Should we check for function < 64 here? (as SDM mentions)
> 
> It should be already.  The manual says:
> 
> The VMFUNC instruction causes an invalid-opcode exception (#UD) if the
> “enable VM functions” VM-execution controls is 0 1 or the value of EAX
> is greater than 63 (only VM functions 0–63 can be enable). Otherwise,
> the instruction causes a VM exit if the bit at position EAX is 0 in the
> VM-function controls (the selected VM function is not enabled).
> 

Thanks, I missed that paragraph.

> Paolo
> 


-- 

Thanks,

David

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 0/3 v2] Expose VMFUNC to the nested hypervisor Bandan Das <bsd@redhat.com> - 2017-07-07 01:10 +0200
  [PATCH 1/3 v2] KVM: vmx: Enable VMFUNCs Bandan Das <bsd@redhat.com> - 2017-07-07 01:10 +0200
    Re: [PATCH 1/3 v2] KVM: vmx: Enable VMFUNCs David Hildenbrand <david@redhat.com> - 2017-07-10 11:00 +0200
      Re: [PATCH 1/3 v2] KVM: vmx: Enable VMFUNCs Paolo Bonzini <pbonzini@redhat.com> - 2017-07-10 11:20 +0200
        Re: [PATCH 1/3 v2] KVM: vmx: Enable VMFUNCs Paolo Bonzini <pbonzini@redhat.com> - 2017-07-10 11:30 +0200
        Re: [PATCH 1/3 v2] KVM: vmx: Enable VMFUNCs David Hildenbrand <david@redhat.com> - 2017-07-10 11:30 +0200
  [PATCH 3/3 v2] KVM: nVMX: Emulate EPTP switching for the L1 hypervisor Bandan Das <bsd@redhat.com> - 2017-07-07 01:10 +0200
    Re: [PATCH 3/3 v2] KVM: nVMX: Emulate EPTP switching for the L1  hypervisor Paolo Bonzini <pbonzini@redhat.com> - 2017-07-07 10:40 +0200
  [PATCH 2/3 v2] KVM: nVMX: Enable VMFUNC for the L1 hypervisor Bandan Das <bsd@redhat.com> - 2017-07-07 01:10 +0200
    Re: [PATCH 2/3 v2] KVM: nVMX: Enable VMFUNC for the L1 hypervisor David Hildenbrand <david@redhat.com> - 2017-07-10 11:20 +0200
      Re: [PATCH 2/3 v2] KVM: nVMX: Enable VMFUNC for the L1 hypervisor Paolo Bonzini <pbonzini@redhat.com> - 2017-07-10 13:10 +0200
        Re: [PATCH 2/3 v2] KVM: nVMX: Enable VMFUNC for the L1 hypervisor David Hildenbrand <david@redhat.com> - 2017-07-10 14:20 +0200

csiph-web