From patchwork Tue Dec 12 11:30:16 2023 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: 753041 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c83:0:b0:333:3a04:f257 with SMTP id z3csp1844907wrs; Tue, 12 Dec 2023 03:31:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IHSadwoJecoU1XVCOuXNn83qznKyyPbLi2Kk/PZRhE/FwPg/3nUL4IquEd6pI+H3dg4vd7W X-Received: by 2002:a05:6808:210d:b0:3b8:b063:adf2 with SMTP id r13-20020a056808210d00b003b8b063adf2mr8223845oiw.79.1702380684278; Tue, 12 Dec 2023 03:31:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702380684; cv=none; d=google.com; s=arc-20160816; b=x3Qei+gOta57rQFxx8xRSWOVfXm7g+7MtyBMcENsefH1J8xZ7HNUBY66C+aEvt7AoH xPGmNtivVxzLVru/ZyAleOrXi6y7i19zgDnabWbr7/+34eDy7o9liGBDRpBVxM+YQAAp VSrHCFYZ0aRpVmDKyrxiTtnIWp3gcSIqc3T/ebJ1UzrrhhDBdbTpqqGnAH0m2uR+wDXa GX6sJtL+Qkvh5al40vq6ohKoIcMSEmgmoV1B0RZS15FVrzL9EiBpYQGKQR2t6U5H/Hce EyxhRw31muQEZzbZu0u3LXNNTLL1+f4wUEHFGkEewbqr1iPl+IkvPm0K/HF2Pq7647sz DQvw== 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=MCdPCnhAmawlvGjzJcBxXQKNZDPrtvUlP4jFKDMYMSc=; fh=Xp+iB9og4CCVV7T/we+DpaVd9G7vV4Zo9nJ4+lkth+s=; b=E1y6v0CrvrFFvZvKs10eVFjqFaZnAc0kjw4uTsP83FFEePAbFb7A8vyqSZgaqPpmP5 uNxSqQhOBBQR/4qTuzLypw/svwyxZPKdXsDnDRs6lMmbqiaUIqmcpdw1amvJYjCHRJQ6 DzwJZTPHxpZepr5862oQVs5fbGpwPqT75OJf6YnNLgkVa5+HO8xGEi0jTb+A8xY0pJ1D U4/U4zvIIwLbDWou9uCexp2EgrnG2Rh4vXqfctex8kFqPpaXjP+Hf6tu0pnW9mbXIyru JgbaNep0f+7kDeIQKo5+bboKXJ+9fqOY0yuDEOUS/0F9IDhXKFgf9+nbJvZ7N2nHJZYG xjvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DbYO8TXo; 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 v3-20020a05620a0f0300b0077c0f390186si10592168qkl.368.2023.12.12.03.31.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Dec 2023 03:31:24 -0800 (PST) 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=DbYO8TXo; 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 1rD0yG-00069t-LG; Tue, 12 Dec 2023 06:30:40 -0500 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 1rD0yB-00067K-SM for qemu-devel@nongnu.org; Tue, 12 Dec 2023 06:30:36 -0500 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rD0y9-0004Db-F5 for qemu-devel@nongnu.org; Tue, 12 Dec 2023 06:30:34 -0500 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-54c5d041c23so7613891a12.2 for ; Tue, 12 Dec 2023 03:30:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702380631; x=1702985431; 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=MCdPCnhAmawlvGjzJcBxXQKNZDPrtvUlP4jFKDMYMSc=; b=DbYO8TXovEskdgMldCCsIJc9L4kZbBMLf+F+7WRrbcDGqk9kcp1EnD7cJKb4g3isWc 9trDnxlMHrDyuu91GzXMqXBKmW3XO0o4YN3ZKqVBxmJPtULfo9+nonRqV/G4LmxyoW++ kUEePD/x2we6zmdV0gZFkZwJYZKjXEdSE0qRRqiXRIyOt3uVh1pPACbkqQBW+0KDulNo jz2/hD4CBfuBjz/SxFO1mcCol1gr02yM02HWTYa4ex67n8+qRzLxWY8h6AvXfe1EABZv 79PohnNZ3lCVvVxlIETPUB53MFYy4KCiIlDdUdPOuKkdRBqiNKek06zgtJ0doncIwCo0 52Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702380631; x=1702985431; 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=MCdPCnhAmawlvGjzJcBxXQKNZDPrtvUlP4jFKDMYMSc=; b=V9Eh/YclKgQmU0rD5f4sqGRTBJHZdeC3yAVzYvmKopRT655EFw3aMXA5U8kY0+Vxqq afQYvZDJGPn9f2yfM175uXmwqamZC3c/WopAiECz1b+N/oF5DaPdhL0ZN57vsWK863y3 j8gaDgD7IcqaeTnFeVXRXnErXfbPB0LOOSBC4g5FD3oCOz9NCJw8ojOLaJFpcQ9YDzR5 mjoGHuzSlB1BdoDqSRDz7lV8jXFhoix5OwIop/B6WuuONB0IzViKyMw7TnzrZF95/9Jq yUNj/vAcGjj5O/OP3qEvirRJ4TwKSSlFBZXWDA5ysvcgaaM1vbszysCHvqLf36yPn7Nr C/GQ== X-Gm-Message-State: AOJu0YytksGY28+Ckp4ebH6s7hwXawioyBer0Y9zNXFxSwSJ9lwMfOdA /n4jys/WcRvXKWaHDeUR9cIJql4Aj87mxISUttTuFg== X-Received: by 2002:a17:907:7ea1:b0:a16:88e8:2de7 with SMTP id qb33-20020a1709077ea100b00a1688e82de7mr2246852ejc.23.1702380630950; Tue, 12 Dec 2023 03:30:30 -0800 (PST) Received: from m1x-phil.lan ([176.176.175.193]) by smtp.gmail.com with ESMTPSA id ll9-20020a170907190900b00a1da2f7c1d8sm6118003ejc.77.2023.12.12.03.30.29 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Dec 2023 03:30:30 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Laurent Vivier , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 2/2] system/qtest: Restrict QTest API to system emulation Date: Tue, 12 Dec 2023 12:30:16 +0100 Message-ID: <20231212113016.29808-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231212113016.29808-1-philmd@linaro.org> References: <20231212113016.29808-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=philmd@linaro.org; helo=mail-ed1-x533.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, T_SCC_BODY_TEXT_LINE=-0.01 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 Outside of system emulation, only qtest_enabled() can be used. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- include/sysemu/qtest.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/sysemu/qtest.h b/include/sysemu/qtest.h index 85f05b0e46..b5d5fd3463 100644 --- a/include/sysemu/qtest.h +++ b/include/sysemu/qtest.h @@ -23,6 +23,7 @@ static inline bool qtest_enabled(void) return qtest_allowed; } +#ifndef CONFIG_USER_ONLY void qtest_send_prefix(CharBackend *chr); void G_GNUC_PRINTF(2, 3) qtest_sendf(CharBackend *chr, const char *fmt, ...); void qtest_set_command_cb(bool (*pc_cb)(CharBackend *chr, gchar **words)); @@ -35,5 +36,6 @@ void qtest_server_set_send_handler(void (*send)(void *, const char *), void qtest_server_inproc_recv(void *opaque, const char *buf); int64_t qtest_get_virtual_clock(void); +#endif #endif