diff mbox

[Natty,SRU] KVM: fix kvmclock regression due to missing clock update

Message ID 1313006524-20742-1-git-send-email-stefan.bader@canonical.com
State New
Headers show

Commit Message

Stefan Bader Aug. 10, 2011, 8:02 p.m. UTC
SRU Justification:

Impact: An upstream change in the kvm code in 2.6.37 causes regressions
running 32bit guest under 11.04 (Natty) KVM.

Fix: Cherry-picking a single upstream patch (which went into 2.6.39)
fixes the issue.

Testcase: Booting 32bit rhel and centos 5.(5|6) guests under Natty used
to hang, but has been verified to succeed with a test kernel including
the upstream patch.

Note: Submission to upstream stable is not considered as there are no
longterm kernels between 2.6.37 and 2.6.39 which are supported.

-Stefan

From 626a3425d512ad12effebf90ba6aa0c4c4052118 Mon Sep 17 00:00:00 2001
From: Nikola Ciprich <extmaillist@linuxbox.cz>
Date: Wed, 9 Mar 2011 23:36:51 +0100
Subject: [PATCH] KVM: fix kvmclock regression due to missing clock update

commit 387b9f97750444728962b236987fbe8ee8cc4f8c moved kvm_request_guest_time_update(vcpu),
breaking 32bit SMP guests using kvm-clock. Fix this by moving (new) clock update function
to proper place.

Signed-off-by: Nikola Ciprich <nikola.ciprich@linuxbox.cz>
Acked-by: Zachary Amsden <zamsden@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>

BugLink: http://bugs.launchpad.net/bugs/795717

(cherry-picked from commit 1aa8ceef0312a6aae7dd863a120a55f1637b361d upstream)
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
 arch/x86/kvm/x86.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Tim Gardner Aug. 11, 2011, 1:06 p.m. UTC | #1
On 08/10/2011 02:02 PM, Stefan Bader wrote:
> SRU Justification:
>
> Impact: An upstream change in the kvm code in 2.6.37 causes regressions
> running 32bit guest under 11.04 (Natty) KVM.
>
> Fix: Cherry-picking a single upstream patch (which went into 2.6.39)
> fixes the issue.
>
> Testcase: Booting 32bit rhel and centos 5.(5|6) guests under Natty used
> to hang, but has been verified to succeed with a test kernel including
> the upstream patch.
>
> Note: Submission to upstream stable is not considered as there are no
> longterm kernels between 2.6.37 and 2.6.39 which are supported.
>
> -Stefan
>
>  From 626a3425d512ad12effebf90ba6aa0c4c4052118 Mon Sep 17 00:00:00 2001
> From: Nikola Ciprich<extmaillist@linuxbox.cz>
> Date: Wed, 9 Mar 2011 23:36:51 +0100
> Subject: [PATCH] KVM: fix kvmclock regression due to missing clock update
>
> commit 387b9f97750444728962b236987fbe8ee8cc4f8c moved kvm_request_guest_time_update(vcpu),
> breaking 32bit SMP guests using kvm-clock. Fix this by moving (new) clock update function
> to proper place.
>
> Signed-off-by: Nikola Ciprich<nikola.ciprich@linuxbox.cz>
> Acked-by: Zachary Amsden<zamsden@redhat.com>
> Signed-off-by: Avi Kivity<avi@redhat.com>
>
> BugLink: http://bugs.launchpad.net/bugs/795717
>
> (cherry-picked from commit 1aa8ceef0312a6aae7dd863a120a55f1637b361d upstream)
> Signed-off-by: Stefan Bader<stefan.bader@canonical.com>
> ---
>   arch/x86/kvm/x86.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 980317a..0556e05 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -2100,8 +2100,8 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
>   		if (check_tsc_unstable()) {
>   			kvm_x86_ops->adjust_tsc_offset(vcpu, -tsc_delta);
>   			vcpu->arch.tsc_catchup = 1;
> -			kvm_make_request(KVM_REQ_CLOCK_UPDATE, vcpu);
>   		}
> +		kvm_make_request(KVM_REQ_CLOCK_UPDATE, vcpu);
>   		if (vcpu->cpu != cpu)
>   			kvm_migrate_timers(vcpu);
>   		vcpu->cpu = cpu;

Acked-by: Tim Gardner <tim.gardner@canonical.com>
Andy Whitcroft Aug. 11, 2011, 1:39 p.m. UTC | #2
On Wed, Aug 10, 2011 at 03:02:04PM -0500, Stefan Bader wrote:
> SRU Justification:
> 
> Impact: An upstream change in the kvm code in 2.6.37 causes regressions
> running 32bit guest under 11.04 (Natty) KVM.
> 
> Fix: Cherry-picking a single upstream patch (which went into 2.6.39)
> fixes the issue.
> 
> Testcase: Booting 32bit rhel and centos 5.(5|6) guests under Natty used
> to hang, but has been verified to succeed with a test kernel including
> the upstream patch.
> 
> Note: Submission to upstream stable is not considered as there are no
> longterm kernels between 2.6.37 and 2.6.39 which are supported.
> 
> -Stefan
> 
> From 626a3425d512ad12effebf90ba6aa0c4c4052118 Mon Sep 17 00:00:00 2001
> From: Nikola Ciprich <extmaillist@linuxbox.cz>
> Date: Wed, 9 Mar 2011 23:36:51 +0100
> Subject: [PATCH] KVM: fix kvmclock regression due to missing clock update
> 
> commit 387b9f97750444728962b236987fbe8ee8cc4f8c moved kvm_request_guest_time_update(vcpu),
> breaking 32bit SMP guests using kvm-clock. Fix this by moving (new) clock update function
> to proper place.
> 
> Signed-off-by: Nikola Ciprich <nikola.ciprich@linuxbox.cz>
> Acked-by: Zachary Amsden <zamsden@redhat.com>
> Signed-off-by: Avi Kivity <avi@redhat.com>
> 
> BugLink: http://bugs.launchpad.net/bugs/795717
> 
> (cherry-picked from commit 1aa8ceef0312a6aae7dd863a120a55f1637b361d upstream)
> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
> ---
>  arch/x86/kvm/x86.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 980317a..0556e05 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -2100,8 +2100,8 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
>  		if (check_tsc_unstable()) {
>  			kvm_x86_ops->adjust_tsc_offset(vcpu, -tsc_delta);
>  			vcpu->arch.tsc_catchup = 1;
> -			kvm_make_request(KVM_REQ_CLOCK_UPDATE, vcpu);
>  		}
> +		kvm_make_request(KVM_REQ_CLOCK_UPDATE, vcpu);
>  		if (vcpu->cpu != cpu)
>  			kvm_migrate_timers(vcpu);
>  		vcpu->cpu = cpu;

Looks reasonable to me.

Acked-by: Andy Whitcroft <apw@canonical.com>

-apw
Andy Whitcroft Aug. 11, 2011, 1:44 p.m. UTC | #3
Applied to Natty.

-apw
diff mbox

Patch

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 980317a..0556e05 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2100,8 +2100,8 @@  void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
 		if (check_tsc_unstable()) {
 			kvm_x86_ops->adjust_tsc_offset(vcpu, -tsc_delta);
 			vcpu->arch.tsc_catchup = 1;
-			kvm_make_request(KVM_REQ_CLOCK_UPDATE, vcpu);
 		}
+		kvm_make_request(KVM_REQ_CLOCK_UPDATE, vcpu);
 		if (vcpu->cpu != cpu)
 			kvm_migrate_timers(vcpu);
 		vcpu->cpu = cpu;