From nobody Tue Feb 10 02:44:06 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.54 as permitted sender) client-ip=209.85.221.54; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f54.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.54 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1632476335; cv=none; d=zohomail.com; s=zohoarc; b=T26K4/Dz9na3GM+ySeO+tkxN4DaJSoBkvfqP7XkUlf6rqFLKDQdL7gDNlEsYjhutr9tZZw2Rp5D5Ck3pAIIz07oFsRGrnc5sJnAMX8I9TSj4kgwO1E/cez1a/1ePCxE+OVTxpb0CB9+ib9+AeXglnAm9L5w1B8fFNLxrv7mmq3U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632476335; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5Bzxb+cyFW2fTjguo4+D1GgUMJzgo2oIaa6x4dhI9M8=; b=dgRAK3ncsooScPl4R/MupxIgMFRyrF1mruQBcgt2QE3AF3rXp0R3dWny1hAHsbxiJiodrBHxgvHVaZmatD1x/5j2Ct/fXJeIuPUuzOr0oPLdSY5FpJ7to+W6OxFOTwBZJHPa6lBzmosBnVaXmq1chCA8G7AclzoXk0XgiAsjyVs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.54 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mx.zohomail.com with SMTPS id 1632476335965903.8979363337378; Fri, 24 Sep 2021 02:38:55 -0700 (PDT) Received: by mail-wr1-f54.google.com with SMTP id g16so25519431wrb.3 for ; Fri, 24 Sep 2021 02:38:55 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.. (118.red-83-35-24.dynamicip.rima-tde.net. [83.35.24.118]) by smtp.gmail.com with ESMTPSA id q126sm11435167wma.10.2021.09.24.02.38.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Sep 2021 02:38:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5Bzxb+cyFW2fTjguo4+D1GgUMJzgo2oIaa6x4dhI9M8=; b=Z+ZVrJA7B+LRhlph252Bs05w8qRernFAcR0uaW2EqZLIaeL87gO8XvD5r4bZvNkp3+ hX1EJqJbuippSwE2WDYNrROZL+rBetx42PlK+8wrhGeLsOGgUGPblfRoclfGG3tfCD8u eBI9iXodHTu4cufWPSR+WxyXzPIObVXP8ArcVDSr/vlzcvRGCwDLdZr/Wgz90lKfUY2X VYUokkVXMJ0JPMQprbFAppj22boPdVagE8pWBhyciFYNxDEwamnxrhXfsA4rT/riAhY4 bbdYIb6pIWaeV5dgSnR9Q0TviODcmzuX3San6zlU6rCX7RAU8jGc5jtP5o00lXg3s9rh wKbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=5Bzxb+cyFW2fTjguo4+D1GgUMJzgo2oIaa6x4dhI9M8=; b=U2HDGBgdo+SMmU03eXrI0PPpalTHGbks3kv8zK9lXHd6di/R7mk0WDYWCCMC9Pep9N /Re2MWNtEmO5s6hVXwnQfr9R24lfXQ4oy9cuWOjaAm+LIyj+e1r0kQR6+/SEEGjR18CC psFfG8MusD7pmpT72krz4v2B24CcR3EtrPEQ63yGHzRMf2S2dsSw3/fkUdrwKYZV+z0N yE7EU2DIPv0ftOMmH8iviurmAcrYpBz4NZJpnfsMEn/0y5XTg8FvTSqTJoyYU7CdA5Vz XG0jsGm3NouPqKl6NpwsMxrS3SsepwTNhEihRQ6QdZvR9MrgvEAD08JlTJtxtg2ruPrB 1Dww== X-Gm-Message-State: AOAM5306Ra2T0111A4GL4J+8S7hHuKy2epIhpiGRvcTpRph528uqQs3m fxnZC//u/ybrpWFXg+kAqKo= X-Google-Smtp-Source: ABdhPJyEXLnBJ5FQO1c2ws6DQTUoRXlRdbtMRIFIWPeSVBvWTRWmUt4mhI0LSmwm06Oty6TGQxjWjg== X-Received: by 2002:adf:e44f:: with SMTP id t15mr10482837wrm.394.1632476334139; Fri, 24 Sep 2021 02:38:54 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini Subject: [PATCH v6 01/40] accel: Simplify qemu_init_vcpu() Date: Fri, 24 Sep 2021 11:38:08 +0200 Message-Id: <20210924093847.1014331-2-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210924093847.1014331-1-f4bug@amsat.org> References: <20210924093847.1014331-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1632476336329100001 cpus_register_accel() already checks for ops->create_vcpu_thread being non-NULL, so it is pointless to re-check for it in qemu_init_vcpu(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- softmmu/cpus.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/softmmu/cpus.c b/softmmu/cpus.c index 071085f840b..646326b24fd 100644 --- a/softmmu/cpus.c +++ b/softmmu/cpus.c @@ -604,7 +604,10 @@ void cpu_remove_sync(CPUState *cpu) void cpus_register_accel(const AccelOpsClass *ops) { assert(ops !=3D NULL); - assert(ops->create_vcpu_thread !=3D NULL); /* mandatory */ + + /* Mandatory non-NULL handlers */ + assert(ops->create_vcpu_thread !=3D NULL); + cpus_accel =3D ops; } =20 @@ -626,7 +629,7 @@ void qemu_init_vcpu(CPUState *cpu) } =20 /* accelerators all implement the AccelOpsClass */ - g_assert(cpus_accel !=3D NULL && cpus_accel->create_vcpu_thread !=3D N= ULL); + g_assert(cpus_accel !=3D NULL); cpus_accel->create_vcpu_thread(cpu); =20 while (!cpu->created) { --=20 2.31.1