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

Re: [XEN PATCH] Create a Kconfig option to set preferred reboot method


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Per Bilse <Per.Bilse@xxxxxxxxxx>
  • Date: Tue, 17 Jan 2023 19:28:19 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=q0nEVV+PKACxNuyLFiJ+cSFauCEtuldpdi8hWhQlFlg=; b=A8Y+jJ2n6SjtKBTCBMZXC0xKaEZvqYiWQrlA38yZpLbEImo1XJqcXhkzCDl7Hyl577hLOx2gAbxTnAiF/HHNvpdzYDLsR0W63Xk7fmCBCbukv5lH8wuz1Vs3GsWOBYJpYYKVpIIlG0E1587QphJw6XJPShFPXJMOVCxfb8a/wd321LcZBoNioqjqAkt3AzfK7KRDKmPIlPeJmIRS7wnSsfFL888Qn8DUju/+OfXzn6iM0zjrsLb/vtAUui4a4ZYc7rMaeO48IuH1H1VWTBQWszRcbBLRjqDH2hd5mvWJ3PIgE0bryioVOEJWpiuTNxgYyw10cNmIzM6S7KAhT3rkaQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dWKv8wLWZqt4bX4R/9hedM09pbsIhVzAzhMKEejT+hRStqczyqg+W1GbmLE/YdGQM02TJIPzXq7H0PQMf1+r0nj3gOz7y1spVU9Fv8yPm3JcEt3hWTkZWkWd9bHtHb5Ic/aMkSyHyElZVLcqrV8qBQlLu/dKFm+Idlf6RT/jbj5JCq2ye9xt0NIN9aaTTRw9DE22VzD0tcIFXnmVX8e9zHVeUkiQuA9TvFObxegB2TW3ee1AtyDrYXE/w7TpF+OKbthOuaaJqWLhEBclkOMnL35ygcsgX1VDdPqA+5SZgT4ow6txoohnPgNPF9UHc3iGll/c/owtS3KVKpjtYpJMgQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 17 Jan 2023 19:28:51 +0000
  • Ironport-data: A9a23:ueT7CKpUeG9S0bEV5x5vfI5zhMheBmI/ZBIvgKrLsJaIsI4StFCzt garIBmHbK7YYGqhL993a422oU9V7Z/Wn9dgGgJk/ygzHypA8puZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYWYpAFc+E0/NsDo788YhmIlknNOlNA2Ev NL2sqX3NUSsnjV5KQr40YrawP9UlKm06WxwUmAWP6gR5weHziZNVvrzGInqR5fGatgMdgKFb 76rIIGRpgvx4xorA9W5pbf3GmVirmn6ZFXmZtJ+AsBOszAazsAA+v9T2Mk0MC+7vw6hjdFpo OihgLTrIesf0g8gr8xGO/VQO3kW0aSrY9YrK1Dn2SCY5xWun3cBX5yCpaz5VGEV0r8fPI1Ay RAXABUSfyvYi6Gf+umYdrY8m9sJPOPXYKpK7xmMzRmBZRonabbqZvyToPN9gnI3jM0IGuvCb c0EbzYpdA7HfxBEJlYQDtQ5gfusgX78NTZfrTp5p4JuuzSVkFM3jeeraYWIEjCJbZw9ckKwn m/cuU74BgoXHNee1SCE4jSngeqncSbTCdtDSuXlr68CbFu75mVNFzY4U3qBn9K+plaaSsN6G 0I/5X97xUQ13AnxJjXnZDW6qnOZuh8XW/JLDvY3rgqKz8L8/AKxFmUCCDlbZ7QOpMIwADAny FKNt9foHiB09q2YT2qH8bWZpi/0PjIaRVLufgcBRAoBptXm/oc6i0uWSs45SfHoyNroBTv33 jaG6jAkgKkehtIK0KP9+k3bhzWrpd7CSQtdChjrY19JJzhRPOaND7FEI3CChRqcBO51lmW8g UU=
  • Ironport-hdrordr: A9a23:F+DhFKNYZRIGw8BcT13155DYdb4zR+YMi2TDiHoadfUFSKelfp 6V9MjzjSWE8Ar4WBkb+exoS5PwOk80lKQFqLX5WI3OYOCIghrNEGgP1+XfKnjbalTDH41mpO 9dmspFebrN5DFB5KqU3OD7KadH/DDtytHKuQ6q9QYJcegcUdAD0+4WMGemO3wzYDMDKYsyFZ Ka6MYCjSGnY24rYsOyAWRAd/TfpvXQ/aiWKyIuNloC0k2jnDmo4Ln1H1yzxREFSQ5Cxr8k7C zsjxH53KO+qPu2oyWsmlM7rq4m1OcJ+OEzSvBkufJlawkEvzzYK7iJFYfy/Azd69vfkmrC2O O83ivIef4DoE85N1vF3SfFyk3u1i0j5GTlzkLdiXz/odbhTDZ/EMZZg5lFGyGpn3bIkesMop 6j5VjpwqZ/HFfFhmDw9tLIXxZlmg69pmcji/caizhaXZEFYLFcoIQD9AcNea1wah7S+cQiCq 1jHcvc7PFZfReTaG3YpHBmxJipUm4oFhmLT0Aesoie0iRQnnp+00wErfZv6Uso5dY4Ud1J9u 7EOqNnmPVHSdIXd7t0AKMbTc6+GgX2MGHx2aKpUCTa/Y08SgPwQsTMkcoIDcmRCeI18Kc=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHZKc71hMjfkRx58UW4fngDofFpla6ixK6AgAA7aAA=
  • Thread-topic: [XEN PATCH] Create a Kconfig option to set preferred reboot method

On 17/01/2023 15:55, Jan Beulich wrote:
> On 16.01.2023 18:21, Per Bilse wrote:
>> +config REBOOT_SYSTEM_DEFAULT
>> +    default y
>> +    bool "Xen-defined reboot method"
> 
> May I ask that you swap the two lines? (Personally I consider kconfig
> too forgiving here - it doesn't make a lot of sense to set a default
> when the type isn't known yet.)

Certainly, I spotted it myself after sending, and was kicking myself
for not seeing it earlier.

>> +choice
>> +    bool "Choose reboot method"
>> +    depends on !REBOOT_SYSTEM_DEFAULT
>> +    default REBOOT_METHOD_ACPI
>> +    help
>> +            This is a compiled-in alternative to specifying the
>> +            reboot method on the Xen command line.  Specifying a
>> +            method on the command line will override this choice.
>> +
>> +            warm    Don't set the cold reboot flag
>> +            cold    Set the cold reboot flag
> 
> These two are modifiers, not reboot methods on their own. They set a
> field in the BDA to tell the BIOS how much initialization / checking
> to do (in the legacy case). Therefore they shouldn't be selectable
> right here. If you feel like it you could add another boolean to
> control that default.

My understanding is that it was desired to provide a compiled-in
equivalent of the command line 'reboot=' option (which includes
cold and warm), but this may be a misunderstanding.  I can separate
these two out.

>> +    config REBOOT_METHOD_WARM
>> +            bool "warm"
>> +            help
>> +                    Don't set the cold reboot flag.
> 
> I don't think help text is very useful in sub-items of a choice. Plus
> you also explain each item above.

I thought it better to err on the side of caution.  The help texts will
appear at two different menu levels, but I can remove it.

>> +    config REBOOT_METHOD_XEN
>> +            bool "xen"
>> +            help
>> +                    Use Xen SCHEDOP hypercall (if running under Xen as a 
>> guest).
> 
> This wants to depend on XEN_GUEST, doesn't it?

Yes, depending on context.  In providing a compiled-in equivalent
of the command-line parameter, it should arguably provide and accept
the same set of options, but I'll change it.

>> +    default "x" if REBOOT_METHOD_XEN
> 
> I think it would be neater (and more forward compatible) if the strings
> were actually spelled out here. We may, at any time, make set_reboot_type()
> look at more than just the first character.

OK.

>> +#ifdef CONFIG_REBOOT_SYSTEM_DEFAULT
>>       default_reboot_type();
>>       dmi_check_system(reboot_dmi_table);
>> +#else
>> +    set_reboot_type(CONFIG_REBOOT_METHOD);
>> +#endif
> 
> I don't think you should eliminate the use of DMI - that's machine
> specific information which should imo still overrule a build-time default.
> See also the comment just out of context - it's a difference whether the
> override came from the command line or was set at build time.

OK; again, it's a slightly different take on the purpose than I had, but
I can change it.  Also for the rest.

Best,

   -- Per

 


Rackspace

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