From nobody Sat May 18 14:54:14 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=yadro.com ARC-Seal: i=1; a=rsa-sha256; t=1607331886; cv=none; d=zohomail.com; s=zohoarc; b=fMcFIEU6kKzpqCOghC2pTl4AWAKRgNdNJdQmw6dZ/Ib0kfUBOKH3HERgfEWMH04feKTTovqDLhqAg7suSro7lIsedra+KCZW32lHL/OZORQCcc6Eslg2UcR96inz305WOZiawniiqvrV6L14tBPUsZNK5p05ZysEZAFK6prKPpM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607331886; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=W6Y6Sk7TlBtTHxqRbBmsOCIvmc9w1K4IinNP/9BGQjY=; b=exGIZnJu4KwOBboV6dt1h5JhL9SdPcTCsfKHbMUP6RcACqtR0qyabyHZ4WLIEzPWUdVVKjEGJI5PGlo1XswfL8zpz6zV8NhkvYUQW68lCKL/FSqI1yWafPRcMripz6Hs0T+RG7VQ2HBccf5+HYaeDNXDyMNh/GxcRpn+ceDqkx0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1607331886254982.1533359193002; Mon, 7 Dec 2020 01:04:46 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-576-Xt13QuJ8OxW7v909pwwRXg-1; Mon, 07 Dec 2020 04:04:41 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A3A88809DCD; Mon, 7 Dec 2020 09:04:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6943F60BD8; Mon, 7 Dec 2020 09:04:35 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 7A4684A7C6; Mon, 7 Dec 2020 09:04:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0B794XdX012824 for ; Mon, 7 Dec 2020 04:04:33 -0500 Received: by smtp.corp.redhat.com (Postfix) id E4ED72166B28; Mon, 7 Dec 2020 09:04:32 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E00462166B27 for ; Mon, 7 Dec 2020 09:04:30 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F28EC811E78 for ; Mon, 7 Dec 2020 09:04:29 +0000 (UTC) Received: from mta-01.yadro.com (mta-02.yadro.com [89.207.88.252]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-207-Fu7IVfDIM2q2rdMOf8KMQw-1; Mon, 07 Dec 2020 04:04:24 -0500 Received: from localhost (unknown [127.0.0.1]) by mta-01.yadro.com (Postfix) with ESMTP id 9BB6541325; Mon, 7 Dec 2020 09:04:21 +0000 (UTC) Received: from mta-01.yadro.com ([127.0.0.1]) by localhost (mta-01.yadro.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nX5gvo-ekv3H; Mon, 7 Dec 2020 12:04:20 +0300 (MSK) Received: from T-EXCH-03.corp.yadro.com (t-exch-03.corp.yadro.com [172.17.100.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mta-01.yadro.com (Postfix) with ESMTPS id 1FB5341318; Mon, 7 Dec 2020 12:04:19 +0300 (MSK) Received: from localhost (172.17.204.212) by T-EXCH-03.corp.yadro.com (172.17.100.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.669.32; Mon, 7 Dec 2020 12:04:19 +0300 X-MC-Unique: Xt13QuJ8OxW7v909pwwRXg-1 X-MC-Unique: Fu7IVfDIM2q2rdMOf8KMQw-1 X-Virus-Scanned: amavisd-new at yadro.com From: Roman Bolshakov To: Subject: [PATCH for-6.0] accel: Wire accel to /machine Date: Mon, 7 Dec 2020 11:46:22 +0300 Message-ID: <20201207084621.23876-1-r.bolshakov@yadro.com> MIME-Version: 1.0 X-Originating-IP: [172.17.204.212] X-ClientProxiedBy: T-EXCH-01.corp.yadro.com (172.17.10.101) To T-EXCH-03.corp.yadro.com (172.17.100.103) X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 0B794XdX012824 X-loop: libvir-list@redhat.com Cc: Kevin Wolf , Peter Krempa , Eduardo Habkost , Richard, libvir-list@redhat.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Henderson , "Dr. David Alan Gilbert" , Claudio, Roman Bolshakov , Fontana , Markus, Paolo Bonzini X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There's no generic way to query current accel and its properties via QOM because there's no link between an accel and current machine. The change adds the link, i.e. if HVF is enabled the following will be available in QOM: (qemu) qom-get /machine/accel type "hvf-accel" Suggested-by: Markus Armbruster Suggested-by: Paolo Bonzini Signed-off-by: Roman Bolshakov Reviewed-by: Eduardo Habkost --- Hi, this is a follow up patch that deprecates earlier series [1]. An outstanding issue is whether management applications can rely on the value of /machine/accel/type and output of qom-list-types command [2][3] to get current and present accels? i.e. would it be ok if libvirt assumes that everything up to the first dash in the accel type is the name of the accel (as specified via -M accel=3DACCEL flag) when it performs QEMU probing? Also, Eduardo and Claudio earlier had ideas to provide cpu-specific accel subclasses [4][5]. 1. https://lists.gnu.org/archive/html/qemu-devel/2020-11/msg03944.html 2. https://lists.gnu.org/archive/html/qemu-devel/2020-11/msg04212.html 3. https://lists.gnu.org/archive/html/qemu-devel/2020-11/msg07062.html 4. https://lists.gnu.org/archive/html/qemu-devel/2020-11/msg06513.html 5. https://lists.gnu.org/archive/html/qemu-devel/2020-11/msg06741.html Thanks, Roman accel/accel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/accel/accel.c b/accel/accel.c index cb555e3b06..45c5bf87b1 100644 --- a/accel/accel.c +++ b/accel/accel.c @@ -56,10 +56,11 @@ int accel_init_machine(AccelState *accel, MachineState = *ms) if (ret < 0) { ms->accelerator =3D NULL; *(acc->allowed) =3D false; - object_unref(OBJECT(accel)); } else { object_set_accelerator_compat_props(acc->compat_props); + object_property_add_child(OBJECT(ms), "accel", OBJECT(accel)); } + object_unref(OBJECT(accel)); return ret; } =20 --=20 2.29.2