From patchwork Tue Jun 4 09:55:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801378 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2312496wrw; Tue, 4 Jun 2024 02:57:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUHYWkGtSvC/kCRZJv6q0QH9E7RoVXHqarOH3xH0/KwDoNxFxnJG7OQXOPbXXRmuUqitmp7USV+chnh3W9WT07M X-Google-Smtp-Source: AGHT+IGQjKkiJwPCWolU8e4PqzZpeyMIKksAwzl8wgXeTkUYgCqmk0LKyVbllUiNIVSulXwRuK7B X-Received: by 2002:a9d:3e1a:0:b0:6ef:c0f5:366f with SMTP id 46e09a7af769-6f911fba08dmr11900351a34.36.1717495059495; Tue, 04 Jun 2024 02:57:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495059; cv=none; d=google.com; s=arc-20160816; b=WUFxhx0M1/NF2HtChu+8tpHe6uO+tnk6QVfXdcx+mDBRM6EkIeNwvBfxaopd09QZkb D2LxozAccSdVWyWF2teAg9phkXl7u4vxGUn5S4u7znMGW4oyJ3bjxU8o40nmWwqEUXfp mjhUn41lBR5Oh7JRCXnOq8M6zXuGdP/tIOa/+tw75fLgmaf2hrfz6PUe5Qo8CWsdSZ14 Gvu4tAAXYt85EVtTBV8/4SB9sIEYcguEwSmHfWZkOk9Uwh48cV3JyUSlhZntBaVVTs6S fjokFMn7pDiVi69GhS2qfdJCvnu41e4u7USHAtBDHwQsy65ccBHNcbx0qyK5eXeeEgS8 2Bew== 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=gcCJYiy8N4VBhdUv3burvHdpVxEgBVi2moNCcKrRfBA=; fh=HTHEOtSXFoEdp6IyaU6nEWDIiZ6hiPYVBscrMKbqmMc=; b=nx8H2hblJPZLXsvLKFddLMmQ8ZF4n1B2xIIg9Aq6+MMsX5K8SGQfOcfAAUagJy6qLR Ox/FcRi7Fh4z5VELhrJAOqno5H7QB3S9Es9Niv1WAS+etrWSYjucvt3SDWKsTpopKaxP UIG0UmH+wPjJLpIdzc8onIP9nDKWvWIYTSUe8Z6Ktd5p54dFyewDQjaBdVzdeILv5scV iuLDV3O56Mx1PJxo7/Tpmn8+qG2ib1dKI2FHs41Q9BjoiVAYwqEwBuuUP+bZ6MgnjC7D RY+/VHCk1ieIe0E123cgagEBIsJL1BkD9SU+VZfqcV08pgp6JqClM1uzubBDY8j/SmEj ppSw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M2bQH9bQ; 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-7951e949f13si21102685a.244.2024.06.04.02.57.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:57:39 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M2bQH9bQ; 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 1sEQtz-0005Ih-A4; Tue, 04 Jun 2024 05:56: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 1sEQtx-0005Hg-IR for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:56:21 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQtv-00021f-Lm for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:56:21 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-354f3f6c3b1so826889f8f.2 for ; Tue, 04 Jun 2024 02:56:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717494977; x=1718099777; 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=gcCJYiy8N4VBhdUv3burvHdpVxEgBVi2moNCcKrRfBA=; b=M2bQH9bQJK9K0Vh96uMX6+442VmSDtJlIWdQINKQaLs7NLmiMiOlmV1GMeNxH8KMdU j65LxeZXWu1Ogj0FXlZZ1fpQCBGSZjBullaV18DbKa+BBZUbXnM/61vCYJmehbXg7vUu liHzbIl64FwOE0Ss39QpTI9zEP3ECx7xqxt3OrnzuLOv29SJCrmbWQQFhDxbhKTq9Mt1 ilEF4mKfZTezKZDQgyEDzBdCiNSKv9CxD3HzIvi5TSG82ww6KKJYMKzgB8OiKZE92QFH zkHVF7TqptM+etHGUkZBTv53Sdkjq9MXFd28dJrI02XAWuPuJXzPW0KxDqooWRGsmOax 1M+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717494977; x=1718099777; 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=gcCJYiy8N4VBhdUv3burvHdpVxEgBVi2moNCcKrRfBA=; b=uf22uOwKbBQO47cnRZUfVVvWoHs473AAmPpWBhFdCURVDY9Nkz+m+ul79Yg+U3rx4o ryJrv6vfyDwrWNcaikRwcvMpjhAR8rF6zuAKSYM/vsqJE94enkefVhOPrmfdwgNnplip ByiELXQQ69HzmbnSxy2Pmz5IOPAs7sERgl0BGf7v68hpim4DCzO7rqVLPak6d9LOrdl1 kNE+ZGie54RTdQ8pnVIbP76i8Gvsve4vCFgRD5FqzmwPii/CJMochd+/vIP4dslN/D5L Neaw+yW5/aYTaCYqVSEBYyp9R9qCCnOrbbfVJ0F1VbxTTctpCkSMj71mB2fmyCqow4NZ cxNA== X-Gm-Message-State: AOJu0Yw2ckDfNDUy070+nK3VMWMj9l9zqe4vqAeYu3yRNTfO5rTTyplq RxtIcJZhfFGUc/1QypA1us4U6fiCsJVXVtAuEV1MU5JfhEhBFDLld39B/SrnioiR9u0B1+8riYQ G X-Received: by 2002:adf:f58e:0:b0:35b:5a14:984a with SMTP id ffacd0b85a97d-35e0f30c7d4mr8709071f8f.56.1717494976953; Tue, 04 Jun 2024 02:56:16 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd064b684sm11187323f8f.100.2024.06.04.02.56.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:56:16 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Daniel Henrique Barboza , Alistair Francis Subject: [PULL 01/32] target/riscv: Remove unused 'instmap.h' header in translate.c Date: Tue, 4 Jun 2024 11:55:37 +0200 Message-ID: <20240604095609.12285-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza Acked-by: Alistair Francis Message-Id: <20230626232007.8933-2-philmd@linaro.org> --- target/riscv/translate.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 2c27fd4ce1..32a453f686 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -28,7 +28,6 @@ #include "exec/log.h" #include "semihosting/semihost.h" -#include "instmap.h" #include "internals.h" #define HELPER_H "helper.h" From patchwork Tue Jun 4 09:55:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801375 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2312376wrw; Tue, 4 Jun 2024 02:57:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV98qHc7uf4ZH6P8qmfAwgbFlqcH6FWjEkNpyhBOc+8fITXN5DZjjy/8aBgWdAgf1BoQgTns+x1eQY4wKUatHnh X-Google-Smtp-Source: AGHT+IEjdq8uVbqVslQ5+fHT74uWUP60I4taKWjghfVznNP9Ix5X73dfC4M0VKaUNPPaQgx+piI7 X-Received: by 2002:a05:6102:588b:b0:48b:ac6c:4d32 with SMTP id ada2fe7eead31-48bc2399e33mr10288187137.31.1717495030312; Tue, 04 Jun 2024 02:57:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495030; cv=none; d=google.com; s=arc-20160816; b=EyNVrbvNbT2m2Lro/KmNO+Q2CMvD+J6XVlqtTvPbRoEkE3aQu0vRpEAODSVAR3P16J GCdhwymQM2f6XU0yTQxWAiuk2Blz5IlXOESUFkVK23omgt40cCnFqD41Tmo/ETjKBe3P yteHWBUXTvJDB5/2VclwcrCAOcf3yRD+F1KR3hOVW6FIzWdxDo1QQeaHgVRwnWqwK+Lq 7xwYKUnJ5hSdTRLvArGBn+k0SaHqd5bM5/N1hhLoH5A/6JWN91xUXEYcIV4xC1yZ4UZR xa7egDmcxXUBgchJfgMWfyErZ+VMLrG3aDFq4Zqj33fT4ucNejegAFN2uPMyvc2SsBqW N//A== 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=2Ay+Vb25Ah58Dvvnz7p7zDrtYiMbYdEQ6V3ef1gToK4=; fh=HTHEOtSXFoEdp6IyaU6nEWDIiZ6hiPYVBscrMKbqmMc=; b=SMPZhDIM8BeC0nLe6ERCyUA2gO9/VI5pqUVY6v4ZsQOZUIiFXxnGnheOCk4a4azaYR MlYC7/wnZ6P9fDLaTbWQ8t6/FwXDSS9+wiD4mAO8Uz+aMQ9koJ7vcowqTc+WRP41PO5s c2Dhc5QQg9xHUCWdRB/CQXf4mqcoNdcjDrbM2PRtn/vHzk6eu6IyVm2WfK7gOiIlUCN+ m0jhc/iGl0Lp1GY3NjBXk7JL5xWWnLGWbV+zorYZeVhg/rxNJ/hSswgRX8GJZKaw8olq /lv43bxoKWgjUtSQ/h0kZ5jqQJ8fEhDNCK368wkTuE4AQADUArJ8lyaritB3sog5PvH9 VIxw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NAOqbAZ9; 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-795183eb40dsi115666385a.329.2024.06.04.02.57.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:57:10 -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=NAOqbAZ9; 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 1sEQu2-0005Jc-VE; Tue, 04 Jun 2024 05:56: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 1sEQu1-0005J7-Rk for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:56:26 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQu0-00022D-7O for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:56:25 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-42137366995so34379345e9.3 for ; Tue, 04 Jun 2024 02:56:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717494982; x=1718099782; 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=2Ay+Vb25Ah58Dvvnz7p7zDrtYiMbYdEQ6V3ef1gToK4=; b=NAOqbAZ9rXscGu3Fo7xbmPVgkeZ9s/+ZuBzZJ5F7mW3ba9mMw8NOxkLNZlQmHV2F47 meV0OOq0IvtlNV8o+61z4+HhD5amDZsdVCwv4z0/8hDt864ahNwNlW+27VyG44lNPZWk 7Av4VmzUxZMgS9YPzI2gV8db+reyrO1Fv12y+CScxO2sonfOSiC41V8XwgViWZ9dvGOP luWNFRBcyh+ma52HYL3BiWjpuPpXkCZH/Kgna3WvgM0QtA95JIixfWEeLZzpL6AbQoP9 BTyNr1Ouwhsw+dEG7CCuXwMY8U7sroRkn3rD5qKCgPm4hxWs/hlk3RTCo9NFOQBkc6H1 NynQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717494982; x=1718099782; 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=2Ay+Vb25Ah58Dvvnz7p7zDrtYiMbYdEQ6V3ef1gToK4=; b=NMz15+YlDtZFxrkZLcyzVWVw3BLObXncExJqqAwPGb5LtiBp57/WzQtMqWZABoxEas Uk0CB4uxAxl246z7RMTEVStZh9yVl94PFjDOKHw4fPzg3xKGF3gkIWoTz7+iAw1ZGSag 2jaYBi65Vt1x+bAJlpzM95DEco5UlF+DFUt+QGRfoC/n3KIMNpULCBeukzngFoeAODs/ oEGhVcqYuw87lN2TIqx2Zd0aD7Thy6LrWMC/JUZq6xcL7B4ikiAl1bmz669Ngp3ocH+J CEaAaEHDwC/L8YHe5trUoxe8r+8nHRpOoLsb+1mEbi+nuMuclH7fRQFfBjgQmnwKAcCU 4ADw== X-Gm-Message-State: AOJu0Yxeo8EvlyoBEh1VPim7096yhSNpIqEuVnUuwCPbv8AtNkmioabO lBDbuv15512wb8qtAOj77f2ATrUhMYwkRUJeRDa374XNR3qhhibvZvWRm2U4tfnl6kEPE3EWpXr E X-Received: by 2002:a05:600c:5248:b0:421:4ecb:bd68 with SMTP id 5b1f17b1804b1-4214ecbbf7amr14446145e9.31.1717494982345; Tue, 04 Jun 2024 02:56:22 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd062edbcsm11070738f8f.84.2024.06.04.02.56.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:56:21 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Daniel Henrique Barboza , Alistair Francis Subject: [PULL 02/32] target/riscv: Restrict 'rv128' machine to TCG accelerator Date: Tue, 4 Jun 2024 11:55:38 +0200 Message-ID: <20240604095609.12285-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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 We only build for 32/64-bit hosts, so TCG is required for 128-bit targets. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza Acked-by: Alistair Francis Message-Id: <20230626232007.8933-5-philmd@linaro.org> --- target/riscv/cpu.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index eb1a2e7d6d..0dad66ec96 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -591,6 +591,7 @@ static void rv64_veyron_v1_cpu_init(Object *obj) #endif } +#ifdef CONFIG_TCG static void rv128_base_cpu_init(Object *obj) { RISCVCPU *cpu = RISCV_CPU(obj); @@ -612,6 +613,7 @@ static void rv128_base_cpu_init(Object *obj) set_satp_mode_max_supported(RISCV_CPU(obj), VM_1_10_SV57); #endif } +#endif /* CONFIG_TCG */ static void rv64i_bare_cpu_init(Object *obj) { @@ -624,7 +626,9 @@ static void rv64e_bare_cpu_init(Object *obj) CPURISCVState *env = &RISCV_CPU(obj)->env; riscv_cpu_set_misa_ext(env, RVE); } -#else + +#else /* !TARGET_RISCV64 */ + static void rv32_base_cpu_init(Object *obj) { RISCVCPU *cpu = RISCV_CPU(obj); @@ -2550,12 +2554,14 @@ static const TypeInfo riscv_cpu_type_infos[] = { DEFINE_VENDOR_CPU(TYPE_RISCV_CPU_SHAKTI_C, MXL_RV64, rv64_sifive_u_cpu_init), DEFINE_VENDOR_CPU(TYPE_RISCV_CPU_THEAD_C906, MXL_RV64, rv64_thead_c906_cpu_init), DEFINE_VENDOR_CPU(TYPE_RISCV_CPU_VEYRON_V1, MXL_RV64, rv64_veyron_v1_cpu_init), +#ifdef CONFIG_TCG DEFINE_DYNAMIC_CPU(TYPE_RISCV_CPU_BASE128, MXL_RV128, rv128_base_cpu_init), +#endif /* CONFIG_TCG */ DEFINE_BARE_CPU(TYPE_RISCV_CPU_RV64I, MXL_RV64, rv64i_bare_cpu_init), DEFINE_BARE_CPU(TYPE_RISCV_CPU_RV64E, MXL_RV64, rv64e_bare_cpu_init), DEFINE_PROFILE_CPU(TYPE_RISCV_CPU_RVA22U64, MXL_RV64, rva22u64_profile_cpu_init), DEFINE_PROFILE_CPU(TYPE_RISCV_CPU_RVA22S64, MXL_RV64, rva22s64_profile_cpu_init), -#endif +#endif /* TARGET_RISCV64 */ }; DEFINE_TYPES(riscv_cpu_type_infos) From patchwork Tue Jun 4 09:55:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801380 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2312512wrw; Tue, 4 Jun 2024 02:57:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXsfXMHRXoj0e0DatMJyJ5zuA7CvVBQaZZP9zUDlG6BeGn84d7WUdWLXugEZyWiswl4NEs3YKaYSDYogNfmR8qf X-Google-Smtp-Source: AGHT+IFC9LTShpGKRpqu/doqARYMTPn4zhAoWwlbbkpzjvu92js1b3sIQDX3muebYOeJCqLo+p8F X-Received: by 2002:a05:622a:10:b0:43f:ef25:1670 with SMTP id d75a77b69052e-43ff522ec93mr102253031cf.11.1717495065313; Tue, 04 Jun 2024 02:57:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495065; cv=none; d=google.com; s=arc-20160816; b=VZdNFA9CJLkiyYvdomp6O1H5hgwvLvJU4miqJjaaFQgzlGricRmjtG3nYEmkWSJT/8 uJv3tfBzHaAEnmjO3Ptw45UC3NUdyNhoro3IQwObaoT1f0xYqYdzaJCzz+rfHLu5i2Gq mBe5PvGx6vQV+d8JFSRwgc9hC4r33b1P+t/DzmX9mZnLjcB0k9fPmBTCVKzCjpVZ1gND btkbnKURG+e4xtowoWplSzKVCpaKX9gP+kq/Wi4uY1RzETGdBchS+INZJR6kfotxV/JP XF16nIP346NWjsCLcft1rfPeoabGjQn+veKAM1cqOQkb6vluBmy965Vjpec8lG7jouk3 iWng== 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=zrlTj9cDcahH+eORLITQpITIeYXXxYxxz/PmNCcuvu0=; fh=HTHEOtSXFoEdp6IyaU6nEWDIiZ6hiPYVBscrMKbqmMc=; b=E7IzAFbhmVObufpKKpX+0qp1QBRz2FpqpG7Hrt+tLOsJ1YVFQgMJTPrtpIvLHA1l9H dysPysy+5dbTwx9xOs9nPFHZmjgTSx88xCy6Yr6RKYKqB6LZnmagz8hPl6/zhighUUNd CiJn8FGD9npgTfPRvMS3MASSTJrbYm3R2aGp6LOC215EB/FL7dcVts1In2OqduBy/5av lP5tI6oFuLJLmjI3/x+JojVarSQeM/9yyevBKNGP8vc90epvYuw7BQpqQXkgXIPntvlZ G4DZXKuCB0UH7cRTLsEXZFto0X0CbHPAtaaynmXYq7E/hFA55KVkV5QI+E/nZMV4QoVR LDQg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wYmf98EE; 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-43ff259c023si97191821cf.583.2024.06.04.02.57.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:57:45 -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=wYmf98EE; 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 1sEQu8-0005MG-OS; Tue, 04 Jun 2024 05:56:32 -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 1sEQu7-0005Kh-4w for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:56:31 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQu5-00022m-HN for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:56:30 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-42148c0cb1aso7985225e9.3 for ; Tue, 04 Jun 2024 02:56:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717494988; x=1718099788; 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=zrlTj9cDcahH+eORLITQpITIeYXXxYxxz/PmNCcuvu0=; b=wYmf98EERJwEuRcOhDZNCyTq8jvFQMPkD5oQoJI0POrmp8anBRy6I9RzEneDZs3bmk kFpOWnZp9gEKxMN7Aw3kr2dFaJdE5HU+QS7MVwrIBeWQZUhbbNoAHIdqpv3rv2RQ6rRV 52bip7zC0WGHXGpOJQ5KAYJ8qavFnQr9P+aPwSD9s5xPxP96F+SbsEI98J6cRprx0itZ eFbvVMD6AGARdf4Vd2ahsJAtxuzvVtguThAUBx2IILgEuzVP+3BDIlw6Eci0+FJyrX2u 2t/6MOfbBEwNO9ugx6+FexFvi4CELiw8Kp457B3aRFPGbLMpUXF3qAaMkwDm43/PKhI6 QPeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717494988; x=1718099788; 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=zrlTj9cDcahH+eORLITQpITIeYXXxYxxz/PmNCcuvu0=; b=b2nB1M4S7U/VKMcpPQu3e8mokd1Qi4HrmRl3yMPqajaq/KAzaHZLKS4vo7fKDSP3ay aeil9jzDFGgU6DigS3E/pRtlyWDCt4ZULxWBys05Mrz4rgdxMdujZUW6RPqBqr4GuaPH C6+YUxI3NTY+rA9m+jTRiQDQqPfudF6ptGQVH5oMZMRwi5UGz/wCiIj7WXJlQSSZ22vC /QEe3UbuNXAMjiw3evH5PPpj8EonNBjDJmSl3DDkh/gubPc61emn3ztzGgc4deB1U5F8 3x2ur7eBsJGYvaKt5bGXXFsZGDYh6AM045EYuXQQQB8vQmyv+PQ7Kbk46FATsZZsBuGi jnBg== X-Gm-Message-State: AOJu0YyVcMtg+NtdoKpdTQhwdOXg4a8eyR1hLe64+UhNFKYB9xo/s25w kOhdGpsGrHWKF8ldrCZTh51xJLzY73BgzJ4azW6xoyDGg4yURsVym497nqFwqSA2D4/fOQNoBGX E X-Received: by 2002:a05:600c:1550:b0:421:2ac2:d7c8 with SMTP id 5b1f17b1804b1-4212e0622afmr103510855e9.18.1717494987865; Tue, 04 Jun 2024 02:56:27 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd064b030sm11067292f8f.105.2024.06.04.02.56.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:56:27 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Daniel Henrique Barboza , Alistair Francis Subject: [PULL 03/32] target/riscv: Restrict riscv_cpu_do_interrupt() to sysemu Date: Tue, 4 Jun 2024 11:55:39 +0200 Message-ID: <20240604095609.12285-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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 riscv_cpu_do_interrupt() is not reachable on user emulation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis Message-Id: <20230626232007.8933-7-philmd@linaro.org> --- target/riscv/cpu.h | 5 +++-- target/riscv/cpu_helper.c | 7 ++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 2d0c02c35b..648e640f22 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -484,7 +484,6 @@ extern const char * const riscv_int_regnamesh[]; extern const char * const riscv_fpr_regnames[]; const char *riscv_cpu_get_trap_name(target_ulong cause, bool async); -void riscv_cpu_do_interrupt(CPUState *cpu); int riscv_cpu_write_elf64_note(WriteCoreDumpFunction f, CPUState *cs, int cpuid, DumpState *s); int riscv_cpu_write_elf32_note(WriteCoreDumpFunction f, CPUState *cs, @@ -514,6 +513,7 @@ int riscv_cpu_max_xlen(RISCVCPUClass *mcc); bool riscv_cpu_option_set(const char *optname); #ifndef CONFIG_USER_ONLY +void riscv_cpu_do_interrupt(CPUState *cpu); void riscv_isa_write_fdt(RISCVCPU *cpu, void *fdt, char *nodename); void riscv_cpu_do_transaction_failed(CPUState *cs, hwaddr physaddr, vaddr addr, unsigned size, @@ -539,7 +539,8 @@ void riscv_cpu_set_aia_ireg_rmw_fn(CPURISCVState *env, uint32_t priv, void *rmw_fn_arg); RISCVException smstateen_acc_ok(CPURISCVState *env, int index, uint64_t bit); -#endif +#endif /* !CONFIG_USER_ONLY */ + void riscv_cpu_set_mode(CPURISCVState *env, target_ulong newpriv); void riscv_translate_init(void); diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index 8ad546a45a..0868357f1c 100644 --- a/target/riscv/cpu_helper.c +++ b/target/riscv/cpu_helper.c @@ -1635,7 +1635,6 @@ static target_ulong riscv_transformed_insn(CPURISCVState *env, return xinsn; } -#endif /* !CONFIG_USER_ONLY */ /* * Handle Traps @@ -1645,8 +1644,6 @@ static target_ulong riscv_transformed_insn(CPURISCVState *env, */ void riscv_cpu_do_interrupt(CPUState *cs) { -#if !defined(CONFIG_USER_ONLY) - RISCVCPU *cpu = RISCV_CPU(cs); CPURISCVState *env = &cpu->env; bool write_gva = false; @@ -1842,6 +1839,6 @@ void riscv_cpu_do_interrupt(CPUState *cs) env->two_stage_lookup = false; env->two_stage_indirect_lookup = false; -#endif - cs->exception_index = RISCV_EXCP_NONE; /* mark handled to qemu */ } + +#endif /* !CONFIG_USER_ONLY */ From patchwork Tue Jun 4 09:55:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801383 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2312524wrw; Tue, 4 Jun 2024 02:57:47 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUiUPuGjdlOp30stMiddrhVCWxbrbvqrKElesWqYaGIMSa3AECd8WyMo0ufJMozp/aIfpiAFDFE0WituEiNWrCp X-Google-Smtp-Source: AGHT+IGAXhyfc8cWun/LJVLMPZ+eaOqk00jXMPA7pQeJ1heD1qQT7xVihkt40dr0DRHyZdTCtj4j X-Received: by 2002:a0c:e7cc:0:b0:6af:700d:a848 with SMTP id 6a1803df08f44-6aff7239ac5mr36240086d6.3.1717495067104; Tue, 04 Jun 2024 02:57:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495067; cv=none; d=google.com; s=arc-20160816; b=QMyZMrmJ9zwwKV5DicjGWafypChsDSxhpuoY0pv6V6n7RQI+z2ejaGnJmUvuRgJBPE t5CBIDGndE9hc9IVYgBm2CmfhFzEZvn86bSZwDyzqyTt1nYjwPXeMapHrZhgUgY6sMAH oqsUKgHX7CvH89TI+mvF6Nm63DIHywrsIebtxTHoiRivkgGw2DzQSirhEhYxkuHb+jam 5XMOGgaK8HvVYZx0JpS7QowqVEyGm6RM/K+pIFAD/dpfyuvDlozPZgvDIrEATNPB0RPK N4GMOd3MuXopAKXK7AufCMy8xfz2njKpcjGsplutIA5PCIND8HR9BVZAtcwCRN28l/Ad FCdw== 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=9Ft5fiyMmdVHsVWcIS5vXcjPxaNkK/GEvLAcOaQ7yGI=; fh=T6EAW5wAIwJc94Hf988QOQsVlLgYkOpEiwIqp9A3GQs=; b=jgD8A1ZKzAChoHAzIKI94CMLr2HkI8UapbR1o1dOb48zQsSDxgHbfbJUYAhSEVLMeb sOH5I4QsyIcOWW0jXtv0CKorTWA/ShBcwLUMnWWyoASGcWq5bBYqbiJZLqLIciBqm/Mu 3dWRR87Vxq6//AqaxiP6XwcLT99qCHGy/uGzC1gtf8SxfIPB4rtNaVjEau63SuF3gFGj eSzfFs1BN44Kfl1pBPjmu0MFhgnOWdk0tEjHKsIrU3+SwWjzxTBQQYHh+YgVxPOLE6M4 leRcJjmq/BKncdcylo9914oXE/Fq+f/Uoybw6CbvWNu82W6RvtDh4pVUOXGo11JXU9i3 0m5g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Mqe/tJPy"; 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-6ae4b415391si11074776d6.351.2024.06.04.02.57.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:57:47 -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="Mqe/tJPy"; 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 1sEQuD-0005OQ-Sp; Tue, 04 Jun 2024 05:56:37 -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 1sEQuC-0005Nm-OU for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:56:36 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQuB-00023E-8j for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:56:36 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-35e0eb3efd0so772108f8f.0 for ; Tue, 04 Jun 2024 02:56:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717494993; x=1718099793; 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=9Ft5fiyMmdVHsVWcIS5vXcjPxaNkK/GEvLAcOaQ7yGI=; b=Mqe/tJPyL8EKxoRQIqyCbZFppiMfOFrLC1gNneeJ5tABTk/5YGKCr2TkezHVllAM9u ZWPdZBo+dpk+1YRMchwEd3PXyYmD/zMG8P8jOnraLzS5Hv7lpsZN9MtHPjXyAWgsXL7I ePprktmhE+pkEHI2sUn5GY44Sv291g4epRMNOkYSHTQapaoPbq1/be5pqlL61uwQBMS0 H89DZCbdMj63KJUaW0CQiunhanEx4DtOR/5Z6zlGzDcRfWyf13oHesSKefXJXJR+atcH bmYdMPgSgRhmuTGXDBSQQlJOUJf8DUZ7pXIy/HAPTx4EM1Ln0q8H9WceOoF2zaVztVny M52w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717494993; x=1718099793; 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=9Ft5fiyMmdVHsVWcIS5vXcjPxaNkK/GEvLAcOaQ7yGI=; b=w/BThb8dqv9J5w32p0lq/hWTgirwsbd3X0g6fIZdM07fw4zwusEH6D6ko/teDdH8zX WzMDSrf29pR/j5iIz2lITmqkRhpFZB4wHHE4fNJMYygOu0+eAYV+cBRCLk9nPeonc74O CRZBzO7yLfnXdYgYbiyHwS14rTcfifJGLNNFU6ce9IdbAsXzEpdA7al6yLY6Bi66rjwa 9+KaOihBtKqfzDYtzey5TT6c1Ezf4dPs/jKtEdD85CTfewgVbRkfi/lOYKyMsRw5cF4o lgc+c7pAHx8vcQDbboa2dGb52Zj2TDcZNDpw+aSPmAqTt2r4duHAfUJGp/HgzH4+w7YK 7bNA== X-Gm-Message-State: AOJu0YzYWiTmupciicBGLwrnT7tzKrA24MjXLtlVqNWrBFCHCsNXmhSE 8SUv9zF83WiletMmtRbEWrJPLkgbSko0NyHdlF6tKacLcrWvR8Ae84GqpTiWgWdKKmnzTfEp4Nr d X-Received: by 2002:adf:b319:0:b0:354:f9f0:a7ed with SMTP id ffacd0b85a97d-35e0f30bd3amr7374057f8f.47.1717494993264; Tue, 04 Jun 2024 02:56:33 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd064afd8sm10968444f8f.95.2024.06.04.02.56.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:56:32 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Jiaxun Yang Subject: [PULL 04/32] target/mips: Remove unused 'hw/misc/mips_itu.h' header Date: Tue, 4 Jun 2024 11:55:40 +0200 Message-ID: <20240604095609.12285-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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 Since commit e1152f8166 ("target/mips: Remove helpers accessing SAAR registers") this header is not needed. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Jiaxun Yang Message-Id: <20240529155216.5574-1-philmd@linaro.org> --- target/mips/tcg/sysemu/cp0_helper.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/mips/tcg/sysemu/cp0_helper.c b/target/mips/tcg/sysemu/cp0_helper.c index ded6c78e9a..79a5c833ce 100644 --- a/target/mips/tcg/sysemu/cp0_helper.c +++ b/target/mips/tcg/sysemu/cp0_helper.c @@ -28,7 +28,6 @@ #include "qemu/host-utils.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" -#include "hw/misc/mips_itu.h" /* SMP helpers. */ From patchwork Tue Jun 4 09:55:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801399 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2313178wrw; Tue, 4 Jun 2024 02:59:56 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVB2Qlcy1oDS2wafn1l+E+6QNFPpKOkmscuhK0FmeMF40yWgBAGTg1wQb0wozqNMXmsytdUTwiSL5AnFO6De6R9 X-Google-Smtp-Source: AGHT+IHMez1jeizw61IZ3YbtX7N/ZWYEQ+DheGrerOWL7R17BtryBMOwli0NJLKpbeIPrySbsW0Q X-Received: by 2002:a05:620a:5a49:b0:795:1838:c028 with SMTP id af79cd13be357-7951838c1a0mr143176585a.8.1717495196178; Tue, 04 Jun 2024 02:59:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495196; cv=none; d=google.com; s=arc-20160816; b=cWTUIsQ/dkUcswS6SbqV+/72zsIszkZU1Qh8sYSk74AAthIwHhYz2cXYW4nxMCcfSw KWMJf+lvNvPoupPmVfGZGh+nikfT+CnYSRmCxNkYbDBk+mIWvk4WkJ3mUBWIDRl2mNd4 pYJfqjc48zxhB105gITLt92N2olLEpRwoJ67JecLe3mLdKCeM0xpeRe1j1sRVZqRpftd K/bw9cqQJeYBv6qe/A+j3XFODOhjoT0Gzr2fo6CyZTHiDLV5NgrkNN4M76tZtgGffDqe 1CIYpqAfsbdFdpoaHyPGWQsB5L8lKr/QTjVLsPdOsk6erDHWu+j0WV03aeXcQlGpjFgj gyOA== 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=DIOW1O9+X9Zn3nRI+K8vVtjj1gMTn5Z9TMOA7fC7V5E=; fh=lWrt2iJqA36PKDJD9wOt2v37c1AMexkdbZlHxbViPQ4=; b=vnMXFhRrCOJckXrQRAzCMTTggh5INJCwjFVFvBCVHXW0nMm74ubgjiMRlQH3xFjttY QtmIAWetcgTchTLqrgj7LVPzMU7zAWAtMqGktNS/57pC/H864y0GrEacMsqI4UCjwjUt z7PP8P7ZfLmOahCe/PZOit1QmMsbH3msPysU/B5cJ3clFvN969UCW7ifK4Yd5vZcrMnO ZKvzguc6p5uLA2iL/zwKdfFRy/u/+qcIRTCz0ihrmqwBdECPoDRLd+ELvK7uS1Csoeow 6m+P4vd+qN6UyjGGPCfDhDx6Ekr6554mRwi4OS4yf0IEv+opXcqlauLiYPDnAH0jCwKY x4rw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TWdj9g5F; 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-794f2f05589si1178407185a.50.2024.06.04.02.59.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:59:56 -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=TWdj9g5F; 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 1sEQuK-0005SE-D5; Tue, 04 Jun 2024 05:56:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sEQuI-0005RJ-Jf for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:56:42 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQuH-00023Y-0L for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:56:42 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4214aa43a66so6415555e9.1 for ; Tue, 04 Jun 2024 02:56:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717494999; x=1718099799; 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=DIOW1O9+X9Zn3nRI+K8vVtjj1gMTn5Z9TMOA7fC7V5E=; b=TWdj9g5FinwiyYHMKRkUXc9R2VgTXTVUZ54qGpr1sRmbASXQUUdQ20fkGJ/dDSzaxU F0gL49nyPulyQSDlUIkRf0PVjB0+kr7kV/IQIFVdbugwVxJAvvDkyzfObY/8xqQ4xdXw CbEEbpH2mDRJiEcUNudDtLlNt0bSgHAtxjocIzafUWvjk0dkxZ1bffJLvgk5Y1BY43Jz 7Iqp0cBx5YsAjEUFB5VUz0d3L5FBf34/yP7NAPS/k7HIBsyYJPB4gGkxD+OZ8xE1Or+7 JWMdnfSywzBB47Fy2sq3IEHThPSj9EnO6VCIFQ24pb85fUcJsSIm56TdQAOUZkPR1LTv qzBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717494999; x=1718099799; 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=DIOW1O9+X9Zn3nRI+K8vVtjj1gMTn5Z9TMOA7fC7V5E=; b=sz1lh7IwC+9pl8dM/jFDtBliWbq8ZnUvJKoxPM/ZSYMo2o5aZ0l30hyuBJDys7msXh 5ERCCULIpdkvDUosHOifWy5LNf/AoVVitK4Kc1NfVW9PXopKymb47TYkJEAmgkZ0uDEg VLHKNN0Dy9b4UPrbGA9ggTg5ZulTvBYHhrGJA6d6GphpembjYSpytyJ+7/qu698+L5QW vC44CtPD1UanJupDRqcBlRMxfQLHVLBBBwEcQRHGuwULpwhdveDrZLrEGqWzwsLqbWLm oFkNbQiUCtjZsg1RAgDl3K2aRRsztkUQRRKWdpcum6NTHrLeKlSQnRkvxIvL4RcG9Ds0 kWjA== X-Gm-Message-State: AOJu0YyPTXV0fRP+jfN3mZXdzsOAMtJHW77CKNuCDAdDdMNRJUjmLM5F HzBeIJ5yQBj/WbPsMKv5/CNkHRNR2/7mVzO0ci6U/iUM0dwKTT17X8ydXjOoCyY0DH5R3rgUTia U X-Received: by 2002:a05:600c:45cb:b0:41a:c92:d323 with SMTP id 5b1f17b1804b1-4212e04a1famr109906945e9.10.1717494998765; Tue, 04 Jun 2024 02:56:38 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42138c41becsm95838805e9.30.2024.06.04.02.56.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:56:38 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Peter Maydell Subject: [PULL 05/32] target/arm: Replace sprintf() by snprintf() Date: Tue, 4 Jun 2024 11:55:41 +0200 Message-ID: <20240604095609.12285-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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 sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Use snprintf() instead. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Peter Maydell Message-Id: <20240411104340.6617-9-philmd@linaro.org> Signed-off-by: Richard Henderson --- target/arm/cpu64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c index 862d2b92fa..262a1d6c0b 100644 --- a/target/arm/cpu64.c +++ b/target/arm/cpu64.c @@ -437,7 +437,7 @@ void aarch64_add_sve_properties(Object *obj) for (vq = 1; vq <= ARM_MAX_VQ; ++vq) { char name[8]; - sprintf(name, "sve%d", vq * 128); + snprintf(name, sizeof(name), "sve%d", vq * 128); object_property_add(obj, name, "bool", cpu_arm_get_vq, cpu_arm_set_vq, NULL, &cpu->sve_vq); } @@ -462,7 +462,7 @@ void aarch64_add_sme_properties(Object *obj) for (vq = 1; vq <= ARM_MAX_VQ; vq <<= 1) { char name[8]; - sprintf(name, "sme%d", vq * 128); + snprintf(name, sizeof(name), "sme%d", vq * 128); object_property_add(obj, name, "bool", cpu_arm_get_vq, cpu_arm_set_vq, NULL, &cpu->sme_vq); } From patchwork Tue Jun 4 09:55:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801377 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2312405wrw; Tue, 4 Jun 2024 02:57:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVlbCjSywHa7L0dMgpM08pA9A8Sb1kFWoc5bkfdmE2WKVyS7zcVVhpR9Mp3znam0OWDYSk4Y0+IGdveZjs+Cp2P X-Google-Smtp-Source: AGHT+IGJBlTPv3HQHjSt/QSH9CMClBAq69MukR+HjqzI7FIctjejjZ+rgPTrLD3lrdCf3tXzWM1T X-Received: by 2002:a05:6214:3982:b0:6af:bb51:197d with SMTP id 6a1803df08f44-6afbb511a19mr52562616d6.16.1717495036727; Tue, 04 Jun 2024 02:57:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495036; cv=none; d=google.com; s=arc-20160816; b=dQu2kVSaXZa//+qjSCw4SwxhODzZ4d1gUMljUI26EUQEn++JpHMmCtjqMQfgnrQKHW Yl536UGB19vI5zB6K1eYFwcEduGC86V03E03buXWn4kQYPzKRg/5cqxFwczrhsjTsZEI NbVB3nTTQiGUJcQbGW2fATpOOAT8Li9byrwHalGQ39r6rbhQCegHjT0bJIGYBgR4lrGl 1b6GMKgFnxZajq8tK/w2JUODnatka0bEIgdtHlPzkjgvHQq4IQ46MhxWKAXBomSpnj8j GMDZWkJK6Mm39BzLwOtfLuOL4ZujEw3/QUlBeS2hz2eRBJAac+Phz56y+6nJpnTPrEL9 wZCw== 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=jgoZWUZoZ64J/jsUK/BO8m7HZCfTE8MphpmeDDotPMw=; fh=Ni6t644Hz0oPv4VmGFZx8c//8CwlNC9jYH9DoWbt2HM=; b=nC8pugSK2q5KlUOv3R3IyMC0xOejChgXpUEiQEQBjshqFLqU9iJidS7uZ9REZsf+5o 2WL+KQTyh6vKdxTaYhXU1j20taftlvQaLGlFuArsQ4fT2m519VnhCQLDcMyTIbqtAZw2 C0LpEQCkeaHN7c3rrFHJ26DAuGl3OWXseayXf5Z48v8wiFh8odb5KXPQBgWvFXdvPlDk 27/2MkCcm5A4EMJAZwTY8Li9+D9SpRoc232Ld6nZGcoqWvhAnhZf9cK0O7nDa4uEIUUr V04nosDStKF6U2hmefIiPva6Sqv3iD9i1uYIrRhim3d//yDNynfnO0i9IY8iUYjPMgT9 9GYw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bZjgJBI5; 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-6ae4b42b96asi107604356d6.491.2024.06.04.02.57.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:57:16 -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=bZjgJBI5; 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 1sEQuO-0005Va-Tl; Tue, 04 Jun 2024 05:56:48 -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 1sEQuN-0005UF-GV for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:56:47 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQuL-00025K-UI for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:56:47 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4214053918aso8458395e9.2 for ; Tue, 04 Jun 2024 02:56:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495004; x=1718099804; 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=jgoZWUZoZ64J/jsUK/BO8m7HZCfTE8MphpmeDDotPMw=; b=bZjgJBI5284J1SjHUkyo71g4FxGv0FKXFQ7qbmdsp7foBi+PD22NmzUeVL3rR2LvDo 5UZ6+HxGxofMuFiSmmMPZjHrc458b6FK3dXYJVR6yczeoSX2EvqQf376ICBbF6o3E9Q8 /mLdZixbEB+m0waUJW0WuI7Nz2mfd59MkvLgGpIWEBcIWYZojBPmD4A0H+XW94/hWcah +91LuGeooOnuRPyoKjLEQjCS3OWCfQ/W82urb9dCDOg6cgH6Ngy/zjhKJ7Pn4sr3uLFz NwkX/cYm2NAMjiiXqxz7t0Lvlq/bjMbnitDihIsvAghryjd8N4QM7zkAGvJmSVnoD1Rt AVQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495004; x=1718099804; 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=jgoZWUZoZ64J/jsUK/BO8m7HZCfTE8MphpmeDDotPMw=; b=RQeXTS5CdvESx9F1rgT1vM5OlJTE9yWL+v418Dv6GMi1xcAvtpTz+5nn/awM+D98yz A3n9xpA40dqkowMVS2OeGPTRXoiftAe+h2kobKl/ISRLNeko/y9VSCVpuFEn0uNB9MhJ aas87yRtjeEJ13rLCSOQ5hQkFjaS2i/GALHkHQ5q0ywh+XI7xN0wKuYkSMwu0SGU30ds /jGNveoJYsYiN7G/ZwCoZv7rsRmd1Mqd4pOlLbk7pExuWZnXsWdrMUsPLC29HWLN+936 7nHCgrtIAAcdOnE6Rk10jvJT3AjwHtvFzcCSeRvaJlwx04rGaqgWWOfJTZh1tSBlEnZP zxyA== X-Gm-Message-State: AOJu0YzzZ1vMcnm+6JOvgLobGQ8yrFLCsWKFYum8ZVaiUWRRZIdKOvuq pys8jIplVag6cgr7lRylbsILi0j4nnHL3nYR2kHQD6Bo8xFCOhu0/ikmfXf+WXu6rJTIPMk6UM/ L X-Received: by 2002:a05:600c:4454:b0:420:18e9:86d5 with SMTP id 5b1f17b1804b1-4212e047556mr110629845e9.10.1717495004276; Tue, 04 Jun 2024 02:56:44 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4212b83d469sm147315445e9.9.2024.06.04.02.56.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:56:43 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , Zhao Liu Subject: [PULL 06/32] target/i386/kvm: Improve KVM_EXIT_NOTIFY warnings Date: Tue, 4 Jun 2024 11:55:42 +0200 Message-ID: <20240604095609.12285-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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: Richard Henderson Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu Message-ID: <20240412073346.458116-28-richard.henderson@linaro.org> [PMD: Fixed typo reported by Peter Maydell] Signed-off-by: Philippe Mathieu-Daudé --- target/i386/kvm/kvm.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 6c864e4611..82ebddada1 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -5329,7 +5329,6 @@ int kvm_arch_handle_exit(CPUState *cs, struct kvm_run *run) uint64_t code; int ret; bool ctx_invalid; - char str[256]; KVMState *state; switch (run->exit_reason) { @@ -5389,15 +5388,15 @@ int kvm_arch_handle_exit(CPUState *cs, struct kvm_run *run) case KVM_EXIT_NOTIFY: ctx_invalid = !!(run->notify.flags & KVM_NOTIFY_CONTEXT_INVALID); state = KVM_STATE(current_accel()); - sprintf(str, "Encounter a notify exit with %svalid context in" - " guest. There can be possible misbehaves in guest." - " Please have a look.", ctx_invalid ? "in" : ""); if (ctx_invalid || state->notify_vmexit == NOTIFY_VMEXIT_OPTION_INTERNAL_ERROR) { - warn_report("KVM internal error: %s", str); + warn_report("KVM internal error: Encountered a notify exit " + "with invalid context in guest."); ret = -1; } else { - warn_report_once("KVM: %s", str); + warn_report_once("KVM: Encountered a notify exit with valid " + "context in guest. " + "The guest could be misbehaving."); ret = 0; } break; From patchwork Tue Jun 4 09:55:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801376 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2312392wrw; Tue, 4 Jun 2024 02:57:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVNTwjHEbDGh6YKrg8g7fSY0Ds2ydvM3QZ/dbs6+sY9NiKasMtMP7Wy7+JnqDm/lU8quEDHN0KABXQMwbuIVtq+ X-Google-Smtp-Source: AGHT+IG1knILeMVLbKXYJPRNvUvF2mAwdXnBHKg88rXwkQpekbe6Pw7GgVGYg9DGM1gZ9gUVwfbg X-Received: by 2002:a05:620a:12d0:b0:792:9232:c93f with SMTP id af79cd13be357-794f5ed3bcdmr1189932085a.77.1717495033922; Tue, 04 Jun 2024 02:57:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495033; cv=none; d=google.com; s=arc-20160816; b=iicAHqS32NmhaDw3g/tDlBoQWBmJZKYNf81GlrlDDCTf0TOU6ZYnjCcX/W7PUJCnom m2OA9twg5hp/RFTxNJaIERNgVqfQ0a0MLon8vCWe2lDeCsCqH0C8ziapkXBwntKs8NV/ JUIPy6HdLzJm0sKo8VlE25Hu47aIvk2YZqHyB+HHEpu61wY62RqadExumq/4abuaw8vN 87ea27fhkbaqIKHRURFHsT6LN7zKEpCTeEGbgUhw8qCkJpptjkhgjQTOeMslzMv6Io+w L1ZEfuN3Byiq/Vl6zPmjhi18jJTJv41in2WEvZLK5t/MaEDDWOf2xKCSUOmncIOkJ8VT gLpQ== 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=Hob+P2Sg+ihzbfNnyrqDcUFLAYWTTSYARygSNcUTJO4=; fh=lWrt2iJqA36PKDJD9wOt2v37c1AMexkdbZlHxbViPQ4=; b=vaHAPT0nJdszjUDtJ3hCIGCr1lBfoiCfDuYkeoGstYFvA5C4is2T5rKYrmX7nrZ+wM XKoxSufzH/mKpinDQA8hP3jzHcaEFCQBv8hME9juDF/CyJBteAGBje4aj/yo+mfu1/Jj fNbVmeGKQu+twuxCB/QP13jPBW/D7LoV46WvCxJN7b8gEh+P4vfzksS6uwL/a+HFDg/3 eBpkvKxE64r51WoC+gJk5H3cPKGX6QAG7hPHxJcbSG5aVoJP4d8FRK2IC53m4u4R5NpH mGj+SPSCwtOBKup57C55+/aR6aiJHOHPtGY8b2frFgRguJPrv+iHv0gZSZ438DX6m+UD a7aw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j9tCm+Wm; 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-79505770c53si646953385a.377.2024.06.04.02.57.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:57:13 -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=j9tCm+Wm; 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 1sEQuU-0005Y4-VH; Tue, 04 Jun 2024 05:56:54 -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 1sEQuT-0005XQ-7Y for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:56:53 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQuR-00025q-Nv for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:56:52 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4214f52b810so5715635e9.1 for ; Tue, 04 Jun 2024 02:56:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495010; x=1718099810; 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=Hob+P2Sg+ihzbfNnyrqDcUFLAYWTTSYARygSNcUTJO4=; b=j9tCm+Wm51aG9HL1/qRQTo31h1jQ53Nux/3nFAMQu71FfcrEd6GpIraFRpazo7rgOu 9qpBVnLeIezJX20H3kiHyPgWh6rEh3Vohh0p7EKJvKVlhH89XkDot3RTj77thqM9cxsW ukmLH3dmDEd9AW4VRgT/9hmSJir9FAmx1j1KkyM2+xeP/R3Q6d65/TXehu0+U68LQ/Gk YNNiKWYGt0KIYK/6rJFkGK8JQGvJz/cnfPP8Er0qk043a7/gTSRAxfAtELWiTCb5gSx0 zNdGwGplzSMiZAAAcgw9m5+sPAOo3ZTcPhAisDmwhVttjPGdCGZoz27jSrhciBrA6Eu1 hBPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495010; x=1718099810; 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=Hob+P2Sg+ihzbfNnyrqDcUFLAYWTTSYARygSNcUTJO4=; b=sqbFQFTOdr/ycHd54V8WSoHasFeR1IUGTn7G0tyF+n0+DIE4dz3CMRBxfP8ObR9FxD rNmT3bfayveB1rHy8ab3ozl3mPrhDwS95eUXMop5mkF6S4dTAT2p9KfTHw7pEXO6/iKG FVLJB+LYZe26QWkHlLwz0i9XKVAaoyR+e7yvwkFStoFU6djxAmOvRIO3NgG5EdxCBbCO l3tAAGHCn1hQ9O1CLLVC/OsOwTIF+kb7iP6zJZJerfOX7nWJ3n1neLeThDCQEjxfyL0q r0NAwViSZejQG7JX3rMf/WQcO4oxmOs0pGWnPsvELflt50omUTrpa+jmSnBss861qHpP iTug== X-Gm-Message-State: AOJu0YyEkxhzq/HY3CDVFis5IiePyMjznOzDZF5mmcV3yYF194nLiDgD q/o9e5VWpMoFv469onGI0k4WkUf9akMBbfZPYGhLgRwgz79ee7oVqQ7xAW1wcxF6b6DyW1gv2JJ O X-Received: by 2002:a05:600c:a03:b0:421:499c:7039 with SMTP id 5b1f17b1804b1-421499c71acmr20096295e9.29.1717495009779; Tue, 04 Jun 2024 02:56:49 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4212c0fb7c2sm145029725e9.26.2024.06.04.02.56.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:56:49 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Peter Maydell Subject: [PULL 07/32] disas/m68k: Replace sprintf() by snprintf() Date: Tue, 4 Jun 2024 11:55:43 +0200 Message-ID: <20240604095609.12285-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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 sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Use snprintf() instead. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Peter Maydell Message-Id: <20240411104340.6617-2-philmd@linaro.org> Signed-off-by: Richard Henderson --- disas/m68k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disas/m68k.c b/disas/m68k.c index 1f16e295ab..800b4145ac 100644 --- a/disas/m68k.c +++ b/disas/m68k.c @@ -1000,7 +1000,7 @@ print_indexed (int basereg, /* Generate the text for the index register. Where this will be output is not yet determined. */ - sprintf (buf, "%s:%c%s", + snprintf(buf, sizeof(buf), "%s:%c%s", reg_names[(word >> 12) & 0xf], (word & 0x800) ? 'l' : 'w', scales[(word >> 9) & 3]); From patchwork Tue Jun 4 09:55:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801385 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2312547wrw; Tue, 4 Jun 2024 02:57:52 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUGFrMMwFK10nn+EtE4ZgwdDlBbvGiuu/pUloVT0zSEuglrMVftd489UJqSrJEPeCRV0W+sjOuxzQZ5+Zna8adE X-Google-Smtp-Source: AGHT+IHJPr5MzstgpOCjthfQF2XkjHCnww+YRFZj4FoN5wVKmCUbJ4kKDEMCCILT/bT34fgmSaJZ X-Received: by 2002:a25:ab03:0:b0:df2:43dd:f7a3 with SMTP id 3f1490d57ef6-dfa73dd9f82mr9884703276.58.1717495072233; Tue, 04 Jun 2024 02:57:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495072; cv=none; d=google.com; s=arc-20160816; b=VySN8qacq7MshYDM+GQSs7qE1guPoFp4fm8YiqFadHAJ2mFtNKO5iNbQ/xTM2ttp0b KE6FxwKVRkmwwYlCOyDOuwTAtstuELcar9E4tB58U7ja/b6xAC5puIa6b/xVAGIs8Xus fmFcIiA64PVkljKlrmncGhQpvogeUE0cXxVfN4P/wXxpjeGwvgebzccO6jYLhdXQddJy HS2Hq/8kt2LNaK8aSiOWECqndsZvs2Nv7/4G384yFv7T2fKkZDjN54dcsRJ8yV6IxPu/ lAp9XtXQAY3Acfl8UOY+9Izq5DWjyybj0l7ARxAYhNUVqtYilNkRzTEqwoFNUuOqb1N2 3H/w== 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=vkD3w3/QnVGpH+/ZIlaZduOawYbzu0aNROx1qgMgywQ=; fh=nuLcmdoM5HdxtZ3r6IkqL7j42pSc6N/debEOXY9ID2w=; b=orSDb4MSerwbFCyhupbhVv8N/eseyTQW/NshLu/Kmxn1EEiWT6CeJTnpktkTFYijSa zaF8PCMfjlNsJ/nKEB031ldbjVNdnAHs8PhtqwecZAmBWdQ+SIPCBdhPqgFzCGrscfYC u44v23Or7x2gCjvAoXOPth2wsyrtw8Gqn1d0MFMftQIBqI1xtZBs9DmInN7rFKbXuGWd OpnRYns+g3GpaXQGfil2O0r6OD1BNUrIiyWW0pNyE6vZoz8PnynJ7+3Npa5FIkzY5Pa8 jvmF+070qZReu5u9M2LdVysdA4iay8FoEg2Zqx7gO3EpWxKKLoqpdLAGGVeKmSQ47f9Q dRiQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Bil//0OE"; 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-4401c1657cdsi15268531cf.259.2024.06.04.02.57.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:57:52 -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="Bil//0OE"; 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 1sEQua-0005ZY-8D; Tue, 04 Jun 2024 05:57:00 -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 1sEQuY-0005Z3-SO for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:56:58 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQuW-000261-TH for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:56:58 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-35dcd5377c4so4442046f8f.2 for ; Tue, 04 Jun 2024 02:56:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495015; x=1718099815; 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=vkD3w3/QnVGpH+/ZIlaZduOawYbzu0aNROx1qgMgywQ=; b=Bil//0OEsxsi3lJxCzD/CQy/kMLOEWmdTK4Sb56Hh4jH1rfKudFg8dPYwK6c49ggXN k4WAVSyy8+1SxT2vVIhYG0upm2007afc1BMBUwcALs3mX4ZdRcLzzTz4pcQDnE0ALT6s 7VBCr3xcm2A3FgE6y4eNFevxebPLC0CCu7XKqeuYyOCDXvsRAgx7oHNt0ZyJUTYiIotN J3p6LQ+N+rn6AvuQs4JuG04jvd06ia/SA0KJ0hn47p8Xpej+qB0BB8EcG2cHQMOuDyur vH/mDex5DZ4Z9WG5a+KFCXFvWL0FjizuCUIlA4DoPPm1MFCMv/KHJkT0zQFFQbcPz5Z1 xkwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495015; x=1718099815; 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=vkD3w3/QnVGpH+/ZIlaZduOawYbzu0aNROx1qgMgywQ=; b=r26JDxFYeOYCvEvVdm+d1XIAonN5h14WW8gzvPxmFX16eKPpbFptbZ2wLpRgKlxGM9 QdoqrMyp/D615SMQXaQDRa1Ie4yzJISdRh5iVMCSmx1y22SlyBqnXKRfRNWq7PQZKfk3 T6cRf1cji/Qs+a2yy5bX4NEve8dVMK9F0aLN1eNdNbaV2SP2EQunR2zpFtkSGl5HKcQe 2I3qIn0KhZSX9/HFxDiTurHVha2IkBQLnQTyPSVB8e2AHszWDPHL2Bb1tHa+cjx3QPFK f4pQ4iEt6P8W5qtcvoZlnAohhUAMsnpGazZ85yA3Wfz3Zgvn8lHydq5zghhBXg2ISlDh aAlg== X-Gm-Message-State: AOJu0Ywc00+NC0cAy+tZyRjEQwmN++NF3biASGzC8QQrB0vKeo9rwMCD autmz33Vg3LmMQD+wiQuTGajOsgSHM0hRTWYEdQwpnB+m0nUml60bXsflU+6wfc5XLKSpvd2RHM Q X-Received: by 2002:a5d:484f:0:b0:354:e22d:c7da with SMTP id ffacd0b85a97d-35e0f2a9ab0mr8195900f8f.39.1717495015110; Tue, 04 Jun 2024 02:56:55 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd066b47asm10972385f8f.112.2024.06.04.02.56.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:56:54 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Edgar E . Iglesias" , Richard Henderson Subject: [PULL 08/32] disas/microblaze: Replace sprintf() by snprintf() Date: Tue, 4 Jun 2024 11:55:44 +0200 Message-ID: <20240604095609.12285-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.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 sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developper experience. Use snprintf() instead. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Edgar E. Iglesias Message-Id: <20240411104340.6617-3-philmd@linaro.org> Signed-off-by: Richard Henderson --- disas/microblaze.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/disas/microblaze.c b/disas/microblaze.c index 0b89b9c4fa..49a4c0fd40 100644 --- a/disas/microblaze.c +++ b/disas/microblaze.c @@ -600,7 +600,8 @@ static char * get_field (long instr, long mask, unsigned short low) { char tmpstr[25]; - sprintf(tmpstr, "%s%d", register_prefix, (int)((instr & mask) >> low)); + snprintf(tmpstr, sizeof(tmpstr), "%s%d", register_prefix, + (int)((instr & mask) >> low)); return(strdup(tmpstr)); } @@ -608,7 +609,8 @@ static char * get_field_imm (long instr) { char tmpstr[25]; - sprintf(tmpstr, "%d", (short)((instr & IMM_MASK) >> IMM_LOW)); + snprintf(tmpstr, sizeof(tmpstr), "%d", + (short)((instr & IMM_MASK) >> IMM_LOW)); return(strdup(tmpstr)); } @@ -616,7 +618,8 @@ static char * get_field_imm5 (long instr) { char tmpstr[25]; - sprintf(tmpstr, "%d", (short)((instr & IMM5_MASK) >> IMM_LOW)); + snprintf(tmpstr, sizeof(tmpstr), "%d", + (short)((instr & IMM5_MASK) >> IMM_LOW)); return(strdup(tmpstr)); } @@ -624,7 +627,8 @@ static char * get_field_rfsl (long instr) { char tmpstr[25]; - sprintf(tmpstr, "%s%d", fsl_register_prefix, (short)((instr & RFSL_MASK) >> IMM_LOW)); + snprintf(tmpstr, sizeof(tmpstr), "%s%d", fsl_register_prefix, + (short)((instr & RFSL_MASK) >> IMM_LOW)); return(strdup(tmpstr)); } @@ -632,7 +636,8 @@ static char * get_field_imm15 (long instr) { char tmpstr[25]; - sprintf(tmpstr, "%d", (short)((instr & IMM15_MASK) >> IMM_LOW)); + snprintf(tmpstr, sizeof(tmpstr), "%d", + (short)((instr & IMM15_MASK) >> IMM_LOW)); return(strdup(tmpstr)); } @@ -641,7 +646,8 @@ static char * get_field_unsigned_imm (long instr) { char tmpstr[25]; - sprintf(tmpstr, "%d", (int)((instr & IMM_MASK) >> IMM_LOW)); + snprintf(tmpstr, sizeof(tmpstr), "%d", + (int)((instr & IMM_MASK) >> IMM_LOW)); return(strdup(tmpstr)); } #endif @@ -653,7 +659,8 @@ get_field_unsigned_imm (long instr) { char tmpstr[25]; - sprintf(tmpstr, "%s%s", register_prefix, (((instr & IMM_MASK) >> IMM_LOW) & REG_MSR_MASK) == 0 ? "pc" : "msr"); + snprintf(tmpstr, sizeof(tmpstr), "%s%s", register_prefix, + (((instr & IMM_MASK) >> IMM_LOW) & REG_MSR_MASK) == 0 ? "pc" : "msr"); return(strdup(tmpstr)); } @@ -709,7 +716,7 @@ get_field_special(long instr, const struct op_code_struct *op) default : { if ( ((((instr & IMM_MASK) >> IMM_LOW) ^ op->immval_mask) & 0xE000) == REG_PVR_MASK) { - sprintf(tmpstr, "%s%u", pvr_register_prefix, + snprintf(tmpstr, sizeof(tmpstr), "%s%u", pvr_register_prefix, (unsigned short)(((instr & IMM_MASK) >> IMM_LOW) ^ op->immval_mask) ^ REG_PVR_MASK); return(strdup(tmpstr)); @@ -720,7 +727,7 @@ get_field_special(long instr, const struct op_code_struct *op) break; } - sprintf(tmpstr, "%s%s", register_prefix, spr); + snprintf(tmpstr, sizeof(tmpstr), "%s%s", register_prefix, spr); return(strdup(tmpstr)); } From patchwork Tue Jun 4 09:55:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801388 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2312672wrw; Tue, 4 Jun 2024 02:58:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXvkpaGZphDGFC6su3yOqhkF5BeN1OeQ+GJnQKvNoYIJW/Z2hFVHOvZXR3zj91Uqi48nVs2tO3JPgBjYKjmw1Dg X-Google-Smtp-Source: AGHT+IE2a5LbOgAjHoM8Ka8O+FSBe5bLW8/6VNkjTNVWonnPMh0f6q7AV4ALNoRiC/nTE4xmIKB7 X-Received: by 2002:a05:6214:5b11:b0:6af:c82a:310e with SMTP id 6a1803df08f44-6aff726a04amr34412086d6.12.1717495095901; Tue, 04 Jun 2024 02:58:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495095; cv=none; d=google.com; s=arc-20160816; b=OXPm6bntqFSMhL2rcP0GTYuYJE6bhY5wNIf+n7r7Le3r77hcZ0rJ08xGZOody8k5J6 18mGEH4EaH348ht/GmrdviDbvVuvgVY8TOqle+jm7r+lw/dYlnIYZbW4ba3Ji3km4mNY j8I+Dzqs7O0TTF/SIMzSlERterMsNn0LeHnhwYbL7fsSt5WRq0voQRoQTinGbMaPAjW9 wp81yk0GHvP4K+f+KL/67dX7cjDUnKEnSGnA5mDMvVvad0ccbT5x9mnL1E/kcMthiGwt LBLNEfW4X7eGXzW1fWnKy9EcKWUHQLaeB7J/vKzdwNfh0mIbBSIfEMcbJ9V5ic9g3RtF sxEA== 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=HhkkGO7UM5NempyNbZSpgeksE20VfiEa/+ho7bDGL5s=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=VeiEgPxrqZ9e6+IxdKc7m62l565bUl8p4gqNW5w0xPR3HQr1i2MESbq7xZWwMLiMj8 F6iGO7Ky+z6UsJetbHsZ1EhHD2sM0nzIG60JwYoNyRNx7DSEBlgeFbJ7X0NidM1GZy+X 2quwEuQ4SsllhdGuG7EG+3BseJSOaBd8vKqR1dL7i5B5gNgOhMD3vqNstKxYIBdfj85e VCoYJptyxo2r1h6jy4WEcdoq+Mfc1mPKUTKRG7phB2HVqcoZimDzWeTEyeOXXYxcb208 DqU3jkYO1SGgHks5imKHtkli/MtJQlZiGqVZd9+/5NykXf4MmGfI2j/Y9ktPWz7l9+tk EksA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x2FybTSz; 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-6ae4a732a07si13605786d6.12.2024.06.04.02.58.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:58:15 -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=x2FybTSz; 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 1sEQug-0005bg-Iy; Tue, 04 Jun 2024 05:57:06 -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 1sEQue-0005aK-GO for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:57:04 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQuc-00026T-Iv for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:57:04 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-42147970772so5079005e9.0 for ; Tue, 04 Jun 2024 02:57:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495020; x=1718099820; 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=HhkkGO7UM5NempyNbZSpgeksE20VfiEa/+ho7bDGL5s=; b=x2FybTSz7/tPL2v1URKH5MUvy983gyExCh1IZcY6EQV2l2ldcvR762jzOnhEFcov+a z/yjS1D8yF9off+Q3gtf7wwl4fEW0S0Lr9AISMzC3KldscJDAf45pay9+32CDImWlKeH g1XDZrP+i/kDmNWFNfDiW55MoF2IxITsy9EkOH1NDnn+wBiiwjpgIbFvjIHHyn3g2qhO X+j8rrqptCR2LBWpHPYztrEXWwiV1Efp57RUTLzrpuqz0zkzQTzJcwvn9k8ggAntxmVj x9zM1PTYFt9KmO2gn2dLKXeSSJA+l4fCzA9sQz+72eq+xMndc53l/nYEUyZbxIE4qtB1 FnSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495020; x=1718099820; 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=HhkkGO7UM5NempyNbZSpgeksE20VfiEa/+ho7bDGL5s=; b=OPLELOgugaRifvThC2QgC/t7z9XZcJE5+NoUO35we3yoASBgvhv9HfrwyfAFmXm6tL bKxNy1nALl4c3N0219oSC35IQLtEE2Z6o/2edOgGGqhLQkzOm2nJCLURFFPMGpU7RK08 ImkQcgGGAGXP53y4Se+8J3aZQNr+Qjn2+mDE/ZKOjE8Uym4uBnAmdU2MDDvudN94wLQx v7RimYG4nQZb/ksecDkgTRSuaeCu1Fb0bCpD9USo0kuETgz7KJsZFGMUojyOIFsDge4X DW7nD7qT2r/4TjWBADPEO6qefoGVnvPf3kmH7I7007vLEnc63LfmJg0sKmhUvM0JHqB3 nMgw== X-Gm-Message-State: AOJu0YzRObZo0bwX2bxaMcGuZ0nKy12AI1ADVbQCnTEYCW8x6sZw5LHf swosGQU3GLtniWvcJI4wmlvYHBK+66H9QMYN525ultlXbwRbA4ASAbU321RuWuI0adY3bQ5x91v H X-Received: by 2002:a05:600c:4705:b0:421:2918:3d97 with SMTP id 5b1f17b1804b1-4212e0add57mr103467795e9.30.1717495020665; Tue, 04 Jun 2024 02:57:00 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4212705692csm178091885e9.10.2024.06.04.02.56.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:57:00 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PULL 09/32] util/hexdump: Remove b parameter from qemu_hexdump_line Date: Tue, 4 Jun 2024 11:55:45 +0200 Message-ID: <20240604095609.12285-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, 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: Richard Henderson Require that the caller output the offset and increment bufptr. Use QEMU_HEXDUMP_LINE_BYTES in vhost_vdpa_dump_config instead of raw integer. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240412073346.458116-2-richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/cutils.h | 2 +- hw/virtio/vhost-vdpa.c | 4 ++-- util/hexdump.c | 13 ++++++------- hw/virtio/trace-events | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/include/qemu/cutils.h b/include/qemu/cutils.h index 741dade7cf..d7715f7a33 100644 --- a/include/qemu/cutils.h +++ b/include/qemu/cutils.h @@ -287,7 +287,7 @@ int parse_debug_env(const char *name, int max, int initial); */ #define QEMU_HEXDUMP_LINE_BYTES 16 /* Number of bytes to dump */ #define QEMU_HEXDUMP_LINE_LEN 75 /* Number of characters in line */ -void qemu_hexdump_line(char *line, unsigned int b, const void *bufptr, +void qemu_hexdump_line(char *line, const void *bufptr, unsigned int len, bool ascii); /* diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index ed99ab8745..f3a86c1a8c 100644 --- a/hw/virtio/vhost-vdpa.c +++ b/hw/virtio/vhost-vdpa.c @@ -949,8 +949,8 @@ static void vhost_vdpa_dump_config(struct vhost_dev *dev, const uint8_t *config, for (b = 0; b < config_len; b += 16) { len = config_len - b; - qemu_hexdump_line(line, b, config, len, false); - trace_vhost_vdpa_dump_config(dev, line); + qemu_hexdump_line(line, config + b, len, false); + trace_vhost_vdpa_dump_config(dev, b, line); } } diff --git a/util/hexdump.c b/util/hexdump.c index 9921114b3c..7324e7b126 100644 --- a/util/hexdump.c +++ b/util/hexdump.c @@ -16,7 +16,7 @@ #include "qemu/osdep.h" #include "qemu/cutils.h" -void qemu_hexdump_line(char *line, unsigned int b, const void *bufptr, +void qemu_hexdump_line(char *line, const void *bufptr, unsigned int len, bool ascii) { const char *buf = bufptr; @@ -26,13 +26,12 @@ void qemu_hexdump_line(char *line, unsigned int b, const void *bufptr, len = QEMU_HEXDUMP_LINE_BYTES; } - line += snprintf(line, 6, "%04x:", b); for (i = 0; i < QEMU_HEXDUMP_LINE_BYTES; i++) { - if ((i % 4) == 0) { + if (i != 0 && (i % 4) == 0) { *line++ = ' '; } if (i < len) { - line += sprintf(line, " %02x", (unsigned char)buf[b + i]); + line += sprintf(line, " %02x", (unsigned char)buf[i]); } else { line += sprintf(line, " "); } @@ -40,7 +39,7 @@ void qemu_hexdump_line(char *line, unsigned int b, const void *bufptr, if (ascii) { *line++ = ' '; for (i = 0; i < len; i++) { - c = buf[b + i]; + c = buf[i]; if (c < ' ' || c > '~') { c = '.'; } @@ -58,8 +57,8 @@ void qemu_hexdump(FILE *fp, const char *prefix, for (b = 0; b < size; b += QEMU_HEXDUMP_LINE_BYTES) { len = size - b; - qemu_hexdump_line(line, b, bufptr, len, true); - fprintf(fp, "%s: %s\n", prefix, line); + qemu_hexdump_line(line, bufptr + b, len, true); + fprintf(fp, "%s: %04x: %s\n", prefix, b, line); } } diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events index 96632fd026..3cf84e04a7 100644 --- a/hw/virtio/trace-events +++ b/hw/virtio/trace-events @@ -50,7 +50,7 @@ vhost_vdpa_get_device_id(void *dev, uint32_t device_id) "dev: %p device_id %"PRI vhost_vdpa_reset_device(void *dev) "dev: %p" vhost_vdpa_get_vq_index(void *dev, int idx, int vq_idx) "dev: %p idx: %d vq idx: %d" vhost_vdpa_set_vring_enable_one(void *dev, unsigned i, int enable, int r) "dev: %p, idx: %u, enable: %u, r: %d" -vhost_vdpa_dump_config(void *dev, const char *line) "dev: %p %s" +vhost_vdpa_dump_config(void *dev, unsigned ofs, const char *line) "dev: %p 0x%04x: %s" vhost_vdpa_set_config(void *dev, uint32_t offset, uint32_t size, uint32_t flags) "dev: %p offset: %"PRIu32" size: %"PRIu32" flags: 0x%"PRIx32 vhost_vdpa_get_config(void *dev, void *config, uint32_t config_len) "dev: %p config: %p config_len: %"PRIu32 vhost_vdpa_suspend(void *dev) "dev: %p" From patchwork Tue Jun 4 09:55:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801386 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2312665wrw; Tue, 4 Jun 2024 02:58:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVpNljviU+PA8WJxyqBxOTBLvsj90vFILMpKhXL0u4dNL+f/VA4OmkeK5lbkcelVmo7/iWXhj5dq96oQ87+pyv/ X-Google-Smtp-Source: AGHT+IH4xPcrhbWlqJDYzHUlCiivDxRfPa6ZW6vpvd5Uh9ulEvLeR2Of97mj3RautB00jSgvDy7D X-Received: by 2002:a05:620a:c09:b0:795:195a:35ca with SMTP id af79cd13be357-795195a3724mr100945985a.25.1717495095094; Tue, 04 Jun 2024 02:58:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495095; cv=none; d=google.com; s=arc-20160816; b=L64FTcNn6KXcfMwZZPunNVdmk9TTrv6cWE1imysoU5M3Namc060zY+uEOZxJuK4MW+ WRE+znahnrsc5h4McuIpRFLaooIajpKHzZaj5NCZVOLF9i3ACBlq0oYSdgwxE41j9Fys HmX/dZZDguDsKbcB51zcsCWbfSaZ236uG+utSrQm/f4zfWzetGEy6fJ9AB5cyDFyUBGL XAtjeb/mI8blaZqQFmWCTym9b/EKwB2IJ8YLVp6R39DWAlOJyUuPxOVszAOr4oDkdMjg EHfnXwzCWw+83YyldLlzK6ghrjnq42zIOLN414bPoAe08SCqzuMD05raMZIUYTOWdxIv Njjw== 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=IKCb8LNXYSVbebdxNMftRVpPNmizlFVEcNh6n2gVUMA=; fh=ZXDWg7hKG7Hj19AbRuutTLw+Zvn/B9RsGUUw/YagpFI=; b=U12i53oM1Cv9c1qU3Xeh8IeCoS2sAxBIAdMK7sBdS792qVXB2cHz0fYNOYqfbzWfOu 5JV/oLjaILfsPUMM9DK/uAo0NhU8ha30iVkfXPp8E/LnurM2PgYxZYZbIzqNI2dmCbQa fU4XMQby0RwMfHwZKT2FklNjHNsHmeJF0Qe4uOFEtJCGfy/cJ2P45r6jmSV6oDreasSF GoZ+UZlc5PBSvpocZEuhygqspbDiFKvRgpAjeSPC+1w6j16q5cZt8cI3u00sDrqulw4C 1qTdSD4THVSqkQ6pGI+e5EJRbGFN79lnbknl322qI5Q+gu8BkCVt7leQoObHooa7UrM6 g2uA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uVEsyXqt; 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-795194353fesi98402585a.650.2024.06.04.02.58.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:58:15 -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=uVEsyXqt; 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 1sEQul-0005mW-GT; Tue, 04 Jun 2024 05:57:11 -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 1sEQuj-0005c6-EG for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:57:09 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQuh-00026j-RZ for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:57:09 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-35dcff36522so775208f8f.1 for ; Tue, 04 Jun 2024 02:57:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495026; x=1718099826; 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=IKCb8LNXYSVbebdxNMftRVpPNmizlFVEcNh6n2gVUMA=; b=uVEsyXqtdFcCLy4mFlnKWY05yOTrMAbICi8yS5Syorty92KbKJjPj21R6Y9t7Z4gAr L+LQi4VgORgQ+VEHF3LfnwFZQdH4GmJkC3IfycVTHrDYJLfDsOWvSVVocwATVqvlftSJ 4NCLciTEV91BHI+QZXJcfbsTrAHHfVZ1oi9QW3i7p3hkFvUZ/4PHkVBDEDfFwhBm2hFx kts5BWk9fFlengmvPzujjSnJusdSjSzb9HLNnkVxpgzF+yTJAjJ4rHvEwXq/l2z2fte0 RvjlJUFiPkrYdgfTlWkCUIW5IlU/yuELqy28yLk1ofW9Li4Q8mXB4k3nDENdfXL4jdGV PKNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495026; x=1718099826; 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=IKCb8LNXYSVbebdxNMftRVpPNmizlFVEcNh6n2gVUMA=; b=b3wXLGMtPLCXPlqwNQyQfMzmVUnep/x2Rw+SsylSS/jG4RUvPteJl7zdPtzliZJ54Y uOKyjrgNJaIvQy2lfdUx8tO9Ze34DAx4sYn2WZBbMhU9JVn31qAHytnGTk7Wij+2yKXe Tijs0RgL9v6iTShiibtzrywHwGDr3UxvPJXVRK5c/MAriMPciM5Lio5SP0XnktKmSpju QZSc9EnbRbFqJGJr2rLpy+i0ob//mMB4G5X52ckgS91weGl7NbhlRnqd56+lfajBDASZ vV9tl2gMteks64qPFh8joJoXsnbkM5IjCrU9eR9OFWn5ziNMbyEFz+w5b+GEQkIuaFot klxw== X-Gm-Message-State: AOJu0YxcsC0p40rPR4blyzlAHBJxWwuPjvtTTeLgcfZ+ilt+4ZxV++dh +fDH6SGSbQBNApjtgm1lEqZdp46Kp7MlxkEBjDobUoj4An09TUaC79CmoRsOWdzWR00+2Jmgj69 S X-Received: by 2002:a5d:5f8b:0:b0:356:c47a:87d2 with SMTP id ffacd0b85a97d-35e0f25a5d9mr9190500f8f.6.1717495026208; Tue, 04 Jun 2024 02:57:06 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd04d96f6sm11103296f8f.61.2024.06.04.02.57.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:57:05 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PULL 10/32] util/hexdump: Remove ascii parameter from qemu_hexdump_line Date: Tue, 4 Jun 2024 11:55:46 +0200 Message-ID: <20240604095609.12285-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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: Richard Henderson Split out asciidump_line as a separate function, local to hexdump.c, for use by qemu_hexdump. Use "%-*s" to generate the alignment between the hex and the ascii, rather than explicit spaces. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240412073346.458116-3-richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/cutils.h | 3 +-- hw/virtio/vhost-vdpa.c | 2 +- util/hexdump.c | 56 ++++++++++++++++++++++++------------------ 3 files changed, 34 insertions(+), 27 deletions(-) diff --git a/include/qemu/cutils.h b/include/qemu/cutils.h index d7715f7a33..c5dea63742 100644 --- a/include/qemu/cutils.h +++ b/include/qemu/cutils.h @@ -287,8 +287,7 @@ int parse_debug_env(const char *name, int max, int initial); */ #define QEMU_HEXDUMP_LINE_BYTES 16 /* Number of bytes to dump */ #define QEMU_HEXDUMP_LINE_LEN 75 /* Number of characters in line */ -void qemu_hexdump_line(char *line, const void *bufptr, - unsigned int len, bool ascii); +void qemu_hexdump_line(char *line, const void *bufptr, size_t len); /* * Hexdump a buffer to a file. An optional string prefix is added to every line diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index f3a86c1a8c..7368b71902 100644 --- a/hw/virtio/vhost-vdpa.c +++ b/hw/virtio/vhost-vdpa.c @@ -949,7 +949,7 @@ static void vhost_vdpa_dump_config(struct vhost_dev *dev, const uint8_t *config, for (b = 0; b < config_len; b += 16) { len = config_len - b; - qemu_hexdump_line(line, config + b, len, false); + qemu_hexdump_line(line, config + b, len); trace_vhost_vdpa_dump_config(dev, b, line); } } diff --git a/util/hexdump.c b/util/hexdump.c index 7324e7b126..0f943e31e5 100644 --- a/util/hexdump.c +++ b/util/hexdump.c @@ -16,49 +16,57 @@ #include "qemu/osdep.h" #include "qemu/cutils.h" -void qemu_hexdump_line(char *line, const void *bufptr, - unsigned int len, bool ascii) +void qemu_hexdump_line(char *line, const void *bufptr, size_t len) { const char *buf = bufptr; - int i, c; + int i; if (len > QEMU_HEXDUMP_LINE_BYTES) { len = QEMU_HEXDUMP_LINE_BYTES; } - for (i = 0; i < QEMU_HEXDUMP_LINE_BYTES; i++) { + for (i = 0; i < len; i++) { if (i != 0 && (i % 4) == 0) { *line++ = ' '; } - if (i < len) { - line += sprintf(line, " %02x", (unsigned char)buf[i]); - } else { - line += sprintf(line, " "); - } - } - if (ascii) { - *line++ = ' '; - for (i = 0; i < len; i++) { - c = buf[i]; - if (c < ' ' || c > '~') { - c = '.'; - } - *line++ = c; - } + line += sprintf(line, " %02x", (unsigned char)buf[i]); } *line = '\0'; } +static void asciidump_line(char *line, const void *bufptr, size_t len) +{ + const char *buf = bufptr; + + for (size_t i = 0; i < len; i++) { + char c = buf[i]; + + if (c < ' ' || c > '~') { + c = '.'; + } + *line++ = c; + } + *line = '\0'; +} + +#define QEMU_HEXDUMP_LINE_WIDTH \ + (QEMU_HEXDUMP_LINE_BYTES * 2 + QEMU_HEXDUMP_LINE_BYTES / 4) + void qemu_hexdump(FILE *fp, const char *prefix, const void *bufptr, size_t size) { - unsigned int b, len; char line[QEMU_HEXDUMP_LINE_LEN]; + char ascii[QEMU_HEXDUMP_LINE_BYTES + 1]; + size_t b, len; - for (b = 0; b < size; b += QEMU_HEXDUMP_LINE_BYTES) { - len = size - b; - qemu_hexdump_line(line, bufptr + b, len, true); - fprintf(fp, "%s: %04x: %s\n", prefix, b, line); + for (b = 0; b < size; b += len) { + len = MIN(size - b, QEMU_HEXDUMP_LINE_BYTES); + + qemu_hexdump_line(line, bufptr + b, len); + asciidump_line(ascii, bufptr + b, len); + + fprintf(fp, "%s: %04zx: %-*s %s\n", + prefix, b, QEMU_HEXDUMP_LINE_WIDTH, line, ascii); } } From patchwork Tue Jun 4 09:55:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801389 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2312691wrw; Tue, 4 Jun 2024 02:58:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWqVbhm6KP7o1epFNqvJWz2FcXWeN/F6lgzLYXhV/VV0BRhFIlgNh2PK4XS9KhkmRjJkby5hHt5c/eGgi9P9SB7 X-Google-Smtp-Source: AGHT+IE0ghozZxCqKm0VtnWd/BkodgWpPhyrok9kRQBVnxCxlbfNeij/UDcsKZqOvvCFo9fU2+SA X-Received: by 2002:a05:6214:5904:b0:6ae:442d:5cb with SMTP id 6a1803df08f44-6aecd576eb0mr124730756d6.8.1717495099347; Tue, 04 Jun 2024 02:58:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495099; cv=none; d=google.com; s=arc-20160816; b=dlNhlnz8xoIMujHral9f5ktahCF/kZtrev5Vkfh+BDDPqW2FDlYt257SAeqG4Y8mF2 gS59Rdhm2fPRl/prR1dvEqCpbxtNlIXWjdUKDoTg5GvD8Ajj5HEHlAlfXGYszdvYHDqr 0rfN92kRZZNioOAdFGSZr+H01qy6w/zORGbJcoaiN1Vi4KVgkUNw9P4gE+djSsBi48kE y2WyoezhXtU4+cgfQQ0qdqWPrK/mB91xruX9hcG+3reNFoPiPbETD+Caow9lH5svd9/5 qZ0y2QKk9PaFR3skTdwI+wBidkteWk/USbpAUHslMfqzKLYZeiMq92pMK+aa8PUQMIvc ofgA== 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=ImVmefo1MlwAmY4FNzose8vP9/wMtnxVjazWG/n/+Lw=; fh=FNGkAXNQEXEC+3UHY+FqTmM7uCfvfLry1ntoXxwtcbg=; b=aiti28o40DL7Qx4rxNAcEUPGnIpd8tQJRScH3GmsQHo3QPj7+TF0WAdt1reP2iM1db dqZAsRCmWdypywbR+2TkaUVVt2s4IJsYmwpJ488Oe77Mxm6ygRazl82gynKMgxgmsDOA SLvuykaXChckgh+jJIsS7KxLQBQl5N/Nro5wSKTTpX7EkZRLO2ehJl9KjyW/98uyMY56 SXx2a2NwWmPHdU7yD+0YGQuB9nk5DpR9SZnlYpW51FHfH2hqIXsx44qyYy0Ssq+nnL+5 85UTN+ktOm4J6focIWcTXTBvE15rOIw4tCdg9v/u8/P0IXW+WtIT3SbBr21U8L2prH2w Euxg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Iips2Im6; 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-6ae4b41492bsi106366046d6.331.2024.06.04.02.58.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:58:19 -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=Iips2Im6; 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 1sEQur-0006MT-3T; Tue, 04 Jun 2024 05:57:17 -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 1sEQup-00069a-BG for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:57:15 -0400 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQun-000272-Mb for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:57:15 -0400 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-5295eb47b48so917137e87.1 for ; Tue, 04 Jun 2024 02:57:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495032; x=1718099832; 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=ImVmefo1MlwAmY4FNzose8vP9/wMtnxVjazWG/n/+Lw=; b=Iips2Im6vBwTDCb3WLOsaVMwPyunx4KfWRy+1oLXKorwGVn213VOO9u9oluQ2I+MfY Rw4+0cp2pJ2P6gvnlMXxn3cSpy6HB220pKPUglwiU1EPqN3NjM1wFyx7IujrD1G5J1Os 3htD8d1ktaDGm4Gen4jFqm/MkZSuMFfpmMsBA3o8Sx7VCKuueaGXgJVENAs7HF+WoKhC 35lS+0sG9GhzBS3zAzSQqK310k2qT12LKo9MjUePSkvrBc22WxJ1PYbd+Bxf19RTgydX jl200G4uJF9fkF4keDXjTYGB51v2sumtmEKx6X8wbYWlbHx76EBpeiXt5wUNmOzBdI1c RTDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495032; x=1718099832; 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=ImVmefo1MlwAmY4FNzose8vP9/wMtnxVjazWG/n/+Lw=; b=JG0tA+dQFfrjmrDzqqfddra1d841qx8wKAQ0qrB1JPQPsAht7lEPQ9Gg5IaZYR2tIT /aKQ3k5tAwOpfcIxT6djskzYprqdz+tmtXviv1wUViVuKdcMbmgPu7DyOGO71rk1vtyj zpUq6plaIFGdfwIqT76/memVrG2F+AjN+0R7/XZRWMsvfBRcQqcDmOTKrRLPRsgDjJrx TjPoTjOo9C9oGdDlajuD+/q1wmqpGQBRTI07wleJn+J8CEEqwApk1rSc+Tca+dP2DI8X PDEZWvYNOLSAE+9YHdX9Y/Zw4UYWeYvo4F0VwhPhqaf/8xVeRdS7QeyTyIqlmKfBLUov YucQ== X-Gm-Message-State: AOJu0YxbD6y9k1I5qQkci6DDSMlTINu4vr+nzVtWxoMf7PSjh23w8jh5 jhQKgPYbmW+f0bTaLD4f8r0ZusIbN6BNelvhIA0Jvy/VlG+dcy4BLMpeaebdMFZfSSL5yhBoQC6 Y X-Received: by 2002:ac2:5b5d:0:b0:51d:68fb:5d73 with SMTP id 2adb3069b0e04-52b8956932dmr7798641e87.8.1717495031553; Tue, 04 Jun 2024 02:57:11 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd04c0de3sm11095383f8f.9.2024.06.04.02.57.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:57:11 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Manos Pitsidianakis , =?utf-8?q?Philippe_Ma?= =?utf-8?q?thieu-Daud=C3=A9?= Subject: [PULL 11/32] MAINTAINERS: drop usb maintainership Date: Tue, 4 Jun 2024 11:55:47 +0200 Message-ID: <20240604095609.12285-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::133; envelope-from=philmd@linaro.org; helo=mail-lf1-x133.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: Gerd Hoffmann Remove myself from usb entries. Flip status to "Orphan" for entries which have nobody else listed. Signed-off-by: Gerd Hoffmann Reviewed-by: Manos Pitsidianakis Message-ID: <20240528083858.836262-3-kraxel@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 448dc951c5..5bc478f7ff 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2141,8 +2141,7 @@ F: tests/qtest/fuzz-sdcard-test.c F: tests/qtest/sdhci-test.c USB -M: Gerd Hoffmann -S: Odd Fixes +S: Orphan F: hw/usb/* F: stubs/usb-dev-stub.c F: tests/qtest/usb-*-test.c @@ -2151,7 +2150,6 @@ F: include/hw/usb.h F: include/hw/usb/ USB (serial adapter) -R: Gerd Hoffmann M: Samuel Thibault S: Maintained F: hw/usb/dev-serial.c From patchwork Tue Jun 4 09:55:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801384 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2312533wrw; Tue, 4 Jun 2024 02:57:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUO72d8y6JXDYtwCeoqck5Jd1TW8DpQ7G/7a4CW4oW7QX7c2N4QX3lR60buRjyn9TFcSCGUimQcK8BNp0o6K0Ju X-Google-Smtp-Source: AGHT+IFhg1JeKqLyrtMTgfJnBWd9w0QzokI4Ii58nJQIwJa4v/zGUtdxRsVc7BNJKE5deQbx75It X-Received: by 2002:ac8:5802:0:b0:43a:d7a7:7322 with SMTP id d75a77b69052e-43ff5296623mr139505571cf.37.1717495068650; Tue, 04 Jun 2024 02:57:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495068; cv=none; d=google.com; s=arc-20160816; b=0PE9frMXzntkdqdD6Cye5KcWqAGzgHMG5VxlPxz0RZYqfB+NiiRijt3TIHFCQYSqn6 dJXVxHyHa/yDs1FUF4lHtM5QMOKkq6XmvXXyYzKob8Wbt10w2ob5BoQ0yAn/ODKCdLwr hL1WD+kXoQleioDUgC1VmDQqqZi6hoUqMnNPE6InqqrAyEmxq18OgwyK9QDWUPrtFCi2 E2JH06LrQ1RgRj9nHLyvdYwsK1xEvd/Hr0H1VH3qz3zTS7nePM3VvRrs5g87n9seE3BQ 4/eXDigqirbaf95KGqy7mO9yVqmc7nmQzNHskOLNpZ+bMUtfr0EfYjOcjMy13ytRdY1W stHQ== 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=tvJdNys5P3aGDE+znvt43SgumkIO7uwCiPZ5aglr7XY=; fh=ZOEI4bjC5BR2ZQQDBiGKHpAsfXe7zC3VMY773pmcdus=; b=oItlUauF/kdWc2Lvu2KQJCiWNwVWPJMs1xoDi6DlV1HpHYylPcV0vOv7CmBdvlnVSz /1z8jbj1P/CKyLru3bkqUZw0jmxeNlYNLscw+U9f08wJZUVDF+xkV+iM1+3SwpC6XMZ6 tRdpMPn9AO1wefLe1Tz0y70ESWyWQqzFbR20oEP/i8gNd3jG5lg9Hmpg64GPUGxe5OQM KPKKVRU2Tk7mafJ6FppKp3J6awjKCBLgNIwGvYsg3mrdffixAyNFs8g4q7aI497ZfUx9 64F/LabOxGFAl6ZLJUab7w93tPg37lfexClGByw1mYrOcA4wa1qMaBzYjv2yIZTS6g6x U46Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GvjEQP+3; 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-43ff23ac46esi17313831cf.15.2024.06.04.02.57.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:57:48 -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=GvjEQP+3; 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 1sEQuw-0006rK-J0; Tue, 04 Jun 2024 05:57: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 1sEQuu-0006kj-A0 for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:57:20 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQus-00027e-KE for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:57:20 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-42122ac2f38so30823735e9.1 for ; Tue, 04 Jun 2024 02:57:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495037; x=1718099837; 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=tvJdNys5P3aGDE+znvt43SgumkIO7uwCiPZ5aglr7XY=; b=GvjEQP+39a5hwwtJmtBiLMiZP14RfklSQfl21WaBG4pplUlMR1VvFDouv03GTHxd+7 6DUDjqGaTRZjWcPqgCtOC/M/jx2PmTpKZVBFrwIVVokhgKlt6O/4ObPV4bBPZRQkbIrE 6tUY1JazWFQdFYIZxS3klPIfh2g3tB52ilu9hwb5NbFvgBUoKnZgqsPIh1j8NlGOzwj7 WQ47Ou+/y4PpXqeCY7DVNIQleiQPOFYHngXvGygBjvJPCrtNJ1x0MbPcXgdWpeiEarws srWfCqC20BWaqZQyg2/xmLOPemtZeToqcShrG6v9jsgeV3AfYEPSEgqEosg9V8q2Bpx+ vvbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495037; x=1718099837; 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=tvJdNys5P3aGDE+znvt43SgumkIO7uwCiPZ5aglr7XY=; b=YjHnY/FsI50dRz2mGSKvhAtNqRNGuH3TfJUXMDzVeapZagf09ZfFqJyEBDu1PkDtXU dMpYYFZ/RpuKb/NqGg8Q5Y5VGX/xCDvy5WN+0WiagUjHNlT7CioPtxVftwyvQWHNDTiX NGFw6PzdbbYuJjkICWFJLuXOBlrFRBswpsa8vcDyJEMWJnu3Toh3rnxC1rqM2wdpPJum VtvFHXQ7Beeuo9A2XoP8iejtU+imTkiDNtP8I7nGvUFUQd+rWe+ZAx8YfISGPgBDu2QP FIMY2brxvmBRKp/vmmikWVQ70NgHuEjZfc8PvDbWFXfesSboU9sN4GmI8pgA2bAUEx8Z BUnQ== X-Gm-Message-State: AOJu0Yz/yGguOfKrwd53rHpkAEF6QsfUNDZEtD+CNc0MfqUKeEK/qOLP GP1sQCHu9jHIEvTRW5ZxNZ9LgjPAIxsZGSvIDLhsfljBgvqqnfM15ZZDvfIXumk5hwLLHv6jGuN T X-Received: by 2002:a05:600c:3ba9:b0:421:2a54:2f22 with SMTP id 5b1f17b1804b1-4214511b763mr19160985e9.9.1717495036962; Tue, 04 Jun 2024 02:57:16 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd04cada4sm11006871f8f.40.2024.06.04.02.57.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:57:16 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Pierrick Bouvier Subject: [PULL 12/32] system/runstate: Remove unused 'qemu/plugin.h' header Date: Tue, 4 Jun 2024 11:55:48 +0200 Message-ID: <20240604095609.12285-13-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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, TVD_SPACE_RATIO=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 system/runstate.c never required "qemu/plugin.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier Message-Id: <20240528145953.65398-2-philmd@linaro.org> --- system/runstate.c | 1 - 1 file changed, 1 deletion(-) diff --git a/system/runstate.c b/system/runstate.c index cb4905a40f..ec32e270cb 100644 --- a/system/runstate.c +++ b/system/runstate.c @@ -45,7 +45,6 @@ #include "qemu/job.h" #include "qemu/log.h" #include "qemu/module.h" -#include "qemu/plugin.h" #include "qemu/sockets.h" #include "qemu/timer.h" #include "qemu/thread.h" From patchwork Tue Jun 4 09:55:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801381 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2312515wrw; Tue, 4 Jun 2024 02:57:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW4LkeDnj5NKEvxTZwc9KZsuDmQzkarWrOEvShKTZSi9uiGEDj3IffsaJrVnal8ulfCAOmwtUAy8hgmSnpZQQ0Q X-Google-Smtp-Source: AGHT+IG9vJJ/FhE4Qg9tmhTck2dSOVLwlfwLC6i47qfe/62S2GL5BiU0MXbnjN/O4Vfb/pdevbtg X-Received: by 2002:a05:622a:50c:b0:43f:fc16:6b25 with SMTP id d75a77b69052e-44019d98b3emr31206461cf.27.1717495065704; Tue, 04 Jun 2024 02:57:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495065; cv=none; d=google.com; s=arc-20160816; b=OAky7SztJpn0XDVDLP3TZ/Z0nP2KVjLWMqWcKDthFexY9D3vEnwWR74PHd9NHctJ8U xT6cJznN2YM0AdQ88ODdHWj3D6a8MCbFp5NXBnKLeOZhsYJnrFsLCmarPMiO1K1e0rzS p3VOiDlccUg/Tx979EzYK29cOEpp+ZtK8gzwoOadAzMdBuBQqoX0LEdbmsiz/tWYd0eR SvoRV43JWPX/cN6tvI8LtFLsI8/jWkZUB/JACBhp5Bx7by6OvncVk3tk1RJ4ZdYDFuC4 FJr6sNKxjUao+YAuSje93vH6cXsqZlIlEKIeh2iodoL3hu37yDqgaY3Qlwi/RPuWhoQW Ybng== 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=Cmg1ayuApwmH79kPzx40QOBelO6dVSgqwUpaSLnFGiQ=; fh=ZOEI4bjC5BR2ZQQDBiGKHpAsfXe7zC3VMY773pmcdus=; b=P0/fZhGL8IohlrfZEe1pd1sItTMszHWfwf0p3h4dwSntWud7Ox3dDOPf8C3S8UXjn0 6plLhzPl+YlPPzG/DMjiwOEyIUmHWhxihNQM5xBKTqP6zc7ylnDZ8029z0eXAFCnF4Dp b1qaDOOhP1+laWW/ynRiKbqGqBmDgbyusFscbAgyNCB4ISsV+LxBKpITBN0BD3Hb9YB+ yTAvnRTKGcGPpWzakiqg5fCE3sHb/QHZQ9s9/g+eUK+Hr3p4CYGKsT2RXKmoV3VdUq+f XJv+h3b+IAyrMPjhAxYJ1ZkzOpv7CMGlg9m9hSo89/fUj5tODvbNgmoNvdeKFBeFUrXr PeUQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YHiAQmUr; 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-43ff257eb9csi107367871cf.462.2024.06.04.02.57.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:57:45 -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=YHiAQmUr; 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 1sEQv3-0007iK-7w; Tue, 04 Jun 2024 05:57:29 -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 1sEQv1-0007Sq-HH for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:57:27 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQuz-000282-1C for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:57:27 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-35e573c0334so1245505f8f.1 for ; Tue, 04 Jun 2024 02:57:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495043; x=1718099843; 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=Cmg1ayuApwmH79kPzx40QOBelO6dVSgqwUpaSLnFGiQ=; b=YHiAQmUrSvdPbTySjrFpb2kMvhNiLXAd9lpVFSjnBQinrhDJ1mjfPoPU6ccvKe8nV6 /aO+UnKUr+JfRzIoqRUUUox+mXe4XuIUBdO4qOnEK1RGfgjafI7rwX6U3nJvGv9AoHD2 URCt/1/nCqUVUKscFCnw9cawRDeYcCe5ZDzaILYoegSYwHwozyTXP200wfbJCI7fmn27 iBVlKQW10bcG4VbPY+IyyJ+jN/oQ63awjBw4p3k36qdagbu6guWLjx8uEQnru/juNozO zudkoXnDx9BTkY8iouMx00xmiJ8OMXCfOpYyDF4uz2n4n517iKXLGQ0HQqdPv/btnCQt sT5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495043; x=1718099843; 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=Cmg1ayuApwmH79kPzx40QOBelO6dVSgqwUpaSLnFGiQ=; b=fOejli+M/+6OrPPsHzkeBpZXfC6yKMlwv734aOHBv0oGkpOtXxD0hl5WIwd2KDp6WR GmRIH/hZ6LLLwBwtV2JOPobiSpmKEc6jwMA4k4+cy78SbALQ4fMA2xBtX5gj8Lonxs96 HNc26g6anyUgl70FPuhGdVrdecrQuXyKAejBojfCHmjN3a0xvGB726oQzKUEN95NdVHw p36MOSZ9GeYlgxKdCV6X82NV9lB8DgZTkFz/p49KB0YDK4aMguAeA9/HFvxDdGayJAot +39q20plA/jtapDroX+q0oFcjEmloBLMc3sTWsgIq+8fZv5q5GpFyei3AjjZ8DdnfULi 5S8A== X-Gm-Message-State: AOJu0Yzaj9Sn4u9KMXjpzcYI1DpZy4a0U4if1GMBbqPpXbVMR3r+yHM5 13FKH0tslQzz6T0KveAmU0Ez+ucrKCPIq5w53JM5qRTOP47+qAS7Eo5z1zVAdswwH2XqqjzkvJI Z X-Received: by 2002:adf:eb4a:0:b0:354:ece6:d9b9 with SMTP id ffacd0b85a97d-35e7c54b2b9mr1879055f8f.15.1717495042682; Tue, 04 Jun 2024 02:57:22 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35e4f0fd15esm8443084f8f.68.2024.06.04.02.57.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:57:22 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Pierrick Bouvier Subject: [PULL 13/32] accel/tcg: Move common declarations to 'internal-common.h' Date: Tue, 4 Jun 2024 11:55:49 +0200 Message-ID: <20240604095609.12285-14-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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 'internal-target.h' is meant for target-specific declarations, while 'internal-common.h' for common ones. Move common declarations to it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier Message-Id: <20240528145953.65398-3-philmd@linaro.org> --- accel/tcg/internal-common.h | 15 +++++++++++++++ accel/tcg/internal-target.h | 14 -------------- accel/tcg/tcg-all.c | 2 +- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/accel/tcg/internal-common.h b/accel/tcg/internal-common.h index cff43d221b..a8fc3db774 100644 --- a/accel/tcg/internal-common.h +++ b/accel/tcg/internal-common.h @@ -15,6 +15,8 @@ extern int64_t max_delay; extern int64_t max_advance; +extern bool one_insn_per_tb; + /* * Return true if CS is not running in parallel with other cpus, either * because there are no other cpus or we are within an exclusive context. @@ -41,4 +43,17 @@ static inline bool cpu_plugin_mem_cbs_enabled(const CPUState *cpu) #endif } +TranslationBlock *tb_gen_code(CPUState *cpu, vaddr pc, + uint64_t cs_base, uint32_t flags, + int cflags); +void page_init(void); +void tb_htable_init(void); +void tb_reset_jump(TranslationBlock *tb, int n); +TranslationBlock *tb_link_page(TranslationBlock *tb); +void cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb, + uintptr_t host_pc); + +bool tcg_exec_realizefn(CPUState *cpu, Error **errp); +void tcg_exec_unrealizefn(CPUState *cpu); + #endif diff --git a/accel/tcg/internal-target.h b/accel/tcg/internal-target.h index 4e36cf858e..fe109724c6 100644 --- a/accel/tcg/internal-target.h +++ b/accel/tcg/internal-target.h @@ -69,19 +69,7 @@ void tb_invalidate_phys_range_fast(ram_addr_t ram_addr, G_NORETURN void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr); #endif /* CONFIG_SOFTMMU */ -TranslationBlock *tb_gen_code(CPUState *cpu, vaddr pc, - uint64_t cs_base, uint32_t flags, - int cflags); -void page_init(void); -void tb_htable_init(void); -void tb_reset_jump(TranslationBlock *tb, int n); -TranslationBlock *tb_link_page(TranslationBlock *tb); bool tb_invalidate_phys_page_unwind(tb_page_addr_t addr, uintptr_t pc); -void cpu_restore_state_from_tb(CPUState *cpu, TranslationBlock *tb, - uintptr_t host_pc); - -bool tcg_exec_realizefn(CPUState *cpu, Error **errp); -void tcg_exec_unrealizefn(CPUState *cpu); /* Return the current PC from CPU, which may be cached in TB. */ static inline vaddr log_pc(CPUState *cpu, const TranslationBlock *tb) @@ -93,8 +81,6 @@ static inline vaddr log_pc(CPUState *cpu, const TranslationBlock *tb) } } -extern bool one_insn_per_tb; - /** * tcg_req_mo: * @type: TCGBar diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index c6619f5b98..2090907dba 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -38,7 +38,7 @@ #if !defined(CONFIG_USER_ONLY) #include "hw/boards.h" #endif -#include "internal-target.h" +#include "internal-common.h" struct TCGState { AccelState parent_obj; From patchwork Tue Jun 4 09:55:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801379 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2312510wrw; Tue, 4 Jun 2024 02:57:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUJVEQrQsoYCdd2br+RBqBP0P/QMmPwheshNpKMxtLRA2LqnDn0seS4qdSWAmzEf90iMwOnem4QxHayPv97i4Vi X-Google-Smtp-Source: AGHT+IFKNhULvmaBFsKoTtDqvI+5lYBVBfDi+5Az0weU/z1AQ08eWgo5noC62BEIMx2z4iWl0Tif X-Received: by 2002:a0c:ea41:0:b0:6ae:d0c2:18be with SMTP id 6a1803df08f44-6aed0c21930mr117996216d6.42.1717495064950; Tue, 04 Jun 2024 02:57:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495064; cv=none; d=google.com; s=arc-20160816; b=EGghCRLH8gWxyf7F1v7NUA5SFbL2ni4GnKPezYU2494OA0IVLyMqJltFbX+t/rAV0S yxEeRFZH7TZp5AmRPYtUZbbEPx3J2eese7oGp+e5888CtVidlFlqjyCGoYoflCnVhGJO QGdo18sC0bphzEn7E8SNf1je99Oczcybqfzz6w2Z3tsH8duJyBpNZBdYpTU0UpIBq0Kc j7jRukRCQFiZgi/pAKv/ETsjt2B+7ZoqoUCeWqZPJFgGCkUPTFNCnEclf4fqbl7jX2pm cbUiw5qTfBBOeYLviYM3O/9bZ9bcduJrHaTSF9r3JxL5BGnT7vwaJHM4tLOWl5WCB9bS BcYA== 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=pSBLM04d3DAbKCspvBjFgiIMn9c2P954kLTi2eYOo9c=; fh=kPUj8+wiKTOD+Z15tHtvS3V3vd7r6ARxN//iexQ5Vy4=; b=WtYvcIQDLQrfBLJ/lYvicaatQwngmxB8W3MJErUsFAZKcXVsTsEasTLn0dOPOBGWOp hwCGIpLsr+0JBNWFnq/F1C9NYXzwBZFWdExOyULjjAeBG9idbq+6JkC061DACp9WiBhK AH0Pf+DiarU6mBV44Z1dJcpE/Y2qjdkf4cMA5hgnY1VJwkc7Wdz2Wdge39JCW2G8tVaP 8TK/QumD5Syg2G3JckCfO0Y+xLhHOEp/5IjuC2eGZV+/BM3m5gmSGUPIAM6wEu2P7uPJ fzOHTbwmXbYwo3WcNQiUQ1a8BH/rMoIjycFCTZY0n9IX8Q3XugAxNgDKgck83bqheCGU ZZdg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=whjKlISR; 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-43ff25b0068si99567081cf.704.2024.06.04.02.57.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:57:44 -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=whjKlISR; 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 1sEQv9-0007yR-Ob; Tue, 04 Jun 2024 05:57:35 -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 1sEQv5-0007uV-Tj for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:57:32 -0400 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQv4-00028r-B2 for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:57:31 -0400 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-52b87e8ba1eso5503464e87.3 for ; Tue, 04 Jun 2024 02:57:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495048; x=1718099848; 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=pSBLM04d3DAbKCspvBjFgiIMn9c2P954kLTi2eYOo9c=; b=whjKlISRZm2GG4dGvOyT55289SeEHgC33ztpy60ELy46mx6CmA/pZ42aEXAZXZhC4t e0wpb9pSku6GWKMo3CLtES95Lscs1DrIxTiXznQMoASnuKAL+MsMn6w2L8sqQKBD7xpX dTuxax3Xoly289P/KK3yReko0xwZH8SdTJHsPjHmZfvWxqp8gtVffLYIa0qLa2SGkOsv cIbUW9TpVpExcgOv5oNDarXGYlr3VciHfmzZoWJlW1iIog6hzTwMMO5ZYKTAy32bwTWq yC0H39fvbOA8PpBSDi2RvIgO32dKQnQKkrWV1sBi9wX7KaZYJCjhRhac9f11cFpoY+ds sPvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495048; x=1718099848; 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=pSBLM04d3DAbKCspvBjFgiIMn9c2P954kLTi2eYOo9c=; b=Kw4qq5h4+ufuqDd6Y2B6ynDPUOglw4i7tupyq3q6WzL7/Jh9d1nBPmLTJe5+u8On7x gEBa1sfqkSXbJ63Gj/k3KLxgSD66eEMA1ECkPeHpTWK+rMto2AFJ6tN/YyLWkpekOHaA peFsGPbySePp8RPdX/fkJ9gAZpe5AAN8zzqpbBMY69v3I/gLAIRcFRtSYePRxBqSQN3A f6EOF1QZf2DRxtFFJMnSarM8exltQDh4RTqA1rblBfAnDbq0TZR4thmLYvEx1y3A8b1o 29E6DIYcuUOWJAVRzYXVDMewsTGY+BOZhwCI78r6pvpM2jKtPQdbtOOSnaQr4gLBsBZ+ P5Rg== X-Gm-Message-State: AOJu0YxEIGe3h3BXiFiTOXsfALcDhtBN7EaEWwxv4qFG91WjmenPQB1u IqWIBfB90lqGlSCti2Ftup8JO7jjNCxNaL83JP9P9pa4ufpsZlteEXc5+mm25l/6DXNXDqc2B24 r X-Received: by 2002:a05:6512:785:b0:52b:8612:edd3 with SMTP id 2adb3069b0e04-52b8958aeaemr8764573e87.30.1717495048129; Tue, 04 Jun 2024 02:57:28 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4212b838acdsm149376765e9.4.2024.06.04.02.57.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:57:27 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , Zhao Liu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 14/32] accel/kvm: Fix two lines with hard-coded tabs Date: Tue, 4 Jun 2024 11:55:50 +0200 Message-ID: <20240604095609.12285-15-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::132; envelope-from=philmd@linaro.org; helo=mail-lf1-x132.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: Peter Maydell In kvm-all.c, two lines have been accidentally indented with hard-coded tabs rather than spaces. Normalise to match the rest of the file. Signed-off-by: Peter Maydell Reviewed-by: Zhao Liu Message-ID: <20240531170952.505323-1-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- accel/kvm/kvm-all.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index c0be9f5eed..009b49de44 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -2893,7 +2893,7 @@ int kvm_convert_memory(hwaddr start, hwaddr size, bool to_private) !memory_region_is_ram_device(mr) && !memory_region_is_rom(mr) && !memory_region_is_romd(mr)) { - ret = 0; + ret = 0; } else { error_report("Convert non guest_memfd backed memory region " "(0x%"HWADDR_PRIx" ,+ 0x%"HWADDR_PRIx") to %s", @@ -2964,7 +2964,7 @@ int kvm_cpu_exec(CPUState *cpu) kvm_arch_pre_run(cpu, run); if (qatomic_read(&cpu->exit_request)) { - trace_kvm_interrupt_exit_request(); + trace_kvm_interrupt_exit_request(); /* * KVM requires us to reenter the kernel after IO exits to complete * instruction emulation. This self-signal will ensure that we From patchwork Tue Jun 4 09:55:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801390 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2312754wrw; Tue, 4 Jun 2024 02:58:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUanOHKWwuHzimHTPSxnubfDXaT15HsMJpqSb46f1prZBkwq71Xe59mdrqCHj1WGATzsR6xqUsMhWIMCq/fBBlC X-Google-Smtp-Source: AGHT+IHTHyWPfj7NFa+Y9HOPGpQGzOA2l71TcDkfIxYFX/rA1QQ5+/107H/s+1fCpWXgVdL9rXne X-Received: by 2002:a05:6214:5b89:b0:6ab:7067:6f6d with SMTP id 6a1803df08f44-6aecd7006c6mr146187636d6.56.1717495113452; Tue, 04 Jun 2024 02:58:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495113; cv=none; d=google.com; s=arc-20160816; b=FNUDF6CELUoQpCgRuf8TSXs4maK/2MLEpbfkjGXRkJ87oyAWS0Yw+lmI/9n86GvH+0 VgILZERUNRlApuFzDhDrMUb8h8tgWnyDPZJLkr60W65XMr7ALHqb5gvfPrfheqPQqROS QcjX97mKNyVi3uTv/NFCnfW8p6L5aWtoJjrLJPeQ+TiSJ4i5ROCBDCNjBTxbo7I9LWq9 /s6AWGo8d1rtLk3zCwOYHlDeiRYhOkRBsqJCIuga7xWwp61puvPywYLrUm9ssKxYDDaN kU+pZaRGo9xBNdmWbaHQVOCrIbcYXfEVUCc9CAsYsxUV0QO0DnZnuJYKGyyI+MpJGXGc Ja5w== 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=obtEpkiAsJdiWpm7zcpgW5liQ303qrBraj3NKulpnrg=; fh=Kwva4PF4MU0CAODI8dO98oDU5IqpAA4cnlOSgFn3sAk=; b=Ed27JN3YiB5N673Fmx1Jji1I4qg42u7N85GB42to4amGHNsl5fvfgZf6yaIjZ+Ojv2 VIFZ74DmPGD2a2q1cWgkXEhv9650hXtzQpNN3CXYfVJLLm/mPho7ryfPpNcquxh8Tpse EszmK7/u4fY/8zIh/Ht+o8sVMwSjtks5wdXq4bBFtoqXUV3dCuc3n+oFl6ErkRD/g29Q N6CHi0BKvawi1amI1INB2pkiiVOFnUdFTvj1XkE7gWs0x+BuLhvVgPo2x2rOLFC07B+Q 22VSxg3Xs2UXEpJ3CvExks/YZwr9GHfU7v7eeSZVWeiSemByTtiqWz6c8TwgSGsx7Z6Z Urcw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GFdAoyoy; 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-6ae4a733c39si23082776d6.68.2024.06.04.02.58.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:58:33 -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=GFdAoyoy; 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 1sEQvE-0008IN-Ti; Tue, 04 Jun 2024 05:57:40 -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 1sEQvB-00088O-GA for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:57:37 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQv9-00029I-HA for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:57:37 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-42134bb9735so29701175e9.1 for ; Tue, 04 Jun 2024 02:57:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495053; x=1718099853; 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=obtEpkiAsJdiWpm7zcpgW5liQ303qrBraj3NKulpnrg=; b=GFdAoyoylMNQ+DPpBG7JKcNmY3lHNdn28Djst9t6qFiZvtlDq31TMKz84dv9aFqDq6 EkTHHe7N0V5xddDaXzbgGhi0tyAwuQZ8gYBpyRv8WainUeecqXVHjVF6Vn3HUP9qLYdn MsiIzhNs4Ne7LU5ELTKVD1Hu0Ku0zA6frSEnheHXUpbFLecd/EqUrUJLrmZkqdsljJ5l YMgZSEYiQqhWFYyvWXCeGvT9qatJR99xiILgtFai8tmdHPMVFb+Gh1Zt7K7zNTrYWXEq 3paZgbVMp5Ue7O6VnUo7SCAC7CKbcGQMAn1jmjOr2k/vuMflCSgOif4oCqNSbtBUPA5Q zXXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495053; x=1718099853; 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=obtEpkiAsJdiWpm7zcpgW5liQ303qrBraj3NKulpnrg=; b=du6/2Yjre1hPNqDpiTPTjmAMHObpxj5wERncHAll42XxdCAPcAXePjTJqAgRRbgMo5 ICQqc4NZg1fXx5Q/dSqoui276GzNYx31ABdqX+PV3Ae50t2ONSt+wkhmyrGTuNolFuwj bmTS+90FbOGgRGev4Gni/YGQFoJETqaGrI9AVy5lxxSf0a7tWlqMOSfbgvnrby1uQs7R hd0PII4EW1241qdlMlSPTw1fAtqGc0GWr7h0+uaNIVbIS88Lvy419+eQG38FyL6+P0pk 6EjvGmHybxaf7g9j5yohqJ1r2Q9jIh6jziIox9BiISxp8qbfAygvQ6dmx1aCcTqHiFB3 byeQ== X-Gm-Message-State: AOJu0YzcuosbtAe1CuyZ14j/NXJahjS2aAL0R/ekqhPg+J9IvDarmBBP WZP7JR4Z1Ee/7GObJQUAf6YjUNAXX8ysIWyHfFjcOmZC+Q1hQdwq+ZyEPZANn0Gmc242+BnQnW7 + X-Received: by 2002:a05:600c:4e8b:b0:421:3a41:5428 with SMTP id 5b1f17b1804b1-4213a4157bcmr44589875e9.41.1717495053637; Tue, 04 Jun 2024 02:57:33 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4215447035bsm7234385e9.13.2024.06.04.02.57.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:57:33 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= Subject: [PULL 15/32] hw/core: expand on the alignment of CPUState Date: Tue, 4 Jun 2024 11:55:51 +0200 Message-ID: <20240604095609.12285-16-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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: Alex Bennée Make the relationship between CPUState, ArchCPU and cpu_env a bit clearer in the kdoc comments. Signed-off-by: Alex Bennée Reviewed-by: Pierrick Bouvier Message-ID: <20240530194250.1801701-2-alex.bennee@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index bb398e8237..be44746d24 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -391,7 +391,8 @@ struct qemu_work_item; #define CPU_UNSET_NUMA_NODE_ID -1 /** - * CPUState: + * struct CPUState - common state of one CPU core or thread. + * * @cpu_index: CPU index (informative). * @cluster_index: Identifies which cluster this CPU is in. * For boards which don't define clusters or for "loose" CPUs not assigned @@ -439,10 +440,15 @@ struct qemu_work_item; * @kvm_fetch_index: Keeps the index that we last fetched from the per-vCPU * dirty ring structure. * - * State of one CPU core or thread. + * @neg_align: The CPUState is the common part of a concrete ArchCPU + * which is allocated when an individual CPU instance is created. As + * such care is taken is ensure there is no gap between between + * CPUState and CPUArchState within ArchCPU. * - * Align, in order to match possible alignment required by CPUArchState, - * and eliminate a hole between CPUState and CPUArchState within ArchCPU. + * @neg: The architectural register state ("cpu_env") immediately follows + * CPUState in ArchCPU and is passed to TCG code. The @neg structure holds + * some common TCG CPU variables which are accessed with a negative offset + * from cpu_env. */ struct CPUState { /*< private >*/ From patchwork Tue Jun 4 09:55:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801391 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2312760wrw; Tue, 4 Jun 2024 02:58:34 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWxhU8kh0Hl7EJT9G/qnV7GhzS3OaniRxAi0+i8k4pCYvOZIQNSFDbOFbeg0zvhJtJBsOgxdMcRbBO5leA8WGYH X-Google-Smtp-Source: AGHT+IFqgsgKU4EwPS725khhFTQul2nx/I/9Z+34m8LNok7zBY7uMIRtaMdo7pTtIQ0MGoQ5eeqx X-Received: by 2002:a05:6808:1b14:b0:3d1:d472:d75c with SMTP id 5614622812f47-3d1e349d822mr16108083b6e.28.1717495114074; Tue, 04 Jun 2024 02:58:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495114; cv=none; d=google.com; s=arc-20160816; b=OCmz8SRIs4l3aT6WW5DXRL1opXB1Y6/hXH/ZAaTaYOFLX+767ioBZTLS2D4gBiPMdN D9Oeiu5moejnDTcTHzfd/m1ygOANczTgAouyeNDovTl7QJOMgoaZy/WnDZD2WqAeBHWu +XkJxfpkih/96SIm1X7DQI3jJcGg08BsOdbV6UOlD7VzteNcY/xO6a2WmjnfqVUCaMLU XvojtCdwIJhAN7n+rYqzEdxsjl6F5nYLv/HVAFJnT1K1fZdOkH6W4aHiI/Zel6h8to6Q EsZlOWUNMC22PbrHNbsYuZtwY1g7cJltWDOTtfgWvcuBRZLjNRE4IdUvIskAKXdJJTJi 018A== 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=4b/mmQIhvhV7OjyWLu/roxTepS1wlgLdQck8dHERJM8=; fh=Kwva4PF4MU0CAODI8dO98oDU5IqpAA4cnlOSgFn3sAk=; b=qyjSi/3FhKMZu2WzBQiSVaeJ1Cm2cpkubGETmoBC+gQMo+P+o3hu/EABzCr9EHx9lH dAPR3xyiDbwgiX3nAYZpOx6CpwK6CcSduuXQKQc87GiecBmg8QvLD9JsNoZFaR2huIn5 el/P8nP5dXKp9VTgfA0Go2fSTTFqvb85Z3g5tsCKuhUz/uM67p6tt2b9Vsrc4WU5Yi77 PLEamDDKcitDDtchktdFEkgw7xBei2i/TXj6lBI2K4Xu0h6eBsIlvL/kekJ5HzAZNKSy tl7oiX0OxM++K+ERy058zjP13rX3diLiIMGOldcu1frcqh46wo5vsrf4x3aLVPOLzYxb Vw+A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IKWP3YLA; 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-43ff259e65csi24169311cf.676.2024.06.04.02.58.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:58: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=IKWP3YLA; 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 1sEQvJ-0000Hn-6R; Tue, 04 Jun 2024 05:57:45 -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 1sEQvH-0008Uw-1H for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:57:43 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQvE-0002Bt-Vw for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:57:42 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-354f14bd80cso664790f8f.1 for ; Tue, 04 Jun 2024 02:57:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495059; x=1718099859; 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=4b/mmQIhvhV7OjyWLu/roxTepS1wlgLdQck8dHERJM8=; b=IKWP3YLAoGrG4UI1EE4h5oK4QxtI4sKI/cmB6RYVZayElu0fkmc8hsXRka2hdnQFKY +IKx6Si3S6dt36KPr5We+b5bdqO8wIOPSe8xuybZYl8akxnW9vxN73PPysyjGNelwpW4 WkB8yEbrJyaQMLjpn5XhDSG+4nxsQ4rQQcW3v0MTA3gGxLiDKLPSVpoJUO8JKKJvksmF GQuE/tK02XEFk0Pf+zRGN8nZwUU2+BljvRrSp0Z0+qYR29yIr6ER6EujXtMUEai/iDpN IrhWTEjX7RfyWx+fAs4PnRgM3kypFsBGTFz9dcMms705ACbWwUhzScnDU/3ThvdMaPi6 7z+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495059; x=1718099859; 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=4b/mmQIhvhV7OjyWLu/roxTepS1wlgLdQck8dHERJM8=; b=frSUFtX5eeNt105rvWCi04slqwPA3LnFC4XXpdQj+d2yzG5Lte7meQBX0npdwPNBNx uMVib5Q7AIv5m+D61YaVcgWriffH1YNSx8Yk1ebwMo1asMMCVX64CnKhvrrvybkKkpRC Q3iG+KZJVaiiW3lH49oU3DfTkYISpp6n3tsnnBDLZ2cu+lkEz1UIEZ6WC9WHwGKZGLPk Ted2QsXrBmETzU5E+P21SvArqNHmar02mKkfFERzRWjWAp0EDEJicq/g4dpbsDDQxazw fkPsWIIWk/LEKhdr3BRCmNXkuPOpTpkv/4jB8YicGdZc/WxxcdG5oZMoC7GO+fT1/os7 EWyQ== X-Gm-Message-State: AOJu0YzEgdRH+xlI0q4dAbd/vCeZPMfhIHRPx7uY0ZnvXqWSNGgTISZW 0QtQZCBHeaKcKfvJxsJ933/pCzKxTrVMQIVT52SDsHaXFTLMPbYwsgtuVhaPxIlyQqLPBQSDHK5 S X-Received: by 2002:a5d:5231:0:b0:35d:cb8b:bd2e with SMTP id ffacd0b85a97d-35e0f330f2cmr7994202f8f.67.1717495058986; Tue, 04 Jun 2024 02:57:38 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd04c0de3sm11096895f8f.9.2024.06.04.02.57.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:57:38 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= Subject: [PULL 16/32] cpu: move Qemu[Thread|Cond] setup into common code Date: Tue, 4 Jun 2024 11:55:52 +0200 Message-ID: <20240604095609.12285-17-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.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: Alex Bennée Aside from the round robin threads this is all common code. By moving the halt_cond setup we also no longer need hacks to work around the race between QOM object creation and thread creation. It is a little ugly to free stuff up for the round robin thread but better it deal with its own specialises than making the other accelerators jump through hoops. Signed-off-by: Alex Bennée Reviewed-by: Pierrick Bouvier Message-ID: <20240530194250.1801701-3-alex.bennee@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h | 4 ++++ accel/dummy-cpus.c | 3 --- accel/hvf/hvf-accel-ops.c | 4 ---- accel/kvm/kvm-accel-ops.c | 3 --- accel/tcg/tcg-accel-ops-mttcg.c | 4 ---- accel/tcg/tcg-accel-ops-rr.c | 14 +++++++------- hw/core/cpu-common.c | 5 +++++ target/i386/nvmm/nvmm-accel-ops.c | 3 --- target/i386/whpx/whpx-accel-ops.c | 3 --- 9 files changed, 16 insertions(+), 27 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index be44746d24..a2c8536943 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -404,10 +404,14 @@ struct qemu_work_item; * @tcg_cflags: Pre-computed cflags for this cpu. * @nr_cores: Number of cores within this CPU package. * @nr_threads: Number of threads within this CPU core. + * @thread: Host thread details, only live once @created is #true + * @sem: WIN32 only semaphore used only for qtest + * @thread_id: native thread id of vCPU, only live once @created is #true * @running: #true if CPU is currently running (lockless). * @has_waiter: #true if a CPU is currently waiting for the cpu_exec_end; * valid under cpu_list_lock. * @created: Indicates whether the CPU thread has been successfully created. + * @halt_cond: condition variable sleeping threads can wait on. * @interrupt_request: Indicates a pending interrupt request. * @halted: Nonzero if the CPU is in suspended state. * @stop: Indicates a pending stop request. diff --git a/accel/dummy-cpus.c b/accel/dummy-cpus.c index 20519f1ea4..f32d8c8dc3 100644 --- a/accel/dummy-cpus.c +++ b/accel/dummy-cpus.c @@ -68,9 +68,6 @@ void dummy_start_vcpu_thread(CPUState *cpu) { char thread_name[VCPU_THREAD_NAME_SIZE]; - cpu->thread = g_malloc0(sizeof(QemuThread)); - cpu->halt_cond = g_malloc0(sizeof(QemuCond)); - qemu_cond_init(cpu->halt_cond); snprintf(thread_name, VCPU_THREAD_NAME_SIZE, "CPU %d/DUMMY", cpu->cpu_index); qemu_thread_create(cpu->thread, thread_name, dummy_cpu_thread_fn, cpu, diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index 40d4187d9d..6f1e27ef46 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -463,10 +463,6 @@ static void hvf_start_vcpu_thread(CPUState *cpu) */ assert(hvf_enabled()); - cpu->thread = g_malloc0(sizeof(QemuThread)); - cpu->halt_cond = g_malloc0(sizeof(QemuCond)); - qemu_cond_init(cpu->halt_cond); - snprintf(thread_name, VCPU_THREAD_NAME_SIZE, "CPU %d/HVF", cpu->cpu_index); qemu_thread_create(cpu->thread, thread_name, hvf_cpu_thread_fn, diff --git a/accel/kvm/kvm-accel-ops.c b/accel/kvm/kvm-accel-ops.c index 94c828ac8d..c239dfc87a 100644 --- a/accel/kvm/kvm-accel-ops.c +++ b/accel/kvm/kvm-accel-ops.c @@ -66,9 +66,6 @@ static void kvm_start_vcpu_thread(CPUState *cpu) { char thread_name[VCPU_THREAD_NAME_SIZE]; - cpu->thread = g_malloc0(sizeof(QemuThread)); - cpu->halt_cond = g_malloc0(sizeof(QemuCond)); - qemu_cond_init(cpu->halt_cond); snprintf(thread_name, VCPU_THREAD_NAME_SIZE, "CPU %d/KVM", cpu->cpu_index); qemu_thread_create(cpu->thread, thread_name, kvm_vcpu_thread_fn, diff --git a/accel/tcg/tcg-accel-ops-mttcg.c b/accel/tcg/tcg-accel-ops-mttcg.c index c552b45b8e..49814ec4af 100644 --- a/accel/tcg/tcg-accel-ops-mttcg.c +++ b/accel/tcg/tcg-accel-ops-mttcg.c @@ -137,10 +137,6 @@ void mttcg_start_vcpu_thread(CPUState *cpu) g_assert(tcg_enabled()); tcg_cpu_init_cflags(cpu, current_machine->smp.max_cpus > 1); - cpu->thread = g_new0(QemuThread, 1); - cpu->halt_cond = g_malloc0(sizeof(QemuCond)); - qemu_cond_init(cpu->halt_cond); - /* create a thread per vCPU with TCG (MTTCG) */ snprintf(thread_name, VCPU_THREAD_NAME_SIZE, "CPU %d/TCG", cpu->cpu_index); diff --git a/accel/tcg/tcg-accel-ops-rr.c b/accel/tcg/tcg-accel-ops-rr.c index 894e73e52c..84c36c1450 100644 --- a/accel/tcg/tcg-accel-ops-rr.c +++ b/accel/tcg/tcg-accel-ops-rr.c @@ -317,22 +317,22 @@ void rr_start_vcpu_thread(CPUState *cpu) tcg_cpu_init_cflags(cpu, false); if (!single_tcg_cpu_thread) { - cpu->thread = g_new0(QemuThread, 1); - cpu->halt_cond = g_new0(QemuCond, 1); - qemu_cond_init(cpu->halt_cond); + single_tcg_halt_cond = cpu->halt_cond; + single_tcg_cpu_thread = cpu->thread; /* share a single thread for all cpus with TCG */ snprintf(thread_name, VCPU_THREAD_NAME_SIZE, "ALL CPUs/TCG"); qemu_thread_create(cpu->thread, thread_name, rr_cpu_thread_fn, cpu, QEMU_THREAD_JOINABLE); - - single_tcg_halt_cond = cpu->halt_cond; - single_tcg_cpu_thread = cpu->thread; } else { - /* we share the thread */ + /* we share the thread, dump spare data */ + g_free(cpu->thread); + qemu_cond_destroy(cpu->halt_cond); cpu->thread = single_tcg_cpu_thread; cpu->halt_cond = single_tcg_halt_cond; + + /* copy the stuff done at start of rr_cpu_thread_fn */ cpu->thread_id = first_cpu->thread_id; cpu->neg.can_do_io = 1; cpu->created = true; diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index 0f0a247f56..6cfc01593a 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -261,6 +261,11 @@ static void cpu_common_initfn(Object *obj) cpu->nr_threads = 1; cpu->cflags_next_tb = -1; + /* allocate storage for thread info, initialise condition variables */ + cpu->thread = g_new0(QemuThread, 1); + cpu->halt_cond = g_new0(QemuCond, 1); + qemu_cond_init(cpu->halt_cond); + qemu_mutex_init(&cpu->work_mutex); qemu_lockcnt_init(&cpu->in_ioctl_lock); QSIMPLEQ_INIT(&cpu->work_list); diff --git a/target/i386/nvmm/nvmm-accel-ops.c b/target/i386/nvmm/nvmm-accel-ops.c index 6b2bfd9b9c..0ba31201e2 100644 --- a/target/i386/nvmm/nvmm-accel-ops.c +++ b/target/i386/nvmm/nvmm-accel-ops.c @@ -64,9 +64,6 @@ static void nvmm_start_vcpu_thread(CPUState *cpu) { char thread_name[VCPU_THREAD_NAME_SIZE]; - cpu->thread = g_new0(QemuThread, 1); - cpu->halt_cond = g_new0(QemuCond, 1); - qemu_cond_init(cpu->halt_cond); snprintf(thread_name, VCPU_THREAD_NAME_SIZE, "CPU %d/NVMM", cpu->cpu_index); qemu_thread_create(cpu->thread, thread_name, qemu_nvmm_cpu_thread_fn, diff --git a/target/i386/whpx/whpx-accel-ops.c b/target/i386/whpx/whpx-accel-ops.c index 189ae0f140..1a2b4e1c43 100644 --- a/target/i386/whpx/whpx-accel-ops.c +++ b/target/i386/whpx/whpx-accel-ops.c @@ -64,9 +64,6 @@ static void whpx_start_vcpu_thread(CPUState *cpu) { char thread_name[VCPU_THREAD_NAME_SIZE]; - cpu->thread = g_new0(QemuThread, 1); - cpu->halt_cond = g_new0(QemuCond, 1); - qemu_cond_init(cpu->halt_cond); snprintf(thread_name, VCPU_THREAD_NAME_SIZE, "CPU %d/WHPX", cpu->cpu_index); qemu_thread_create(cpu->thread, thread_name, whpx_cpu_thread_fn, From patchwork Tue Jun 4 09:55:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801397 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2313072wrw; Tue, 4 Jun 2024 02:59:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVnptrjPA4cMtJtcVrSZUgTVNqQobwDaaJKfUUKRIkrLYM67232KKBrscBe2wEFQCqfgjkagxqJpj99FQRPPr9o X-Google-Smtp-Source: AGHT+IFCAdHjNzxOQhTGTLRFPEWYYUOr1j/CEK5QDsyl8vv21uT8ABsVV8xRoikyaKXwzY8cpO4J X-Received: by 2002:a25:e0cf:0:b0:dd0:76e:d630 with SMTP id 3f1490d57ef6-dfa73ddb7d9mr11156513276.53.1717495173754; Tue, 04 Jun 2024 02:59:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495173; cv=none; d=google.com; s=arc-20160816; b=ZlPEXxEjzJV849QqohtA9vfhgfq6dAK0Z2SV6mevojvmUq1JTNDNTT+lAxvDYIrwd/ 4QB/3Hw6NtxCPWKYhjegWED92elhzU7/cE6WxewUigz/VGX2TiXRDMspUr+1n5uJy2uN Zox0IeomWoONjzJ1xGNM8HhGyrN0dh90jC1To/PIkvheytR2eOFiC+tC7HfYSJWm/kg0 c6/9sbcq4dzrh5+fZNibCqDp6dM0jZWjDa9wYvJmEbx1UOoBKkvsnf8T+KNG/AGvho9l 1eeY5v3m4sWANUovpnP2qCpsNGqNiedr+6/hdOlx9T7nzifgrZ8LJfF07KnsJtpnvNL2 PORQ== 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=Maqg614wB6IQJrQoZvf0lrAnLMpTuuWUZ3NE8tvuj7U=; fh=Kwva4PF4MU0CAODI8dO98oDU5IqpAA4cnlOSgFn3sAk=; b=oKoqe9LKIS2+2u852OiQxcQKkD7RGa6wBJLk+Oks9bK3nUxtAQX3YYfEhlc3DTEYjL w7zsMOBjeQf4i5pMjhidfIKHOlA+SPWBMaCiElFAiUH8g78XOredaF/1JBxi0zCVfX9O gidSI9uz9+dQBlF8yCbKOzbGwUuU1g5A7rIlgImHyto9a+VAMXdp+RaEfDTsKSRSwbuN 49zwXjkA9QkradLBpn+H5gvqE0mqvY7HpfFFyCTDo5r7W5YDlWso/K4BqaWiHByTQrzF kMe3QMzD/DK2fjgbf1cQJB6s79Ja93ZCKPiCxH8CrgrJZuKHgjwmTqZDmMm1jGtQK3wu 9QsA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SuOeEavA; 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-4401ad17e33si15802501cf.397.2024.06.04.02.59.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:59:33 -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=SuOeEavA; 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 1sEQvN-0000if-5L; Tue, 04 Jun 2024 05:57:49 -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 1sEQvM-0000aq-62 for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:57:48 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQvK-0002GC-Id for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:57:47 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-354f14bd80cso664836f8f.1 for ; Tue, 04 Jun 2024 02:57:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495064; x=1718099864; 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=Maqg614wB6IQJrQoZvf0lrAnLMpTuuWUZ3NE8tvuj7U=; b=SuOeEavAjG+sdjApvbmzVNN+BA1o6s+ZqildnXCUUgGwJA5UGE3sNbskVLIbMXaNcz BfEXHv8Far743LZ/viGzDGiLdju6QIaLBFYcecBZxFSTiN+qgFYAl0cz+BgPX4AbQZ/0 MrzLqwhihHHUo3elpHfYDzueMycsI4S84yOvfMU15Bt6uZw68erdgVeH/5N0/YbrRNTi //r2uoE3p0C6SlP6ZCcOv25/5F41JxBw0oinEN0I++aXZB+sQzn2gZFgd8KXzdBcZXjw 6XQbqRNqNmzpkV8BnplgsrPEoRG69tInLGUprYG8fzrgmjgEk1T//MJ+wnN//wzncSZb XT9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495064; x=1718099864; 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=Maqg614wB6IQJrQoZvf0lrAnLMpTuuWUZ3NE8tvuj7U=; b=a9foHtwAT+xAoGp8J/cYCZo/IFkHiImvbxgBMpiAm/Zv2Sj63O710wblTbg0d2XqvQ i3tf0H1+hIQYm570W8Ni2ODmXMcl8kwpyx3yCUwo7XATVAbnfAVWGzygjE3SVVQLbe4Z fO7XieR6dRY0xCDVaWyruJ3YkrcinaVBG3ESWgjwkozz0qqoJfyDhYSCKWLburIRXvHs D+gAlZr+ncMndHNYJT1fLVB8nnPbBbvtv8AWRygCaKFG2VF9BzoxDBQMWsiFKVDUFFI0 tLhwb4RBkSDgMrFhW/yn77FFUWxVZh8DuG8GsmSjxKEBWlNLhyOopJyNqp7J5GiAlwEA snag== X-Gm-Message-State: AOJu0YzfGjPosnQbjHzCdxw4/e/CksER0wmX8EfDViW4Yz/2hyEaAHFK pOqpb3C1y7R0FmmgQjNQI8UaFYQMdafgZ6JYpvs6eFVqfxjugy8SEFwnQupauTnQo2+YhE4ocBz Q X-Received: by 2002:adf:e2c2:0:b0:357:ff92:ab06 with SMTP id ffacd0b85a97d-35e0f25b2e3mr8934642f8f.2.1717495064467; Tue, 04 Jun 2024 02:57:44 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd04c0f57sm11125532f8f.12.2024.06.04.02.57.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:57:44 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= Subject: [PULL 17/32] cpu-target: don't set cpu->thread_id to bogus value Date: Tue, 4 Jun 2024 11:55:53 +0200 Message-ID: <20240604095609.12285-18-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.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: Alex Bennée The thread_id isn't valid until the threads are created. There is no point setting it here. The only thing that cares about the thread_id is qmp_query_cpus_fast. Signed-off-by: Alex Bennée Reviewed-by: Pierrick Bouvier Message-ID: <20240530194250.1801701-4-alex.bennee@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- cpu-target.c | 1 - 1 file changed, 1 deletion(-) diff --git a/cpu-target.c b/cpu-target.c index 5af120e8aa..499facf774 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -241,7 +241,6 @@ void cpu_exec_initfn(CPUState *cpu) cpu->num_ases = 0; #ifndef CONFIG_USER_ONLY - cpu->thread_id = qemu_get_thread_id(); cpu->memory = get_system_memory(); object_ref(OBJECT(cpu->memory)); #endif From patchwork Tue Jun 4 09:55:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801387 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2312667wrw; Tue, 4 Jun 2024 02:58:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVAT2Oq6/8qZZ8fPFcXfj5s65/UFBwKyfaM/rWhRwGcij+kC2r8AzEBww5dCh5p4+NjSmAti6h15FFaxSpWPM1c X-Google-Smtp-Source: AGHT+IFBbUJeP+uR38D407AjFJZxtCE43WVrOUEJWxL3lZr0ikjCZrbZodFTuQBCspUrLe3sdkgd X-Received: by 2002:a05:6214:469e:b0:6af:5500:734d with SMTP id 6a1803df08f44-6af550073d5mr100011066d6.17.1717495095460; Tue, 04 Jun 2024 02:58:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495095; cv=none; d=google.com; s=arc-20160816; b=IxjXebrWEQK/6bRG9O0xbbxVB1NM794eXBpyKns6IK9Nsp1MBGPbfWq1xkl+RuUgNf hDDxt7s61nM/uR71m3vkbWH1LYUyPaXWfYDHyWETVUsRsUrRp3bpx099iMePnvwILRiD jfJDHJiNmRC31Xp6cQV55+Yosc0i3S85+nU8ZoHjErEvmXshajcmDarLKZyzxAocNr+r 1hK5MzowHpNVWwqpS8O+epoUOPvIbWzSaeQPMKcQaECTHs4NuAzkhNrJQED+VX8wQSlJ sSRupaHxc3xx+JwhKQsMHrI+wpNkqxfg0h6sbNx+N3RX7WT7HAnwnCrsMsDCw6g/DS5D l4JQ== 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=xZ3BsgSsDpVAMiUE0ZHS//M9sgcI8U2Pt7eSzUE/3vA=; fh=Kwva4PF4MU0CAODI8dO98oDU5IqpAA4cnlOSgFn3sAk=; b=Ba42/Q0dQlsT9HaMf/EnKlqb+m0r7eWkVj+HHRsWOLEdBXK081McWc3O6itHnPt1cj D/TSjEAQE9Jt+NWJR0ytvNGv01QpqJewbmxrOe807hjgZAy/9gLOZ0JhiyeH7Pq5sJ21 /lS9B4/3wofSRHXyMmJEOiSYpquBcUylnzN1m+JbiRc3ABqUIcO9aZU6I9xaThmf7UAw 7jak0lu0tYwecYjJapHdLXy1/6zYN2w4NKeo2Iv3PLiWXr69IO8NYb7IKl0NdtCStIzD nvw06FUPZ4GUGHMvlNNW3WiegVWR1mQo6HV0AF6gxtbj5+ORPJpB3BpoTVID5SvKcHXA 8Idw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gwZLW4ZY; 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-6ae4b438777si3876506d6.544.2024.06.04.02.58.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:58:15 -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=gwZLW4ZY; 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 1sEQvT-0001Dd-GR; Tue, 04 Jun 2024 05:57:55 -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 1sEQvQ-00018G-TI for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:57:52 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQvP-0002Gu-AX for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:57:52 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-35e4d6f7c5cso2923564f8f.2 for ; Tue, 04 Jun 2024 02:57:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495069; x=1718099869; 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=xZ3BsgSsDpVAMiUE0ZHS//M9sgcI8U2Pt7eSzUE/3vA=; b=gwZLW4ZYcfY0bgwBnD2xOM09lHUAw93F9FnFgr6LEsV7kze+sX/B0ZL4EpwgXD03Ad UMzB0y7GFTzKeZO53HeNudYyGSfMUMj3ATb2QjAmIHE1H+LTlR6vtD1pGrRwUW6s4afC PHdhuqmwq5R/GRq0xuw+20f+fAVj3n/VhSJG8sfMFZdNUV9+pA3h1K04nM5ezYmG+3FZ KZ+KO4KmujOzdSrK+wXQnDb0sMIAm9aCyuaPllc6OBL9VPYe7IHJLyyBzDZAtd8Wh2+p j5Vsti7W5kFVq+ALi5vDJCTDUom6/EyeCj+pjRso9zWkSHWSXvibg80YEVJcUvzCCXmm zb8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495069; x=1718099869; 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=xZ3BsgSsDpVAMiUE0ZHS//M9sgcI8U2Pt7eSzUE/3vA=; b=YaBGt84qPOfZ1/sUCeVLkPZ2sMry069SAuQtD5rpSeY83YTEJU+pHB3ODycZX0wWD4 D4AlMZues84UGwsWqxcHUcJUnA24pcBdJvg7FpLlb1eVTNPGHAMMb4D571Lnki6HE0og HTfpvfPGUhK7AK9MnevVJ36cjtxlmqTghKtmLm26e6JTXQ0j75JKiO4kZxyQbsq9f7Aj zaxHaHcNxWwMopc5rKKuroWZ/YRqjJdJxlfK/2z7a0GeffTnHjjrW4cyKRPlxr4NFcNe Za1Vi9X1+ss6DwXI5Kqhyn0sS7A9lZBis0msvLL6VOogm/zzbnFDKItV8uRrvRkFHG3i wycA== X-Gm-Message-State: AOJu0Yx1SGwi9Qly9xoxdXfococv9gqMHmAk7zJWiUYZAvRqxzYRWPLo GDkEG1NlaKKeFzNgtaMWCqVA2YH/KltVdow40o2sgY7cDt07x906UBDa+O2+9Bz80kKHjAz80NK c X-Received: by 2002:a5d:4647:0:b0:359:b737:68d9 with SMTP id ffacd0b85a97d-35e0f25a5c3mr8371812f8f.12.1717495069692; Tue, 04 Jun 2024 02:57:49 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd04da182sm10991675f8f.54.2024.06.04.02.57.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:57:49 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= Subject: [PULL 18/32] plugins: remove special casing for cpu->realized Date: Tue, 4 Jun 2024 11:55:54 +0200 Message-ID: <20240604095609.12285-19-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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: Alex Bennée Now the condition variable is initialised early on we don't need to go through hoops to avoid calling async_run_on_cpu. Signed-off-by: Alex Bennée Reviewed-by: Pierrick Bouvier Message-ID: <20240530194250.1801701-5-alex.bennee@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- plugins/core.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/plugins/core.c b/plugins/core.c index 0726bc7f25..badede28cf 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -65,11 +65,7 @@ static void plugin_cpu_update__locked(gpointer k, gpointer v, gpointer udata) CPUState *cpu = container_of(k, CPUState, cpu_index); run_on_cpu_data mask = RUN_ON_CPU_HOST_ULONG(*plugin.mask); - if (DEVICE(cpu)->realized) { - async_run_on_cpu(cpu, plugin_cpu_update__async, mask); - } else { - plugin_cpu_update__async(cpu, mask); - } + async_run_on_cpu(cpu, plugin_cpu_update__async, mask); } void plugin_unregister_cb__locked(struct qemu_plugin_ctx *ctx, From patchwork Tue Jun 4 09:55:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801392 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2312803wrw; Tue, 4 Jun 2024 02:58:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWQyKDhw0kSDm8DO53bW2KF0SU/fGIQZgPdvLIHyu4ZOQzwULd+bL5lnbViuUE9736XjmRLxsphPvsQA8w5Bm3T X-Google-Smtp-Source: AGHT+IHdEJXB8yUwRM1h15+IdDrVmfnPNy6sZxfGFZ8UzRasskhyy5n3p0dE/97ICFESrEgrBiuU X-Received: by 2002:a05:6102:1809:b0:47c:2b74:2903 with SMTP id ada2fe7eead31-48bc23b259dmr10436106137.22.1717495121986; Tue, 04 Jun 2024 02:58:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495121; cv=none; d=google.com; s=arc-20160816; b=hmsH2kupcQgbW8mDcK3OvONyGkg0uyuCxwPenY8VRmJEyseDXcbzPBd6Q+zF5zd3j2 swdf+BbSZ31Wf5t4HoJjkLMWCA2Dxflx1SjUn3+dWJ0AnZSi+qSg5u/4g54CYleHgwq7 o0uXMfdT9jm96yv49UGvTcp1PHW6f/ylUCK9s2tsnHHUQzbrKgiw40d4XEzOR7ZWON1T NXu2qKSdJ8Zc3xpXRnX8mA8WGKaXm3mHiEIbxe+8ZG+c9EQw3pAWBqyS+BTZjiDISf01 qTn0B8CsGNahkyqxraGWCb3+3oSZ6pGKofXhIy6InjAqZKa+UnW8NkBTFkEUycY6lQK2 WZsQ== 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=aye1K/Rd4o81X/8PhiFbSTR8xpOCjIohLrumKVTvmK4=; fh=Kwva4PF4MU0CAODI8dO98oDU5IqpAA4cnlOSgFn3sAk=; b=aS3SnBzcNAjXZmvzb0N94LUvO6h4ge2tZ5IzQNwjnk+e+Fg0GE/ntmk1ku9q3fXLqr YyuYSvhn9KhUfuFtZD82wsvJ3X0oPYIxt47sEX8tVsj02tO4iawfZtVnHyr9Na+gSxlx reC95R9L9KBaIdjPWuV7LtnV7dR98w3jrJ6IC9Ajy8aV4POL9nLVw6Ds6GPhltADaUQ8 HA7aXyZAL4YetR5NkOPSsvG0XCwY6H4oDrgglTnH71ENH0IZDLZEqR501Fo6pR9Joahk Iiad4V2Bppr3EzKM9EpaUxvQntpIVzwBI8llatE6pdMwBEjDH3ILEhkCWwCxDvqvz56r Nliw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Nzb4Zdns; 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-7951ed69802si16617385a.323.2024.06.04.02.58.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:58:41 -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=Nzb4Zdns; 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 1sEQvh-0001wo-0O; Tue, 04 Jun 2024 05:58:09 -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 1sEQvW-0001Sx-8y for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:57:59 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQvU-0002H4-La for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:57:58 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-42134bb9735so29704055e9.1 for ; Tue, 04 Jun 2024 02:57:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495075; x=1718099875; 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=aye1K/Rd4o81X/8PhiFbSTR8xpOCjIohLrumKVTvmK4=; b=Nzb4Zdns0rmVXzwrbPLG2/nJmXMbfxA+mYgr0GvxlzqBdY9c7kOm6/tA9/oQH+0a34 CP1uCPOq5iaSz42n3JagGZBQ8s4HnojaqV/kRSzbHdo5E4iw7DXSC8FTkJuEaJIozP6O oZPRT1rpaXFdaM/FEfulCPwLijPcDqskU8Zybb9smRJwUW4zuT7TUzaSLK2wM2Wzffon YjupyKrZJnoPMj+gms+wcil3hUULi/fXOotOnZDTIFpFlNTSoBJgHU0z89Dfn0fzeUOa rHHha1uZ4zqs8vxFMZV5Qt6KPW53sGNfGPzXiHzvyjQTMRH5CIH18sOBuEDNEGEJhYAU 5JPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495075; x=1718099875; 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=aye1K/Rd4o81X/8PhiFbSTR8xpOCjIohLrumKVTvmK4=; b=M4wYdWg+EN8cp0kKVRYBgHbp0DvabMSIew3RX+a4yN8zggQ7nS6C05lciby9AwmasC 7AG08Sth79OF1ZGRQhckQEbkzn3LLSRjF3DjbtilxtzoevthlPu76h4JD5f2UrdNx344 Qi3PmOd7/fgBwJCWd6+KD3LsRVNPQslY6ta1vQ6M8QemMbi2vm2Zz3lmaVuvWrT2XLfQ /Cwwi0I/i+BM5Qn+aH1RQCbFWyaSk2NQQJtAmIgaEeAUUrsKuroZAZzgd/bNPCWicikc FZg6Z/WPRrVcGKsNRxEEfpB7e+FNADd6h3EdvxSwJ6m1+tKa66v5A/lyf+zmmekuaWUe Hf4g== X-Gm-Message-State: AOJu0YzS2ul7KREjOEnO/h3SRePMkQV9UTv2X7E+6gLC/i+AKjLBseAq /NYQGpWhrlJw0F1Ke/6jzZPiVC9DXoaxlgTElofFP/iwGMjVIIpFGXBigtWmKbrIKAWCESI3XkL 8 X-Received: by 2002:a05:600c:1d1a:b0:41a:1b3f:b465 with SMTP id 5b1f17b1804b1-4212e0ae724mr95394855e9.26.1717495074888; Tue, 04 Jun 2024 02:57:54 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-421535bc543sm8948085e9.43.2024.06.04.02.57.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:57:54 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= Subject: [PULL 19/32] core/cpu-common: initialise plugin state before thread creation Date: Tue, 4 Jun 2024 11:55:55 +0200 Message-ID: <20240604095609.12285-20-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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: Alex Bennée Originally I tried to move where vCPU thread initialisation to later in realize. However pulling that thread (sic) got gnarly really quickly. It turns out some steps of CPU realization need values that can only be determined from the running vCPU thread. However having moved enough out of the thread creation we can now queue work before the thread starts (at least for TCG guests) and avoid the race between vcpu_init and other vcpu states a plugin might subscribe to. Signed-off-by: Alex Bennée Reviewed-by: Pierrick Bouvier Message-ID: <20240530194250.1801701-6-alex.bennee@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- hw/core/cpu-common.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index 6cfc01593a..bf1a7b8892 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -222,14 +222,6 @@ static void cpu_common_realizefn(DeviceState *dev, Error **errp) cpu_resume(cpu); } - /* Plugin initialization must wait until the cpu start executing code */ -#ifdef CONFIG_PLUGIN - if (tcg_enabled()) { - cpu->plugin_state = qemu_plugin_create_vcpu_state(); - async_run_on_cpu(cpu, qemu_plugin_vcpu_init__async, RUN_ON_CPU_NULL); - } -#endif - /* NOTE: latest generic point where the cpu is fully realized */ } @@ -273,6 +265,18 @@ static void cpu_common_initfn(Object *obj) QTAILQ_INIT(&cpu->watchpoints); cpu_exec_initfn(cpu); + + /* + * Plugin initialization must wait until the cpu start executing + * code, but we must queue this work before the threads are + * created to ensure we don't race. + */ +#ifdef CONFIG_PLUGIN + if (tcg_enabled()) { + cpu->plugin_state = qemu_plugin_create_vcpu_state(); + async_run_on_cpu(cpu, qemu_plugin_vcpu_init__async, RUN_ON_CPU_NULL); + } +#endif } static void cpu_common_finalize(Object *obj) From patchwork Tue Jun 4 09:55:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801395 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2312995wrw; Tue, 4 Jun 2024 02:59:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVRY8VxBOS6Vpwe0H+US5IqJev06OAQ/wwK9Cf2LaWLz+OYqsEfraU3JKrRJdxT+byi6yMBmTZE2ddJtTC0lG8U X-Google-Smtp-Source: AGHT+IG8/Zz04eTfa2Bz6I/tkLW4gHxw/UM8mhANaPgVq+h2VHvRBEgxQhwoH6k3/cetaBCjQCIM X-Received: by 2002:a05:622a:20b:b0:43a:bd92:6ad4 with SMTP id d75a77b69052e-43ff52adefbmr149460171cf.46.1717495161233; Tue, 04 Jun 2024 02:59:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495161; cv=none; d=google.com; s=arc-20160816; b=hk510P0XlY5vVKNCetRUDDxxrmLscSjsXm5Z2MnEk16leXyaqbvZw+jMTzbf5gUAsw eJfNPvWUmedVYAeYcLFAunregGvBJN7qZDgxZ+3occ9aEAwP6D7OxYisfQ/upKRBvDwr 7f2O5bZZlpws9Tk1q1ziikO4tnWhxf0ympCLVNVLz0tPbEM9sJUKdIM/lDok0uvTDbER iekDFS1izOpCNp3E3Gf3SuZ/XWW+aOb/5T0JWVeiyVo/6GqpI7VMBAz0B0LHjyXtm3yZ KjVlb3L5LHAaBFpwenZ+52Ppflw54p5UwQXiGG0B72JusH1/SCbJt+5HbIL1T6Tt+kc8 qNpg== 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=KhtO+b8xKpbz5dyKFVe313y98g7MQZe0qAfemmQJG2o=; fh=zTr0rAGweEb0EHWiTTjSvV3xEc3sI22TPSmktQnMYJI=; b=kHSmTFMOAFc6y9jF6ZzCWIdFVwx9pLz5VGit0zXQWia9rfxa8Ewc2ZvDzSyiFpPFih Ek6TTT3o1p2tpa1eNIdXbOEi0Y5IbaEtkwhNxEpSaPGyDcRe9YSO63ek/arSwsPjGeJy kQvG2xTJwKVv6pnH0z6E6LWV9lLOrQ5YcTsA2seb6GwRnOsUepVnrNLz8BoQyxQp7YPP ZlcRqZWAsVpFSLKt3dqArvgZtn9BOlDWTEFCgGJ8C0hilKRGt7YUX7f+mGppaA3yK2zD MKEV8/FVnsZLMeGP6fLbiQO/vY1GJMFth7kJR65jcptt08HgN/FBPAkC19Bm5jAvqyCn vrng==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Ny/YqwUT"; 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-43ff23dbd76si103141031cf.195.2024.06.04.02.59.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:59:21 -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="Ny/YqwUT"; 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 1sEQvk-0002SO-WC; Tue, 04 Jun 2024 05:58:13 -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 1sEQvc-0001sq-Kx for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:58:06 -0400 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQva-0002Hh-UZ for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:58:04 -0400 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2eabd22d3f4so8443741fa.1 for ; Tue, 04 Jun 2024 02:58:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495080; x=1718099880; 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=KhtO+b8xKpbz5dyKFVe313y98g7MQZe0qAfemmQJG2o=; b=Ny/YqwUT/L2YSs78/vGsJKV1vSBtQ5AmMqhJu9gQsaScoWSV8s3+ru2LQtsiaVqCMJ NuiC1xsisspQj/irZv94ZfcVo2v5/IcaSXmJEVkWHmMA7CHVLJu0pH2IWWcoL6mqLYLb LTWRvKnNNDW4Jx0VKxG+H46ZcDPTKv4RskdU+wEtZpipAeZSf3dUbM/0QDUfxrlQZtLa VkZaQLT3HAKHxq/sdqwEJZYTKW+pmg8KJ3KFTmU0OuwStQypY1yj1NpYOjOMW5tHgvrI qnNEguq3Q1INFBqRVDYpmDTolaQvQf7YdyeMnd+AByGv5NW1scWmAFf6V+cgjzZEw5H/ k4Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495080; x=1718099880; 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=KhtO+b8xKpbz5dyKFVe313y98g7MQZe0qAfemmQJG2o=; b=wPer/ULnyxr3yGF+8CHX/jm/k1zjsdYHtzqOBZJ+0BiIx7bTo1M8Z4T72CEDJD5FQx xjvATgnzf6VWk539b8TcfpI7FdL+HJ/32nTqxFSfqd/nn1RnD4FtH25wvwrOTyNdwmBH slPZ6fq3cM0VsLhPnvIwoffhW9qLwRusvdPvWrheJbCfjlPnRikqU1XL6gKoJOGmv+Zq HtTiVX3Vf2XUfZ3HZYiuCdy4aRp1fXr2XXxKAJ/gl1hq5IotWXZfrpoLPW62Xuk3Twr+ 0Ic/s7GE5hKFtt20VuQN7SZ9i5pdaZmoWqritg0VJzq4rXqtrxao1Hh5oN++nDos6OPw 8H+g== X-Gm-Message-State: AOJu0YztetSL4GfdncSHKMLMNzpJLCldI0ATD8bM1blvTrgBeLIKFYJT REKemd2XQZygNnFNK4jyOxevIjPMeoOHVSQzh4OR9wKEtBAN0coOKz1zKAIeNqPY1y84nTnLkVG 9 X-Received: by 2002:a2e:994b:0:b0:2ea:7e5b:98db with SMTP id 38308e7fff4ca-2ea951f9657mr71594191fa.51.1717495080415; Tue, 04 Jun 2024 02:58:00 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd062ec39sm11105957f8f.89.2024.06.04.02.57.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:58:00 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Edgar E. Iglesias" , Stefano Stabellini , David Hildenbrand , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 20/32] xen: Add xen_mr_is_memory() Date: Tue, 4 Jun 2024 11:55:56 +0200 Message-ID: <20240604095609.12285-21-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::232; envelope-from=philmd@linaro.org; helo=mail-lj1-x232.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: "Edgar E. Iglesias" Add xen_mr_is_memory() to abstract away tests for the xen_memory MR. No functional changes. Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini Acked-by: David Hildenbrand Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240529140739.1387692-4-edgar.iglesias@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/xen.h | 1 + hw/xen/xen-hvm-common.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/sysemu/xen.h b/include/sysemu/xen.h index 754ec2e6cb..3445888e39 100644 --- a/include/sysemu/xen.h +++ b/include/sysemu/xen.h @@ -49,4 +49,5 @@ static inline void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, #endif /* CONFIG_XEN_IS_POSSIBLE */ +bool xen_mr_is_memory(MemoryRegion *mr); #endif diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm-common.c index 2d1b032121..a0a0252da0 100644 --- a/hw/xen/xen-hvm-common.c +++ b/hw/xen/xen-hvm-common.c @@ -12,6 +12,12 @@ MemoryRegion xen_memory; +/* Check for xen memory. */ +bool xen_mr_is_memory(MemoryRegion *mr) +{ + return mr == &xen_memory; +} + void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, MemoryRegion *mr, Error **errp) { @@ -28,7 +34,7 @@ void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, MemoryRegion *mr, return; } - if (mr == &xen_memory) { + if (xen_mr_is_memory(mr)) { return; } @@ -55,7 +61,7 @@ static void xen_set_memory(struct MemoryListener *listener, { XenIOState *state = container_of(listener, XenIOState, memory_listener); - if (section->mr == &xen_memory) { + if (xen_mr_is_memory(section->mr)) { return; } else { if (add) { From patchwork Tue Jun 4 09:55:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801396 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2313019wrw; Tue, 4 Jun 2024 02:59:26 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUhyRd95QfpZbN7GZDgC0AaqVGgvyqeQitJct/zy2tGg4f0gHREBssOKmLvhpfb6ctvpkVlf89rsCIRVI+Zfmcn X-Google-Smtp-Source: AGHT+IGPBG1Q65gVYH94W0vZ7+S/SiDI6RotZfJREtP5f7Omkyo5aU/PTwk1QT5oQ5TlYgqwQpuK X-Received: by 2002:a05:620a:3602:b0:793:1013:8773 with SMTP id af79cd13be357-794f5ed08d5mr1063883485a.52.1717495165979; Tue, 04 Jun 2024 02:59:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495165; cv=none; d=google.com; s=arc-20160816; b=dBys+J6R02HBAp+XElEQpSvTCGU/7/wWf4+FZvOWwJwBFJQa5wEE3/7IGaLfWTgaIZ txFpCzhMCqbBuAujVpEYYrWoRj7DpoRLbVgDEaJIhF9MYJvzrANXwfjVkBMN82mMbkAt GvBq9yQXkwLf2XSUb9PUCwfwjNa9Q8lLN954E/jsQGLeUcCGZb8cRj/NhqpHuUsk8r+T AybMLKdVV3p6pE4c8QllUWs0m+5b4YjY96ro5rLgHw+1gMA4B+kqJlXS2yFlGtPZMWla /Mjrno3MNdbiUtFU0MQYlySyZt4s2uMgD+QldacRMMUGYcR97QGCgHhuMI7FKOQnuK6E 6Ukg== 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=EzcgxKBZLi25ReeoipJxRQhlgzmQ34yT5acRrJVoGcE=; fh=zTr0rAGweEb0EHWiTTjSvV3xEc3sI22TPSmktQnMYJI=; b=B7WEz2u5kRpQyM7PWfzuzFAiaDgR+wgRDJ8JXUQu9S5K6n8tdpRcE/9Bc9lq1Ydw/p 7Teq4S4CIgbEjkxde4i+bU/GT0POutKI4O14WmFaREb0LrsqfoZXuIPypYcNy8fBXNzM 1aW1UjLgFyEkOl8fhEIJ/mlTLl33PX7HFRkTalUr2jyRyC8k9tpeLCTBkEGwk9c69Bpb RgVHagIIV7MMKFKFaLeZBdk3q189n7TKOTA3xPiIjO7f5XaOeP4YLcWVVWpLBxbqMHos nKOLzpb2KJUO7sVxdl41y/9He3uVxxnFf4aUge85YflGrXjjYNa9p9IpISDKKx+eZSib NA8A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=t+ZvpSx6; 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-794f32a5afcsi1030129785a.632.2024.06.04.02.59.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:59:25 -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=t+ZvpSx6; 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 1sEQvk-0002Ae-EC; Tue, 04 Jun 2024 05:58:12 -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 1sEQvh-0001yA-5R for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:58:09 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQvf-0002IA-IJ for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:58:08 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-35dc1d8867eso4586640f8f.0 for ; Tue, 04 Jun 2024 02:58:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495086; x=1718099886; 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=EzcgxKBZLi25ReeoipJxRQhlgzmQ34yT5acRrJVoGcE=; b=t+ZvpSx6qgJu3ED/DV2fWT0biIqpcOuJhlQgafd6ojqnMkClXtMmVvRkta4mqKjMk9 f3Pemt9qzscPdMJNIlAVJ6oi1xY0yaxoOrZfldjT1mp3BIX4z7S02ggpi0ngzX8pQAHK oYvpYxYa673LPP9uudfQrLJ8Qp9yJqWKPoMqs1bc9N8E+1zshwR86cVVuqH8PnPO+Qrr IiMzNMVaQYMqBzbs6NpQIVe9LoBNCE8iKd9GJynXdFisQbf+lCzf0jFqRg/XXBH/PE9g HmpTRbbOYoFAlQ47D1IdYhRo+HVszDP+sVPCj+OPF6LtyELJmOfR3hFHJyLZ1OlW1rzx MRDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495086; x=1718099886; 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=EzcgxKBZLi25ReeoipJxRQhlgzmQ34yT5acRrJVoGcE=; b=gpMXivvgCEeOhbCxxfM745R6o9AwXpgB3v7ZSn7znuXJpJjlbmXt1hoR7tqoNBecot qwfGTpUAy1pTClIJESJhFKHwgz91HLHX+eexdkwrWXJQHvb21rct+tvHsiB6YSYT1mAN 0iW81xEiDO79BW3wMElo4lWcgj5ijR1gVB4LqwmolZLXCS7Te+2IiGspqGaukaKN5msx yg6aAjWyGgmdLCynfuz3qC9VwVmKqZ2cjLTL8wifXY9j4REghAmMa8Tz2hKHmj/L5b45 C771KUhHBcNN++74xhtoLngzktr8gvXePfC746YfqCveFlHtvJWB9BmOHDay8ZPrW9x7 KQ1Q== X-Gm-Message-State: AOJu0YzQfSJdJnszK1zdjjwK6Trx+E+jgy/9VqO1K8aVbihjdW1H7j7s hftEBgbN9P8T9n6QMT8bMpIvCpXFTPJCc//xC2G4oZZ4WUlO5lHCRip8RTTJcXsJEba9RkmXOOB t X-Received: by 2002:a5d:5186:0:b0:354:f467:c149 with SMTP id ffacd0b85a97d-35e0f36dca9mr7275991f8f.59.1717495085822; Tue, 04 Jun 2024 02:58:05 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd066d317sm10999710f8f.113.2024.06.04.02.58.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:58:05 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Edgar E. Iglesias" , Stefano Stabellini , David Hildenbrand , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 21/32] physmem: Always pass offset + addr to xen_map_cache Date: Tue, 4 Jun 2024 11:55:57 +0200 Message-ID: <20240604095609.12285-22-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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: "Edgar E. Iglesias" Always pass address with offset to xen_map_cache(). This is in preparation for support for grant mappings. Since this is within a block that checks for offset == 0, this has no functional changes. Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini Reviewed-by: David Hildenbrand Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240529140739.1387692-5-edgar.iglesias@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- system/physmem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/physmem.c b/system/physmem.c index 342b7a8fd4..5e6257ef65 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -2230,7 +2230,8 @@ static void *qemu_ram_ptr_length(RAMBlock *block, ram_addr_t addr, * In that case just map the requested area. */ if (block->offset == 0) { - return xen_map_cache(block->mr, addr, len, lock, lock, + return xen_map_cache(block->mr, block->offset + addr, + len, lock, lock, is_write); } From patchwork Tue Jun 4 09:55:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801394 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2312974wrw; Tue, 4 Jun 2024 02:59:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVZpgZd3KoRfWxEXvz4SsHd6KJGVUu3UPz7zEV/66/FHgrxW/2gyo298I5U/Du9YBSJR6U51kKp4Sj0cL3l3cTG X-Google-Smtp-Source: AGHT+IEIFY9dKZU+I1+67+vn1vMT0KnAn8lJW4QdX6dyAawNw+D7rMKatYCsOT3fVJG0tngx0Brl X-Received: by 2002:a05:620a:4691:b0:794:f6ad:3cd2 with SMTP id af79cd13be357-794f6ad3f9bmr1408391085a.55.1717495158332; Tue, 04 Jun 2024 02:59:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495158; cv=none; d=google.com; s=arc-20160816; b=n/xEbL33/5kawfwATm3KRpJeMUmHqK+Jc+CZTevGZyIal4xuxmD9eEJ50kQEpysb7D 3Ucxz+Ju+dkbj5h1OeIRJcoSd1buTvEdonwZMgWBc1pI5k4RQsGogh4gvUoOHL23GM5m DFjhPggXye1JBYu363gtE6PEASqugs21OvD5tJ6ttjK3Ajhnc8aFU0IovxTqYzA7iOZt Di0lLKOT2AxM1VAbg6J0X7QelM6hN3OiE1/4gMtjL9nZQfuBOb6GU8g4C0Cqj9+DsUvj NrZEczweXzwAwg9JQStRRUt/vpt6snf9+rmLuajhY8/I8NpjFAZuh/EyuzUmvWJDS2YJ Np5Q== 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=SNllFIjXNz5GjqDOBbChwyL7SF1oO9qoS6VeKoJgVQQ=; fh=zTr0rAGweEb0EHWiTTjSvV3xEc3sI22TPSmktQnMYJI=; b=he+pAv48VmR/CBhMcpA0/mspcsBiOOXGDAXBOGm+IemJpD0sOWAek/WpU0wJuyJIV8 Tg81ibiwQdAnU0fBE/oyBDSBO+VkyHm7/O++6CG9rxwRuPyQX/WqimNq3ssnahvoVc+y eVn1n8mwU16WMiQEKWEmKp5UC6tNTF/dzokTA/py6IdMEiif13y/bjYjKkR66bE+P5f3 Ahj6vaySzslBkMzE3cU1+AadBUiFU94oAZQHV8uU4wznMzGIuHm3er6w6XzHVHR/1GBM nTiZSf3+QMwg0FwTAgiShKdggzFU08AHng0WSabUUpX2jPTgJf0lwq9Nr8L8PRICCwN9 E+bA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LBkGYM+J; 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-795173a08d5si128601885a.340.2024.06.04.02.59.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:59:18 -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=LBkGYM+J; 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 1sEQvo-0002yo-O1; Tue, 04 Jun 2024 05:58:16 -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 1sEQvm-0002kB-Qm for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:58:14 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQvl-0002J2-0m for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:58:14 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-42121d27861so8664055e9.0 for ; Tue, 04 Jun 2024 02:58:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495091; x=1718099891; 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=SNllFIjXNz5GjqDOBbChwyL7SF1oO9qoS6VeKoJgVQQ=; b=LBkGYM+JHguc/GC/OWjs783zYXQr4eU9T4Y5XiSqleBFQ4RF6tvcB5oLiFLeblmK7b IO6IDTIyou6e1zgnE2TWOFX36SNmBT2C8UX4wJ4UzvF34Zgg5p2zF22LE9mPmQiLUoUn Nvt5T6EJ5a3myhYEhwP004Hq0iz8ubsiNT6OkbUVzzH8sLwGGhPkhQ9THnKkP0xL6LU3 znb1UNi7Nco/3RjOhfQmxdoUrNhVTzBU4BlPJIM5oe5kEXvH0AqrNxct9t60bGdpI6// g1KoxYIgFC+VV/azRNlcMCY77rgvMXhOvTpnjMS0MBTtYPU3dk5+EfODDIFYn/Kk+9ER N4uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495091; x=1718099891; 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=SNllFIjXNz5GjqDOBbChwyL7SF1oO9qoS6VeKoJgVQQ=; b=r/aDWcf0+ZlLigFkGEC6gG075pfgXujvWkNX+Jf2va+44SiZcOUwDhkh4eKSsfUan+ rF9Bqk21U2LWjpW6Fma+GUjXFq+2pC/28Bm0RH45a+EpXEaBT1NCmTYR4EwEunLfcI+g l2MoegZH87w93sx89pNqG3TNgNuenPUFXkwzSDLeDY8zaWE1fC6BzJsNIV2auNH4/reP NwpciR0MzBb25gSsTp8QW7TAgSazPezhGajk1A8BVoXu0AMxupy8mEclcnCjmXSDXjha 50OA4YEx4cXxugGFMXVybEK3D4WH/5XndWm/75tvu1T80UrI5zGCeSGY2c3ZW23cycz6 ZarQ== X-Gm-Message-State: AOJu0YyWy7pu/O7ed+4DoqM+vahHQBQAC+XXqzUxT4rZ4uaGvhU7sn1E KiKTCSevTokoAGQlt7RudiQv2HanFERjpVY/jygVCmryP3UtrPdcW9lG5zx6TG49habRVGd+x4E / X-Received: by 2002:a05:600c:4f13:b0:421:418d:8f7 with SMTP id 5b1f17b1804b1-421418d0be6mr28047945e9.12.1717495090999; Tue, 04 Jun 2024 02:58:10 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4212b8a5598sm147525575e9.38.2024.06.04.02.58.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:58:10 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Edgar E. Iglesias" , Stefano Stabellini , David Hildenbrand , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 22/32] physmem: Replace check for RAMBlock offset 0 with xen_mr_is_memory Date: Tue, 4 Jun 2024 11:55:58 +0200 Message-ID: <20240604095609.12285-23-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, 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: "Edgar E. Iglesias" For xen, when checking for the first RAM (xen_memory), use xen_mr_is_memory() rather than checking for a RAMBlock with offset 0. All Xen machines create xen_memory first so this has no functional change for existing machines. Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini Reviewed-by: David Hildenbrand Message-ID: <20240529140739.1387692-6-edgar.iglesias@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- system/physmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/physmem.c b/system/physmem.c index 5e6257ef65..b7847db1a2 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -2229,7 +2229,7 @@ static void *qemu_ram_ptr_length(RAMBlock *block, ram_addr_t addr, * because we don't want to map the entire memory in QEMU. * In that case just map the requested area. */ - if (block->offset == 0) { + if (xen_mr_is_memory(block->mr)) { return xen_map_cache(block->mr, block->offset + addr, len, lock, lock, is_write); From patchwork Tue Jun 4 09:55:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801402 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2313299wrw; Tue, 4 Jun 2024 03:00:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXblLdO1zJSOUfchFvSCbKBAhFbEnt/nPkM7ugb6ZKczFuQQ6ZBPQThnVy5ccYj64SnldKbvrGISRPlkDs1lj2K X-Google-Smtp-Source: AGHT+IEv42gl67g/nJdyDhmICl61KuxHSModXo3Tq0zA+qOZynM0MwGqRAOICU1uaW5ECJROHT5s X-Received: by 2002:a05:6214:5f04:b0:6ae:1159:90b3 with SMTP id 6a1803df08f44-6aecd5788e3mr140697286d6.5.1717495214365; Tue, 04 Jun 2024 03:00:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495214; cv=none; d=google.com; s=arc-20160816; b=K/W2DDuBlcWIBI6CmtNBl5G87Q/D0JmXVgl6pIrH5HoIoYrH61CgwJjr+R6FZYRl/b mKPofkl9uAlqwJlEp023v+DHDC3b3DxmSygXqhtQoaNlfVStrg2wJKSx6lckfCakSnnD RRMLzJaYeAUfFW8api1AreYffbR/Ti7+j+HgAY6657Ix5ToHNs4uRLi/Xme2TXGCe2wk zIjxUsbII5/raL7iFuwsuIpTmjwVtZx9O4SE3sYnNWHSehGFhdndhPZp+RVe/C+H9nCW jY57ddWcDobRNrNJbcCKzLU9/Dtd2+PjSmCjj6+pVnOVJhzbgXd1alvmU6h0rr2xznYF h4zA== 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=UMNBQrBvKQfv4Dl+hKP/TPgBc1DhyAHhW2w6Yei3CGk=; fh=g9mmjh55/wUFf9Wq0guPuyCdKaIT/2E6bcB1YTQY5Gg=; b=zxjWYWX7gDe05HB/mmsWnUFiPNss8VoAD2Zkyt+t+S9vjP8iCyYTHD+NU0eHcZSv4h VCBnDaCtxAgEZnQHD/B7qsdXSo4VlI+D+iJPRh63ryaCl49zw9nUnp7KxV8kg9InRki5 TYyyWz7sXQa4J+kiqQYUmeBdWEyAdPkq4zXZQExQiJYna6tyOPgGYO6AUu7CsjKmPM+H TplVJo5M5w5j+6gq+k1HBraOV0cQ71EjNNby5RcP81b4wJ6MneRwr0eAK2Is7OUvwL+C C6wA/1uoBAyphRxdr7MZqL/UG7hsst1bLpV8TzlT4oDO0a69EIpsQkKJL6Bivl84hLOQ pyeA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qGm3eQ+f; 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-6ae4b415a0asi10774436d6.393.2024.06.04.03.00.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 03:00:14 -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=qGm3eQ+f; 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 1sEQvt-0003j1-Id; Tue, 04 Jun 2024 05:58: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 1sEQvr-0003U6-Qo for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:58:19 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQvp-0002JR-Vd for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:58:19 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-421338c4c3bso8559625e9.1 for ; Tue, 04 Jun 2024 02:58:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495096; x=1718099896; 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=UMNBQrBvKQfv4Dl+hKP/TPgBc1DhyAHhW2w6Yei3CGk=; b=qGm3eQ+frIAk25ighZiIiPxdPwjGeOO55nOBu8D/Imyhe5V5uH7XQU0XtAojxRFvGj FBNQ+WzE4nlIwLR2TnLm9Ec0FzhMINvwESuGi1U5a3cS4GjSjG6P/Sovl8UD4s8BLx4u jOadOL2nLHHlPxCgwqsgz+bhpUAVO1aATwSYqpx9CW4T/080oIEDtw9bSKTXS9U5/cYX TEJXHWKbAiTZKhPIWHvewbZFf6Fi4N7NeW6Hq6GUD65MpvU/4Gg8IXbnQ4F2gjRydBb3 F89UUMKIEuB1N5yJiaDOS3p4VWJESqFIwc3/fsaab+8qCYXfKiT75/OUedlwKoz8K8oT iWOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495096; x=1718099896; 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=UMNBQrBvKQfv4Dl+hKP/TPgBc1DhyAHhW2w6Yei3CGk=; b=oDjxC4BdvwuZ1l7O+kQ+lyozAyO6KdZvh8/fkEppte4O/JBKiaZfFea2GuoN9i+/c/ IgDwxgBybmmzuakzxZW0OVc6s5ON0goupVMxM8ZtTtaECUoqUcZOVPGU04slj1/DKpkZ /LeaSl9k6A5A6RcDGLmkinG65R6EKhpNOSp0bZpK4cWzrXePnXQGtZw39Of2fpUHeQz6 K617eaDwJlzd2eOVK8F9YJFeEAeRx+IfJKkKovEekFubULw1HyTpTGZxcRyPGP7kN6AJ /0z9m7+5fYDDs/5K5jseX0CcleKBvVW5iNjR41vGal4pNYmic/Z07rM2eU2EnjB+hKZ8 H2GQ== X-Gm-Message-State: AOJu0YynXb7De9qTTbxHDEgftWTzOxCwPLxkI2EVW1QQGPAGO4CvymFM X61a6hfZEZ2wU0IuOWDFpatg0g1qZRWuKMajEGkMPOk7OGQdjZvY/DTMx4qiXZq7RDkflnf2WD6 r X-Received: by 2002:a05:600c:35d5:b0:419:f3f9:8ed6 with SMTP id 5b1f17b1804b1-4212e044bffmr110122735e9.4.1717495096202; Tue, 04 Jun 2024 02:58:16 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42135c9dc18sm112972305e9.1.2024.06.04.02.58.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:58:15 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paul Durrant Subject: [PULL 23/32] hw/xen: Constify XenLegacyDevice::XenDevOps Date: Tue, 4 Jun 2024 11:55:59 +0200 Message-ID: <20240604095609.12285-24-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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 XenDevOps @ops is not updated, mark it const. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Paul Durrant Message-Id: <20240510104908.76908-3-philmd@linaro.org> --- include/hw/xen/xen_pvdev.h | 2 +- hw/xen/xen-legacy-backend.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/xen/xen_pvdev.h b/include/hw/xen/xen_pvdev.h index fdf84f47af..0c98444047 100644 --- a/include/hw/xen/xen_pvdev.h +++ b/include/hw/xen/xen_pvdev.h @@ -52,7 +52,7 @@ struct XenLegacyDevice { xenevtchn_handle *evtchndev; xengnttab_handle *gnttabdev; - struct XenDevOps *ops; + const struct XenDevOps *ops; QTAILQ_ENTRY(XenLegacyDevice) next; }; diff --git a/hw/xen/xen-legacy-backend.c b/hw/xen/xen-legacy-backend.c index 6f0b300a42..33620fe42e 100644 --- a/hw/xen/xen-legacy-backend.c +++ b/hw/xen/xen-legacy-backend.c @@ -170,7 +170,7 @@ int xen_be_copy_grant_refs(struct XenLegacyDevice *xendev, */ static struct XenLegacyDevice *xen_be_get_xendev(const char *type, int dom, int dev, - struct XenDevOps *ops) + const struct XenDevOps *ops) { struct XenLegacyDevice *xendev; From patchwork Tue Jun 4 09:56:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801403 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2313351wrw; Tue, 4 Jun 2024 03:00:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUD63vRZIsPd0oTdbMi26IBvWZQ8J1gTu5AQlOpfaADKttp2daEzpBJbmbge78HA44DgPgvelOLJwy9i8j0wU/S X-Google-Smtp-Source: AGHT+IEQLnAQV7aMjAAxQDwK2DlSV1Et9LifqbEgOAfm5ofRcY92n+wSpf31U0OwrhTDt67enjKi X-Received: by 2002:a05:6122:1886:b0:4eb:260c:949a with SMTP id 71dfb90a1353d-4eb260c9786mr3278118e0c.6.1717495220377; Tue, 04 Jun 2024 03:00:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495220; cv=none; d=google.com; s=arc-20160816; b=AZOLT8rkWvafywTjEMNyCybICtaX74AeYa+M3ivw2FVtsz5qfJkNF2affNmqJqTbou V30Ifs0Wd7WZD9GWhgy0S9zRN8x5JxaQeWN6Fo/oUZLcGOdhJWPJyCDiPyU+tpvpX+3m ylgbwfDI+7/DuFrmKKx3TE+zyekFg7dMsdod1+EFtJP0Tff0uA0FgCkn9YFH/yJAYXQz tMD1kAptyTxiXAXLjNzvZJdoItwBSACYFxV5XXw2acK6jVtplqcjWP6ksbXWwB5/ntGx Zb3BBDDmggHY5bfpnjolAabanL1eYkBXDmBy5rTRFwQjw2e0K901RqjnPCACh4mtFaKa VrbA== 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=KWEiLSLjPrxtWwEuDW5HmfeuH1N7C8mHb/ZvIjGfjz4=; fh=g9mmjh55/wUFf9Wq0guPuyCdKaIT/2E6bcB1YTQY5Gg=; b=hLqP9+gxupYOvrR1N31KZKZMxuoHYVE0zY6MMwG6dfYx3r9sqvv0rM7AxdIt+Y5+pH L7Kj+ZSTU3fvxFeortvmiacKdzo9odQKdGkrLUM6yk9xnXh1LWPxlCg/CON/xn+ePumE 7TNjOHyqmkZzsJlCsRN69SwjsKjfxDKUNfEiK80Drg5pdTD5j5QAhalAgOExG9tulXN/ lMhANzmn0/OEw2LcHLjLBOsZYnmvgbnpaaSJnSK9Ugte4sxOAiUOC5HxpoM9I/z8hcKu u7JAYodk5BlXuve12BzehVNyKIcRbzSWF/V1573kmC3gQ+giT/FGFHrdXMxwKG9Q7mZ8 mxlw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Lzrg3/QZ"; 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 71dfb90a1353d-4eafef6b165si1530965e0c.274.2024.06.04.03.00.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 03:00: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="Lzrg3/QZ"; 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 1sEQvy-0004nK-Sc; Tue, 04 Jun 2024 05:58: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 1sEQvx-0004aC-9o for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:58:25 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQvv-0002Jk-G5 for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:58:24 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-421392b8156so8492835e9.3 for ; Tue, 04 Jun 2024 02:58:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495101; x=1718099901; 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=KWEiLSLjPrxtWwEuDW5HmfeuH1N7C8mHb/ZvIjGfjz4=; b=Lzrg3/QZ7NNp6WK00x5y/n2tK8OOCalAoxhHZGkVV5p0bkXwKx2DORImveSx2h4z2I 3MAvFKogOfA9AHNBUT3VV63t9A1D54RYTGe9emSHM3xInHIhpo+xpcbUZEkCZVDy4UOe WqGSm+HeGvTJGkSgkRrfPrUD55i2jmZFj0MACwsjpteNFniLj1/15dNGhzTrlvfOzEhx /hWCQ1wM4vtTEmixxpCRNnDYR5yymI24omoe7z09zyL/uuES4qcTiJ/ByeHbZZ4QUiXg SW2mXAiIX9u/wBBd6hODw2pv2f5YjuwghdvK9NPe+4jcQpqZwRl97t5KSleYb75XIB6C Enaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495101; x=1718099901; 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=KWEiLSLjPrxtWwEuDW5HmfeuH1N7C8mHb/ZvIjGfjz4=; b=cOlsV36jdqr++7ift2uypVD7RqHcCP3aBiIDDVkcx57+W6vhhMTa36LdohqrTpG4U4 qdNhiP3ZOzwIJukLY1VEJgLjWs6GAjizbue3LN7E9BqSnGIjU+oCk7WJPEbKLzOJC8Lu pSjm27ylcyMG1Fg861DSOkaPaYbADOZhICgMIXvJNSlGXZ4jlbjf70p0J/gKGXejf2K6 keu4Eu6mnaf0I0mLXM+PT2Wlk1iDToAptWYaOOhDgGcVkFzePjB7sgmvTTFTA/upN9CD uhbY5Mhy18gMLUa12s1+FzWv5bDpjMxXIJ0bI4LEOdcNA0+7x4sj4ywhBM1WmJyqtzQd DCLA== X-Gm-Message-State: AOJu0YxNPwzDkMnBYNe/4TQMiDauombdzv5Xc42L13SwvKkwRFl8woD2 7alOFyKaupbrHC4P0zdcTxoFR/bSUwmvNZtFi6s75DDDjbtyp17tQ0bZXRXK5Z7PBInjWjdOmFo T X-Received: by 2002:a05:600c:3b0d:b0:41b:fc3a:f1ef with SMTP id 5b1f17b1804b1-4212e0b08f7mr98344425e9.33.1717495101344; Tue, 04 Jun 2024 02:58:21 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4212b83d469sm147380125e9.9.2024.06.04.02.58.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:58:20 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paul Durrant Subject: [PULL 24/32] hw/xen: Constify xenstore_be::XenDevOps Date: Tue, 4 Jun 2024 11:56:00 +0200 Message-ID: <20240604095609.12285-25-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, 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 XenDevOps @ops is not updated, mark it const. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Paul Durrant Message-Id: <20240510104908.76908-4-philmd@linaro.org> --- include/hw/xen/xen-legacy-backend.h | 2 +- hw/xen/xen-legacy-backend.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/hw/xen/xen-legacy-backend.h b/include/hw/xen/xen-legacy-backend.h index 979c4ea04c..62623ecb30 100644 --- a/include/hw/xen/xen-legacy-backend.h +++ b/include/hw/xen/xen-legacy-backend.h @@ -40,7 +40,7 @@ void xen_be_check_state(struct XenLegacyDevice *xendev); /* xen backend driver bits */ void xen_be_init(void); -int xen_be_register(const char *type, struct XenDevOps *ops); +int xen_be_register(const char *type, const struct XenDevOps *ops); int xen_be_set_state(struct XenLegacyDevice *xendev, enum xenbus_state state); int xen_be_bind_evtchn(struct XenLegacyDevice *xendev); void xen_be_set_max_grant_refs(struct XenLegacyDevice *xendev, diff --git a/hw/xen/xen-legacy-backend.c b/hw/xen/xen-legacy-backend.c index 33620fe42e..5514184f9c 100644 --- a/hw/xen/xen-legacy-backend.c +++ b/hw/xen/xen-legacy-backend.c @@ -520,7 +520,7 @@ void xen_be_check_state(struct XenLegacyDevice *xendev) struct xenstore_be { const char *type; int dom; - struct XenDevOps *ops; + const struct XenDevOps *ops; }; static void xenstore_update_be(void *opaque, const char *watch) @@ -557,7 +557,7 @@ static void xenstore_update_be(void *opaque, const char *watch) } } -static int xenstore_scan(const char *type, int dom, struct XenDevOps *ops) +static int xenstore_scan(const char *type, int dom, const struct XenDevOps *ops) { struct XenLegacyDevice *xendev; char path[XEN_BUFSIZE]; @@ -624,7 +624,7 @@ void xen_be_init(void) xen_set_dynamic_sysbus(); } -int xen_be_register(const char *type, struct XenDevOps *ops) +int xen_be_register(const char *type, const struct XenDevOps *ops) { char path[50]; From patchwork Tue Jun 4 09:56:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801404 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2313353wrw; Tue, 4 Jun 2024 03:00:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXaZqb0od2PvXwre0g7gUMPjf8iom1zgPYjgTXv43MPKRtwVB4O0xBrArcCeYxBsohqai4NtgrRg6XeKdK+/tLo X-Google-Smtp-Source: AGHT+IEj2wGoBXKNDwb0KIYBjjaKrcluTIdeMlw9A+TYxiEBDYnGmr3RRKs/8kPsvpeJknv9CxX5 X-Received: by 2002:a67:ce81:0:b0:48a:31d7:656e with SMTP id ada2fe7eead31-48bc2367ae1mr11042204137.30.1717495220301; Tue, 04 Jun 2024 03:00:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495220; cv=none; d=google.com; s=arc-20160816; b=tGES4CURZji94KewSBnBdfbNR1veZHFPs8Cf75l75X4jCFuBgp5SrDLmlJ8BWVLDJN bzuV3FZFZxgwkJ1aqmWKuJ+QT0g4q9hTTrC+OF3+Rj/XlMywM+48uKcjZHgFJKMqUF5J 4ylqwcLWwQkxw1q1zz4a7Nu1ajBOQI66gPkJAWAC1d7GNBSivP4Qn6lalPX578ZMY9gs fmsZ57tExbiHtf9g3qKr4e6VL0dnqa8BRx10keOMI36d0ZU3XQwxa4L7CGzM5naTu6Qn Azv+PNpwJHMpG6yFT6MlUgz9MVoyrjzrym3QkOXFjbjhdEGVJnAgiILrfPyz0y1Jm9wF sLOg== 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=OVq5FRQEdCU02hRbXIlYUuqMspOJT3T18nLYpVAudrA=; fh=g9mmjh55/wUFf9Wq0guPuyCdKaIT/2E6bcB1YTQY5Gg=; b=T7CKOOUNC5jQjPQI9QWL4BiiXrhYZhr7jAk59kJDM1/XpRxnhF9hlvT+TOMRXfDvLc SjqRlMWU5qimOSphEZoANDGjPn6ykFLxhif8p1YRLG1X48nXplKTygQK8vpLnpI7ue5Z I53PQclwPIWYvapZ/FYk/o7k/UFCbHiLv6V9tCgGTq1sMFilixHS7sZSCgmOxPf4/1Ah frEJ77uKdP+neezdOYnqxwuvTvE2D2s4hnPB4AKCX6wHuvOmQB+sR5QxWl5NR9l0k/tG UouwaLTv5+RkKgsE9HXauURsSe53CTHV+VrHplXmhXmmH7RbuXheVyfY71MTD56CroBY eRwg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hqwKUPue; 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-48bbce08ef5si1502236137.36.2024.06.04.03.00.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 03:00: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=hqwKUPue; 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 1sEQw3-0005OC-Au; Tue, 04 Jun 2024 05:58:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sEQw2-0005J4-36 for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:58:30 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQw0-0002KI-9q for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:58:29 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-42134bb9735so29708695e9.1 for ; Tue, 04 Jun 2024 02:58:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495106; x=1718099906; 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=OVq5FRQEdCU02hRbXIlYUuqMspOJT3T18nLYpVAudrA=; b=hqwKUPueMb8RT7UtzGdF315S9iukKo1NivEwR6tUrL5OgwRJSMi1dKsd7c4zUBn7P5 ulxzxJfdwdgB5d94TnPu/HlGecNrJ2Xa9DIpbHcHp+9v7yYQgqgV0XtlUMkHtZfsIdJR 2d9K8oZBb9tInDHXclfA5iV3169oqRSlWdVEZFFjsEZPQSXW/KAVZMFtiW9732Ajt3Nj 7S+/I2wFq0S7UPkyMLTwSdqgIjPjZBwo3HDVvjQDxZm0vkaEVsk7WcHMhGu3N09qtKS7 xp7v5XLtJLecHF6tiCXnUrEJF7W31Zgp4Ahc2yWS/MOlvfTpdoiZBv6ybPO68E5mauUG 0AKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495106; x=1718099906; 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=OVq5FRQEdCU02hRbXIlYUuqMspOJT3T18nLYpVAudrA=; b=fdzkGVDDfUNkaxF8st3KBe9iLQmJiTI4tkWQHmiVZ8JejPnhUmo/zvD8pL9H2Amhsd 4+gp5ki9+S4ktpx80mM7gllmT1F/9mzyYVdT5PqgnIZY4wEZQv35623DJeTSP/amEHej xL3K/lz5jjkgQK8uKmHP7kvzUeuZ3RikM+eSO1+8fnOkpzokeHxD0Yxu+LBFeJ8mD3aK b0829X+/0YEUMe7KBz+czbpAQw/aHkReMmcF6pmthy7QB3a70dKoT64I98gK5YTMdbsK GLpBqlfyACBx/K1Qx7O7MKCFYJcvIUDObBEiwM7XNQwtSGCMqrnoXy4lxwtUfcschvya BRbg== X-Gm-Message-State: AOJu0Yy0+VBx2oEKrocVYI49C/fZlezI9jG/zV9tpq02IgluiRRzpApe bOwo1DFCJz7chc84vYNiTibA168wdtL72orfYqSmDjwF6RD9Kkn3aUGNsaDAz/PwRWlLzZUIGrq P X-Received: by 2002:a05:600c:4f46:b0:416:536b:683a with SMTP id 5b1f17b1804b1-4212e0ae76fmr97568835e9.32.1717495106567; Tue, 04 Jun 2024 02:58:26 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4212f0f9660sm138041625e9.39.2024.06.04.02.58.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:58:26 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paul Durrant Subject: [PULL 25/32] hw/xen: Make XenDevOps structures const Date: Tue, 4 Jun 2024 11:56:01 +0200 Message-ID: <20240604095609.12285-26-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, 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 Keep XenDevOps structures in .rodata. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Paul Durrant Message-Id: <20240510104908.76908-5-philmd@linaro.org> --- include/hw/xen/xen-legacy-backend.h | 2 +- hw/9pfs/xen-9p-backend.c | 2 +- hw/display/xenfb.c | 4 ++-- hw/usb/xen-usb.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/hw/xen/xen-legacy-backend.h b/include/hw/xen/xen-legacy-backend.h index 62623ecb30..e55a14057f 100644 --- a/include/hw/xen/xen-legacy-backend.h +++ b/include/hw/xen/xen-legacy-backend.h @@ -67,7 +67,7 @@ static inline void xen_be_unmap_grant_ref(struct XenLegacyDevice *xendev, } /* backend drivers not included in all machines */ -extern struct XenDevOps xen_framebuffer_ops; /* xenfb.c */ +extern const struct XenDevOps xen_framebuffer_ops; /* xenfb.c */ /* configuration (aka xenbus setup) */ void xen_config_cleanup(void); diff --git a/hw/9pfs/xen-9p-backend.c b/hw/9pfs/xen-9p-backend.c index a3ac53f989..79359d911a 100644 --- a/hw/9pfs/xen-9p-backend.c +++ b/hw/9pfs/xen-9p-backend.c @@ -513,7 +513,7 @@ static void xen_9pfs_alloc(struct XenLegacyDevice *xendev) xenstore_write_be_int(xendev, "max-ring-page-order", MAX_RING_ORDER); } -static struct XenDevOps xen_9pfs_ops = { +static const struct XenDevOps xen_9pfs_ops = { .size = sizeof(Xen9pfsDev), .flags = DEVOPS_FLAG_NEED_GNTDEV, .alloc = xen_9pfs_alloc, diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c index 27536bfce0..b6d370bdf6 100644 --- a/hw/display/xenfb.c +++ b/hw/display/xenfb.c @@ -972,7 +972,7 @@ static void fb_event(struct XenLegacyDevice *xendev) /* -------------------------------------------------------------------- */ -static struct XenDevOps xen_kbdmouse_ops = { +static const struct XenDevOps xen_kbdmouse_ops = { .size = sizeof(struct XenInput), .init = input_init, .initialise = input_initialise, @@ -981,7 +981,7 @@ static struct XenDevOps xen_kbdmouse_ops = { .event = input_event, }; -struct XenDevOps xen_framebuffer_ops = { +const struct XenDevOps xen_framebuffer_ops = { .size = sizeof(struct XenFB), .init = fb_init, .initialise = fb_initialise, diff --git a/hw/usb/xen-usb.c b/hw/usb/xen-usb.c index 416623f956..13901625c0 100644 --- a/hw/usb/xen-usb.c +++ b/hw/usb/xen-usb.c @@ -1083,7 +1083,7 @@ static void usbback_event(struct XenLegacyDevice *xendev) qemu_bh_schedule(usbif->bh); } -static struct XenDevOps xen_usb_ops = { +static const struct XenDevOps xen_usb_ops = { .size = sizeof(struct usbback_info), .flags = DEVOPS_FLAG_NEED_GNTDEV, .init = usbback_init, From patchwork Tue Jun 4 09:56:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801405 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2313457wrw; Tue, 4 Jun 2024 03:00:34 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWrB5v1NgX7piAtqsV4GwAEqiRytPhziWJFm5MUFLlp7x2xASlv+SaykhfuPEqGwPt2g9Mj+WwbnzxOB6qE0HIc X-Google-Smtp-Source: AGHT+IEYvyKo4NkjGtoU8PSzG4kgmgcLmgj79XP+InvDrmKIseRU2u9LUpIs1HoXNT8/n+bBul+O X-Received: by 2002:a05:622a:1213:b0:43e:3d29:431d with SMTP id d75a77b69052e-43ff523a205mr150544411cf.14.1717495233878; Tue, 04 Jun 2024 03:00:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495233; cv=none; d=google.com; s=arc-20160816; b=OvuVtzHOol00w3pPgaew93IWNC/k5+11Qvc78bzIn1PWgrR6IR49Wumigw3pKLwaUj qUAJL/lhfh/BY17JinKRyzjyO2SooieLr0QMK1swmPld/lkXNUhsuAnZmh+mFpqSYrkF BIp6TrJmaD4LevnmCiBHJ7FQCGIzakOMYgB4SiPywAf0q+YxbLrmBAdq64jWQ94dWGJT Zbvq63GKpP2AgQNGoxNgXkFEWJBBHUL72UJ+3ifeDW2b2SMtOU3PIQSqW/ZteFR51PTe MHgA/1taXIZLm1rp7KoNyBWMDwW7n9sq+vkuCPlp5yHifeNUj70y1F6kgvTdVjzKk6xl o1/A== 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=JSS7Auq4rjMzsXWfz5GZCQIt8zRmJ+DnGC7DTwkUw/o=; fh=g9mmjh55/wUFf9Wq0guPuyCdKaIT/2E6bcB1YTQY5Gg=; b=SFMcKBFQO3h6TPO59YKvLC1QdnpxH0P6en9dbmdwz7pxqJR2aYM4qbVimtJqzglduX UvvS+eiLboMhpcx3Qw1vyuzHhtHJOZHPE9Zyqj+OT0hpinYCuNVEEkXFBzEdOI2M6isn jbEJiSrP5qP8eOfCu3W/8iUti5DwLj2tjHZbg/yGZOL0iEHHxcslptiVo7r/bElfmUVt HHKXrMO8+T0op8xVYMLI5BFc/eGMtD4i+RiACUqaQ5YCzTu/S0l5rnZzq8suEZMh2s/L bcgpYsBUP3X0yaaQXW++Rx1j76kDxc1Vj7wqcmEntIq/CAnuDJEuqNahtLFwfKlcIciK 4HTA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gt9SidZV; 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-43ff25b95f5si106860621cf.764.2024.06.04.03.00.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 03:00:33 -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=gt9SidZV; 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 1sEQwD-00063G-N9; Tue, 04 Jun 2024 05:58:41 -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 1sEQw8-0005qZ-ES for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:58:36 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQw5-0002KT-GI for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:58:36 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4214fe0067fso3750185e9.1 for ; Tue, 04 Jun 2024 02:58:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495111; x=1718099911; 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=JSS7Auq4rjMzsXWfz5GZCQIt8zRmJ+DnGC7DTwkUw/o=; b=gt9SidZVNko3upKcRpipSjF5pYz7twkzxZhDl2BhJ+xZ5usTBIp91e5cKQJu2Ntd3s ylKi07E9O5MkCu/dNNhdp6wI27ALTXvLtLsAxnD3rXy39tDsVEq9rLBsBjPTQ2NjJNFc 96EHK5/NyQUUbCYIpM/DqqF3uj+4BMWl9j3WIaa+51KkoIa18bcIVZJDpb8TLYprfD6d 5Y9BdjpH5SEtZlbs45Rq2y+z06OfSUtFmpjJzxlpltKVRetfE1VelvZiygR4H1aVLqmK Ha63BdIwOKwxlmNZzsvvGY6yMJRrfMnYO5JXP2QhFpy4N3MCXpb8H8JHkk6nIczsxhEY mLCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495111; x=1718099911; 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=JSS7Auq4rjMzsXWfz5GZCQIt8zRmJ+DnGC7DTwkUw/o=; b=ZuAW6sHaoppCTKXyHyOc89ffR8UexJLKODs6dYkbPYVVIeYTgMqN68yrMWkhbPwaUC MRjBY2LKyPiW61RaPcyRUHvU0x4iUPF8+UQBrWlyrQ4VgH23GBR2VDbWS4bCSj7hE7Pz 93gHG7v1uP3v7hYDL4xNVnC3SeI7ZoTn6LvOS0/WYEKW6QHgcFvrWNSIApbYQUif9v+0 or1RUUmie+jdCUf97CXdlU7UWWVqiKD/rpg2Z/Z9iZf6PoSPM5H1Cs0iuiY0j2Cr/ejR +YMtRILFqrDURyNmjsrzqGtRP/fPLq6Jt0ybBVWNnd4KBWTthwgEElaM2ezOuk7zdcWd X11A== X-Gm-Message-State: AOJu0YxAtNrDvoq94+kZ1YVzkhQcCluj3lNw9sK1z2RqQHoqUlAZ73zr KfHmGLDgG4B5+vAP0HvVnaszqVPV8RU3ofvvL0lE6M/z36iPHi+PYA7ib04xFb1Lubh8pLspXRK h X-Received: by 2002:a5d:58c3:0:b0:35e:81b0:e28f with SMTP id ffacd0b85a97d-35e81b0e4efmr299450f8f.40.1717495111682; Tue, 04 Jun 2024 02:58:31 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd04c0d6csm11105972f8f.1.2024.06.04.02.58.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:58:31 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Paul Durrant Subject: [PULL 26/32] hw/xen: Register framebuffer backend via xen_backend_init() Date: Tue, 4 Jun 2024 11:56:02 +0200 Message-ID: <20240604095609.12285-27-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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 Align the framebuffer backend with the other legacy ones, register it via xen_backend_init() when '-vga xenfb' is used. It is safe because MODULE_INIT_XEN_BACKEND is called in xen_bus_realize(), long after CLI processing initialized the vga_interface_type variable. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Paul Durrant Message-Id: <20240510104908.76908-8-philmd@linaro.org> --- include/hw/xen/xen-legacy-backend.h | 3 --- hw/display/xenfb.c | 9 +++++++-- hw/xenpv/xen_machine_pv.c | 2 -- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/hw/xen/xen-legacy-backend.h b/include/hw/xen/xen-legacy-backend.h index e55a14057f..943732b8d1 100644 --- a/include/hw/xen/xen-legacy-backend.h +++ b/include/hw/xen/xen-legacy-backend.h @@ -66,9 +66,6 @@ static inline void xen_be_unmap_grant_ref(struct XenLegacyDevice *xendev, return xen_be_unmap_grant_refs(xendev, ptr, &ref, 1); } -/* backend drivers not included in all machines */ -extern const struct XenDevOps xen_framebuffer_ops; /* xenfb.c */ - /* configuration (aka xenbus setup) */ void xen_config_cleanup(void); int xen_config_dev_vfb(int vdev, const char *type); diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c index b6d370bdf6..ff442ced1a 100644 --- a/hw/display/xenfb.c +++ b/hw/display/xenfb.c @@ -29,6 +29,7 @@ #include "ui/input.h" #include "ui/console.h" +#include "sysemu/sysemu.h" #include "hw/xen/xen-legacy-backend.h" #include "hw/xen/interface/io/fbif.h" @@ -996,8 +997,12 @@ static const GraphicHwOps xenfb_ops = { .ui_info = xenfb_ui_info, }; -static void xen_vkbd_register_backend(void) +static void xen_ui_register_backend(void) { xen_be_register("vkbd", &xen_kbdmouse_ops); + + if (vga_interface_type == VGA_XENFB) { + xen_be_register("vfb", &xen_framebuffer_ops); + } } -xen_backend_init(xen_vkbd_register_backend); +xen_backend_init(xen_ui_register_backend); diff --git a/hw/xenpv/xen_machine_pv.c b/hw/xenpv/xen_machine_pv.c index b500ce0989..24395f42cb 100644 --- a/hw/xenpv/xen_machine_pv.c +++ b/hw/xenpv/xen_machine_pv.c @@ -50,8 +50,6 @@ static void xen_init_pv(MachineState *machine) break; } - xen_be_register("vfb", &xen_framebuffer_ops); - /* configure framebuffer */ if (vga_interface_type == VGA_XENFB) { xen_config_dev_vfb(0, "vnc"); From patchwork Tue Jun 4 09:56:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801393 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2312874wrw; Tue, 4 Jun 2024 02:59:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVQ1BNG5q30HOXx++pW6yLPdKhXozx49glPK3tUepcO4aXCM2a7x/8rx72A1+JybkWG1tFNU1xe/CptlWK2Oxmq X-Google-Smtp-Source: AGHT+IEjquS3C1vKY1OobZCah907yKYLxVsMIZaN2iETLYWbylAri7JuAzKGK/Vp3ALsGHb7pWRW X-Received: by 2002:a05:620a:4691:b0:794:f6ad:3cd5 with SMTP id af79cd13be357-794f6ad3fcdmr1361657185a.12.1717495140179; Tue, 04 Jun 2024 02:59:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495140; cv=none; d=google.com; s=arc-20160816; b=JcbtEmDcFn9V2ef3q0JtWGK2coZTxoqAjvKwJ4Gllp2KsAfq/ht2NXj2nJHmybif4n l41WlBmfoRQWUoS+ioYMAV/9HFNZ6+GhmjZ2PmOTRwgghMky0ipPgV0wxcrs+mpaSqD1 7MKUR8TZd9CLM/gCJ/pZvIVUpmw+xmjHwHe0KNVbajfpPZb0/0t/ZSZdTbg1qOKUN6oh Q8/DsilaJGhWe3hgSgzrYdvJ3T0a4BltyfauqnwqvNqt6n63qZhjWRR2efhgHCXZVngS f5yYXep+LARLEu6IZD4nOejezW/djR5oiPnWVjWZqmDTCBOlvBTz94WxNtgzkKQ0FjUt 9Wkg== 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=fenTnqVRpu5N0h4sB+9IKfbou1R637umnDD1Q49OsQo=; fh=pIQ/pnZIlSJRqn3IY6OfXgsfIYxl32er/DT+ShnNqYA=; b=V/Ivlwq+ArJ59kPaRV7pKi67AC43QXS2Oo7G5s0Atdw9yvp6qV4yPm31HvtyfHbXQu zPqBdZ9W4HV+vQuE0/lP+iUcEAXIKvXaGJxz86qRasiTtETOUT0Vlas1XJPKJ3zfrTLH GBmHDx5VaezKvI6NsbjFKZ3+0OcEc7noLxlCOxx06oH7MFhqd6YOTdaCJGzb887mBhK3 HmzHF11QcxURM/Th9Z+dv2lFjQDru8kC+yBhA8LFkB557C+IMhyZCQzmCeP538pg9Fve QFL37DmrORN57KMiTNfYXEAs4O/mQiOgNOl9q8MovqOe47uniw98IZ96dS3NVMZUU/1+ 83MA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HLZOaw8a; 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-794f32a72f2si1032132085a.658.2024.06.04.02.59.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:59:00 -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=HLZOaw8a; 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 1sEQwF-0006eA-0Q; Tue, 04 Jun 2024 05:58:43 -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 1sEQwC-0006Qq-RU for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:58:41 -0400 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQwB-0002L1-3A for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:58:40 -0400 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-52b9dda4906so1978410e87.2 for ; Tue, 04 Jun 2024 02:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495117; x=1718099917; 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=fenTnqVRpu5N0h4sB+9IKfbou1R637umnDD1Q49OsQo=; b=HLZOaw8atNr7louzNmdzCxjob+fdDDKJi4X5U52xVT6wRWoAm6fvcVNmoh7v/UhV2J rOEqKSS/kRgfRMMB25XmgQ2wgQlod3sZz1TK1TPmksl7Mpb2A+qZswq4VUOK1AB9MPJG h4hmteVLNKqsQkZN6GhaZO++EGZB5oxzG/Lq/TC6Zba/7+sEPDqbGxKEM+n1/MUwokLq kXvyt5HBfdLcb/i3FKhKsq/+UorZT7KtB1usmVKWv+1X9Gxiu6WTpGevTAegmx9A/eAX Zeqkk5hQbpgBXQm/0gm2DLFBiYCDfk3gY7w+twUGSvigrZ8z4w9bjOrxXaUPLuJHsruG Wqfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495117; x=1718099917; 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=fenTnqVRpu5N0h4sB+9IKfbou1R637umnDD1Q49OsQo=; b=TfJgApEmCs904UI6AWPkS6uUZCS51QJ5bjc7qi0VrTnz/wPwRTnkYEBYJCqbkr8zSS LDOYVKqDLEAtgSwsVUSQM8klj2vuYSMVouwqzaw0C5i+0beeLcQRoVWWqVVeXvZg4uI5 r5NJrGdjDq+6wgnPHNFbXA+sZbduZalPyhttYkKyG+t5U5iacWRsbZJRWnshOZ2eCsbq BF05MaTvkZE6XOcZgpcj5b7lXT4USLIEze41ZLzTf4+9pzfhVdlz79Wv3OzEj6oLKasO z08sdlyZL6NdN1vVMlX/5V1jMJSruvfZUq3n0Cj63KGcxYkw0heyJpL3P+YbJHOzBaTl 31Pg== X-Gm-Message-State: AOJu0YxrqgbpSQwJs6Ob90URP7OyBVGcYQHpD9YPonwq2Ly7JGpG2aED Ll1NhjEy5G/RvO0aTWHnWbwH7LzVqIeEs038j81tLKz/4pn8rBrcgEjogPIT2svgtQ1MKnprq6P T X-Received: by 2002:a05:6512:3e24:b0:52b:8455:fb1f with SMTP id 2adb3069b0e04-52b895609e6mr12046025e87.10.1717495116852; Tue, 04 Jun 2024 02:58:36 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd062fe96sm11004277f8f.67.2024.06.04.02.58.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:58:36 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , =?utf-8?q?Philippe_?= =?utf-8?q?Mathieu-Daud=C3=A9?= Subject: [PULL 27/32] hw/misc/debugexit: use runstate API instead of plain exit() Date: Tue, 4 Jun 2024 11:56:03 +0200 Message-ID: <20240604095609.12285-28-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12f; envelope-from=philmd@linaro.org; helo=mail-lf1-x12f.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: Thomas Weißschuh Directly calling exit() prevents any kind of management or handling. Instead use the corresponding runstate API. The default behavior of the runstate API is the same as exit(). Signed-off-by: Thomas Weißschuh Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240523-debugexit-v1-1-d52fcaf7bf8b@t-8ch.de> Signed-off-by: Philippe Mathieu-Daudé --- hw/misc/debugexit.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/misc/debugexit.c b/hw/misc/debugexit.c index ab6de69ce7..c5c562fd93 100644 --- a/hw/misc/debugexit.c +++ b/hw/misc/debugexit.c @@ -12,6 +12,7 @@ #include "hw/qdev-properties.h" #include "qemu/module.h" #include "qom/object.h" +#include "sysemu/runstate.h" #define TYPE_ISA_DEBUG_EXIT_DEVICE "isa-debug-exit" OBJECT_DECLARE_SIMPLE_TYPE(ISADebugExitState, ISA_DEBUG_EXIT_DEVICE) @@ -32,7 +33,8 @@ static uint64_t debug_exit_read(void *opaque, hwaddr addr, unsigned size) static void debug_exit_write(void *opaque, hwaddr addr, uint64_t val, unsigned width) { - exit((val << 1) | 1); + qemu_system_shutdown_request_with_code(SHUTDOWN_CAUSE_GUEST_SHUTDOWN, + (val << 1) | 1); } static const MemoryRegionOps debug_exit_ops = { From patchwork Tue Jun 4 09:56:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801398 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2313090wrw; Tue, 4 Jun 2024 02:59:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXdiw6Cwy92BynP39dRB0t17BlE8Cc9o0VAWNIbRimF+9Q1SjdH4QWmcNFuvMu9mkOjbwTsWwa4c0q0qqH0e2jL X-Google-Smtp-Source: AGHT+IE7iQR/MX5RqlmHI5ZDl0weUIPprf8XOCIgqmCwMWyUVs8JsjUsFrID8eCqqJZZaRrQrJFF X-Received: by 2002:a0c:fb08:0:b0:6ae:d383:d706 with SMTP id 6a1803df08f44-6aed383d727mr110587296d6.62.1717495177225; Tue, 04 Jun 2024 02:59:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495177; cv=none; d=google.com; s=arc-20160816; b=wrFnEYbLx7GSEIjAMKeWfzAEtKEk8DOM5LNg0GlbAf3W/k4QSNHG4OhBL4/BOhER0K WlYIYUTi/ai9H8fin0NtLwM9wWJcIGS98bJN5r2mPHbu/JgbSY3Em6qTXWRjk+Jn9pna Dyu1vAXTNkM0YC7OTWyhL3ga4iGeRGb/gxazfCTh8pKnZwrN5vk9H58QOU40+2ZKqdt8 y0SLZZaxD263a9PVZcy4Laup+/1jgDyuHI4JeY3dcDWKespdmdJs1nvTWZsFHD+gZIwW AqC3C6cwcABfeqAkjSYDttcN7k5HoeEIal+oVfEY6+H51V1CtMk3nBI8TGDlOa6C6BtX 5Bcw== 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=2xJYxwlPHFAuhiLDRZkfUXQ6zjFldlOAPPa4Gg5JdMk=; fh=mtjabfhO8D3r1feFhUPOMf+qbQBkKh5NaQvbyy52wdg=; b=UWRE0GXeQg+gyRqPeW6x9OQjAatQAbGMi5hisM4DvxXt32P8xJgHpZsLkeLXhU+8mi yjYNBro7t/mTgiSXOMxMvLOirF+q2F2xsNlCTLuXIv6XLmWwx6V7w7j4Sc5L1qCgCazp S2WZOC3BHV+uB2jcnrJMBpIHohTyLqYtoNmbTuD6fRtxHt4R6BZx7/FU5xFtbn6ccK0F KNav/l+ha/0SwGz4sneHwNQM3ESUKOLZE+EPyoiOkLQhU+kSMfGOCssHK/C/5psiLQAO cWPAogk7U1RQTJxBM3L7NyY0OhnrROpPx3AFhTKJ/8xNa13jkjOq/GOs5cWEdcOBz86z CIVg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Kg4SYeE+; 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-6ae4b416c2fsi4901306d6.325.2024.06.04.02.59.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 02:59:37 -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=Kg4SYeE+; 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 1sEQwJ-0007QF-OI; Tue, 04 Jun 2024 05:58:47 -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 1sEQwI-0007Ez-Cb for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:58:46 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQwG-0002LO-90 for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:58:45 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-42134bb9735so29710245e9.1 for ; Tue, 04 Jun 2024 02:58:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495122; x=1718099922; 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=2xJYxwlPHFAuhiLDRZkfUXQ6zjFldlOAPPa4Gg5JdMk=; b=Kg4SYeE+81ZHVI/OjjQdnyDC1cEVEl7ZOYYhoyx2G5ugbA1zYEHp6MvCtiH9Yp7pWH CiUCG8agC02dx+wx0C/gMa7lEPp5cSAzOeuyJwO/q5ip0MamoaUUCCkaGyYb6UcHeFbn yFFk4Uj6h8RoshSfMNZ95SJndc6Og1yWSWPMd/5btbFyWQ+ITpIkKjxy9JjzQ8LfPSMJ 8HFPuzttcJqaV7bgAyPFL1veDurCsKCkKH5KkWNRmXwvvNOkHGJk/UX/lEmc3KgMgMKo NR1rhnMaAMNEMVBrvu6eXbLKVXGk/m6vj1Kk95WKLBWkZSoXJaMfmufwjpRcJN1GkwhD D1MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495122; x=1718099922; 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=2xJYxwlPHFAuhiLDRZkfUXQ6zjFldlOAPPa4Gg5JdMk=; b=Wssf/MjEkXdvsWzpfe58qN/bWX62OY9yGIUVWEk98rfU4dMYC55NDSakV3lGUG0ka5 jIdIzboq94+bOkzreAAhhXl11xnk/87q48VSJgMGh1/mlGrdKt50KxQ0eojYlYJzijaT UMdhi6hnAmHRiaeWN4dQNU9Tf+GCG3yYqLH8tUdNUmF5HbxxGZ9RXlBYc9oMKOAx/NuI uGCMhFBDCqfBX95Hv0zv0oBgEF60QEdoZ79UpJykFRbkhVTtv7J/DThwOZ/b1mMRr/J9 LGUFvw0T5t+GKr7bKoaWhc+uCDC/STs4xKhSa9pxyPLKvPoaBlNGZO9eT40V9KJi+yGn 0BsQ== X-Gm-Message-State: AOJu0Yyhtg2cPNvnwdhOnvVSmiUMsMGPGoFn4XU0M87c1HD7UEyish89 xqgTJQkaA5/UOnms29YMYEx/MCZ9SE15qLNvG2VsLRZ0wgXUvM3tV+7gZ/gnuyN1QWmNqk8wdDv 1 X-Received: by 2002:a05:600c:4f8d:b0:41b:85bf:f3a8 with SMTP id 5b1f17b1804b1-42138622459mr60251755e9.35.1717495122078; Tue, 04 Jun 2024 02:58:42 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42133d745aasm128622335e9.38.2024.06.04.02.58.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:58:41 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , "Edgar E . Iglesias" , =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= Subject: [PULL 28/32] hw/dma/xlnx_dpdma: Read descriptor into buffer, not into pointer-to-buffer Date: Tue, 4 Jun 2024 11:56:04 +0200 Message-ID: <20240604095609.12285-29-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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: Peter Maydell In fdf029762f501 we factored out the handling of reading and writing DMA descriptors from guest memory. Unfortunately we accidentally made the descriptor-read read the descriptor into the address of the buffer rather than into the buffer, because we didn't notice we needed to update the arguments to the dma_memory_read() call. Before the refactoring, "&desc" is the address of a local struct DPDMADescriptor variable in xlnx_dpdma_start_operation(), which is the correct target for the guest-memory-read. But after the refactoring 'desc' is the "DPDMADescriptor *desc" argument to the new function, and so it is already an address. This bug is an overrun of a stack variable, since a pointer is at most 8 bytes long and we try to read 64 bytes, as well as being incorrect behaviour. Pass 'desc' rather than '&desc' as the dma_memory_read() argument to fix this. (The same bug is not present in xlnx_dpdma_write_descriptor(), because there we are writing the descriptor from a local struct variable "DPDMADescriptor tmp_desc" and so passing &tmp_desc to dma_memory_write() is correct.) Spotted by Coverity: CID 1546649 Fixes: fdf029762f50101 ("xlnx_dpdma: fix descriptor endianness bug") Signed-off-by: Peter Maydell Reviewed-by: Edgar E. Iglesias Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240531124628.476938-1-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- hw/dma/xlnx_dpdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/dma/xlnx_dpdma.c b/hw/dma/xlnx_dpdma.c index dde4aeca40..a685bd28bb 100644 --- a/hw/dma/xlnx_dpdma.c +++ b/hw/dma/xlnx_dpdma.c @@ -619,7 +619,7 @@ static MemTxResult xlnx_dpdma_read_descriptor(XlnxDPDMAState *s, DPDMADescriptor *desc) { MemTxResult res = dma_memory_read(&address_space_memory, desc_addr, - &desc, sizeof(DPDMADescriptor), + desc, sizeof(DPDMADescriptor), MEMTXATTRS_UNSPECIFIED); if (res) { return res; From patchwork Tue Jun 4 09:56:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801406 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2313559wrw; Tue, 4 Jun 2024 03:00:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUWkKLdFHSXW6LzSLKC2SCw1i2eL2WLn8N+SvOCI5rD42tGTB01R5oVgKTC7xq1fdYKMX1RiSbygBsIMrhX5uxl X-Google-Smtp-Source: AGHT+IFE4x4kgly4d/5rxENakbx8qqPBX1v7XV0yKeZYzqN66ReWSlxQCCFBkEXmRhdoXQ3oWxKF X-Received: by 2002:a05:6122:3d04:b0:4eb:25b0:3d4b with SMTP id 71dfb90a1353d-4eb25b03fa7mr4551722e0c.4.1717495244345; Tue, 04 Jun 2024 03:00:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495244; cv=none; d=google.com; s=arc-20160816; b=yO37vQHHijNQbzBvdGrOoCNArDmFdPUS475uDDAIur+zgXZwIX2ha43ROLOc7aUsgm jEOivcp+g5fBQPMDIMhpFCji1in2+4OQ+7YLVdiEcfs4jGzzNSSjn1ibY6iKiskMunt/ 9XlhJAxiqKvJmPLS5FA+aFo+eKXVO/zW6EgfwfiFtHCj5sLS0/T/9kKljIRunVcOCNOZ UMalifmawpsbH7tSne5xVIwQ6rfq7cc5CZstWAH6CV3MQlN0T0ArsiCTcA/kgY1BQYMx HPz88RmYk93L3fKrfbr272MwD8xjBa0uXXhA5vgNC0NPizocVIu2gb9d4hztbNGa1xhd AzJw== 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=TGqa4LCtUPmfqT7FCKxDXiSWjLBqv6GKh2fc2iPwQg4=; fh=4EIU+To+k61gu4wc/4jcD/H+asbI8/06Tq0qZF9Dn6c=; b=xcOjTOai//BFKwW5DvQX9y/+rN+3BLJ0YIh7663Rs1+6WuzGRaSYSIq6mf8LXx6PXS tMGfZLs2cjWIVuQBofggTTl74lOukWpCALjA5QNNMCosS4AP9q9JR9yavrpQTKI8XPME GsTf2lgoTBm/wNUPteh4eVExn0/X29YzCSOfVNkBAp85hc4CTS3rzcXlvCjhYw7W6wL5 Q7g5Abetwz+Sq/YNG5hY+bqgUgnIkFEqqfsUu0EYZXN3W1N1woSasEVUBmXHw5WgUJF6 QuIxc33kYNjf1zKxFn2VyJme4j6W0O8qzTQGmZDxKL8R6UFoCQldxBt4DtY4hUJflluI 4g/g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Urb4x7Qt; 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 71dfb90a1353d-4eafee38fc1si1800527e0c.141.2024.06.04.03.00.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 03:00:43 -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=Urb4x7Qt; 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 1sEQwP-0007vL-Er; Tue, 04 Jun 2024 05:58:53 -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 1sEQwO-0007oK-Cu for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:58:52 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQwL-0002N0-SX for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:58:51 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-35dce610207so3378663f8f.2 for ; Tue, 04 Jun 2024 02:58:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495127; x=1718099927; 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=TGqa4LCtUPmfqT7FCKxDXiSWjLBqv6GKh2fc2iPwQg4=; b=Urb4x7Qt7N3XyuJxgXhZbii6bOtI0Sk3xMOqO5B5DlVLF4BntRwNHOW7B1XZfsnQRJ 18HlzU+aKV3giCPdW3If1j/m/DC16YoEklXrl2tYXoyXiKjYcKP9GbrO0a/WAYAvdg9E e6ZmYE2YaH6wvMSHkAek757cqajdJwTN4L+ng+/Crlf0rAWSiH14w1vXLZJAaUORNt3A q1Mlh0qsZT6N10hN1drLa+qp0lQWiUgj2kbIZQk/cLhzgWIed2xQ7m33z1s/5/7aHhx7 iQl5trgOYlfSw2uegTVSpnxzL1kq6CSuvP6stNa3E5H6X99fhstGXcpI6avsHK9fI/hx fV1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495127; x=1718099927; 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=TGqa4LCtUPmfqT7FCKxDXiSWjLBqv6GKh2fc2iPwQg4=; b=YrIQjH9lvC+JCNnzlrOgxg/94sD867u/k78jlppmulhbbzqN8u2YMKMLsfbcXC831j UmsYvRpfk/FrJHSoOYRkkPaKZ2wDozQssqAefXleMHJZicDNWlM/MrRpCRGKuJ/ZSuWh oaJXmAavgMtWL4sAjkyvn+rSYd5/HZHFmunZBkapLjU5NRGloAVydne+YuD1G2dZ+08d Nzas5EP/3Zx+9ToT2Utkac8e5W6YgYP2z44BBWv++T38lxW/zmxRby6TPzoFytHileui LHdnwcgOVFuDyUdZTz/Ss3VwwUOQCeE2qzXOUdFh4YAu7H//TM5KBjC//mZ1Fke9nXxF R75w== X-Gm-Message-State: AOJu0Yw3MoLluuSJPFGe5oopj+sEKxw0+AOCLh1ChuY3VpFoK/kjhbj/ giechi7eG6aQzcBO21Xo3toUjWoTpotcmDm1CwIS0RcOUJmavbqRXHStYD/BDHqfAy7mCm75q6f z X-Received: by 2002:adf:e88d:0:b0:351:c960:b5a2 with SMTP id ffacd0b85a97d-35e0f254f8amr10288142f8f.6.1717495127353; Tue, 04 Jun 2024 02:58:47 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd062ecd3sm11240886f8f.74.2024.06.04.02.58.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:58:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Harsh Prateek Bora , "Michael S . Tsirkin" , Markus Armbruster Subject: [PULL 29/32] hw/acpi: Remove the deprecated QAPI MEM_UNPLUG_ERROR event Date: Tue, 4 Jun 2024 11:56:05 +0200 Message-ID: <20240604095609.12285-30-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.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 The MEM_UNPLUG_ERROR event is deprecated since commit d43f1670c7 ("qapi/qdev.json: add DEVICE_UNPLUG_GUEST_ERROR QAPI event"), time to remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Harsh Prateek Bora Reviewed-by: Michael S. Tsirkin Reviewed-by: Markus Armbruster Message-Id: <20240530071548.20074-2-philmd@linaro.org> --- docs/about/deprecated.rst | 5 ----- docs/about/removed-features.rst | 9 +++++++++ qapi/machine.json | 28 ---------------------------- hw/acpi/memory_hotplug.c | 8 -------- hw/ppc/spapr.c | 11 +---------- 5 files changed, 10 insertions(+), 51 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 40585ca7d5..4a61894db6 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -151,11 +151,6 @@ property types. QEMU Machine Protocol (QMP) events ---------------------------------- -``MEM_UNPLUG_ERROR`` (since 6.2) -'''''''''''''''''''''''''''''''''''''''''''''''''''''''' - -Use the more generic event ``DEVICE_UNPLUG_GUEST_ERROR`` instead. - ``vcpu`` trace events (since 8.1) ''''''''''''''''''''''''''''''''' diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index fba0cfb0b0..f1e70263e2 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -671,6 +671,15 @@ Use ``multifd-channels`` instead. Use ``multifd-compression`` instead. +QEMU Machine Protocol (QMP) events +---------------------------------- + +``MEM_UNPLUG_ERROR`` (removed in 9.1) +''''''''''''''''''''''''''''''''''''' + +MEM_UNPLUG_ERROR has been replaced by the more generic ``DEVICE_UNPLUG_GUEST_ERROR`` event. + + Human Monitor Protocol (HMP) commands ------------------------------------- diff --git a/qapi/machine.json b/qapi/machine.json index bce6e1bbc4..453feb9347 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -1607,34 +1607,6 @@ { 'event': 'MEMORY_DEVICE_SIZE_CHANGE', 'data': { '*id': 'str', 'size': 'size', 'qom-path' : 'str'} } -## -# @MEM_UNPLUG_ERROR: -# -# Emitted when memory hot unplug error occurs. -# -# @device: device name -# -# @msg: Informative message -# -# Features: -# -# @deprecated: This event is deprecated. Use -# @DEVICE_UNPLUG_GUEST_ERROR instead. -# -# Since: 2.4 -# -# Example: -# -# <- { "event": "MEM_UNPLUG_ERROR", -# "data": { "device": "dimm1", -# "msg": "acpi: device unplug for unsupported device" -# }, -# "timestamp": { "seconds": 1265044230, "microseconds": 450486 } } -## -{ 'event': 'MEM_UNPLUG_ERROR', - 'data': { 'device': 'str', 'msg': 'str' }, - 'features': ['deprecated'] } - ## # @BootConfiguration: # diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c index de6f974ebb..9b974b7274 100644 --- a/hw/acpi/memory_hotplug.c +++ b/hw/acpi/memory_hotplug.c @@ -178,14 +178,6 @@ static void acpi_memory_hotplug_write(void *opaque, hwaddr addr, uint64_t data, hotplug_handler_unplug(hotplug_ctrl, dev, &local_err); if (local_err) { trace_mhp_acpi_pc_dimm_delete_failed(mem_st->selector); - - /* - * Send both MEM_UNPLUG_ERROR and DEVICE_UNPLUG_GUEST_ERROR - * while the deprecation of MEM_UNPLUG_ERROR is - * pending. - */ - qapi_event_send_mem_unplug_error(dev->id ? : "", - error_get_pretty(local_err)); qapi_event_send_device_unplug_guest_error(dev->id, dev->canonical_path); error_free(local_err); diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 4345764bce..81a187f126 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3786,7 +3786,6 @@ void spapr_memory_unplug_rollback(SpaprMachineState *spapr, DeviceState *dev) SpaprDrc *drc; uint32_t nr_lmbs; uint64_t size, addr_start, addr; - g_autofree char *qapi_error = NULL; int i; if (!dev) { @@ -3823,16 +3822,8 @@ void spapr_memory_unplug_rollback(SpaprMachineState *spapr, DeviceState *dev) /* * Tell QAPI that something happened and the memory - * hotunplug wasn't successful. Keep sending - * MEM_UNPLUG_ERROR even while sending - * DEVICE_UNPLUG_GUEST_ERROR until the deprecation of - * MEM_UNPLUG_ERROR is due. + * hotunplug wasn't successful. */ - qapi_error = g_strdup_printf("Memory hotunplug rejected by the guest " - "for device %s", dev->id); - - qapi_event_send_mem_unplug_error(dev->id ? : "", qapi_error); - qapi_event_send_device_unplug_guest_error(dev->id, dev->canonical_path); } From patchwork Tue Jun 4 09:56:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801401 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2313231wrw; Tue, 4 Jun 2024 03:00:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX17D/H8sYRffNKMtQlEmBjxbD04Y1jkik7tt7Dss28sGOs1V2HgapaDG5Mn5Wt58KhHaVAgoabKZieW9cQeQX/ X-Google-Smtp-Source: AGHT+IFp4pYhfs+MMnj7NK/Stxn5kMilVm5d0oyLJhPqJ+qsWuHiW+uGrZOARBoy+6rBApxotr40 X-Received: by 2002:a05:6808:6241:b0:3d1:feb9:91aa with SMTP id 5614622812f47-3d1feb99364mr968499b6e.53.1717495205431; Tue, 04 Jun 2024 03:00:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495205; cv=none; d=google.com; s=arc-20160816; b=DDJ3siaD1QCgmOYIa6l3MwW82ulIU0A2erAO5iPOUicfOcSiKcIO58FkccbiH0Pfv4 gskDWT0ogvGa1H+vEhhi+RFiXD4ECd5YXS2gzPNSA63qorkuLjwTYv/6O+EBVVhDFYfc POgX+s+mGfUe8eNEfbRn1A9t9lJYG4mCWZ8h5Hv1vSSMM2oY60NXBlW1V/YTxEgmcuFf v7V4f74JOQbsnCP1xinCIrfwpmZWQ7z+AyzAF+1BiFYPbzzgFVVEmVsFCqyimr36jlt5 JSDzXTyvDGZkJNv9Bm2jm8tJ7RbnG/C9nIwnjGOhn1fo5wCQo7zD28MwBqdyQY7EXg3k BjJg== 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=/VTJJ/3m83pWTt3riL5Bvq0vb1UCAyg2JZO38z+luX4=; fh=cLh4tTJ3A08xQTWyFBNFItLymydm0viGxdVkFDofS3Q=; b=l8AOQVrVRG7f6PAuvmdjtbfLenQfgoH2VL6iE3qIJSMLwi3WquCf5WPYppOBFzNEty p7oy2ggRzaNQe0M8y+dh5PyB/uF4Yiso2RfGfdk2gFmyl+Oahli9fR4Vq9AHGi8vie0+ ICjBOvdAY0SRDnvtQ79iCNsNGU0B+ypBle8riSMZW44/qjdn7Lta0JUxqC+B5MNrnUKk MXQQA2jNIt1xAkjvmyZ2BWGYd52Tx3A1CMQekt9cuUSvhdvSuNODlQC1/On3VRffBhGt BVOg029toJ8xEsqemws1+lPwSKRZx/uDx8bHzLH5HhEH+Ceeq6GaXKBmWHEPyavt1Mi3 lhwg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KvpsUzmj; 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-6ae4b43ec45si104748996d6.595.2024.06.04.03.00.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 03:00: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=KvpsUzmj; 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 1sEQwW-0008Ol-Vx; Tue, 04 Jun 2024 05:59:01 -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 1sEQwV-0008E4-1A for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:58:59 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQwR-0002Nd-3T for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:58:57 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-42120fc8cbfso41562405e9.2 for ; Tue, 04 Jun 2024 02:58:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495133; x=1718099933; 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=/VTJJ/3m83pWTt3riL5Bvq0vb1UCAyg2JZO38z+luX4=; b=KvpsUzmjeAIsoBkpuFu0LsS9A2O6+YycXDc7FJpCAkAkAPxb8Zl+wJywdqkQCpkSJ6 NBYEkDHCn95PeK9mi32Y7eFNWMSCc5pLPjB4qbmENOdRM5T55L4TP7PTN6L7S2Zfynvj lc4whVD+oAa1A6ifPn8esKu1gp9ktP8567XOsX3D5tbIMCu6gID0sn+jri3LI5os5dvI BvVVIW0EZCjUrZrTVahCSoS3RkkLpEw3h5IjWO5AjuQXY8/Dqc4QL9nbgCbzr8FjfB+z DaiWmPg+s1WOjbTz53M/DsnKfPlP2wHvTnbOi6DSI2wFgCnYKTyiI/wNnT36NPP7w2SN 9f4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495133; x=1718099933; 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=/VTJJ/3m83pWTt3riL5Bvq0vb1UCAyg2JZO38z+luX4=; b=LiThmH5aI3AwIbWl54S2kZ1u6j9DBg/30UgJ8fzETfe/1L+/gUqMLY9yyAkeuyjDM0 WkK7atpiyBpCe3fkM2Ab/mThhv+4woWEm6haEqKb6G74BXCyirH5he9sAUKDiX5p/RY8 3tb2CT68jW8nwXtKjFuwX4k4lAtnfUeJvBJBaILe5ffX1w/zeowJrWm/p5G0OcjW8/vM iAsFj34nprvc1KUG+nbnBzoWsGtnkw78hA63EEMvqTpWge1xkQSkzfwl8kKqJxllWI1T XTDBfCLIyOGN5DQLO1GBrmQ9tCE6qlV8VwhXBUJm2VCnUeeATRvdzaerxzG61BOCQfzL mvzA== X-Gm-Message-State: AOJu0YwPfC13Vc/icIq+j2YuILe/wNLAUol0lbQXOLSRb+Qgvd9EQWKz ybEa7NVyCQ4VrcrbktYClYik3ff7vMCn7e+X8Tmj/kANf2aKAHXICEhnLeoNKGIpIGmwHuHpqwq 9 X-Received: by 2002:a05:600c:5488:b0:421:3464:dc7a with SMTP id 5b1f17b1804b1-4213464df71mr84635205e9.39.1717495133228; Tue, 04 Jun 2024 02:58:53 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4214a9ff986sm19161995e9.42.2024.06.04.02.58.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:58:52 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Michael S . Tsirkin" , Markus Armbruster Subject: [PULL 30/32] trace: Remove deprecated 'vcpu' field from QMP trace events Date: Tue, 4 Jun 2024 11:56:06 +0200 Message-ID: <20240604095609.12285-31-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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 'vcpu' fields are deprecated since commit 5485e52a33 ("qapi: make the vcpu parameters deprecated for 8.1"), time to remove them. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Reviewed-by: Markus Armbruster Message-Id: <20240530071548.20074-3-philmd@linaro.org> --- docs/about/deprecated.rst | 11 ----------- docs/about/removed-features.rst | 6 ++++++ qapi/trace.json | 27 +++------------------------ trace/qmp.c | 2 -- trace/trace-hmp-cmds.c | 4 ++-- 5 files changed, 11 insertions(+), 39 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 4a61894db6..187c8a3f97 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -148,17 +148,6 @@ accepted incorrect commands will return an error. Users should make sure that all arguments passed to ``device_add`` are consistent with the documented property types. -QEMU Machine Protocol (QMP) events ----------------------------------- - -``vcpu`` trace events (since 8.1) -''''''''''''''''''''''''''''''''' - -The ability to instrument QEMU helper functions with vCPU-aware trace -points was removed in 7.0. However QMP still exposed the vcpu -parameter. This argument has now been deprecated and the remaining -remaining trace points that used it are selected just by name. - Host Architectures ------------------ diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index f1e70263e2..1e64c27cd8 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -679,6 +679,12 @@ QEMU Machine Protocol (QMP) events MEM_UNPLUG_ERROR has been replaced by the more generic ``DEVICE_UNPLUG_GUEST_ERROR`` event. +``vcpu`` trace events (removed in 9.1) +'''''''''''''''''''''''''''''''''''''' + +The ability to instrument QEMU helper functions with vCPU-aware trace +points was removed in 7.0. + Human Monitor Protocol (HMP) commands ------------------------------------- diff --git a/qapi/trace.json b/qapi/trace.json index 043d12f83e..9ebb6d9eaf 100644 --- a/qapi/trace.json +++ b/qapi/trace.json @@ -35,17 +35,10 @@ # # @state: Tracing state. # -# @vcpu: Whether this is a per-vCPU event (since 2.7). -# -# Features: -# -# @deprecated: Member @vcpu is deprecated, and always ignored. -# # Since: 2.2 ## { 'struct': 'TraceEventInfo', - 'data': {'name': 'str', 'state': 'TraceEventState', - 'vcpu': { 'type': 'bool', 'features': ['deprecated'] } } } + 'data': {'name': 'str', 'state': 'TraceEventState' } } ## # @trace-event-get-state: @@ -54,12 +47,6 @@ # # @name: Event name pattern (case-sensitive glob). # -# @vcpu: The vCPU to query (since 2.7). -# -# Features: -# -# @deprecated: Member @vcpu is deprecated, and always ignored. -# # Returns: a list of @TraceEventInfo for the matching events # # Since: 2.2 @@ -71,8 +58,7 @@ # <- { "return": [ { "name": "qemu_memalign", "state": "disabled", "vcpu": false } ] } ## { 'command': 'trace-event-get-state', - 'data': {'name': 'str', - '*vcpu': {'type': 'int', 'features': ['deprecated'] } }, + 'data': {'name': 'str' }, 'returns': ['TraceEventInfo'] } ## @@ -86,12 +72,6 @@ # # @ignore-unavailable: Do not match unavailable events with @name. # -# @vcpu: The vCPU to act upon (all by default; since 2.7). -# -# Features: -# -# @deprecated: Member @vcpu is deprecated, and always ignored. -# # Since: 2.2 # # Example: @@ -101,5 +81,4 @@ # <- { "return": {} } ## { 'command': 'trace-event-set-state', - 'data': {'name': 'str', 'enable': 'bool', '*ignore-unavailable': 'bool', - '*vcpu': {'type': 'int', 'features': ['deprecated'] } } } + 'data': {'name': 'str', 'enable': 'bool', '*ignore-unavailable': 'bool' } } diff --git a/trace/qmp.c b/trace/qmp.c index 3e3971c6a8..074a27b204 100644 --- a/trace/qmp.c +++ b/trace/qmp.c @@ -48,7 +48,6 @@ static bool check_events(bool ignore_unavailable, bool is_pattern, } TraceEventInfoList *qmp_trace_event_get_state(const char *name, - bool has_vcpu, int64_t vcpu, Error **errp) { TraceEventInfoList *events = NULL; @@ -86,7 +85,6 @@ TraceEventInfoList *qmp_trace_event_get_state(const char *name, void qmp_trace_event_set_state(const char *name, bool enable, bool has_ignore_unavailable, bool ignore_unavailable, - bool has_vcpu, int64_t vcpu, Error **errp) { TraceEventIter iter; diff --git a/trace/trace-hmp-cmds.c b/trace/trace-hmp-cmds.c index 86211fce27..d38dd600de 100644 --- a/trace/trace-hmp-cmds.c +++ b/trace/trace-hmp-cmds.c @@ -40,7 +40,7 @@ void hmp_trace_event(Monitor *mon, const QDict *qdict) Error *local_err = NULL; qmp_trace_event_set_state(tp_name, new_state, - true, true, false, 0, &local_err); + true, true, &local_err); if (local_err) { error_report_err(local_err); } @@ -82,7 +82,7 @@ void hmp_info_trace_events(Monitor *mon, const QDict *qdict) name = "*"; } - events = qmp_trace_event_get_state(name, false, 0, &local_err); + events = qmp_trace_event_get_state(name, &local_err); if (local_err) { error_report_err(local_err); return; From patchwork Tue Jun 4 09:56:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801407 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2313749wrw; Tue, 4 Jun 2024 03:01:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXw0WzwZMMPMAcKigNs0LLMGJOoOsZNsOaS2N7U+PisOBJLmDVRFe/QKEfqsGz+V684s+k7lgxK/A+OnbcIS5xe X-Google-Smtp-Source: AGHT+IHXEcXOVMO1lQPv5hRT0XYFjmeYtgNO5e0B/M+6bxHrSXz/hQVgDgtEhZFe9NcXCFGU9wTy X-Received: by 2002:a05:6102:f0b:b0:48b:e71a:32a2 with SMTP id ada2fe7eead31-48be71a3ed2mr5593252137.9.1717495267436; Tue, 04 Jun 2024 03:01:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495267; cv=none; d=google.com; s=arc-20160816; b=qk9gd5+YX1cy3cZCbVTXunueC6tHOu/S/Y36Mg+vUbt/3nVAKxoVKOLyKOn6cLQLk0 tcwqee7bMWNSdXQU/U77bAVPUqp0Cgh4eq6u02+vlLmYxlQzsvKRKQYVtFVjwl8BblIb uz4smaDp2/R/GYFyxCS3KtaBRKYV769xHdptTX8hrzbyJ64FfBpT8ZB9dk2vcBjS1zNu UC8YWJH1e7VOLKd/oF2YfWbaPM6rifBY+z8wN5aRfpu2gyQEsdDTxC9RjWCmLhGy7NjS 0ZzaI5CBmwYEfLNO43uqlLKFEsxZGfgf4JQYxlJBERFqkApbVbYNwfZPT4nTR31VTLgS QoPw== 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=9IPOKJ4bfj8H7u0AOUJYW14UBzQ/mD/AN0ShzwkJT0k=; fh=UaefZp8As2NcnO9sPapv1Q8zVSWf85E7odbBRt0VnyE=; b=EtnzrXHa7kHSe7U7xGQ0Vvu5VbrpTpbusARNpJlqNSIkAix6+5fl/GCKDxhIGCdAFU IoGAskDmKa+NGp076Rh9Qf9n6ZiXUYQDlBN8jcInIvt1/tkvgsPXBW4ud5fp6D2/8B0F QY4OsBbmtIKVeahu9K0NUogvFNC/D19x6c5D0T1fGxjsAKp36/giGjPga650vlge+z2U urpQz4Nf2k3TbVKtBqnsSSaerWKm/MUqZaczxtFYxgpUSiJvpgzo5RqZiPPJskth/Dm3 9ILP1P2CtobPojHsKwz7zrQvbsOfda09JVrjvvRdK5gNoYs61KPuiyiIe0EB4R43OR3/ 4xvA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VgZEP1IY; 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 a1e0cc1a2514c-80adee92973si1342447241.147.2024.06.04.03.01.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 03:01:07 -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=VgZEP1IY; 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 1sEQwa-0000Ho-Vs; Tue, 04 Jun 2024 05:59:05 -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 1sEQwY-00005r-WE for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:59:03 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQwW-0002Nw-LS for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:59:02 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-35e4aaa0f33so2674293f8f.0 for ; Tue, 04 Jun 2024 02:59:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495139; x=1718099939; 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=9IPOKJ4bfj8H7u0AOUJYW14UBzQ/mD/AN0ShzwkJT0k=; b=VgZEP1IYaLhEiCZmyujtyr86zlGWl+CP/mOsP8mykez41DaUhSulyycGdr6MuAB6b8 xftFDoiUqK+gGSiy/gJ6GwwY8JNU3hXOPbzUgU5Ud6gAavqktLqu/qB1y43ihNIR/D5y vna/D9AjX24NNvjYWrMCkwCJvjV4kqHLQCCFCzAMimfKwX5BrcvgGZfMSIpvOrh/o9WG 0nMH4O/d3hxv1AW+u3B8fTJsPH38TYUPWjJ83DizooQuL2xElGadac6l5F5ui/BTYzdj k+4z7Im43hBQZv63dlcWGq5vfUD8vPWj0XMb7KxQNpmYgkyQhpjg3zO1ovaWI48j04Za HxlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495139; x=1718099939; 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=9IPOKJ4bfj8H7u0AOUJYW14UBzQ/mD/AN0ShzwkJT0k=; b=LVVLaHKXxrTjrtFGDYS0OTbg32lZnxO0DVI9/IAJ8pQSKevKMawfJAAHr+oYEJH6oy VrbUNirKwnpf0QPVBx3yqp9c6jptEtTZjCVrKo+iSbONCeVErEHFyaMQkQpDbQ8GYfQi 2JWIRGdYS8iAW6RTa51vlnJljWqVJn8EXbdjiJYtJgbW293XNQUJHks/Tu7EzWBZsRVK eB9+RnjaFaPLuaIpexOJDnxWao7AvHS7uOZwGrMdjafo93dBs2SOlsym7n9hBkNgn/rC ln/RHpOKjCMs8Tsv9RVbkPnHb7DL4f/cCpzcelbkNGKZTOC7AiFWvJIFwDWb3NTth1fv X3aw== X-Gm-Message-State: AOJu0YxtKbiHDKaGwUt/TriDlf0XA1D18/MM/mh06NqwBKp7jzDLHG9b QIGoMEAvJCKhsqXjrU9IoWZ88e5IyySOiG1o1Ism3oOziW4Mn0kAxVwNnDKHqkhgGnz5X6MxYia E X-Received: by 2002:adf:f68b:0:b0:354:e729:c101 with SMTP id ffacd0b85a97d-35e0f2551f3mr9370060f8f.12.1717495138820; Tue, 04 Jun 2024 02:58:58 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd04c0f7esm11074701f8f.22.2024.06.04.02.58.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:58:58 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Konstantin Kostiuk Subject: [PULL 31/32] qga: Remove deprecated 'blacklist' argument / config key Date: Tue, 4 Jun 2024 11:56:07 +0200 Message-ID: <20240604095609.12285-32-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.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 The 'blacklist' argument / config key are deprecated since commit 582a098e6c ("qga: Replace 'blacklist' command line and config file options by 'block-rpcs'"), time to remove them. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Konstantin Kostiuk Message-Id: <20240530070413.19181-1-philmd@linaro.org> --- docs/about/deprecated.rst | 18 ------------------ docs/about/removed-features.rst | 18 ++++++++++++++++++ qga/main.c | 6 ------ 3 files changed, 18 insertions(+), 24 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 187c8a3f97..a6f4655a3a 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -462,24 +462,6 @@ versions, aliases will point to newer CPU model versions depending on the machine type, so management software must resolve CPU model aliases before starting a virtual machine. -QEMU guest agent ----------------- - -``--blacklist`` command line option (since 7.2) -''''''''''''''''''''''''''''''''''''''''''''''' - -``--blacklist`` has been replaced by ``--block-rpcs`` (which is a better -wording for what this option does). The short form ``-b`` still stays -the same and thus is the preferred way for scripts that should run with -both, older and future versions of QEMU. - -``blacklist`` config file option (since 7.2) -'''''''''''''''''''''''''''''''''''''''''''' - -The ``blacklist`` config file option has been renamed to ``block-rpcs`` -(to be in sync with the renaming of the corresponding command line -option). - Migration --------- diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index 1e64c27cd8..210a90bee8 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -1144,4 +1144,22 @@ stable for some time and is now widely used. The command line and feature set is very close to the removed C implementation. +QEMU guest agent +---------------- + +``--blacklist`` command line option (removed in 9.1) +'''''''''''''''''''''''''''''''''''''''''''''''''''' + +``--blacklist`` has been replaced by ``--block-rpcs`` (which is a better +wording for what this option does). The short form ``-b`` still stays +the same and thus is the preferred way for scripts that should run with +both, older and future versions of QEMU. + +``blacklist`` config file option (removed in 9.1) +''''''''''''''''''''''''''''''''''''''''''''''''' + +The ``blacklist`` config file option has been renamed to ``block-rpcs`` +(to be in sync with the renaming of the corresponding command line +option). + .. _Intel discontinuance notification: https://www.intel.com/content/www/us/en/content-details/781327/intel-is-discontinuing-ip-ordering-codes-listed-in-pdn2312-for-nios-ii-ip.html diff --git a/qga/main.c b/qga/main.c index bdf5344584..f4d5f15bb3 100644 --- a/qga/main.c +++ b/qga/main.c @@ -1071,11 +1071,6 @@ static void config_load(GAConfig *config) g_key_file_get_boolean(keyfile, "general", "retry-path", &gerr); } - if (g_key_file_has_key(keyfile, "general", "blacklist", NULL)) { - g_warning("config using deprecated 'blacklist' key, should be replaced" - " with the 'block-rpcs' key."); - blockrpcs_key = "blacklist"; - } if (g_key_file_has_key(keyfile, "general", blockrpcs_key, NULL)) { config->bliststr = g_key_file_get_string(keyfile, "general", blockrpcs_key, &gerr); @@ -1190,7 +1185,6 @@ static void config_parse(GAConfig *config, int argc, char **argv) { "path", 1, NULL, 'p' }, { "daemonize", 0, NULL, 'd' }, { "block-rpcs", 1, NULL, 'b' }, - { "blacklist", 1, NULL, 'b' }, /* deprecated alias for 'block-rpcs' */ { "allow-rpcs", 1, NULL, 'a' }, #ifdef _WIN32 { "service", 1, NULL, 's' }, From patchwork Tue Jun 4 09:56:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 801400 Delivered-To: patch@linaro.org Received: by 2002:a5d:65c4:0:b0:35b:5a80:51b4 with SMTP id e4csp2313221wrw; Tue, 4 Jun 2024 03:00:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWOJSxvpeo08tfo7cVs3D67fBSVSoJGuPFGYTN0s3SGzZnXwQoeGi7OXJe9gB/ASZE8aKQLW3nSRS0ldjqTv8jU X-Google-Smtp-Source: AGHT+IHyvwRV4c+p6K2eAUowLj7LOiblZoynFOr5UU0SA2WnD+euQu3JSRD4ImECcnbHiQLhPiLu X-Received: by 2002:a25:c781:0:b0:dfa:58c1:1a85 with SMTP id 3f1490d57ef6-dfa73ddbefdmr11059203276.61.1717495203867; Tue, 04 Jun 2024 03:00:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717495203; cv=none; d=google.com; s=arc-20160816; b=f6O89RiZsqSI8cNOYLOi/aE10gUvuufwOAT+BuPY6BzMxzlV6YZQ+JH0VaKkfnnJJO P2IMT4c8+NYJTbQrFShHWalzd9kvr35do40znCtgXr48mPyxPXAFtDpPt0JrV58WHSFL D/HVgydoFYYGYLgrO6zr2Gb0zG7H6NmLXVxSHAS6BJbhDvRdW92I5e96chpzMJsmVfoP Yg77UttTFCCVYDvEXNVbGG+jcI8+LaQGzMxlvi/sGRa1sZZyhm2eMCccI7LRzV7P77LJ MO5w0SRE1sFwRcPVp33b9XIbGUjB2oLyhBWWCOqDUQqy2tRwQXwI1RXZOFkZN3OkTuCJ SXpQ== 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=aW7ooiPiVQKiciK9tXurprOszVnnccUrkSkxiG1Z0Yg=; fh=f4FtafOBubf2PK98ufaMRCPWDpJlJXLdQd2/hBb4YO8=; b=q/M3X5LaypPuGN1g8nqogJPLhXUuvDKFUJ1d1aWnKB6qec1M2fJFNAcK8ijHkMzJed TWj97Ih/jqevTGAioEtzYJ0rMO9d5oqMj/PNNo+0dpHjHtE/gka9I3zG3UfH9rV3DoQz d4d6UNCzcdOK6WAr43tJ19xHbnqwtYn6qZ70IXSCbYUGIWZnVvmxvlh5O7OeQjSAIH4q BCHvs77s647iAWvCUx90f3wriyjkXHyNX5IGNh5nPV06NTiwxJv2TzjYNH8aGUG/6YHS m3rQ/VJbSQWJuUToZ1hpkCijPOUQOWwKjF4fWmUZfRmlxfPj/Itg0UOEKaK5aRfe+RAb pyoQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IvnQi8a1; 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-43ff259d1c4si101166601cf.559.2024.06.04.03.00.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2024 03:00:03 -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=IvnQi8a1; 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 1sEQwi-0000Sq-MM; Tue, 04 Jun 2024 05:59:14 -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 1sEQwd-0000NX-S6 for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:59:11 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEQwc-0002OT-6A for qemu-devel@nongnu.org; Tue, 04 Jun 2024 05:59:07 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-42134bb9735so29712195e9.1 for ; Tue, 04 Jun 2024 02:59:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717495144; x=1718099944; 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=aW7ooiPiVQKiciK9tXurprOszVnnccUrkSkxiG1Z0Yg=; b=IvnQi8a1g1K3LIsJaeJ3deUtiTfX3P5ndzfeybPQz59OObA58BZ5dx0Iv9ODxc3joq ctfxSvuASzT/Asek96eNPIf0aqk/BTqC/bLn6VOvLwdLqIFwflvaAd6KJvjfc/NMXXxl AG7aO4CzBRmV5jued/Dkd8GlGcGH0Prn2GcmNWNFfcOXrbSvyPVK2QX78Tc5wk2TFqEf 0DIPTlxIGUx0545WBJLjUqsshY2aLwQIF/UthV7QUOemBY17EtaQpaSD9YJNQteQXj1e RWXIE/X18KwSr1i4NDH9pV0RDOP/4ktw0pUwlSQSHf1+A39cSv8PMEekdXQMoAiYS9LL +9fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717495144; x=1718099944; 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=aW7ooiPiVQKiciK9tXurprOszVnnccUrkSkxiG1Z0Yg=; b=AJ46G24ZMd+1FnkLblTaIhkRhUBISi/S6HZTypvVrSO31MSItnbt+yGdMrPRn8Zfa8 inWKBWAB9NB3IMo3W3BYIRcdnP53OJncVIV2SR30m1S3OilAl7I8ILSTh5nrNnoEdUvL KL5q66ZGVD26ddDfGYFljyWt6NnMexg2oBN/s9lQ+BOKM9fuKqlh+2Gmgkk5/2noKB7S icoNcILYazO/hB+WC9qta42hVkhf+vHnt3HGm2fzckRgXZExP3hIaz3uC38FZZhZqVtV VjaQmAq9yUd5FR7whDjtKqFO0ceV+0WI9Yxo/flS/FaObtKKWTeOBIBiKtBKEsUHsvBN JhIw== X-Gm-Message-State: AOJu0YxA82F7XO3K274L4Jarls/C8aoJdtH/kk19WXcnhIOHh+R5ntNt LU6N3um4lQroRtTEY2eiqB8A6+LhTd6QoVtBc2Hq0C09vSgMhn1YKFZUEpNEbol3bJ91gIe/Gsu o X-Received: by 2002:a05:600c:511c:b0:421:2df7:beb8 with SMTP id 5b1f17b1804b1-4212e05ea16mr102835835e9.14.1717495144565; Tue, 04 Jun 2024 02:59:04 -0700 (PDT) Received: from m1x-phil.lan ([176.176.159.34]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4215310c7easm9559885e9.12.2024.06.04.02.59.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 04 Jun 2024 02:59:04 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 32/32] usb: add config options for the hub and hid devices Date: Tue, 4 Jun 2024 11:56:08 +0200 Message-ID: <20240604095609.12285-33-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240604095609.12285-1-philmd@linaro.org> References: <20240604095609.12285-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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: Gerd Hoffmann Signed-off-by: Gerd Hoffmann Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240530112718.1752905-3-kraxel@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/Kconfig | 10 ++++++++++ hw/usb/meson.build | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig index f569ed7eea..84bc7fbe36 100644 --- a/hw/usb/Kconfig +++ b/hw/usb/Kconfig @@ -65,6 +65,16 @@ config TUSB6010 bool select USB_MUSB +config USB_HUB + bool + default y + depends on USB + +config USB_HID + bool + default y + depends on USB + config USB_TABLET_WACOM bool default y diff --git a/hw/usb/meson.build b/hw/usb/meson.build index 23f7f7acb5..d7de1003e3 100644 --- a/hw/usb/meson.build +++ b/hw/usb/meson.build @@ -35,8 +35,8 @@ system_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files('xlnx-versal-usb2-ctrl- system_ss.add(when: 'CONFIG_XLNX_USB_SUBSYS', if_true: files('xlnx-usb-subsystem.c')) # emulated usb devices -system_ss.add(when: 'CONFIG_USB', if_true: files('dev-hub.c')) -system_ss.add(when: 'CONFIG_USB', if_true: files('dev-hid.c')) +system_ss.add(when: 'CONFIG_USB_HUB', if_true: files('dev-hub.c')) +system_ss.add(when: 'CONFIG_USB_HID', if_true: files('dev-hid.c')) system_ss.add(when: 'CONFIG_USB_TABLET_WACOM', if_true: files('dev-wacom.c')) system_ss.add(when: 'CONFIG_USB_STORAGE_CORE', if_true: files('dev-storage.c')) system_ss.add(when: 'CONFIG_USB_STORAGE_BOT', if_true: files('dev-storage-bot.c'))