Message ID | 20250123234415.59850-5-philmd@linaro.org (mailing list archive) |
---|---|
State | New |
Headers | show
Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 002241D514F for <kvm@vger.kernel.org>; Thu, 23 Jan 2025 23:44:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737675881; cv=none; b=OAZIlZqiER8G13VRGFX3xWIxneDOsuqzXq9p5+PSWPrmJboxg0Ak26EhyMdPO5mLPEqyGZ2koEsDmRjZFOFveFg2UlqyaS5g9T0mFFKCh85zvBVa1QvD+QO5G8KEeCobM/PlHa4cwYYSTptl+vsxt6U/AaJ5Qp4cPVHNuDYGTWI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737675881; c=relaxed/simple; bh=+RWsapKn7VrlZrKBEoJngTX+sgVpkGZpz2JVXzmKACk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=MJC5B+h6CUgHyeMTEztBEEqNyWC/SfT/wHyCehlCG9M14C8f2ZeD4LsSZ99nA7S3ypoVYecVjt5+0XFIjmLce+GRDImY+0AtIGiNTtKAGIHg6VbwhpNspmVdLZRgBEYX6parKSbNr3H0xJlGQRM6r0yfyMCSGCWPPMLVeNkpB2Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ANldaWBv; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ANldaWBv" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-43635796b48so10273525e9.0 for <kvm@vger.kernel.org>; Thu, 23 Jan 2025 15:44:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737675878; x=1738280678; darn=vger.kernel.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=JSvw35u1c/GeD9pKIKqf6WHVcOBbPhJhoq/j5sOwl2I=; b=ANldaWBvBZd2jY44kHKuMuEMhGNUpZGch84GdJ+ceroO6862fhSQfwvmn+YEXe4coW thZ0ra3eBi2eyIPRJz2zgfHjuK4qZgS//gtxrSo3ucKPsEzh/jjW8nl2e7KCvgMVUL2F qIIvt+UdJ4rbfLA46SlWKtnMK/RoBpkdz12cg13L+dHnkZ0u5QcTtLTd3a6a+NEIYz57 BRSQzTqo68wZDfqrvnU/VlixIUQcN5xFfHRYZw+LnNQfO9QtI8IjaRFkkI5MUVVCeL+4 b6/aGl8uNZcDVQb97LjxHDIql7aVf0nDxKljWIFxB5/7m0AWVdfFijfGoQrVr9Um0Slh 1B/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737675878; x=1738280678; 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=JSvw35u1c/GeD9pKIKqf6WHVcOBbPhJhoq/j5sOwl2I=; b=EPlLsoVTXIJCEsD+Q1JePJPFlZd2M8+JP4Y4pt0XUJsYK4Q8vyMGGV9VOVKWKpJsDD Cl+AEmxmaw1vx1ltunNDNhztkNFW0OOk5Rf0M3BF6ob+XaKPxPZTVbiszDnHNDmSpIP8 nGoKliNOWfDM2UQjQzfqWT16vzLUbKuoS07t4F0YrYUgci3R1WhdhMK4zhPsEbJ7jWPv pFvV6JfyRlt0k5xgvu8TkBD76p/xPpC6RwOI927cfTiycD9AwKWqYM2i/ii+DODQN3c8 inpHrQ/rhn6RIoi9mxOXkb0PjlKSm1XMVgVT+t/s+gxEbcfbz0SzAQ/Jf+WZgUPzaPxo AqhQ== X-Forwarded-Encrypted: i=1; AJvYcCXJqQqO+5gNxfNyWOCFZlIBmCe3fY2h0PKL2zE8nQWzz9woJ9CZAZ1lpbuElUWdZ8pDt0g=@vger.kernel.org X-Gm-Message-State: AOJu0YywEoAim6Us2yl3nwRg747DGT7ZXHp/KOct68uvmQFa4m6zg5l/ cegW0l+CTb9iKb29kTi7OKGjEmLu0siY4i9g3gga32NMqepBbTXlWMdtWBmmC5U= X-Gm-Gg: ASbGncstp1H3TNpiGcfQTV7ISxKgj/GCWnTjh3qgaikiMNd+6y+lI2YcpVj935tilWo dSfZjTCB+vY0q7rC5qd2zvZ3gRGFbGNzzFc8cQDj2PE6IWxgCjl2J6oC40X35PSTok8MHv/jVwP nWmxpqLveItlV+jpfDrsZ0VzdiZlNhz7baUQHvkRm8P0wBsBFuMT8JRO7+KArg+Vh+TED9MlpyJ jK+8xBguAMojsgpE9Z2BIQm7hezFfvqa0KkYyFrGgzNLZh224/0caVXuK73tPwpZWvE9VnT9CA7 YRkhRnzO3GOi1TCP2i8nSsbDlO5gS6oZUsXNMueKZB9JrAkPOcnVlUST7QdFr3Pa1g== X-Google-Smtp-Source: AGHT+IGo8PNbuw90Bq4/JTfJj+icg7kmRyyI+cmqGdvUrpM4r/a237PZVlDOFDC6zvKvXQiH9M0QlA== X-Received: by 2002:a05:600c:3d05:b0:434:9e17:190c with SMTP id 5b1f17b1804b1-438b87f953fmr44596875e9.0.1737675878313; Thu, 23 Jan 2025 15:44:38 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd4857c3sm7081075e9.10.2025.01.23.15.44.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Jan 2025 15:44:37 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: Peter Maydell <peter.maydell@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, qemu-arm@nongnu.org, Igor Mammedov <imammedo@redhat.com>, =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, kvm@vger.kernel.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org, David Hildenbrand <david@redhat.com>, qemu-s390x@nongnu.org, xen-devel@lists.xenproject.org, Richard Henderson <richard.henderson@linaro.org>, =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= <philmd@linaro.org> Subject: [PATCH 04/20] cpus: Cache CPUClass early in instance_init() handler Date: Fri, 24 Jan 2025 00:43:58 +0100 Message-ID: <20250123234415.59850-5-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250123234415.59850-1-philmd@linaro.org> References: <20250123234415.59850-1-philmd@linaro.org> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: <kvm.vger.kernel.org> List-Subscribe: <mailto:kvm+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:kvm+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit |
Series |
accel: Simplify cpu-target.c (omnibus)
|
expand
|
diff --git a/cpu-target.c b/cpu-target.c index 667688332c9..89874496a41 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -134,9 +134,6 @@ const VMStateDescription vmstate_cpu_common = { bool cpu_exec_realizefn(CPUState *cpu, Error **errp) { - /* cache the cpu class for the hotpath */ - cpu->cc = CPU_GET_CLASS(cpu); - if (!accel_cpu_common_realize(cpu, errp)) { return false; } diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index cb79566cc51..ff605059c15 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -238,6 +238,9 @@ static void cpu_common_initfn(Object *obj) { CPUState *cpu = CPU(obj); + /* cache the cpu class for the hotpath */ + cpu->cc = CPU_GET_CLASS(cpu); + gdb_init_cpu(cpu); cpu->cpu_index = UNASSIGNED_CPU_INDEX; cpu->cluster_index = UNASSIGNED_CLUSTER_INDEX;