From patchwork Sat Dec 28 10:43:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Xiaoyao Li X-Patchwork-Id: 11311509 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 05A3614B7 for ; Sat, 28 Dec 2019 11:00:14 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D0D6F21744 for ; Sat, 28 Dec 2019 11:00:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D0D6F21744 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:42504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1il9pM-0006Sq-SH for patchwork-qemu-devel@patchwork.kernel.org; Sat, 28 Dec 2019 06:00:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57908) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1il9os-00062k-KK for qemu-devel@nongnu.org; Sat, 28 Dec 2019 05:59:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1il9oq-00041M-8s for qemu-devel@nongnu.org; Sat, 28 Dec 2019 05:59:41 -0500 Received: from mga09.intel.com ([134.134.136.24]:52059) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1il9op-0003jD-Sh for qemu-devel@nongnu.org; Sat, 28 Dec 2019 05:59:40 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Dec 2019 02:59:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,366,1571727600"; d="scan'208";a="250886854" Received: from lxy-clx-4s.sh.intel.com ([10.239.43.57]) by fmsmga002.fm.intel.com with ESMTP; 28 Dec 2019 02:59:33 -0800 From: Xiaoyao Li To: Paolo Bonzini , Eduardo Habkost , Marcel Apfelbaum Subject: [PATCH v2] accel/kvm: Make "kernel_irqchip" default on Date: Sat, 28 Dec 2019 18:43:26 +0800 Message-Id: <20191228104326.21732-1-xiaoyao.li@intel.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 134.134.136.24 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vitaly Kuznetsov , Xiaoyao Li , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Commit 11bc4a13d1f4 ("kvm: convert "-machine kernel_irqchip" to an accelerator property") moves kernel_irqchip property from "-machine" to "-accel kvm", but it forgets to set the default value of kernel_irqchip_allowed and kernel_irqchip_split. Also cleaning up the three useless members (kernel_irqchip_allowed, kernel_irqchip_required, kernel_irqchip_split) in struct MachineState. Fixes: 11bc4a13d1f4 ("kvm: convert "-machine kernel_irqchip" to an accelerator property") Reported-by: Vitaly Kuznetsov Signed-off-by: Xiaoyao Li Tested-by: Michal Prívozník --- Changes in v2: - Add Reported-by tag; - Initialize kernel_irqchip_split in init_machine(); --- accel/kvm/kvm-all.c | 3 +++ include/hw/boards.h | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index b2f1a5bcb5ef..afbbe0a1af25 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -2070,6 +2070,8 @@ static int kvm_init(MachineState *ms) goto err; } + s->kernel_irqchip_split = mc->default_kernel_irqchip_split; + if (s->kernel_irqchip_allowed) { kvm_irqchip_create(s); } @@ -3046,6 +3048,7 @@ static void kvm_accel_instance_init(Object *obj) KVMState *s = KVM_STATE(obj); s->kvm_shadow_mem = -1; + s->kernel_irqchip_allowed = true; } static void kvm_accel_class_init(ObjectClass *oc, void *data) diff --git a/include/hw/boards.h b/include/hw/boards.h index 61f8bb8e5a42..fb1b43d5b972 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -271,9 +271,6 @@ struct MachineState { /*< public >*/ - bool kernel_irqchip_allowed; - bool kernel_irqchip_required; - bool kernel_irqchip_split; char *dtb; char *dumpdtb; int phandle_start;