From patchwork Thu May 1 23:01:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 886458 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp548256wrq; Thu, 1 May 2025 16:03:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV6PtJXS7d2zXgm/LGK9FRwG+n4Q4688LWX7cfULdGfGQueq/JtewrKHHtXpFQbio248uljaA==@linaro.org X-Google-Smtp-Source: AGHT+IEjArhHNMbVfR0IHmNeFbP60HEVZwk54AoKIeP1Ccr1vZqxamQXVzW1Nzo0OuoXM6OpNqlZ X-Received: by 2002:a05:6214:21c9:b0:6e6:646e:a0f0 with SMTP id 6a1803df08f44-6f515278e6fmr14981556d6.12.1746140593800; Thu, 01 May 2025 16:03:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746140593; cv=none; d=google.com; s=arc-20240605; b=bO2ngUSpv3h+43bCURCfws6hmnz0X0rjibZKACXwPdjTrzvvC2SWsbc8CBoQAyVPGJ JZBzIv8e89rsarvz+fVzI+elwvccnglwHDcAy1nb6NGtdTHo6yg0BQLjJc32C5B+cETx 8LvxXG6JyhIIvk95y76Z+opqBx38n0yIofWHaFSFbsRkh8qNkECwqnPq3NE0zSJAFkCb UNm063Rg6jiMYU2BieYlvOZiEqrv9gWnBsbfsZENsxpVHwwdssrRtxDjoStroBW5j0gc 19LgJrzq9CHJORYoZqGxn/8KGzyiP9Tqim0kSQBosPPy1ElPKG6yLoiZ07ucD8MZJ49L SM0A== 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=zUjb2KvGlUZUFz83Ds0AOUfQl+OnRqVo67ED0F/0NGk=; fh=Je0Fu6WOva9CO7x05EmtzN8739OQv5Rr57VCUmCpFeg=; b=XK2Vc7gk+79dlqUPKtIm0b7/fCdOSANVtSm4BXfeMwh0k4f18l3UOPrBN34cqn/+cl fzh2wf20H+9Xwp0N5vlSzUrLtND3aNXVgHASAaQJtELmRQV2eAhwt8Pm82BzGB6JXC7L NumjSRHB3Iu8kmqv6lhmcUH02+vofHvbESEnHRaKNM0pBoOdjT++4ltcORJOUvtloZFD MII3pGGWR9IOVQqQrytGUW8cl4apc5VAvwCv55smFIZUsDJ04iwCgYRWB2xJ6kS2+uu3 DRvUdOT2HA4tig0b+nhBcHhaJySnmCIM5Asq9zJaK4gf2z8DJHyCFB7DFu/54fJPrOPm yR7w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DunsNhTo; 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: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-48b9872457dsi15655181cf.387.2025.05.01.16.03.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 01 May 2025 16:03:13 -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=DunsNhTo; 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 ) id 1uAcvL-0000Ra-SU; Thu, 01 May 2025 19:02:35 -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 ) id 1uAcv9-0000E9-5d for qemu-devel@nongnu.org; Thu, 01 May 2025 19:02:27 -0400 Received: from mail-il1-x12e.google.com ([2607:f8b0:4864:20::12e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAcv6-0002KJ-SN for qemu-devel@nongnu.org; Thu, 01 May 2025 19:02:22 -0400 Received: by mail-il1-x12e.google.com with SMTP id e9e14a558f8ab-3d589ed2b47so4896055ab.2 for ; Thu, 01 May 2025 16:02:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746140539; x=1746745339; 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=zUjb2KvGlUZUFz83Ds0AOUfQl+OnRqVo67ED0F/0NGk=; b=DunsNhTouczSu6gQSlPVCZk/sGA54IGhDfwrSBIdZojE6RwAdRN3yrKgl0/NhHi3PF 8SrN514lWzjzr7U7F5yEAwjktuNfTS24iBdxyIYdEW0fxdNuKLve1KANx6+1gDT0MGH+ 9TcTdCl4qZyJIyoTPx5mH8E/CniBSKQO1B++FJ8AzwU02aPmMu+CCKgWQDXJI95RrQ+I TUw4DTBk2ehrnqarYXV5Se1Kcq84yvjnABm4HOqQfgQ9o4VfCl2IkXHy1ZoEl3FUveXF 511dSWhk7QVdHLO7fiaapmuHX3lHOZCdBaNgzxzb7PQ02ChSVbE+d17svJm2gtfLx7FK SbIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746140539; x=1746745339; 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=zUjb2KvGlUZUFz83Ds0AOUfQl+OnRqVo67ED0F/0NGk=; b=OUXh4jJ/63WOf6GW//IvlGkSHiXoHOAuEIYLkFZ094Cy7fqxuVyWAuDvH1OvKmR5ev lc7+temhKcrItYA7pA5ZjazXai0ruVKszgCaSbmfpTbW+exiJrQrRR2Hv4roV7ZD/aTC EnS3Tew+zAvn3LBJSwYbhWvHgGeotIhbWppyfNcUNgfR9/EO8IPgpdAndsvw7nprH59f PZ1oTxQU0eDVNQyWddqauy5NDdafMmsDLhi9lmdaT8lK9PZE7/sbjz0kRLksFeNzSB4h YMw+y3q/lRX9cICmmtD2xvmRDMqk74ZeJEUhuxYRoCOMvYi0CR9KticbwXwSavQIrLxb DxGQ== X-Gm-Message-State: AOJu0YzaNmliy7MS/aMuFxs/vo79/s4L3ryYzzgpRJh+J3PL5FH7+t93 uA7QvHAAR3GrCrg4mNZtPXf4cc19+KKpUVWOTXBYuYB9DunDDbqUn21z0CUy6OyHOtslLixbfmo Y X-Gm-Gg: ASbGncsg35N2TF6/V7o8UA+axmt97maRZ9j+Iq3S00yBbSIvw2EhdeMfjOIRx99ofGC fGPDBIfgllLdwWONteEE9qyhrGtosmB7t7ncNHKL+FyTmhpq7qE+Ys20BZDii39WX7x+N051VQP pHscpu4ob8KJydvKcmHTCLFDVP7zbkXLTuHpH/VmTB8C7B5tmBevngX99iwELxiVfwquPxup9aw 7qLAx1IvQXfpVtu2uxNDLBdOgDKlhzzz/d7V/rAwrO92Ck+XrU8zJqFSUEqr5V2WnMjAPXn3RdG UxK3FBH1qz4gXEVQjyLVa6+s/TAqXtdLzzOFWePCvBjqQW56Qb4pYvMkxkI+D6GbDd9e2+A5Qkd fd/21HZAfjC0SobiemMwk X-Received: by 2002:a05:6e02:1522:b0:3d9:6cb6:fa52 with SMTP id e9e14a558f8ab-3d97c1cba74mr10472685ab.12.1746140538619; Thu, 01 May 2025 16:02:18 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-3d975e6fbbdsm3386655ab.16.2025.05.01.16.02.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 01 May 2025 16:02:18 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Yanan Wang , Paolo Bonzini , Gerd Hoffmann , Thomas Huth , Halil Pasic , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , qemu-rust@nongnu.org, Zhao Liu , Eric Farman , Ilya Leoshkevich , Eduardo Habkost , Jason Wang , David Hildenbrand , Dmitry Fleytman , Richard Henderson , "Michael S. Tsirkin" , qemu-s390x@nongnu.org, Christian Borntraeger Subject: [PATCH 05/10] hw/timer/hpet: Remove HPETState::hpet_offset_saved field Date: Fri, 2 May 2025 01:01:23 +0200 Message-ID: <20250501230129.2596-6-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250501230129.2596-1-philmd@linaro.org> References: <20250501230129.2596-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::12e; envelope-from=philmd@linaro.org; helo=mail-il1-x12e.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, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The HPETState::hpet_offset_saved boolean was only set in the hw_compat_2_11[] array, via the 'hpet-offset-saved=false' property. We removed all machines using that array, lets remove that property and all the code around it. Signed-off-by: Philippe Mathieu-Daudé --- hw/timer/hpet.c | 9 +-------- rust/hw/timer/hpet/src/hpet.rs | 9 --------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c index d1b7bc52b7b..47b8fc0d880 100644 --- a/hw/timer/hpet.c +++ b/hw/timer/hpet.c @@ -71,7 +71,6 @@ struct HPETState { MemoryRegion iomem; uint64_t hpet_offset; - bool hpet_offset_saved; qemu_irq irqs[HPET_NUM_IRQ_ROUTES]; uint32_t flags; uint8_t rtc_irq_level; @@ -264,11 +263,6 @@ static int hpet_post_load(void *opaque, int version_id) t->cmp64 = hpet_calculate_cmp64(t, s->hpet_counter, t->cmp); t->last = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) - NANOSECONDS_PER_SECOND; } - /* Recalculate the offset between the main counter and guest time */ - if (!s->hpet_offset_saved) { - s->hpet_offset = ticks_to_ns(s->hpet_counter) - - qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); - } return 0; } @@ -277,7 +271,7 @@ static bool hpet_offset_needed(void *opaque) { HPETState *s = opaque; - return hpet_enabled(s) && s->hpet_offset_saved; + return hpet_enabled(s); } static bool hpet_rtc_irq_level_needed(void *opaque) @@ -733,7 +727,6 @@ static const Property hpet_device_properties[] = { DEFINE_PROP_UINT8("timers", HPETState, num_timers, HPET_MIN_TIMERS), DEFINE_PROP_BIT("msi", HPETState, flags, HPET_MSI_SUPPORT, false), DEFINE_PROP_UINT32(HPET_INTCAP, HPETState, intcap, 0), - DEFINE_PROP_BOOL("hpet-offset-saved", HPETState, hpet_offset_saved, true), }; static void hpet_device_class_init(ObjectClass *klass, const void *data) diff --git a/rust/hw/timer/hpet/src/hpet.rs b/rust/hw/timer/hpet/src/hpet.rs index cbd2ed4f6bf..9e681391176 100644 --- a/rust/hw/timer/hpet/src/hpet.rs +++ b/rust/hw/timer/hpet/src/hpet.rs @@ -544,7 +544,6 @@ pub struct HPETState { /// Offset of main counter relative to qemu clock. hpet_offset: BqlCell, - hpet_offset_saved: bool, irqs: [InterruptSource; HPET_NUM_IRQ_ROUTES], rtc_irq_level: BqlCell, @@ -885,14 +884,6 @@ impl ObjectImpl for HPETState { u32, default = 0 ), - qemu_api::define_property!( - c_str!("hpet-offset-saved"), - HPETState, - hpet_offset_saved, - unsafe { &qdev_prop_bool }, - bool, - default = true - ), } impl DeviceImpl for HPETState {