From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel De Graaf Subject: Re: [PATCH v12 for-xen-4.5 11/20] x86/VPMU: Interface for setting PMU mode and flags Date: Fri, 26 Sep 2014 18:00:39 -0400 Message-ID: <5425E207.5020006@tycho.nsa.gov> References: <1411673336-32736-1-git-send-email-boris.ostrovsky@oracle.com> <1411673336-32736-12-git-send-email-boris.ostrovsky@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1411673336-32736-12-git-send-email-boris.ostrovsky@oracle.com> 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 Cc: kevin.tian@intel.com, keir@xen.org, jbeulich@suse.com, jun.nakajima@intel.com, andrew.cooper3@citrix.com, tim@xen.org, dietmar.hahn@ts.fujitsu.com, xen-devel@lists.xen.org, Aravind.Gopalakrishnan@amd.com, suravee.suthikulpanit@amd.com List-Id: xen-devel@lists.xenproject.org On 09/25/2014 03:28 PM, Boris Ostrovsky wrote: > Add runtime interface for setting PMU mode and flags. Three main modes are > provided: > * XENPMU_MODE_OFF: PMU is not virtualized > * XENPMU_MODE_SELF: Guests can access PMU MSRs and receive PMU interrupts. > * XENPMU_MODE_HV: Same as XENPMU_MODE_SELF for non-proviledged guests, dom0 > can profile itself and the hypervisor. > > Note that PMU modes are different from what can be provided at Xen's boot line > with 'vpmu' argument. An 'off' (or '0') value is equivalent to XENPMU_MODE_OFF. > Any other value, on the other hand, will cause VPMU mode to be set to > XENPMU_MODE_SELF during boot. > > For feature flags only Intel's BTS is currently supported. > > Mode and flags are set via HYPERVISOR_xenpmu_op hypercall. > > Signed-off-by: Boris Ostrovsky > Reviewed-by: Konrad Rzeszutek Wilk Do you think it would be useful for some service domain in a disaggregated system to be able to query but not modify these PMU settings (i.e. only use XENPMU_mode_get and XENPMU_feature_get)? If this might be useful, then splitting up the permission checks to use two bits (pmu_get, pmu_set) is preferred. However, I don't want to suggest this split if it will never be useful - and I think that's the case here. If you agree, then: Acked-by: Daniel De Graaf