From nobody Wed May 8 19:20:15 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1556019583; cv=none; d=zoho.com; s=zohoarc; b=knBddr84QOaEm0sNCaVVmETcVuySh6Q2XM33fO/FdQx0eYuH0HYgdUccpDNrZmkWqXqG7JRSjMSkWSFI1nTDPX0soZb7UC4COqkLPXv9j/8h9eHpzmia8acH+tVdlEHXHIEyso4NN+lIHEknE27lK85+Iarh8zYlb8wzsj2SkjY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556019583; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=Hy8Gecm5gn5GeTHzyE8XAn8gowURWzlseNDj5PIBl+M=; b=KwuwZH62uikrQdpRiG6UcYAxswf4gNRyHpsOLQDUGPn+z24Z55/SCvQDKRHT1aPmiCoMy556jrrlT34hWOeMSb+Z2WDgBPSw6BSrsnsxjgkkqpnfikKKomaeF0oJP82q7kakzP1CTW4ojjBpCP2ujTRrOrNSTEs9ENVbtyb/Wyo= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1556019583246597.8703988361283; Tue, 23 Apr 2019 04:39:43 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hItkq-0003FN-QU; Tue, 23 Apr 2019 11:38:28 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hItkp-0003FH-DA for xen-devel@lists.xenproject.org; Tue, 23 Apr 2019 11:38:27 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 4ec2caf5-65bc-11e9-92d7-bc764e045a96; Tue, 23 Apr 2019 11:38:26 +0000 (UTC) X-Inumbo-ID: 4ec2caf5-65bc-11e9-92d7-bc764e045a96 X-IronPort-AV: E=Sophos;i="5.60,385,1549929600"; d="scan'208";a="84177968" From: Igor Druzhinin To: Date: Tue, 23 Apr 2019 12:37:58 +0100 Message-ID: <1556019478-10835-1-git-send-email-igor.druzhinin@citrix.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] x86/mtrr: recalculate P2M type for domains with iocaps X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: andrew.cooper3@citrix.com, Igor Druzhinin , wei.liu2@citrix.com, jbeulich@suse.com, roger.pau@citrix.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This change reflects the logic in epte_get_entry_emt() and allows changes in guest MTTRs to be reflected in EPT for domains having direct access to certain hardware memory regions but without IOMMU context assigned (e.g. XenGT). Signed-off-by: Igor Druzhinin Reviewed-by: Jan Beulich --- xen/arch/x86/hvm/mtrr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c index b8fa340..7ccd85b 100644 --- a/xen/arch/x86/hvm/mtrr.c +++ b/xen/arch/x86/hvm/mtrr.c @@ -783,7 +783,7 @@ HVM_REGISTER_SAVE_RESTORE(MTRR, hvm_save_mtrr_msr, hvm_= load_mtrr_msr, 1, =20 void memory_type_changed(struct domain *d) { - if ( has_iommu_pt(d) && d->vcpu && d->vcpu[0] ) + if ( (has_iommu_pt(d) || cache_flush_permitted(d)) && d->vcpu && d->vc= pu[0] ) { p2m_memory_type_changed(d); flush_all(FLUSH_CACHE); --=20 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel