From patchwork Thu Apr 4 19:47:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 785834 Delivered-To: patch@linaro.org Received: by 2002:adf:f001:0:b0:33e:7753:30bd with SMTP id j1csp1006953wro; Thu, 4 Apr 2024 12:49:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXoy7zFGbni3GsHtkFuVY1P3OXKwKyhadbDSrsXrc+YUu3FEpz/gRu/Z+nsnOlugPzQ6VhMFxr//QtHe+UmUgx0 X-Google-Smtp-Source: AGHT+IFKrEEjlYJyFLp5eh7XwLWqE0PP3e3lXSpvvhPgpB+qeeX6eRIEj+Vd4RLebXt2tFAXnEvd X-Received: by 2002:a05:620a:4085:b0:78a:4755:b790 with SMTP id f5-20020a05620a408500b0078a4755b790mr917318qko.2.1712260179332; Thu, 04 Apr 2024 12:49:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712260179; cv=none; d=google.com; s=arc-20160816; b=nxC3yTCBDC14nIS972VI+hRPzvVDu1guo8nMesdbM4OquToW7dMwH2ek32OOVIVTtW Gd6FhATAZO8F4132B4F7wubOBJUIuYk8T4NGmvFxpVtHZaapEh3QklmjUChdz3Z4pfxb P2ZgwEjmwboU8I2rAVQXSUlCZHNOJ9ddBNk65tuxuwMyny7+TUsQE3T3isQP9YZ+/Khp DXAQAFRctm7YfozFQGIy9e56irWdhnJmn4XvsqI4YECPmI3rhPzzsaIKrQFofKNLzVer t3cvx7Pdluuq3BElh1sF0p8RyiQaWC07clH0CsPOMpwC3C6yUltlxWkT2xLqXIZNW+4t xoxw== 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=FucEMxPV3laNKRFI1lQP1t/ZPj6SOkzkcUkgKiBhmrA=; fh=WCjmvar5+7VCzbnHrebjltRqvC+WRbVEMDSGZkhSgEw=; b=z1kn2fcYQsn47e5fNpiHbtJO2TFgkrmR8W5KGiYYCdlqu2TEJKO73UVvadCowwXYlg fZ9/e04lqYrNS7do5kqbe98ijkORgmHKVhvwVub4WCr71wtIIz3qQG+NgTHiuhmIF2C1 VewPxQwY/aVSqmYz5mQrN6JfWOy7u1/vuB/XtmHsYIvUy4Y1xZzVeuk6pT+YeLoN0z0H e03Y4yVMtlSV/h/zbq6OVJ1u0tG8oUkqdnBxKu0sbgu6zICUxIPK1szv83JyMqE+pqSl V2z0+w0Z22yDB+7XUECHrNwN8z927t24d2AU23wlXaZxQeGEs3XO8dwVH/Mes8psux1A QICQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Jdjv+cp0; 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q13-20020a05620a0c8d00b0078a58062bf0si86759qki.20.2024.04.04.12.49.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Apr 2024 12:49:39 -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=@linaro.org header.s=google header.b=Jdjv+cp0; 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=linaro.org 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Michael Tokarev , Laurent Vivier , qemu-devel@nongnu.org Cc: Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org eBPF is not used in user emulation. Signed-off-by: Philippe Mathieu-Daudé 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_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 Thu Apr 4 19:47:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 785833 Delivered-To: patch@linaro.org Received: by 2002:adf:f001:0:b0:33e:7753:30bd with SMTP id j1csp1006958wro; Thu, 4 Apr 2024 12:49:40 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUx5thHesT+bffJInFJvP5QoiEM8S4bcn8T7/NprlaizwTaoR//YCZttCCna400nco/odq+rjnALEtNmMkLnhNx X-Google-Smtp-Source: AGHT+IGGaJ9JHZi44BW0Y0h9dvpcIOth0Jb+BZSwumg3VWX8xckFcA8XxYMVyqpiB7uIjwTfiZ7Z X-Received: by 2002:a05:620a:4c5:b0:789:df6e:c412 with SMTP id 5-20020a05620a04c500b00789df6ec412mr3317538qks.24.1712260179966; Thu, 04 Apr 2024 12:49:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712260179; cv=none; d=google.com; s=arc-20160816; b=f/mrUDjrMGWFPUJR9NatyQFzNDP5hp3q9sBkfS/+1IeDKeKsHMB+MRfEdMUCJFzvk6 i4hfjtimMdwnsHBmattctXkJJq3U6MHzJq+rgJnFIn4qaZHUxXb16ZSiGKciu4n1/1hQ BzjEHS2w5WqiTU/Q0DSxYF6rfsNX6fh+byqiY+Zxt5WikBZ3wtbq9RjBWx4QUrNzB67F qdp7qylidDyQSNCm5ToeEYrZwHCMwWNsnHjCP4Kc9mozeAKjftWQM7zllgTQ8sesLMxb D69Lg2qcovRMWTWmWhaR38oKM96yFpziNPALCoBmBM6I8Fkri3ZgGinKZpssIw8DIYdt WxrQ== 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=4RBM9iGLnlKBG0LPukIWmtJI1ZJZDBhgI9dJ0vdHJw0=; fh=Hg8td8PYSqLc5sVmjxXRQh3tLgG6j4ROQ6Lv3sLOFSg=; b=xxIRbN57kYDc/vEC7kWoUhI9cUS5SLEEKUl5MjODFtrGk8e41Wc2u0kh0opROOpxJi 3yOjE1716+jDbT2d8NA80YfI3HH+mODo366Abg/wryluUrnI9faiVdHl3xm9uvmfz1gI BPLZls2d2zg+mfjn9H2QyXFyVTkHQCs2SvVMAA3wcymik/b/WY0RdrvdkRE6xMNa3pIS UPPfom9/lFxfkHYG6ixBE9Zgf8lkkbphfdKjvdyQvlXrgY6KfYBDa/JJg1tg2APbgx6k WxSElEmwHhTESPoTkQVsMt2jEVsvUpHVX2RXzNWK/xOpMGHKnkMw7wdGNvKHfE9fbK06 eWrg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r012QBM9; 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id vq4-20020a05620a558400b0078a461107d1si61553qkn.662.2024.04.04.12.49.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Apr 2024 12:49:39 -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=@linaro.org header.s=google header.b=r012QBM9; 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=linaro.org 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Michael Tokarev , Laurent Vivier , qemu-devel@nongnu.org Cc: Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The yank feature is not used in user emulation. Signed-off-by: Philippe Mathieu-Daudé 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 == 'linux' util_ss.add(files('userfaultfd.c')) endif + util_ss.add(files('yank.c')) endif if have_block or have_ga From patchwork Thu Apr 4 19:47:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 785832 Delivered-To: patch@linaro.org Received: by 2002:adf:f001:0:b0:33e:7753:30bd with SMTP id j1csp1006921wro; Thu, 4 Apr 2024 12:49:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUvbU0NXbTVF7ojwyxD7f9VCcd00lr/6qUDpJFfBjZnOsqWt/Llx7co465b6Gci4MUywhS5+z5WZzHskoPp53WV X-Google-Smtp-Source: AGHT+IFcFBb1+h8v3x7WTr0ZINESn+kjFuMd6R1uRGZ0/+pWYfmL0lMBZ7fS8k26PMdyVF11PQHb X-Received: by 2002:a9d:590e:0:b0:6e9:f2cd:1440 with SMTP id t14-20020a9d590e000000b006e9f2cd1440mr671510oth.6.1712260175197; Thu, 04 Apr 2024 12:49:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712260175; cv=none; d=google.com; s=arc-20160816; b=PqKrYrQk8g2lP9iC1oJ9tp0cKinu5DNfXerHLekhW8B/YD0bqsv8V2mgs7tHt1bURl o2Z1bCyIKgmHLanxq8EK/98FYGJFUB6I8qBczVc9cBD9qH3nOzjUeeStIft7RIDXvgi1 ZqCGj5n5N/4rrt+0SY+N+cj6PwfNV1MU/WwH/WzeZbvzjz1KcpLWtSvrvU00BUIl2IJe Sgni4gDwTyLq2h2lep7C8okVcuSZ2tS4qnqmv26cflTYkCP5GZiKFVPsiYKwrVPC0/te Uo3Idp8dVmn5y+lJAtZErrAl/0B9h+dfXFCBFZxskVsLxL69FzvUZt79IH7RwN7DNzeb Y2zA== 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=KWGr/pVGop5k8ihIK6m+XFrYPybC/J9z+nBHWQ3TWxc=; fh=EWHhhlZlSRn6hw1k4ERpp5Jgd/99A3mDxyMBy2gmB3c=; b=I3Cl6UN86Umxg/pRlkCzp5OvhK7cyGGJtgkGOxU/c7goZmh7EhSiVZxRACyQ22nRfD /vCQ8GyI9g+nHAf1ovS6U+kzL2dtYvyY5zcNqT/0IrM2nBHWpUIqTAqunFYYuQKkI3tG PkonmgQSh0TDcQO+6GXXkipu2p3bRg67K7P1kE3W877wk1y3J5pNftOa42f2gJ+smjId 5fbSZOBahhDBtCpPuks/2iD182B59lryrx++7InwWaGyUJWAH1TZHrR9LAwcMR9bQfC2 HV8Ct9OllklRfJ2151TIBpGEuFs0dYfPyrRYjngFtlhjk0HpoUcZDXvAJpTy2eIC2zJO 5bnQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dyrASMkK; 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v11-20020a05622a130b00b004315e3614c7si50255qtk.373.2024.04.04.12.49.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Apr 2024 12:49:35 -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=@linaro.org header.s=google header.b=dyrASMkK; 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=linaro.org 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Michael Tokarev , Laurent Vivier , qemu-devel@nongnu.org Cc: Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é --- 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 = 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" Monitor *monitor_cur(void) { @@ -12,11 +13,22 @@ Monitor *monitor_set_cur(Coroutine *co, Monitor *mon) return NULL; } -void monitor_init_qmp(Chardev *chr, bool pretty, Error **errp) +int monitor_fdset_dup_fd_add(int64_t fdset_id, int flags) +{ + errno = ENOSYS; + return -1; +} + +int64_t monitor_fdset_dup_fd_find(int dup_fd) +{ + return -1; +} + +void monitor_fdset_dup_fd_remove(int dupfd) { } -void qapi_event_emit(QAPIEvent event, QDict *qdict) +void monitor_fdsets_cleanup(void) { } @@ -24,5 +36,3 @@ int monitor_vprintf(Monitor *mon, const char *fmt, va_list 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" int monitor_get_fd(Monitor *mon, const char *name, Error **errp) { @@ -13,6 +13,10 @@ void monitor_init_hmp(Chardev *chr, bool use_readline, Error **errp) { } -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')) From patchwork Thu Apr 4 19:47:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 785835 Delivered-To: patch@linaro.org Received: by 2002:adf:f001:0:b0:33e:7753:30bd with SMTP id j1csp1007040wro; Thu, 4 Apr 2024 12:49:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXHr1w8TuK1hPa5CkgUO6ZxaburGbkWu880OyXA22erAxjYMD9x4ya5ilA7SKjrBe/3b6EAzyDLiO8tPqW9ghhk X-Google-Smtp-Source: AGHT+IHelYsB+41XLHMaJ2dp5XgzFF0OdWDtG7w+PS0UGXQQ477EOaCXYM11MsY6DH+1bwvjmgh4 X-Received: by 2002:ac8:5714:0:b0:434:3e92:3042 with SMTP id 20-20020ac85714000000b004343e923042mr796179qtw.65.1712260194714; Thu, 04 Apr 2024 12:49:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712260194; cv=none; d=google.com; s=arc-20160816; b=yZudS1nGJfrcWm6Setwiv6qX69icnlJbVxNztL1EJzFTGZlb1lL0yP9LdYcBP8vnrs z2F3cno/NP4p0n08uNT6JAhgWIzuRR2LMd734PxrzC+WmskLE3de6cTK4MzcWrkVGXXr TXqsU1XpbTJZJ2UcClBOEcFYwaWkb+W+L5yuWdoCXzmk6rgAle5o1kzelFnRr/QC2O1B WyXQNeFiVMcn+Q0t7BdwwsKEd7cseJLjPcR/K+q49eS2I++6yHJeRVKGAj5JUrNSmrdJ 0q9944kYZrsuJKixlq8L/h6d3ADzMeg8K0eFRJblmwQ7W2QioSI8PkZfU0ULeNN2Cln5 sx8w== 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=aoLqAKUnWG07Qqq94XYH6NjRAB/Z33lL8UXEZ52j+Q0=; fh=0ksZlnf8I5L/KUtLeeJZ59ZGrjaRMCew7GgzU46PNhQ=; b=Oz8e1IfMHEfZaXyP+63taJY2Z7e6x2Yf1aI2XCUSUSa6hvj/mPDBIyy0m+n2TV6W4e fV7uD98hJLeGkOL7ZdoGB7DKV6llX9hWzE+zs16ToWSZOGlI8oaO4sSATYkVOVdZAhaG aPGHadll0oUEqmEzf1CTCtLFMOMLAdDdBhVdehmqPWIwPmr1XvcFtKyl75aeBsEwayMH SMzPtdiFwn79R7VwmSZg7BffaOdSo6XS9inCu2i1LyfrfHkXuEfZKKfs7UvJUM14GCsf rSXywdLw9PrK4iFUSOJzn2MCmR3SL/X0qbiV/Eu9g9RzXcVcpwGJ53yU+TOfkpy8IRm8 PebA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d9j6nG9k; 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h16-20020ac85850000000b00432d557234csi64551qth.47.2024.04.04.12.49.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Apr 2024 12:49:54 -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=@linaro.org header.s=google header.b=d9j6nG9k; 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=linaro.org 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Michael Tokarev , Laurent Vivier , qemu-devel@nongnu.org Cc: Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é --- 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); +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 = 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 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" -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/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 == 'linux' util_ss.add(files('userfaultfd.c')) endif + util_ss.add(files('qemu-config-qmp.c')) util_ss.add(files('yank.c')) endif From patchwork Thu Apr 4 19:47:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 785828 Delivered-To: patch@linaro.org Received: by 2002:adf:f001:0:b0:33e:7753:30bd with SMTP id j1csp1006733wro; Thu, 4 Apr 2024 12:48:59 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUMVtJHOhuGanpodvbMRf5NBu8jkJ905YMe0MHRU1uLuG77e4lq4KRaKxaBxq8QA2t6vdMJeaZoqnbyjDIQ2Kad X-Google-Smtp-Source: AGHT+IENSl7M+T91WvbfPfHKSOvm6QCnx21uIwY0J27yb9B/KsNQ9yO64gaCj159Y2Izv/Or02jq X-Received: by 2002:a0c:8bc9:0:b0:699:3954:2a3a with SMTP id a9-20020a0c8bc9000000b0069939542a3amr1408991qvc.42.1712260139629; Thu, 04 Apr 2024 12:48:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712260139; cv=none; d=google.com; s=arc-20160816; b=VXnlTg/Ce6Gr6CptJpo7wPn5DuWsBJyWIM9jFjM62ocq73sCxyWtk86PY0mwGWuu9K V6n2FpxjzU/uy/K3NRM0gzQCQNuVn7+jZqqW9RBuC7+edxBoBVtAgGifwDmP8G6CZcKm 6U6jpgCa1dUY03rhb8aQc1gZ1+EQTRSnSY4yl0/Y9j8QExmeTeybio0Fz9oHPO8TEJEZ 6iGsegHKFvyzgNlxfIOk6Bm21idgkXYGT4lIFOGHEyRZbzLllV58eorPtnoRC6dWBh25 SQ+OmvHCUsLE7ua5fwn1i+dF6RGYIlbTgK87TA/eJLmcRuSQrG7FzkEkmP66vs7nBYkn ZPAQ== 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=hKv08uQvIwv4CwaxEI6a9mBVsBiKx/3Avu57+y233jE=; fh=rNtKOo6T+KwX99mrAO5TGWwJgywmpYHtBgVj0rt3Gpo=; b=P/IWWTVDqSy8NNCXvj1SSwZhVjRGZH5FQWBu+FkxJ6y4aQOnG04ofn/K8Vsf6zfKCJ XuTsM9hbO0wiYnSlWVD6T2VMOHF0C7okgsFLBBxoLv41fbScVmoYdCXsqMHk0AIw+J8k uukNlInUfJxg5mclAp2vWxj4DJbQfLAou++lRCcsZIJT7OTFM+GxEIKdZaha09UUK0zL S2SuFK6YHONqpNn2qKWny6RDeh5MXOlSKExdDD17TAMelpYCtiaFfRKKR78mk8t0bGw7 9k/BeOWat3S0GIIvRY55b+/NVWDD1aKoMBM7EEC1vcsxAyXKl2q+KdnvtzoZMkVwXbqF csWA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nBTXWU+l; 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d8-20020a0cdb08000000b006915cc2afedsi44523qvk.244.2024.04.04.12.48.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Apr 2024 12:48:59 -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=@linaro.org header.s=google header.b=nBTXWU+l; 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=linaro.org 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Michael Tokarev , Laurent Vivier , qemu-devel@nongnu.org Cc: Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Headers in include/sysemu/ are specific to system emulation and should not be used in user emulation. Signed-off-by: Philippe Mathieu-Daudé --- 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 @@ */ #include "qemu/osdep.h" +#ifndef CONFIG_USER_ONLY #include "sysemu/reset.h" +#endif #include "hw/resettable.h" #include "hw/core/resetcontainer.h" @@ -43,6 +45,7 @@ static ResettableContainer *get_root_reset_container(void) return root_reset_container; } +#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 From patchwork Thu Apr 4 19:47:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 785831 Delivered-To: patch@linaro.org Received: by 2002:adf:f001:0:b0:33e:7753:30bd with SMTP id j1csp1006888wro; Thu, 4 Apr 2024 12:49:30 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUcm+LUlhppdqfV3T9Ra3mXNEJAqD43kk9b44ZkpwnlaXEjb72+pSEAKjYaiKvtSt1iUJcB/BLT/ZZTwg/uJKB2 X-Google-Smtp-Source: AGHT+IHrGJPSK+U+dZ9LQnC5oxOpUdff84Bfl3gmQI8cEhbW1HL1pdTG8Z3pUOQtta582wkeR/du X-Received: by 2002:a05:6214:2462:b0:696:a490:a94f with SMTP id im2-20020a056214246200b00696a490a94fmr796356qvb.30.1712260169787; Thu, 04 Apr 2024 12:49:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712260169; cv=none; d=google.com; s=arc-20160816; b=d3/iDIjo8XvZd69rqd4VyWw/HuS1eJvU62WZOdyALj2i4ASBAyDdbkLTlzfHzL3n7e RkkY1Z5Imrf/ZSFe06u5WW42VCZMqmlSxExvJ6SMyuXyxMvhxizyqegYQnuHISDpM5pE DEJdVUjb9MIme2hVA/MgFVeYLo+rmpVp+zIYJp5LypnimtSnWY+M/LY+5zYMe0OMwoxc iioC/D7Qg14YXfb/H0CpvVYNSSKRc73NIlM1kdZ327uHJgtOWMSTrqC/kcIKIbcKBV/P Tr4dnAfCE+01++iFsi+zFcbDBkcyI/OBZA/YNtvdScHJ0vq24rhff/JNol2Z0qj0FSb7 Mc4A== 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=Pt+lDyUe0AWJLsfkvxKd5ARWznd8vhavQW0JVI/GeGA=; fh=8ZEgr9cN5umMTs0Y8MhbEPG5iQry1LczcOMlXVXziuk=; b=kmtLA8P9/r4pwn7qSKbB9Qzh1083DgxS9r266EasxXorkxRKh7xeeWdM+6wSO1rPBg Txl+fgCccyrDdxfF7gmXt1mmqHsB/g6yW17cAwGhDQW5YaLimA/HhP53AS16EzhI7cj/ s/7R+0dfT0+UrObKUTuRKHgEXN7Elsm6VwCowlS1tcD9MoU70US1e6Dabx4Rz+vt/Av5 afwYmJ0FDwY6CHppArCtpBJZvr/0Q06MBPz74DJfoaoLLptPlx1Bt+CMvwPQrFjG4BGp SPuCm0/xNMSoWrJb9qWle2xETg9kjo0jSvQzDwwy4AvagyUzLnWrKqeJlAuzr4viglEM WI2g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CcQOpiQR; 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l12-20020a0cc20c000000b006991b74c977si61702qvh.36.2024.04.04.12.49.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Apr 2024 12:49:29 -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=@linaro.org header.s=google header.b=CcQOpiQR; 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=linaro.org 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Michael Tokarev , Laurent Vivier , qemu-devel@nongnu.org Cc: Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é --- 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( From patchwork Thu Apr 4 19:47:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 785829 Delivered-To: patch@linaro.org Received: by 2002:adf:f001:0:b0:33e:7753:30bd with SMTP id j1csp1006737wro; Thu, 4 Apr 2024 12:49:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV8tAkDrGWdG3VKgSKgnCs6Y6AQhUdFLEScxYp71RCwS/54pBeIx7iom4eyMKN9h7OO00fsGIg65z3rbJk8OulA X-Google-Smtp-Source: AGHT+IHl3LHIL7hu5fszL+VNYgg2b1Zj1PVS5CNrzfoA2iMjk6EXWaks2aWDIHiW9z/5ODuqxKz9 X-Received: by 2002:a05:622a:19a7:b0:432:b312:24d8 with SMTP id u39-20020a05622a19a700b00432b31224d8mr1017669qtc.4.1712260139627; Thu, 04 Apr 2024 12:48:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1712260139; cv=none; d=google.com; s=arc-20160816; b=fiUgsebU0wza6ivh7AZ1XLIgRowTsWSpu4FeJDyLJuVoLsJGEL1WLz9kokm19Pp23Z ozfjw0nYhCCn4WrCcsykCalEGxvjdvda0tTqi4rqqVxY1XCwTwhx1v0YVQp4DNZcVMkL 24IGUavkyHLVsWQMcnaYglxacVr8L3Aynm7ZVI+aL5gvEN+O6r8Kwf1pK41OJshpOLwL 1PULj3R/NUuA5mOV0N5X8bfO1V5M9PndlBsCiZGgg9bKxFY/+Hbc5cGdPeJynTAfdHQH y0yjALKRDLtWrZY9y6qWKInqWVhzVcqtloYka+m6orgObluu1K4nTbo8Xr9r+Qi22XJq TfLg== 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=airsYYnzzrC3CGj9Ils0htz0QXpak8uFciduBNRfDcQ=; fh=EmP6yZuloaVthBOoJjnd4u7WRGpEegvyTTp1VaSKF94=; b=xYal9hcNne7WLIclsKWzVxb4C5wrnalm8JSeRfsJEBJhKUj1iL6fxGNcwAMQzNi3Zi Kty6IVfqXtvNruBI+1xK0f2ZnuE7cDM4x6pVGDkmteUIIVscsCqugtaaONnZ98vYvbK1 zFKWM9gRWZhUKkLqDea1cmaCkucvO7Vmz1EfDzmbQBuLg8fpInRPLwWUoljsaut9ciFI uSFaUJErUyJIHItg4kTIadyKGQPppCPnbgUUR9DuznbHVSjZxA88Gd4+OWU9Ohzh6jZO 7AhPmj152kcFscjjOrYrxH2B5CSjB9/HpACxWSZ9NFE7/kmQMufKaQmAONvXAKf70P4k BObg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=g8xnQQEJ; 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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e20-20020ac85dd4000000b00432f6ec7899si41928qtx.460.2024.04.04.12.48.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 04 Apr 2024 12:48:59 -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=@linaro.org header.s=google header.b=g8xnQQEJ; 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=linaro.org 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) 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-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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Michael Tokarev , Laurent Vivier , qemu-devel@nongnu.org Cc: Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Thomas Huth , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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é 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 if enable_modules libmodulecommon = static_library('module-common', files('module-common.c') + genh, pic: true, c_args: '-DBUILD_DSO')