From nobody Mon Apr 7 00:21:46 2025 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=1736983582; cv=none; d=zohomail.com; s=zohoarc; b=Eyzr1Ie4N6p82nfpglukw+ATZpsCyOy4YifI6WMcku7CJKmGQKbWpFIdT9Bwo1uUPE99OWhs0qfUyPxdjZ5pEi6WdmZs0C7eVY/qPLSOkbnd1VggdfArY94f/d5SK93D8ft7t4LdMabmb9b+zjn4Hn8hsmx6iRYN25L9zv7VywA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1736983582; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=pE1WNLw0lJJVV/NGjFQTr49kafS0H/nFV3VfMQJlIvc=; b=lAIfeEJoFapskd1ZxHDCQHGsLSFm95KZIqR5kMQPquVyHv3X1T3gwSxbDLcxWiRqsDg6C+DlyGi0sIMkFHSR5/B8VUKtIm6MyQyK9R9pK+JbY0+G2zmWcTiDUbxaQ7uwrEqCogMYFKospTlqOii8jYvHQXe6Jsdow3Y5UZQGd1A= 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 1736983582200216.02799654298337; Wed, 15 Jan 2025 15:26:22 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tYCjw-0002Re-S0; Wed, 15 Jan 2025 18:24:00 -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 1tYCju-0002R8-L3 for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:59 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tYCjt-0003vQ-0I for qemu-devel@nongnu.org; Wed, 15 Jan 2025 18:23:58 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-385de59c1a0so190541f8f.2 for ; Wed, 15 Jan 2025 15:23:56 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a8e4c1c01sm19148272f8f.97.2025.01.15.15.23.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 15 Jan 2025 15:23:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736983435; x=1737588235; 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=pE1WNLw0lJJVV/NGjFQTr49kafS0H/nFV3VfMQJlIvc=; b=PZn7bMJPl/ABxtXcmsaOp4h4imji9mdfZlPYJS/WgjlPD0d++xiijTxAxujhfOcxzZ 6rb41xLi5xYj/boUKptspsSznjQFCJLZn07YD4CJGAd52/xFBIjCmdi+MMVyvAKBNglV ogtBmYazpcYqI9N1ESyhatga+9YOaEN5iU4v4AOfWlRsVF5ZyNYWrm6NrhqPbeENpcQQ UNG5MCN2eVnZeBASn3asFQEtf40OXoy3GrlNcHU0bRgPwDrtIDzwRfk7aInoXTbB58Ai cZ1RmRX+8Xbj3Rzmt3K3lXM5Z2j7JpjGHH5OD2BKKemDCVPnCqYCYDuNwzF2QIEj9BqQ nqBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736983435; x=1737588235; 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=pE1WNLw0lJJVV/NGjFQTr49kafS0H/nFV3VfMQJlIvc=; b=aNEJfmUeyjnNvHM4TJ3aVcdNNSwZSNd3ZV2Hm4h0mzHb382zNQE+A8YP6L74eVduu6 Kw2a9Tho9JyVT91Fp96ZQxWb0yRXB1znG2eATGHC3P2ZhX7OPWaB6CHLukCRiBzfituC K6G8xSybj8cO3/LiSlmWiO0jWrofgMuolf4vxTj+wxbR66XTT/fhv8ATWKhWvOUqEmkn aZA40WUpe3wsJTzfX8e5qABwQLUyXXSo1FOQUsBXDYw56ULFzs4YjGla4wLI37PqFrEk LaTejUf6VPSlM3ftOGSGvgL9+wJFRqc8XceportosrB9JMCDes9gRswnAgpdTkYF+WJM jsgw== X-Gm-Message-State: AOJu0YyE1QyORJGdWArd//mwve1DJZvElqnkmHfclfwjCE5kNVr2EriX OJ/zxsDoulkVWe3x3HG6dUik48+2UQLZbo8EtnqU4sNXn4D/0IAGvC4d/wcgUZQ8q7Uvf182lGR MlsM= X-Gm-Gg: ASbGncsaLho5RmChfnao0ge/TG2MneOVfGr76XmZqhc5r8e5I1g/2uU0JgRcOWdrd3O sO+i/CaIA8/jfbiHt8korHzAiBA5nqpiuXb9Y/zXhNWk5OqhY5T8GtajGcDkS5imiFgHuEHq400 +bxu9+/zSZlN+UOagWqjv9ofaNRqBDsFlpj1iA636OH0FF7HlTCZqghtztZ4tznV0eAq7Iw5iiE OASmCVHSOnIBEOgXdBeJD+vbDhGiMAHGaNRctE//ATrn9qwxDQmcpo406bg6hb1EplAp/wTW9/e nGETaiGFiT7fhDq00VVd3Wrrkofk/Pw= X-Google-Smtp-Source: AGHT+IHAuUG14J19X0M488oc/IPw0mfuW9c9Lp/nrvzWxb26Og7/l/wPyoIeYwLZI54Gv6UtEBEy/w== X-Received: by 2002:a5d:6d89:0:b0:38a:8ace:85e8 with SMTP id ffacd0b85a97d-38a8ace860fmr28733787f8f.44.1736983435361; Wed, 15 Jan 2025 15:23:55 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jason Wang , Hanna Reitz , Dmitry Fleytman , qemu-block@nongnu.org, Fam Zheng , Paolo Bonzini , "Michael S. Tsirkin" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Zhao Liu , Yanan Wang , Kevin Wolf , Eduardo Habkost , Richard Henderson , Marcel Apfelbaum , Gerd Hoffmann , John Snow Subject: [PATCH 12/21] hw/i386/x86: Remove X86MachineClass::save_tsc_khz field Date: Thu, 16 Jan 2025 00:22:38 +0100 Message-ID: <20250115232247.30364-13-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250115232247.30364-1-philmd@linaro.org> References: <20250115232247.30364-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::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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=unavailable 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: 1736983582973019000 The X86MachineClass::save_tsc_khz boolean was only used by the pc-q35-2.5 and pc-i440fx-2.5 machines, which got removed. Remove it and simplify tsc_khz_needed(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Thomas Huth --- include/hw/i386/x86.h | 5 ----- hw/i386/x86.c | 1 - target/i386/machine.c | 5 ++--- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h index d43cb3908e6..29ffa1f450e 100644 --- a/include/hw/i386/x86.h +++ b/include/hw/i386/x86.h @@ -27,13 +27,8 @@ #include "qom/object.h" =20 struct X86MachineClass { - /*< private >*/ MachineClass parent; =20 - /*< public >*/ - - /* TSC rate migration: */ - bool save_tsc_khz; /* use DMA capable linuxboot option rom */ bool fwcfg_dma_enabled; /* CPU and apic information: */ diff --git a/hw/i386/x86.c b/hw/i386/x86.c index 69bfc00b9a5..57014863936 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -382,7 +382,6 @@ static void x86_machine_class_init(ObjectClass *oc, voi= d *data) mc->get_default_cpu_node_id =3D x86_get_default_cpu_node_id; mc->possible_cpu_arch_ids =3D x86_possible_cpu_arch_ids; mc->kvm_type =3D x86_kvm_type; - x86mc->save_tsc_khz =3D true; x86mc->fwcfg_dma_enabled =3D true; nc->nmi_monitor_handler =3D x86_nmi; =20 diff --git a/target/i386/machine.c b/target/i386/machine.c index d9d4f25d1a2..417cb4cd7f9 100644 --- a/target/i386/machine.c +++ b/target/i386/machine.c @@ -1060,9 +1060,8 @@ static bool tsc_khz_needed(void *opaque) { X86CPU *cpu =3D opaque; CPUX86State *env =3D &cpu->env; - MachineClass *mc =3D MACHINE_GET_CLASS(qdev_get_machine()); - X86MachineClass *x86mc =3D X86_MACHINE_CLASS(mc); - return env->tsc_khz && x86mc->save_tsc_khz; + + return env->tsc_khz; } =20 static const VMStateDescription vmstate_tsc_khz =3D { --=20 2.47.1