Message ID | 20250620171342.92678-34-philmd@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:5f54:0:b0:3a4:ee3f:8f15 with SMTP id cm20csp1454814wrb; Fri, 20 Jun 2025 10:21:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW+WtLue5v7JkK1RCAFYfMMR1RAPM2GEoRPolPzw0C9ALthd/XlCyIVBMsNH/I2a5NZfbj0iA==@linaro.org X-Google-Smtp-Source: AGHT+IG5oSlQ//5+iHrUL+wqQXUAUVMGTOa6u/pLfVyl2Y9NBYk172xUrQL795kKIVhED2jE30k3 X-Received: by 2002:a05:6214:2463:b0:6fa:a0ac:8d57 with SMTP id 6a1803df08f44-6fd0a473bd5mr56222226d6.12.1750440081353; Fri, 20 Jun 2025 10:21:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1750440081; cv=none; d=google.com; s=arc-20240605; b=jK8lI5RHZ1QIY63wQRRgA0qhPtzM9RcDWRa3KbNshq16a6wreeUCOsnRVe7C9kRpYg fIKTyhLZGEeHSpMpVKixL8EsjQUdCNPPqoLuJ+gjVHuYS5Irk+zey/T59ltJT3D5Lctf FVMOZQWbbO1teb5bnuzZQsNrdTb38v0Iij/mhwsbNLDIDf/D/Swx+sRJgwHWBdKYIH0u MuwnmgjwHHEbSfSItQm9CbVnsBEiad2IC5G1M5UaNcWNRx76UsQhm2xCg8Za3FwnqtcR s2PAvXiY8PG5TS90pc1kgwKOTQHoShQYLilKAZ+vvjA3xH+0gKJVLovXwUMO3hCmOxSR J98Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0chn/PFHrz+xSOI0jlEUFPBGrfliVmmZpEFFKJ3P4VU=; fh=8f2AL0Su0K9UlZksY2EEcc9O+An+AQ/T/SEdbs2pdSA=; b=N0cWQpysoKaeAa444Fza6CR6IW8N3A+p0DeU0YaAED9Ht3/BKbPTIMg2R+/iWL/SEo zR4ip8uXLJUIR9sncYXx7QDXBHtRLoAYxG7UeFw7Lth/+ZaGK66xGEcBeR8nLDyMRjHQ 3mYsaaQ19+a1ED98AcoIGm5YnFtSSosUXAU2Skox+tfSAmOIwQKGrUVZsXXxwugVwHjf lzSmAU4N5dWFpukqIKyNVUYMrut4l+tCcMmvY0rBDWfxGpyvOVK0zqabF2bMQ2LERl7b /KBSinouCMTR/P/1gK3RWbyRTdtTrEIQzbVCxSYRBgxaWca9EtJthgTqQzlZbVLdlLD7 im7Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WDqcsAy+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6fd0943af3fsi25205796d6.132.2025.06.20.10.21.21 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Jun 2025 10:21:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WDqcsAy+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1uSfP4-0000pi-DN; Fri, 20 Jun 2025 13:19:50 -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 <philmd@linaro.org>) id 1uSfLq-0003Gf-RZ for qemu-devel@nongnu.org; Fri, 20 Jun 2025 13:16:32 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1uSfLp-0004e7-3I for qemu-devel@nongnu.org; Fri, 20 Jun 2025 13:16:30 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-451d3f72391so19857125e9.3 for <qemu-devel@nongnu.org>; Fri, 20 Jun 2025 10:16:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1750439786; x=1751044586; 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=0chn/PFHrz+xSOI0jlEUFPBGrfliVmmZpEFFKJ3P4VU=; b=WDqcsAy+Ryi3y8F8A/VXP+hj66yqJoMUvMie2dA8ZXjbMEu8H5oYezHXbhDdlZ/kIU 6qnuejBDFhjeH1haxM+UjHQhw56pYARYTLOqG390qOW5xJOE6Bp0Vc57MxEn9G5nmLE9 B150sLiRp7sXtokNctkpM49hXPb/T2wWdeWh988DVLnm07hH6q9ap/m8RAAmnwAbLoEJ v6VrPPQcMJIoLO/H4x490LAhHPF15Ci6uWbWDK9V9dDzKTuqvKEGHKFdatJhJJFBd6ou S2cvJxRUqMv2WA//akNlm9v5nSEGX+aPg2i2MJ9Xo/y7dskMm6nyLaA4w3DGg2zMX6i4 N7pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750439786; x=1751044586; 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=0chn/PFHrz+xSOI0jlEUFPBGrfliVmmZpEFFKJ3P4VU=; b=Kykt3pcfhcOd1i7bwF40LcYNxB7GVmVtU39D8tWopE0czCoXZ6Tp1+ZQkj+0CpqJrW Ar6chJg1ZWscUJaNt9GlIS+nCP/dldVLt7yhdQzHHanfqrcXpCWTXIodVtOz7d43uFU4 MJCImA/8Q7s9SYqSus+sKv67s3+XD+tEjpVkONItrWP2r4WEl5HJRJDNIpDAYlkjlcKj gUfeELhwpUVJbuaOK+WfosVQIeoy1K3dI2VCfazOQ0tDDBNxzCatuejypoS0qnBMceD5 Odi7hHAt1elpg8gcESqNZGC6fwU8RQJ3012fTtsl5FaLh9UscmNWNlTyZYwf7YbCfzCo eY8A== X-Gm-Message-State: AOJu0YyugwkZIfNfvSRIC1zBO8vh7Qe9YSif8L30fS85YpvCOrcaBDzf Z1nKOraABbUkbplT5ATXmxvR//vJHBG+vjaJC2utVWOfFJKbSaCffG8qtSrFiXOOHujA0++zaB7 UcsnlS0I= X-Gm-Gg: ASbGnctsJPbprz1wLpKCAGZw5EWzrLrTUDzJ9lZrgPpH8SqXLjawnRW10nmGNfXYmhW 9XK3nASs16RRLGr7E7mTpJEYKFHlCxlPXebo5gzMh6pXDTfdBTJ87HiP7D27uVVH1269Rb6Esq6 rIkM2YIX+LLWyvQWcFKfs8AuvA51xgCvSbldrmF8K12EpHLiMcE+Jkynd+oP6H/c1rMt5LUt8SX ujXfFjc0weJPpJ+WTLciWh61aqJMJhI9/BJxjsPAopRWwtkGbyxdmLe0IyQpGlGkaJUpQ4bNryh 4hTCCcZNxyDV0YVDDS2HgvuaPgwjpaKJrdq/2te8uw4ecrLRPjD5Z4jJYK8jJUx7BsdjcAHRHMN r203pUaMqaaO+09VgI3V5Ulu28MM7bOQKN8r2 X-Received: by 2002:a05:600c:4fc5:b0:453:2066:4a26 with SMTP id 5b1f17b1804b1-453659ee9famr37781535e9.16.1750439786198; Fri, 20 Jun 2025 10:16:26 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a6d117c66esm2501112f8f.47.2025.06.20.10.16.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 20 Jun 2025 10:16:25 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, Alexander Graf <agraf@csgraf.de>, Richard Henderson <richard.henderson@linaro.org>, Pierrick Bouvier <pierrick.bouvier@linaro.org>, Peter Maydell <peter.maydell@linaro.org>, Thomas Huth <thuth@redhat.com>, Cameron Esfahani <dirty@apple.com>, Julian Armistead <julian.armistead@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= <philmd@linaro.org> Subject: [RFC PATCH v2 33/48] accel/hvf: Convert to AccelOpsClass::cpu_thread_routine Date: Fri, 20 Jun 2025 19:13:26 +0200 Message-ID: <20250620171342.92678-34-philmd@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250620171342.92678-1-philmd@linaro.org> References: <20250620171342.92678-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::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
accel: Preparatory cleanups for split-accel
|
expand
|
On 6/20/25 10:13, Philippe Mathieu-Daudé wrote: > By converting toAccelOpsClass::cpu_thread_routine we can > let the common accel_create_vcpu_thread() create the thread. > > Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org> > --- > accel/hvf/hvf-accel-ops.c | 18 +----------------- > 1 file changed, 1 insertion(+), 17 deletions(-) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index 78bf0ac6cba..6bf7fcd7331 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -471,22 +471,6 @@ static void *hvf_cpu_thread_fn(void *arg) return NULL; } -static void hvf_start_vcpu_thread(CPUState *cpu) -{ - char thread_name[VCPU_THREAD_NAME_SIZE]; - - /* - * HVF currently does not support TCG, and only runs in - * unrestricted-guest mode. - */ - assert(hvf_enabled()); - - snprintf(thread_name, VCPU_THREAD_NAME_SIZE, "CPU %d/HVF", - cpu->cpu_index); - qemu_thread_create(cpu->thread, thread_name, hvf_cpu_thread_fn, - cpu, QEMU_THREAD_JOINABLE); -} - static int hvf_insert_breakpoint(CPUState *cpu, int type, vaddr addr, vaddr len) { struct hvf_sw_breakpoint *bp; @@ -605,7 +589,7 @@ static void hvf_accel_ops_class_init(ObjectClass *oc, const void *data) ops->cpu_target_realize = hvf_arch_cpu_realize; - ops->create_vcpu_thread = hvf_start_vcpu_thread; + ops->cpu_thread_routine = hvf_cpu_thread_fn, ops->kick_vcpu_thread = hvf_kick_vcpu_thread; ops->synchronize_post_reset = hvf_cpu_synchronize_post_reset;
By converting to AccelOpsClass::cpu_thread_routine we can let the common accel_create_vcpu_thread() create the thread. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- accel/hvf/hvf-accel-ops.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-)