From: "Jan Beulich" Subject: Re: [PATCH RFC v13 08/20] pvh: PVH access to hypercalls Date: Mon, 30 Sep 2013 07:38:47 +0100 Message-ID: <5249389702000078000F7DF1@nat28.tlf.novell.com> References: <1379955000-11050-1-git-send-email-george.dunlap@eu.citrix.com> <1379955000-11050-9-git-send-email-george.dunlap@eu.citrix.com> <52446FD302000078000F70E8@nat28.tlf.novell.com> <20130927141541.2b4e003f@mantra.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VQX88-0005vp-8T for xen-devel@lists.xenproject.org; Mon, 30 Sep 2013 06:38:52 +0000 In-Reply-To: <20130927141541.2b4e003f@mantra.us.oracle.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Mukesh Rathor Cc: George Dunlap , xen-devel , Keir Fraser , TimDeegan List-Id: xen-devel@lists.xenproject.org >>> On 27.09.13 at 23:15, Mukesh Rathor wrote: > On Thu, 26 Sep 2013 16:33:07 +0100 > "Jan Beulich" wrote: > >> >>> On 23.09.13 at 18:49, George Dunlap >> >>> wrote: >> > --- a/xen/arch/x86/hvm/mtrr.c >> > +++ b/xen/arch/x86/hvm/mtrr.c >> > @@ -578,6 +578,7 @@ int32_t hvm_set_mem_pinned_cacheattr( >> > { >> > struct hvm_mem_pinned_cacheattr_range *range; >> > >> > + /* Side note: A PVH guest writes to MSR_IA32_CR_PAT natively. >> > */ if ( !((type == PAT_TYPE_UNCACHABLE) || >> > (type == PAT_TYPE_WRCOMB) || >> > (type == PAT_TYPE_WRTHROUGH) || >> >> I always wondered what this comment is trying to tell the >> reader. > > Original code: > > /* Side note: A PVH guest writes to MSR_IA32_CR_PAT natively. */ > if ( is_pvh_domain(d) ) > return -EOPNOTSUPP; > > We don't support this because the guest writes PAT natively, was > my intention. Either it was your comment to return EOPNOTSUPP > or just my thought - it will return EINVAL now, I guess ok too. That wasn't the question (albeit nevertheless good you comment on it). I was really after understanding what "writes natively" is supposed to mean. _If_ there's any behavioral difference to how "normal" HVM accesses the PAT MSR, this surely requires (in the commit message at least) a more detailed explanation. And if there was no difference, the comment would seem rather pointless. Jan