From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: [PATCH] KVM: x86: Clear flags field on return from KVM_GET_CLOCK Date: Mon, 02 Nov 2009 16:41:54 +0100 Message-ID: <4AEEFDC2.4010808@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: kvm , Glauber Costa To: Avi Kivity , Marcelo Tosatti Return-path: Received: from david.siemens.de ([192.35.17.14]:22174 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755379AbZKBPmD (ORCPT ); Mon, 2 Nov 2009 10:42:03 -0500 Sender: kvm-owner@vger.kernel.org List-ID: This field is supposed to indicate the availability of additional fields one day. There are none yet, so clear it - and drop the bogus check, too. Signed-off-by: Jan Kiszka --- This alone fixes the savevm/loadvm issue around kvmclock reported today. arch/x86/kvm/x86.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 1f68798..dd229b6 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -2577,14 +2577,11 @@ long kvm_arch_vm_ioctl(struct file *filp, ktime_get_ts(&now); now_ns = timespec_to_ns(&now); user_ns.clock = kvm->arch.kvmclock_offset + now_ns; + user_ns.flags = 0; if (copy_to_user(argp, &user_ns, sizeof(user_ns))) r = -EFAULT; - r = -EINVAL; - if (user_ns.flags) - goto out; - break; }