From patchwork Wed Oct 3 10:52:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 188744 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F33352C00B5 for ; Wed, 3 Oct 2012 20:55:50 +1000 (EST) Received: from localhost ([::1]:38750 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJMcH-0001qo-7M for incoming@patchwork.ozlabs.org; Wed, 03 Oct 2012 06:55:49 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJMc9-0001qa-Eq for qemu-devel@nongnu.org; Wed, 03 Oct 2012 06:55:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJMc6-0004sO-Kh for qemu-devel@nongnu.org; Wed, 03 Oct 2012 06:55:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13392) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJMc6-0004rj-Bc for qemu-devel@nongnu.org; Wed, 03 Oct 2012 06:55:38 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q93AtaqK009893 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 3 Oct 2012 06:55:36 -0400 Received: from amt.cnet (vpn1-7-147.gru2.redhat.com [10.97.7.147]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q93AtZNK026020; Wed, 3 Oct 2012 06:55:36 -0400 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 28B48652033; Wed, 3 Oct 2012 07:55:27 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.5/8.14.5/Submit) id q93AtRVl027461; Wed, 3 Oct 2012 07:55:27 -0300 Message-Id: <20121003105509.528026359@amt.cnet> User-Agent: quilt/0.48-1 Date: Wed, 03 Oct 2012 07:52:59 -0300 From: Marcelo Tosatti To: qemu-devel@nongnu.org, Gerd Hoffmann References: <20121003105255.972669952@amt.cnet> Content-Disposition: inline; filename=qemukvm-nokvmpit-reinjection X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Anthony Liguori , Marcelo Tosatti , kvm@vger.kernel.org Subject: [Qemu-devel] [patch 4/6] Use global properties to emulate -no-kvm-pit-reinjection X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Commit 80019541e9c13fab476bee35edcef3e11646222c from qemu-kvm.git. From: Jan Kiszka Use global properties to emulate -no-kvm-pit-reinjection Signed-off-by: Marcelo Tosatti Reviewed-by: Anthony Liguori Index: qemu-compat-kvm/vl.c =================================================================== --- qemu-compat-kvm.orig/vl.c +++ qemu-compat-kvm/vl.c @@ -3071,6 +3071,21 @@ int main(int argc, char **argv, char **e "separately.\n"); break; } + case QEMU_OPTION_no_kvm_pit_reinjection: { + static GlobalProperty kvm_pit_lost_tick_policy[] = { + { + .driver = "kvm-pit", + .property = "lost_tick_policy", + .value = "discard", + }, + { /* end of list */ } + }; + + fprintf(stderr, "Warning: option deprecated, use " + "lost_tick_policy property of kvm-pit instead.\n"); + qdev_prop_register_global_list(kvm_pit_lost_tick_policy); + break; + } case QEMU_OPTION_usb: usb_enabled = 1; break; Index: qemu-compat-kvm/qemu-options.hx =================================================================== --- qemu-compat-kvm.orig/qemu-options.hx +++ qemu-compat-kvm/qemu-options.hx @@ -2844,7 +2844,10 @@ DEF("no-kvm-irqchip", 0, QEMU_OPTION_no_ DEF("no-kvm-pit", 0, QEMU_OPTION_no_kvm_pit, "-no-kvm-pit disable KVM kernel mode PIT\n", QEMU_ARCH_I386) - +DEF("no-kvm-pit-reinjection", 0, QEMU_OPTION_no_kvm_pit_reinjection, + "-no-kvm-pit-reinjection\n" + " disable KVM kernel mode PIT interrupt reinjection\n", + QEMU_ARCH_I386) HXCOMM This is the last statement. Insert new options before this line! STEXI