All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Revert "KVM: x86: fix missed hardware breakpoints"
@ 2016-09-15 21:52 Paolo Bonzini
       [not found] ` <20160918004441.GA16340@sasha-lappy>
  2016-09-20 12:10 ` Patch "Revert "KVM: x86: fix missed hardware breakpoints"" has been added to the 4.4-stable tree gregkh
  0 siblings, 2 replies; 3+ messages in thread
From: Paolo Bonzini @ 2016-09-15 21:52 UTC (permalink / raw)
  To: stable; +Cc: matt, Paolo Bonzini

[fix for patches applied in the wrong order to 4.1.y and 4.4.y
 ---
 the change is part of 70e4da7a8ff62f2775337b705f45c804bb450454, which
 is already in stable kernels 4.1.y to 4.4.y.  this part of the fix
 however was later undone, so remove the line again]

The following patches were applied in the wrong order in -stable. This
is the order as they appear in Linus' tree,

 [0] commit 4e422bdd2f84 ("KVM: x86: fix missed hardware breakpoints")
 [1] commit 172b2386ed16 ("KVM: x86: fix missed hardware breakpoints")
 [2] commit 70e4da7a8ff6 ("KVM: x86: fix root cause for missed hardware breakpoints")

but this is the order for linux-4.4.y

 [1] commit fc90441e728a ("KVM: x86: fix missed hardware breakpoints")
 [2] commit 25e8618619a5 ("KVM: x86: fix root cause for missed hardware breakpoints")
 [0] commit 0f6e5e26e68f ("KVM: x86: fix missed hardware breakpoints")

The upshot is that KVM_DEBUGREG_RELOAD is always set when returning
from kvm_arch_vcpu_load() in stable, but not in Linus' tree.

This happened because [0] and [1] are the same patch.  [0] and [1] come from two
different merges, and the later merge is trivially resolved; when [2]
is applied it reverts both of them.  Instead, when using the [1][2][0]
order, patches applies normally but "KVM: x86: fix missed hardware
breakpoints" is present in the final tree.

Cc: stable kernels <stable@vger.kernel.org>     # 4.1, 4.4
Reported-by: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 arch/x86/kvm/x86.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 4244c2baf57d..f4891f2ece23 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2752,7 +2752,6 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
 	}
 
 	kvm_make_request(KVM_REQ_STEAL_UPDATE, vcpu);
-	vcpu->arch.switch_db_regs |= KVM_DEBUGREG_RELOAD;
 }
 
 void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Revert "KVM: x86: fix missed hardware breakpoints"
       [not found] ` <20160918004441.GA16340@sasha-lappy>
@ 2016-09-18 12:38   ` Paolo Bonzini
  0 siblings, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2016-09-18 12:38 UTC (permalink / raw)
  To: Alexander Levin; +Cc: stable, matt


> > The upshot is that KVM_DEBUGREG_RELOAD is always set when returning
> > from kvm_arch_vcpu_load() in stable, but not in Linus' tree.
> > 
> > This happened because [0] and [1] are the same patch.  [0] and [1] come
> > from two
> > different merges, and the later merge is trivially resolved; when [2]
> > is applied it reverts both of them.  Instead, when using the [1][2][0]
> > order, patches applies normally but "KVM: x86: fix missed hardware
> > breakpoints" is present in the final tree.
> > 
> > Cc: stable kernels <stable@vger.kernel.org>     # 4.1, 4.4
> > Reported-by: Matt Fleming <matt@codeblueprint.co.uk>
> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> 
> Hey Paolo,
> 
> Could you please confirm it's indeed a problem in 4.1? The current 4.1 tree
> seems to be "correct" (the current code doesn't have the line that this
> patch deletes).

Hi Sasha,

yes, 4.1 is good.  It's limited to 4.4.

Paolo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Patch "Revert "KVM: x86: fix missed hardware breakpoints"" has been added to the 4.4-stable tree
  2016-09-15 21:52 [PATCH] Revert "KVM: x86: fix missed hardware breakpoints" Paolo Bonzini
       [not found] ` <20160918004441.GA16340@sasha-lappy>
@ 2016-09-20 12:10 ` gregkh
  1 sibling, 0 replies; 3+ messages in thread
From: gregkh @ 2016-09-20 12:10 UTC (permalink / raw)
  To: pbonzini, gregkh, matt; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    Revert "KVM: x86: fix missed hardware breakpoints"

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     revert-kvm-x86-fix-missed-hardware-breakpoints.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From pbonzini@redhat.com  Tue Sep 20 14:08:11 2016
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Thu, 15 Sep 2016 23:52:43 +0200
Subject: Revert "KVM: x86: fix missed hardware breakpoints"
To: stable@vger.kernel.org
Cc: matt@codeblueprint.co.uk, Paolo Bonzini <pbonzini@redhat.com>
Message-ID: <1473976363-22653-1-git-send-email-pbonzini@redhat.com>

From: Paolo Bonzini <pbonzini@redhat.com>

[the change is part of 70e4da7a8ff62f2775337b705f45c804bb450454, which
is already in stable kernels 4.1.y to 4.4.y.  this part of the fix
however was later undone, so remove the line again]

The following patches were applied in the wrong order in -stable. This
is the order as they appear in Linus' tree,

 [0] commit 4e422bdd2f84 ("KVM: x86: fix missed hardware breakpoints")
 [1] commit 172b2386ed16 ("KVM: x86: fix missed hardware breakpoints")
 [2] commit 70e4da7a8ff6 ("KVM: x86: fix root cause for missed hardware breakpoints")

but this is the order for linux-4.4.y

 [1] commit fc90441e728a ("KVM: x86: fix missed hardware breakpoints")
 [2] commit 25e8618619a5 ("KVM: x86: fix root cause for missed hardware breakpoints")
 [0] commit 0f6e5e26e68f ("KVM: x86: fix missed hardware breakpoints")

The upshot is that KVM_DEBUGREG_RELOAD is always set when returning
from kvm_arch_vcpu_load() in stable, but not in Linus' tree.

This happened because [0] and [1] are the same patch.  [0] and [1] come from two
different merges, and the later merge is trivially resolved; when [2]
is applied it reverts both of them.  Instead, when using the [1][2][0]
order, patches applies normally but "KVM: x86: fix missed hardware
breakpoints" is present in the final tree.

Reported-by: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/kvm/x86.c |    1 -
 1 file changed, 1 deletion(-)

--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2735,7 +2735,6 @@ void kvm_arch_vcpu_load(struct kvm_vcpu
 	}
 
 	kvm_make_request(KVM_REQ_STEAL_UPDATE, vcpu);
-	vcpu->arch.switch_db_regs |= KVM_DEBUGREG_RELOAD;
 }
 
 void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)


Patches currently in stable-queue which might be from pbonzini@redhat.com are

queue-4.4/mips-kvm-check-for-pfn-noslot-case.patch
queue-4.4/revert-kvm-x86-fix-missed-hardware-breakpoints.patch

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-20 12:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-15 21:52 [PATCH] Revert "KVM: x86: fix missed hardware breakpoints" Paolo Bonzini
     [not found] ` <20160918004441.GA16340@sasha-lappy>
2016-09-18 12:38   ` Paolo Bonzini
2016-09-20 12:10 ` Patch "Revert "KVM: x86: fix missed hardware breakpoints"" has been added to the 4.4-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.