From nobody Fri May 17 02:09:01 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1712260179; cv=none; d=zohomail.com; s=zohoarc; b=f9ozDbAQMYv2oI9sakPvoaSGDo9JD9N7nDKspv4TcIEcrtbSaUirS0NHobBN8AbCqa2PsHX7e2LKwFjD/xzDd106HmEPPlSy/vTDhZSJpfdApbdJEdo9w33IjMEz/pzQ79l8zI8Yv2K/d9k0yhr3HwJk5nNPLbHSsvjE400JEew= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1712260179; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=FucEMxPV3laNKRFI1lQP1t/ZPj6SOkzkcUkgKiBhmrA=; b=FAUPNpR7cQPqtgGW3DeeOLPso1cWaENyxLVswA1ZlWBineE/7FIJXV9NwPN3X5bjWBHpc3Z/HCca1oCEK7nzYVLGfKk0ftNPKrZXYuYOH2RGpUvCRkM6ueZbJV3KApQJ9ooeZHo+nnU5gtywRFsTmZzAwE5eqN98tkT0IfEcsk0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1712260179603414.6838157698347; Thu, 4 Apr 2024 12:49:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsT4M-0006Wt-TO; Thu, 04 Apr 2024 15:48:18 -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 1rsT4H-0006WV-QW for qemu-devel@nongnu.org; Thu, 04 Apr 2024 15:48:14 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rsT4D-0000I6-QT for qemu-devel@nongnu.org; Thu, 04 Apr 2024 15:48:11 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3437f70078bso999664f8f.3 for ; Thu, 04 Apr 2024 12:48:08 -0700 (PDT) Received: from m1x-phil.lan ([176.187.216.111]) by smtp.gmail.com with ESMTPSA id d11-20020adff84b000000b0033e7a102cfesm158078wrq.64.2024.04.04.12.48.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 04 Apr 2024 12:48:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712260087; x=1712864887; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FucEMxPV3laNKRFI1lQP1t/ZPj6SOkzkcUkgKiBhmrA=; b=Jdjv+cp0cGc0iTOvaPnxnhR+8KhnjhT4L/JV1fhTNz7ek/QQg7fx5gVNPer6FLcRKS 6lBj3tF79fgymcHRjF+iVmEihQwyEi51Yurmmu913cqoI9gi2naKsaBC73qAcmnNAU7H N1V9PlCaPqdqpfNJgh1Qdge0R8qP62IvNnuPOqFIYEn2ZREMTVh6zoM4lPOh4JtBzOjD JGviGZUZ2lKJPNx2giJW9s+bEwz15nBgfX76sFOpSzTj200hbUwGHkRfqTRu8jf6Iove v4DhoRQllkpchfzEY+L0hd4H/+Ru9wICJMhJUoIICOroim6njWd203Umq9D4aiN4xgON 3x+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712260087; x=1712864887; 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=FucEMxPV3laNKRFI1lQP1t/ZPj6SOkzkcUkgKiBhmrA=; b=OkaVgq18x59bhEYdLPh+/x/ubmVluL5zkDgZqeBvgxhHV2xTeOIhsPVxnGJR/rpweN UfGW3JWGYcRZGeHYY1bic9pCpTNqewHG2nL8DEU/2P5hMs+jAYSvILgFItf543DYCK6S /RMcwbWOwUhTdqVQXgRnG/616SMKjieui488Sa4T8DEZm/I5CWQo3MGjhvDrM13P+BkK g4oPVxacCyxO7HBHeCc6FIlIwsnEL7H6ZJ8bbQ9btgwd7z3qW3Kjfh9pXYoQGakJ6/SH zdZgYPDxLUQ+ChzalLcYErXjKLnkOrsC6MP3wH20WB6ady7iWxeMUh+RrKkugLsOsh3R sddw== X-Forwarded-Encrypted: i=1; AJvYcCUKrk6CfFxdScrOnQaXzm0GqltEa2Cl15phC1RyiumG/9mnLiI57dJt1qgsvb1Tc3YsC+W2BXcFVrDksv3473bXTBuuhKs= X-Gm-Message-State: AOJu0YyB6P/r1wRWqk/Sv2w+Obn+Y2HXEdLZOl51DEj5WKqi3mmAcggJ qbEgJAdaRdbc1Z5QFTMHSHfiE5+lE2vYwu+1wbz3g8Dnaagl8Tu2lfPW7XuHQqU= X-Google-Smtp-Source: AGHT+IHelurwZcRoNT93+kyXlOYarqOMuHymrO/28BJtMAGQ1IDHy7bJZL8Fs+ufvbap6cK1vAiiVA== X-Received: by 2002:adf:cd91:0:b0:343:9884:2fe1 with SMTP id q17-20020adfcd91000000b0034398842fe1mr2595576wrj.68.1712260087322; Thu, 04 Apr 2024 12:48:07 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Michael Tokarev , Laurent Vivier , qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Jason Wang , Andrew Melnychenko , Yuri Benditovich Subject: [PATCH-for-9.1 1/7] ebpf: Restrict to system emulation Date: Thu, 4 Apr 2024 21:47:51 +0200 Message-ID: <20240404194757.9343-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240404194757.9343-1-philmd@linaro.org> References: <20240404194757.9343-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1712260180149100001 eBPF is not used in user emulation. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- ebpf/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ebpf/meson.build b/ebpf/meson.build index c5bf9295a2..bff6156f51 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_fal= se: files('ebpf_rss-stub.c')) +system_ss.add(when: libbpf, if_true: files('ebpf.c', 'ebpf_rss.c'), if_fal= se: files('ebpf_rss-stub.c')) --=20 2.41.0 From nobody Fri May 17 02:09:01 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1712260180; cv=none; d=zohomail.com; s=zohoarc; b=SUNZV5QdBQ7zGlD+KaqzGyLIIdBc2yFkL6LqN0nMWqM21FI31pV2Y2WXovNpidNJqNkxLy+s6kbZwX8feW84VPalXD5xbviA9iqQtNEpoXFpAegAPzJiOZgt15HpClU1uf2VM2xOOb9tJSTMlYQ5ZIfeiVhxQUZDbjoRecQpHSY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1712260180; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=4RBM9iGLnlKBG0LPukIWmtJI1ZJZDBhgI9dJ0vdHJw0=; b=LKKp1lL9Zdk91ws7KohNhexy/aUVar81Yszfsq2rKhvOjcLfIhf37O70Q8YHawSqWkeq7ulR36HDRzOrzKJMCSzzHRhiTyrG3tFstH3fVAQXVmvlGzirvMxckhrmOfzyc2z8gqunxFt78OUtMQPkeQLtRMJqWXUy1N7nVL690wk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1712260180164802.7398076641543; Thu, 4 Apr 2024 12:49:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsT4P-0006XC-5k; Thu, 04 Apr 2024 15:48:21 -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 1rsT4M-0006Wl-Gn for qemu-devel@nongnu.org; Thu, 04 Apr 2024 15:48:18 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rsT4I-0000JC-1l for qemu-devel@nongnu.org; Thu, 04 Apr 2024 15:48:15 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4155819f710so10161265e9.2 for ; Thu, 04 Apr 2024 12:48:13 -0700 (PDT) Received: from m1x-phil.lan ([176.187.216.111]) by smtp.gmail.com with ESMTPSA id k7-20020a5d5187000000b003434c764f01sm146600wrv.107.2024.04.04.12.48.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 04 Apr 2024 12:48:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712260093; x=1712864893; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4RBM9iGLnlKBG0LPukIWmtJI1ZJZDBhgI9dJ0vdHJw0=; b=r012QBM9k29iolkwC1jbAk/5PbxI+X54q3VHY1r1YkbVKQapvbMjShLAZ4MvDnPp+j U2TAyoHZDlY9e1ZxgrwsScvkzL8l/5GN/OI4Bda8y7Q/tqeSxOsVAuhfK6dhjwSCmsDa uBi0js9hiulwBz9ST5kgPMR18wLXXMxFJr+RZCWUdyz2hjt96nZdUCdKV51SPvl7me2F idc3RWNxMVjOYQg77nt753wXs/aej0VbFFeDx39XO9HZ612+3fXELUvE6+d9Gm2HdOGn NuFZuEcqVBYM0p3tBZdjFDWKsKxqKLVbVOcUuU9GXAbFFUn1jyzPjKYJvE/OFN9bR3B8 CYEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712260093; x=1712864893; 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=4RBM9iGLnlKBG0LPukIWmtJI1ZJZDBhgI9dJ0vdHJw0=; b=tFD9v1R9Zl5MNCsuRkWxwyfJjrypBMSjxZy+LIIIXUyboEruJMM4GvykUYP7DkQo5h 9ZUUhuHeT3LmgHopqyn9rDvgTw64ceRXoXhiUStRTfMIPxmWyiXxwWDo3PEBrXN/8BSj DHL4h23li4I+/gYjm/OYmW1lNXyVfsvEr/yhdMKz+7yHN34tQi9SkPmnvJX/YnM3yhau 0qW3eq1pWay/xvzba4dgFMlElBIjw7lTaYSTC2P6kQGP13cYYGa573pY+/TbWz93KhyF z6fy2C820JMroEz7GYzqG8gHdSHP54cch+G+/DffVYSG4UxkoteM8u4JGMjM02o3Ml4g dGzw== X-Forwarded-Encrypted: i=1; AJvYcCX0QGMw1hD1GOdeYik+F/6IqtrETk5BUxT9p/+br/cNDCNHjAT8Em5zqqKo9/Lnbvt2cCrOOjL33hdMNzRr4FyM2cjytE0= X-Gm-Message-State: AOJu0YwL+2SEcqTgSqKbzVQ6xUApqIUT9zkYyKV+UCnBtnYyXUg8x80G w6FWDgcqCphMM+XNVAT7L/f3BoS7KJiuwwulGzrHJW5f72CH3HXnat+p+GaqoX7CdEFR1ezZmnI n X-Google-Smtp-Source: AGHT+IEJGGWfe9DZzc11Y8Trl37kEwmZHpOCRfmkweYMGtPM0HCqEZmzN2gtufU+Ykt7SnF9T9QlbQ== X-Received: by 2002:a05:600c:1c87:b0:414:63c2:23cc with SMTP id k7-20020a05600c1c8700b0041463c223ccmr539389wms.2.1712260092706; Thu, 04 Apr 2024 12:48:12 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Michael Tokarev , Laurent Vivier , qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth Subject: [PATCH-for-9.1 2/7] yank: Restrict to system emulation Date: Thu, 4 Apr 2024 21:47:52 +0200 Message-ID: <20240404194757.9343-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240404194757.9343-1-philmd@linaro.org> References: <20240404194757.9343-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1712260182105100007 The yank feature is not used in user emulation. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- util/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/meson.build b/util/meson.build index 0ef9886be0..247f55a80d 100644 --- a/util/meson.build +++ b/util/meson.build @@ -60,7 +60,6 @@ util_ss.add(files('stats64.c')) util_ss.add(files('systemd.c')) util_ss.add(files('transactions.c')) util_ss.add(files('guest-random.c')) -util_ss.add(files('yank.c')) util_ss.add(files('int128.c')) util_ss.add(files('memalign.c')) util_ss.add(files('interval-tree.c')) @@ -76,6 +75,7 @@ if have_system if host_os =3D=3D 'linux' util_ss.add(files('userfaultfd.c')) endif + util_ss.add(files('yank.c')) endif =20 if have_block or have_ga --=20 2.41.0 From nobody Fri May 17 02:09:01 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1712260175; cv=none; d=zohomail.com; s=zohoarc; b=VdXdBgbXtCfH27N0jjEMNYZFbfXVNrEVqqe/LcHIOabXmOrVk3mbbZkg7jfQkVEWFluxYxcgNFo8u3CRKJXqLAyoH+7MUAEMP2MIKP9RuM0KKu/+YEObKT9OlpeEm1qLTbhAVyQLaau3R3gQoKJOVnor8Z8vY7m8f4PsOtMkH8w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1712260175; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=KWGr/pVGop5k8ihIK6m+XFrYPybC/J9z+nBHWQ3TWxc=; b=TJTGCeWyNm1GpNDQZkfrtRLI60MLFcYr8ZrAMWs0REwKLwLFplTJAhnVf3pXz28bXBWllwQScnlTKe3qtQPOLa/KMO37XTlnMzcSVf4baF6soRoFiu1mn3r2u8+5JaLWKPQGGQkwsn5BHAxkL/4Xlf6GNT8ApYab4Xe19ylxOc4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1712260175413604.3022659275714; Thu, 4 Apr 2024 12:49:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsT4U-0006YB-7s; Thu, 04 Apr 2024 15:48:26 -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 1rsT4R-0006Xp-QG for qemu-devel@nongnu.org; Thu, 04 Apr 2024 15:48:24 -0400 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rsT4O-0000K9-PQ for qemu-devel@nongnu.org; Thu, 04 Apr 2024 15:48:22 -0400 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2d094bc2244so14731261fa.1 for ; Thu, 04 Apr 2024 12:48:19 -0700 (PDT) Received: from m1x-phil.lan ([176.187.216.111]) by smtp.gmail.com with ESMTPSA id fs20-20020a05600c3f9400b0041628f694dfsm240457wmb.23.2024.04.04.12.48.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 04 Apr 2024 12:48:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712260098; x=1712864898; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KWGr/pVGop5k8ihIK6m+XFrYPybC/J9z+nBHWQ3TWxc=; b=dyrASMkKpaNbnYIPK66FFfz4w0qE8KFVd4afCNaF5lxfPeHcsMJHIUodLXA8d147fD w1e8Dlio/9oq+pfaR05NgSu0CuX4lPlcRKrjlgnVWDS7HevGUD+6sC3XGB0K/R9cTH2X ewC4j5Rgebcsjs9YxTRLIBNxvxsyC1HT9TH+4OfS4F0xFeFcHKcOrQMcrrqlaQ4mfvqP vwDBEWhTzZdYdMiyaMdfUo1Da1z71xrkcBGVM2KwIMGsacMmwkAPWyPm4dHgLOQRas6z meb7qSzarjut9WKAixVeTtllW/+5olXUQnPxSgBtCEXjQeBBWSxVXiKJM7wbwGmbLIqu VBLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712260098; x=1712864898; 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=KWGr/pVGop5k8ihIK6m+XFrYPybC/J9z+nBHWQ3TWxc=; b=pwOyCjgvoN3bqNvcbQXns+iB3p07rmVTqgMqhg0Z7RYyoul5gfsrUrouaLPwR5Gc0D sMG2NuPLediuHMzZUS/GP/u2DQsRKBoHxOFoy55NqZPK0LMpKcwt3YtZBdOi88RExk/U XUsiikDhgJqUSO2EVOe0m9jIl405xeY+wNoyqiHj5a+s5HugFHGXCB8SuabU17iOn6ZU SP2YDgjVTilWTLvPwTQnVg0ThViClDmVGsbF97m9gFr/9KqFLlhDO3dUZtn+yeQTNQFJ d6W/prWOpcbJJF3vuW/xjfj3/eKBpO02PfZBA7v+qGQcvXfREamOgRVhG/rWcgr1H+j+ lQUg== X-Forwarded-Encrypted: i=1; AJvYcCW2nGpK/+Vbs2W0RSXOuoz6jD1TWJGvwGy9KM8plI0ZjR+70tWf+DuP2kzxLFdQ160PivJyXr96432OCErD9a9jitzBt+w= X-Gm-Message-State: AOJu0Yw1JlnN2nfMOtO/NZi2xX+Nh9uj2RbkZiPXiMrtUMThbKgCH83J /biOBGmIOx4cSSF6e8p5Ra+6YKZueupZjhO1DwyLqGSvVFR1JIFX6XRqL+TJv6E= X-Google-Smtp-Source: AGHT+IHzMWMi1KznhGLPn6i21HeMbwPw3oZBDTNnM4bNZfJjp9kAgM+B0XU4NgGgLB2oPt5Vrnxzxg== X-Received: by 2002:a2e:9f44:0:b0:2d8:34ec:54e6 with SMTP id v4-20020a2e9f44000000b002d834ec54e6mr218442ljk.33.1712260098101; Thu, 04 Apr 2024 12:48:18 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Michael Tokarev , Laurent Vivier , qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth Subject: [PATCH-for-9.1 3/7] monitor: Rework stubs to simplify user emulation linking Date: Thu, 4 Apr 2024 21:47:53 +0200 Message-ID: <20240404194757.9343-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240404194757.9343-1-philmd@linaro.org> References: <20240404194757.9343-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::236; envelope-from=philmd@linaro.org; helo=mail-lj1-x236.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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1712260176116100001 Currently monitor stubs are scattered in 3 files. Merge these stubs in 2 files, a generic one (monitor-core) included in all builds (in particular user emulation), and a less generic one to be included by tools and system emulation. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- stubs/fdset.c | 17 ----------------- stubs/monitor-core.c | 20 +++++++++++++++----- stubs/monitor.c | 8 ++++++-- stubs/meson.build | 5 +++-- 4 files changed, 24 insertions(+), 26 deletions(-) delete mode 100644 stubs/fdset.c diff --git a/stubs/fdset.c b/stubs/fdset.c deleted file mode 100644 index 56b3663d58..0000000000 --- a/stubs/fdset.c +++ /dev/null @@ -1,17 +0,0 @@ -#include "qemu/osdep.h" -#include "monitor/monitor.h" - -int monitor_fdset_dup_fd_add(int64_t fdset_id, int flags) -{ - errno =3D ENOSYS; - return -1; -} - -int64_t monitor_fdset_dup_fd_find(int dup_fd) -{ - return -1; -} - -void monitor_fdset_dup_fd_remove(int dupfd) -{ -} diff --git a/stubs/monitor-core.c b/stubs/monitor-core.c index afa477aae6..72e40bcc15 100644 --- a/stubs/monitor-core.c +++ b/stubs/monitor-core.c @@ -1,6 +1,7 @@ +/* Monitor stub required for user emulation */ #include "qemu/osdep.h" #include "monitor/monitor.h" -#include "qapi/qapi-emit-events.h" +#include "../monitor/monitor-internal.h" =20 Monitor *monitor_cur(void) { @@ -12,11 +13,22 @@ Monitor *monitor_set_cur(Coroutine *co, Monitor *mon) return NULL; } =20 -void monitor_init_qmp(Chardev *chr, bool pretty, Error **errp) +int monitor_fdset_dup_fd_add(int64_t fdset_id, int flags) +{ + errno =3D ENOSYS; + return -1; +} + +int64_t monitor_fdset_dup_fd_find(int dup_fd) +{ + return -1; +} + +void monitor_fdset_dup_fd_remove(int dupfd) { } =20 -void qapi_event_emit(QAPIEvent event, QDict *qdict) +void monitor_fdsets_cleanup(void) { } =20 @@ -24,5 +36,3 @@ int monitor_vprintf(Monitor *mon, const char *fmt, va_lis= t ap) { abort(); } - - diff --git a/stubs/monitor.c b/stubs/monitor.c index 20786ac4ff..2fc4dc1493 100644 --- a/stubs/monitor.c +++ b/stubs/monitor.c @@ -1,7 +1,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" +#include "qapi/qapi-emit-events.h" #include "monitor/monitor.h" -#include "../monitor/monitor-internal.h" =20 int monitor_get_fd(Monitor *mon, const char *name, Error **errp) { @@ -13,6 +13,10 @@ void monitor_init_hmp(Chardev *chr, bool use_readline, E= rror **errp) { } =20 -void monitor_fdsets_cleanup(void) +void monitor_init_qmp(Chardev *chr, bool pretty, Error **errp) +{ +} + +void qapi_event_emit(QAPIEvent event, QDict *qdict) { } diff --git a/stubs/meson.build b/stubs/meson.build index 0bf25e6ca5..ca1bc07d30 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -10,7 +10,6 @@ stub_ss.add(files('qemu-timer-notify-cb.c')) stub_ss.add(files('icount.c')) stub_ss.add(files('dump.c')) stub_ss.add(files('error-printf.c')) -stub_ss.add(files('fdset.c')) stub_ss.add(files('gdbstub.c')) stub_ss.add(files('get-vm-name.c')) stub_ss.add(files('graph-lock.c')) @@ -28,7 +27,9 @@ if libaio.found() endif stub_ss.add(files('migr-blocker.c')) stub_ss.add(files('module-opts.c')) -stub_ss.add(files('monitor.c')) +if have_system or have_tools + stub_ss.add(files('monitor.c')) +endif stub_ss.add(files('monitor-core.c')) stub_ss.add(files('physmem.c')) stub_ss.add(files('qemu-timer-notify-cb.c')) --=20 2.41.0 From nobody Fri May 17 02:09:01 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1712260194; cv=none; d=zohomail.com; s=zohoarc; b=K1NGt62lGFZk2p1q8XkmBmzLMQgt4RNKmLYlB2J/Jtf3zeI1gulS/ARakBA6pcBGAEx3AamG9WaUypc+u92p56bL6gv2XbllRu1NcYqknMLnvoTHnvApMLKKeYbt+RnaIUodNv6YGKasWBRc/nYxcPBeLq///MAiX+U/sOR2Y68= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1712260194; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=aoLqAKUnWG07Qqq94XYH6NjRAB/Z33lL8UXEZ52j+Q0=; b=njzyP0RdKgUpJuF8oV5zldH7ukWcJmmD6CX0LXqgqwxW29oS2s4ASRKrOSXZbbIgZY+Wshr7KFMad5K7LwYVL1tm/Zl25N7eNd1F0jjv7DTN9Yu2n7lg59U64dohXi9ZHAp2psSjQ1yM/pO2TOX/jJOft186i1hgb/H5gWBQyz4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1712260194848236.67545317327665; Thu, 4 Apr 2024 12:49:54 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsT4Z-0006Z0-4J; Thu, 04 Apr 2024 15:48:31 -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 1rsT4W-0006Yd-WA for qemu-devel@nongnu.org; Thu, 04 Apr 2024 15:48:29 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rsT4U-0000LB-EI for qemu-devel@nongnu.org; Thu, 04 Apr 2024 15:48:28 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4162c210c33so4760425e9.0 for ; Thu, 04 Apr 2024 12:48:26 -0700 (PDT) Received: from m1x-phil.lan ([176.187.216.111]) by smtp.gmail.com with ESMTPSA id fc9-20020a05600c524900b004162d0676cdsm228087wmb.29.2024.04.04.12.48.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 04 Apr 2024 12:48:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712260104; x=1712864904; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aoLqAKUnWG07Qqq94XYH6NjRAB/Z33lL8UXEZ52j+Q0=; b=d9j6nG9keKA1GjJfv589GEHtJ57ylR00ITtGUnEOTahERCmGaOBK20MEru84olqkd9 mBSX2GFBFV7hMyQ5+eCyC8UVqMoHXyRLRWGNPz2daTPbZYETY+chwFwvipGhw04r586l q5z772nDlOrWCV3NPGB0Cf6VaiaETUKbLcn4/Bp8NtEBhkUM9Txi13xSKX7L+1Mfy5d5 aV4QnBuqjjO0ZN3c9+gliIta+iOSQJBWJ4t1nuVHsMTEUvq2Zcdt5DX8bAXH6XgJNnPf 4kcggEDjrdjSnZA660Rp2cTPUvkzhO0yRI34SoeuGVVm9Ou6KMD4zZr70U6NwACUhJMO w8KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712260104; x=1712864904; 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=aoLqAKUnWG07Qqq94XYH6NjRAB/Z33lL8UXEZ52j+Q0=; b=h36TruTWKsyc/uN+qY1sKzCjte5WgPslb1BgX2jClx6cM/DCbfS1DiRfTBvet/12IP Z31Dl4xNZIXBTsQ6c7xIXSgNJSTIEL/bj9BVriig0T1nbUiec6h2DlRsoLUC3RLshjYs ce0sSRwkuxuzi1aihI1mfaWTE23T0fn0nUoCEa2wFdCVfd127tz5V0iNxVo2LWPUXXzd lZ6O2LXaEv/sPffXS1imDsWjgGifZTPj4LOIFh7zpZw48Wv5izsyzZcOEW7+Stch8gea z4XQo0HIjdjLgVqKKlnLAFUij71SnLQrM1IZA9KI0mUKpDWV3Ut/U6gm6VjHF5jc9pdt qMlA== X-Forwarded-Encrypted: i=1; AJvYcCVJXlf0XMjI/jnAoES4BcHOoxBCJeAw1kdLrjJliJn2MWX8r0AnQboO6EVpdByC7VeNol3eyghzKMeUR0cd0Fn76lk+Clk= X-Gm-Message-State: AOJu0Yz31HRvp8VMSrA5PuA71TGck5YL4BPe6pBVHtFWMFzkjl1OG1Us mDBTy7MvI1nxisgetPU71KaMQ0gZHTv1qvPMpoqir533OvMLNK9wGL0uvhTXpdw= X-Google-Smtp-Source: AGHT+IGFWyg03HMLbT0CsVHbhdgxGmJjKJEkdTqU4XgrYpOV6/5HmyG7fsDxCX75q/UyVHyGBZOuJA== X-Received: by 2002:a05:600c:4a05:b0:416:2b19:beef with SMTP id c5-20020a05600c4a0500b004162b19beefmr1771569wmp.11.1712260103837; Thu, 04 Apr 2024 12:48:23 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Michael Tokarev , Laurent Vivier , qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth Subject: [PATCH-for-9.1 4/7] util/qemu-config: Extract QMP commands to qemu-config-qmp.c Date: Thu, 4 Apr 2024 21:47:54 +0200 Message-ID: <20240404194757.9343-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240404194757.9343-1-philmd@linaro.org> References: <20240404194757.9343-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1712260196231100003 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=C3=A9 --- include/qemu/config-file.h | 3 + util/qemu-config-qmp.c | 206 +++++++++++++++++++++++++++++++++++++ util/qemu-config.c | 204 +----------------------------------- util/meson.build | 1 + 4 files changed, 212 insertions(+), 202 deletions(-) create mode 100644 util/qemu-config-qmp.c diff --git a/include/qemu/config-file.h b/include/qemu/config-file.h index b82a778123..8b9d6df173 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); =20 +extern QemuOptsList *vm_config_groups[48]; +extern QemuOptsList *drive_config_groups[5]; + void qemu_add_opts(QemuOptsList *list); void qemu_add_drive_opts(QemuOptsList *list); int qemu_global_option(const char *str); diff --git a/util/qemu-config-qmp.c b/util/qemu-config-qmp.c new file mode 100644 index 0000000000..24477a0e44 --- /dev/null +++ b/util/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 =3D NULL; + CommandLineParameterInfo *info; + int i; + + for (i =3D 0; desc[i].name !=3D NULL; i++) { + info =3D g_malloc0(sizeof(*info)); + info->name =3D g_strdup(desc[i].name); + + switch (desc[i].type) { + case QEMU_OPT_STRING: + info->type =3D COMMAND_LINE_PARAMETER_TYPE_STRING; + break; + case QEMU_OPT_BOOL: + info->type =3D COMMAND_LINE_PARAMETER_TYPE_BOOLEAN; + break; + case QEMU_OPT_NUMBER: + info->type =3D COMMAND_LINE_PARAMETER_TYPE_NUMBER; + break; + case QEMU_OPT_SIZE: + info->type =3D COMMAND_LINE_PARAMETER_TYPE_SIZE; + break; + } + + info->help =3D g_strdup(desc[i].help); + info->q_default =3D 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 =3D head; + while (cur->next) { + pre_entry =3D head; + while (pre_entry !=3D cur->next) { + if (!strcmp(pre_entry->value->name, cur->next->value->name)) { + del_entry =3D cur->next; + cur->next =3D cur->next->next; + del_entry->next =3D NULL; + qapi_free_CommandLineParameterInfoList(del_entry); + break; + } + pre_entry =3D pre_entry->next; + } + cur =3D cur->next; + } +} + +/* merge the description items of two parameter infolists */ +static void connect_infolist(CommandLineParameterInfoList *head, + CommandLineParameterInfoList *new) +{ + CommandLineParameterInfoList *cur; + + cur =3D head; + while (cur->next) { + cur =3D cur->next; + } + cur->next =3D new; +} + +/* access all the local QemuOptsLists for drive option */ +static CommandLineParameterInfoList *get_drive_infolist(void) +{ + CommandLineParameterInfoList *head =3D NULL, *cur; + int i; + + for (i =3D 0; drive_config_groups[i] !=3D NULL; i++) { + if (!head) { + head =3D query_option_descs(drive_config_groups[i]->desc); + } else { + cur =3D query_option_descs(drive_config_groups[i]->desc); + connect_infolist(head, cur); + } + } + cleanup_infolist(head); + + return head; +} + +static CommandLineParameterInfo *objprop_to_cmdline_prop(ObjectProperty *p= rop) +{ + CommandLineParameterInfo *info; + + info =3D g_malloc0(sizeof(*info)); + info->name =3D g_strdup(prop->name); + + if (g_str_equal(prop->type, "bool") || g_str_equal(prop->type, "OnOffA= uto")) { + info->type =3D COMMAND_LINE_PARAMETER_TYPE_BOOLEAN; + } else if (g_str_equal(prop->type, "int")) { + info->type =3D COMMAND_LINE_PARAMETER_TYPE_NUMBER; + } else if (g_str_equal(prop->type, "size")) { + info->type =3D COMMAND_LINE_PARAMETER_TYPE_SIZE; + } else { + info->type =3D COMMAND_LINE_PARAMETER_TYPE_STRING; + } + + if (prop->description) { + info->help =3D g_strdup(prop->description); + } + + return info; +} + +static CommandLineParameterInfoList *query_all_machine_properties(void) +{ + CommandLineParameterInfoList *params =3D NULL, *clpiter; + CommandLineParameterInfo *info; + GSList *machines, *curr_mach; + ObjectPropertyIterator op_iter; + ObjectProperty *prop; + bool is_new; + + machines =3D object_class_get_list(TYPE_MACHINE, false); + assert(machines); + + /* Loop over all machine classes */ + for (curr_mach =3D machines; curr_mach; curr_mach =3D curr_mach->next)= { + object_class_property_iter_init(&op_iter, curr_mach->data); + /* ... and over the properties of each machine: */ + while ((prop =3D object_property_iter_next(&op_iter))) { + if (!prop->set) { + continue; + } + /* + * Check whether the property has already been put into the li= st + * (via another machine class) + */ + is_new =3D true; + for (clpiter =3D params; clpiter !=3D NULL; clpiter =3D clpite= r->next) { + if (g_str_equal(clpiter->value->name, prop->name)) { + is_new =3D false; + break; + } + } + /* If it hasn't been added before, add it now to the list */ + if (is_new) { + info =3D objprop_to_cmdline_prop(prop); + QAPI_LIST_PREPEND(params, info); + } + } + } + + g_slist_free(machines); + + /* Add entry for the "type" parameter */ + info =3D g_malloc0(sizeof(*info)); + info->name =3D g_strdup("type"); + info->type =3D COMMAND_LINE_PARAMETER_TYPE_STRING; + info->help =3D g_strdup("machine type"); + QAPI_LIST_PREPEND(params, info); + + return params; +} + +CommandLineOptionInfoList *qmp_query_command_line_options(const char *opti= on, + Error **errp) +{ + CommandLineOptionInfoList *conf_list =3D NULL; + CommandLineOptionInfo *info; + int i; + + for (i =3D 0; vm_config_groups[i] !=3D NULL; i++) { + if (!option || !strcmp(option, vm_config_groups[i]->name)) { + info =3D g_malloc0(sizeof(*info)); + info->option =3D g_strdup(vm_config_groups[i]->name); + if (!strcmp("drive", vm_config_groups[i]->name)) { + info->parameters =3D get_drive_infolist(); + } else { + info->parameters =3D + query_option_descs(vm_config_groups[i]->desc); + } + QAPI_LIST_PREPEND(conf_list, info); + } + } + + if (!option || !strcmp(option, "machine")) { + info =3D g_malloc0(sizeof(*info)); + info->option =3D g_strdup("machine"); + info->parameters =3D query_all_machine_properties(); + QAPI_LIST_PREPEND(conf_list, info); + } + + if (conf_list =3D=3D 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 42076efe1e..a90c18dad2 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" =20 -static QemuOptsList *vm_config_groups[48]; -static QemuOptsList *drive_config_groups[5]; +QemuOptsList *vm_config_groups[48]; +QemuOptsList *drive_config_groups[5]; =20 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; } =20 -static CommandLineParameterInfoList *query_option_descs(const QemuOptDesc = *desc) -{ - CommandLineParameterInfoList *param_list =3D NULL; - CommandLineParameterInfo *info; - int i; - - for (i =3D 0; desc[i].name !=3D NULL; i++) { - info =3D g_malloc0(sizeof(*info)); - info->name =3D g_strdup(desc[i].name); - - switch (desc[i].type) { - case QEMU_OPT_STRING: - info->type =3D COMMAND_LINE_PARAMETER_TYPE_STRING; - break; - case QEMU_OPT_BOOL: - info->type =3D COMMAND_LINE_PARAMETER_TYPE_BOOLEAN; - break; - case QEMU_OPT_NUMBER: - info->type =3D COMMAND_LINE_PARAMETER_TYPE_NUMBER; - break; - case QEMU_OPT_SIZE: - info->type =3D COMMAND_LINE_PARAMETER_TYPE_SIZE; - break; - } - - info->help =3D g_strdup(desc[i].help); - info->q_default =3D 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 =3D head; - while (cur->next) { - pre_entry =3D head; - while (pre_entry !=3D cur->next) { - if (!strcmp(pre_entry->value->name, cur->next->value->name)) { - del_entry =3D cur->next; - cur->next =3D cur->next->next; - del_entry->next =3D NULL; - qapi_free_CommandLineParameterInfoList(del_entry); - break; - } - pre_entry =3D pre_entry->next; - } - cur =3D cur->next; - } -} - -/* merge the description items of two parameter infolists */ -static void connect_infolist(CommandLineParameterInfoList *head, - CommandLineParameterInfoList *new) -{ - CommandLineParameterInfoList *cur; - - cur =3D head; - while (cur->next) { - cur =3D cur->next; - } - cur->next =3D new; -} - -/* access all the local QemuOptsLists for drive option */ -static CommandLineParameterInfoList *get_drive_infolist(void) -{ - CommandLineParameterInfoList *head =3D NULL, *cur; - int i; - - for (i =3D 0; drive_config_groups[i] !=3D NULL; i++) { - if (!head) { - head =3D query_option_descs(drive_config_groups[i]->desc); - } else { - cur =3D query_option_descs(drive_config_groups[i]->desc); - connect_infolist(head, cur); - } - } - cleanup_infolist(head); - - return head; -} - -static CommandLineParameterInfo *objprop_to_cmdline_prop(ObjectProperty *p= rop) -{ - CommandLineParameterInfo *info; - - info =3D g_malloc0(sizeof(*info)); - info->name =3D g_strdup(prop->name); - - if (g_str_equal(prop->type, "bool") || g_str_equal(prop->type, "OnOffA= uto")) { - info->type =3D COMMAND_LINE_PARAMETER_TYPE_BOOLEAN; - } else if (g_str_equal(prop->type, "int")) { - info->type =3D COMMAND_LINE_PARAMETER_TYPE_NUMBER; - } else if (g_str_equal(prop->type, "size")) { - info->type =3D COMMAND_LINE_PARAMETER_TYPE_SIZE; - } else { - info->type =3D COMMAND_LINE_PARAMETER_TYPE_STRING; - } - - if (prop->description) { - info->help =3D g_strdup(prop->description); - } - - return info; -} - -static CommandLineParameterInfoList *query_all_machine_properties(void) -{ - CommandLineParameterInfoList *params =3D NULL, *clpiter; - CommandLineParameterInfo *info; - GSList *machines, *curr_mach; - ObjectPropertyIterator op_iter; - ObjectProperty *prop; - bool is_new; - - machines =3D object_class_get_list(TYPE_MACHINE, false); - assert(machines); - - /* Loop over all machine classes */ - for (curr_mach =3D machines; curr_mach; curr_mach =3D curr_mach->next)= { - object_class_property_iter_init(&op_iter, curr_mach->data); - /* ... and over the properties of each machine: */ - while ((prop =3D object_property_iter_next(&op_iter))) { - if (!prop->set) { - continue; - } - /* - * Check whether the property has already been put into the li= st - * (via another machine class) - */ - is_new =3D true; - for (clpiter =3D params; clpiter !=3D NULL; clpiter =3D clpite= r->next) { - if (g_str_equal(clpiter->value->name, prop->name)) { - is_new =3D false; - break; - } - } - /* If it hasn't been added before, add it now to the list */ - if (is_new) { - info =3D objprop_to_cmdline_prop(prop); - QAPI_LIST_PREPEND(params, info); - } - } - } - - g_slist_free(machines); - - /* Add entry for the "type" parameter */ - info =3D g_malloc0(sizeof(*info)); - info->name =3D g_strdup("type"); - info->type =3D COMMAND_LINE_PARAMETER_TYPE_STRING; - info->help =3D g_strdup("machine type"); - QAPI_LIST_PREPEND(params, info); - - return params; -} - -CommandLineOptionInfoList *qmp_query_command_line_options(const char *opti= on, - Error **errp) -{ - CommandLineOptionInfoList *conf_list =3D NULL; - CommandLineOptionInfo *info; - int i; - - for (i =3D 0; vm_config_groups[i] !=3D NULL; i++) { - if (!option || !strcmp(option, vm_config_groups[i]->name)) { - info =3D g_malloc0(sizeof(*info)); - info->option =3D g_strdup(vm_config_groups[i]->name); - if (!strcmp("drive", vm_config_groups[i]->name)) { - info->parameters =3D get_drive_infolist(); - } else { - info->parameters =3D - query_option_descs(vm_config_groups[i]->desc); - } - QAPI_LIST_PREPEND(conf_list, info); - } - } - - if (!option || !strcmp(option, "machine")) { - info =3D g_malloc0(sizeof(*info)); - info->option =3D g_strdup("machine"); - info->parameters =3D query_all_machine_properties(); - QAPI_LIST_PREPEND(conf_list, info); - } - - if (conf_list =3D=3D 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/util/meson.build b/util/meson.build index 247f55a80d..636b17a414 100644 --- a/util/meson.build +++ b/util/meson.build @@ -75,6 +75,7 @@ if have_system if host_os =3D=3D 'linux' util_ss.add(files('userfaultfd.c')) endif + util_ss.add(files('qemu-config-qmp.c')) util_ss.add(files('yank.c')) endif =20 --=20 2.41.0 From nobody Fri May 17 02:09:01 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1712260140; cv=none; d=zohomail.com; s=zohoarc; b=Mjh2KwxzIBjxcWi+26Eyv8bTR1SXPz0a1H+a78r1hvirzPe1PEegEJ1Czf1LvYYQauOCWIgA9N5EsAzq38h+kbJnxC84drWOT8q/dKlhSX5SV9d9dnAWGIpCrseWZPmzfa4B0qSiPtUOflRLUUUPx0ovwvyiusg0/qXaskUDuxY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1712260140; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=hKv08uQvIwv4CwaxEI6a9mBVsBiKx/3Avu57+y233jE=; b=e2wAYIAC0awDUqRpg8SX6s2U4kO/IrujR6f+KxQ3rFBmXA+ageEyvLubW8AOksQxxB5usRR/mOM0zp61QJRtoC8O6hUHeR/YT42QhbyvvqkX3VMzfR75xSDxzYr7g+CRUJX4hPq0LBhApKNDX2zjLpjiv6tlLZRf3GS/VxeJfE0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1712260140279441.78937746138513; Thu, 4 Apr 2024 12:49:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsT4b-0006ZZ-TD; Thu, 04 Apr 2024 15:48:33 -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 1rsT4a-0006Z9-2l for qemu-devel@nongnu.org; Thu, 04 Apr 2024 15:48:32 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rsT4Y-0000NC-I3 for qemu-devel@nongnu.org; Thu, 04 Apr 2024 15:48:31 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-343dc588c86so107202f8f.3 for ; Thu, 04 Apr 2024 12:48:30 -0700 (PDT) Received: from m1x-phil.lan ([176.187.216.111]) by smtp.gmail.com with ESMTPSA id r18-20020adfce92000000b00343d1d09550sm159871wrn.60.2024.04.04.12.48.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 04 Apr 2024 12:48:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712260109; x=1712864909; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hKv08uQvIwv4CwaxEI6a9mBVsBiKx/3Avu57+y233jE=; b=nBTXWU+lNHnQhbi1YvOHsVUtslROe4BkznU2x1aPg6FHbUNOCcaFfkNgzyfAvR9mkr WjUlQAUPgiHvNRHlaukNVJh1gOiFd+pF7Bz3UUrEu3JMmPeUSV9ggUlpiNo3OirYiJa3 suO9+sR9Xkd6Ahlwezv7bsk0C8z09Xl0sCAwFKFeIg8KSDKTGucfX2TzTalqUltez3HQ pF4HjAViktDhHBOOwtazAmzH9BcScI7F/WAnT7QQyZ6InTInd/weTo6g/CHz0rtN+W9c GtNBRISayy92MKvJl1ysnHwZ743aW4vzZCA05LBHNtjC3LXruY8uspO4W+MVL3PGayLm /9jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712260109; x=1712864909; 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=hKv08uQvIwv4CwaxEI6a9mBVsBiKx/3Avu57+y233jE=; b=c3q1+gwD/gtvnU/g2UNOHx2i0rYTFilQYwWf0HCObVLbYS/RjX5m4arEvnXfX50cux FIKlZC8JZx5rFe8SBXmDFq7vgtiFKuf9ligYqI3T5SMjQxOnZjm5ZovZPooilwXAWlz6 l1t7ajQoMa8GEufgYU608b3ixhaKKxAKEfLp4oBQe9k4oKUJV5IoaVCYIDZ/rIaMxICk stxCouNfAlTshD03IF9em325EXR+/P4vvctm+J71Q5+S1BtNOAfFtZesZRniStuxLf7l cettSULH4cL6ccnqf6Ej0EVenGdEbAbZMEUmn7flDrmMFFG2CmWiJhaP8zze2ADFxX3i +o2w== X-Forwarded-Encrypted: i=1; AJvYcCUBtcLw1IMOJWcU0vAh+asqXIxypP1KNNyQbX1Ia43H414j6CXQCCQsba+ie+oLjMwLAlbb5Yrq/4Xdwnz1dhlXtc5h2pw= X-Gm-Message-State: AOJu0YxjqGC+wi7/+XTaFgMXm9fgt4xJha7x2WNkWTfiRUpZVLdTi27i zmybcHLgRxhXD5WWfWxr9wVL2S6udGOb7+KrJqrlYrg/eVAgP5N4/m5AYBIgY28= X-Google-Smtp-Source: AGHT+IGCgOeUIbSaoHmxFbnGP7lqyUDw4wkXpOdiBQH7SbHHONM+fBziqFND6ytRFnSr26QUnsEqIQ== X-Received: by 2002:a5d:4589:0:b0:343:6ca4:97e8 with SMTP id p9-20020a5d4589000000b003436ca497e8mr2590444wrq.45.1712260109059; Thu, 04 Apr 2024 12:48:29 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Michael Tokarev , Laurent Vivier , qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Peter Maydell Subject: [PATCH-for-9.1 5/7] hw/core: Restrict reset handlers API to system emulation Date: Thu, 4 Apr 2024 21:47:55 +0200 Message-ID: <20240404194757.9343-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240404194757.9343-1-philmd@linaro.org> References: <20240404194757.9343-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philmd@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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1712260143734100008 Headers in include/sysemu/ are specific to system emulation and should not be used in user emulation. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/core/reset.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/core/reset.c b/hw/core/reset.c index d50da7e304..167c8bf1a9 100644 --- a/hw/core/reset.c +++ b/hw/core/reset.c @@ -24,7 +24,9 @@ */ =20 #include "qemu/osdep.h" +#ifndef CONFIG_USER_ONLY #include "sysemu/reset.h" +#endif #include "hw/resettable.h" #include "hw/core/resetcontainer.h" =20 @@ -43,6 +45,7 @@ static ResettableContainer *get_root_reset_container(void) return root_reset_container; } =20 +#ifndef CONFIG_USER_ONLY /* * Reason why the currently in-progress qemu_devices_reset() was called. * If we made at least SHUTDOWN_CAUSE_SNAPSHOT_LOAD have a corresponding @@ -185,3 +188,4 @@ void qemu_devices_reset(ShutdownCause reason) /* Reset the simulation */ resettable_reset(OBJECT(get_root_reset_container()), RESET_TYPE_COLD); } +#endif --=20 2.41.0 From nobody Fri May 17 02:09:01 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1712260170; cv=none; d=zohomail.com; s=zohoarc; b=lxW8ON6XPfpE8ndBMPAo7tmrxr86+BRGdTnswiHPDZNZtTPQ9QiYglwZgUEBZXuuE8fm3TZmAt5/grkn96ml/Dlchp4iUEgRawJASZ6lECb928aBMcCpEf3E1BhAOCdjrOwshUOAQfgaVtYV067gkcj1MB/NYZyy/sUTlnoFBpQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1712260170; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Pt+lDyUe0AWJLsfkvxKd5ARWznd8vhavQW0JVI/GeGA=; b=d2dmtGsKaJ9dAlIL7x7Yg7l1bulv36rjGSYQmMM/OeNopdv6x3mdWO4OpL4WjnXi6DYusi5ci5jlRL5yXrbPru7oRvLGj+vTNoO8uzBov5BK3Em3Twaf/FeffYgem3nKrRpJ4gGmGGxSD7WELtNflFBu50EHBMg6b8n0nR3ffSc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1712260170273476.0665959409097; Thu, 4 Apr 2024 12:49:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsT4h-0006a1-Hy; Thu, 04 Apr 2024 15:48:39 -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 1rsT4f-0006Zg-L0 for qemu-devel@nongnu.org; Thu, 04 Apr 2024 15:48:37 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rsT4e-0000O0-40 for qemu-devel@nongnu.org; Thu, 04 Apr 2024 15:48:37 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-3416df43cabso998634f8f.3 for ; Thu, 04 Apr 2024 12:48:35 -0700 (PDT) Received: from m1x-phil.lan ([176.187.216.111]) by smtp.gmail.com with ESMTPSA id n7-20020a5d5887000000b00343d38ee4a2sm167521wrf.11.2024.04.04.12.48.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 04 Apr 2024 12:48:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712260114; x=1712864914; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Pt+lDyUe0AWJLsfkvxKd5ARWznd8vhavQW0JVI/GeGA=; b=CcQOpiQRIS4vvdUsLTWZIMJGsSq3P4QxxCLZo6rtKtU/IcZ+2xaXQXs3ZUvIfjazBC SDthyt3f7OQ5/cj6eLqjjkn1kwDYemCUxGAEWgrncYDJAcidbodF1OA/81M6Hh3lG4up 8/oO0/GhlUpMBAp/rx2jWh/NepvxY6sQoOrzxG5PNFkgQoK0xTMQpAfsM9EtJ2TyLkhf 3Zgtxjk83QKrWhPuBgHT0Aj4afx10aY7pfoZgMR8eAMJOs53CBRGNfsMOltIbSTJMiF3 5QeALnYPuMbe2exl55Uyh5SQJQJ4kL6XKVLspO9iq8O49eZTZ6H9r9tC82+ZYQBGSv8S QSOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712260114; x=1712864914; 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=Pt+lDyUe0AWJLsfkvxKd5ARWznd8vhavQW0JVI/GeGA=; b=rAX3KcCjiUsrofudJZ5yC8s5zpCw/jFBztWSTvyhhPJaVV/9SgvRvlg3G0q/onuD0Q sxdfDAbrPcRWMlQEc3ai7y2igy4Q0rLODkc+X1tZjxQRlGAtW+4s4wq2vjdz2LgvgBnZ 3v9lXseMrUW0H+h9xRWjVpv5HvsXPfIlEJE+W5/ZchoLbYqPjy4UdIgimUvsqwA0Xgs3 n9IpQ9tUilpms6e2ASFXh0Bv59b0gkybLw28CL2zGACvmVDXtrUovSX+eU6sLe56awmg +9on6X4BecSnxdbC86B8+dgyFxJD2Qyh9P9FmwHxMxvNNwzXs1qGkHdSW3/0wFsTGOTO 9fwQ== X-Forwarded-Encrypted: i=1; AJvYcCWxME38OEzQv/gONsuAnbu5r+gif8+K2zW/9L1TJz3CT7MQ9VGRv9wr3DN7LfMCHn4hwQL1KGjusScXGCpN7eBtvgQkvJo= X-Gm-Message-State: AOJu0YzdpQYBuQfzdt3wHFr3135ToJYkrHGqh78bMuMs92RT5WuvIivW hRQ+NmhghNr/b/hfgqUAIyz9izbLi5DAHcrMajLqKfGXANuNIu8n5EYISwnn8Jo= X-Google-Smtp-Source: AGHT+IFeMVBn58Z1vU68gBocDbsnTAmL47smFNDjNs4IgBc4eoyD8sMZ44mCvBnEnKtMG2pouGqHyg== X-Received: by 2002:a5d:6803:0:b0:343:59bd:113d with SMTP id w3-20020a5d6803000000b0034359bd113dmr2406471wru.51.1712260114447; Thu, 04 Apr 2024 12:48:34 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Michael Tokarev , Laurent Vivier , qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth Subject: [PATCH-for-9.1 6/7] hw/core: Move reset.c to hwcore_ss[] source set Date: Thu, 4 Apr 2024 21:47:56 +0200 Message-ID: <20240404194757.9343-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240404194757.9343-1-philmd@linaro.org> References: <20240404194757.9343-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1712260172137100003 reset.c contains core code used by any CPU, required by user emulation. Move it to hwcore_ss[] where it belongs. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/core/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/meson.build b/hw/core/meson.build index e26f2e088c..1389f1b339 100644 --- a/hw/core/meson.build +++ b/hw/core/meson.build @@ -3,7 +3,6 @@ hwcore_ss.add(files( 'bus.c', 'qdev-properties.c', 'qdev.c', - 'reset.c', 'resetcontainer.c', 'resettable.c', 'vmstate-if.c', @@ -16,6 +15,7 @@ if have_system hwcore_ss.add(files( 'hotplug.c', 'qdev-hotplug.c', + 'reset.c', )) else hwcore_ss.add(files( --=20 2.41.0 From nobody Fri May 17 02:09:01 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1712260140; cv=none; d=zohomail.com; s=zohoarc; b=eMJ1HCfHyycF5j0yHnqVytB30QSAD422fTqMDvHKOtnBt1eJHlRFE0+sYgTZBtQipeZfuOZY6yyVkDZWop5pfuvFXaF5Ey/79gEbBZsvILUjUJWMXnwhq1XUE6/ic+uQhqM6ln5y2jtFxsvV0NQ+bnTaNQn5aTFukI0V7XSBfLw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1712260140; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=airsYYnzzrC3CGj9Ils0htz0QXpak8uFciduBNRfDcQ=; b=LnNaesCXpAbj08c3i0HzABSn3NiRVVHsjtuOvcVpfOaBVEWNNSo+r5CciLHDou1mtIvXlc+DDrOk1TdgRmjATS8bOGxhVAAI0piQB7uNe3IdhiB32kHPAICRkB0aepceV6DvJ22nmE8uGqorbUaWuhLV3k6wATJ4uEtIefqh24A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1712260140081632.5371050007332; Thu, 4 Apr 2024 12:49:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsT4m-0006ar-Nq; Thu, 04 Apr 2024 15:48:44 -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 1rsT4l-0006aR-3n for qemu-devel@nongnu.org; Thu, 04 Apr 2024 15:48:43 -0400 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rsT4j-0000Of-IY for qemu-devel@nongnu.org; Thu, 04 Apr 2024 15:48:42 -0400 Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2d47a92cfefso18142701fa.1 for ; Thu, 04 Apr 2024 12:48:41 -0700 (PDT) Received: from m1x-phil.lan ([176.187.216.111]) by smtp.gmail.com with ESMTPSA id t12-20020a05600c450c00b004161bffa48csm223823wmo.40.2024.04.04.12.48.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 04 Apr 2024 12:48:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1712260120; x=1712864920; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=airsYYnzzrC3CGj9Ils0htz0QXpak8uFciduBNRfDcQ=; b=g8xnQQEJ43B5wdoV4A8yGr7GUkdwB97eeFnZvwbW72a707uFYwof31cwNT0c1ygneG 0OL7/Bs4HXP1v4MIi7AUWscQAVwmaWxqjhxhY1Twj6+qa79dc5YukYcld2tdBQVgkAIL hG7wH9GG+WWIQEUrVDiHy4FuD3+kP5KwZnLZQULiwb0QrLJHyZBejIrjilDiGxWshiGF DeniYN1u/PQvpzhMoZV6jBftbPehvBdN4U/73gqV6obcDoIJ1Eqfk/P6Fg+ZKDz0ZM8d Cni09y6U2kuebGINGBguHcseVm/Ery14aOFj4TcAnj3RC2vrbPcGIqyILsz7UlZGQLXp 60QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712260120; x=1712864920; 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=airsYYnzzrC3CGj9Ils0htz0QXpak8uFciduBNRfDcQ=; b=AqB8SqALV+PqqqwuT4vcjkOdZ5zAscYUC/DkWiGE9NqoE9JIjzmDGBaa4n2Qc/OyPN QDvohanLneWpAXn5GZoNBSpovHuheywdx3+cMMAzU0EBmMLMShlkbJCdcYsl+3GhshFO tkSsILa6oVqLcjR3Dr9bjbrlwCyRem7Qf5cCNCvcfNJvfimTHVzXOu7EoWf2lDgz2xuK W3RJ/MA7wirEPhm2f4tqjrNEURtk5F4d8dEZ1UgJFManptjo8R7yt3fXWsprMyRhtJT5 Nfui39UZGMamf8YnfLDal21MevUgAr0pF3bKdCC+6d4UsMWGV1DiiHa4VQpB5o11uKLr 8sng== X-Forwarded-Encrypted: i=1; AJvYcCW1/8XSFVFywxKnLnsfS61ilLws5/XUg66desnl/UwF0jZ4I2RrlkiE2pCTlLisYdGDl6SckYKuawzUouK/dUAviO1q9Do= X-Gm-Message-State: AOJu0YwaJ4xp0sxu1WpWBKrnV3RAarAACdtqZPIcM6rApW/5ZTL4RAuo JPGR13vyw6iw6GkDzdBA/WcZpTJzmjaNC03eXxUwxZbvq5dDmQyeLbiEvEnyXJ4= X-Google-Smtp-Source: AGHT+IFh/n0g504mw7ncmbeJtMNi3J7fr8Lo+7xgpTuRxUFuIhe0R4hL2T8oeSQgGxubmfS52io2DA== X-Received: by 2002:a2e:9495:0:b0:2d8:97f:451e with SMTP id c21-20020a2e9495000000b002d8097f451emr2517158ljh.37.1712260119852; Thu, 04 Apr 2024 12:48:39 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Michael Tokarev , Laurent Vivier , qemu-devel@nongnu.org Cc: Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH-for-9.1 7/7] hw: Include minimal source set in user emulation build Date: Thu, 4 Apr 2024 21:47:57 +0200 Message-ID: <20240404194757.9343-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240404194757.9343-1-philmd@linaro.org> References: <20240404194757.9343-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::233; envelope-from=philmd@linaro.org; helo=mail-lj1-x233.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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1712260143734100007 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. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index c9c3217ba4..68eecd1937 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 =20 if enable_modules libmodulecommon =3D static_library('module-common', files('module-common= .c') + genh, pic: true, c_args: '-DBUILD_DSO') --=20 2.41.0