]> git.proxmox.com Git - pve-kernel-jessie.git/blame - 0001-mttr.patch
update DRBD to 9.0.1
[pve-kernel-jessie.git] / 0001-mttr.patch
CommitLineData
2b10ecdc
AD
1From a7f2d7865720ff13d5b0f2a3bb1fd80dc3d7a73f Mon Sep 17 00:00:00 2001
2From: Alexis Dambricourt <alexis.dambricourt@gmail.com>
3Date: Mon, 14 Dec 2015 15:39:34 +0100
4Subject: KVM: MTRR: fix fixed MTRR segment look up
5
6This fixes the slow-down of VM running with pci-passthrough, since some MTRR
7range changed from MTRR_TYPE_WRBACK to MTRR_TYPE_UNCACHABLE. Memory in the
80K-640K range was incorrectly treated as uncacheable.
9
10Fixes: f7bfb57b3e89ff89c0da9f93dedab89f68d6ca27
11Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=107561
12Cc: qemu-stable@nongnu.org
13Signed-off-by: Alexis Dambricourt <alexis.dambricourt@gmail.com>
14[Use correct BZ for "Fixes" annotation. - Paolo]
15Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
16---
17 arch/x86/kvm/mtrr.c | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/arch/x86/kvm/mtrr.c b/arch/x86/kvm/mtrr.c
21index 9e8bf13..adc54e1 100644
22--- a/arch/x86/kvm/mtrr.c
23+++ b/arch/x86/kvm/mtrr.c
24@@ -267,7 +267,7 @@ static int fixed_mtrr_addr_to_seg(u64 addr)
25
26 for (seg = 0; seg < seg_num; seg++) {
27 mtrr_seg = &fixed_seg_table[seg];
28- if (mtrr_seg->start >= addr && addr < mtrr_seg->end)
29+ if (mtrr_seg->start <= addr && addr < mtrr_seg->end)
30 return seg;
31 }
32
33--
34cgit v0.11.2