From: "Jan Beulich" Subject: Re: [PATCH RFC 2/2] xen/pvh: enable mmu_update hypercall Date: Thu, 16 Oct 2014 14:28:30 +0100 Message-ID: <543FE41E020000780003F3FC@mail.emea.novell.com> References: <1413370425-15015-1-git-send-email-roger.pau@citrix.com> <1413370425-15015-3-git-send-email-roger.pau@citrix.com> <20141016075304.GA71219@deinos.phlegethon.org> <543FA1D9020000780003F13D@mail.emea.novell.com> <543FAC54.1090903@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xel6Y-0008T9-OH for xen-devel@lists.xenproject.org; Thu, 16 Oct 2014 13:28:34 +0000 In-Reply-To: <543FAC54.1090903@citrix.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: =?UTF-8?Q?Roger=20Pau=20Monn=C3=A9?= , Tim Deegan Cc: xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org >>> On 16.10.14 at 13:30, wrote: > El 16/10/14 a les 10.45, Jan Beulich ha escrit: >> And not just that - I can't even see how this would work at present: >> paging_write_guest_entry() uses >> v->arch.paging.mode->write_guest_entry, yet that actor gets filled >> by shadow code only. I don't currently see how for PVH, requiring >> HAP, this wouldn't end up in NULL dereferences. Am I overlooking >> some (non-grep-able) initialization of this and .cmpxchg_guest_entry? > > It "works" because this is only used by the migration code, and the page > that's modified is never of the type PGT_writable_page. Should I look > into implementing this operations for HAP, or should I just prevent it's > usage from do_mmu_update if the caller turns out to be a HAP guest? Aiui the only operation you really need is MMU_MACHPHYS_UPDATE, in which case I'd suggest simply denying requests of the other two kinds for the time being (and not just for HAP callers, but for any paging_mode_external() ones). Jan