From patchwork Tue Dec 12 11:30:15 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: 753040 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c83:0:b0:333:3a04:f257 with SMTP id z3csp1844695wrs; Tue, 12 Dec 2023 03:31:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IFUxxS03jAtHT2eckn+ejDb+6qDDzhe60TMjoEBUuDhEsZWZx+4i7fBj/zOl5VEbkxDcx6S X-Received: by 2002:a05:6830:143:b0:6d9:e32a:84f with SMTP id j3-20020a056830014300b006d9e32a084fmr5995761otp.42.1702380663749; Tue, 12 Dec 2023 03:31:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702380663; cv=none; d=google.com; s=arc-20160816; b=JiRK0R+ONNnxvqSPEziNAHgsOSqaLxMcfJRFlWXNpO6mjUi7m3BmLclB1+342RXe8t 1ND3Ej6IsBmC5FxZlWEm1/kXU2bD9bfuW5UZvJ7dnJ6NdQVGawsH+Zy/hPx+SDWGa9a1 GISQsyRig7H8FOjBeJzl1o97jbVgAx3OQH4P6G+mCcU/m0kDWEkQ8eqchmYWaA68DIdX ZI0oNCbfGHJKugEKXhsLrQWcXnrhI5+lXkrQ4l1JX1I32jSOArT7l665lNPSXC1tVLZi m512eAt3GriDcM6TMCOZI+7jGHNzlMVYkGyOUQdMUUrgIBPHpNwZOUr2bCcG0tFl0QBv Ejig== 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=/fkaQw1wTm7vzI2qvTLdmXvYwQIxTgYgYOSzytSBkrc=; fh=Xp+iB9og4CCVV7T/we+DpaVd9G7vV4Zo9nJ4+lkth+s=; b=u0oXK/AiW3axoGsUF93FDW+SupCd9oiVuf1Na9gNHMnWO2CW1BATRP9abvJvmQQ/GR +6sp4mNK/v69rl0QA6hqQ1Fdor07eIsDkIszcPF6PR/vYIOqcs1nYTOdtKr/CIgFDp7H cnEjEwlVmlvoHdU9VvMj/b6/YwzYnvqBrvtSfl/y1syQDwA3aMfM2q8XfgU0NKViLdOK ghu2/EnPM82+rmoBjpAinem3DGXicvWONHczMJphNP2QT6PAPVOFBzb693sEkxXIsaZ+ 1hQ5PIISG96Qwlh+IU47WUdRwYXzl/5zbkjYxOrG8aFs4a2J6PKCQua6h1yCyLEYGmGC gwew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iNN0HKL+; 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 dz18-20020ad45892000000b0067ea80f3548si10556285qvb.228.2023.12.12.03.31.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Dec 2023 03:31:03 -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=iNN0HKL+; 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-00068y-04; 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 1rD0y9-00067I-N4 for qemu-devel@nongnu.org; Tue, 12 Dec 2023 06:30:36 -0500 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rD0y6-00049w-5n for qemu-devel@nongnu.org; Tue, 12 Dec 2023 06:30:32 -0500 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a22ed5f0440so50336266b.1 for ; Tue, 12 Dec 2023 03:30:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702380624; x=1702985424; 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=/fkaQw1wTm7vzI2qvTLdmXvYwQIxTgYgYOSzytSBkrc=; b=iNN0HKL+vIJqzv4LpCcMa7R8Sb++BAMQbxyIUJmV5T0+w1ot7QPHe8a+ZI/AoolMVQ M0SGc51D/lAFhbNKylH17UI3TR15x6nHoAhSUiF6mQWSP9ObcWWizDfHLRzZeC3pqRzI 4D/rMsYjn5QvCK4FkF5L1p8v1tUX3DnBBQR8vIvZxpe2N/YR94NS5MVNJGtMBSwg86ry vq/VFD0OPo5IuInu/a2vB2GrMoCyEa+WhEM9KLG6wOSuDDZyte8vEZV+HfXE5SlnKQhO HdWLnrY41Flgjla0rGD+3C3iqJFw06J+ZFZ+/GFGdibOH2deC8aOv+482P7jzh5tKOMC wZiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702380624; x=1702985424; 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=/fkaQw1wTm7vzI2qvTLdmXvYwQIxTgYgYOSzytSBkrc=; b=IzZ7RUC115rLGiDZiGX0/fgGnbcYwvXet9OTL4p0YiT1L/1lr7Gzj3vkFSs8YBAa7k RSAsUttPT3ne8wjKTUO9PfWtfiifZjtZUVmdWekcS5ii2ZitAgpHwoNr7sm9Ezpgl8lQ lbZjl44Qv2hGWQv1VtDm766vSVLHS93FMkFrIMmVOwOVc4NN9BGB2zv5w7CbZ7oXZ1eJ K8ixXUwE6ZcMwXPhrg1ggq/6+KmAOTcnWGD/9YQAjGAaNd5bvEev9EqxTxW72AATesxf yrAhlnjIorHEu2BgdLUi5MkHHOA/vhfxHADGCOrmN7aGFyJQNB59idCERCPH+1zd+tAV 9UQg== X-Gm-Message-State: AOJu0YwJUdMAXpFjWmF7Sor/kF6/ednKlaDebKxjtXe9rtnNNFBYt+lK YM+u0Ll+Fw+4Lk42ia9N6GkA/MU7ySTBa8xcgRtT+g== X-Received: by 2002:a17:906:e085:b0:a19:9b79:8b40 with SMTP id gh5-20020a170906e08500b00a199b798b40mr1892770ejb.81.1702380624549; Tue, 12 Dec 2023 03:30:24 -0800 (PST) Received: from m1x-phil.lan ([176.176.175.193]) by smtp.gmail.com with ESMTPSA id vt4-20020a170907a60400b00a1e1a1dd318sm6174614ejc.137.2023.12.12.03.30.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Dec 2023 03:30:24 -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 1/2] system/qtest: Include missing 'hw/core/cpu.h' header Date: Tue, 12 Dec 2023 12:30:15 +0100 Message-ID: <20231212113016.29808-2-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::632; envelope-from=philmd@linaro.org; helo=mail-ej1-x632.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 "hw/core/cpu.h" declares 'first_cpu'. Include it to avoid when unrelated headers are refactored: system/qtest.c:548:33: error: use of undeclared identifier 'first_cpu' address_space_write(first_cpu->as, addr, MEMTXATTRS_UNSPECIFIED, ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- system/qtest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/system/qtest.c b/system/qtest.c index 7964f0b248..6da58b3874 100644 --- a/system/qtest.c +++ b/system/qtest.c @@ -21,6 +21,7 @@ #include "exec/tswap.h" #include "hw/qdev-core.h" #include "hw/irq.h" +#include "hw/core/cpu.h" #include "qemu/accel.h" #include "sysemu/cpu-timers.h" #include "qemu/config-file.h" 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