From patchwork Sun Jun 6 16:50:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Lieven X-Patchwork-Id: 104597 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o56GpgFd006054 for ; Sun, 6 Jun 2010 16:51:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753653Ab0FFQvk (ORCPT ); Sun, 6 Jun 2010 12:51:40 -0400 Received: from zion.dlh.net ([91.198.192.1]:49264 "EHLO mail.dlh.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753343Ab0FFQvj convert rfc822-to-8bit (ORCPT ); Sun, 6 Jun 2010 12:51:39 -0400 Received: from [82.141.21.121] (helo=peter-lievens-macbook-pro.fritz.box) by mail.dlh.net with asmtp (Exim 3.36 #24 (Debian)) id 1OLJ3p-0003sh-00; Sun, 06 Jun 2010 18:50:57 +0200 Subject: Re: porting fixes regarding kvm-clock and lost irqs to stable qemu-kvm 0.12.4 Mime-Version: 1.0 (Apple Message framework v1078) From: Peter Lieven In-Reply-To: <4C0BB66E.5090007@debian.org> Date: Sun, 6 Jun 2010 18:50:56 +0200 Cc: Marcelo Tosatti , Avi Kivity , Anthony Liguori , "kvm@vger.kernel.org" Message-Id: <2AD2A9A0-A3E1-4AA5-A473-FFDD2F0DDDBF@dlh.net> References: <4C06751A.4080507@dlh.net> <20100604153102.GB11087@amt.cnet> <17DE5732-EDBF-4C7B-9C45-6BF66F200911@dlh.net> <4C09A9BF.8090107@debian.org> <7A6F5B41-DAE6-4D4E-8D3A-28147BB5BE78@dlh.net> <4C0BB66E.5090007@debian.org> To: Faidon Liambotis X-Mailer: Apple Mail (2.1078) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sun, 06 Jun 2010 16:51:42 +0000 (UTC) diff -ur qemu-kvm-0.12.4.orig/qemu-kvm.c qemu-kvm-0.12.4/qemu-kvm.c --- qemu-kvm-0.12.4.orig/qemu-kvm.c 2010-05-09 13:05:19.000000000 +0200 +++ qemu-kvm-0.12.4/qemu-kvm.c 2010-06-06 16:58:12.000000000 +0200 @@ -54,7 +54,7 @@ int kvm_pit = 1; int kvm_pit_reinject = 1; int kvm_nested = 0; - +int kvm_clock = 1; KVMState *kvm_state; kvm_context_t kvm_context; diff -ur qemu-kvm-0.12.4.orig/qemu-kvm.h qemu-kvm-0.12.4/qemu-kvm.h --- qemu-kvm-0.12.4.orig/qemu-kvm.h 2010-05-09 13:05:19.000000000 +0200 +++ qemu-kvm-0.12.4/qemu-kvm.h 2010-06-06 17:04:02.000000000 +0200 @@ -1035,6 +1035,7 @@ extern int kvm_pit; extern int kvm_pit_reinject; extern int kvm_nested; +extern int kvm_clock; extern kvm_context_t kvm_context; struct ioperm_data { diff -ur qemu-kvm-0.12.4.orig/qemu-kvm-x86.c qemu-kvm-0.12.4/qemu-kvm-x86.c --- qemu-kvm-0.12.4.orig/qemu-kvm-x86.c 2010-05-09 13:05:19.000000000 +0200 +++ qemu-kvm-0.12.4/qemu-kvm-x86.c 2010-06-06 16:46:08.000000000 +0200 @@ -1259,6 +1259,7 @@ int i, features = 0; for (i = 0; i < ARRAY_SIZE(para_features)-1; i++) { + if (para_features[i].cap == KVM_CAP_CLOCKSOURCE && !kvm_clock) continue; if (kvm_check_extension(kvm_state, para_features[i].cap)) features |= (1 << para_features[i].feature); } diff -ur qemu-kvm-0.12.4.orig/qemu-options.hx qemu-kvm-0.12.4/qemu-options.hx --- qemu-kvm-0.12.4.orig/qemu-options.hx 2010-05-09 13:05:19.000000000 +0200 +++ qemu-kvm-0.12.4/qemu-options.hx 2010-06-06 16:38:46.000000000 +0200 @@ -1959,6 +1959,9 @@ "-no-kvm-pit disable KVM kernel mode PIT\n") DEF("no-kvm-pit-reinjection", 0, QEMU_OPTION_no_kvm_pit_reinjection, "-no-kvm-pit-reinjection disable KVM kernel mode PIT interrupt reinjection\n") +DEF("no-kvm-clock", 0, QEMU_OPTION_no_kvm_clock, + "-no-kvm-clock disable KVM pvclock\n") + #if defined(TARGET_I386) || defined(TARGET_X86_64) || defined(TARGET_IA64) || defined(__linux__) DEF("pcidevice", HAS_ARG, QEMU_OPTION_pcidevice, "-pcidevice host=bus:dev.func[,dma=none][,name=string]\n" diff -ur qemu-kvm-0.12.4.orig/vl.c qemu-kvm-0.12.4/vl.c --- qemu-kvm-0.12.4.orig/vl.c 2010-05-09 13:05:19.000000000 +0200 +++ qemu-kvm-0.12.4/vl.c 2010-06-06 17:05:53.000000000 +0200 @@ -5530,6 +5530,10 @@ kvm_pit_reinject = 0; break; } + case QEMU_OPTION_no_kvm_clock: { + kvm_clock = 0; + break; + } case QEMU_OPTION_enable_nesting: { kvm_nested = 1; break;