From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tian, Kevin" Subject: Re: [PATCH v10 11/20] x86/VPMU: Interface for setting PMU mode and flags Date: Mon, 22 Sep 2014 22:32:43 +0000 Message-ID: References: <1409802080-6160-1-git-send-email-boris.ostrovsky@oracle.com> <1409802080-6160-12-git-send-email-boris.ostrovsky@oracle.com> <541B53BE.4000909@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <541B53BE.4000909@oracle.com> Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Boris Ostrovsky , "jbeulich@suse.com" , "suravee.suthikulpanit@amd.com" , "Dong, Eddie" , "Aravind.Gopalakrishnan@amd.com" Cc: "andrew.cooper3@citrix.com" , "xen-devel@lists.xen.org" , "keir@xen.org" , "Nakajima, Jun" , "tim@xen.org" List-Id: xen-devel@lists.xenproject.org > From: Boris Ostrovsky [mailto:boris.ostrovsky@oracle.com] > Sent: Thursday, September 18, 2014 2:51 PM > > > and how do you ensure > > vpmu won't become dirty again if the target vcpu switches out, and then > switches > > back again to use vpmu, but before your whole hypercall completes? Here > some > > way is required to really stop vpmu on the target vcpu imho, but I may be > wrong > > on understanding the whole background here... :-) > > I change vpmu_mode *before* calling this sync routine so even if remote > VCPU comes on again it won't load that VCPU's VPMU. That's because the > only time I do this sync is when I: > * Turn VPMU mode off. In which case no VPMU will ever get loaded > * Switch to XENPMU_MODE_ALL mode (in v11 version) in which case the only > time VPMU will get loaded is if it's dom0's VPMU. Which is fine. thanks it answers my question. > >> diff --git a/xen/arch/x86/x86_64/compat/entry.S > >> b/xen/arch/x86/x86_64/compat/entry.S > >> index ac594c9..8587c46 100644 > >> --- a/xen/arch/x86/x86_64/compat/entry.S > >> +++ b/xen/arch/x86/x86_64/compat/entry.S > >> @@ -417,6 +417,8 @@ ENTRY(compat_hypercall_table) > >> .quad do_domctl > >> .quad compat_kexec_op > >> .quad do_tmem_op > >> + .quad do_ni_hypercall /* reserved for XenClient */ > > why XenClient here? > > See include/public/xen.h, hypercall 39. > sorry but why it is included in this VPMU patch set? Thanks Kevin