From patchwork Thu May 30 21:57:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wainer dos Santos Moschetta X-Patchwork-Id: 10969313 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A94DB14C0 for ; Thu, 30 May 2019 21:59:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9BADC28C09 for ; Thu, 30 May 2019 21:59:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 99E4F28C31; Thu, 30 May 2019 21:59:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3AFEF28C4D for ; Thu, 30 May 2019 21:59:19 +0000 (UTC) Received: from localhost ([127.0.0.1]:59551 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWT4w-0006P0-MV for patchwork-qemu-devel@patchwork.kernel.org; Thu, 30 May 2019 17:59:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWT3i-0005XA-Rm for qemu-devel@nongnu.org; Thu, 30 May 2019 17:58:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWT3h-0001V1-Mm for qemu-devel@nongnu.org; Thu, 30 May 2019 17:58:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42616) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hWT3h-0001Sq-HP for qemu-devel@nongnu.org; Thu, 30 May 2019 17:58:01 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8BB393082B6B for ; Thu, 30 May 2019 21:57:58 +0000 (UTC) Received: from virtlab501.virt.lab.eng.bos.redhat.com (virtlab501.virt.lab.eng.bos.redhat.com [10.19.152.162]) by smtp.corp.redhat.com (Postfix) with ESMTP id B47E564026; Thu, 30 May 2019 21:57:55 +0000 (UTC) From: Wainer dos Santos Moschetta To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 17:57:54 -0400 Message-Id: <20190530215755.328-1-wainersm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Thu, 30 May 2019 21:57:58 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 0/1] -accel should list enabled accelerators X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, philmd@redhat.com, ehabkost@redhat.com, crosa@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP On this series I changed the semantics of -accel help so that it shows only the accelerators enabled in the QEMU target binary. This behavior is now alike -cpu and -machine helps. Another reason for this proposal is that I am working on an improvement of Avocado QEMU framework which should skip tests tagged with, e.g, "accel:tcg" if tcg is not enabled in the binary. And it seems the best approach to detect the presence (or not) of an accelerator is to query QEMU with -accel help. Phillipe Mathieu-Daudé proposed a similar fix [1] but it was never merged. My patch is slightly different but it implements some decisions that seemed consensus at that time: 1. Do not display qtest. It's an internal only accelerator. 2. It should display those that have support on the target binary, regardless if they are not present on the host. Example with this patch on x86_64 host (kvm not installed): --- $ configure --enable-kvm --enable-xen --target-list="x86_64-softmmu ppc64-softmmu" $ x86_64-softmmu/qemu-system-x86_64 -accel help Accelerators supported in QEMU binary: tcg xen kvm $ ppc64-softmmu/qemu-system-ppc64 -accel help Accelerators supported in QEMU binary: tcg --- Git: https://github.com/wainersm/qemu Branch: accel_list Travis: https://travis-ci.org/wainersm/qemu/builds/539366851 [1] https://www.mail-archive.com/qemu-devel@nongnu.org/msg491542.html Wainer dos Santos Moschetta (1): vl: make -accel help to list enabled accelerators only vl.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)