From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 99C65CCFA04 for ; Mon, 3 Nov 2025 10:20:24 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vFrfa-0006Wq-Rr; Mon, 03 Nov 2025 05:20:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vFrfU-00061e-7X for qemu-arm@nongnu.org; Mon, 03 Nov 2025 05:20:11 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vFrfK-0003zy-91 for qemu-arm@nongnu.org; Mon, 03 Nov 2025 05:20:07 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-47721743fd0so22242095e9.2 for ; Mon, 03 Nov 2025 02:19:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1762165194; x=1762769994; 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=+zQ+kr7tsJFbwFHKOahptlya76rrqrFtmiQlsKMFVa0=; b=A7+mxddKlKXPw4YSn9omQShB6YxHmA8sPquPdDDPiZk0qiPzfhY56q1cMNLAX4AU0D nMuTmiogdqZPSTC+3L+wpuQh9ssVbYrd84ssqN4pZEL6x3mJ/AiypXPzr3i/LJJogtPx w4rsutNtwd6vde4i4uD66EPitzOAhUGdWVz6RlJIhPucw46eYJDhcDVL3eMXWkDR5THB slHJfTFK4LtE8xNbl/oDvs/s+M24+xPXeXMTmKb0Err3o5se/uqUCWJex8odTHy8TW54 LPv0PENnAcul5eax9n4UIKLFNZpzXZYFgvgZ7GyDiozca7VNOJKwU15XjSss8XJTQ9x9 EOcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762165194; x=1762769994; 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=+zQ+kr7tsJFbwFHKOahptlya76rrqrFtmiQlsKMFVa0=; b=tc+tjcINbiFSchgWDc1v8eo4kfBY2rYdA1sDG/aKn8holEO06YqDxEaFxzHs4x+Cxz LuOSZ6JcccbQHZqHh2AzKhJsRk8Qnh+EZd5906S4m2IYgCJq9jGKSL7ECIWAlP3Xm31B NkO9t5Y5+VZO1CAx1VnfhSdFvAGwyYMX75aLF6gDSe3QHL4xrzN7/gGvZeKMunDo1efV bQWeQp9RNjB03u2PZSrT04Cs8WmIyPZqjkvF01B9ecW+b0F0HMTjWakjmcgl5bcU6AK2 y3ZOdO06iR7FYhKjhqiErp/Xv7HDEcf4lKjwQ5zZEuS0DZGp3wmiKWqVgnrrJ+SCjoaj Kbqw== X-Forwarded-Encrypted: i=1; AJvYcCW01R9bFvRAAq90kLiIqCYiJx8QIOeBKLJnzb3M0cyGb8luGM6ZUpauBG/GrBx1AbU9R9hPakzTog==@nongnu.org X-Gm-Message-State: AOJu0YyG20wRgY0k9G09JTzvrRi7Cbb4bsw9QxgiaXzOB+c15iv3fnO8 t3o4mvYmplVuCwOblA+eIKRWNqRQUHskFwvQZcPs5OUN2KhJjZ/wM9n5Etxk+PWkujc= X-Gm-Gg: ASbGncs541QeY5LLiri2n0otV13j9ip+yxflSPircVB68XDEsJDH07P3C1ggYnXUEfK HEMJ2gYpWPlNd13U90Rzvvj8yPBR4eNesGN8SWIdCNLzu47hKv0QXOCsckG0rsFZ1s0eWzV/H8y IePd0xhLfqozA2ApCan/+svImNOo8k8bApOFEIt5vqhl8BZhsEBt0SZCm3K3L0Q6xbYpUQd0NOf YTQy9QGzIOeDdW2zIFlno/s52of8yYa6QnyxlzTC9kziPyqqQLVE8v+elC/Nfu5FwV1w7+0HbSr DdHVLkeIf2he3rwkRBNjBR7RsXqiYzqUanPAN4M561wMJLXTDVL7QCQXaLTkwL/2UIEHu7+IPAC fGM9I18hPrA2xiHwx+PQ+Jrk9UVEmJIoS9EOULJBWHy4qlr/akFn0AsnrYp1Zk/E0hQavp8aDMi +gGFp+ig06EZBt6pk4ziuSbiB/bgYuxxJNga4H3EnDkd9vgf/hsD3LCeu40L8= X-Google-Smtp-Source: AGHT+IFM5G/bbzxpzPIwuFSkGk2FVHlqkJqBtmO8jLNiCL2XdqjT9lN9G9eZB3C/rrsWZjAWaTO7HQ== X-Received: by 2002:a05:600c:3149:b0:477:942:7521 with SMTP id 5b1f17b1804b1-477307e285dmr102838195e9.14.1762165193648; Mon, 03 Nov 2025 02:19:53 -0800 (PST) Received: from localhost.localdomain (ip-185-104-138-122.ptr.icomera.net. [185.104.138.122]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4772fbc32d9sm86170835e9.1.2025.11.03.02.19.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 03 Nov 2025 02:19:53 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Roman Bolshakov , Alexander Graf , Phil Dennis-Jordan , qemu-arm@nongnu.org, Paolo Bonzini , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Akihiko Odaki , Peter Collingbourne , Cameron Esfahani , Mads Ynddal , Mohamed Mediouni Subject: [PATCH v4 21/23] target/i386/hvf: Flush vCPU registers once before vcpu_exec() loop Date: Mon, 3 Nov 2025 11:10:30 +0100 Message-ID: <20251103101034.59039-22-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251103101034.59039-1-philmd@linaro.org> References: <20251103101034.59039-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@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-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org Sender: qemu-arm-bounces+qemu-arm=archiver.kernel.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/i386/hvf/hvf.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 5134f302c08..51b3d392879 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -731,6 +731,10 @@ void hvf_simulate_wrmsr(CPUState *cs) void hvf_arch_cpu_synchronize_pre_exec(CPUState *cpu) { + if (cpu->vcpu_dirty) { + hvf_arch_put_registers(cpu); + cpu->vcpu_dirty = false; + } } void hvf_arch_cpu_synchronize_post_exec(CPUState *cpu) @@ -990,11 +994,6 @@ int hvf_arch_vcpu_exec(CPUState *cpu) } do { - if (cpu->vcpu_dirty) { - hvf_arch_put_registers(cpu); - cpu->vcpu_dirty = false; - } - if (hvf_inject_interrupts(cpu)) { return EXCP_INTERRUPT; } -- 2.51.0