From: Tim Deegan Subject: Re: [PATCH v6 24/29] xen/x86: allow HVM guests to use hypercalls to bring up vCPUs Date: Tue, 29 Sep 2015 09:53:44 +0100 Message-ID: <20150929085344.GA69384@deinos.phlegethon.org> References: <1441368548-43465-1-git-send-email-roger.pau@citrix.com> <1441368548-43465-25-git-send-email-roger.pau@citrix.com> <5600420C02000078000A4234@prv-mh.provo.novell.com> <5609664D.8060604@citrix.com> <560A555402000078000A6625@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 1Zgqfh-0002cR-MR for xen-devel@lists.xenproject.org; Tue, 29 Sep 2015 08:54:01 +0000 Content-Disposition: inline In-Reply-To: <560A555402000078000A6625@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: Ian Campbell , George Dunlap , Andrew Cooper , Stefano Stabellini , xen-devel@lists.xenproject.org, Roger Pau =?iso-8859-1?Q?Monn=E9?= List-Id: xen-devel@lists.xenproject.org At 01:09 -0600 on 29 Sep (1443488980), Jan Beulich wrote: > >>> On 28.09.15 at 18:09, wrote: > > El 21/09/15 a les 17.44, Jan Beulich ha escrit: > >>>>> On 04.09.15 at 14:09, wrote: > >>> + if ( hvm_paging_enabled(v) && !paging_mode_hap(v->domain) ) > >>> + { > >>> + /* Shadow-mode CR3 change. Check PDBR and update refcounts. */ > >>> + struct page_info *page = get_page_from_gfn(v->domain, > >>> + v->arch.hvm_vcpu.guest_cr[3] >> PAGE_SHIFT, > >>> + NULL, P2M_ALLOC); > >> > >> P2M_ALLOC but not P2M_UNSHARE? > > > > This is a copy of what's done in hvm_set_cr3 when shadow mode is enabled. > > As said on IRC - sadly we have to mem-sharing maintainer to ask. I > wonder whether the past or current x86/mm maintainer would know > - Tim, George? Memory sharing requires HAP, so it makes no difference here. Seems like it ought to be P2M_UNSHARE, though, for consistency. Tim.