From: "Jan Beulich" Subject: Re: [PATCH] x86/HVM: Fixed the bug which cause the nested hvm guest fail to boot Date: Mon, 18 Aug 2014 14:31:31 +0100 Message-ID: <53F20E4302000078000BAB0F@mail.emea.novell.com> References: <1408360314-25784-1-git-send-email-liangx.z.li@intel.com> <53F208F002000078000BAAFA@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53F208F002000078000BAAFA@mail.emea.novell.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: liangx.z.li@intel.com Cc: andrew.cooper3@citrix.com, keir@xen.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>>> "Jan Beulich" 08/18/14 3:10 PM >>> >>>> Liliang 08/18/14 1:15 PM >>> >>From: Li Liang >> >>The function memory_type_changed should not be called in hvm_set_guest_pat. >>or the cache will be flushed excessively and make the nested guest very slowly, >>just like blocked. > >As Andrew already said - blindly removing the call is wrong, it is there for a >reason. What you first of all need to explain is why there are so many PAT >modifications, as it's perhaps _that_ which needs adjustment (possibly e.g. >including some filtering to hide writes that don't change the actual value, if >that happens frequently). Actually I have to correct myself - I think the call here is indeed not needed, as the PAT contents is being used by the CPU itself when determining the memory type (and does not influence the result of epte_get_entry_emt()). But the patch description needs to better describe the situation, preferably also referencing the commit that needlessly added the call. Jan