From patchwork Fri May 3 15:36: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: 1931083 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=SWG7IwiF; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VWFK84lnMz1ydX for ; Sat, 4 May 2024 01:36:44 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2uxh-0002fQ-Se; Fri, 03 May 2024 11:36: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 1s2uxe-0002dJ-ON for qemu-devel@nongnu.org; Fri, 03 May 2024 11:36:34 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2uxU-0002gu-RM for qemu-devel@nongnu.org; Fri, 03 May 2024 11:36:34 -0400 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a598e483ad1so201169466b.1 for ; Fri, 03 May 2024 08:36:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714750581; x=1715355381; 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=qelxLGP2VCXMcEaYFfotFC/hB/WzQHtK8MoPoOxRZLk=; b=SWG7IwiF0hlbTzKfHggGbvPMrDm2eq+V2hDWynWlf71l1HEMpkjkvJZ953/WpJNqvl sE+oKstxVoAHqapwzYgfF4yy35JfgxAM3LTLHaeVxPLJ6syCh7fVxTE6oHzZtOporS21 +vqts7ObvVFxBxmLmdUPI6Zx0fFrJ0IJdlI1OL4eRu2pGiIlg6Eczmc8WfELBedEKD16 glE/aT8RtC2ShGjCsH8OcoTThwW9KP5fE4HHWH2VsWhN+YadhZETQ6YrurgrFEHudGVv rG/uYkRztR+pbXEAEN099Paga7O4psHbPkaA0QNnkDD+mQQVsA/rm+ZjRR8CdWGmId62 jv9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714750581; x=1715355381; 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=qelxLGP2VCXMcEaYFfotFC/hB/WzQHtK8MoPoOxRZLk=; b=xNAkCdHc2+wOHNwwXsDgPFeATVhp15bppO9Ay4cWChYBxXe8Kj1UyPAL1vq3DMhcQZ X70oMhAESt28ZMgB/DXkNclnk8/cz7AQUnAQazV+yT7RO5nDPbY2aPB8oCKbwJ1ey2rR AYK6tgG150te4143BdpqeIimboUC49fyhljrjWO3t8B0uu+dMSYLDYOjkUrEITE97vKa 6p4IuSZyhcWXJwOKn3fMP6Yr3q9/g8NWKAtGOn6Ds4aW6XFmWt8iIEN/Vw81BAz2tx8j l5LKu6Jf24zePfxvHoiIOZk7Y9VcK8PldUL0PX9UenGH6f+3OVV+zq9c95TgCjmVs7JV 8FuQ== X-Gm-Message-State: AOJu0YwBEWSv+PWqH3RZikcaK4IwI5M5T9LD6RdTylTefGU3kI7dXfsD yttJcFkmnyjtS686CsYnsSlGNmoYa++ECoobAqF8WztJ2m3uzuVUJqSdt45q5H3GqIlOqsW4E65 I X-Google-Smtp-Source: AGHT+IHP8UgbbxZJkY2wPsKk10m+06Fv5PmLStsZ2jm39BEBjX6hxZnELZdZjJRlxNGSwgNNkwXtjQ== X-Received: by 2002:a50:cccf:0:b0:56e:2cfc:1d3d with SMTP id b15-20020a50cccf000000b0056e2cfc1d3dmr1662067edj.16.1714750580994; Fri, 03 May 2024 08:36:20 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id p4-20020a056402074400b00572b2ad900fsm1763494edy.46.2024.05.03.08.36.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 08:36: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?= , =?utf-8?q?V?= =?utf-8?q?olker_R=C3=BCmelin?= , Richard Henderson Subject: [PULL 01/14] accel/nvmm: Fix NULL dereference in nvmm_init_vcpu() Date: Fri, 3 May 2024 17:36:00 +0200 Message-ID: <20240503153613.38709-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503153613.38709-1-philmd@linaro.org> References: <20240503153613.38709-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=philmd@linaro.org; helo=mail-ej1-x62b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org When mechanically moving the @dirty field to AccelCPUState in commit 79f1926b2d, we neglected cpu->accel is still NULL when we want to dereference it. Reported-by: Volker Rümelin Suggested-by: Volker Rümelin Fixes: 79f1926b2d ("accel/nvmm: Use accel-specific per-vcpu @dirty field") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240429091918.27429-3-philmd@linaro.org> --- target/i386/nvmm/nvmm-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c index f9cced53b3..65768aca03 100644 --- a/target/i386/nvmm/nvmm-all.c +++ b/target/i386/nvmm/nvmm-all.c @@ -982,7 +982,7 @@ nvmm_init_vcpu(CPUState *cpu) } } - cpu->accel->dirty = true; + qcpu->dirty = true; cpu->accel = qcpu; return 0; From patchwork Fri May 3 15:36: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: 1931086 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=lS/lf9U/; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VWFLG2twDz1ydX for ; Sat, 4 May 2024 01:37:42 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2uxj-0002jw-7f; Fri, 03 May 2024 11:36: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 1s2uxf-0002dh-EC for qemu-devel@nongnu.org; Fri, 03 May 2024 11:36:36 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2uxY-0002iW-5v for qemu-devel@nongnu.org; Fri, 03 May 2024 11:36:34 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a5544fd07easo1415802966b.0 for ; Fri, 03 May 2024 08:36:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714750586; x=1715355386; 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=wFd49aZe/euzrWDlHUHUg155F0vz6PnPtpjDws04jXo=; b=lS/lf9U/3LarHv/N0KnfdsehswvsngOToa+iTJRnVXHUyr6AiYvVbPw+yBsgiSE9L3 45H4bk9PUfnQJR70IPvA3RSp6BhUEF3mnE9r1uZBlFmSm6F9vA583So8vpvilBYC3gbI Z7o0thmPU/kmle5RI0JDDTQr0JISJplgoP5S8BfgWsdZ/dAT4eAUM3YaEPYQbBhKn6Bf OidCPn36x9Af7wTxDGAAISm4dvitWi/UEoAyxJmTNX9+8ZOIacavfrQBf8VtUzlS2lPN bh1KdUMZboD7MDh2Fr8j+QWUgi0zPdsROEXPTsTzJ0xsVarpcZE0wAr96kXESt+i5QXP uWfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714750586; x=1715355386; 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=wFd49aZe/euzrWDlHUHUg155F0vz6PnPtpjDws04jXo=; b=L7Z88KN/2UQ9GtPEpX/m3soy/rm0ARFVPHSzCKfCFM5IfVFc+kBa3WaWEx5u/kGPSn 8RHduo0TGk78+4qw5tZF6/ecdW0Fbn1FFyO4tXuI9Neo7BvqiFv0uTEk4QCjF2UGeWud UPFjNelogcIrKNgkb/oiQoOZn5+OFl6fi4aMdlOMMfnUuddnpd+p+dLNPDM6o+2ahHrU dwBfdi9kirLxJ/6R+YbEL9uLt6LriCjDuWqrYUI4nFHzHmLyKW19WBp9UjppOIqRTW9z zvoCrzDNynRbsrRzaD5VuqQcJSMPd2mMXIRuxTtX5+VHTNGb8DZj0r7EJm8ncrtvMAFZ k1Qg== X-Gm-Message-State: AOJu0YyV1S0ZESvVKCuERdAFgV+W3QKPBlnX1XV7Z3Ox5eGSozXxb51F FAl5xLPjQjptS6e+E+SEkIktiqFrcaBU/wCgnWBnHYuyhsc7/6sL8dJe8tM2VOl3A0PBVeqHuCt 7 X-Google-Smtp-Source: AGHT+IFd7swF3hnq2QoaMpUB/rIG3XWKMkN8LxBYjviRpntebRofr4lhqIDIo5AWY08jOPNgO9OBvA== X-Received: by 2002:a17:906:6889:b0:a59:86a7:2785 with SMTP id n9-20020a170906688900b00a5986a72785mr1907271ejr.28.1714750586240; Fri, 03 May 2024 08:36:26 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id c17-20020a1709060fd100b00a526a992d82sm1810177ejk.4.2024.05.03.08.36.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 08:36:25 -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?= , =?utf-8?q?V?= =?utf-8?q?olker_R=C3=BCmelin?= , Richard Henderson Subject: [PULL 02/14] accel/whpx: Fix NULL dereference in whpx_init_vcpu() Date: Fri, 3 May 2024 17:36:01 +0200 Message-ID: <20240503153613.38709-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503153613.38709-1-philmd@linaro.org> References: <20240503153613.38709-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=philmd@linaro.org; helo=mail-ej1-x630.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org When mechanically moving the @dirty field to AccelCPUState in commit 9ad49538c7, we neglected cpu->accel is still NULL when we want to dereference it. Fixes: 9ad49538c7 ("accel/whpx: Use accel-specific per-vcpu @dirty field") Reported-by: Volker Rümelin Suggested-by: Volker Rümelin Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240429091918.27429-2-philmd@linaro.org> --- target/i386/whpx/whpx-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index b08e644517..a6674a826d 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -2236,7 +2236,7 @@ int whpx_init_vcpu(CPUState *cpu) } vcpu->interruptable = true; - cpu->accel->dirty = true; + vcpu->dirty = true; cpu->accel = vcpu; max_vcpu_index = max(max_vcpu_index, cpu->cpu_index); qemu_add_vm_change_state_handler(whpx_cpu_update_state, env); From patchwork Fri May 3 15:36: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: 1931091 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=zuFBYJ5I; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VWFLT1F8jz1ydX for ; Sat, 4 May 2024 01:37:53 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2uxj-0002kl-L2; Fri, 03 May 2024 11:36:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s2uxi-0002ft-1S for qemu-devel@nongnu.org; Fri, 03 May 2024 11:36:38 -0400 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2uxg-0002io-9o for qemu-devel@nongnu.org; Fri, 03 May 2024 11:36:37 -0400 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-51ae2e37a87so11228868e87.2 for ; Fri, 03 May 2024 08:36:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714750593; x=1715355393; 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=k1ZHl3KtBDD8F5IDAshvr2j1UwCpx77YSs6aZ7LDCz8=; b=zuFBYJ5I4l4nXNTz3+RHdYe5A3Fuv8M8MnFCzWidfUgfdOm/c6mipyReBYp2Q6IIQw F26h/FlG+jMLpT+7i7BrX46LWY32HcW4fJX9mAng9iydakRZMcMayk2TicnE/kdzdgrH dWi0zm6BIMAO/6eT+bhGZYuEIIL4vyuV77CsbGgnVPsDxGe1ucnXaCB3fysO9sce/JhR QKEeKxw67azX2oRbVRAsruoMd5VPgIgXEPquilVBqk0iFulwGIOg+bCD3TplExt16ex3 2OMvQBJkWjAW3ahLMBys4EACdPzNevkKWBRlOpxal0Ko30ojPsHDqEytRH+1TuQL5KjJ lX2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714750593; x=1715355393; 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=k1ZHl3KtBDD8F5IDAshvr2j1UwCpx77YSs6aZ7LDCz8=; b=HS/A+3NpdOBtAu/FTJyLOD4ApujyWPE84i4xfFkxopGejWQbIWMhtIkZXTLpoKo0i2 FCxp0+ARFUsR2TzYMdfiX/jSLxWNGOgqG9hY+YBYKfKC9rKt2HkUP892sR9F73wMNMkZ xzi7JvtZRCIY05H7AOdkI2ZuWfFhNoPf9WVNR6opakt+xE6YhdNWiFucBWAiFXpgiZTW v0C5j6ZEw8cYA78XGelPuRxfhNxj7t94Cnd53za21jLmu+PZU899o4sCzxhAXFFgAHm3 CCDTkdrRBg7xqWobGwlcsvEBX/H0+0aerNpaTq6DQ5fQNfVKOyGWOO6EVzrHGVFsF0wz GIQw== X-Gm-Message-State: AOJu0Yxanbp3P3d5Zb4QLa85Vav/wAE4kLoWhlkRqomULyvSwbcFEMYA jtSlZ7eUv3oPVPmRtJ/vZp1v2CiauFhRiThwdKDJi5mTYMCE3RXCPmwJKQK+iab5xwSR2Kf8lCY G X-Google-Smtp-Source: AGHT+IELLF+Ss/gxvtOx2AuKrofkaAeOEqaHud+hJpklhx3fOY1QsfImgkP9QdXCpwT4bW9nPkKwyQ== X-Received: by 2002:ac2:4114:0:b0:51c:fd0a:7e34 with SMTP id b20-20020ac24114000000b0051cfd0a7e34mr2094125lfi.22.1714750592384; Fri, 03 May 2024 08:36:32 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id j21-20020a170906051500b00a59291b5551sm1820311eja.63.2024.05.03.08.36.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 08:36: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?= , Richard Henderson Subject: [PULL 03/14] exec: Include missing license in 'exec/cpu-common.h' Date: Fri, 3 May 2024 17:36:02 +0200 Message-ID: <20240503153613.38709-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503153613.38709-1-philmd@linaro.org> References: <20240503153613.38709-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=philmd@linaro.org; helo=mail-lf1-x131.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Commit 1ad2134f91 ("Hardware convenience library") extracted "cpu-common.h" from "cpu-all.h", which uses the LGPL-2.1+ license. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240427155714.53669-5-philmd@linaro.org> --- include/exec/cpu-common.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 6d5318895a..8812ba744d 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -1,8 +1,13 @@ +/* + * CPU interfaces that are target independent. + * + * Copyright (c) 2003 Fabrice Bellard + * + * SPDX-License-Identifier: LGPL-2.1+ + */ #ifndef CPU_COMMON_H #define CPU_COMMON_H -/* CPU interfaces that are target independent. */ - #include "exec/vaddr.h" #ifndef CONFIG_USER_ONLY #include "exec/hwaddr.h" From patchwork Fri May 3 15:36: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: 1931085 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=i26acGTp; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VWFL237rkz1ydX for ; Sat, 4 May 2024 01:37:30 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2uxo-00030H-GD; Fri, 03 May 2024 11:36: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 1s2uxm-0002pZ-A2 for qemu-devel@nongnu.org; Fri, 03 May 2024 11:36:42 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2uxk-0002jV-I3 for qemu-devel@nongnu.org; Fri, 03 May 2024 11:36:42 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a597de5a715so344879966b.2 for ; Fri, 03 May 2024 08:36:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714750599; x=1715355399; 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=cTcH38ypkKRkPbykxMZkLFBWPz8R6W/0jDZCFk5eJbs=; b=i26acGTplOGzFjS0zcKe2/uhaOrnXCCkn/NEoTo/2cH/gnwvfXj/6XUImBLDOl3DDw jJefUMWGnLvbpntMWGqojqHdfHnJ1rIWjrg3p00rt+yHs6Pmh1Dw/HoVFIIjpitAkHf1 mqDrS6oEZs9MG1NtfL7y+PBSh31uxTqwUakqngaVJUGXq02NgNLKmtzV7Qq6FsKTJE5f CB3G/1D6tyxILO6sIP3lyMny9Svg4jka1OObi9yGpoBDJ22kHyMQrXizkymT5a/38uyW tDY8/csEDyTttLkuoXn4sK41ElCMzuIUxJg8AngSxOlPTo+UjzHM7NkAq7C6Oa3AIDty NFKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714750599; x=1715355399; 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=cTcH38ypkKRkPbykxMZkLFBWPz8R6W/0jDZCFk5eJbs=; b=BpgBOJsq7XXf9QKx/QAKInNEhZxvSPbLC8KLzkVVe5dSV48kiRJhw2KAEu2VuFgjez vIvs+Uyk6TFx8BQ9ohBIti/w0BABN5xTHajlKQawi6IxR01+myHCO6OyZbUV4HIuSCV9 7zI+VAXIs/Z02BbJ/vndHAr2gXzojOrWxRNPVcmGo9SbcRkG6wWUcV7GFSdYOvzLq3HR rCV0tS+j6nOMY07qedagWgIMURrGswGqqNUx73HgM0M7DOPTtpyl7+aRNYV1yaykdtjF hLrh8ygGxe9LSGvloGL5PHoxY00y01LVfc+Tl/X69FJIa3gcPbsY1jJORyxD58kWwMb5 99pg== X-Gm-Message-State: AOJu0YxQPkhGdQvvRwZ/fvSNRyzqR0tlQUeRaUSNkRsqXvAvbc/6XRhG XG6FGzzLQD9LllUEuU/V1DRiPmZyU8BcoBgGIu9pYsEnuGuyihceiPOs2sBhwd9L1BMzHFEVB67 y X-Google-Smtp-Source: AGHT+IEp/nOaVNJv4FkILPN0MK77LeLnTdojXccBtx6O2sbyPxSgT00S1kNXZ7VhK/GM7BWHt7iglQ== X-Received: by 2002:a17:907:bb86:b0:a59:9edf:14b8 with SMTP id xo6-20020a170907bb8600b00a599edf14b8mr411681ejc.3.1714750598831; Fri, 03 May 2024 08:36:38 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id sa14-20020a1709076d0e00b00a5981ff2123sm1207399ejc.182.2024.05.03.08.36.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 08:36: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 Subject: [PULL 04/14] user: Move 'abitypes.h' from 'exec/user' to 'user' Date: Fri, 3 May 2024 17:36:03 +0200 Message-ID: <20240503153613.38709-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503153613.38709-1-philmd@linaro.org> References: <20240503153613.38709-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=philmd@linaro.org; helo=mail-ej1-x630.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Keep all user emulation headers under the same user/ directory. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240503125202.35667-1-philmd@linaro.org> --- bsd-user/qemu.h | 2 +- include/exec/cpu-all.h | 2 +- include/exec/user/thunk.h | 2 +- include/{exec => }/user/abitypes.h | 4 ++-- include/user/syscall-trace.h | 2 +- linux-user/qemu.h | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) rename include/{exec => }/user/abitypes.h (97%) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 8629f0dcde..a0c1ad7efa 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -22,7 +22,7 @@ #include "exec/cpu_ldst.h" #include "exec/exec-all.h" -#include "exec/user/abitypes.h" +#include "user/abitypes.h" extern char **environ; diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index e75ec13cd0..032c6d990e 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -64,7 +64,7 @@ /* MMU memory access macros */ #if defined(CONFIG_USER_ONLY) -#include "exec/user/abitypes.h" +#include "user/abitypes.h" /* * If non-zero, the guest virtual address space is a contiguous subset diff --git a/include/exec/user/thunk.h b/include/exec/user/thunk.h index 2ebfecf58e..9f35c888f9 100644 --- a/include/exec/user/thunk.h +++ b/include/exec/user/thunk.h @@ -21,7 +21,7 @@ #define THUNK_H #include "cpu.h" -#include "exec/user/abitypes.h" +#include "user/abitypes.h" /* types enums definitions */ diff --git a/include/exec/user/abitypes.h b/include/user/abitypes.h similarity index 97% rename from include/exec/user/abitypes.h rename to include/user/abitypes.h index 3ec1969368..5c9a955631 100644 --- a/include/exec/user/abitypes.h +++ b/include/user/abitypes.h @@ -1,5 +1,5 @@ -#ifndef EXEC_USER_ABITYPES_H -#define EXEC_USER_ABITYPES_H +#ifndef USER_ABITYPES_H +#define USER_ABITYPES_H #ifndef CONFIG_USER_ONLY #error Cannot include this header from system emulation diff --git a/include/user/syscall-trace.h b/include/user/syscall-trace.h index b48b2b2d0a..9bd7ca19c8 100644 --- a/include/user/syscall-trace.h +++ b/include/user/syscall-trace.h @@ -10,7 +10,7 @@ #ifndef SYSCALL_TRACE_H #define SYSCALL_TRACE_H -#include "exec/user/abitypes.h" +#include "user/abitypes.h" #include "gdbstub/user.h" #include "qemu/plugin.h" #include "trace/trace-root.h" diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 4777856b52..263f445ff1 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -4,7 +4,7 @@ #include "cpu.h" #include "exec/cpu_ldst.h" -#include "exec/user/abitypes.h" +#include "user/abitypes.h" #include "syscall_defs.h" #include "target_syscall.h" From patchwork Fri May 3 15:36: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: 1931092 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=A4zkzidb; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VWFLZ6SgDz1ydX for ; Sat, 4 May 2024 01:37:58 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2uyM-0003Hn-Ay; Fri, 03 May 2024 11:37:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s2uxs-00036g-8v for qemu-devel@nongnu.org; Fri, 03 May 2024 11:36:49 -0400 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2uxq-0002jo-IR for qemu-devel@nongnu.org; Fri, 03 May 2024 11:36:48 -0400 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-51f1b378ca5so3539412e87.1 for ; Fri, 03 May 2024 08:36:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714750604; x=1715355404; 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=z1hVAWqle0Mz/JboTJUAwXdqwQ9y68NGrGd6TXjKRdw=; b=A4zkzidb+D7JH8jZcQlQ8T1o1uDcPsyR65X3dg9hOb6fibUyNFB3z+MDB0KxliJWsx 39CdS5VEosvV2o7WY9XAAy3xY7LSmunmky7pJw8N3O0mgPXiu+9RcVDOuX/T8OoEYa4f ybFuW3WG1RLQHFqMtQ/lBg/K6BEQmvzM3PDEXBaByZKw9x1KLE8j+aOAuMnACVq4bhro 86GiLaLOSPC/DG6QF0EA09xaxjgYFy2PdOZL6NjETextGAhjKM06f8na9s6AZMwJPEwD TrLrXnztuEJVVnGDTr/p8RZ3qOL47675+70ZULZbyEbTxMgW6+Sw1L1UedTK+UJ97BBO pc/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714750604; x=1715355404; 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=z1hVAWqle0Mz/JboTJUAwXdqwQ9y68NGrGd6TXjKRdw=; b=ah7kYzR0BHYBxK3tAZjgaLwiVuGBe76pAalOyxOCUu0o70+gv/fREltJNdF9CkzeCV vzmpYJPYt9KMb5K1bKT/rSl9kC9ePDavIiwq24E1BLKk+3UCpkGkqreGdoHPhUPV4RVM pwpkrXhXUEIXBLWXlUQ+IUHcHcgyz3nzjVNjqdTMBFuaGNhU6woPehpjX4QLJOfReJ1v a9pEeCdVb5Gh+TDAW0lPD8KjkQ7439oUAifqQo3pzHgMMQborYosL3z8UOwUMvl2LyiO Yb+/ytyIpbXyzoo72KwaNNZOYQNDzuHH4lpCHigDiG5UVI9YtUBayuiQnmRLborsBEwZ qErQ== X-Gm-Message-State: AOJu0YxE/YCpelpjeQ19i1r9DN4z4rRGgKiis3URlNiXEpKqtKJKmp1n MbtKc0ZHx5RE8izulkWgWZ1rqMM/YjLbLOqJ/KVjfX8Wcyo3hyMvcTvbU64EtOMw60vS3LPCOhR H X-Google-Smtp-Source: AGHT+IGQHu71mGmPbza/1iJRgncgeGQbQrF8epAxL5Pk8NczWyd1FSRr4NqFETROkSgYWt9O/We3Hg== X-Received: by 2002:ac2:51b0:0:b0:51a:c3b8:b9cf with SMTP id f16-20020ac251b0000000b0051ac3b8b9cfmr2381768lfk.69.1714750604395; Fri, 03 May 2024 08:36:44 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id xo16-20020a170907bb9000b00a55b1253fe5sm1814337ejc.194.2024.05.03.08.36.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 08:36:43 -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 Subject: [PULL 05/14] user: Move 'thunk.h' from 'exec/user' to 'user' Date: Fri, 3 May 2024 17:36:04 +0200 Message-ID: <20240503153613.38709-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503153613.38709-1-philmd@linaro.org> References: <20240503153613.38709-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12a; envelope-from=philmd@linaro.org; helo=mail-lf1-x12a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Keep all user emulation headers under the same user/ directory. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240428221450.26460-2-philmd@linaro.org> --- MAINTAINERS | 1 - bsd-user/qemu.h | 2 +- include/{exec => }/user/thunk.h | 8 ++++++-- linux-user/user-internals.h | 2 +- linux-user/thunk.c | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) rename include/{exec => }/user/thunk.h (97%) diff --git a/MAINTAINERS b/MAINTAINERS index 302b6fd00c..96411e6adf 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3692,7 +3692,6 @@ Overall usermode emulation M: Riku Voipio S: Maintained F: accel/tcg/user-exec*.c -F: include/exec/user/ F: include/user/ F: common-user/ diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index a0c1ad7efa..a916724de9 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -26,7 +26,7 @@ extern char **environ; -#include "exec/user/thunk.h" +#include "user/thunk.h" #include "target_arch.h" #include "syscall_defs.h" #include "target_syscall.h" diff --git a/include/exec/user/thunk.h b/include/user/thunk.h similarity index 97% rename from include/exec/user/thunk.h rename to include/user/thunk.h index 9f35c888f9..2a2104b568 100644 --- a/include/exec/user/thunk.h +++ b/include/user/thunk.h @@ -17,8 +17,12 @@ * License along with this library; if not, see . */ -#ifndef THUNK_H -#define THUNK_H +#ifndef USER_THUNK_H +#define USER_THUNK_H + +#ifndef CONFIG_USER_ONLY +#error Cannot include this header from system emulation +#endif #include "cpu.h" #include "user/abitypes.h" diff --git a/linux-user/user-internals.h b/linux-user/user-internals.h index ce11d9e21c..5c7f173ceb 100644 --- a/linux-user/user-internals.h +++ b/linux-user/user-internals.h @@ -18,7 +18,7 @@ #ifndef LINUX_USER_USER_INTERNALS_H #define LINUX_USER_USER_INTERNALS_H -#include "exec/user/thunk.h" +#include "user/thunk.h" #include "exec/exec-all.h" #include "exec/tb-flush.h" #include "qemu/log.h" diff --git a/linux-user/thunk.c b/linux-user/thunk.c index 071aad4b5f..3cd19e79c6 100644 --- a/linux-user/thunk.c +++ b/linux-user/thunk.c @@ -20,7 +20,7 @@ #include "qemu/log.h" #include "qemu.h" -#include "exec/user/thunk.h" +#include "user/thunk.h" //#define DEBUG From patchwork Fri May 3 15:36: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: 1931090 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=nJ4Phqve; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VWFLR2vNlz1ydX for ; Sat, 4 May 2024 01:37:51 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2uyN-0003g3-ER; Fri, 03 May 2024 11:37:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s2uy0-0003Ff-3X for qemu-devel@nongnu.org; Fri, 03 May 2024 11:36:57 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2uxy-0002k3-CX for qemu-devel@nongnu.org; Fri, 03 May 2024 11:36:55 -0400 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a524ecaf215so1332580166b.2 for ; Fri, 03 May 2024 08:36:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714750609; x=1715355409; 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=LrZUKaXvCoLZb05WO8svoXk2q630F/QIOO635ivl1JA=; b=nJ4PhqveMsb2CWcCBTUY7HHUHzGzJ6Gi5aCTSd3KD0EkkKnX8WVZ3QCxQCdL2YHlvT h+t1wzDvoLXbox4hOxLo0yyu9Zse6G6WtewLddAyEDp9GpCnX7RCL869QcAbxUENX+Sm 4XkfKh8aqTE5R7gwc5WDAlGCGhltqz1uW3CWwxEErTM44ovGdCvqvEJpnEI+GV9IMTYH ZlBdvdAk2MpvChCuL0Y6ap9/AJ+mtr05I/l7BXpm6/FHwogMnf9En91MCDKE4ltlj+ax es/vHi6ir7WE5EME/QiVpv10VXMhBQlObyVH/ugta51DnimwvLifzXj8DghO6VcZSp/6 Nm+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714750609; x=1715355409; 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=LrZUKaXvCoLZb05WO8svoXk2q630F/QIOO635ivl1JA=; b=UqSoK0ugTXGV4K5YdcCt6Jc62VD+fr53U7P617SLfkAPrnzAtfpfOf+0p4DRXJYcNn HmiSLxKTkR5qwqliTcQ+ofG/aF/EcWh5XEG9hCDp/nXjNYPcd9w4NqTi/bMjh0/PxjV8 n6KVxobSmgEnKU/3seia+Q5gJIchyk5uR26GcNRmbuYBaj/oiUjTj4jOY88aiBnShzRT Od5eAaudG2LvyC3jT7Ep90bhfG59jSWph1T4rLRHPg8GtZR+sf5BXjVmjbU2t+ZwfJQo iJioaFXW18z9EQsyHYjKqRf4CSdqm0cMtFZFFJjT1RPlTc+fw28U1cvX69eBTj2RTRL0 Pezw== X-Gm-Message-State: AOJu0YwF1ClIWzHgwq9YuEYPH4HDATr0egre2FhuDj4a3l0qg6RmbIop 1sBwPwr+BHSO3i/pOV7mBHsjBJET9RTLPp/bfmBUm5Uk6kt7t537y4KCLfNfIiE5SJdnqKE9gCN C X-Google-Smtp-Source: AGHT+IFLVFozUZfLPUxfKAyHg/U/u7wAGWbKtEQ/XkhQsUTRn1xbEXDo3LGkKl0bhVsky5TAjUNElg== X-Received: by 2002:a17:906:d8c9:b0:a55:63d3:7499 with SMTP id re9-20020a170906d8c900b00a5563d37499mr1984275ejb.59.1714750609659; Fri, 03 May 2024 08:36:49 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id w19-20020a17090633d300b00a5965ba49cdsm1789020eja.109.2024.05.03.08.36.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 08:36: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 Subject: [PULL 06/14] coverity: Update user emulation regexp Date: Fri, 3 May 2024 17:36:05 +0200 Message-ID: <20240503153613.38709-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503153613.38709-1-philmd@linaro.org> References: <20240503153613.38709-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=philmd@linaro.org; helo=mail-ej1-x62f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org All user emulation headers are now under include/user/. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240428221450.26460-3-philmd@linaro.org> --- scripts/coverity-scan/COMPONENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/coverity-scan/COMPONENTS.md b/scripts/coverity-scan/COMPONENTS.md index 91be8d1c36..1537e49cd5 100644 --- a/scripts/coverity-scan/COMPONENTS.md +++ b/scripts/coverity-scan/COMPONENTS.md @@ -121,7 +121,7 @@ usb ~ (/qemu)?(/hw/usb/.*|/include/hw/usb/.*) user - ~ (/qemu)?(/linux-user/.*|/bsd-user/.*|/user-exec\.c|/thunk\.c|/include/exec/user/.*) + ~ (/qemu)?(/linux-user/.*|/bsd-user/.*|/user-exec\.c|/thunk\.c|/include/user/.*) util ~ (/qemu)?(/util/.*|/include/qemu/.*) From patchwork Fri May 3 15:36: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: 1931088 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=uoRWvZfT; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VWFLM5RWjz1ydX for ; Sat, 4 May 2024 01:37:47 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2uyP-0003w3-JQ; Fri, 03 May 2024 11:37: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 1s2uy2-0003GC-Du for qemu-devel@nongnu.org; Fri, 03 May 2024 11:37:02 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2uy0-0002kJ-K2 for qemu-devel@nongnu.org; Fri, 03 May 2024 11:36:58 -0400 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a58fbbcd77aso928460066b.2 for ; Fri, 03 May 2024 08:36:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714750615; x=1715355415; 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=Qe6fMxQCClP86U2E4tekhsNK+cCefDglZXDii44rTHQ=; b=uoRWvZfTrcY0Jzo24OcaiCjg/aFvAPvrjoxhkmaGdd37t02biBesK0JO0SN1ZkG4Cx Cjm388aC/cxejf/ujRWeQPzJzW891cg1AZcAMdvJOPuZzC1+vuJJ3PNVccDFk4J2ZWdV rZn5eZdpvYhZxyxWoDyb7NDFUV4uLBKVJBhMPsS+c8JHzU0ACHaid+O0cum+MDNuVQ/8 m4WNEjYSfHAsBgm8SRxfauf4q3jtXPC2IXfmwdUy70FrFamCJv6DCx+3BZ4KaQOAi4nE r88q6ISDZUJCtVlbZL+WUQIvn+my2OxCZBmu3F8sC8vsvCGDxytIGDcUgk9jV+JD7EbD vDyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714750615; x=1715355415; 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=Qe6fMxQCClP86U2E4tekhsNK+cCefDglZXDii44rTHQ=; b=k/Hluz5JrD5dqIrgfFcCtYE2AL1uGFRmtB4x3vXVCnlm5tsAAA4iUqKWhzhudcCPVl Ii0syfGSF3E8oztVsiVmk0c1r/zu01jNQGWCnxjkGLVVkTSWjC7YtSguJfWdE4esmXv0 viSFZat3A8xp8h+zpIiCunQR+pSWIyRpiJFN9fuli1Ct+S+QksD+4NtanecwLokRj4qx Tqv5BiBRFkFcz+Q0PseRDzkSkWZveqH5Mt7KDPK1C18mWIp5kU5ZPtbFBpXRAAbbawV8 qFjbaMrvDiVTQ4QZkNCkSHfXWBVGKTehm8ewrOfF/5KoqQ3i0FA7HJ319xjqQoIjUvE3 lijw== X-Gm-Message-State: AOJu0Yy/5B/OT6V6dQVly2bqEkB2PYcA8TPcni9P40SYToYQuAEoru2R VmWQPSHGdM0Mlxq/zVcONd48J0TrImUhJeYK9t3k2aI8+tkRpQrsNGFXnBmH5wDmvyaNd1lz/qR z X-Google-Smtp-Source: AGHT+IHzWTPeIp70O/MyKEPSlDUt8I6o9Zj0C/l5s7nwXqgEDN47Vo2rRt5ykIEacCBM/mv/eUiwqw== X-Received: by 2002:a17:907:9952:b0:a52:13ff:5317 with SMTP id kl18-20020a170907995200b00a5213ff5317mr2144965ejc.38.1714750614889; Fri, 03 May 2024 08:36:54 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id f15-20020a170906560f00b00a599ec633cfsm200108ejq.104.2024.05.03.08.36.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 08:36: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?= , Richard Henderson Subject: [PULL 07/14] plugins/api: Only include 'exec/ram_addr.h' with system emulation Date: Fri, 3 May 2024 17:36:06 +0200 Message-ID: <20240503153613.38709-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503153613.38709-1-philmd@linaro.org> References: <20240503153613.38709-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=philmd@linaro.org; helo=mail-ej1-x633.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org "exec/ram_addr.h" shouldn't be used with user emulation. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Richard Henderson Message-Id: <20240427155714.53669-4-philmd@linaro.org> --- plugins/api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/api.c b/plugins/api.c index 8fa5a600ac..eaee344d8e 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -42,10 +42,10 @@ #include "tcg/tcg.h" #include "exec/exec-all.h" #include "exec/gdbstub.h" -#include "exec/ram_addr.h" #include "disas/disas.h" #include "plugin.h" #ifndef CONFIG_USER_ONLY +#include "exec/ram_addr.h" #include "qemu/plugin-memory.h" #include "hw/boards.h" #else From patchwork Fri May 3 15:36: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: 1931094 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=QY77vbzu; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VWFLl4y2qz20fb for ; Sat, 4 May 2024 01:38:07 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2uyN-0003iC-Qh; Fri, 03 May 2024 11:37:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s2uy7-0003H9-LC for qemu-devel@nongnu.org; Fri, 03 May 2024 11:37:05 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2uy6-0002ke-3P for qemu-devel@nongnu.org; Fri, 03 May 2024 11:37:03 -0400 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a556d22fa93so1171399666b.3 for ; Fri, 03 May 2024 08:37:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714750620; x=1715355420; 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=WlnSWxk2ckicORZmY3MYyhbs7CkzbKWbFMF7/22EQlk=; b=QY77vbzuo/L4noxT8m+Z3aT6G+HxboxSVbS/o9ZhA+qLlWp7utgXhTm4pYoXSyedPj Qc5NFSKM5vosYPniyyyTxQ/zrP6mZvZhcvl1g8IRhtLJooUP3e4eTBSRQInQUXyO6sWy 4mF/DJbQ+1n/etO5CbcBtahZLd794o1Gt5mVdek4lySpCvRgttTHooBz8jlqmzuljg0u qFpAIb0m8J30gw2BvThprYy0N/D0uVKczgz6p1b3EX62b/0yfNCVLizfQEugw3YBbUdM rk03rvEV3x+QgT24DpG7p6Yv7wnaMWQxcZ7ecd6BgUperm/20sMIN+EKGk7jm8QKcdJG oDLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714750620; x=1715355420; 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=WlnSWxk2ckicORZmY3MYyhbs7CkzbKWbFMF7/22EQlk=; b=LWJFBt/9ZiRHPdZJvfemeCh4wmP7R24hEXO2nQueQypmwoV9aLi/vcb4Q1RwQelIzB 01No3gkIIuybL+lJF6B4htBL/64Nv4wQBjTNo2DUKpH/SEbGO3Q80QB8oDu5S0ecxs++ Sv+HZUlICXH3pH01iwu4ZZFHy6ZiZjEOb1/VabzcXFatQ37PMSUJXjieaa+BBJWGj+Q0 H6CZHFjk93/7G0pSpYnPaRrY5u7oOHNUOQtLhLcoitECKdMMGn4RJHkL68ypUBj7WaNu txvmZM36uuuY5LXYMhIkBq9Ci9RlISgQdZ5QpAficGnNXY7GSsALbJEFta3NsCzW57Qk B0AQ== X-Gm-Message-State: AOJu0Yx+mJCjyEJWJHvvF2H0md1gM4KVWnTUjNLjJktoydPJ5ImJ4V3d XDuO4hBkecHbX/j+kBMosOvMIZYvm/KiNv7DfsWdjmA0ViHOKCY7Nj2cy48bCOBkN18UFMiS9qO M X-Google-Smtp-Source: AGHT+IG2v/TkD232kbxZ4sbwld86DlpKEL0TpPFek3f/Rflb6q63KQobkHyp4fDpFgPUD+xhnZHKDQ== X-Received: by 2002:a17:906:3811:b0:a59:3eef:122e with SMTP id v17-20020a170906381100b00a593eef122emr1977695ejc.36.1714750620130; Fri, 03 May 2024 08:37:00 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id mc20-20020a170906eb5400b00a599a85777dsm483492ejb.153.2024.05.03.08.36.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 08:36:59 -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 Subject: [PULL 08/14] plugins: Update stale comment Date: Fri, 3 May 2024 17:36:07 +0200 Message-ID: <20240503153613.38709-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503153613.38709-1-philmd@linaro.org> References: <20240503153613.38709-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=philmd@linaro.org; helo=mail-ej1-x62f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org "plugin_mask" was renamed as "event_mask" in commit c006147122 ("plugins: create CPUPluginState and migrate plugin_mask"). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240427155714.53669-3-philmd@linaro.org> --- plugins/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/core.c b/plugins/core.c index 11ca20e626..09c98382f5 100644 --- a/plugins/core.c +++ b/plugins/core.c @@ -373,7 +373,7 @@ void qemu_plugin_tb_trans_cb(CPUState *cpu, struct qemu_plugin_tb *tb) struct qemu_plugin_cb *cb, *next; enum qemu_plugin_event ev = QEMU_PLUGIN_EV_VCPU_TB_TRANS; - /* no plugin_mask check here; caller should have checked */ + /* no plugin_state->event_mask check here; caller should have checked */ QLIST_FOREACH_SAFE_RCU(cb, &plugin.cb_lists[ev], entry, next) { qemu_plugin_vcpu_tb_trans_cb_t func = cb->f.vcpu_tb_trans; From patchwork Fri May 3 15:36: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: 1931089 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=e3rZfAfN; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VWFLN6ZPBz1ydX for ; Sat, 4 May 2024 01:37:48 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2uyO-0003rd-VP; Fri, 03 May 2024 11:37: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 1s2uyC-0003Ko-MN for qemu-devel@nongnu.org; Fri, 03 May 2024 11:37:12 -0400 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2uyB-0002l2-40 for qemu-devel@nongnu.org; Fri, 03 May 2024 11:37:08 -0400 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a5991a443b1so179616666b.1 for ; Fri, 03 May 2024 08:37:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714750625; x=1715355425; 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=zMmV30WDdZVboe02eVG5MkgpkSOVDl1PK3DuW0Q/4bA=; b=e3rZfAfNzfl3zDIxymETYVhB0sL5Cfy1Z1ArZCvmwUZu0HpDnxbKqHg1I75sGs74SY Lu4wfHx+n00T2tO28hNlzPmlElDLQBzCRMz4EMyCRgoNupdaf240oKUelupZExBdV6rJ xaK9KMYdWuMoKyDed7Btt3823Ys3kK74DYaNwlHLdw7+wWvPgbH+ft8bZAIsxaV0DNHB pM6qSy4zg6FwxROb1TNHumJskZCOZ/OsLmG5CaVu+U7X2AVpFypbBBgp3sLkVyW5xZaZ vbCmmYAeV5x+OHyHBLXn1j3DtlqQeetFUvlGXKHx7qqjbhrDTS/UcXPqqfCbSbWVRQTA 31Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714750625; x=1715355425; 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=zMmV30WDdZVboe02eVG5MkgpkSOVDl1PK3DuW0Q/4bA=; b=IFpT1kwgSibfsixmFPo8+P0idTnhzW0n5OSFt7h5qAP7IozPeLZYJCvmXSxw/fGawM fuB6Q90TkSKcRqK4s2UTsCfOO0YaTWXduO7G4GXZlzdkfSJSXcx3LxOKqdvD5viyPSsd EbN2B1LgRLhTJO5H1k0FuwP+fMT9Jf820cPM93affUnBtsHJjR1JpqLyMmpwBLqaKN6H fYthB/0ewN1YZ7fWT2367c2+zpM248DiJn/tmXSHaDCWiw9HDM+OEtlytHgWXrbxZRGa EuOuafu4Zd5f54p4LnvVbfFxLVPLwlxW2mHgzMo7Id8tWFyTBNH/AdvockKZ706CE3eN Yjww== X-Gm-Message-State: AOJu0Yy9NHOgJqF/ZJA9vrU81iLB2GwGZP/1OZSeqxPxHP+iQeZjuQCQ w1yhSfN/vDIpbw/OHr2i6ynFjMrhFcAtkgwie+BeXrobInH2H05UEHGuXosJn3ApO+HLO3J2B32 u X-Google-Smtp-Source: AGHT+IE1VuW+VHFXGOYmb5PVVtYpDBMWfYmCeR0Nvbhrkczf9UsXRNsJSBByKL8JSIe018n68UzSOw== X-Received: by 2002:a17:906:f2d4:b0:a57:e5fd:a77d with SMTP id gz20-20020a170906f2d400b00a57e5fda77dmr2055447ejb.5.1714750625471; Fri, 03 May 2024 08:37:05 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id z4-20020a17090655c400b00a5931d77634sm1825010ejp.34.2024.05.03.08.37.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 08:37:05 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Anthony PERARD , Paul Durrant , Stefano Stabellini , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= Subject: [PULL 09/14] MAINTAINERS: Update my email address Date: Fri, 3 May 2024 17:36:08 +0200 Message-ID: <20240503153613.38709-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503153613.38709-1-philmd@linaro.org> References: <20240503153613.38709-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=philmd@linaro.org; helo=mail-ej1-x62d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Anthony PERARD Signed-off-by: Anthony PERARD Acked-by: Paul Durrant Acked-by: Stefano Stabellini Message-ID: <20240429154938.19340-1-anthony.perard@citrix.com> Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 96411e6adf..2f08cc528e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -532,7 +532,7 @@ Guest CPU Cores (Xen) --------------------- X86 Xen CPUs M: Stefano Stabellini -M: Anthony Perard +M: Anthony PERARD M: Paul Durrant L: xen-devel@lists.xenproject.org S: Supported From patchwork Fri May 3 15:36:09 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: 1931093 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=DV38KcXL; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VWFLl1phzz1ydX for ; Sat, 4 May 2024 01:38:07 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2uyT-0004M9-6c; Fri, 03 May 2024 11:37:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s2uyK-0003ZH-BQ for qemu-devel@nongnu.org; Fri, 03 May 2024 11:37:18 -0400 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2uyH-0002lL-Rn for qemu-devel@nongnu.org; Fri, 03 May 2024 11:37:16 -0400 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-51f17ac14daso2698298e87.1 for ; Fri, 03 May 2024 08:37:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714750631; x=1715355431; 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=TYufu7DpgZYDotR1hfS1ObeVUHdd9gyKuKm2GZNB3KM=; b=DV38KcXL/X+UoUlb5HiTv8w/1ifHxahE4ykG+4w2ilY95PoKQJ3IwcRaMMz1g1VgVa tUgDTLYpHl+L7SpACTRBhL/RmLbFc4Pfl33OYLlxPGuDP9XWPViIBnTnZhCrJIy/+mEr jUlrfvYxryflSooS4YWR5DIsLTR06AwpWRzHtlGSm6B1let4m6N49ZcW0e6Dqt9Y2tpw Cx4HpZjNUd9NUpefbrPmnUdppbkfBILP3QOCJkjqCYJAbWQxarpHPZAuqWc49oKKVA8m uYx+lhYFMSlUWh0/fALJEVypouvh7FondHhXDybK2g7h2sEIvl6Nrs2VSWwiresjB7H0 JXTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714750631; x=1715355431; 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=TYufu7DpgZYDotR1hfS1ObeVUHdd9gyKuKm2GZNB3KM=; b=ibifW9W6txN7Su+EX53HSv8goFtgNyXlA23MixjwWH+l107O56szTKTZIxvzG74Lyf Y6VGrk4w79smNHs2Co+5sjjoV/eAyhZbRFUVDWw+Ic5bFQDRI72zYcdqi3uDXUPenWqi zMY4+nQEnejGKCfpQStJbq7gZWB2Ne/yeVb+5zFamS6y9HXo0x4THKb26vFtN8fN1AYp QTI+tldHU4YAgsHkqnPFmpj6FAQtqbexrQoPeal8KsHQbvC3cXSCmMwC5+NlFSKEoFsh QF+dYY68bTgp+BfBxhLMn65jhhXHk0hjljif+1SP3XZ0nZf+Bh90KVwcqiEu8KHwL9ui P9Dg== X-Gm-Message-State: AOJu0YwGO4q66vz2fYq5Xwlldi4KBuhqf8xCHmsdWC5BrgZEuPvakjAM HznQB3mX03NjTP+f+3+LBbN/KdBFF6AOn9X0axOEkl+xYNF5Efv9UH0nvvBzCNLNEoMmHgvIHit N X-Google-Smtp-Source: AGHT+IHCWClKP9jgJfQd/v1RHoSkIyY4j+j65Ej5E6qWegcYSihkBWGCxzZFpGjYgUeNzf8hvC0BSw== X-Received: by 2002:ac2:5483:0:b0:51c:85b:bb72 with SMTP id t3-20020ac25483000000b0051c085bbb72mr1974905lfk.26.1714750630996; Fri, 03 May 2024 08:37:10 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id s20-20020a170906061400b00a52274ee0a7sm1843364ejb.171.2024.05.03.08.37.09 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 08:37:10 -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?= , qemu-stable@nongnu.org, Paul Cercueil , Richard Henderson , Yoshinori Sato Subject: [PULL 10/14] target/sh4: Fix ADDV opcode Date: Fri, 3 May 2024 17:36:09 +0200 Message-ID: <20240503153613.38709-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503153613.38709-1-philmd@linaro.org> References: <20240503153613.38709-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=philmd@linaro.org; helo=mail-lf1-x12e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The documentation says: ADDV Rm, Rn Rn + Rm -> Rn, overflow -> T But QEMU implementation was: ADDV Rm, Rn Rn + Rm -> Rm, overflow -> T Fix by filling the correct Rm register. Add tests provided by Paul Cercueil. Cc: qemu-stable@nongnu.org Fixes: ad8d25a11f ("target-sh4: implement addv and subv using TCG") Reported-by: Paul Cercueil Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2317 Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Yoshinori Sato Message-Id: <20240430163125.77430-2-philmd@linaro.org> --- target/sh4/translate.c | 2 +- tests/tcg/sh4/test-addv.c | 27 +++++++++++++++++++++++++++ tests/tcg/sh4/Makefile.target | 3 +++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 tests/tcg/sh4/test-addv.c diff --git a/target/sh4/translate.c b/target/sh4/translate.c index ebb6c901bf..4a1dd0d1f4 100644 --- a/target/sh4/translate.c +++ b/target/sh4/translate.c @@ -714,7 +714,7 @@ static void _decode_opc(DisasContext * ctx) tcg_gen_xor_i32(t2, REG(B7_4), REG(B11_8)); tcg_gen_andc_i32(cpu_sr_t, t1, t2); tcg_gen_shri_i32(cpu_sr_t, cpu_sr_t, 31); - tcg_gen_mov_i32(REG(B7_4), t0); + tcg_gen_mov_i32(REG(B11_8), t0); } return; case 0x2009: /* and Rm,Rn */ diff --git a/tests/tcg/sh4/test-addv.c b/tests/tcg/sh4/test-addv.c new file mode 100644 index 0000000000..ca87fe746a --- /dev/null +++ b/tests/tcg/sh4/test-addv.c @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include +#include +#include + +static void addv(const int a, const int b, const int res, const int carry) +{ + int o = a, c; + + asm volatile("addv %2,%0\n" + "movt %1\n" + : "+r"(o), "=r"(c) : "r"(b) : ); + + if (c != carry || o != res) { + printf("ADDV %d, %d = %d/%d [T = %d/%d]\n", a, b, o, res, c, carry); + abort(); + } +} + +int main(void) +{ + addv(INT_MAX, 1, INT_MIN, 1); + addv(INT_MAX - 1, 1, INT_MAX, 0); + + return 0; +} diff --git a/tests/tcg/sh4/Makefile.target b/tests/tcg/sh4/Makefile.target index 4d09291c0c..521b8b0a76 100644 --- a/tests/tcg/sh4/Makefile.target +++ b/tests/tcg/sh4/Makefile.target @@ -17,3 +17,6 @@ TESTS += test-macl test-macw: CFLAGS += -O -g TESTS += test-macw + +test-addv: CFLAGS += -O -g +TESTS += test-addv From patchwork Fri May 3 15:36:10 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: 1931087 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=VVfx94PR; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VWFLH0W5Lz20fb for ; Sat, 4 May 2024 01:37:42 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2uyc-0004ZC-Sa; Fri, 03 May 2024 11:37:36 -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 1s2uyT-0004NC-3y for qemu-devel@nongnu.org; Fri, 03 May 2024 11:37:25 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2uyM-0002ly-Av for qemu-devel@nongnu.org; Fri, 03 May 2024 11:37:23 -0400 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a58fc650f8fso900971266b.1 for ; Fri, 03 May 2024 08:37:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714750636; x=1715355436; 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=JZ76gv7i8YSHM81Ab5Mv7SVtJJSc8rRsU348TrrHgtg=; b=VVfx94PRR1vbSJEA+5dz/eXx6X80jtwIHJs1D0vjnbBK0WDMRe5K8IlcE4inSCfYH7 b3iyHipIIKctAJGld9x5uCAdkudiH/2sa8H6Kjbh5VHOQnxv8vo7EISGU2TfOEZw5mvB FeTKcVWwYzG1BHaZUPq4ZuNysekK+1T2UPt9pvefgy7FXPE/kSAL7TQ1Fz88XLPuh7FG C31dEhlqj8qr+uisAI9vzxBpBIbniK4YR3L3bCgVbadFAp7ROmbyGFwefyi2Y3fh/Ka3 s32+RxrajruShiU9V/vUEjEv/0Z9IgZYADA4SJXTpLhNAnsHJGV4sHDbt2ConlJ7/+Sc 81Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714750636; x=1715355436; 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=JZ76gv7i8YSHM81Ab5Mv7SVtJJSc8rRsU348TrrHgtg=; b=i03LWoFdLnQCu0kQbu56AdwjoaPKWet7Y0vkt4fQfP7ckME9fT9HwM7foPr0jkrfE3 gcVImsE4RwC+29MRMUSDgBUQfYDvnhFBzvhXtYOw7j1Qk/nqjnavsfIrXN/vcswEZjnm c4gSbIRytHEfNZViNsAkEswLbF0sdu7xYo7c0VnFuGiMCmVH10nEVCtN0cx7gmMYCuhv yv+J2FWo2fh5oYIs9sH5rCq+J4sO6szn/rn9WDmbhwf4Er+/dLHh5pY5qaNyUyDx7+Rq u5iWQKXs0kJFgefmvsaA7lm9FjFqj0BiCOo3KYBa0EiyySW0Gmn5D1uEfHE/XcdhyE5K Xf2Q== X-Gm-Message-State: AOJu0YwSv2tSnTWliyNu2Wjnd29ujZkdZ6lDz5Ynt/rgW0ijH/A4JaBx c5cpCfxPsml8q9S3WpbjJFfCavRB2bjYjuvoXKgIfYvs0OiunW8c8QsmHC31OfIPYzjrxqF+3yh Y X-Google-Smtp-Source: AGHT+IEipyBuDNCsQgq6UraYdsiP+SS8tf2n3WTcrLLinFrrTRbokPQAFeky+xlQ3L6G16mOH9DD7Q== X-Received: by 2002:a17:907:174d:b0:a58:dd06:b8bb with SMTP id lf13-20020a170907174d00b00a58dd06b8bbmr1867268ejc.70.1714750636493; Fri, 03 May 2024 08:37:16 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id lb24-20020a170906add800b00a58de09fd92sm1816023ejb.27.2024.05.03.08.37.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 08:37: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?= , qemu-stable@nongnu.org, Paul Cercueil , Richard Henderson , Yoshinori Sato Subject: [PULL 11/14] target/sh4: Fix SUBV opcode Date: Fri, 3 May 2024 17:36:10 +0200 Message-ID: <20240503153613.38709-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503153613.38709-1-philmd@linaro.org> References: <20240503153613.38709-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=philmd@linaro.org; helo=mail-ej1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The documentation says: SUBV Rm, Rn Rn - Rm -> Rn, underflow -> T The overflow / underflow can be calculated as: T = ((Rn ^ Rm) & (Result ^ Rn)) >> 31 However we were using the incorrect: T = ((Rn ^ Rm) & (Result ^ Rm)) >> 31 Fix by using the Rn register instead of Rm. Add tests provided by Paul Cercueil. Cc: qemu-stable@nongnu.org Fixes: ad8d25a11f ("target-sh4: implement addv and subv using TCG") Reported-by: Paul Cercueil Suggested-by: Paul Cercueil Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2318 Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Yoshinori Sato Message-Id: <20240430163125.77430-3-philmd@linaro.org> --- target/sh4/translate.c | 2 +- tests/tcg/sh4/test-subv.c | 30 ++++++++++++++++++++++++++++++ tests/tcg/sh4/Makefile.target | 3 +++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 tests/tcg/sh4/test-subv.c diff --git a/target/sh4/translate.c b/target/sh4/translate.c index 4a1dd0d1f4..3e013b7c7c 100644 --- a/target/sh4/translate.c +++ b/target/sh4/translate.c @@ -933,7 +933,7 @@ static void _decode_opc(DisasContext * ctx) t0 = tcg_temp_new(); tcg_gen_sub_i32(t0, REG(B11_8), REG(B7_4)); t1 = tcg_temp_new(); - tcg_gen_xor_i32(t1, t0, REG(B7_4)); + tcg_gen_xor_i32(t1, t0, REG(B11_8)); t2 = tcg_temp_new(); tcg_gen_xor_i32(t2, REG(B11_8), REG(B7_4)); tcg_gen_and_i32(t1, t1, t2); diff --git a/tests/tcg/sh4/test-subv.c b/tests/tcg/sh4/test-subv.c new file mode 100644 index 0000000000..a3c2db96e4 --- /dev/null +++ b/tests/tcg/sh4/test-subv.c @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include +#include +#include + +static void subv(const int a, const int b, const int res, const int carry) +{ + int o = a, c; + + asm volatile("subv %2,%0\n" + "movt %1\n" + : "+r"(o), "=r"(c) : "r"(b) : ); + + if (c != carry || o != res) { + printf("SUBV %d, %d = %d/%d [T = %d/%d]\n", a, b, o, res, c, carry); + abort(); + } +} + +int main(void) +{ + subv(INT_MIN, 1, INT_MAX, 1); + subv(INT_MAX, -1, INT_MIN, 1); + subv(INT_MAX, 1, INT_MAX - 1, 0); + subv(0, 1, -1, 0); + subv(-1, -1, 0, 0); + + return 0; +} diff --git a/tests/tcg/sh4/Makefile.target b/tests/tcg/sh4/Makefile.target index 521b8b0a76..7852fa62d8 100644 --- a/tests/tcg/sh4/Makefile.target +++ b/tests/tcg/sh4/Makefile.target @@ -20,3 +20,6 @@ TESTS += test-macw test-addv: CFLAGS += -O -g TESTS += test-addv + +test-subv: CFLAGS += -O -g +TESTS += test-subv From patchwork Fri May 3 15:36:11 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: 1931097 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=y51LGWB+; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VWFMJ13sgz1ydX for ; Sat, 4 May 2024 01:38:36 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2uyl-0004x0-O3; Fri, 03 May 2024 11:37: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 1s2uyU-0004R0-JE for qemu-devel@nongnu.org; Fri, 03 May 2024 11:37:29 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2uyS-0002mO-3s for qemu-devel@nongnu.org; Fri, 03 May 2024 11:37:25 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a599a298990so161696566b.2 for ; Fri, 03 May 2024 08:37:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714750642; x=1715355442; 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=JoD/zlu+/4ZeapaLPXoxxdoWxm9OjKa8JA5CSHa74YE=; b=y51LGWB+01kHXcF1v6rilRC6wNhPNBpmtvzU+3WiOLL145Z4HEy2dW5yB/lKWdReDe T2DGpUnUHKZQLwJwEtMHBKI/VmTqAamlW60rXRRBeuArQEuQMBzJ3km3EEhSrSnrgh0y frZDypjmHDij2w6O1Bdn0L2LZfu5JOqQvlaSm2m5429v2KuuM1FhPq+wDOEyXp3rOotO 8gy06JxE0a7lm+EnEl6Q1uILz7i4xyv+FPTIVcx7xCFNCC/vG0UCmH3toVEKfPtbkEMm WcZHk9VmijLep8eZQ9RyuyRXEKUPancrMl/Q+kOl+N6jAz/YV8JBEPyBYl6oLiL3lnFw cI1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714750642; x=1715355442; 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=JoD/zlu+/4ZeapaLPXoxxdoWxm9OjKa8JA5CSHa74YE=; b=vBenKx0WEHF8Sg47PLaG1G/vujb5jZqpfNn8ED6ETRhrSsMzGg6FO1jEpeCeBF5JG/ SHLni781SWlmBxH+Axn9HcliIIWf0h1KzDQ8OtzhqAxY1S2fv5ARNi2Kq8qaYuw++BEc 8nhY3rw7dgHViIZYaBTaR7jxHtFG/Dni0iYVEDPy65VP4rekuEaTSC2JdkPiVFptIEGh k/k91MIlgDordK37mMkV82ycVwNR/iLOVp5m7JCUkJVJvhhks5VRYtbr+el6jjL44Oyo jUai4Ve9Gt8bfl51PtshccUWzmWBl/RojlNOERTvOHeF2cwJBKcYaAmsRpnN1+UZl+hz UapQ== X-Gm-Message-State: AOJu0YyWQx+KF9PulB2Yt4wjehzsZBEPUEm1e5Ttl+Iq+IbqkBG0TiPY fjD1FXKejutLKp5G3Z/0T1P59NWH3ZXeaZQ0cK+CkW3Ora6uYvIkzllqMTy8c8/XtogOKcRCMwz 3 X-Google-Smtp-Source: AGHT+IEUVU8WVsg1py4st43oPY17gpsYRuLyvr8rYJvqUHB+pqWsmlUaaU+6VU1FAbouxrE4xY8DEw== X-Received: by 2002:a17:907:766e:b0:a58:7ce0:8e13 with SMTP id kk14-20020a170907766e00b00a587ce08e13mr1942899ejc.34.1714750642044; Fri, 03 May 2024 08:37:22 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id o3-20020a1709064f8300b00a58ea7cfeedsm1815768eju.62.2024.05.03.08.37.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 08:37: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?= , Richard Henderson , Yoshinori Sato Subject: [PULL 12/14] target/sh4: Rename TCGv variables as manual for ADDV opcode Date: Fri, 3 May 2024 17:36:11 +0200 Message-ID: <20240503153613.38709-13-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503153613.38709-1-philmd@linaro.org> References: <20240503153613.38709-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=philmd@linaro.org; helo=mail-ej1-x629.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org To easily compare with the SH4 manual, rename: REG(B11_8) -> Rn REG(B7_4) -> Rm t0 -> result Mention how overflow is calculated. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Yoshinori Sato Message-Id: <20240430163125.77430-4-philmd@linaro.org> --- target/sh4/translate.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/target/sh4/translate.c b/target/sh4/translate.c index 3e013b7c7c..47c0f3404e 100644 --- a/target/sh4/translate.c +++ b/target/sh4/translate.c @@ -705,16 +705,20 @@ static void _decode_opc(DisasContext * ctx) return; case 0x300f: /* addv Rm,Rn */ { - TCGv t0, t1, t2; - t0 = tcg_temp_new(); - tcg_gen_add_i32(t0, REG(B7_4), REG(B11_8)); + TCGv Rn = REG(B11_8); + TCGv Rm = REG(B7_4); + TCGv result, t1, t2; + + result = tcg_temp_new(); t1 = tcg_temp_new(); - tcg_gen_xor_i32(t1, t0, REG(B11_8)); t2 = tcg_temp_new(); - tcg_gen_xor_i32(t2, REG(B7_4), REG(B11_8)); + tcg_gen_add_i32(result, Rm, Rn); + /* T = ((Rn ^ Rm) & (Result ^ Rn)) >> 31 */ + tcg_gen_xor_i32(t1, result, Rn); + tcg_gen_xor_i32(t2, Rm, Rn); tcg_gen_andc_i32(cpu_sr_t, t1, t2); tcg_gen_shri_i32(cpu_sr_t, cpu_sr_t, 31); - tcg_gen_mov_i32(REG(B11_8), t0); + tcg_gen_mov_i32(Rn, result); } return; case 0x2009: /* and Rm,Rn */ From patchwork Fri May 3 15:36:12 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: 1931096 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=fjDJ1eaR; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VWFLz4TZcz1ydX for ; Sat, 4 May 2024 01:38:19 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2uyn-00057R-3q; Fri, 03 May 2024 11:37: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 1s2uyY-0004Wg-MD for qemu-devel@nongnu.org; Fri, 03 May 2024 11:37:31 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2uyX-0002o7-0m for qemu-devel@nongnu.org; Fri, 03 May 2024 11:37:30 -0400 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a519e1b0e2dso1369678466b.2 for ; Fri, 03 May 2024 08:37:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714750647; x=1715355447; 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=a7vgoVsqHzfmK76y1aCdJ7NQoyMwbf/Tg31Ldi1SHrk=; b=fjDJ1eaREp8S61eKv6ySeGpdsOO6aZoAXuH6+TU+rkyZtdwFJQdwuiNnWAA4GyqyEi eztYD9FjHQfRUNK13XJlXcna4R9KhE51WlRfL7c+mlvj46bRncNvFbz/32LbdZAtwS0k l2jeGR5MPlYLcybJMnPeRAOEh0NofHIBOaXiTP2n0J7dbTSFfU5n7lW9oI5qyHOHhksL e/mAvS7dx9Vd0aGwW917K2f8pw9hH13QHM+n1h6jYcsRd1KdqkUNaP9xGZFOdMvw+Z4k bxMK7boyxAFsIzLWCyvztZoRnw+ELwFeITHWUXjjm8RYtel6iNhLxhOoyemca3FO4tWI jZeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714750647; x=1715355447; 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=a7vgoVsqHzfmK76y1aCdJ7NQoyMwbf/Tg31Ldi1SHrk=; b=uhyhNlDDmOaclHMuoGR9A1cQ75hlKTBTDFn1hcmgxuIgjwzWEhWB4ckb23OwfVGK0m N+6Ov5KIM4f1tqLSMYq76NwLPDbeJ+iHqo7815xvGdjVEZJyh8GnaUI17ujWQWVpmsh8 3sucW9XrBX8LvQdoY6qPBIHJ1owPIyUGPo6M+gAOYZ9hpXjPYgTASV5j8uLAghlDDUsv JZJDg0KbFZn8w7cPlmn7P7qKmg7mV8iHah8vIuBEGyt/kdHF1qDIqNQ/THlqxIRkivpi 07vfd544msx9u2StFfFwYWtW2ZPQv8CC2gPw+fOjFlAqIVSMowVUuSdYC22RadkA6R6t b8ag== X-Gm-Message-State: AOJu0YwLerWY5IC5/suT2EUGXkhz0dCAJdFqLL7HI+Jhf4WbXvFTZYRX uuNCJq/B5M9rSYWOlpl58ddDSa7xDtWHFE5BecD5kQSLi+9ayv+fJAVdVob4hJ3XwRPJ31WHiwk s X-Google-Smtp-Source: AGHT+IFR+4Zuao0MN6F/jozyG1+IvmrxnadgWxyOvsroVfL4jAsBOD5EPWfgyudvhWd0vefe4juNwg== X-Received: by 2002:a50:aa92:0:b0:56e:22bd:7e90 with SMTP id q18-20020a50aa92000000b0056e22bd7e90mr1502646edc.40.1714750647317; Fri, 03 May 2024 08:37:27 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id l11-20020a056402028b00b00572bba6745esm1771484edv.81.2024.05.03.08.37.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 08:37: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?= , Richard Henderson Subject: [PULL 13/14] target/sh4: Rename TCGv variables as manual for SUBV opcode Date: Fri, 3 May 2024 17:36:12 +0200 Message-ID: <20240503153613.38709-14-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503153613.38709-1-philmd@linaro.org> References: <20240503153613.38709-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=philmd@linaro.org; helo=mail-ej1-x633.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org To easily compare with the SH4 manual, rename: REG(B11_8) -> Rn REG(B7_4) -> Rm t0 -> result Mention how underflow is calculated. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240430163125.77430-5-philmd@linaro.org> --- target/sh4/translate.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/target/sh4/translate.c b/target/sh4/translate.c index 47c0f3404e..e599ab9d1a 100644 --- a/target/sh4/translate.c +++ b/target/sh4/translate.c @@ -933,16 +933,20 @@ static void _decode_opc(DisasContext * ctx) return; case 0x300b: /* subv Rm,Rn */ { - TCGv t0, t1, t2; - t0 = tcg_temp_new(); - tcg_gen_sub_i32(t0, REG(B11_8), REG(B7_4)); + TCGv Rn = REG(B11_8); + TCGv Rm = REG(B7_4); + TCGv result, t1, t2; + + result = tcg_temp_new(); t1 = tcg_temp_new(); - tcg_gen_xor_i32(t1, t0, REG(B11_8)); t2 = tcg_temp_new(); - tcg_gen_xor_i32(t2, REG(B11_8), REG(B7_4)); + tcg_gen_sub_i32(result, Rn, Rm); + /* T = ((Rn ^ Rm) & (Result ^ Rn)) >> 31 */ + tcg_gen_xor_i32(t1, result, Rn); + tcg_gen_xor_i32(t2, Rn, Rm); tcg_gen_and_i32(t1, t1, t2); tcg_gen_shri_i32(cpu_sr_t, t1, 31); - tcg_gen_mov_i32(REG(B11_8), t0); + tcg_gen_mov_i32(Rn, result); } return; case 0x2008: /* tst Rm,Rn */ From patchwork Fri May 3 15:36:13 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: 1931095 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=rAQ6Bt+i; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VWFLq6l42z1ydX for ; Sat, 4 May 2024 01:38:11 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2uyp-0005Uf-BV; Fri, 03 May 2024 11:37: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 1s2uye-0004dP-Vk for qemu-devel@nongnu.org; Fri, 03 May 2024 11:37:38 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s2uyc-0002oZ-I4 for qemu-devel@nongnu.org; Fri, 03 May 2024 11:37:36 -0400 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a597c192246so167224466b.0 for ; Fri, 03 May 2024 08:37:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714750652; x=1715355452; 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=kpo/S5Ob+DXg1pnPA7+b6elSHA1T4ch7nUT4NXQUXUE=; b=rAQ6Bt+iD2RvsbVqeBUYkPMU38vW4EThxoXylUVDedaxWbIBzh8/Chhyl4s1MrLN9s /76jimm6PjNqnCe+UIqltlAeU7C/F0mcXz44euT6crs7hEuZKmQV2yVjT3xlZ4g0ThQc Mtiyt1JodJoxjxzBLpjzMCDs0WyUFGaqHhy0nhbM8ZSm9amHPPGELY3f2+3Lt2KRd7dW z1ypMhGyL+HXRrD3KutA2gWmp4w/WixdwIgc+aOhQnfXsmW5t60+usGUP4Fy+X4Ip1pA SG3Fi/7cK4Evsv3EP9LNdwVQPLso29NQMexqx+GAjcs99TEpXYyO53UO0soOg+G8FhvP xMwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714750652; x=1715355452; 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=kpo/S5Ob+DXg1pnPA7+b6elSHA1T4ch7nUT4NXQUXUE=; b=kpmCtrLAzWjdXFQxhjZ+ps4EWH+i8aVJiIseqAG2fl5IjBpULwltg55bOoyZQh2EKi h9sTVlTA01Uz8VulMKeO5djdJJCQ44RZNLV2wqel5EbHxTfteo5ClnWT7bT4F05ux17R f/gESKfiFzZhPpPVYA3jMLno2miCCTbI+SmYNHg4QcKRaLFo07dWYN+yS82GfZRFYqqA q1oOtDEHISb+MZz+xwfLGnZHJEBvygHV1bIOgaSC5+vVxqxz+A0WYybebx4sTJscNU92 MaOEhs2TAzPcP9XFqG600eRGaivZItE3Otej8EZmvDXG+9FqhUO9uOAhe+VuEXpBgInL B/ZA== X-Gm-Message-State: AOJu0YyHwhfbvnopeQh/cEI3GhOecUL2ggU+T6kD2Zb5Tp7gCpVY+U9F HSCkZnSrpzvX+dM+4qMgKEvHhCEvHpMGQ0TT9pRF3zCZ69XlIOgdmFT0P1xZsfOXHT44U5dMXcu G X-Google-Smtp-Source: AGHT+IEdOrQfPYrGmnpPhox0c2f/cfc4oVvMA+UytGeKLHbj/BYto03kl6zHbh+tVXBuk0hTV5eFHQ== X-Received: by 2002:a50:f613:0:b0:572:689f:6380 with SMTP id c19-20020a50f613000000b00572689f6380mr2418621edn.3.1714750652674; Fri, 03 May 2024 08:37:32 -0700 (PDT) Received: from m1x-phil.lan ([176.176.179.187]) by smtp.gmail.com with ESMTPSA id g11-20020a056402320b00b0057203242f31sm1806814eda.11.2024.05.03.08.37.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 03 May 2024 08:37:32 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , =?utf-8?q?Daniel_P_=2E_Berrang?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 14/14] ui/cocoa.m: Drop old macOS-10.12-and-earlier compat ifdefs Date: Fri, 3 May 2024 17:36:13 +0200 Message-ID: <20240503153613.38709-15-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240503153613.38709-1-philmd@linaro.org> References: <20240503153613.38709-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=philmd@linaro.org; helo=mail-ej1-x633.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Peter Maydell We only support the most recent two versions of macOS (currently macOS 13 Ventura and macOS 14 Sonoma), and our ui/cocoa.m code already assumes at least macOS 12 Monterey or better, because it uses NSScreen safeAreaInsets, which is 12.0-or-newer. Remove the ifdefs that were providing backwards compatibility for building on 10.12 and earlier versions. Signed-off-by: Peter Maydell Reviewed-by: Daniel P. Berrangé Message-ID: <20240502142904.62644-1-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- ui/cocoa.m | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 25e0db9dd0..981615a8b9 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -50,23 +50,10 @@ #include #include "hw/core/cpu.h" -#ifndef MAC_OS_X_VERSION_10_13 -#define MAC_OS_X_VERSION_10_13 101300 -#endif - #ifndef MAC_OS_VERSION_14_0 #define MAC_OS_VERSION_14_0 140000 #endif -/* 10.14 deprecates NSOnState and NSOffState in favor of - * NSControlStateValueOn/Off, which were introduced in 10.13. - * Define for older versions - */ -#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_13 -#define NSControlStateValueOn NSOnState -#define NSControlStateValueOff NSOffState -#endif - //#define DEBUG #ifdef DEBUG