From patchwork Fri Feb 19 17:38:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 12095887 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CC3CC433DB for ; Fri, 19 Feb 2021 17:39:11 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 E2DA464E92 for ; Fri, 19 Feb 2021 17:39:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E2DA464E92 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.87023.163936 (Exim 4.92) (envelope-from ) id 1lD9k1-0000Ru-Pt; Fri, 19 Feb 2021 17:38:57 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 87023.163936; Fri, 19 Feb 2021 17:38:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lD9k1-0000Rn-N5; Fri, 19 Feb 2021 17:38:57 +0000 Received: by outflank-mailman (input) for mailman id 87023; Fri, 19 Feb 2021 17:38:56 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lD9k0-0000Ri-9A for xen-devel@lists.xenproject.org; Fri, 19 Feb 2021 17:38:56 +0000 Received: from us-smtp-delivery-124.mimecast.com (unknown [63.128.21.124]) by us1-rack-iad1.inumbo.com (Halon) with ESMTP id 0fd09e82-fd04-4ca5-9e4a-7b9c9199383d; Fri, 19 Feb 2021 17:38:54 +0000 (UTC) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-492-RFoionfWOYKhv2EUOAg6gg-1; Fri, 19 Feb 2021 12:38:52 -0500 Received: by mail-wr1-f69.google.com with SMTP id d10so2747603wrq.17 for ; Fri, 19 Feb 2021 09:38:52 -0800 (PST) Received: from localhost.localdomain (68.red-83-57-175.dynamicip.rima-tde.net. [83.57.175.68]) by smtp.gmail.com with ESMTPSA id l2sm13785629wrm.6.2021.02.19.09.38.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Feb 2021 09:38:50 -0800 (PST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 0fd09e82-fd04-4ca5-9e4a-7b9c9199383d DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613756334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4SOncT9Fo54yUG54/z2tFe4UG2s+CTajIRyeydICZjo=; b=YZFlL6hfULqIyWQb/z3hlSqI+0d7XDhxI+UD3ulqt3+SsPKHXd9ZhttbYlzjjwfEjvDr+0 OS5dhGRn9X+jz+YmEHCxkkIgo9z0nNb9Eg1yRcKHJMK2DgeYY39auP1HBisnrvlIVyWzM6 wOVfVEafosJYWkb6t+gRvciSL9Ml7Vg= X-MC-Unique: RFoionfWOYKhv2EUOAg6gg-1 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:mime-version :content-transfer-encoding; bh=lykBUd6DAhrahT8nCJAC5FU9Ql8oesKH07nupx8xYdk=; b=PXYwu88UteB0XRvP8XWSdaKEHwc0upbUMaRE8SdHzbNnj15Xf9XMYwDB7c9x6fPYT2 w4T1MKdRgMFxSftZd7IdEjuUtof6nIT4xi5nOg4DWYM0dq+eaJqJTTaecPA/l6yG+jkl e+S99jUQAmnNzUxIQtkNt8FdYMm/PGnRzSFWiSwTzjuHiM6wmYzwEVo/pzmq6TyAgMVQ FaZ0RkAsffRkwEbXk0eXwaSCQe+DghFMKQBTcbc9LgIbdj9SmLDmVfEOyQGZCy4nUGrJ JapDHdtaKG2iQVLp9PrOMP2MnEM15oCyjyIRh94wyePDkK78yXSE6NdH56jq9rX2lmeb 7HJA== X-Gm-Message-State: AOAM532/bXznZXY9MLMVOqgXAMi9ujKs1/w3DXYo0U1WOg67QPyoSO5z JtkXvfoQI5HzyhsMTZTLOAEiDbiHrre6MFFV1Tm8lp7cYX4M7gzAHlI+POgiRDQVTX3CtTJRWba O8o0yASpWEh4ItxVQLwD3x7vNjp4= X-Received: by 2002:adf:e4c3:: with SMTP id v3mr10542032wrm.210.1613756331025; Fri, 19 Feb 2021 09:38:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwI/byrZ/GWSkkhxlUrl1Omb6LyZ4OFFS/CSa2qXI7tP50C7ZajzgipQ5EfU9sygOtDbt6r2g== X-Received: by 2002:adf:e4c3:: with SMTP id v3mr10542005wrm.210.1613756330876; Fri, 19 Feb 2021 09:38:50 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Aurelien Jarno , Peter Maydell , Anthony Perard , qemu-ppc@nongnu.org, qemu-s390x@nongnu.org, Halil Pasic , Huacai Chen , xen-devel@lists.xenproject.org, Marcel Apfelbaum , David Gibson , qemu-arm@nongnu.org, Stefano Stabellini , Paolo Bonzini , kvm@vger.kernel.org, BALATON Zoltan , Leif Lindholm , Richard Henderson , Radoslaw Biernacki , Alistair Francis , Paul Durrant , Eduardo Habkost , "Michael S. Tsirkin" , Thomas Huth , Jiaxun Yang , =?utf-8?q?Herv=C3=A9_Poussineau?= , Greg Kurz , Christian Borntraeger , Cornelia Huck , "Edgar E. Iglesias" , David Hildenbrand , Mark Cave-Ayland , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH v2 00/11] hw/accel: Exit gracefully when accelerator is invalid Date: Fri, 19 Feb 2021 18:38:36 +0100 Message-Id: <20210219173847.2054123-1-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Hi, This series aims to improve user experience by providing a better error message when the user tries to enable KVM on machines not supporting it. Since v1: - added missing x86 arch (Peter) - consider all accelerators (Daniel and Peter) - do not enable KVM on sbsa-ref (Leif) - updated 'query-machines' (Daniel) - new patch for XenPV Supersedes: <20210219114428.1936109-1-philmd@redhat.com> Philippe Mathieu-Daudé (11): accel/kvm: Check MachineClass kvm_type() return value hw/boards: Introduce machine_class_valid_for_accelerator() hw/core: Restrict 'query-machines' to those supported by current accel hw/arm: Restrit KVM to the virt & versal machines hw/mips: Restrict KVM to the malta & virt machines hw/ppc: Restrict KVM to various PPC machines hw/s390x: Explicit the s390-ccw-virtio machines support TCG and KVM hw/i386: Explicit x86 machines support all current accelerators hw/xenpv: Restrict Xen Para-virtualized machine to Xen accelerator hw/board: Only allow TCG accelerator by default softmmu/vl: Exit gracefully when accelerator is not supported include/hw/boards.h | 27 ++++++++++++++++++++++++++- accel/kvm/kvm-all.c | 6 ++++++ hw/arm/virt.c | 5 +++++ hw/arm/xlnx-versal-virt.c | 5 +++++ hw/core/machine-qmp-cmds.c | 4 ++++ hw/core/machine.c | 26 ++++++++++++++++++++++++++ hw/i386/x86.c | 5 +++++ hw/mips/loongson3_virt.c | 5 +++++ hw/mips/malta.c | 5 +++++ hw/ppc/e500plat.c | 5 +++++ hw/ppc/mac_newworld.c | 6 ++++++ hw/ppc/mac_oldworld.c | 5 +++++ hw/ppc/mpc8544ds.c | 5 +++++ hw/ppc/ppc440_bamboo.c | 5 +++++ hw/ppc/prep.c | 5 +++++ hw/ppc/sam460ex.c | 5 +++++ hw/ppc/spapr.c | 5 +++++ hw/s390x/s390-virtio-ccw.c | 5 +++++ hw/xenpv/xen_machine_pv.c | 5 +++++ softmmu/vl.c | 7 +++++++ 20 files changed, 145 insertions(+), 1 deletion(-)