From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Roedel, Joerg" Subject: Re: [PATCH 08/31] nVMX: Fix local_vcpus_link handling Date: Tue, 24 May 2011 11:22:06 +0200 Message-ID: <20110524092206.GH27867@amd.com> References: <20110517181132.GA16262@fermat.math.technion.ac.il> <20110517184336.GA10394@amt.cnet> <20110517193030.GA21656@fermat.math.technion.ac.il> <20110517195253.GB11065@amt.cnet> <20110518055236.GA1230@fermat.math.technion.ac.il> <20110518120801.GA9176@amt.cnet> <20110522085732.GB1116@fermat.math.technion.ac.il> <4DDA81FD.5050203@redhat.com> <20110523164325.GF27867@amd.com> <4DDA90AB.5010604@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: Nadav Har'El , Marcelo Tosatti , "kvm@vger.kernel.org" , "gleb@redhat.com" To: Avi Kivity Return-path: Received: from db3ehsobe004.messaging.microsoft.com ([213.199.154.142]:46985 "EHLO DB3EHSOBE004.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754582Ab1EXJWH (ORCPT ); Tue, 24 May 2011 05:22:07 -0400 Content-Disposition: inline In-Reply-To: <4DDA90AB.5010604@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, May 23, 2011 at 12:51:55PM -0400, Avi Kivity wrote: > On 05/23/2011 07:43 PM, Roedel, Joerg wrote: > > On Mon, May 23, 2011 at 11:49:17AM -0400, Avi Kivity wrote: > > > > > Joerg, is > > > > > > if (unlikely(cpu != vcpu->cpu)) { > > > svm->asid_generation = 0; > > > mark_all_dirty(svm->vmcb); > > > } > > > > > > susceptible to cpu offline/online? > > > > I don't think so. This should be safe for cpu offline/online as long as > > the cpu-number value is not reused for another physical cpu. But that > > should be the case afaik. > > > > Why not? offline/online does reuse cpu numbers AFAIK (and it must, if > you have a fully populated machine and offline/online just one cpu). Yes, you are right. There is a slight possibility that the asid is not updated when a vcpu has asid_generation == 1 and hasn't been running on another cpu while this given cpu was offlined/onlined. Very unlikely, but we can not rule it out. Probably we should make the local_vcpu_list from vmx generic, use it from svm and fix it this way. Joerg -- AMD Operating System Research Center Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach General Managers: Alberto Bozzo, Andrew Bowd Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632