From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] KVM: MTRR: fix fixed MTRR segment look up Date: Mon, 14 Dec 2015 17:07:59 +0100 Message-ID: <566EE95F.8040807@redhat.com> References: <566EE1FB.8050708@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: "Alexis D...t" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:42276 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752484AbbLNQIF (ORCPT ); Mon, 14 Dec 2015 11:08:05 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 14/12/2015 17:06, Alexis D...t wrote: > From what I see in my case, it was especially gfn from 0x0 to 0xA0 > which are deadly impacted by the wrong cache property. Yes, indeed. I'll send the patch to Linus this week; I've now posted to the BZ a second patch for GFNs above 4GB. Paolo > 2015-12-14 16:36 GMT+01:00 Paolo Bonzini : >> > >> > >> > On 14/12/2015 15:39, Alexis D...t wrote: >>> >> It fixes the slow-down of VM running with pci-passthrough, since some MTRR >>> >> range changed from MTRR_TYPE_WRBACK to MTRR_TYPE_UNCACHABLE. >>> >> >>> >> Fixes: fa61213746a ("KVM: MTRR: simplify kvm_mtrr_get_guest_memory_type") >>> >> Bugzilla: (https://bugzilla.kernel.org/show_bug.cgi?id=107561) >>> >> >>> >> Signed-off-by: Alexis Dambricourt >>> >> --- >>> >> arch/x86/kvm/mtrr.c | 2 +- >>> >> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >> >>> >> diff --git a/arch/x86/kvm/mtrr.c b/arch/x86/kvm/mtrr.c >>> >> index 9e8bf13..adc54e1 100644 >>> >> --- a/arch/x86/kvm/mtrr.c >>> >> +++ b/arch/x86/kvm/mtrr.c >>> >> @@ -267,7 +267,7 @@ static int fixed_mtrr_addr_to_seg(u64 addr) >>> >> >>> >> for (seg = 0; seg < seg_num; seg++) { >>> >> mtrr_seg = &fixed_seg_table[seg]; >>> >> - if (mtrr_seg->start >= addr && addr < mtrr_seg->end) >>> >> + if (mtrr_seg->start <= addr && addr < mtrr_seg->end)