kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH RESEND] kvm:x86:Make sure kvm_write_guest successes for first call in kvm_write_wall_clock
       [not found] <1451498926-29395-1-git-send-email-xerofoify@gmail.com>
@ 2016-01-07 10:07 ` Paolo Bonzini
  0 siblings, 0 replies; only message in thread
From: Paolo Bonzini @ 2016-01-07 10:07 UTC (permalink / raw)
  To: Nicholas Krause, gleb; +Cc: x86, kvm, linux-kernel



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@gmail.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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-01-07 10:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1451498926-29395-1-git-send-email-xerofoify@gmail.com>
2016-01-07 10:07 ` [PATCH RESEND] kvm:x86:Make sure kvm_write_guest successes for first call in kvm_write_wall_clock Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).