[<prev] [next>] [day] [month] [year] [list]
Message-ID: <568E38E7.9070502@redhat.com>
Date: Thu, 7 Jan 2016 11:07:35 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Nicholas Krause <xerofoify@...il.com>, gleb@...nel.org
Cc: x86@...nel.org, kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND] kvm:x86:Make sure kvm_write_guest successes for
first call in kvm_write_wall_clock
On 30/12/2015 19:08, Nicholas Krause wrote:
> This makes sure that kvm_write_guest successes for the first call
> in order to make sure that the wall clock is successfully written
> to the host system before being calucated as required by the
> guest system.
>
> Signed-off-by: Nicholas Krause <xerofoify@...il.com>
> ---
> arch/x86/kvm/x86.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index eed3228..7551f30 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -1167,7 +1167,8 @@ static void kvm_write_wall_clock(struct kvm *kvm, gpa_t wall_clock)
>
> ++version;
>
> - kvm_write_guest(kvm, wall_clock, &version, sizeof(version));
> + if (kvm_write_guest(kvm, wall_clock, &version, sizeof(version)))
> + return;
>
> /*
> * The guest calculates current wall clock time by adding
>
Applied, thanks.
Paolo
--
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