From patchwork Wed Mar 11 19:51:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 5988531 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8D2129F399 for ; Wed, 11 Mar 2015 19:51:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AB50520374 for ; Wed, 11 Mar 2015 19:51:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AF0AC20373 for ; Wed, 11 Mar 2015 19:51:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752211AbbCKTvh (ORCPT ); Wed, 11 Mar 2015 15:51:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57139 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751687AbbCKTvg (ORCPT ); Wed, 11 Mar 2015 15:51:36 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2BJp8tA005026 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 11 Mar 2015 15:51:08 -0400 Received: from redhat.com (ovpn-116-109.ams2.redhat.com [10.36.116.109]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id t2BJp2gi027585; Wed, 11 Mar 2015 15:51:03 -0400 Date: Wed, 11 Mar 2015 20:51:02 +0100 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Marcel Apfelbaum , Paolo Bonzini , Marcelo Tosatti , Richard Henderson , James Hogan , Aurelien Jarno , Leon Alrae , Alexander Graf , Christian Borntraeger , Cornelia Huck , kvm@vger.kernel.org, qemu-ppc@nongnu.org Subject: [PULL 09/25] kvm: add machine state to kvm_arch_init Message-ID: <20150311205102-mutt-send-email-mst@redhat.com> References: <1426096767-30494-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1426096767-30494-1-git-send-email-mst@redhat.com> X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Marcel Apfelbaum Needed to query machine's properties. Signed-off-by: Marcel Apfelbaum Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Paolo Bonzini --- include/sysemu/kvm.h | 2 +- kvm-all.c | 2 +- target-arm/kvm.c | 2 +- target-i386/kvm.c | 2 +- target-mips/kvm.c | 2 +- target-ppc/kvm.c | 2 +- target-s390x/kvm.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 30cb84d..3792463 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -259,7 +259,7 @@ int kvm_arch_get_registers(CPUState *cpu); int kvm_arch_put_registers(CPUState *cpu, int level); -int kvm_arch_init(KVMState *s); +int kvm_arch_init(MachineState *ms, KVMState *s); int kvm_arch_init_vcpu(CPUState *cpu); diff --git a/kvm-all.c b/kvm-all.c index 729f334..cbedc25 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1598,7 +1598,7 @@ static int kvm_init(MachineState *ms) kvm_resamplefds_allowed = (kvm_check_extension(s, KVM_CAP_IRQFD_RESAMPLE) > 0); - ret = kvm_arch_init(s); + ret = kvm_arch_init(ms, s); if (ret < 0) { goto err; } diff --git a/target-arm/kvm.c b/target-arm/kvm.c index 23cefe9..72c1fa1 100644 --- a/target-arm/kvm.c +++ b/target-arm/kvm.c @@ -150,7 +150,7 @@ static const TypeInfo host_arm_cpu_type_info = { .class_size = sizeof(ARMHostCPUClass), }; -int kvm_arch_init(KVMState *s) +int kvm_arch_init(MachineState *ms, KVMState *s) { /* For ARM interrupt delivery is always asynchronous, * whether we are using an in-kernel VGIC or not. diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 40d6a14..ce554e4 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -840,7 +840,7 @@ static int kvm_get_supported_msrs(KVMState *s) return ret; } -int kvm_arch_init(KVMState *s) +int kvm_arch_init(MachineState *ms, KVMState *s) { uint64_t identity_base = 0xfffbc000; uint64_t shadow_mem; diff --git a/target-mips/kvm.c b/target-mips/kvm.c index b68191c..4d1f7ea 100644 --- a/target-mips/kvm.c +++ b/target-mips/kvm.c @@ -40,7 +40,7 @@ unsigned long kvm_arch_vcpu_id(CPUState *cs) return cs->cpu_index; } -int kvm_arch_init(KVMState *s) +int kvm_arch_init(MachineState *ms, KVMState *s) { /* MIPS has 128 signals */ kvm_set_sigmask_len(s, 16); diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index 1edf2b5..12328a4 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -95,7 +95,7 @@ static void kvm_kick_cpu(void *opaque) static int kvm_ppc_register_host_cpu_type(void); -int kvm_arch_init(KVMState *s) +int kvm_arch_init(MachineState *ms, KVMState *s) { cap_interrupt_unset = kvm_check_extension(s, KVM_CAP_PPC_UNSET_IRQ); cap_interrupt_level = kvm_check_extension(s, KVM_CAP_PPC_IRQ_LEVEL); diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index 508cc0a..b1369d5 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -173,7 +173,7 @@ static void kvm_s390_enable_cmma(KVMState *s) trace_kvm_enable_cmma(rc); } -int kvm_arch_init(KVMState *s) +int kvm_arch_init(MachineState *ms, KVMState *s) { cap_sync_regs = kvm_check_extension(s, KVM_CAP_SYNC_REGS); cap_async_pf = kvm_check_extension(s, KVM_CAP_ASYNC_PF);