From nobody Tue May 21 04:02:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1598256572; cv=none; d=zohomail.com; s=zohoarc; b=e3xsw0+6D7LOO0q0BDlktaZDZLozokoZk7EtSsaN5dOdpOrmnA0/rkhXfiH6bP/n8QZ0DvAINmKgiVxJxa0XbzBlP53q6vaK2aRhiHFcFFxF5jUfHCLWRe122p/kUONe3a6nAaECppjr9/EIi1E/rUzKk7ikW6bb4P7aAfJaI2E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598256572; h=Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To; bh=T0AMPeoov8/+jsVMPNHuOXt7CN3A6v044R1IXSJ7/jQ=; b=Mwhyad0czorS/yAmutCHADVcEhSuxEIC3wfcrm3P9QvhUR6rR0wnW4is6Y23lvIwNj40I2tES+sS9J/m4L91OgBb8QpMdrNj2bov4rIyVadCot0wiNaWSC9uF/5QuIADKoPQwKWv3df58U87NuxlX1K5BNYJsFzIi6wHsj0VQTo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail 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 1598256572821813.0498019421699; Mon, 24 Aug 2020 01:09:32 -0700 (PDT) Received: from localhost ([::1]:39864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kA7Xn-00071j-K9 for importer@patchew.org; Mon, 24 Aug 2020 04:09:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kA7WG-0005dD-26 for qemu-devel@nongnu.org; Mon, 24 Aug 2020 04:07:56 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:43598) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kA7WE-0000ZQ-AT for qemu-devel@nongnu.org; Mon, 24 Aug 2020 04:07:55 -0400 Received: by mail-pg1-x541.google.com with SMTP id d19so4180929pgl.10 for ; Mon, 24 Aug 2020 01:07:53 -0700 (PDT) Received: from software.domain.org ([45.77.13.216]) by smtp.gmail.com with ESMTPSA id z26sm8769242pgc.44.2020.08.24.01.07.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Aug 2020 01:07:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=T0AMPeoov8/+jsVMPNHuOXt7CN3A6v044R1IXSJ7/jQ=; b=C1xJd8C3hoqGxQBJqFOOhw4PHb3PCpvBmxztHoN8YmkSeSFaoAUfSAyxMpWQMffzOW ONnW3C09QDDusd320DdHrmLDLJWj2BLbFX7guJCxLzK/hx278r79bT57aJ044Ih3q4C8 uqtRBFN1UyVNYSj14yLQN2l2FCWBvRJch3D9iIcZ5QR0hJbmV6pmjwKCzCAlYfhifepS xzX+lsi8aRuiLIx0Wyk1G8miMK1v+xc27woTPNCeGJQ+ytuYDTj5u3RyvIJOtx4K+R5l JS/K8yn6iofQK5fcGtxqlTjH9KmjLkGrvybgIq6Ly9zRNjHKHohPX+igLfGOKTJbjxL4 AhoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=T0AMPeoov8/+jsVMPNHuOXt7CN3A6v044R1IXSJ7/jQ=; b=W/embesCUPQDZcjy6iI0mdeXQUC1S7v/39Xv79NLWrBLiktAR4ruAWavLIXTXRokT9 RKAi/botMeV2VX69YzvPqPdJtMpSRggcIZk+BF5Jbu+92PEQsXK3r21kuReAGgMluduk Yv6u1F5ZeKxyHPkhbpJOsaI5L+r4KUuNzP8ZSeX7I2dM729YUaFm5DV6vpb7gejsI8ng OUndVtSAHdSeniPPlRNxbgnDj0kbzQhlZ9zRxIgOsf2tdAuHjMsSyLT4lcv6inh/GHRi X5HTNWCBLKlKRauAMRvZR7ADvCDfVBZDK8P437X9oq70szBQ6cGRr8706VOmgY9eaeS2 3tvQ== X-Gm-Message-State: AOAM530xUe50c1FbFtpO+iJ4pNMylZrJtIwrmVHx8m7kDL7H3lZSMsrJ opGLhl+xVNkVaZsAf9UAjc4= X-Google-Smtp-Source: ABdhPJxGOILzHZ9R3+A1Iku1hrj8uG5VNx79Our8RYVYtoObU7qnyhmKpOi1Y0XdQupCu6ej10hoWQ== X-Received: by 2002:a63:d34e:: with SMTP id u14mr2652649pgi.122.1598256472867; Mon, 24 Aug 2020 01:07:52 -0700 (PDT) From: Huacai Chen X-Google-Original-From: Huacai Chen To: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Markovic Subject: [PATCH V2 for-5.2] hw/null-machine: Add the kvm_type() hook for MIPS Date: Mon, 24 Aug 2020 16:11:08 +0800 Message-Id: <1598256668-12131-1-git-send-email-chenhc@lemote.com> X-Mailer: git-send-email 2.7.0 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=2607:f8b0:4864:20::541; envelope-from=zltjiangshi@gmail.com; helo=mail-pg1-x541.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, 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: , Cc: Huacai Chen , Huacai Chen , Aleksandar Rikalo , qemu-devel@nongnu.org, Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" MIPS has two types of KVM: TE & VZ, and TE is the default type. Now, libvirt uses a null-machine to detect the kvm capability. In the MIPS case, it will return "KVM not supported" on a VZ platform by default. So, add the kvm_type() hook to the null-machine. This seems not a very good solution, but I cannot do it better now. Reviewed-by: Aleksandar Markovic Signed-off-by: Huacai Chen Co-developed-by: Jiaxun Yang --- hw/core/meson.build | 2 +- hw/core/null-machine.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/core/meson.build b/hw/core/meson.build index fc91f98..b6591b9 100644 --- a/hw/core/meson.build +++ b/hw/core/meson.build @@ -35,7 +35,6 @@ softmmu_ss.add(files( 'machine-hmp-cmds.c', 'machine.c', 'nmi.c', - 'null-machine.c', 'qdev-fw.c', 'qdev-properties-system.c', 'sysbus.c', @@ -45,5 +44,6 @@ softmmu_ss.add(files( =20 specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files( 'machine-qmp-cmds.c', + 'null-machine.c', 'numa.c', )) diff --git a/hw/core/null-machine.c b/hw/core/null-machine.c index 7e69352..4b4ab76 100644 --- a/hw/core/null-machine.c +++ b/hw/core/null-machine.c @@ -17,6 +17,9 @@ #include "sysemu/sysemu.h" #include "exec/address-spaces.h" #include "hw/core/cpu.h" +#ifdef TARGET_MIPS +#include "kvm_mips.h" +#endif =20 static void machine_none_init(MachineState *mch) { @@ -55,6 +58,9 @@ static void machine_none_machine_init(MachineClass *mc) mc->no_floppy =3D 1; mc->no_cdrom =3D 1; mc->no_sdcard =3D 1; +#ifdef TARGET_MIPS + mc->kvm_type =3D mips_kvm_type; +#endif } =20 DEFINE_MACHINE("none", machine_none_machine_init) --=20 2.7.0