From: "Jan Beulich" Subject: [PATCH 4/4] x86/EPT: also force EMT re-evaluation if pinned ranges change Date: Wed, 23 Apr 2014 09:41:42 +0100 Message-ID: <535798E6020000780000B2EE@nat28.tlf.novell.com> References: <53579447020000780000B2A9@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartC6F4CFD6.1__=" Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WcskT-0004GP-UA for xen-devel@lists.xenproject.org; Wed, 23 Apr 2014 08:41:46 +0000 In-Reply-To: <53579447020000780000B2A9@nat28.tlf.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: xen-devel Cc: Keir Fraser , Kevin Tian , Eddie Dong , Jun Nakajima , Tim Deegan List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartC6F4CFD6.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline This was inadvertently left out of aa9114ed ("x86/EPT: force re-evaluation of memory type as necessary"). Note that this intentionally doesn't use memory_type_changed(): Changes to the pinned ranges are independent of IOMMU presence, which that function uses to determine whether to call the underlying p2m_memory_type_changed(). Signed-off-by: Jan Beulich --- a/xen/arch/x86/hvm/mtrr.c +++ b/xen/arch/x86/hvm/mtrr.c @@ -650,6 +650,7 @@ int32_t hvm_set_mem_pinned_cacheattr( rcu_read_unlock(&pinned_cacheattr_rcu_lock); list_del_rcu(&range->list); call_rcu(&range->rcu, free_pinned_cacheattr_entry); + p2m_memory_type_changed(d); return 0; } rcu_read_unlock(&pinned_cacheattr_rcu_lock); @@ -695,6 +696,7 @@ int32_t hvm_set_mem_pinned_cacheattr( range->type =3D type; =20 list_add_rcu(&range->list, &d->arch.hvm_domain.pinned_cacheattr_ranges= ); + p2m_memory_type_changed(d); =20 return 0; } --=__PartC6F4CFD6.1__= Content-Type: text/plain; name="x86-set-pinned-reeval.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86-set-pinned-reeval.patch" x86/EPT: also force EMT re-evaluation if pinned ranges change=0A=0AThis = was inadvertently left out of aa9114ed ("x86/EPT: force=0Are-evaluation of = memory type as necessary"). Note that this=0Aintentionally doesn't use = memory_type_changed(): Changes to the pinned=0Aranges are independent of = IOMMU presence, which that function uses to=0Adetermine whether to call = the underlying p2m_memory_type_changed().=0A=0ASigned-off-by: Jan Beulich = =0A=0A--- a/xen/arch/x86/hvm/mtrr.c=0A+++ b/xen/arch/x86= /hvm/mtrr.c=0A@@ -650,6 +650,7 @@ int32_t hvm_set_mem_pinned_cacheattr(=0A = rcu_read_unlock(&pinned_cacheattr_rcu_lock);=0A = list_del_rcu(&range->list);=0A call_rcu(&range->rcu, = free_pinned_cacheattr_entry);=0A+ p2m_memory_type_changed(d)= ;=0A return 0;=0A }=0A rcu_read_unlock(= &pinned_cacheattr_rcu_lock);=0A@@ -695,6 +696,7 @@ int32_t hvm_set_mem_pinn= ed_cacheattr(=0A range->type =3D type;=0A =0A list_add_rcu(&range->= list, &d->arch.hvm_domain.pinned_cacheattr_ranges);=0A+ p2m_memory_type_= changed(d);=0A =0A return 0;=0A }=0A --=__PartC6F4CFD6.1__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --=__PartC6F4CFD6.1__=--