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

Re: [Xen-devel] [PATCH v3 07/13] VMX: add VMFUNC leaf 0 (EPTP switching) to emulator.



>>> On 06.07.15 at 21:56, <ravi.sahita@xxxxxxxxx> wrote:
> From: Andrew Cooper [mailto:andrew.cooper3@xxxxxxxxxx] 
> Sent: Friday, July 03, 2015 9:40 AM
>> On 01/07/15 19:09, Ed White wrote:
>> @@ -1830,6 +1831,20 @@ static void vmx_vcpu_update_vmfunc_ve(struct vcpu *v)
>>      vmx_vmcs_exit(v);
>>  }
>>  
>> +static int vmx_vcpu_emulate_vmfunc(struct cpu_user_regs *regs) {
>> +    int rc = X86EMUL_EXCEPTION;
>> +    struct vcpu *v = current;
>> +
>> +    if ( !cpu_has_vmx_vmfunc && altp2m_active(v->domain) &&
>> +         regs->eax == 0 &&
>> +         p2m_switch_vcpu_altp2m_by_id(v, (uint16_t)regs->ecx) )
>> +    {
>> +        rc = X86EMUL_OKAY;
>> +    }
> 
> You need a #UD injection at this point.
> 
> Ravi> I will keep this function unchanged i.e. returns X86EMUL_EXCEPTION on 
> error, which will cause the initiating hvmemul_vmfunc to stage a #UD (this 
> staging was in fact missing, and is now fixed - thanks).
> Ravi> The #UD is actually injected by the top level routine 
> vmx_vmexit_ud_intercept.

May I please ask you to adjust your reply style to one similar to
what everyone else uses? The Ravi> prefixes aren't indicating a
reply at a first, cursory look, especially since they only precede
paragraph (or sentence?) starts, i.e. aren't replicated on each
line...

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.