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

RE: [Xen-devel] [PATCH] Clear VMCS if reusing after vcpu reset


  • To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
  • Date: Mon, 30 Apr 2007 15:19:10 +0800
  • Delivery-date: Mon, 30 Apr 2007 00:17:45 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AceK7hrJaVpsNFsWQeu9LhE5uBSFagACMmDbAAABnYA=
  • Thread-topic: [Xen-devel] [PATCH] Clear VMCS if reusing after vcpu reset

>From: Keir Fraser [mailto:Keir.Fraser@xxxxxxxxxxxx]
>Sent: 2007年4月30日 15:12
>
>On 30/4/07 07:09, "Tian, Kevin" <kevin.tian@xxxxxxxxx> wrote:
>
>> Clear whole page when VMCS is reused due to cpu hotplug.
>> construct_vmcs doesn't take care of all fields and some stale
>> content may make hardware unhappy.
>
>You almost certainly need to vmx_clear_vmcs() before you zap it, as
>there's
>no reason it might not be active on some CPU when vmx_create_vmcs()
>is
>called (domain_pause() does not deactivate VMCSs).

You're exactly right. :-)

>
>Furthermore, this need to zap the page a second time is worrying. We
>only
>modify architectural state in the VMCS in a well-defined way. That
>shouldn't
>upset the hardware. Is this actually an indication that there is some
>architectural state that we are forgetting to re-initialise? If so then
>that's the bug which should be fixed.
>

Does construct_vmcs need to explicitly care all fields if hardware 
just expects a zero there which can be satisfied by memset()? Anyway, 
I'll take a deeper look to check which unexpected fields are with stale 
content before reset.

Thanks,
Kevin

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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