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

Re: [PATCH] Call SetVirtualAddressMap() by default


  • To: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 23 Feb 2023 14:21:11 +0100
  • 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=Y27drwXplKh9nrqujHlWXmeNrzaYOCjyW0iIbCL/Fms=; b=gVmvJ5DSq2vhu/vDQGiLDzEnvys3LqodyHGXV8TZHStMh+WKE+bu53IpmZ7VnLiKjgnKnQ9UEEjH8aHS1Lu+rgA5/A76jX1EClcMdLv70XfmielpvXezrcPoP1G2f0BaKb3NUK2vkYQwPnkzRo2iLYStTuZo1IdJELwUOG2Cb1/uF5eMCoZUpeGtZ49t2zh0HhcH5Z9WI9j/9ugrDSAk9ZQffgCV9setwb5e1CBaYYHEsN/ysW1EOXuOZo52DfmXk9gnvRIVynQDFyJMhGkZ9rxr5DkEqfESQ+svNGlc+Rx0YB9ivY9RF7HZe8rPsEKNTRTIKBAlkRmVgdVEBy1cog==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ec4oojDAFLxpvoyShrlCY8PBPb6rATbSXmv85x5OVtt9PH5OQ3wpzWpI0Z0uYwvs68TdjHHdpQEAHym/lC53G1F/vC/BMXfa4DrU6HiRIVIcNrcHf6pCRqrSVYISXiQL/2a0Jdzcmx+hT3jCJmUc7rwGk2EZELTqnRNnY3AV5RWfSSXvBSCNr1296tZoeTUiSEPY6QbLGKpJrKPcBlD4u/OFW2/tOm12138igWNeO1m4ErouUMzgERX67Ga4xTo/wza9oaiHb//x25Uprsgwz5VFPtx6lGT1JFuWyS0kaQx941QEug9hAGK4keZ6HrmHfzOO7oBmicS1u7bbZCETUQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Demi Marie Obenour <demi@xxxxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 23 Feb 2023 13:21:21 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 23.02.2023 14:08, Marek Marczykowski-Górecki wrote:
> On Thu, Feb 23, 2023 at 11:16:28AM +0100, Jan Beulich wrote:
>> On 22.02.2023 20:14, Demi Marie Obenour wrote:
>>> To quote Andrew Cooper:
>>>
>>>> I know we've had this argument before, but not calling
>>>> SetVirtualAddressMap() isn't a viable option.  It's a prerequisite to
>>>> function on literally millions of devices
>>>
>>> Qubes OS has been shipping EFI_SET_VIRTUAL_ADDRESS_MAP for years, and I
>>> believe OpenXT and EVE ship it as well. Mark EFI_SET_VIRTUAL_ADDRESS_MAP
>>> as SUPPORTED and enable it by default.
>>
>> This is insufficient justification. The main reason why we don't call
>> it is because it can be called only once. Any entity taking over later
>> (e.g. via kexec) can't do anything anymore about the virtual address
>> associations once set. Hence what's needed to justify a change like
>> this is an explanation of why this restriction is not really an issue
>> to anyone in any case.
> 
> AFAIR from the discussion about the original patch, kexec under Xen does
> not preserve runtime services working anyway, so this limitation is more
> about some possible kexec implementation in the future, not actually
> breaking something right now. And since Linux calls
> SetVirtualAddressMap() _and_ supports kexec just fine, it's definitely
> possible to design this future kexec extension to work after
> SetVirtualAddressMap() too.
> 
> Relevant parts of that older discussion:
> - 
> https://lore.kernel.org/all/272a9354-bcb4-50a4-a251-6a453221d6e3@xxxxxxxxxx/T/#u
> - https://lore.kernel.org/all/20191009235725.GT8065@mail-itl/T/#u

Well, there are various statements there without further reference. I'm
having a hard time seeing how a full-fledged Linux could do well without
runtime services, or without being able to set the virtual address map
to its liking. If they can, then a question would be why they need to
set the virtual address map in the first place (yes, there is this
supposed "firmware bugs" argument, which unfortunately I lack any proof
of; at the very least I'm unaware of bug reports against Xen boiling
down to us not making this call). Plus maybe they can merely because old
and new OS are similar enough in their (virtual) memory layout? IOW
kexec-ing to Linux for crash dumping purposes is just one (important)
example of the functionality that needs retaining. Once we get better
PVH Dom0 support, maybe other Dom0 OSes surface with entirely different
needs. As said back then - part of the reason why in the original
implementation I've avoided making this call is because of the fear of
closing possible roads we may need to take in the future.

Jan



 


Rackspace

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