From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Subject: Re: [PATCH v6 18/29] xen/x86: allow disabling the emulated pmu Date: Fri, 25 Sep 2015 17:22:32 +0200 Message-ID: <560566B8.2020803@citrix.com> References: <1441368548-43465-1-git-send-email-roger.pau@citrix.com> <1441368548-43465-19-git-send-email-roger.pau@citrix.com> <560031F602000078000A4186@prv-mh.provo.novell.com> <560018C7.9040004@oracle.com> <5605633C.8000708@citrix.com> <560580C702000078000A5B2A@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZfUpf-0004WZ-KS for xen-devel@lists.xenproject.org; Fri, 25 Sep 2015 15:22:43 +0000 In-Reply-To: <560580C702000078000A5B2A@prv-mh.provo.novell.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: Jan Beulich Cc: Andrew Cooper , Boris Ostrovsky , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org El 25/09/15 a les 17.13, Jan Beulich ha escrit: >>>> On 25.09.15 at 17:07, wrote: >> El 21/09/15 a les 16.48, Boris Ostrovsky ha escrit: >>> On 09/21/2015 10:36 AM, Jan Beulich wrote: >>>>>>> On 04.09.15 at 14:08, wrote: >>>> Hmm - this seems questionable to me: Isn't the vPMU an optional >>>> feature anyway? I.e. doesn't need separate handling here? Boris? >>> >>> It is optional system-wise, not per-guest, which is what I think Roger >>> is trying to do. I in fact wanted to add ability to disable VPMU per >>> guest myself. >>> >>> However, VPMU has nothing to do with device model so I don't think it >>> should be part of this series from that perspective. >> >> vpmu is enabled globally on the xen command line, there's no way to >> disable it on a per-guest basis, so AFAICS it will be enabled for >> HMVlite guests which is wrong because we don't have a vlapic. > > Hmm, Boris specifically enabled vPMU to be available to all three > kinds of guests, and PVH in it s current shape doesn't have a > vLAPIC either. So making such a connection seems wrong to me. IMHO, I would prefer the vPMU support in HVMlite guests to be tied to a vlapic presence, so we can do it the HVM way instead of having to do hypercalls. One think that could work is changing the is_hvm_* calls in vpmu.c to has_vlapic. This way HVMlite guests could still use the PV vPMU interface, but once a lapic is enabled we could use the native way. Roger.