lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 10 Oct 2009 15:40:05 +0200
From:	"Stefan Lippers-Hollmann" <s.L-H@....de>
To:	gregkh@...e.de
Cc:	linux-kernel@...r.kernel.org, joerg.roedel@....com,
	mtosatti@...hat.com, stable@...nel.org
Subject: Re: patch kvm-svm-fix-tsc-offset-adjustment-when-running-nested.patch added to 2.6.31-stable tree

Hi

On Saturday 10 October 2009, gregkh@...e.de wrote:
> This is a note to let you know that we have just queued up the patch titled
> 
>     Subject: KVM: SVM: Fix tsc offset adjustment when running nested
> 
> to the 2.6.31-stable tree.  Its filename is
> 
>     kvm-svm-fix-tsc-offset-adjustment-when-running-nested.patch

This patch breaks compilation of 2.6.31.4-rc1 and 2.6.31.4-rc2, as it 
seems to depend on several prior optimisations to kvm's/ svm's nested 
behaviour:

[...]
  CC [M]  arch/x86/kvm/svm.o
arch/x86/kvm/svm.c: In function 'svm_vcpu_load':
arch/x86/kvm/svm.c:713: error: 'struct vcpu_svm' has no member named 'nested'
make[2]: *** [arch/x86/kvm/svm.o] Error 1
make[1]: *** [arch/x86/kvm] Error 2
make: *** [arch/x86] Error 2

Regards
	Stefan Lippers-Hollmann

-- 
> A git repo of this tree can be found at 
>     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
> 
> 
> From 77b1ab1732feb5e3dcbaf31d2f7547c5229f5f3a Mon Sep 17 00:00:00 2001
> From: Joerg Roedel <joerg.roedel@....com>
> Date: Wed, 16 Sep 2009 15:24:17 +0200
> Subject: KVM: SVM: Fix tsc offset adjustment when running nested
> 
> From: Joerg Roedel <joerg.roedel@....com>
> 
> commit 77b1ab1732feb5e3dcbaf31d2f7547c5229f5f3a upstream.
> 
> When svm_vcpu_load is called while the vcpu is running in
> guest mode the tsc adjustment made there is lost on the next
> emulated #vmexit. This causes the tsc running backwards in
> the guest. This patch fixes the issue by also adjusting the
> tsc_offset in the emulated hsave area so that it will not
> get lost.
> 
> Signed-off-by: Joerg Roedel <joerg.roedel@....com>
> Signed-off-by: Marcelo Tosatti <mtosatti@...hat.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
> 
> ---
>  arch/x86/kvm/svm.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> --- a/arch/x86/kvm/svm.c
> +++ b/arch/x86/kvm/svm.c
> @@ -709,6 +709,8 @@ static void svm_vcpu_load(struct kvm_vcp
>  		rdtscll(tsc_this);
>  		delta = vcpu->arch.host_tsc - tsc_this;
>  		svm->vmcb->control.tsc_offset += delta;
> +		if (is_nested(svm))
> +			svm->nested.hsave->control.tsc_offset += delta;
>  		vcpu->cpu = cpu;
>  		kvm_migrate_timers(vcpu);
>  		svm->asid_generation = 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ