From patchwork Mon Apr 8 15:53:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 786924 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:1101:b0:343:f27d:c44e with SMTP id z1csp1415383wrw; Mon, 8 Apr 2024 08:58:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWn9g4kOBV0iP5geCsPVSOUNFFV+lkH3UThIOGylc7bijOp/N5xRWiAhBgJUfHczy4738LfFx8cL9CJZKxrzTL/ X-Google-Smtp-Source: AGHT+IGcECQdqGHbLvZohPCfqmfw1tUDoJeILPD57AaMMYvRzEyqqYJM+XplEdbJfE8+saYBxdiS X-Received: by 2002:ac8:574f:0:b0:432:f709:b4f1 with SMTP id 15-20020ac8574f000000b00432f709b4f1mr9007664qtx.63.1712591884620; Mon, 08 Apr 2024 08:58:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712591884; cv=none; d=google.com; s=arc-20160816; b=wW6IYrEMaKJtLvvKYwHkuF7XbLH5sQXZuky/01zTCA6EE0WHWJoJvbG3/JIAOw4buW owMitrkoBGia9Kq2NVnMRCed03gserwRMyudZBEEjXwKQqoxiy++mDlAMKNJs2KAmAP7 bbC8N51jCWRpFXc9j+hyP+W7+8S8xArNh9gEOt0/VWYJ7WU4ocgApbFbb6c3dxv+O8sD 9fI+mME9qmpVVcBgQjW/qNU+1CRQKGo2vZAWiFIxi81F/qBUBzQCr+ieyFEdYuVZcSgx b2Yb28o3z9dkJbWMXH/QKIKue5gYwWlTCBR1ToUeRfXeZUD8Du4M7uaM93ZYQbYyV5dt UwUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=bTNCByh+icoanj+/ty2qD1fER7UWLq9kG/8oHf0fqoU=; fh=ycigHkwOPieh2u5PmcA89sNk/qPD1ZkdDlL8Mchfvw8=; b=q2tNhlv0WqvQGe04TPIJRbetp2Ys1H2pAcOBqyvhRUhtwqZlqjg2p2yA8mj9afjn+y yaOhKqte8AoHZiJaiWDCfJDVb0IyTrEegIa7I3Vdw+q3jfVc3KMqTvRw6T99pI8vmdqA 8ZFmBUiev7cG419K1CYkTOqo0KXJCoyqpblZ/CTQJC195u5c3+zJ1/bfrZp4szx9bHCe XSe1xvjrYZTqEYtOO/pr8+z0oON1xoIG6xhZLbm7CBzrT3JpQrsQRF0cGd2iDC7/d41P UVDaVqXkF5hcd0HN5YZBcbBe+1knRrXfTq+DfyBsy22I05hngGEDaV9Hb+F3XrE76C32 0OQA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="C0mV+/DM"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u12-20020a05622a010c00b00434231b9497si8762369qtw.27.2024.04.08.08.58.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Apr 2024 08:58:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="C0mV+/DM"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtrJm-0001Dp-4o; Mon, 08 Apr 2024 11:53:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtrJd-0001BU-AT for qemu-devel@nongnu.org; Mon, 08 Apr 2024 11:53:51 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtrJb-0001mW-C9 for qemu-devel@nongnu.org; Mon, 08 Apr 2024 11:53:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712591626; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bTNCByh+icoanj+/ty2qD1fER7UWLq9kG/8oHf0fqoU=; b=C0mV+/DMW9P0L8OhDAOv8zUvF+I4ongeybEDM3/w1RqO0++aJ5HeI9om8GAgBRmlkWJb0K Jl2Da63PWgfglasL/d67tN/8GeszoYodJ467YRLRGfa9bsS/1+Q1XaXawpkCQVtQxHDi6/ cop6EmJTwEvIVHNb2K8m1mSSHZMjvKI= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-26-eFI6fQAyM6-WAiDWF3GDXw-1; Mon, 08 Apr 2024 11:53:45 -0400 X-MC-Unique: eFI6fQAyM6-WAiDWF3GDXw-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-343e74dcf0bso1521176f8f.0 for ; Mon, 08 Apr 2024 08:53:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712591623; x=1713196423; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bTNCByh+icoanj+/ty2qD1fER7UWLq9kG/8oHf0fqoU=; b=jQs083wfqF3GDWhEdqc/5mEFhGiF4gflYLQPbVpVCXtN2RFEJziBavR2aQxxs9Po3c Gjm2W4d9RtV92Jx6NCegtpshbbDSRPOP/OsaO0Cn/0SxdfHSqJMV1R/QF4WcxyAGcczz Tz0VAxhKzNXCEwMg8oz1uBhAWi7y5uFkvKeY4NmrR6VzS6fZv3paAJElGbKWdEc2p3Oh a+uz+8NDY7FXSbx+v3cOzdywZHBFmZdBtoCfpMW/VnUull5rAMwRdzW5fKFhgc1qnhMv J0oGMErkDLOisheJ257/WYERaapyEPS6wBViKLe8sh9PDLxqtLAVyZDoyT6gfQWDBxuq p4+w== X-Gm-Message-State: AOJu0YyM/kUL7z9ZBk7QUiPoEv1LYa27txGI67gEGBVz1KZ2LY0gdYri dJxr3yuOctqg2MsTU9UmYRX4OudRjSaxnNt783cDaXe/CeY9/S4p+v1wIlv823lX5LsdVIWd6u4 fXK3hxkZeUxvU6CvPY4LwQgflBToPqykeGpFvlMGZMblp/W+OZigRTDsp/DbikYCjpa9sPNpYqa L/jlekacoTssM+rRDs9IBtU/0UOqRNqegH5kU1 X-Received: by 2002:a5d:4d85:0:b0:343:9308:3af8 with SMTP id b5-20020a5d4d85000000b0034393083af8mr5502123wru.23.1712591622813; Mon, 08 Apr 2024 08:53:42 -0700 (PDT) X-Received: by 2002:a5d:4d85:0:b0:343:9308:3af8 with SMTP id b5-20020a5d4d85000000b0034393083af8mr5502111wru.23.1712591622420; Mon, 08 Apr 2024 08:53:42 -0700 (PDT) Received: from avogadro.local ([151.95.152.232]) by smtp.gmail.com with ESMTPSA id c11-20020adffb4b000000b00345bcb4fdb9sm2606101wrs.16.2024.04.08.08.53.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 08:53:41 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: philmd@linaro.org Subject: [PATCH v2 03/18] ebpf: Restrict to system emulation Date: Mon, 8 Apr 2024 17:53:15 +0200 Message-ID: <20240408155330.522792-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240408155330.522792-1-pbonzini@redhat.com> References: <20240408155330.522792-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.494, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé eBPF is not used in user emulation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240404194757.9343-2-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- ebpf/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ebpf/meson.build b/ebpf/meson.build index c5bf9295a20..bff6156f518 100644 --- a/ebpf/meson.build +++ b/ebpf/meson.build @@ -1 +1 @@ -common_ss.add(when: libbpf, if_true: files('ebpf.c', 'ebpf_rss.c'), if_false: files('ebpf_rss-stub.c')) +system_ss.add(when: libbpf, if_true: files('ebpf.c', 'ebpf_rss.c'), if_false: files('ebpf_rss-stub.c')) From patchwork Mon Apr 8 15:53:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 786923 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:1101:b0:343:f27d:c44e with SMTP id z1csp1414761wrw; Mon, 8 Apr 2024 08:56:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXK4DBLqPhHwaKCSk7GzUZsZBvPjAUk3dcIWYBRAvYnckz8kibI8vCRgr+F8bPEJfykh5OOdGzNYMDH2l9Vp52I X-Google-Smtp-Source: AGHT+IGwx7Td32xUPUUxsDONx4GCeg+id9Djt8XYC5f2RC/76nzxsdx3A0P4KgYMNRcc9rFF/zfv X-Received: by 2002:a0c:eb08:0:b0:699:4b74:b54a with SMTP id j8-20020a0ceb08000000b006994b74b54amr7338403qvp.65.1712591779937; Mon, 08 Apr 2024 08:56:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712591779; cv=none; d=google.com; s=arc-20160816; b=HWgdrDLiREAbQPWYqA1T96sWB03E3MioILyfV6kKQ/cdHPh3Yisgw+cifP//zKxR6U fgH199s96dsaZeilCPn/dRVdc1BACdAviy0XO7RZ4qC2v1F8H5NmRiculpgGhZjuvpHq M3yN5jvfdIBpwAV3jAgE9vxcVB3Sw53g/sXeIR2o26qANu++kTH2u8XdQpubEg3O5mVn GjPh1eL2xbLUX/RkfDpWXL85Z51KDfNWcOTFJpC2CnOjcGBa9SM2NwWO8qxrWsrdbmYV FybL7xeL3SFKas/w+Q11MueK4ehE7rfa+pUMJk+CF7f+pcDGErGCSVl/vfdTiPQi/Zh5 /rIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PmdNwXyiFhUtgfXJMD+Rd+g6jrns/otdMcglTgVPBvU=; fh=ycigHkwOPieh2u5PmcA89sNk/qPD1ZkdDlL8Mchfvw8=; b=x19S1qFIPcDnvaidlVf48oCVyyyigeTqzr65TE07/TGd9y1IadYBui3xgAhA/g5d2R CfOrCex9O6+inJ2UN3HogDLns7EC3OfrpN+LitJ3N/QCwLLRNZh7gU3Q/dp8JEvrdLzM zebSzogICr9qg0EPyTRmS2Po3igl+auJm92lLThAzvvDBIpXHPoN4aE+72E1J1/1qxcQ lW4KB8yKGeVmUE2PC9K6Mn9b0SuQXvpEX+Zp2gOVzGBBJ4rBbx9cEh9Avjr42Idyt3Q8 Q+hJ0vLhVK5DAVgM/253+uBTbOfRb3rpVEq6pwwI3/5bNdSZVzXSuhsedxqvCkdRJkxq rOdQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fezFFOs0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id pm12-20020ad446cc000000b006992c8b6fb2si8591819qvb.261.2024.04.08.08.56.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Apr 2024 08:56:19 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fezFFOs0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtrJy-0001IW-Q4; Mon, 08 Apr 2024 11:54:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtrJx-0001HY-12 for qemu-devel@nongnu.org; Mon, 08 Apr 2024 11:54:09 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtrJk-0001oi-A7 for qemu-devel@nongnu.org; Mon, 08 Apr 2024 11:54:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712591635; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PmdNwXyiFhUtgfXJMD+Rd+g6jrns/otdMcglTgVPBvU=; b=fezFFOs0KQE+xlwNEUKu0DoK6kiIxCHr6k6QVdA5bL9ePQ6knb7ngnjR3ANzlqDEnUznI7 Ni0pWs8VrJ8sNPknbMqt4uIVErO/nv8wbaboItYxjsrvHDCDEqeFjZKnEJzLHbr2Q+GMAr TOJdelNfWagwEIJ/zAwHWV5f5z+wqDw= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-370-iU5ubSLNOOOzsoJbSBhXpg-1; Mon, 08 Apr 2024 11:53:54 -0400 X-MC-Unique: iU5ubSLNOOOzsoJbSBhXpg-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4169877bfcdso859285e9.2 for ; Mon, 08 Apr 2024 08:53:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712591632; x=1713196432; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PmdNwXyiFhUtgfXJMD+Rd+g6jrns/otdMcglTgVPBvU=; b=Pwk3Y949SmNmWDO465olK6rN6xhzh1nySQHfR8ImuRDPzKEzJnCSosZY+BgRHURdmC hsGeYt82QlWS/ODbOQGMTRTaN6ge/MBFc2LQ7GCcnLyCvmSNVDr9ZNpI9ZiVOwNW3L9a aBtIPtxxSC504hWVDsmsLSeD0lyFDOHn1q6jiHdIxir1EFXv7EomOgGjpcvgm4r4Akt1 210HF6wPdXPmpSxC3j8f8GFjB4WnprbvjgNIItGR3KHoJg/3bQraljXGroqLHnngjPmy JaLJARVYCTV5iFg54/dQdQW72PgfX2rKTCH/iN7kPydq8RWWZUU4u1vUAuNq1nEV/HX3 9JVg== X-Gm-Message-State: AOJu0YwTdiCRVBR/IpCTgZgCdXOJr8Q5LUToLYfYTkF3lxmZrt2fMwsZ yfYwhMQx+rp9mUhY6WqIApLdcEq6/bidWWayfSPPURBF6j350pWExzx3BVFH31xiPp/6yRSnzF2 muu2DEw+XJzqx9A93F3LjXfO/FscbOXlfC1JPynxAO0idu05hlbblsQxTs5KPFsfF42LvpReHBl 9aCzPUxbpHnTbVGjB0ZdLr/8NuhIKp8q8UsWsB X-Received: by 2002:a05:600c:4fc2:b0:414:8e02:e432 with SMTP id o2-20020a05600c4fc200b004148e02e432mr7944001wmq.7.1712591632433; Mon, 08 Apr 2024 08:53:52 -0700 (PDT) X-Received: by 2002:a05:600c:4fc2:b0:414:8e02:e432 with SMTP id o2-20020a05600c4fc200b004148e02e432mr7943950wmq.7.1712591631205; Mon, 08 Apr 2024 08:53:51 -0700 (PDT) Received: from avogadro.local ([151.95.152.232]) by smtp.gmail.com with ESMTPSA id k16-20020a05600c1c9000b004166a7afd20sm4684104wms.10.2024.04.08.08.53.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 08:53:50 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: philmd@linaro.org Subject: [PATCH v2 06/18] util/qemu-config: Extract QMP commands to qemu-config-qmp.c Date: Mon, 8 Apr 2024 17:53:18 +0200 Message-ID: <20240408155330.522792-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240408155330.522792-1-pbonzini@redhat.com> References: <20240408155330.522792-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.494, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé QMP is irrelevant for user emulation. Extract the code related to QMP in a different source file, which won't be build for user emulation binaries. This avoid pulling pointless code. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20240404194757.9343-5-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- include/qemu/config-file.h | 3 + monitor/qemu-config-qmp.c | 206 +++++++++++++++++++++++++++++++++++++ util/qemu-config.c | 204 +----------------------------------- monitor/meson.build | 1 + 4 files changed, 212 insertions(+), 202 deletions(-) create mode 100644 monitor/qemu-config-qmp.c diff --git a/include/qemu/config-file.h b/include/qemu/config-file.h index b82a778123f..51b310fa3b4 100644 --- a/include/qemu/config-file.h +++ b/include/qemu/config-file.h @@ -8,6 +8,9 @@ QemuOptsList *qemu_find_opts(const char *group); QemuOptsList *qemu_find_opts_err(const char *group, Error **errp); QemuOpts *qemu_find_opts_singleton(const char *group); +extern QemuOptsList *vm_config_groups[]; +extern QemuOptsList *drive_config_groups[]; + void qemu_add_opts(QemuOptsList *list); void qemu_add_drive_opts(QemuOptsList *list); int qemu_global_option(const char *str); diff --git a/monitor/qemu-config-qmp.c b/monitor/qemu-config-qmp.c new file mode 100644 index 00000000000..24477a0e448 --- /dev/null +++ b/monitor/qemu-config-qmp.c @@ -0,0 +1,206 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "qapi/qapi-commands-misc.h" +#include "qapi/qmp/qlist.h" +#include "qemu/option.h" +#include "qemu/config-file.h" +#include "hw/boards.h" + +static CommandLineParameterInfoList *query_option_descs(const QemuOptDesc *desc) +{ + CommandLineParameterInfoList *param_list = NULL; + CommandLineParameterInfo *info; + int i; + + for (i = 0; desc[i].name != NULL; i++) { + info = g_malloc0(sizeof(*info)); + info->name = g_strdup(desc[i].name); + + switch (desc[i].type) { + case QEMU_OPT_STRING: + info->type = COMMAND_LINE_PARAMETER_TYPE_STRING; + break; + case QEMU_OPT_BOOL: + info->type = COMMAND_LINE_PARAMETER_TYPE_BOOLEAN; + break; + case QEMU_OPT_NUMBER: + info->type = COMMAND_LINE_PARAMETER_TYPE_NUMBER; + break; + case QEMU_OPT_SIZE: + info->type = COMMAND_LINE_PARAMETER_TYPE_SIZE; + break; + } + + info->help = g_strdup(desc[i].help); + info->q_default = g_strdup(desc[i].def_value_str); + + QAPI_LIST_PREPEND(param_list, info); + } + + return param_list; +} + +/* remove repeated entry from the info list */ +static void cleanup_infolist(CommandLineParameterInfoList *head) +{ + CommandLineParameterInfoList *pre_entry, *cur, *del_entry; + + cur = head; + while (cur->next) { + pre_entry = head; + while (pre_entry != cur->next) { + if (!strcmp(pre_entry->value->name, cur->next->value->name)) { + del_entry = cur->next; + cur->next = cur->next->next; + del_entry->next = NULL; + qapi_free_CommandLineParameterInfoList(del_entry); + break; + } + pre_entry = pre_entry->next; + } + cur = cur->next; + } +} + +/* merge the description items of two parameter infolists */ +static void connect_infolist(CommandLineParameterInfoList *head, + CommandLineParameterInfoList *new) +{ + CommandLineParameterInfoList *cur; + + cur = head; + while (cur->next) { + cur = cur->next; + } + cur->next = new; +} + +/* access all the local QemuOptsLists for drive option */ +static CommandLineParameterInfoList *get_drive_infolist(void) +{ + CommandLineParameterInfoList *head = NULL, *cur; + int i; + + for (i = 0; drive_config_groups[i] != NULL; i++) { + if (!head) { + head = query_option_descs(drive_config_groups[i]->desc); + } else { + cur = query_option_descs(drive_config_groups[i]->desc); + connect_infolist(head, cur); + } + } + cleanup_infolist(head); + + return head; +} + +static CommandLineParameterInfo *objprop_to_cmdline_prop(ObjectProperty *prop) +{ + CommandLineParameterInfo *info; + + info = g_malloc0(sizeof(*info)); + info->name = g_strdup(prop->name); + + if (g_str_equal(prop->type, "bool") || g_str_equal(prop->type, "OnOffAuto")) { + info->type = COMMAND_LINE_PARAMETER_TYPE_BOOLEAN; + } else if (g_str_equal(prop->type, "int")) { + info->type = COMMAND_LINE_PARAMETER_TYPE_NUMBER; + } else if (g_str_equal(prop->type, "size")) { + info->type = COMMAND_LINE_PARAMETER_TYPE_SIZE; + } else { + info->type = COMMAND_LINE_PARAMETER_TYPE_STRING; + } + + if (prop->description) { + info->help = g_strdup(prop->description); + } + + return info; +} + +static CommandLineParameterInfoList *query_all_machine_properties(void) +{ + CommandLineParameterInfoList *params = NULL, *clpiter; + CommandLineParameterInfo *info; + GSList *machines, *curr_mach; + ObjectPropertyIterator op_iter; + ObjectProperty *prop; + bool is_new; + + machines = object_class_get_list(TYPE_MACHINE, false); + assert(machines); + + /* Loop over all machine classes */ + for (curr_mach = machines; curr_mach; curr_mach = curr_mach->next) { + object_class_property_iter_init(&op_iter, curr_mach->data); + /* ... and over the properties of each machine: */ + while ((prop = object_property_iter_next(&op_iter))) { + if (!prop->set) { + continue; + } + /* + * Check whether the property has already been put into the list + * (via another machine class) + */ + is_new = true; + for (clpiter = params; clpiter != NULL; clpiter = clpiter->next) { + if (g_str_equal(clpiter->value->name, prop->name)) { + is_new = false; + break; + } + } + /* If it hasn't been added before, add it now to the list */ + if (is_new) { + info = objprop_to_cmdline_prop(prop); + QAPI_LIST_PREPEND(params, info); + } + } + } + + g_slist_free(machines); + + /* Add entry for the "type" parameter */ + info = g_malloc0(sizeof(*info)); + info->name = g_strdup("type"); + info->type = COMMAND_LINE_PARAMETER_TYPE_STRING; + info->help = g_strdup("machine type"); + QAPI_LIST_PREPEND(params, info); + + return params; +} + +CommandLineOptionInfoList *qmp_query_command_line_options(const char *option, + Error **errp) +{ + CommandLineOptionInfoList *conf_list = NULL; + CommandLineOptionInfo *info; + int i; + + for (i = 0; vm_config_groups[i] != NULL; i++) { + if (!option || !strcmp(option, vm_config_groups[i]->name)) { + info = g_malloc0(sizeof(*info)); + info->option = g_strdup(vm_config_groups[i]->name); + if (!strcmp("drive", vm_config_groups[i]->name)) { + info->parameters = get_drive_infolist(); + } else { + info->parameters = + query_option_descs(vm_config_groups[i]->desc); + } + QAPI_LIST_PREPEND(conf_list, info); + } + } + + if (!option || !strcmp(option, "machine")) { + info = g_malloc0(sizeof(*info)); + info->option = g_strdup("machine"); + info->parameters = query_all_machine_properties(); + QAPI_LIST_PREPEND(conf_list, info); + } + + if (conf_list == NULL) { + error_setg(errp, "invalid option name: %s", option); + } + + return conf_list; +} diff --git a/util/qemu-config.c b/util/qemu-config.c index 42076efe1ef..a90c18dad25 100644 --- a/util/qemu-config.c +++ b/util/qemu-config.c @@ -1,16 +1,14 @@ #include "qemu/osdep.h" #include "block/qdict.h" /* for qdict_extract_subqdict() */ #include "qapi/error.h" -#include "qapi/qapi-commands-misc.h" #include "qapi/qmp/qdict.h" #include "qapi/qmp/qlist.h" #include "qemu/error-report.h" #include "qemu/option.h" #include "qemu/config-file.h" -#include "hw/boards.h" -static QemuOptsList *vm_config_groups[48]; -static QemuOptsList *drive_config_groups[5]; +QemuOptsList *vm_config_groups[48]; +QemuOptsList *drive_config_groups[5]; static QemuOptsList *find_list(QemuOptsList **lists, const char *group, Error **errp) @@ -55,204 +53,6 @@ QemuOpts *qemu_find_opts_singleton(const char *group) return opts; } -static CommandLineParameterInfoList *query_option_descs(const QemuOptDesc *desc) -{ - CommandLineParameterInfoList *param_list = NULL; - CommandLineParameterInfo *info; - int i; - - for (i = 0; desc[i].name != NULL; i++) { - info = g_malloc0(sizeof(*info)); - info->name = g_strdup(desc[i].name); - - switch (desc[i].type) { - case QEMU_OPT_STRING: - info->type = COMMAND_LINE_PARAMETER_TYPE_STRING; - break; - case QEMU_OPT_BOOL: - info->type = COMMAND_LINE_PARAMETER_TYPE_BOOLEAN; - break; - case QEMU_OPT_NUMBER: - info->type = COMMAND_LINE_PARAMETER_TYPE_NUMBER; - break; - case QEMU_OPT_SIZE: - info->type = COMMAND_LINE_PARAMETER_TYPE_SIZE; - break; - } - - info->help = g_strdup(desc[i].help); - info->q_default = g_strdup(desc[i].def_value_str); - - QAPI_LIST_PREPEND(param_list, info); - } - - return param_list; -} - -/* remove repeated entry from the info list */ -static void cleanup_infolist(CommandLineParameterInfoList *head) -{ - CommandLineParameterInfoList *pre_entry, *cur, *del_entry; - - cur = head; - while (cur->next) { - pre_entry = head; - while (pre_entry != cur->next) { - if (!strcmp(pre_entry->value->name, cur->next->value->name)) { - del_entry = cur->next; - cur->next = cur->next->next; - del_entry->next = NULL; - qapi_free_CommandLineParameterInfoList(del_entry); - break; - } - pre_entry = pre_entry->next; - } - cur = cur->next; - } -} - -/* merge the description items of two parameter infolists */ -static void connect_infolist(CommandLineParameterInfoList *head, - CommandLineParameterInfoList *new) -{ - CommandLineParameterInfoList *cur; - - cur = head; - while (cur->next) { - cur = cur->next; - } - cur->next = new; -} - -/* access all the local QemuOptsLists for drive option */ -static CommandLineParameterInfoList *get_drive_infolist(void) -{ - CommandLineParameterInfoList *head = NULL, *cur; - int i; - - for (i = 0; drive_config_groups[i] != NULL; i++) { - if (!head) { - head = query_option_descs(drive_config_groups[i]->desc); - } else { - cur = query_option_descs(drive_config_groups[i]->desc); - connect_infolist(head, cur); - } - } - cleanup_infolist(head); - - return head; -} - -static CommandLineParameterInfo *objprop_to_cmdline_prop(ObjectProperty *prop) -{ - CommandLineParameterInfo *info; - - info = g_malloc0(sizeof(*info)); - info->name = g_strdup(prop->name); - - if (g_str_equal(prop->type, "bool") || g_str_equal(prop->type, "OnOffAuto")) { - info->type = COMMAND_LINE_PARAMETER_TYPE_BOOLEAN; - } else if (g_str_equal(prop->type, "int")) { - info->type = COMMAND_LINE_PARAMETER_TYPE_NUMBER; - } else if (g_str_equal(prop->type, "size")) { - info->type = COMMAND_LINE_PARAMETER_TYPE_SIZE; - } else { - info->type = COMMAND_LINE_PARAMETER_TYPE_STRING; - } - - if (prop->description) { - info->help = g_strdup(prop->description); - } - - return info; -} - -static CommandLineParameterInfoList *query_all_machine_properties(void) -{ - CommandLineParameterInfoList *params = NULL, *clpiter; - CommandLineParameterInfo *info; - GSList *machines, *curr_mach; - ObjectPropertyIterator op_iter; - ObjectProperty *prop; - bool is_new; - - machines = object_class_get_list(TYPE_MACHINE, false); - assert(machines); - - /* Loop over all machine classes */ - for (curr_mach = machines; curr_mach; curr_mach = curr_mach->next) { - object_class_property_iter_init(&op_iter, curr_mach->data); - /* ... and over the properties of each machine: */ - while ((prop = object_property_iter_next(&op_iter))) { - if (!prop->set) { - continue; - } - /* - * Check whether the property has already been put into the list - * (via another machine class) - */ - is_new = true; - for (clpiter = params; clpiter != NULL; clpiter = clpiter->next) { - if (g_str_equal(clpiter->value->name, prop->name)) { - is_new = false; - break; - } - } - /* If it hasn't been added before, add it now to the list */ - if (is_new) { - info = objprop_to_cmdline_prop(prop); - QAPI_LIST_PREPEND(params, info); - } - } - } - - g_slist_free(machines); - - /* Add entry for the "type" parameter */ - info = g_malloc0(sizeof(*info)); - info->name = g_strdup("type"); - info->type = COMMAND_LINE_PARAMETER_TYPE_STRING; - info->help = g_strdup("machine type"); - QAPI_LIST_PREPEND(params, info); - - return params; -} - -CommandLineOptionInfoList *qmp_query_command_line_options(const char *option, - Error **errp) -{ - CommandLineOptionInfoList *conf_list = NULL; - CommandLineOptionInfo *info; - int i; - - for (i = 0; vm_config_groups[i] != NULL; i++) { - if (!option || !strcmp(option, vm_config_groups[i]->name)) { - info = g_malloc0(sizeof(*info)); - info->option = g_strdup(vm_config_groups[i]->name); - if (!strcmp("drive", vm_config_groups[i]->name)) { - info->parameters = get_drive_infolist(); - } else { - info->parameters = - query_option_descs(vm_config_groups[i]->desc); - } - QAPI_LIST_PREPEND(conf_list, info); - } - } - - if (!option || !strcmp(option, "machine")) { - info = g_malloc0(sizeof(*info)); - info->option = g_strdup("machine"); - info->parameters = query_all_machine_properties(); - QAPI_LIST_PREPEND(conf_list, info); - } - - if (conf_list == NULL) { - error_setg(errp, "invalid option name: %s", option); - } - - return conf_list; -} - QemuOptsList *qemu_find_opts_err(const char *group, Error **errp) { return find_list(vm_config_groups, group, errp); diff --git a/monitor/meson.build b/monitor/meson.build index 5269492cf05..a71523a1ce8 100644 --- a/monitor/meson.build +++ b/monitor/meson.build @@ -4,6 +4,7 @@ system_ss.add(files( 'fds.c', 'hmp-cmds.c', 'hmp.c', + 'qemu-config-qmp.c', )) system_ss.add([spice_headers, files('qmp-cmds.c')]) From patchwork Mon Apr 8 15:53:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 786922 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:1101:b0:343:f27d:c44e with SMTP id z1csp1414631wrw; Mon, 8 Apr 2024 08:55:59 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWLeeNkQ6QHOacUZPSVfb33hRbt36O226ZLtNQgZVW/1sEkLnf2eo3v3HIMTsC3LASGB9k2uoaEba7Sysu+Hc/1 X-Google-Smtp-Source: AGHT+IHE87be5r6HYgTMyuhRWt5mdCX10B4bz3DYcW4PQ0U6XBQDR0cc7Nng6k5X+US+Br2eyJqv X-Received: by 2002:a05:6122:1d8b:b0:4d3:cff6:79dd with SMTP id gg11-20020a0561221d8b00b004d3cff679ddmr6568854vkb.12.1712591758948; Mon, 08 Apr 2024 08:55:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712591758; cv=none; d=google.com; s=arc-20160816; b=nBteqlaRqnz8c3G81kG1EKlIEs78WBDIhNkFuYWjwyifGuepvyITw1Y2KGHXXUCWNN /skGm3lJZkrGFlsDyBUiJhWrqVm0E9U6YCkW6GIVpXtpknHSwu5XmaGpUSb1njNd7FX/ +eTt6b55zDdzu/9CVfOpF+0DRyOc4NQiZyUgVeHfpXe5WxuK7oEVrLgG5WUrOnQez/0I uWXrYdCwfztg2cTlYk2WefPWPOysAEP11TLvqEpsto0WpUU62mLtXDQZ3r4PPV6q/KDi xgbkNrcnLtYXN1QGiu8jmjDPqPyztc0axNvvzkoUYkuLDG3TBt0LeYhGrfz2gAugZrC4 i0lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KbjY7aIuc7IAjQmn1sxXdHMB6cOTkaQOGtjjzsthhOg=; fh=ycigHkwOPieh2u5PmcA89sNk/qPD1ZkdDlL8Mchfvw8=; b=w+XcfQTsJVhLNTmz9owxP5+Yun5Njo/gczpsOIC+xlAXhTXsoVq2aJir0ytmLPEhWg EISvtBH/jSs9cK1ysipGTOlyRLMLbM7rG0BOLqyXWgZ8Szc+9Mpy6ZPu1zpFCNWN9jWs V7Qv8QlQkIcVk+qs3X/MqyzU7/QjaQEBW7ZAWEcLXwS74JsgrbD4wu4RaI4Ps0tQTDln HcEnj3gqFl/JrBNU5uQ8cxnSVZKZxmLbrzMS3SIAhFy/tt9k2lVMyPDQ8522toF17ZGP T4dRhu6+PZqIoGvN26xDzrgTDSMG3tyQx4cwGjTPqp9eiCFdo/lKUQG9HCSisCmsQAMw tHmA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VYt3FHRa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t13-20020a056214154d00b00691711d64aasi8370967qvw.529.2024.04.08.08.55.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Apr 2024 08:55:58 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VYt3FHRa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtrJw-0001H0-5H; Mon, 08 Apr 2024 11:54:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtrJs-0001FQ-Il for qemu-devel@nongnu.org; Mon, 08 Apr 2024 11:54:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtrJq-0001pC-DS for qemu-devel@nongnu.org; Mon, 08 Apr 2024 11:54:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1712591641; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KbjY7aIuc7IAjQmn1sxXdHMB6cOTkaQOGtjjzsthhOg=; b=VYt3FHRaMnt9G3kNCVjq+bs7lsuxL+HsZa30P6bnBWPdknykHRSX10g3cZvgiOapvvhFOC iUSJYll5Vg4TIx3dlDRRxR8tGFree094uezgwWbYRihSeYvF4dB2zlZp7WJA8Wm19SmEgj Yey3MG6Bbe5pUeegCQszju6rAHkQAu4= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-613-rytjUqXSMzKbCTNbaScdUQ-1; Mon, 08 Apr 2024 11:54:00 -0400 X-MC-Unique: rytjUqXSMzKbCTNbaScdUQ-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-33ed489edcaso2739284f8f.3 for ; Mon, 08 Apr 2024 08:53:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712591638; x=1713196438; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KbjY7aIuc7IAjQmn1sxXdHMB6cOTkaQOGtjjzsthhOg=; b=sZLrtDdplZGrgmb8JVPZM9pBe+sptfS8B0X/AMyBJUZdoltrXf6KBUkSlsdV/YLg8n 4BjTlB2T14OMLsqhagmzSBYb9fihE/IerOEXsHrFnDANj6mTH056ZpCmGlIu7FZFkAAN 3j97CKcV80bwq26zZS4IjLBI1LibBgCZjJS2+TQRpU6gxO1oxh0vgTPzMJWMHZBUD1hZ NxFOy+V5fFXWLntE4qgCs/mHqq+remB5JichXWFp6KPxjRzBe9OqXfLWbgH9eeUDdIuv trod6BZHeAstOHoxv519cv/yuUpHBPvVYmkGi2W1RQk3Z+z1dKvHHurRr7wK2F87wE1y Z/Rg== X-Gm-Message-State: AOJu0Yxge0y6qPBiy5Q1tb8bobELr1GYcW/xB3ELQsmEyA4J1FywfYcZ KI9hrrx7WOpUKxDUwcws7Zs3Yfz3TtG5BWEkMPYpgkhqjGzlXJX0Fey8qalfwcNIEucYj77bGsI Oh0PW4qyIK6kde7YVm5qDrN+dm2pfSDs7j7C5HJw7j/T/KAhCwkIzMWex3fhYEUoxZBgJEeiFzd D6y4irydeo1MDbVazbvQOahGlwIOouzuxi3f7F X-Received: by 2002:a05:6000:1864:b0:343:5cac:8d9e with SMTP id d4-20020a056000186400b003435cac8d9emr9600562wri.33.1712591637834; Mon, 08 Apr 2024 08:53:57 -0700 (PDT) X-Received: by 2002:a05:6000:1864:b0:343:5cac:8d9e with SMTP id d4-20020a056000186400b003435cac8d9emr9600544wri.33.1712591637524; Mon, 08 Apr 2024 08:53:57 -0700 (PDT) Received: from avogadro.local ([151.95.152.232]) by smtp.gmail.com with ESMTPSA id a4-20020a5d4564000000b00343826878e8sm9251321wrc.38.2024.04.08.08.53.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 08:53:57 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: philmd@linaro.org Subject: [PATCH v2 08/18] hw: Include minimal source set in user emulation build Date: Mon, 8 Apr 2024 17:53:20 +0200 Message-ID: <20240408155330.522792-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240408155330.522792-1-pbonzini@redhat.com> References: <20240408155330.522792-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.494, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Only the files in hwcore_ss[] are required to link a user emulation binary. Have meson process the hw/ sub-directories if system emulation is selected, otherwise directly process hw/core/ to get hwcore_ss[], which is the only set required by user emulation. This removes about 10% from the time needed to run "../configure --disable-system --disable-tools --disable-guest-agent". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240404194757.9343-8-philmd@linaro.org> Signed-off-by: Paolo Bonzini --- meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 09668e3c5f5..e8ac846fc5a 100644 --- a/meson.build +++ b/meson.build @@ -3447,8 +3447,12 @@ subdir('qom') subdir('authz') subdir('crypto') subdir('ui') -subdir('hw') subdir('gdbstub') +if have_system + subdir('hw') +else + subdir('hw/core') +endif if enable_modules libmodulecommon = static_library('module-common', files('module-common.c') + genh, pic: true, c_args: '-DBUILD_DSO')