[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH] x86/hpet: Disable legacy replacement mode after IRQ test if not needed


  • To: Simon Gaiser <simon@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 19 Jul 2023 15:32:06 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5f1k70+30YSCqH+dphjBlx5tcaWKc7vKrEBYeb02Sw4=; b=HKZevOTT4G9DfXE8+/B2Xt0xQzFsImMyYMnFsSa7b6MeCchMUZUuD187RwtqoVH0v1EV0+YURKmmep+jNr4goHmb2O6YRksBvhXeuC4tu/oKYbAnkMpXEDYe2BcTTDDOJUYIe4i7i4ebOruT5CN9RH9IFPosGSeY6Ra9jJQB0imOtwukF7Z8yyd1VEiGgM5bh7VLmwS3sNgc9mGCQqY893pKFMtGrWkvuPFyutoGPA6M+/ImoP5mLQR0+FmmhnqQIbDsAdjsCKLNogUy/AF+aIvX1BzhUTwfBFQJXTudo25jUXXyLc1RJhfga2ft2VaarSoUdcYbQ+aewnKqa1kPbw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZZM0a+Kit/PrUSv4WAcX2bQVQiee2bQiHCBNa2TkpA/xjuAj1JVmjkYfRJ76vgMKFqZ6fLo1kDYELKRWQKrs1FJcMKhMzoENaDMMGWAvzL+/fETbyPZqj3b3TprTXkCADWIIKRdtbOFZtOUxYmM6ir5r3T/xOK+50k/0JJEY6qUIAyN86jiakPcTQfKS5cJLzhrh1wnnJSro5LTd6eJpi/WOD36hTr0B0VnyiRjRKxKEHNhoOl9Ej5xZv6GGpM2zg6q2/kYb+jc8CqhfBFCi0cLEbfmNpnxM7wFofMd/mJ8+JI3El45HRr/2DMMYlE33RK9c/3F/ronsK7N1znWh0Q==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 19 Jul 2023 13:32:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 18.07.2023 23:51, Simon Gaiser wrote:
> Roger Pau Monné:
>> On Tue, Jul 18, 2023 at 02:26:03PM +0200, Simon Gaiser wrote:
>>> As far as I understand the HPET legacy mode is not required on systems
>>> with ARAT after the timer IRQ test.
>>
>> What's the relation with ARAT here?
>>
>> It would seem to me that keeping legacy replacement enabled should
>> only be done when opt_hpet_legacy_replacement > 0, and the currently
>> modified block is already in a opt_hpet_legacy_replacement < 0 gated
>> chunk.
> 
> I was concerned that on systems without ARAT cpuidle might rely on HPET
> legacy mode being available. See _disable_pit_irq and lapic_timer_init.
> But now that I stared at this again, I think that condition isn't
> actually needed. If we reach that code we know that we have no working
> PIT, but HPET is working. So _disable_pit_irq which is run after
> check_timer (__start_xen first calls check_timer via smp_prepare_cpus
> and only later disable_pit_irq via do_initcalls) will setup HPET
> broadcast, which should succeed since HPET worked previously.
> 
> So I guess we can just drop the condition (please double check, that
> code is quite tangled and I'm not familiar with it).

What you want to respect instead though is opt_hpet_legacy_replacement.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.