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

Re: [Xen-devel] [PATCH RFC 2/9] xen: Optimize introspection access to guest state


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxx
  • From: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
  • Date: Thu, 10 Jul 2014 11:05:55 +0300
  • Cc: tim@xxxxxxx
  • Comment: DomainKeys? See http://domainkeys.sourceforge.net/
  • Delivery-date: Thu, 10 Jul 2014 08:05:25 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=ZLzv/pkT8IDYNgeAJyAsRFAj16iOkPFazEJsVrxt/ws9JQ+08z4oA7iU366ivI8TEQeo83cYcpfrHWkn26lw2+MbmuFVUvvSvk9sFeDRbaWIQnsF9S6U8slGigo1QwGpeJuBOqx1I1NM6lJbFedeejf+F/bPkuRe31jG/W5KHBG486ce94+2/M9B665CkoMY9dsgMhtlR+vTUXSpDPRW5P78zVYBaqDcKgN+rVVfFSd8G6hyKTIvoBCNPZFn4z0zBYU5UeUEkzqGh1D694TySDVsqZMmPjGPuV8cbUpBD85Zy8SN+K+Gquv00f5S+sOm19wzrFN+69rcXgsc4PvVyQ==; h=Received:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-BitDefender-Scanner:X-BitDefender-Spam:X-BitDefender-SpamStamp:X-BitDefender-CF-Stamp;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

On 07/02/2014 06:31 PM, Andrew Cooper wrote:
> On 02/07/14 14:33, Razvan Cojocaru wrote:
>> diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
>> index 2caa04a..fed21b6 100644
>> --- a/xen/arch/x86/hvm/vmx/vmx.c
>> +++ b/xen/arch/x86/hvm/vmx/vmx.c
>> @@ -425,6 +425,7 @@ static void vmx_vmcs_save(struct vcpu *v, struct 
>> hvm_hw_cpu *c)
>>      c->cr4 = v->arch.hvm_vcpu.guest_cr[4];
>>  
>>      c->msr_efer = v->arch.hvm_vcpu.guest_efer;
>> +    c->guest_x86_mode = vmx_guest_x86_mode(v);
> 
> guest_x86_mode is a linear function of cr0, eflags and efer.  It can be
> calculated by userspace doesn't need to transmitted individually.

OK, but 1) I'm not sending eflags into userspace, and 2) I thought Xen's
vmx_guest_x86_mode() function is more trustworthy than an userspace
translation of it, with not much overhead for the HV.

1) also means that I'd replace guest_x86_mode in the mem_event with efer
and not gain more space in the ring buffer.

Hope I understood your comment correctly.


Thanks,
Razvan Cojocaru

_______________________________________________
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®.