From nobody Thu Dec 18 22:21:36 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615558156; cv=none; d=zohomail.com; s=zohoarc; b=Yj35mJGtOFsYwZQI6PVuV46BxwRSyKdYWDFaPqjVzUQcpJWihHlRe5X7jh4ekamj8k7+RtvnPJX6SEdHA0viPW5tp0NEK8Omg0eApSSHZ9RyPDRJKUBs5OgPf9iUx5fxeBTCc6c/xZ4DQXVqMjAGgD6meALozcS1Jcx+kE8QOss= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615558156; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=FtE1w8SqWKE0y1z04t9BX5/YkIGduuqbmCzSca0fKhg=; b=MFtAanz0bEgEpnt10cIhczNIbS0sCGcrlkBE1VRhbknYkgCfgngrfYTDrxwf28yDKl/KmAHvsXKqZATaUyS9kZTcpqzJItnkjpzU8d9MPJzSlSFvJCocsamgrx1qDZGYV5e7SA5WEsEbIu8e1yc3KIFoGR/59Sil0glAcUcMbh0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615558156690717.1997390207822; Fri, 12 Mar 2021 06:09:16 -0800 (PST) Received: from localhost ([::1]:33902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKiTb-00080d-Ei for importer@patchew.org; Fri, 12 Mar 2021 09:09:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43784) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKiD6-000327-8C for qemu-devel@nongnu.org; Fri, 12 Mar 2021 08:52:13 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:40873) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKiCt-00020b-VI for qemu-devel@nongnu.org; Fri, 12 Mar 2021 08:52:11 -0500 Received: by mail-wr1-x42b.google.com with SMTP id v11so1815447wro.7 for ; Fri, 12 Mar 2021 05:51:59 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id m6sm7964994wrv.73.2021.03.12.05.51.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 05:51:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=FtE1w8SqWKE0y1z04t9BX5/YkIGduuqbmCzSca0fKhg=; b=BWosYPeFmrY6D7mI+4cE7t/Wdjr5gt1WKFRUJRAKY+9BqmEWftWKzGiqtLDVJyBCTl Sc78C+8+aLuYZI9Dwf7JL13+g+G3vuAJOTX1Lfj6x70GjQOH+Mr8KeA4JzLlAWFgiLVw iPYyYFo1ofrf2mJQmtxItptxj+ETcIsVDBEhAgJsX8rfCxRyJeJjexofd2JkwqdsAClc fxe9qvZXtfr5ebwpPuwXrm2RNqp+a1jhyI+7Iyw6ZHOI9f4YnRpElsOmVaUSeF81gF4q 4HTqel9MjQAUBUbIsWSlmetEVb9D2hHJahh2UjQX3La2yXU0d2o378NKeUq0xO0G++P6 fDBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FtE1w8SqWKE0y1z04t9BX5/YkIGduuqbmCzSca0fKhg=; b=LEKb2SVktbwPus528n4Xu7y0WcHdXaizOmWZ50OQtTbIFJz2hNksK4oW9S+Of+eS0u T7lX2rBlkJfRMasUiQ5gXXVkOMkC+oMC+vFSgKNSp5DiuBIUpCv5pZ94VmgymVQiVQCE nd3O3OmLAHNXPcgdL5eU6BbkqRnQObKOu1a75riFoVQEq76WrFo0adbDCvXxpw4G1AG1 AKyNbrKa5BrqznpWRN9zYf/cfER2nTiA56efHSYeYiDDSRLWKN/dnF9pS1W4ILNqE67A a3jE/tkWASovW8/jMpSuHscQLkabDW7Q/o7kMQfqbX7jxzF7UvVaEubDR/oeRss760Bl uccg== X-Gm-Message-State: AOAM533DowvzYbvv5NQhm+gxt2tyzXt/0lMz3BS/gBzt4tAOyr2BWIip QCd6ascwQQpGYnZRbZyN1S9zYqPlLoiTOlZ6 X-Google-Smtp-Source: ABdhPJyvHbJRmBRnsQpJbn+E0r6iu4ypupHCgEGgWlvMxYyAcFV6rKurBkM6RoWami3DUg7dk/lS9w== X-Received: by 2002:a5d:4e85:: with SMTP id e5mr14440187wru.218.1615557118691; Fri, 12 Mar 2021 05:51:58 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 24/39] accel: kvm: Fix kvm_type invocation Date: Fri, 12 Mar 2021 13:51:25 +0000 Message-Id: <20210312135140.1099-25-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210312135140.1099-1-peter.maydell@linaro.org> References: <20210312135140.1099-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: Andrew Jones Prior to commit f2ce39b4f067 a MachineClass kvm_type method only needed to be registered to ensure it would be executed. With commit f2ce39b4f067 a kvm-type machine property must also be specified. hw/arm/virt relies on the kvm_type method to pass its selected IPA limit to KVM, but this is not exposed as a machine property. Restore the previous functionality of invoking kvm_type when it's present. Fixes: f2ce39b4f067 ("vl: make qemu_get_machine_opts static") Signed-off-by: Andrew Jones Reviewed-by: Eric Auger Message-id: 20210310135218.255205-2-drjones@redhat.com Signed-off-by: Peter Maydell --- include/hw/boards.h | 1 + accel/kvm/kvm-all.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/hw/boards.h b/include/hw/boards.h index 5fda5fd128d..4a90549ad85 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -128,6 +128,7 @@ typedef struct { * @kvm_type: * Return the type of KVM corresponding to the kvm-type string option or * computed based on other criteria such as the host kernel capabilitie= s. + * kvm-type may be NULL if it is not needed. * @numa_mem_supported: * true if '--numa node.mem' option is supported and false otherwise * @smp_parse: diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index f88a52393fe..37b0a1861e7 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -2068,6 +2068,8 @@ static int kvm_init(MachineState *ms) "kvm-type", &error_abort); type =3D mc->kvm_type(ms, kvm_type); + } else if (mc->kvm_type) { + type =3D mc->kvm_type(ms, NULL); } =20 do { --=20 2.20.1