[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: Mon, 24 Jul 2023 12:02:49 +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=soERpOsRLbV3brjvLdmLqvEhIhDtCg7lQaV+SgJ1pEg=; b=ZMfaZpMMrwE164lwaIlnGpc1AlcfCv2Hm0FR99/ISRYPLHrfB+jLtuj3h7cWCKCCLrB3Yvf1VE+ccqUL1il2w9FqEfKrlZ7TgPqa2RVHfXmm5cZoLoE+tDdZxPftEuzYf2o2txP/UGKguJzsHPZoU7ofpEQUkc587yCcQS1dWiDwp4Nju3vKG4lpxhBAC0yFeElvNd6AP9YOYKqUy/c5aB1qS553X7fCuV8HSpsJqzAY+TLwBHPhRTcqowOULhJtPpmJJhI1AKNgyu+Wh83OASMQBkJO9EVJtr/S6ZVnDiJRXbC2c3OHh11ntCEzKyoq1oX4gOoG4yChC7aRxvNRaw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ST8f9vpP+WGzat3oJKxrDN9y4oV54JTT19ObnqbJF41lM9mOgVpGumHNvuacaTkC9K/UHxxkHxOE1upChMrGsbqJLt98yaaim/6mLQmTtyRcyNAHB+AJ9HZ4NC7uOAbCW0HO52+dabK3eEHowdxvhh2hd7i2JAvx1rp92TfBW3DQPomgfnhR1VvApn+BIeCJPMgnV4VxYv1rsecmxmfxrc8rDUxCCmVD5TnG50/P5rOw82ZLJH9LuapG00mGPkgoo2rcNdkVGPXSmkAIKsdnwt/dflNtdNgeBRdbi03rXTwNWDLhyHkM82oKSxkvGo4MqYeSmb4Kx7Ay08pdVdMvdA==
  • 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: Mon, 24 Jul 2023 10:03:01 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 24.07.2023 11:48, Simon Gaiser wrote:
> Jan Beulich:
>> 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.
> 
> Can you please explain what behavior you expect? As Roger pointed out
> this code only runs with opt_hpet_legacy_replacement < 0 so the user
> didn't make an explicit choice.

Oh, I'm sorry. Please disregard my comment then.

Jan



 


Rackspace

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