From patchwork Wed Dec 29 19:09:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 76935 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 93E47B6F2B for ; Thu, 30 Dec 2010 06:13:07 +1100 (EST) Received: from localhost ([127.0.0.1]:39691 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PY1SK-0002pj-7I for incoming@patchwork.ozlabs.org; Wed, 29 Dec 2010 14:13:04 -0500 Received: from [140.186.70.92] (port=45350 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PY1PU-0001et-VH for qemu-devel@nongnu.org; Wed, 29 Dec 2010 14:10:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PY1PT-0004en-0N for qemu-devel@nongnu.org; Wed, 29 Dec 2010 14:10:08 -0500 Received: from fmmailgate01.web.de ([217.72.192.221]:60742) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PY1PS-0004eW-Qj for qemu-devel@nongnu.org; Wed, 29 Dec 2010 14:10:06 -0500 Received: from smtp04.web.de ( [172.20.0.225]) by fmmailgate01.web.de (Postfix) with ESMTP id 3EF09184B6679; Wed, 29 Dec 2010 20:10:06 +0100 (CET) Received: from [178.3.144.157] (helo=localhost.localdomain) by smtp04.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #2) id 1PY1PS-0004GU-00; Wed, 29 Dec 2010 20:10:06 +0100 From: Jan Kiszka To: Avi Kivity , Marcelo Tosatti Date: Wed, 29 Dec 2010 20:09:57 +0100 Message-Id: X-Mailer: git-send-email 1.7.1 In-Reply-To: References: In-Reply-To: References: X-Sender: jan.kiszka@web.de X-Provags-ID: V01U2FsdGVkX1/ifUBKwtD9AuuQ3dqXKAPaB86y8XEdN84RZa1i uuJu9p3Xrur9teRiIpPD/GNZlr4En55EXsu3ZqBuLEklH3v8Va azwa/hbhU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 Cc: Jan Kiszka , qemu-devel@nongnu.org, kvm@vger.kernel.org Subject: [Qemu-devel] [PATCH 6/6] kvm: x86: Prepare kvm_get_mp_state for in-kernel irqchip X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Jan Kiszka This code path will not yet be taken as we still lack in-kernel irqchip support. But qemu-kvm can already make use of it and drop its own mp_state access services. Signed-off-by: Jan Kiszka --- target-i386/kvm.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 684430f..30aa51c 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -1198,6 +1198,9 @@ static int kvm_get_mp_state(CPUState *env) return ret; } env->mp_state = mp_state.mp_state; + if (kvm_irqchip_in_kernel()) { + env->halted = (mp_state.mp_state == KVM_MP_STATE_HALTED); + } return 0; }