From nobody Fri May 3 23:13:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1685746050; cv=none; d=zohomail.com; s=zohoarc; b=HuSGUdYREvVPDq6WqBRrxDjH2knX9PWka91ZK+YkhUoq6tNUTdji/DKEc4QnZlmL8jHTBsnSfNfl+7i8V0LeWrBwaFKn1hrVliFxl3ROsJdq/3AI7mf6xymRm8zhOdG6yop/6fER9Tpo9xJC7vb/TVl3C3xwE68OOv0c0Ah+jNU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685746050; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=bVMIqqWV5g+QPtoI6znu8aw+zNebYRSC5VAPbRhIAk4=; b=e6mi8dzbnUIxTW+eB0kVPH8vOCU4o9c5Id8SER0AEKUD9AtEtsVfwGoebF+a62S4QwPyFqSEwKGFkuIk9PmuSQflF/cm3iXoKPpzLVuv3WfV4jrr2WQ07lGPU2TRrrHWJtwgiYKWitoeyIdXuxYS3cAJSukuie+XNyO+Vwh1J0Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1685746050973405.64235166827257; Fri, 2 Jun 2023 15:47:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q5DXe-0005zC-7n; Fri, 02 Jun 2023 18:46:42 -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 1q5DXc-0005rg-LZ for qemu-devel@nongnu.org; Fri, 02 Jun 2023 18:46:40 -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 1q5DXa-00067s-Pr for qemu-devel@nongnu.org; Fri, 02 Jun 2023 18:46:40 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3f6077660c6so24407605e9.0 for ; Fri, 02 Jun 2023 15:46:38 -0700 (PDT) Received: from localhost.localdomain ([176.187.218.254]) by smtp.gmail.com with ESMTPSA id z16-20020a7bc7d0000000b003f605814850sm6780530wmk.37.2023.06.02.15.46.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 02 Jun 2023 15:46:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685745996; x=1688337996; 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=bVMIqqWV5g+QPtoI6znu8aw+zNebYRSC5VAPbRhIAk4=; b=RAAKIvFOKZ4BOsaT5LTgvcBeqp6hGvTEFbek+gSjeDi2d5N5OWU+Kp89JLZfEhLR4j /4n54KJJihRRNi2+ggEzR3+TsUk1DiFYFXdFupO7Xgxjlh1Oajm4QZ9Mt3bycxmPUHW4 hBLiNpbvZA96Ll7wy3aqO6U5T8JWAx4l2I5Qx7TOxjsVIhzDrIAuAsvjHhRXdCtqOE39 bFS0zz6M9cvorr05rUYjGnUIT6Om3NaNY0Ykon4lQYS6illBsVC0W+KTdsPwzwqavjNk NsAsDyJFp5n5lG16yA88FFrf4BzgQyo59BVqrkAhj71YNHRctfpBz0HJaxTPTDwpRjrr h9gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685745996; x=1688337996; 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=bVMIqqWV5g+QPtoI6znu8aw+zNebYRSC5VAPbRhIAk4=; b=Ueo7Uc+0FHNanB6U8otkLnU5Ju9xTeayi2dm9krQ44zofAxrLEFbwX+4UQzTpq4nWl LWhHI6dne9KROJ6MmmaFIbYeKQSIyuF1ToBmGOjMBYZwl04yP1ZVMyMC2tndUWi+gAp7 59XfhSZzUrKrJbmyE/qgysfZxSL2/wTTKFBOVBrf8gkivomRvUQeYkDyXYWgsA6lo7ND b424TCIlQkDvoiVfD8VdBaK90K1+zTssVQXGHvYaQGjpMl3KT8jOlygCeFev9ItH+oUt VVnxF5vehORYjYJyAqmnKLHZfWAlVaKAXZ158VRuLTA8FeG6r1/pqBpHBRLPuaqfQudy wrDw== X-Gm-Message-State: AC+VfDz63EfTspbBJetpkzrNlGWT4U6yHenkEY9hbvGbNUmG0UXIjVV3 nvwf2o2Ywnp5hAdquo/dXT6lWZ5Dz9X38ZP6H1c= X-Google-Smtp-Source: ACHHUZ4Q4twJSoY3XMmJbWYrefvVtL1UE8CLH+J6U6uDUsz8RGnRJU7yTdvWv3IcOjzvgQ38OAB2sg== X-Received: by 2002:adf:cc91:0:b0:30a:e70d:9e73 with SMTP id p17-20020adfcc91000000b0030ae70d9e73mr1013224wrj.33.1685745996549; Fri, 02 Jun 2023 15:46:36 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 1/2] target/i386/helper: Remove do_cpu_sipi() stub for user-mode emulation Date: Sat, 3 Jun 2023 00:46:27 +0200 Message-Id: <20230602224628.59546-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230602224628.59546-1-philmd@linaro.org> References: <20230602224628.59546-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1685746051411100001 Since commit 604664726f ("target/i386: Restrict cpu_exec_interrupt() handler to sysemu"), do_cpu_sipi() isn't called anymore on user emulation. Remove the now pointless stub. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/i386/cpu.h | 3 ++- target/i386/helper.c | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 7201a71de8..cd047e0410 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -2285,7 +2285,6 @@ static inline void cpu_get_tb_cpu_state(CPUX86State *= env, target_ulong *pc, } =20 void do_cpu_init(X86CPU *cpu); -void do_cpu_sipi(X86CPU *cpu); =20 #define MCE_INJECT_BROADCAST 1 #define MCE_INJECT_UNCOND_AO 2 @@ -2419,6 +2418,8 @@ void x86_cpu_set_default_version(X86CPUVersion versio= n); =20 #ifndef CONFIG_USER_ONLY =20 +void do_cpu_sipi(X86CPU *cpu); + #define APIC_DEFAULT_ADDRESS 0xfee00000 #define APIC_SPACE_SIZE 0x100000 =20 diff --git a/target/i386/helper.c b/target/i386/helper.c index 36bf2107e7..792c8eb45e 100644 --- a/target/i386/helper.c +++ b/target/i386/helper.c @@ -611,9 +611,6 @@ void do_cpu_sipi(X86CPU *cpu) void do_cpu_init(X86CPU *cpu) { } -void do_cpu_sipi(X86CPU *cpu) -{ -} #endif =20 #ifndef CONFIG_USER_ONLY --=20 2.38.1 From nobody Fri May 3 23:13:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1685746055; cv=none; d=zohomail.com; s=zohoarc; b=H8zeZz6ClZKzrZmyRtywXPh32qiEWMzO4lFjxn7KrO7WnyZeVnJ+2plzF+jQNRTeYgiCjHty0jOmCrUy9pREn75rBcYcHDA9kyzKOqbi7NRTN3r7o3+mvGSzzm43KR7XZiHMCwFtslbxtjUK2gJkPyBHSsp1OfYA+Y7ajSd/cNs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685746055; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0gNfQtcCbE29jWLrUa/owBOh0KyyzbAKaOwkeSeQTqs=; b=lizGiaxlQ+6AfYohJhRQ3FEz2wmDA76DtNdAtnEMZP4clXvksFjt2YkSykYLpV2X71lzhDYKEEZspAkYMd49WeDwDb62dBSgm1St5wSgwd8feJEa41BHxI2q5LjqY1x7t8vE5Rtwh+SOO/MgcsbUlA5p7BRaIjC4+5yUmuxnD0c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1685746055969814.1728733212307; Fri, 2 Jun 2023 15:47:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q5DXj-0006GO-Tj; Fri, 02 Jun 2023 18:46: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 1q5DXi-0006Bw-3L for qemu-devel@nongnu.org; Fri, 02 Jun 2023 18:46:46 -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 1q5DXg-00068c-Jc for qemu-devel@nongnu.org; Fri, 02 Jun 2023 18:46:45 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-3f60e730bf2so26582895e9.1 for ; Fri, 02 Jun 2023 15:46:43 -0700 (PDT) Received: from localhost.localdomain ([176.187.218.254]) by smtp.gmail.com with ESMTPSA id b9-20020a05600010c900b0030ae87bd3e3sm2791277wrx.18.2023.06.02.15.46.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 02 Jun 2023 15:46:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685746002; x=1688338002; 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=0gNfQtcCbE29jWLrUa/owBOh0KyyzbAKaOwkeSeQTqs=; b=x0c74BJVTWVGjiJ4F2FO7a6C29q9ftHFn6mbmYeE6KLovs8feonrnlIjDb55ZKNwfK DnGI/FsuE57JcD1/xT6oBXc2MZTOdkU1NrVZdmEJD0TkzQYjja1X/5CBOx5f/GyAabKV 5n/ngXu/WE5qNN42eyyh96vgDD13FE05jria7SGs79VJjWjB+QaYz2aTRmiZe32BofZ+ d/CG1n2v6ODhWWyM/NPM5MQaYhndpSfyx0KZXRm9WcH680StOnN3GlomHr+MxxLjQeaC VwLIwTbPGQikaf1O/D0Kcin8QHZ044aERO5/eh5ShjB2IynTCTacS3tEay4H1K8KLqLR ffPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685746002; x=1688338002; 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=0gNfQtcCbE29jWLrUa/owBOh0KyyzbAKaOwkeSeQTqs=; b=ZB/05rQSSa7DQIEeypeZhKatgRCZFnmbx4JqqVYdsL6ZDA7NNIVtfuTJ2sGoUulzBD sVGYgF/PfuhHmRQYkq4Q9UjnsPupIYn+UoHBCO62x+5f88Wgut+EcdKOHUOov5/u62Ov 0skLp5y7bP9yCXvCNj0n5tka2NflGSbHD7oR09RhXzYWSLq9LRWr6xog2VBKRGkmBVYG 0MZa8VzKOSp8+cUrCXDBRikvJMOVZLVJIjkkmZgB78pgLxsGJtLGm1K/bF//J/gsEqz3 SzuAu2TcClvGWj9qJ31GEKRab3Ev6rrVC7jI43+KCsqHGZIUzJgCuow1A/nMTIUubrsU oTpQ== X-Gm-Message-State: AC+VfDwbEd8KPDnWsnv/mNglk+PjPAX/y8Hv4bycGke76otJy2UKQZ/b ErUe3S9xBrQGydsBwD7P6Y7ONR9kZtLySYS2qQc= X-Google-Smtp-Source: ACHHUZ6//j0EiiktQ0dFM6VhdZTDLzcFtMzfEvENtiC67pi0uApxcX1hCp82h1bLyrE6O5EYtcTSKA== X-Received: by 2002:adf:ec87:0:b0:30a:e9bd:b4cf with SMTP id z7-20020adfec87000000b0030ae9bdb4cfmr916199wrn.52.1685746001875; Fri, 02 Jun 2023 15:46:41 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 2/2] target/i386/helper: Shuffle do_cpu_init() Date: Sat, 3 Jun 2023 00:46:28 +0200 Message-Id: <20230602224628.59546-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230602224628.59546-1-philmd@linaro.org> References: <20230602224628.59546-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1685746056301100001 Move the #ifdef'ry inside do_cpu_init() instead of declaring an empty stub for user emulation. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/i386/helper.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/target/i386/helper.c b/target/i386/helper.c index 792c8eb45e..89aa696c6d 100644 --- a/target/i386/helper.c +++ b/target/i386/helper.c @@ -580,9 +580,9 @@ int cpu_x86_get_descr_debug(CPUX86State *env, unsigned = int selector, return 1; } =20 -#if !defined(CONFIG_USER_ONLY) void do_cpu_init(X86CPU *cpu) { +#if !defined(CONFIG_USER_ONLY) CPUState *cs =3D CPU(cpu); CPUX86State *env =3D &cpu->env; CPUX86State *save =3D g_new(CPUX86State, 1); @@ -601,19 +601,15 @@ void do_cpu_init(X86CPU *cpu) kvm_arch_do_init_vcpu(cpu); } apic_init_reset(cpu->apic_state); +#endif /* CONFIG_USER_ONLY */ } =20 +#ifndef CONFIG_USER_ONLY + void do_cpu_sipi(X86CPU *cpu) { apic_sipi(cpu->apic_state); } -#else -void do_cpu_init(X86CPU *cpu) -{ -} -#endif - -#ifndef CONFIG_USER_ONLY =20 void cpu_load_efer(CPUX86State *env, uint64_t val) { --=20 2.38.1