From patchwork Wed Jun 12 15:35:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 803479 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:e87:b0:35b:5a80:51b4 with SMTP id dz7csp852865wrb; Wed, 12 Jun 2024 08:37:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWgaNj0V1kKSUPE/5utsyRLiKc4BUctAmkjzyvz+46/pj/Feax5YF9ss88AVoE3qQo0vT7Bd8E1aGBCWoOx7X4I X-Google-Smtp-Source: AGHT+IH9PWkmxQYp6g/x9RAXfzrst0dHhUEsRDxpeA0o8ofWpJ20wuQDN//Zs9Vwoaoq38lky+Nx X-Received: by 2002:a05:6870:1d0:b0:254:8dd7:5af5 with SMTP id 586e51a60fabf-25514c7d446mr2629189fac.23.1718206663002; Wed, 12 Jun 2024 08:37:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718206662; cv=none; d=google.com; s=arc-20160816; b=yZ3bT1U/zBm1tFv1BUcDHPIMC14YoBV0I+WIjx5fDAYg5R6MKWbtUHot1TejPVSIw4 iEDPxpMsy1mNv5+A+hzYfiFRynufk9IzD8TSzOIpqMLZU7F18xRxCm7MZannjrqUBF74 utUkj9lyIM6ArALFk3PtLEzGHFIdEVAzK3eSDhFzwDjAna7UQqHqJRiuxmPEilhT/+Io d2zRr/2xrRsG/7Nl2f5IOcHMChw9qzS66dV15QpQuhExJ/tjvIjgO7WYKacmyVPUna1B VOQyj6i1Bg+SMgm7Q41DrnAlDZuInqf54pAw419I48gUs1D38QAQV08be4ZjYABDstxl DsbQ== 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=kJAQlF/zpzEh6ZUd/TIoqAhEJRcTvj1Vbf876k6aGf8=; fh=czkAeDwyirGU0fHfBYIxDl8vJdhA5eGOYVGOtFKrHIY=; b=0S/RXh7zSkIwWkP2JvYz8ItanG29PjB+9HkxOCYx8Q3cYQ9HaTtSXfiv9sGKDBrNa6 P9BdZARuF0WHlXQs6RNTFu1PlrKrrqZKZCgIAqTALL2DV2QkITRvS0mjkNJyyZMyBchz p+JZyRL1KV6VqMW6UHNVwnoeV2ImukgqR6ub59fFAq8e5c/cc73ISJdLuXS4dJ7+n9CM Vu2yx4VGW6Q/thNGrv0NOEfXFI/ORH9ApiLqSWQbdwYVN/4ExNMFXC5AIHfFd/uBnSJA 6ijEC9D10G9cbM0J9efAAbzAOuZzd5lgv6DBLpZu/U0cQU2W5epzsMsPK/f/Y3McWOTK zHmQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cZ46bjnh; 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 af79cd13be357-795600fd214si841042385a.766.2024.06.12.08.37.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Jun 2024 08:37:42 -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=cZ46bjnh; 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 1sHQ0Q-0000uq-Gk; Wed, 12 Jun 2024 11:35:22 -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 1sHQ0L-0000WM-4C for qemu-devel@nongnu.org; Wed, 12 Jun 2024 11:35:17 -0400 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sHQ0G-0004JP-39 for qemu-devel@nongnu.org; Wed, 12 Jun 2024 11:35:16 -0400 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a68b41ef3f6so2070266b.1 for ; Wed, 12 Jun 2024 08:35:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718206509; x=1718811309; 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=kJAQlF/zpzEh6ZUd/TIoqAhEJRcTvj1Vbf876k6aGf8=; b=cZ46bjnhFEGwLZvSGWoADNpD/YVZ41q5eecuckD1Ev31QTtqGZumLNHrvahZh4Btbi UgYwhILlzFXWPbXf/yMkcSInE4swQriC+I20uECIHGD7U1ezCYzwubjepmOGbwKDI+ds kVKWNxKt6y6hNmLTKerdxx33Hk0bVBJfWeMcTUF9MvtxVzx+D4n6degYAsKRNq20YqMb WoS9w7xQwUyjEqyvrlkzdEfK6rAWIySO/UshpXRTfJLDPniHPRDf7g2mczr6eatWObnQ HvWkcgNc9xklvUItlCmook5cpNYHPuUQpWjaoJU2Yj++D5BNN5nH1bE0fGQ9NwD1Ps6M SAhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718206509; x=1718811309; 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=kJAQlF/zpzEh6ZUd/TIoqAhEJRcTvj1Vbf876k6aGf8=; b=G1gN0wTrdZtAAe1GSflgWuaxJHSlyWwJr3Iq/gaEd1TtbQU8O6svUXGUgH4QnRfMob IsOvzIoSxnDxdL77To/t8fJDDMNBWlYfYjubEO1hU8ZfoWjGwCiicFrPsQf463LdCvt0 j3Pjmb28jbQX66r1vHhoIQhrEQNu4p5FSxMn2hfSLikGlSitpbFz+nhJfzVqL3AeoBx6 x7Cir6vU9pn8GGVsqYNNBjk29/j79NhJ8q5h8IxMR15oPZvjwSlItuyRk1n5TuvJdRuY sXHnmM/CXw1RKEC3mPaKKKH8AYN3vMh9mbG2GCb8qHviTmxDrh4CQa4lZzmjvPiLBYNF tnoA== X-Gm-Message-State: AOJu0YykhMCxqBJ7Tq1y5/I+RVuqap3u5/WvAyYdJFnW14rTTHoIJbAw 8tkFSfQ4WJBFqnzrMsXROX7EN1KnYDA7xQUh8dzwD2zTdrSf/Um+SazVzXiksyY= X-Received: by 2002:a17:906:898:b0:a6f:23b9:4e5f with SMTP id a640c23a62f3a-a6f4800a19emr122891766b.70.1718206509163; Wed, 12 Jun 2024 08:35:09 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6c805f9f3dsm910164966b.95.2024.06.12.08.35.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 08:35:08 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 3A48F5F939; Wed, 12 Jun 2024 16:35:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: David Hildenbrand , Ilya Leoshkevich , Daniel Henrique Barboza , Marcelo Tosatti , Paolo Bonzini , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= , Mark Burton , qemu-s390x@nongnu.org, Peter Maydell , kvm@vger.kernel.org, Laurent Vivier , Halil Pasic , Christian Borntraeger , Alexandre Iooss , qemu-arm@nongnu.org, Alexander Graf , Nicholas Piggin , =?utf-8?q?Alex_Benn=C3=A9e?= , Marco Liebel , Thomas Huth , Roman Bolshakov , qemu-ppc@nongnu.org, Mahmoud Mandour , Cameron Esfahani , Jamie Iles , "Dr. David Alan Gilbert" , Richard Henderson Subject: [PATCH 1/9] include/exec: add missing include guard comment Date: Wed, 12 Jun 2024 16:35:00 +0100 Message-Id: <20240612153508.1532940-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240612153508.1532940-1-alex.bennee@linaro.org> References: <20240612153508.1532940-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62c.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=unavailable 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 Signed-off-by: Alex Bennée Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- include/exec/gdbstub.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index eb14b91139..008a92198a 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -144,4 +144,4 @@ void gdb_set_stop_cpu(CPUState *cpu); /* in gdbstub-xml.c, generated by scripts/feature_to_c.py */ extern const GDBFeature gdb_static_features[]; -#endif +#endif /* GDBSTUB_H */ From patchwork Wed Jun 12 15:35:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 803483 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:e87:b0:35b:5a80:51b4 with SMTP id dz7csp853028wrb; Wed, 12 Jun 2024 08:38:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVvGivpw3OtufnYMeRjD7Vjz51F/kvkeKOuOke2kwv+G/FhzaWGpw0nZrwOQ2A0LfFNLF5gTCYbiPt5T64L9ya/ X-Google-Smtp-Source: AGHT+IFla2H3RARtAYTJQICaBjt9DI3deb8Lqsg24hn2yPysGHZBSVSpI3jLC2BPziln4ZXmEb2Q X-Received: by 2002:a05:6102:1992:b0:48c:2c73:c257 with SMTP id ada2fe7eead31-48d91dbd20bmr2494255137.14.1718206685499; Wed, 12 Jun 2024 08:38:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718206685; cv=none; d=google.com; s=arc-20160816; b=JoErZF2ekW8dsrk/34rSINBz5rjOEZIo6jRvBSjTWddnyvPJJxaxBtlb+WAagC5DeX 4i5dyqzAadgojD8hdJ+HmsSTTzbwsPVWX0HxmnVmSzixAtsGtJvHTP6AeZdbCgoPNK4j EiBRqdWbvCcXd0qzuGE9RaXAMnOT2wBdenmsFJIwhaf0r2bwDoEoSof27+QPR+CjdrNO pO4xizl/qEirp+Buwi/efX8VjfcZMc3pRSEYja0DTKiXQJJTlmv4Cwxyg+Tnoffpe9Kk 0CiIdfcDQwnf11pO53x63xQp56KTigavlJH7P3zy14Eoxk+jdiGvJI4dk4bOUFGKWQub FO3Q== 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=1KVKwzv6PSKKY2fr+KeYYMd1xy6tDc4gIj3OlrlQ7yw=; fh=czkAeDwyirGU0fHfBYIxDl8vJdhA5eGOYVGOtFKrHIY=; b=w6O7GlreIurmWtweP6Go7mp483BwGCwCIFfftwggwPwJOk0CArLr3/qGuuXfkakyxI ietMVjQZOE67usMT/TebsGz2akhawiC4FR5ax9qixw3jkt3otr1yCsh1FyMADWASSvjl WU5w0YyombnUQPnqsDnFm8DSQzm+hp7oFmEPcr4WVzUmxqf/FOSAIVw/8Bc2DgeYIhPZ 8+iCMO7UQmh1H6duRStiYhDo4dCrjkkoMlepxf6LJEnit2jeLDKW2B5SKQaAzFmasitz mHaD04Fx0h7UhDvKR0L84dNIqf09xFYclMkZ3e+n8YYoRjH3e6fCrWFUnlX6Lf87X36Q TM3A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TUCEPz+t; 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 ada2fe7eead31-48c3513710fsi2338018137.18.2024.06.12.08.38.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Jun 2024 08:38:05 -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=TUCEPz+t; 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 1sHQ0N-0000kE-Hk; Wed, 12 Jun 2024 11:35:19 -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 1sHQ0J-0000Px-T3 for qemu-devel@nongnu.org; Wed, 12 Jun 2024 11:35:15 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sHQ0G-0004JT-1g for qemu-devel@nongnu.org; Wed, 12 Jun 2024 11:35:15 -0400 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-57c83100bd6so4658978a12.3 for ; Wed, 12 Jun 2024 08:35:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718206509; x=1718811309; 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=1KVKwzv6PSKKY2fr+KeYYMd1xy6tDc4gIj3OlrlQ7yw=; b=TUCEPz+tdZ2I6nObV8OnsrYPwdq9khWIHo6z4DhU345LdyDdIlDeLaGZZrm6c2gMoU dOvRnbkdjz7Msb0kC+6F0WodxtO59DNXEi7Bx+GL1sCtZGhZlr6VNWNRx3Z3UG8ddNj2 VbLQYCDXyRfqLh6C39OXsdfgnJ3vGlQtuXu6bzvkVvbmEvmBi4IwvgPLq1LMQbtSnQuv Rhw12Vfaet/U8LToO+uBFFbL3xDOah9DqVMC6D2hKTChrbd4uj21cQj9MNBb/hDOnRT2 zBopOTGSFiwbnpPAVnYnRUm4ubVPeQRiEiXMp9JvB7vLKmw/L7qTPPFRWWlZK023cxFp kIEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718206509; x=1718811309; 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=1KVKwzv6PSKKY2fr+KeYYMd1xy6tDc4gIj3OlrlQ7yw=; b=FF9VVUCQYEMpkH/rFTrNx5oxyc7efyxy8Hx8IpebYdRqtKM5V3N3+CC+v2kpeVhDdu jZGsNOD89uQyilOWwHWc7p7CMP3/VW/tosjBV5nlP6FxDaq6z6ca25AYS0S8wA5R8pMu 7MnLbK4tj9comWB28/ElBwFvgaBQi8EFsgWlJDSbeMtdUOc7k5HIa9UN/cnRq1BC0O4/ XwNDgdpibM6+HxPSMu9QaxjO17r5fnBZQRUqRr+SJnEWlV/2MKiKv7t1SZwtLEyhVG6E b6vf20Fq0ktzfgF8qFx3NUpsgE9k8IxVfWSfsOJrg6ZabuBTbsJuIuF5cejNCBX2FMoU zt4g== X-Gm-Message-State: AOJu0Yw1dGsgFp8UGkQzNuQyCdgrsPDA3YOa22Np4hBLEiXQAfFhZOvV P+EUMDLbGPEzeIPGYRzIOLK/4gfBjeqxUL6xNi0v+8IpNj6jaO0UnFRwpv5mwOM= X-Received: by 2002:a50:d6dc:0:b0:57c:5b7a:87e7 with SMTP id 4fb4d7f45d1cf-57ca976c727mr1437158a12.14.1718206509408; Wed, 12 Jun 2024 08:35:09 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57c8f3a0c33sm3824158a12.82.2024.06.12.08.35.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 08:35:09 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 5FD225F93C; Wed, 12 Jun 2024 16:35:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: David Hildenbrand , Ilya Leoshkevich , Daniel Henrique Barboza , Marcelo Tosatti , Paolo Bonzini , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= , Mark Burton , qemu-s390x@nongnu.org, Peter Maydell , kvm@vger.kernel.org, Laurent Vivier , Halil Pasic , Christian Borntraeger , Alexandre Iooss , qemu-arm@nongnu.org, Alexander Graf , Nicholas Piggin , =?utf-8?q?Alex_Benn=C3=A9e?= , Marco Liebel , Thomas Huth , Roman Bolshakov , qemu-ppc@nongnu.org, Mahmoud Mandour , Cameron Esfahani , Jamie Iles , "Dr. David Alan Gilbert" , Richard Henderson Subject: [PATCH 2/9] gdbstub: move enums into separate header Date: Wed, 12 Jun 2024 16:35:01 +0100 Message-Id: <20240612153508.1532940-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240612153508.1532940-1-alex.bennee@linaro.org> References: <20240612153508.1532940-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x536.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 This is an experiment to further reduce the amount we throw into the exec headers. It might not be as useful as I initially thought because just under half of the users also need gdbserver_start(). Signed-off-by: Alex Bennée Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- include/exec/gdbstub.h | 9 --------- include/gdbstub/enums.h | 21 +++++++++++++++++++++ accel/hvf/hvf-accel-ops.c | 2 +- accel/kvm/kvm-all.c | 2 +- accel/tcg/tcg-accel-ops.c | 2 +- gdbstub/user.c | 1 + monitor/hmp-cmds.c | 3 ++- system/vl.c | 1 + target/arm/hvf/hvf.c | 2 +- target/arm/hyp_gdbstub.c | 2 +- target/arm/kvm.c | 2 +- target/i386/kvm/kvm.c | 2 +- target/ppc/kvm.c | 2 +- target/s390x/kvm/kvm.c | 2 +- 14 files changed, 34 insertions(+), 19 deletions(-) create mode 100644 include/gdbstub/enums.h diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index 008a92198a..1bd2c4ec2a 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -1,15 +1,6 @@ #ifndef GDBSTUB_H #define GDBSTUB_H -#define DEFAULT_GDBSTUB_PORT "1234" - -/* GDB breakpoint/watchpoint types */ -#define GDB_BREAKPOINT_SW 0 -#define GDB_BREAKPOINT_HW 1 -#define GDB_WATCHPOINT_WRITE 2 -#define GDB_WATCHPOINT_READ 3 -#define GDB_WATCHPOINT_ACCESS 4 - typedef struct GDBFeature { const char *xmlname; const char *xml; diff --git a/include/gdbstub/enums.h b/include/gdbstub/enums.h new file mode 100644 index 0000000000..c4d54a1d08 --- /dev/null +++ b/include/gdbstub/enums.h @@ -0,0 +1,21 @@ +/* + * gdbstub enums + * + * Copyright (c) 2024 Linaro Ltd + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef GDBSTUB_ENUMS_H +#define GDBSTUB_ENUMS_H + +#define DEFAULT_GDBSTUB_PORT "1234" + +/* GDB breakpoint/watchpoint types */ +#define GDB_BREAKPOINT_SW 0 +#define GDB_BREAKPOINT_HW 1 +#define GDB_WATCHPOINT_WRITE 2 +#define GDB_WATCHPOINT_READ 3 +#define GDB_WATCHPOINT_ACCESS 4 + +#endif /* GDBSTUB_ENUMS_H */ diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index b2a37a2229..ac08cfb9f3 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -52,7 +52,7 @@ #include "qemu/main-loop.h" #include "exec/address-spaces.h" #include "exec/exec-all.h" -#include "exec/gdbstub.h" +#include "gdbstub/enums.h" #include "sysemu/cpus.h" #include "sysemu/hvf.h" #include "sysemu/hvf_int.h" diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 009b49de44..5680cd157e 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -27,7 +27,7 @@ #include "hw/pci/msi.h" #include "hw/pci/msix.h" #include "hw/s390x/adapter.h" -#include "exec/gdbstub.h" +#include "gdbstub/enums.h" #include "sysemu/kvm_int.h" #include "sysemu/runstate.h" #include "sysemu/cpus.h" diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c index 1433e38f40..3c19e68a79 100644 --- a/accel/tcg/tcg-accel-ops.c +++ b/accel/tcg/tcg-accel-ops.c @@ -35,7 +35,7 @@ #include "exec/exec-all.h" #include "exec/hwaddr.h" #include "exec/tb-flush.h" -#include "exec/gdbstub.h" +#include "gdbstub/enums.h" #include "hw/core/cpu.h" diff --git a/gdbstub/user.c b/gdbstub/user.c index edeb72efeb..e34b58b407 100644 --- a/gdbstub/user.c +++ b/gdbstub/user.c @@ -18,6 +18,7 @@ #include "exec/gdbstub.h" #include "gdbstub/syscalls.h" #include "gdbstub/user.h" +#include "gdbstub/enums.h" #include "hw/core/cpu.h" #include "trace.h" #include "internals.h" diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index ea79148ee8..067152589b 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -15,8 +15,9 @@ #include "qemu/osdep.h" #include "exec/address-spaces.h" -#include "exec/gdbstub.h" #include "exec/ioport.h" +#include "exec/gdbstub.h" +#include "gdbstub/enums.h" #include "monitor/hmp.h" #include "qemu/help_option.h" #include "monitor/monitor-internal.h" diff --git a/system/vl.c b/system/vl.c index a3eede5fa5..cfcb674425 100644 --- a/system/vl.c +++ b/system/vl.c @@ -68,6 +68,7 @@ #include "sysemu/numa.h" #include "sysemu/hostmem.h" #include "exec/gdbstub.h" +#include "gdbstub/enums.h" #include "qemu/timer.h" #include "chardev/char.h" #include "qemu/bitmap.h" diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 45e2218be5..ef9bc42738 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -33,7 +33,7 @@ #include "trace/trace-target_arm_hvf.h" #include "migration/vmstate.h" -#include "exec/gdbstub.h" +#include "gdbstub/enums.h" #define MDSCR_EL1_SS_SHIFT 0 #define MDSCR_EL1_MDE_SHIFT 15 diff --git a/target/arm/hyp_gdbstub.c b/target/arm/hyp_gdbstub.c index ebde2899cd..f120d55caa 100644 --- a/target/arm/hyp_gdbstub.c +++ b/target/arm/hyp_gdbstub.c @@ -12,7 +12,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "internals.h" -#include "exec/gdbstub.h" +#include "gdbstub/enums.h" /* Maximum and current break/watch point counts */ int max_hw_bps, max_hw_wps; diff --git a/target/arm/kvm.c b/target/arm/kvm.c index 7cf5cf31de..70f79eda33 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -31,7 +31,7 @@ #include "hw/pci/pci.h" #include "exec/memattrs.h" #include "exec/address-spaces.h" -#include "exec/gdbstub.h" +#include "gdbstub/enums.h" #include "hw/boards.h" #include "hw/irq.h" #include "qapi/visitor.h" diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 912f5d5a6b..a666129f41 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -38,7 +38,7 @@ #include "hyperv.h" #include "hyperv-proto.h" -#include "exec/gdbstub.h" +#include "gdbstub/enums.h" #include "qemu/host-utils.h" #include "qemu/main-loop.h" #include "qemu/ratelimit.h" diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index 005f2239f3..2c3932200b 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -39,7 +39,7 @@ #include "migration/qemu-file-types.h" #include "sysemu/watchdog.h" #include "trace.h" -#include "exec/gdbstub.h" +#include "gdbstub/enums.h" #include "exec/memattrs.h" #include "exec/ram_addr.h" #include "sysemu/hostmem.h" diff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c index 1b494ecc20..94181d9281 100644 --- a/target/s390x/kvm/kvm.c +++ b/target/s390x/kvm/kvm.c @@ -40,7 +40,7 @@ #include "sysemu/hw_accel.h" #include "sysemu/runstate.h" #include "sysemu/device_tree.h" -#include "exec/gdbstub.h" +#include "gdbstub/enums.h" #include "exec/ram_addr.h" #include "trace.h" #include "hw/s390x/s390-pci-inst.h" From patchwork Wed Jun 12 15:35:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 803478 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:e87:b0:35b:5a80:51b4 with SMTP id dz7csp852811wrb; Wed, 12 Jun 2024 08:37:34 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXCwTu7eVaQdZwy0te6PC1MrYJ3aphUElU5legLBz1GGSWuVF6PpBcef3ytlY6wrqiZGDb+pdTEZOeiNleTZgKo X-Google-Smtp-Source: AGHT+IGY7r9z4EGtnx5n7XApWTccuwVUfCUWZt8ehQeU21J2RBc4QUEHLU2nTK8ZAGKPQu/Vo4Gx X-Received: by 2002:a05:6214:328c:b0:6b0:865b:66cf with SMTP id 6a1803df08f44-6b191d46aabmr18165976d6.17.1718206654187; Wed, 12 Jun 2024 08:37:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718206654; cv=none; d=google.com; s=arc-20160816; b=WF41YE3HQHbNiwTdcqqymOR7zOK34Vlbi5ceK+3fCHRlFyHjIKEQuk1syCm4d0e46K ZtkI53CPWOhNsotWBZqwjuZWlQaufWoY7HuVzXaXNjz+oa7+f/yuuPmzSBKuH0qDWklS cOaLtyBGh4N0Xd3l+eN5/qQvPT0N+WilDyxL8Ghe7lsgpxLvt4IXLAJzup04hqO82k+X 2XcMeQb3gPcqHDbfeAvjfRMm+TAul/qIX9ylP5XMQNVOH6sWQfQjM9jmCHrnC5keC1TF Qp8O11bZv3oKgL1Zh2GzB5m/YwClFtlgyu6meAQ0KlbLlRwTJcWx9HG/8qLY2p7JwTFi xaxg== 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=0UFHAsoemA/1ZyFVkieFp/Fehtdb65Sq2hGoqSQrpDk=; fh=db25YsqUVo3eIRzWVB7HueHEzf7WHEt51xFPObrkxX4=; b=MKU4vdnvlfr9PxohvDJbLUfXcVdTIIYRKVpP+RrHmyq0QtvRQo75pG7Ang6b7YL1Va 3AittJYI92g1nEqf1OxJCviWA1cL6b3g07bivGeW8Tz5uuUlPSP3lS58vpMsp2wT5WDG 5cDY040GJQmkT+8S7C4qphcVvhIvHtNAdi943/ula14CguawoW3/jXA1RkuajiZ5Lx2x keMlWURoNFR5RaL0IocOWpCP8yg7u2S6ij29yq1hNSzaSYwbVJRWKdXjCNe3RQ+Sd7Bc A6M52G89+sHbJLhu30dEs8EDYD33gJxZNNhiqwkbPmn6UoNu/aGZgZmPmP3swue1Kc9D waYg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zxqKA84o; 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 d75a77b69052e-441530f868csi36682141cf.306.2024.06.12.08.37.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Jun 2024 08:37:34 -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=zxqKA84o; 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 1sHQ0R-0000ww-AX; Wed, 12 Jun 2024 11:35:23 -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 1sHQ0M-0000hL-VM for qemu-devel@nongnu.org; Wed, 12 Jun 2024 11:35:19 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sHQ0H-0004KW-61 for qemu-devel@nongnu.org; Wed, 12 Jun 2024 11:35:18 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a62ef52e837so107166b.3 for ; Wed, 12 Jun 2024 08:35:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718206512; x=1718811312; 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=0UFHAsoemA/1ZyFVkieFp/Fehtdb65Sq2hGoqSQrpDk=; b=zxqKA84oXR+mtYuxxvWvdUd4yx8ec6lG2s0QKMG4hV3ozJ2XKuzLrnxMMbTfXGlOXx 5vZ6boR56bHcKthgNxYc/S3QnahgRKwTphgU2L3TMO1AtyM32Ku7GBTcX9Bjy4Pd4cDK fy+ZCM8tnb5kBNeoo4712B1HTHmoIg0yDIyDwv7m+1x4JSu2cg3pNGKqhrg9U+kJxM95 q/xaPP4cLzxGFApc6pvLPbrXaCSKqvUloKPnIJ2mmhB7/xlkWtiEZTb/diZnnO9HhwC/ IMqtYH46t86YGbLRWOr6teNB7fSB5qSx6C6+wCyDgj7aJN2MQAXR1B+b0EaRV8gMEaut ldBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718206512; x=1718811312; 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=0UFHAsoemA/1ZyFVkieFp/Fehtdb65Sq2hGoqSQrpDk=; b=IyMdRKoIhTz8WZSdl3lQALKJZgoW8RknhVPVqKAIWqq96hGYkUNEouSdS95CbELLf0 wllmX9qMxPDu/mJA6LDcJHstA/pbkvEWqjkvP9foeypjyWmI1SywJV0Tn3ufprDu3mpG r7Msel9UTY0AS8hk/VMzb6TXzE07sbo7CtgiUVJEuMV/JRDQhZhhMGHkzK1ARkm4HCaO T9zxxdwuCxT15bWZLCTN9dsCKROEhRgUzlrIHk7uTXLJOYyilD4cTzeOgvL/rk2DKHLR mLxDsFMWd5uggGKIf9ncXV4s9S+smR72gkK8d2YD9d4Wt7ZkLyMUVntNMOYm/FG0EHJt zorA== X-Gm-Message-State: AOJu0YyZIC49AnMPJ/3r5G0Ff/CSMVgEQsXa5XghK4nGK4jdiwNnamX6 aKnTy1ZIIuXvxRRvldJ/b0h4tq+/jOiOo7y/rGvZCFoprbojJ4Gp88VAatMj0Zk= X-Received: by 2002:a17:907:7756:b0:a6f:4f3f:e6d8 with SMTP id a640c23a62f3a-a6f4f3fe75emr48893466b.20.1718206511842; Wed, 12 Jun 2024 08:35:11 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f2195a2a3sm370298966b.99.2024.06.12.08.35.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 08:35:09 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 784465F93D; Wed, 12 Jun 2024 16:35:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: David Hildenbrand , Ilya Leoshkevich , Daniel Henrique Barboza , Marcelo Tosatti , Paolo Bonzini , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= , Mark Burton , qemu-s390x@nongnu.org, Peter Maydell , kvm@vger.kernel.org, Laurent Vivier , Halil Pasic , Christian Borntraeger , Alexandre Iooss , qemu-arm@nongnu.org, Alexander Graf , Nicholas Piggin , =?utf-8?q?Alex_Benn=C3=A9e?= , Marco Liebel , Thomas Huth , Roman Bolshakov , qemu-ppc@nongnu.org, Mahmoud Mandour , Cameron Esfahani , Jamie Iles , "Dr. David Alan Gilbert" , Richard Henderson , Akihiko Odaki Subject: [PATCH 3/9] plugins: Ensure register handles are not NULL Date: Wed, 12 Jun 2024 16:35:02 +0100 Message-Id: <20240612153508.1532940-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240612153508.1532940-1-alex.bennee@linaro.org> References: <20240612153508.1532940-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x629.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 From: Akihiko Odaki Ensure register handles are not NULL so that a plugin can assume NULL is invalid as a register handle. Signed-off-by: Akihiko Odaki Message-Id: <20240229-null-v1-1-e716501d981e@daynix.com> Signed-off-by: Alex Bennée Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- plugins/api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/api.c b/plugins/api.c index 5a0a7f8c71..6bdb26bbe3 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -507,7 +507,7 @@ static GArray *create_register_handles(GArray *gdbstub_regs) } /* Create a record for the plugin */ - desc.handle = GINT_TO_POINTER(grd->gdb_reg); + desc.handle = GINT_TO_POINTER(grd->gdb_reg + 1); desc.name = g_intern_string(grd->name); desc.feature = g_intern_string(grd->feature_name); g_array_append_val(find_data, desc); @@ -528,7 +528,7 @@ int qemu_plugin_read_register(struct qemu_plugin_register *reg, GByteArray *buf) { g_assert(current_cpu); - return gdb_read_register(current_cpu, buf, GPOINTER_TO_INT(reg)); + return gdb_read_register(current_cpu, buf, GPOINTER_TO_INT(reg) - 1); } struct qemu_plugin_scoreboard *qemu_plugin_scoreboard_new(size_t element_size) From patchwork Wed Jun 12 15:35:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 803476 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:e87:b0:35b:5a80:51b4 with SMTP id dz7csp852517wrb; Wed, 12 Jun 2024 08:36:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVby9r/Pg0G2525eY/i2Pch86Qyq2w91HHsNDBjfatKYv6kfTN1Qzgi9OOCyvWSXOAznmHERNISOWO/uEul0onc X-Google-Smtp-Source: AGHT+IFDc3Og4Fz3IW+LkCWtszKO4JIjSigTyVdq6I4C3leB+EZtEDea8w/tdwcddNCvTB89qF9q X-Received: by 2002:a05:6214:5889:b0:6b0:6671:86a with SMTP id 6a1803df08f44-6b1a7ad4be4mr20659396d6.48.1718206615101; Wed, 12 Jun 2024 08:36:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718206615; cv=none; d=google.com; s=arc-20160816; b=oFaEpzS5xwcwywBAbFN32LJVZ2W+eD2OG8FBPoimpoav6OH3fYFnQyQLanfr0tkJY5 ofoBluFD3XqoyrfHowSg3e2WjEdUdL1y7AMg7MkA+djaipgeZSQaPspzdTOr+GhK6t1L tXbpcGkQRFE1y75nEW3AAyQhQYooScO6BmC2gLCKNdrkk+FaC1gtV6p75LAlmwfxTBI5 61BQ2I6vsenUzhtCbHNEPN9T3IvqX1omHvpuKmI8qbkZT2ed/wyRT3c7bxELdnuvfYRy 5Hm35/WWU0ysE6M7kaL/F8/H0o4GJsKCIZet/H8iETUGnC8d41//g1dGW3kCwp26Lfi5 jN5A== 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=dsboB6lxAe+MtT/jZcZKahSTlUXC5/PD/o+7xcfjrRg=; fh=czkAeDwyirGU0fHfBYIxDl8vJdhA5eGOYVGOtFKrHIY=; b=RkuO0AjPogxhoLMM0hzKeyDQqIYysEYi0ZBbPRmdCBn6tayYC0ctUx4Pv/8DI9fzWN bA2lCmqKCJVymFmCOSAw7GxJfrMfJHZ1RNTy6p5LZIKN+hfUGLbR4Ogw9lJuW01AyXFS hjS8GYXABbqQBWnnRPG6VdWJHFPhi6ik68iCGZ7ErNvYOSQrEsO0/u9M0o3xhEkI4nul tWzJC2+QcZBHJu7t+q0y1tfB2SE9JmHVXdTEKG5T8Hos++QRtbViuqc7JFtX4t3AoSpg oPM0LPz50qTo3evATmoyIVBz+C7LPqbj9QWqFWSyFgxIgCLcGlC0aLbyxT8k50eqYlES pVdQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="kwAc7/MF"; 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 6a1803df08f44-6b065ed1712si121076056d6.107.2024.06.12.08.36.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Jun 2024 08:36:55 -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="kwAc7/MF"; 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 1sHQ0M-0000dk-HD; Wed, 12 Jun 2024 11:35: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 1sHQ0J-0000Pk-Oe for qemu-devel@nongnu.org; Wed, 12 Jun 2024 11:35:15 -0400 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 1sHQ0G-0004JZ-25 for qemu-devel@nongnu.org; Wed, 12 Jun 2024 11:35:15 -0400 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-57ca81533d0so1710410a12.0 for ; Wed, 12 Jun 2024 08:35:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718206509; x=1718811309; 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=dsboB6lxAe+MtT/jZcZKahSTlUXC5/PD/o+7xcfjrRg=; b=kwAc7/MF4LpOAlYar3KWi/8D0FBM7+q+5MCZmYhKtmzjw/foli6ksvrJtZ8Kna0d6p rhbC/yWGpeT6R3h2vhqxmihVCNxfkZ44DKDUu9T2PbLymuxFSI4RZYNG7kdmWGMzi/Ic wZu4Qb+c0mlVf7Gyda/EdIkavsd+ShwJcsjw/dksEr2T5/wbUcUr03MpmPE3ytgBHcH7 hShMTJJDxz031JdqvU+14i3U8fBVwAFhlrUBcqKf8aXRHvIxMtrEDXjme4o1ctBx6TdP BZX01DLYOohXWDizuKwNsrrTP/+ST6nUMTlSDRWlYLoyBptzz4NmhqRdkh1sz1M1CEoI kJLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718206509; x=1718811309; 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=dsboB6lxAe+MtT/jZcZKahSTlUXC5/PD/o+7xcfjrRg=; b=ChB0AnjIluEiz42i25PjBa3Jjzn0exXXwaJLXztxLW6TUqkSBrpZlPa+5TXYW7s342 R7BFlRhZRbR//dep26gP3u6XBN8DcoO7o0VxssZi9ONEAijtzBQAlM8OzjXlCfhm5AvI 1vVwW2s4apIF+jZMoAVjvSoM0lv4oiP7eXkEfaMDPeThWyogLOfoIxEuDP4SKVYbDFZZ noePiLjE6oW3CoGSadG5iyL8eEziQpYiC4AWBKZaRWQ0tP+c2mRFWeoppdFgHyqvZpIg Rd2Zp3j350j9MewLtIJaADBA2ac/cbFC2Rhzds8+5S3eDNPBgsHyYqu8pl4suS3y5L2y rvzA== X-Gm-Message-State: AOJu0YzpkCL1EuX7Na8kPo/LadBiG3vKT304BEXfHrMDY2p8hbzViVKV O3W2Htjba3XEpD+PTRG+/roCRYShaYpCFbtfqoCLQG/FLaSF22AxxKFcEg9hT+k= X-Received: by 2002:a05:6402:1650:b0:57c:934f:4cae with SMTP id 4fb4d7f45d1cf-57cb4b99914mr28772a12.1.1718206509616; Wed, 12 Jun 2024 08:35:09 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57c960e677asm2815309a12.62.2024.06.12.08.35.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 08:35:09 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 93B765F93F; Wed, 12 Jun 2024 16:35:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: David Hildenbrand , Ilya Leoshkevich , Daniel Henrique Barboza , Marcelo Tosatti , Paolo Bonzini , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= , Mark Burton , qemu-s390x@nongnu.org, Peter Maydell , kvm@vger.kernel.org, Laurent Vivier , Halil Pasic , Christian Borntraeger , Alexandre Iooss , qemu-arm@nongnu.org, Alexander Graf , Nicholas Piggin , =?utf-8?q?Alex_Benn=C3=A9e?= , Marco Liebel , Thomas Huth , Roman Bolshakov , qemu-ppc@nongnu.org, Mahmoud Mandour , Cameron Esfahani , Jamie Iles , "Dr. David Alan Gilbert" , Richard Henderson Subject: [PATCH 4/9] sysemu: add set_virtual_time to accel ops Date: Wed, 12 Jun 2024 16:35:03 +0100 Message-Id: <20240612153508.1532940-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240612153508.1532940-1-alex.bennee@linaro.org> References: <20240612153508.1532940-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=alex.bennee@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=unavailable 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 We are about to remove direct calls to individual accelerators for this information and will need a central point for plugins to hook into time changes. From: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Pierrick Bouvier Signed-off-by: Alex Bennée Message-Id: <20240530220610.1245424-2-pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson --- include/sysemu/accel-ops.h | 18 +++++++++++++++++- include/sysemu/cpu-timers.h | 3 ++- ...et-virtual-clock.c => cpus-virtual-clock.c} | 5 +++++ system/cpus.c | 11 +++++++++++ stubs/meson.build | 2 +- 5 files changed, 36 insertions(+), 3 deletions(-) rename stubs/{cpus-get-virtual-clock.c => cpus-virtual-clock.c} (68%) diff --git a/include/sysemu/accel-ops.h b/include/sysemu/accel-ops.h index ef91fc28bb..a088672230 100644 --- a/include/sysemu/accel-ops.h +++ b/include/sysemu/accel-ops.h @@ -20,7 +20,12 @@ typedef struct AccelOpsClass AccelOpsClass; DECLARE_CLASS_CHECKERS(AccelOpsClass, ACCEL_OPS, TYPE_ACCEL_OPS) -/* cpus.c operations interface */ +/** + * struct AccelOpsClass - accelerator interfaces + * + * This structure is used to abstract accelerator differences from the + * core CPU code. Not all have to be implemented. + */ struct AccelOpsClass { /*< private >*/ ObjectClass parent_class; @@ -44,7 +49,18 @@ struct AccelOpsClass { void (*handle_interrupt)(CPUState *cpu, int mask); + /** + * @get_virtual_clock: fetch virtual clock + * @set_virtual_clock: set virtual clock + * + * These allow the timer subsystem to defer to the accelerator to + * fetch time. The set function is needed if the accelerator wants + * to track the changes to time as the timer is warped through + * various timer events. + */ int64_t (*get_virtual_clock)(void); + void (*set_virtual_clock)(int64_t time); + int64_t (*get_elapsed_ticks)(void); /* gdbstub hooks */ diff --git a/include/sysemu/cpu-timers.h b/include/sysemu/cpu-timers.h index d86738a378..7bfa960fbd 100644 --- a/include/sysemu/cpu-timers.h +++ b/include/sysemu/cpu-timers.h @@ -96,8 +96,9 @@ int64_t cpu_get_clock(void); void qemu_timer_notify_cb(void *opaque, QEMUClockType type); -/* get the VIRTUAL clock and VM elapsed ticks via the cpus accel interface */ +/* get/set VIRTUAL clock and VM elapsed ticks via the cpus accel interface */ int64_t cpus_get_virtual_clock(void); +void cpus_set_virtual_clock(int64_t new_time); int64_t cpus_get_elapsed_ticks(void); #endif /* SYSEMU_CPU_TIMERS_H */ diff --git a/stubs/cpus-get-virtual-clock.c b/stubs/cpus-virtual-clock.c similarity index 68% rename from stubs/cpus-get-virtual-clock.c rename to stubs/cpus-virtual-clock.c index fd447d53f3..af7c1a1d40 100644 --- a/stubs/cpus-get-virtual-clock.c +++ b/stubs/cpus-virtual-clock.c @@ -6,3 +6,8 @@ int64_t cpus_get_virtual_clock(void) { return cpu_get_clock(); } + +void cpus_set_virtual_clock(int64_t new_time) +{ + /* do nothing */ +} diff --git a/system/cpus.c b/system/cpus.c index f8fa78f33d..d3640c9503 100644 --- a/system/cpus.c +++ b/system/cpus.c @@ -229,6 +229,17 @@ int64_t cpus_get_virtual_clock(void) return cpu_get_clock(); } +/* + * Signal the new virtual time to the accelerator. This is only needed + * by accelerators that need to track the changes as we warp time. + */ +void cpus_set_virtual_clock(int64_t new_time) +{ + if (cpus_accel && cpus_accel->set_virtual_clock) { + cpus_accel->set_virtual_clock(new_time); + } +} + /* * return the time elapsed in VM between vm_start and vm_stop. Unless * icount is active, cpus_get_elapsed_ticks() uses units of the host CPU cycle diff --git a/stubs/meson.build b/stubs/meson.build index f15b48d01f..772a3e817d 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -29,7 +29,7 @@ endif if have_block or have_ga stub_ss.add(files('replay-tools.c')) # stubs for hooks in util/main-loop.c, util/async.c etc. - stub_ss.add(files('cpus-get-virtual-clock.c')) + stub_ss.add(files('cpus-virtual-clock.c')) stub_ss.add(files('icount.c')) stub_ss.add(files('graph-lock.c')) if linux_io_uring.found() From patchwork Wed Jun 12 15:35:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 803475 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:e87:b0:35b:5a80:51b4 with SMTP id dz7csp852371wrb; Wed, 12 Jun 2024 08:36:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUpwsNjbuWZPnEek6Y7toW6DCe81XLdZU9Zpi8I0br7xT9wzjmfj30z3byGa5MEg1LM73ByzEK8lQFlaplTZJJT X-Google-Smtp-Source: AGHT+IFlk4ROn17VNHlUIXhmoDc+qTma79HTT+lH2FBWdg/jbSud6xxHixGjCBGqZ714wiZKBewR X-Received: by 2002:a05:6830:3112:b0:6f9:90ba:6646 with SMTP id 46e09a7af769-6fa1c22e8c0mr2541514a34.26.1718206592222; Wed, 12 Jun 2024 08:36:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718206592; cv=none; d=google.com; s=arc-20160816; b=Lor598pVUc8Qv84gJOCIhUsSexlRsork0bQ3o+Gb5EZ1MH0CaSAbPYOTIBdbGvIy1S hB9Jis0GJ/IThsBvZN2d56mZ8mlRado8Yab44veNCghDqdd1lC+VnbFbP4cwXwpnw905 4iZSj19tVULUjrdeyr+hGm/3DOGlk4UITqvC8ijHdTwicU5VCpyNkRX1Z6Kb27plO09m 5kDuWfjKDo/iRDTNPvcNQ6nVrzC8TJxr9tKvek/1AgziKjDJds1rNK54ulWhfvh6ZUmB 82wwKlRwlSDnVOzToSPpP+NXffbFmiXPJaD0d3QjcnE7sLvRI73AVPk35IpwWzgMyIjw 14cQ== 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=bRGnfZngJdWMgOcvZ7TtStbP9AmubDNWr9Hu5lfqXOc=; fh=czkAeDwyirGU0fHfBYIxDl8vJdhA5eGOYVGOtFKrHIY=; b=SodHNFzFt2im6NfT3EKUD8UnTsDNtqumvg6FIX+TaitqgKUdHsuZP7oglGTf5X0EjY 35y8iAi5phumATNmMbvEDVzS3pvOEJCh7RLLXQuW5hBlW9qb6wdn5ynbQ4XyxZZ+x344 jcvK6GhqnT4KlOcQ6CohB6VPKRDj0mYoq0TK+pvD+XAHYwEkagRWagICG+LDXgXSvo6r fNAyKZnSelwLRWgk4N25fT23uH1uZ26EpH6wRNhUSI3D04lwM0lnchMSvCs3NjvZYwnW gIEWjfgscdzyxT8xv40JEUcvW17auJ4YkhjcZXc536mC80fAyFfEgkx8M9vM2/mGL/H5 8EyQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oKvC8Ade; 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 af79cd13be357-7956b8d5f3asi792758385a.526.2024.06.12.08.36.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Jun 2024 08:36:32 -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=oKvC8Ade; 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 1sHQ0P-0000sH-Rc; Wed, 12 Jun 2024 11:35: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 1sHQ0N-0000kF-EJ for qemu-devel@nongnu.org; Wed, 12 Jun 2024 11:35:19 -0400 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sHQ0H-0004Kc-OT for qemu-devel@nongnu.org; Wed, 12 Jun 2024 11:35:19 -0400 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-57ca578ce8dso1811451a12.2 for ; Wed, 12 Jun 2024 08:35:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718206512; x=1718811312; 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=bRGnfZngJdWMgOcvZ7TtStbP9AmubDNWr9Hu5lfqXOc=; b=oKvC8AdeLmiC8PTVtve2tjctTToR307gknJFJBqaOEnvyGRFaTqhcGg54pW5wHoIYI 90GSWpteZaRcqqxYNimPd0CWc4+ncNibjv3CUL/E3r3XXWRzuTSZABIDg54i0mRLcriy L92cRBTw8jxm/VizS+patrYN0q5Lm45MPplsba4Cl/yHSnJMCfG+BjD2w5xNyHUCo+dI jOrzL8R6574XtzZZW0IGnNzXIK/1FJd6gk+MN/JDaI4mlYpE6XKjN81TR9K/SpfxIjAG /3jhKjyW8rGCaMK/v1r7sDwz/PsVhGD9KDvYqZCdWY+tUcGzSQIRFy1FobWhAEKSgZuT 2IZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718206512; x=1718811312; 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=bRGnfZngJdWMgOcvZ7TtStbP9AmubDNWr9Hu5lfqXOc=; b=I0CPlcd/O65plRU5bXPOPJB7hdpnz6efK6NSz1//kvnZ9yooHnEzunxdpYZPJREFLH GS/c4wHDTYoaGkX9hoQTVbp6QMj5KtGkyW7Nkq0JKqA6X5+4yjO1wDzAw/tAlZDoCYfb EAZTyHMxRrjPhAQGwh1hMpt3txoYbiVb/5+DpdqF4p4r+xzybz71W8G7F3b95DQN1U8Z A4ij+2eh9krxu1F9Sz+r69TM8KPhFUwhyBCWHl71pNqBOfR8IfGIm5lB8GCULf+ylu2w xp7XXJIe7taEVIxRasdtTtQ8islm2Oyxh0dzLNWWsCs5M7t1HuctucloegAnncXscrXo VJHQ== X-Gm-Message-State: AOJu0Yz+Bka+0iQcRAK+IfSh4hwjntpTI4Rhm6Wa7qnuClonBw1g2pKO nMSNGX8kdyxYIbkjTQ5cYlCVOJiLoNHLoVbGL12gQsXQiInX8jeyfEH4YvyQGjg= X-Received: by 2002:a50:aac8:0:b0:579:e6d1:d38b with SMTP id 4fb4d7f45d1cf-57ca97562b0mr1891081a12.2.1718206512236; Wed, 12 Jun 2024 08:35:12 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57ca472956bsm1950484a12.29.2024.06.12.08.35.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 08:35:11 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id ABA8F5F944; Wed, 12 Jun 2024 16:35:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: David Hildenbrand , Ilya Leoshkevich , Daniel Henrique Barboza , Marcelo Tosatti , Paolo Bonzini , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= , Mark Burton , qemu-s390x@nongnu.org, Peter Maydell , kvm@vger.kernel.org, Laurent Vivier , Halil Pasic , Christian Borntraeger , Alexandre Iooss , qemu-arm@nongnu.org, Alexander Graf , Nicholas Piggin , =?utf-8?q?Alex_Benn=C3=A9e?= , Marco Liebel , Thomas Huth , Roman Bolshakov , qemu-ppc@nongnu.org, Mahmoud Mandour , Cameron Esfahani , Jamie Iles , "Dr. David Alan Gilbert" , Richard Henderson Subject: [PATCH 5/9] qtest: use cpu interface in qtest_clock_warp Date: Wed, 12 Jun 2024 16:35:04 +0100 Message-Id: <20240612153508.1532940-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240612153508.1532940-1-alex.bennee@linaro.org> References: <20240612153508.1532940-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52e.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 This generalises the qtest_clock_warp code to use the AccelOps handlers for updating its own sense of time. This will make the next patch which moves the warp code closer to pure code motion. From: Alex Bennée Acked-by: Thomas Huth Signed-off-by: Pierrick Bouvier Signed-off-by: Alex Bennée Message-Id: <20240530220610.1245424-3-pierrick.bouvier@linaro.org> --- include/sysemu/qtest.h | 1 + accel/qtest/qtest.c | 1 + system/qtest.c | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/sysemu/qtest.h b/include/sysemu/qtest.h index b5d5fd3463..45f3b7e1df 100644 --- a/include/sysemu/qtest.h +++ b/include/sysemu/qtest.h @@ -36,6 +36,7 @@ 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); +void qtest_set_virtual_clock(int64_t count); #endif #endif diff --git a/accel/qtest/qtest.c b/accel/qtest/qtest.c index f6056ac836..53182e6c2a 100644 --- a/accel/qtest/qtest.c +++ b/accel/qtest/qtest.c @@ -52,6 +52,7 @@ static void qtest_accel_ops_class_init(ObjectClass *oc, void *data) ops->create_vcpu_thread = dummy_start_vcpu_thread; ops->get_virtual_clock = qtest_get_virtual_clock; + ops->set_virtual_clock = qtest_set_virtual_clock; }; static const TypeInfo qtest_accel_ops_type = { diff --git a/system/qtest.c b/system/qtest.c index 507a358f3b..5be66b0140 100644 --- a/system/qtest.c +++ b/system/qtest.c @@ -332,14 +332,14 @@ int64_t qtest_get_virtual_clock(void) return qatomic_read_i64(&qtest_clock_counter); } -static void qtest_set_virtual_clock(int64_t count) +void qtest_set_virtual_clock(int64_t count) { qatomic_set_i64(&qtest_clock_counter, count); } static void qtest_clock_warp(int64_t dest) { - int64_t clock = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); + int64_t clock = cpus_get_virtual_clock(); AioContext *aio_context; assert(qtest_enabled()); aio_context = qemu_get_aio_context(); @@ -348,7 +348,7 @@ static void qtest_clock_warp(int64_t dest) QEMU_TIMER_ATTR_ALL); int64_t warp = qemu_soonest_timeout(dest - clock, deadline); - qtest_set_virtual_clock(qtest_get_virtual_clock() + warp); + cpus_set_virtual_clock(cpus_get_virtual_clock() + warp); qemu_clock_run_timers(QEMU_CLOCK_VIRTUAL); timerlist_run_timers(aio_context->tlg.tl[QEMU_CLOCK_VIRTUAL]); From patchwork Wed Jun 12 15:35:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 803474 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:e87:b0:35b:5a80:51b4 with SMTP id dz7csp852272wrb; Wed, 12 Jun 2024 08:36:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU7yk1qlt8mpE0DMu8KoCWJlIh1G1w1OnkdWKtJ1j7tIRtACIPTOTkfeep/8ky+foWQHhyMKjqFpd+1elp062Do X-Google-Smtp-Source: AGHT+IFXJbkc1ANgTppcsM5iYb8AYooemcuYtI0/w5GVQxHEdQcgnhmOBhlrabv6tdgMecusBBH3 X-Received: by 2002:a05:6214:3f91:b0:6b0:77fb:8f24 with SMTP id 6a1803df08f44-6b191779059mr24447336d6.17.1718206580868; Wed, 12 Jun 2024 08:36:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718206580; cv=none; d=google.com; s=arc-20160816; b=aG+LSQXXzJEqHB10fZeWRs3oa3uARlwoiT8SgGWoAqXlhFR2Jc7hSSth1B2D34i9nr mHBMPIl8SkXikWZ2Etpgjc0GyoV46PyN/r2L/gIw+hqGDJHVoH+iaQu97pp9E7mdugno WDpGKQNAoa9Mxn9mjPh6dFKVbzV/O3YB0swYTbntZ/wjabhv/sUXDmIoJt8wb2SniJWM I2/w4DRtO0TuL/3zsB6SQeuz1rxUkgj3+XSaHJM/DnCT8QNKV5ttsRei3rggJTNG0WC2 mE/tYKIn+5TNV08kbFG8TANuaYvybt1nicwwIBaGEjZ9KEDGB8JSPgVzCN5NT8/7xTjC Qkag== 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=SXF7Z655MWVuCTh0vDHFDJ5r0Y06lB8CjThjsNdjBZI=; fh=czkAeDwyirGU0fHfBYIxDl8vJdhA5eGOYVGOtFKrHIY=; b=wVPM05Y0ct8o4reWxky2gMjtD1VYKG3VSqe47wAv1GYF0CNniPyaXWDqGYaAUUFbiW v3W1y1iZ88MYaAu7qxsxJD4DtgdC6mBKQPpRqp/fHvAivbDaWI3m5mwyPWW3VqTRpiY7 S6NneyFSAwQHelQsp7PNohOIVYi2XdyrGSLxh0nRX4DbGGvkToctt7aRPtBgRrw2cg0F dcjSN6aDK3cjP/ToLBXtboLUt//mGtpKXxXpLC+axZtSb1FIDflcwxxW/vDVa2F54SkV gliaFjFOMtbDpMlmRBvz9mz3rEfaWYCdn+dp24aN9OafTCr5034uQx7SIlpHRTBaFwGQ 2UYA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yw05tdor; 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 6a1803df08f44-6b092d663c0si27345586d6.50.2024.06.12.08.36.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Jun 2024 08:36:20 -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=yw05tdor; 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 1sHQ0U-00015o-89; Wed, 12 Jun 2024 11:35: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 1sHQ0R-0000z5-97 for qemu-devel@nongnu.org; Wed, 12 Jun 2024 11:35:23 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sHQ0K-0004Ls-2F for qemu-devel@nongnu.org; Wed, 12 Jun 2024 11:35:22 -0400 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a6f09b457fdso291566b.2 for ; Wed, 12 Jun 2024 08:35:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718206514; x=1718811314; 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=SXF7Z655MWVuCTh0vDHFDJ5r0Y06lB8CjThjsNdjBZI=; b=yw05tdorIVDYYvVSUfzh1oG3n8gJNHb9NsoYc3wfLQpWLeamWD3AtguEN1mhb+XOjM neZyJGDY2H685FCu/ZbKYzv+5B+My27TiG3MjPQwuzDksvCrHXoFApEuycO0HUoBnZKe yla2x4lqRunNFuw2nJJR36UKIdyUPQtal7znoHTPxPj1RkR5sMLsOStoLGWE8ZUA/PFr nfdPuGpsT8A/rXIqEhXoq/sko325u8znotIO+ozrBcv19JEdwX07KxNAs3xmaKDu3InZ J3y/OdaV4NoIu/aYmrB/hzlA8CETbuCz4jSp7DkxQ17Rv97gGbq4tGlYjFzwq8WBXAbo 5l1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718206514; x=1718811314; 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=SXF7Z655MWVuCTh0vDHFDJ5r0Y06lB8CjThjsNdjBZI=; b=N7gWu69t9w9NgDi3jphwlNHnlzucTQvZ4coyfqOulpNe7TIXbtBbIHolcYNIg0Jlbi 7r/nXFqeugSGVX588DdO4GX3HOcEX7gS7WAixD92p7pceglsETVsBbiuQ91VUBvhP4t6 2zSNiVA2iFXFBYgY3BhYBhTSvaYW7uVAGWflecv+b2UhB5AufUIwvdLjWK3AL6JcwKzO 30VSjjTyaVWVQAWrc5lqG7nd8fFh011OcCLsii3s1sI70loVTFMZ6Z6/yJHuHcvJm6fv CgF4wUngfw9CQ7pEw/Yc/H0I8gAvYoqnsiRJ0eJeaVBaGrS11IsxT0elpC2AmlW82SVx vKcQ== X-Gm-Message-State: AOJu0YwbzvYtMzU2VluSAifxIYOBj6XDZivaCkEAdVpVQTkewZ4gDVIE epjxU9S3q2y36Dm5tcu5iP19Gdvea1qW9Kwiyx2k6z/esR5Kkxsczyp1qZqPeNM= X-Received: by 2002:a17:906:48c7:b0:a6f:4b5b:4ba7 with SMTP id a640c23a62f3a-a6f4b5b4c43mr115226566b.67.1718206514383; Wed, 12 Jun 2024 08:35:14 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f0c410d31sm575607766b.73.2024.06.12.08.35.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 08:35:11 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id C62165FA1A; Wed, 12 Jun 2024 16:35:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: David Hildenbrand , Ilya Leoshkevich , Daniel Henrique Barboza , Marcelo Tosatti , Paolo Bonzini , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= , Mark Burton , qemu-s390x@nongnu.org, Peter Maydell , kvm@vger.kernel.org, Laurent Vivier , Halil Pasic , Christian Borntraeger , Alexandre Iooss , qemu-arm@nongnu.org, Alexander Graf , Nicholas Piggin , =?utf-8?q?Alex_Benn=C3=A9e?= , Marco Liebel , Thomas Huth , Roman Bolshakov , qemu-ppc@nongnu.org, Mahmoud Mandour , Cameron Esfahani , Jamie Iles , "Dr. David Alan Gilbert" , Richard Henderson Subject: [PATCH 6/9] sysemu: generalise qtest_warp_clock as qemu_clock_advance_virtual_time Date: Wed, 12 Jun 2024 16:35:05 +0100 Message-Id: <20240612153508.1532940-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240612153508.1532940-1-alex.bennee@linaro.org> References: <20240612153508.1532940-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62b.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=unavailable 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 Move the key functionality of moving time forward into the clock sub-system itself. This will allow us to plumb in time control into plugins. From: Alex Bennée Signed-off-by: Pierrick Bouvier Signed-off-by: Alex Bennée Message-Id: <20240530220610.1245424-4-pierrick.bouvier@linaro.org> --- include/qemu/timer.h | 15 +++++++++++++++ system/qtest.c | 25 +++---------------------- util/qemu-timer.c | 26 ++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 22 deletions(-) diff --git a/include/qemu/timer.h b/include/qemu/timer.h index 9a366e551f..910587d829 100644 --- a/include/qemu/timer.h +++ b/include/qemu/timer.h @@ -245,6 +245,21 @@ bool qemu_clock_run_timers(QEMUClockType type); */ bool qemu_clock_run_all_timers(void); +/** + * qemu_clock_advance_virtual_time(): advance the virtual time tick + * @target: target time in nanoseconds + * + * This function is used where the control of the flow of time has + * been delegated to outside the clock subsystem (be it qtest, icount + * or some other external source). You can ask the clock system to + * return @early at the first expired timer. + * + * Time can only move forward, attempts to reverse time would lead to + * an error. + * + * Returns: new virtual time. + */ +int64_t qemu_clock_advance_virtual_time(int64_t dest); /* * QEMUTimerList diff --git a/system/qtest.c b/system/qtest.c index 5be66b0140..8cb98966b4 100644 --- a/system/qtest.c +++ b/system/qtest.c @@ -337,26 +337,6 @@ void qtest_set_virtual_clock(int64_t count) qatomic_set_i64(&qtest_clock_counter, count); } -static void qtest_clock_warp(int64_t dest) -{ - int64_t clock = cpus_get_virtual_clock(); - AioContext *aio_context; - assert(qtest_enabled()); - aio_context = qemu_get_aio_context(); - while (clock < dest) { - int64_t deadline = qemu_clock_deadline_ns_all(QEMU_CLOCK_VIRTUAL, - QEMU_TIMER_ATTR_ALL); - int64_t warp = qemu_soonest_timeout(dest - clock, deadline); - - cpus_set_virtual_clock(cpus_get_virtual_clock() + warp); - - qemu_clock_run_timers(QEMU_CLOCK_VIRTUAL); - timerlist_run_timers(aio_context->tlg.tl[QEMU_CLOCK_VIRTUAL]); - clock = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); - } - qemu_clock_notify(QEMU_CLOCK_VIRTUAL); -} - static bool (*process_command_cb)(CharBackend *chr, gchar **words); void qtest_set_command_cb(bool (*pc_cb)(CharBackend *chr, gchar **words)) @@ -751,7 +731,8 @@ static void qtest_process_command(CharBackend *chr, gchar **words) ns = qemu_clock_deadline_ns_all(QEMU_CLOCK_VIRTUAL, QEMU_TIMER_ATTR_ALL); } - qtest_clock_warp(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + ns); + qemu_clock_advance_virtual_time( + qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + ns); qtest_send_prefix(chr); qtest_sendf(chr, "OK %"PRIi64"\n", (int64_t)qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL)); @@ -777,7 +758,7 @@ static void qtest_process_command(CharBackend *chr, gchar **words) g_assert(words[1]); ret = qemu_strtoi64(words[1], NULL, 0, &ns); g_assert(ret == 0); - qtest_clock_warp(ns); + qemu_clock_advance_virtual_time(ns); qtest_send_prefix(chr); qtest_sendf(chr, "OK %"PRIi64"\n", (int64_t)qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL)); diff --git a/util/qemu-timer.c b/util/qemu-timer.c index 6a0de33dd2..213114be68 100644 --- a/util/qemu-timer.c +++ b/util/qemu-timer.c @@ -645,6 +645,11 @@ int64_t qemu_clock_get_ns(QEMUClockType type) } } +static void qemu_virtual_clock_set_ns(int64_t time) +{ + return cpus_set_virtual_clock(time); +} + void init_clocks(QEMUTimerListNotifyCB *notify_cb) { QEMUClockType type; @@ -675,3 +680,24 @@ bool qemu_clock_run_all_timers(void) return progress; } + +int64_t qemu_clock_advance_virtual_time(int64_t dest) +{ + int64_t clock = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); + AioContext *aio_context; + aio_context = qemu_get_aio_context(); + while (clock < dest) { + int64_t deadline = qemu_clock_deadline_ns_all(QEMU_CLOCK_VIRTUAL, + QEMU_TIMER_ATTR_ALL); + int64_t warp = qemu_soonest_timeout(dest - clock, deadline); + + qemu_virtual_clock_set_ns(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + warp); + + qemu_clock_run_timers(QEMU_CLOCK_VIRTUAL); + timerlist_run_timers(aio_context->tlg.tl[QEMU_CLOCK_VIRTUAL]); + clock = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); + } + qemu_clock_notify(QEMU_CLOCK_VIRTUAL); + + return clock; +} From patchwork Wed Jun 12 15:35:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 803481 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:e87:b0:35b:5a80:51b4 with SMTP id dz7csp852948wrb; Wed, 12 Jun 2024 08:37:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWdT3vIoxaepy6lnL7XSgO1Q02EVeBy+7kQ/cNnAwVLxpi2PzosilXTfIKNjdrywHy0Kk4K+AwAQmLxqCCis42F X-Google-Smtp-Source: AGHT+IF7+rTrYrsSO9WGJHip9BwHpiHl4i8D5LHfD4ZFIBGcjYjbwzl22M1SoLLQZ/U+ikjMVfhN X-Received: by 2002:a67:fe52:0:b0:48d:91b5:35ee with SMTP id ada2fe7eead31-48da06887c3mr83653137.3.1718206674703; Wed, 12 Jun 2024 08:37:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718206674; cv=none; d=google.com; s=arc-20160816; b=D98FJ4Na3E6sdyPAYg2AMp0VhMgkMEFyIT6yhTis+gR8fsp6K5IGob1fCnpvSyJmvB sd5xI1wtJYB0y478QTrxxdG9A3UMHR4FpT4u1bGI4oxYY9HxoBlJRN1a+xYj5hI2IKPA mXwPKPdYTz2HkXOXt5QO6PrYTp9rR7D3Q3Yi2Ritm+GJjAsnbRlYGKRpirZKO/mUHd0M Om+Q64hrOqizV0US4CLzNwuiXSL5H+J/MjBnpcDKDOOkybG9v6e10WgYkOPW3joh+9x7 +zTJPtOF37rkiEEAwXUDlij9OF67HX6XYXUGrQA+oCAGxEfV0y5ZaFPwic1FMSLy4ObK 0DzQ== 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=a0NIpkhyGGYgnbxSmBPfzzcGZB9GrmkEzQVe5cCnoVc=; fh=czkAeDwyirGU0fHfBYIxDl8vJdhA5eGOYVGOtFKrHIY=; b=u3yzxHT8wwI5osCEGBBxUnN4omqlQtXs5U085t2satlwZWdN7VxnR1u3tEM8JglLMv P5yCEEIJXu0u+7DuznddfoNnylS8QUji3R2ho5z1S2CE4HrlfQGkbvUAGhnyZ5Di1pp6 5BjQ0P41MYDxMg3QLt19JU7Q5H6kec6yqsTcsHiSeu6ZngB7jLbtLmKJNRB+88Kh81FM FLsoFpKM+s21bjKI/2CqaHfaJNc3Kef/TiHPPFqlycC1rm5pSs3rOApWpcFqH+EiaSBr LrPbe2rCiA6WuF8OZu2ngbdMrmvQ/fEJQk5/M8v714zcoWoD2YeJlEXFwwx7kZYyDwyM /HzA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tRTIDd1H; 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 ada2fe7eead31-48c500cbc3fsi1619856137.368.2024.06.12.08.37.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Jun 2024 08:37: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=tRTIDd1H; 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 1sHQ0T-00013P-EL; Wed, 12 Jun 2024 11:35:25 -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 1sHQ0P-0000t3-TD for qemu-devel@nongnu.org; Wed, 12 Jun 2024 11:35:21 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sHQ0J-0004LM-0c for qemu-devel@nongnu.org; Wed, 12 Jun 2024 11:35:21 -0400 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-57864327f6eso2062419a12.1 for ; Wed, 12 Jun 2024 08:35:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718206513; x=1718811313; 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=a0NIpkhyGGYgnbxSmBPfzzcGZB9GrmkEzQVe5cCnoVc=; b=tRTIDd1HyYwWmQwkkWddb105y5bfpXwZbOp9TBgvN7EjHiAD7KYItTow7GFMi/Be8S 4lBWP+utlChzWSjn21UIFUf+BwGdwZSGNta0TrH5EXYb4RyyRW6jlql74WRZkBiQkjF6 eXXPqNgPJrdJ9FuUx3w3Zlnt2ve/w8kmve8Q3HfT0KZYfnJxlUoAANNC3q00IfAh4H+7 6mFWgCorjlh5yJRTJv4taoZ5YOgNjPqARkUxtYn2LcLCCBdeW6iUk8vCH3bCX77c7xKa XMsSWErr/W1Lty1VuGC5hiOl6B43HhTlrjBDRd/iwpqduPf8peMwt41mgkTdurX/mpN/ 1b0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718206513; x=1718811313; 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=a0NIpkhyGGYgnbxSmBPfzzcGZB9GrmkEzQVe5cCnoVc=; b=n7jZZS4vlzPPMzooKCYHPsC9SxhwKxd5PzK9ArBr+PC99q+5lYX5PqY4fc9gLWuBAk +3yuXLol74fqkMhkGnX9TGqBqlUPcR9HgvGOUzWdinAldA99xl95y0AYwTAc5JsrwlLP UwJtS7dFv/zVAiULpn9i3ubijHlVCFUbj5KAfzk/OWW3oYzwnPT2vzg591/KjnQRgPrg Fr2xG9CS30s/C09r2eTVzOUWxAL2VuLnCey+K/gE/ZiCDu28II2cSbJR/g15ODbuIHSX u2wckcPCrNIe5YhD9C/usHL2aBrFXczi/zCVnD2l42RLTffWO2iMUYK8elid0bXLA5W4 7Wjg== X-Gm-Message-State: AOJu0Yz8hrB7S6dTcrT4HevE8fONCug5qlUpcFWgJ03LT/R3LzxX9apg uiP3iMEOCEGI9XW1pinHV2sSbCP2mZ7WLt+WYwpgHCkP5sACDDsrqWXGsE7i7Og= X-Received: by 2002:a05:6402:703:b0:57c:537a:49c5 with SMTP id 4fb4d7f45d1cf-57cb4c17f24mr6294a12.18.1718206513407; Wed, 12 Jun 2024 08:35:13 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57c855b959bsm5045481a12.38.2024.06.12.08.35.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 08:35:11 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id DE76D5FA1B; Wed, 12 Jun 2024 16:35:08 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: David Hildenbrand , Ilya Leoshkevich , Daniel Henrique Barboza , Marcelo Tosatti , Paolo Bonzini , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= , Mark Burton , qemu-s390x@nongnu.org, Peter Maydell , kvm@vger.kernel.org, Laurent Vivier , Halil Pasic , Christian Borntraeger , Alexandre Iooss , qemu-arm@nongnu.org, Alexander Graf , Nicholas Piggin , =?utf-8?q?Alex_Benn=C3=A9e?= , Marco Liebel , Thomas Huth , Roman Bolshakov , qemu-ppc@nongnu.org, Mahmoud Mandour , Cameron Esfahani , Jamie Iles , "Dr. David Alan Gilbert" , Richard Henderson Subject: [PATCH 7/9] qtest: move qtest_{get, set}_virtual_clock to accel/qtest/qtest.c Date: Wed, 12 Jun 2024 16:35:06 +0100 Message-Id: <20240612153508.1532940-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240612153508.1532940-1-alex.bennee@linaro.org> References: <20240612153508.1532940-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x535.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Signed-off-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20240530220610.1245424-5-pierrick.bouvier@linaro.org> --- include/sysemu/qtest.h | 3 --- accel/qtest/qtest.c | 12 ++++++++++++ system/qtest.c | 12 ------------ 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/include/sysemu/qtest.h b/include/sysemu/qtest.h index 45f3b7e1df..c161d75165 100644 --- a/include/sysemu/qtest.h +++ b/include/sysemu/qtest.h @@ -34,9 +34,6 @@ void qtest_server_init(const char *qtest_chrdev, const char *qtest_log, Error ** void qtest_server_set_send_handler(void (*send)(void *, const char *), void *opaque); void qtest_server_inproc_recv(void *opaque, const char *buf); - -int64_t qtest_get_virtual_clock(void); -void qtest_set_virtual_clock(int64_t count); #endif #endif diff --git a/accel/qtest/qtest.c b/accel/qtest/qtest.c index 53182e6c2a..bf14032d29 100644 --- a/accel/qtest/qtest.c +++ b/accel/qtest/qtest.c @@ -24,6 +24,18 @@ #include "qemu/main-loop.h" #include "hw/core/cpu.h" +static int64_t qtest_clock_counter; + +static int64_t qtest_get_virtual_clock(void) +{ + return qatomic_read_i64(&qtest_clock_counter); +} + +static void qtest_set_virtual_clock(int64_t count) +{ + qatomic_set_i64(&qtest_clock_counter, count); +} + static int qtest_init_accel(MachineState *ms) { return 0; diff --git a/system/qtest.c b/system/qtest.c index 8cb98966b4..12703a2045 100644 --- a/system/qtest.c +++ b/system/qtest.c @@ -325,18 +325,6 @@ static void qtest_irq_handler(void *opaque, int n, int level) } } -static int64_t qtest_clock_counter; - -int64_t qtest_get_virtual_clock(void) -{ - return qatomic_read_i64(&qtest_clock_counter); -} - -void qtest_set_virtual_clock(int64_t count) -{ - qatomic_set_i64(&qtest_clock_counter, count); -} - static bool (*process_command_cb)(CharBackend *chr, gchar **words); void qtest_set_command_cb(bool (*pc_cb)(CharBackend *chr, gchar **words)) From patchwork Wed Jun 12 15:35:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 803477 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:e87:b0:35b:5a80:51b4 with SMTP id dz7csp852569wrb; Wed, 12 Jun 2024 08:37:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW7G1ZIePuWEMQdGRnQRM093nK1Z30ttV+ACToOZQPocf7jZH6vxwpXSpLwx+JhrYxRzN/X/qMecsWiKqvnTiIc X-Google-Smtp-Source: AGHT+IEsP0uSUVjcHzp16egWzar5CMNS/bg1zXBRupNPAsgB2yP3EjoaamfsH3k/aGZT6ATWGm57 X-Received: by 2002:a05:620a:198a:b0:795:4e35:ea9d with SMTP id af79cd13be357-797f60d8207mr268249485a.60.1718206621886; Wed, 12 Jun 2024 08:37:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718206621; cv=none; d=google.com; s=arc-20160816; b=b2TU98h4YKpYP6DkAe2jdUDdjulh1knIoV4s9AjlR1993hoINWvbRirfQIstlkWrVi nkk8g97c1CYvoTMH3x/CLDnHt6Ntav9dN9I4BD9gFeID27WV3NdVh9PBTYDM5Tywk27t WTxZZkPwaxNDZ1vKBHInZuj0DVsIiLlRqFed/DgNBX9jkP+KuSgQlbtztZsOM2bDOaES YTKbqh/kR3NEDtXB9E49IqrN8LbuJc8i7PEtI0FQkRlIDwMNtOqCAdU/VX0Fmeban9CM jcuoH8ydQ5IpNv9Rjak4THgu8e6ZPwDDWAJBy4nnaiiGoA8cZU1QwH1qONlWLEiaIEln 3u9g== 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=PGoQj4qpl5RhrrC1ARvmO5/75amh4ElfKsyRGTMZr6o=; fh=czkAeDwyirGU0fHfBYIxDl8vJdhA5eGOYVGOtFKrHIY=; b=p6ofSqs8FIptS3ep4+8qH9FOmg6suFSUI+GgDLSIEDdnY7Iz7+kPbh51L2+GGmiBz8 yQa0IQcxAB/1fMdXs8Abh5NxZwHHJ3Gkve6iCFR7HIASQq1ue54AT3YGHUm0kfbOjE2D 5oBSKqYNM6ycq5Br8963KpPujhpc+m9HS+yQHjR1CBuKxxAD4+gKyV5d98g1cOcIY6Jg AEwHgBY50P16ckrmDHRVKQRxyCBgboGawLTA2EOucqtqNkzf8YWofC2nkuZ4vDqVsLFS 9yVUIs3CKMEJKhdkZgp8FKW/O/jo7Ga2ZyEq6qsDGtEXbEeXyBuEgQtuAE9K+erehwFb xfYw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BNRIWsfA; 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 af79cd13be357-795531bf159si1081187685a.543.2024.06.12.08.37.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Jun 2024 08:37:01 -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=BNRIWsfA; 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 1sHQ0V-0001B1-SN; Wed, 12 Jun 2024 11:35:27 -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 1sHQ0S-00012I-Pe for qemu-devel@nongnu.org; Wed, 12 Jun 2024 11:35:24 -0400 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sHQ0K-0004M5-F9 for qemu-devel@nongnu.org; Wed, 12 Jun 2024 11:35:24 -0400 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a6f176c5c10so365066b.2 for ; Wed, 12 Jun 2024 08:35:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718206514; x=1718811314; 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=PGoQj4qpl5RhrrC1ARvmO5/75amh4ElfKsyRGTMZr6o=; b=BNRIWsfAS6JSRuQ1h7z776vVCSnyqwW3e1EPSkDUU1eN4+vEy0BKWBIdzXKT01JxJT 87p6IzEPIUC7ucYRz9YpZPrEajGjXbFoTACBY/P+bm7PHHlxk5vPYzo3CM7jISqmUZj5 KmfCqEeEftHwY2ftuIlp6wAL1emKi3B+j4hPAZopuQZJEfaLnjv1RhhpalgNOcUuy+x0 dgW52lD0qqUireLh9PRdvuK1p8IXjQ+J2gfDlmoGlFz926zbYLfwjPIObf8bsvuuR2KK RKOYX4uu4Uljse+UlpdJP+OmKnfPOr/kKBgI/B5zeHWYk7sEkcyq3JVAvC9UnHX3uhn7 q6xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718206514; x=1718811314; 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=PGoQj4qpl5RhrrC1ARvmO5/75amh4ElfKsyRGTMZr6o=; b=rP1u5Dhh0KoKLHgGgB0P9uxz26Ubpg3NESvFE7N9hIwHiikVwyADEKlGlUIbxcVaDS /ge5WU/hQxAjPNN4WnohXkbn+NIQRkqTIArN7QkDvrnHM791i+/791euPVDIgOSuxVNM LtmmTKCgPSwBHzuiCoAxQiwE3qHLEzJTpEvCQ4Ri/LyQ0uZMliQtH3TikKpvR7oe/856 Acf+EWqm14/UbQTiOkeRJkvty3IhzWuLTrt8VqGPRDzjm4TV0i6tQeY8aJepX6S7E6nF 8bx4IDGQn/yqbrmvNN9DIJOaT9jMD11YDo5tGKeKACKQU4YTUwcVvSoXQ8MgEvXhcsqU l7dw== X-Gm-Message-State: AOJu0Ywe7Q5f9rh5ARvDB1N24sdgLMf4C4rzJuA7lWGpd8UwUy4YI+iG oRcB6Ro9X0D+b65WadvZSzb2bpEwPpI2W55q9Nw9cCseF7pZJK25VKFYgiLj1io= X-Received: by 2002:a17:906:7311:b0:a6f:4b46:dbb4 with SMTP id a640c23a62f3a-a6f4b46dd46mr128087966b.62.1718206514616; Wed, 12 Jun 2024 08:35:14 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6ef669bea6sm676540366b.153.2024.06.12.08.35.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 08:35:11 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 059CA5FA1C; Wed, 12 Jun 2024 16:35:09 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: David Hildenbrand , Ilya Leoshkevich , Daniel Henrique Barboza , Marcelo Tosatti , Paolo Bonzini , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= , Mark Burton , qemu-s390x@nongnu.org, Peter Maydell , kvm@vger.kernel.org, Laurent Vivier , Halil Pasic , Christian Borntraeger , Alexandre Iooss , qemu-arm@nongnu.org, Alexander Graf , Nicholas Piggin , =?utf-8?q?Alex_Benn=C3=A9e?= , Marco Liebel , Thomas Huth , Roman Bolshakov , qemu-ppc@nongnu.org, Mahmoud Mandour , Cameron Esfahani , Jamie Iles , "Dr. David Alan Gilbert" , Richard Henderson Subject: [PATCH 8/9] plugins: add time control API Date: Wed, 12 Jun 2024 16:35:07 +0100 Message-Id: <20240612153508.1532940-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240612153508.1532940-1-alex.bennee@linaro.org> References: <20240612153508.1532940-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x634.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=unavailable 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 Expose the ability to control time through the plugin API. Only one plugin can control time so it has to request control when loaded. There are probably more corner cases to catch here. From: Alex Bennée Signed-off-by: Pierrick Bouvier [AJB: tweaked user-mode handling] Signed-off-by: Alex Bennée Message-Id: <20240530220610.1245424-6-pierrick.bouvier@linaro.org> --- plugins/next - make qemu_plugin_update_ns a NOP in user-mode --- include/qemu/qemu-plugin.h | 25 +++++++++++++++++++++++++ plugins/api.c | 35 +++++++++++++++++++++++++++++++++++ plugins/qemu-plugins.symbols | 2 ++ 3 files changed, 62 insertions(+) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 95703d8fec..db4d67529e 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -661,6 +661,31 @@ void qemu_plugin_register_vcpu_mem_inline_per_vcpu( qemu_plugin_u64 entry, uint64_t imm); +/** + * qemu_plugin_request_time_control() - request the ability to control time + * + * This grants the plugin the ability to control system time. Only one + * plugin can control time so if multiple plugins request the ability + * all but the first will fail. + * + * Returns an opaque handle or NULL if fails + */ +const void *qemu_plugin_request_time_control(void); + +/** + * qemu_plugin_update_ns() - update system emulation time + * @handle: opaque handle returned by qemu_plugin_request_time_control() + * @time: time in nanoseconds + * + * This allows an appropriately authorised plugin (i.e. holding the + * time control handle) to move system time forward to @time. For + * user-mode emulation the time is not changed by this as all reported + * time comes from the host kernel. + * + * Start time is 0. + */ +void qemu_plugin_update_ns(const void *handle, int64_t time); + typedef void (*qemu_plugin_vcpu_syscall_cb_t)(qemu_plugin_id_t id, unsigned int vcpu_index, int64_t num, uint64_t a1, uint64_t a2, diff --git a/plugins/api.c b/plugins/api.c index 6bdb26bbe3..4431a0ea7e 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -39,6 +39,7 @@ #include "qemu/main-loop.h" #include "qemu/plugin.h" #include "qemu/log.h" +#include "qemu/timer.h" #include "tcg/tcg.h" #include "exec/exec-all.h" #include "exec/gdbstub.h" @@ -583,3 +584,37 @@ uint64_t qemu_plugin_u64_sum(qemu_plugin_u64 entry) } return total; } + +/* + * Time control + */ +static bool has_control; + +const void *qemu_plugin_request_time_control(void) +{ + if (!has_control) { + has_control = true; + return &has_control; + } + return NULL; +} + +#ifdef CONFIG_SOFTMMU +static void advance_virtual_time__async(CPUState *cpu, run_on_cpu_data data) +{ + int64_t new_time = data.host_ulong; + qemu_clock_advance_virtual_time(new_time); +} +#endif + +void qemu_plugin_update_ns(const void *handle, int64_t new_time) +{ +#ifdef CONFIG_SOFTMMU + if (handle == &has_control) { + /* Need to execute out of cpu_exec, so bql can be locked. */ + async_run_on_cpu(current_cpu, + advance_virtual_time__async, + RUN_ON_CPU_HOST_ULONG(new_time)); + } +#endif +} diff --git a/plugins/qemu-plugins.symbols b/plugins/qemu-plugins.symbols index aa0a77a319..ca773d8d9f 100644 --- a/plugins/qemu-plugins.symbols +++ b/plugins/qemu-plugins.symbols @@ -38,6 +38,7 @@ qemu_plugin_register_vcpu_tb_exec_cond_cb; qemu_plugin_register_vcpu_tb_exec_inline_per_vcpu; qemu_plugin_register_vcpu_tb_trans_cb; + qemu_plugin_request_time_control; qemu_plugin_reset; qemu_plugin_scoreboard_free; qemu_plugin_scoreboard_find; @@ -51,5 +52,6 @@ qemu_plugin_u64_set; qemu_plugin_u64_sum; qemu_plugin_uninstall; + qemu_plugin_update_ns; qemu_plugin_vcpu_for_each; }; From patchwork Wed Jun 12 15:35:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 803482 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:e87:b0:35b:5a80:51b4 with SMTP id dz7csp853005wrb; Wed, 12 Jun 2024 08:38:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXv9Ei0fOqqhrngEk/z7FwJt05vQoA3Ew9garmZ/pstxVvum9/IB2WE8lK/ZtyPSh9elmHsx0ZDKIDRdWy247QK X-Google-Smtp-Source: AGHT+IETaF4d8R18YEuQ2fpBZtCqoy6EolVtgXNLNdG6fgmysL2XPoZMA+gEZRas1W1zgvH1cNLP X-Received: by 2002:a81:4e88:0:b0:615:102e:5af1 with SMTP id 00721157ae682-62fbb40efa7mr20339177b3.24.1718206681910; Wed, 12 Jun 2024 08:38:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718206681; cv=none; d=google.com; s=arc-20160816; b=Hs8gCnj4ElpGU5Rr9Q3pCILMrXguZSX88JJorLMFBNvW6YFXz6UKnboJ0ckK9AeZmo GVQGH4r7OuUDZR/ygnyRDI9M/vULmnf47txxSS0n/osdDbIF3dzu3hxDovbkiA+Z2l99 huXc6xb0UbyDhVDedbAw6ht+BSzoX3NsHVmAtLYXzx/DBAJ4OWy7f0/XbVvOpyWBMhSc R9oDEtCjyobtLklM6RhNEX9LOMaUedNP9dtjT8+e5JDg3LZxQ5HBN5YQ1qDFn+1X4N/u mzpoBxZHKTvqMshu2nVyYSp4J0RcQLBAqimxmWS48Ng6jvMFAAtZoL7ACmmOsw9abHCi Gytw== 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=1uUeWcMjIB2TOUOcX1m/U9+CVF8niC1GNFEpyvssPNQ=; fh=czkAeDwyirGU0fHfBYIxDl8vJdhA5eGOYVGOtFKrHIY=; b=V+CgdPfLJTWPMti9XoOnPfScLTzuNpZvkUMxj2dDgaHURGCJ7zQsw/HB3aI9baN3ev lk8K0+8Im6Glqts4xunzs9hpHU/ECOV1V7Qhvc9JdMx2kppIdoMJ+uBGUzfvJoIH8fgC /NLnUmWUmhStdFzDde41yiYqcr6pZJOb6nHHle3GOlCeUhaDJ4WYCXHnb0PitwS99NDz UVeOThpW6LLKUFgIdId+MEsACDmChPuuh03iunIitqCkBqrR3HupKw9eXqRUy5yqFKMF LkxPNo2TDzl2P+y4w4oSpp2QX4cuBZbwbcjn5bNUJIUYFrTEJ8XkozSq1ZG+EEBc52nk SGyA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RcMdnO1Z; 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 6a1803df08f44-6b075c9b872si89792536d6.514.2024.06.12.08.38.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Jun 2024 08:38:01 -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=RcMdnO1Z; 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 1sHQ0W-0001Ck-Go; Wed, 12 Jun 2024 11:35:28 -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 1sHQ0U-00016Y-Dv for qemu-devel@nongnu.org; Wed, 12 Jun 2024 11:35:26 -0400 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sHQ0L-0004Mu-1o for qemu-devel@nongnu.org; Wed, 12 Jun 2024 11:35:26 -0400 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a6f13dddf7eso3522466b.0 for ; Wed, 12 Jun 2024 08:35:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718206515; x=1718811315; 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=1uUeWcMjIB2TOUOcX1m/U9+CVF8niC1GNFEpyvssPNQ=; b=RcMdnO1ZtxvjlNB86Y/Urmsn36OBz7zVw7aYoEqJbtVTzqVyvImWK2e4p6ondT5boZ 7+FaIi1zknb08vvmg+kAt2jwqYcoifDj7aGccaCEAMEBAzJBfUbp2d1ICdcgCMunBroQ LVHsx//C7Z3xMU2xZBW672Esg2QvFe2/KzyNkioSkJ10YlnN9YvBw8FutCru7lPSQWKc L1AJLsfHFyw2fnGQw1j/9IHO275fsC4VHo7qkS2YkEL7dZaOKwsw2sMR+8XrLdRjDsnj AtEt3HhDaWLTm7wdmvV/JCK9YyECjBQ0eESGLtejIB1oVfa5UIzYPNoczXsNjhab8ELo KJSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718206515; x=1718811315; 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=1uUeWcMjIB2TOUOcX1m/U9+CVF8niC1GNFEpyvssPNQ=; b=d78FRYPIIcL3RnQ2va0muK2QIZpZG7WMQ60i1UcfFlR9/uxGoNQNSd2Zba3nkTY6PJ iQcs7bdYT3h03GMO8PXZpr19AxxILI1a10wQyFEw9ig6abWYH67ZXps7XgqjlrIj8MuV ZZArhCh05gTM9Eqvq/rgyrVw03XV6FPo79qbkKgAZEN9PczSYgAriBpRkzyJ6kWfX1OY VRQwUbDN8JFp86dgV82kakUNdyqTVZEFNFm2c4V2Cxrmbwjh605B8SRhMjJ8DIazMSW8 nnySFRpbgDIyyNQUOyMvsPq/cypRL1orh+66rC+XFB899hFdy6Pmh+1MUJvHivYaNwgm dJdw== X-Gm-Message-State: AOJu0YzlCdvifv+1uTpAKQMdPSqkvlSkq46SXY0AyH7K1f73UBg6i52g QpS6Noymfs1POKnaVGDvyWUNfpIOqZiY2QG+5ToJKy8RZcYWutH+X2KWTX+Y6yQ= X-Received: by 2002:a17:906:bfc9:b0:a68:a843:9014 with SMTP id a640c23a62f3a-a6f47f88b59mr143131866b.18.1718206515475; Wed, 12 Jun 2024 08:35:15 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f1c49e682sm434788566b.205.2024.06.12.08.35.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 08:35:11 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 1FC305F893; Wed, 12 Jun 2024 16:35:09 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: David Hildenbrand , Ilya Leoshkevich , Daniel Henrique Barboza , Marcelo Tosatti , Paolo Bonzini , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= , Mark Burton , qemu-s390x@nongnu.org, Peter Maydell , kvm@vger.kernel.org, Laurent Vivier , Halil Pasic , Christian Borntraeger , Alexandre Iooss , qemu-arm@nongnu.org, Alexander Graf , Nicholas Piggin , =?utf-8?q?Alex_Benn=C3=A9e?= , Marco Liebel , Thomas Huth , Roman Bolshakov , qemu-ppc@nongnu.org, Mahmoud Mandour , Cameron Esfahani , Jamie Iles , "Dr. David Alan Gilbert" , Richard Henderson Subject: [PATCH 9/9] contrib/plugins: add ips plugin example for cost modeling Date: Wed, 12 Jun 2024 16:35:08 +0100 Message-Id: <20240612153508.1532940-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240612153508.1532940-1-alex.bennee@linaro.org> References: <20240612153508.1532940-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62c.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 From: Pierrick Bouvier This plugin uses the new time control interface to make decisions about the state of time during the emulation. The algorithm is currently very simple. The user specifies an ips rate which applies per core. If the core runs ahead of its allocated execution time the plugin sleeps for a bit to let real time catch up. Either way time is updated for the emulation as a function of total executed instructions with some adjustments for cores that idle. Examples -------- Slow down execution of /bin/true: $ num_insn=$(./build/qemu-x86_64 -plugin ./build/tests/plugin/libinsn.so -d plugin /bin/true |& grep total | sed -e 's/.*: //') $ time ./build/qemu-x86_64 -plugin ./build/contrib/plugins/libips.so,ips=$(($num_insn/4)) /bin/true real 4.000s Boot a Linux kernel simulating a 250MHz cpu: $ /build/qemu-system-x86_64 -kernel /boot/vmlinuz-6.1.0-21-amd64 -append "console=ttyS0" -plugin ./build/contrib/plugins/libips.so,ips=$((250*1000*1000)) -smp 1 -m 512 check time until kernel panic on serial0 Tested in system mode by booting a full debian system, and using: $ sysbench cpu run Performance decrease linearly with the given number of ips. Signed-off-by: Pierrick Bouvier Message-Id: <20240530220610.1245424-7-pierrick.bouvier@linaro.org> --- contrib/plugins/ips.c | 164 +++++++++++++++++++++++++++++++++++++++ contrib/plugins/Makefile | 1 + 2 files changed, 165 insertions(+) create mode 100644 contrib/plugins/ips.c diff --git a/contrib/plugins/ips.c b/contrib/plugins/ips.c new file mode 100644 index 0000000000..db77729264 --- /dev/null +++ b/contrib/plugins/ips.c @@ -0,0 +1,164 @@ +/* + * ips rate limiting plugin. + * + * This plugin can be used to restrict the execution of a system to a + * particular number of Instructions Per Second (ips). This controls + * time as seen by the guest so while wall-clock time may be longer + * from the guests point of view time will pass at the normal rate. + * + * This uses the new plugin API which allows the plugin to control + * system time. + * + * Copyright (c) 2023 Linaro Ltd + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include +#include +#include + +QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION; + +/* how many times do we update time per sec */ +#define NUM_TIME_UPDATE_PER_SEC 10 +#define NSEC_IN_ONE_SEC (1000 * 1000 * 1000) + +static GMutex global_state_lock; + +static uint64_t max_insn_per_second = 1000 * 1000 * 1000; /* ips per core, per second */ +static uint64_t max_insn_per_quantum; /* trap every N instructions */ +static int64_t virtual_time_ns; /* last set virtual time */ + +static const void *time_handle; + +typedef struct { + uint64_t total_insn; + uint64_t quantum_insn; /* insn in last quantum */ + int64_t last_quantum_time; /* time when last quantum started */ +} vCPUTime; + +struct qemu_plugin_scoreboard *vcpus; + +/* return epoch time in ns */ +static int64_t now_ns(void) +{ + return g_get_real_time() * 1000; +} + +static uint64_t num_insn_during(int64_t elapsed_ns) +{ + double num_secs = elapsed_ns / (double) NSEC_IN_ONE_SEC; + return num_secs * (double) max_insn_per_second; +} + +static int64_t time_for_insn(uint64_t num_insn) +{ + double num_secs = (double) num_insn / (double) max_insn_per_second; + return num_secs * (double) NSEC_IN_ONE_SEC; +} + +static void update_system_time(vCPUTime *vcpu) +{ + int64_t elapsed_ns = now_ns() - vcpu->last_quantum_time; + uint64_t max_insn = num_insn_during(elapsed_ns); + + if (vcpu->quantum_insn >= max_insn) { + /* this vcpu ran faster than expected, so it has to sleep */ + uint64_t insn_advance = vcpu->quantum_insn - max_insn; + uint64_t time_advance_ns = time_for_insn(insn_advance); + int64_t sleep_us = time_advance_ns / 1000; + g_usleep(sleep_us); + } + + vcpu->total_insn += vcpu->quantum_insn; + vcpu->quantum_insn = 0; + vcpu->last_quantum_time = now_ns(); + + /* based on total number of instructions, what should be the new time? */ + int64_t new_virtual_time = time_for_insn(vcpu->total_insn); + + g_mutex_lock(&global_state_lock); + + /* Time only moves forward. Another vcpu might have updated it already. */ + if (new_virtual_time > virtual_time_ns) { + qemu_plugin_update_ns(time_handle, new_virtual_time); + virtual_time_ns = new_virtual_time; + } + + g_mutex_unlock(&global_state_lock); +} + +static void vcpu_init(qemu_plugin_id_t id, unsigned int cpu_index) +{ + vCPUTime *vcpu = qemu_plugin_scoreboard_find(vcpus, cpu_index); + vcpu->total_insn = 0; + vcpu->quantum_insn = 0; + vcpu->last_quantum_time = now_ns(); +} + +static void vcpu_exit(qemu_plugin_id_t id, unsigned int cpu_index) +{ + vCPUTime *vcpu = qemu_plugin_scoreboard_find(vcpus, cpu_index); + update_system_time(vcpu); +} + +static void every_quantum_insn(unsigned int cpu_index, void *udata) +{ + vCPUTime *vcpu = qemu_plugin_scoreboard_find(vcpus, cpu_index); + g_assert(vcpu->quantum_insn >= max_insn_per_quantum); + update_system_time(vcpu); +} + +static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +{ + size_t n_insns = qemu_plugin_tb_n_insns(tb); + qemu_plugin_u64 quantum_insn = + qemu_plugin_scoreboard_u64_in_struct(vcpus, vCPUTime, quantum_insn); + /* count (and eventually trap) once per tb */ + qemu_plugin_register_vcpu_tb_exec_inline_per_vcpu( + tb, QEMU_PLUGIN_INLINE_ADD_U64, quantum_insn, n_insns); + qemu_plugin_register_vcpu_tb_exec_cond_cb( + tb, every_quantum_insn, + QEMU_PLUGIN_CB_NO_REGS, QEMU_PLUGIN_COND_GE, + quantum_insn, max_insn_per_quantum, NULL); +} + +static void plugin_exit(qemu_plugin_id_t id, void *udata) +{ + qemu_plugin_scoreboard_free(vcpus); +} + +QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, + const qemu_info_t *info, int argc, + char **argv) +{ + for (int i = 0; i < argc; i++) { + char *opt = argv[i]; + g_auto(GStrv) tokens = g_strsplit(opt, "=", 2); + if (g_strcmp0(tokens[0], "ips") == 0) { + max_insn_per_second = g_ascii_strtoull(tokens[1], NULL, 10); + if (!max_insn_per_second && errno) { + fprintf(stderr, "%s: couldn't parse %s (%s)\n", + __func__, tokens[1], g_strerror(errno)); + return -1; + } + } else { + fprintf(stderr, "option parsing failed: %s\n", opt); + return -1; + } + } + + vcpus = qemu_plugin_scoreboard_new(sizeof(vCPUTime)); + max_insn_per_quantum = max_insn_per_second / NUM_TIME_UPDATE_PER_SEC; + + time_handle = qemu_plugin_request_time_control(); + g_assert(time_handle); + + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_vcpu_init_cb(id, vcpu_init); + qemu_plugin_register_vcpu_exit_cb(id, vcpu_exit); + qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); + + return 0; +} diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile index 0b64d2c1e3..449ead1130 100644 --- a/contrib/plugins/Makefile +++ b/contrib/plugins/Makefile @@ -27,6 +27,7 @@ endif NAMES += hwprofile NAMES += cache NAMES += drcov +NAMES += ips ifeq ($(CONFIG_WIN32),y) SO_SUFFIX := .dll