From patchwork Wed Dec 2 13:46:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glauber Costa X-Patchwork-Id: 40066 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 2782DB7BE3 for ; Thu, 3 Dec 2009 03:27:11 +1100 (EST) Received: from localhost ([127.0.0.1]:59961 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFs2m-0003Sh-9B for incoming@patchwork.ozlabs.org; Wed, 02 Dec 2009 11:27:08 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NFpXQ-0004gJ-Hp for qemu-devel@nongnu.org; Wed, 02 Dec 2009 08:46:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NFpXI-0004VN-OY for qemu-devel@nongnu.org; Wed, 02 Dec 2009 08:46:33 -0500 Received: from [199.232.76.173] (port=58098 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFpXH-0004UW-OS for qemu-devel@nongnu.org; Wed, 02 Dec 2009 08:46:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:62700) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NFpXH-00042G-Ax for qemu-devel@nongnu.org; Wed, 02 Dec 2009 08:46:27 -0500 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nB2DkQoY008188 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 2 Dec 2009 08:46:26 -0500 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nB2DkGtZ025779; Wed, 2 Dec 2009 08:46:25 -0500 From: Glauber Costa To: qemu-devel@nongnu.org Date: Wed, 2 Dec 2009 11:46:12 -0200 Message-Id: <1259761575-3953-7-git-send-email-glommer@redhat.com> In-Reply-To: <1259761575-3953-6-git-send-email-glommer@redhat.com> References: <1259761575-3953-1-git-send-email-glommer@redhat.com> <1259761575-3953-2-git-send-email-glommer@redhat.com> <1259761575-3953-3-git-send-email-glommer@redhat.com> <1259761575-3953-4-git-send-email-glommer@redhat.com> <1259761575-3953-5-git-send-email-glommer@redhat.com> <1259761575-3953-6-git-send-email-glommer@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: aliguori@us.ibm.com, avi@redhat.com Subject: [Qemu-devel] [PATCH 6/9] export kvm_put_mp_state 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 We'll use it from inside the in-kernel apic chip, so get it into a header file. Signed-off-by: Glauber Costa --- target-i386/cpu.h | 4 ++++ target-i386/kvm.c | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 7c4fa47..1ebf80e 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -921,4 +921,8 @@ void apic_init_reset(CPUState *env); void apic_sipi(CPUState *env); void do_cpu_init(CPUState *env); void do_cpu_sipi(CPUState *env); + +/* KVM hooks */ +int kvm_put_mp_state(CPUState *env); + #endif /* CPU_I386_H */ diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 78fc941..4eb61f1 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -687,7 +687,7 @@ static int kvm_get_msrs(CPUState *env) return 0; } -static int kvm_put_mp_state(CPUState *env) +int kvm_put_mp_state(CPUState *env) { struct kvm_mp_state mp_state = { .mp_state = env->mp_state };