From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 4A995C433B4 for ; Thu, 29 Apr 2021 14:51:49 +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 D7F25613E1 for ; Thu, 29 Apr 2021 14:51:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D7F25613E1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:42002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lc815-0000z7-QW for qemu-devel@archiver.kernel.org; Thu, 29 Apr 2021 10:51:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lc801-0008Rh-LF for qemu-devel@nongnu.org; Thu, 29 Apr 2021 10:50:41 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:34519) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lc7zz-0001DS-0U for qemu-devel@nongnu.org; Thu, 29 Apr 2021 10:50:41 -0400 Received: by mail-wr1-x432.google.com with SMTP id t18so9652657wry.1 for ; Thu, 29 Apr 2021 07:50:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=cw61hbwST9sLc+VSI4Gm/Qb3TWC0JxioRAzm3gTOqCU=; b=zPjah97b54tdTpx4hIOpkUbk36rpR9LsFS6DToV1xRzKtlhQt561KpHGmD9RBeotpn 2np5pwJfRBWP9zRW2VG5zquQyJMdQDyNztjscxWq1IanJ6FDCGOnCp+mBYBlPLOmZkBo 2XmZW7GCleArDtUH2mloh2dYDthRfsnMXAtvFd6NPVmpz7+LFrJoix3yuVVstCEGeKxp UrpRZL9TucGaeliqUz9Ggy18WGcW2uY0LEJLFYACoGwL1YnEE7HmUhk//m1jS2wRCHuv SpTsSNk/bxlqJYUuTKeIYAsPZUSX6S0f0S8EwVCIyjTRS84H7Zg1d7izOeYW5UzKb2ei ns4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version:content-transfer-encoding; bh=cw61hbwST9sLc+VSI4Gm/Qb3TWC0JxioRAzm3gTOqCU=; b=DPR29MahNzV2iQ46ve+2iIcikKGtNeYxtTUAvAAt07HGgtExMPsJ9iQflMqVKLILoT lE8/8d/O0dbdMe2duTyDBBUvtvaqG6QdmtivEk8nu0udVUsPn23x5iFuGgBK6BSy56D7 jGkx3pjHtfVAiXYcwv5G5Fb/nERxjuF0ILf+k3JQkZIPueVpuZ06XajZMWXEs+mByaac aXl0xPlOXQwQi3E7biQZjZpM28a01t8NDx76hDfmQxMA0+yF2lj2QRfAVRr2jrHhYUBP SQ+2OFQfk0XWsPF//UGGNs7rsg2DQmc6eUt5g9qXLsv0HwazqCwx/C9CQ4ShHOB3F50i 5LiA== X-Gm-Message-State: AOAM530sLl1wRmc3Rh3q4FMzvPWDugIitnTV9eI64vjHTb3vY4Z2FIKR MNxKWn0fw1/5Hp4nh/uql9gwEA== X-Google-Smtp-Source: ABdhPJyET3DrUWGr35oZQiWAIZpHb12LFe/xbwIl/c7YnGAp1dsSK5/4ghBRXyta1CRnAJWayu2mWg== X-Received: by 2002:a5d:6dc4:: with SMTP id d4mr159412wrz.105.1619707837189; Thu, 29 Apr 2021 07:50:37 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id v13sm5337904wrt.65.2021.04.29.07.50.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 07:50:36 -0700 (PDT) Received: from zen (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 56D871FF7E; Thu, 29 Apr 2021 15:50:35 +0100 (BST) References: <20210415163304.4120052-1-philmd@redhat.com> <20210415163304.4120052-3-philmd@redhat.com> User-agent: mu4e 1.5.12; emacs 28.0.50 From: Alex =?utf-8?Q?Benn=C3=A9e?= To: Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= Subject: Re: [PATCH v4 02/12] accel: Introduce 'query-accels' QMP command Date: Thu, 29 Apr 2021 15:50:25 +0100 In-reply-to: <20210415163304.4120052-3-philmd@redhat.com> Message-ID: <87tunpw3es.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x432.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: , Cc: Laurent Vivier , Peter Maydell , Andrew Jones , =?utf-8?Q?Daniel_P_=2E_Berrang=C3=A9?= , Eduardo Habkost , "Michael S. Tsirkin" , qemu-devel@nongnu.org, Juan Quintela , Richard Henderson , Markus Armbruster , "Dr. David Alan Gilbert" , qemu-arm@nongnu.org, Claudio Fontana , Igor Mammedov , Thomas Huth , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Philippe Mathieu-Daud=C3=A9 writes: > Introduce the 'query-accels' QMP command which returns a list > of built-in accelerator names. > > - Accelerator is a QAPI enum of all existing accelerators, > > - AcceleratorInfo is a QAPI structure providing accelerator > specific information. Currently the common structure base > provides the name of the accelerator, while the specific > part is empty, but each accelerator can expand it. > > - 'query-accels' QMP command returns a list of @AcceleratorInfo > > For example on a KVM-only build we get: > > { "execute": "query-accels" } > { > "return": [ > { > "name": "qtest" > }, > { > "name": "kvm" > } > ] > } > > Note that we can't make the enum values or union branches conditional > because of target-specific poisoning of accelerator definitions. > > Reviewed-by: Eric Blake > Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e Tested-by: Alex Benn=C3=A9e --=20 Alex Benn=C3=A9e