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

Re: [PATCH 11/22] x86: add a boot option to enable and disable the direct map


  • To: Julien Grall <julien@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 22 Dec 2022 14:24:30 +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=t+01OFubpNaP9bGDH6x8+gYO3b8F4tB3SdImxcaUwjg=; b=lXwCtbwQh3P+TeT1BBwm2BN61szkhvFoa+y7FgqEjLO1dlDDlw+eQvXvD2qP5Ad/OciOqmHsVLZrvvoKPq6ILosvF5YZGVw+TjbAilK5OYgKt7zLAyjLhioQoHHCmcxcIGsiyv1n2CuA57GUXYkiTOPPbsxzQllha3bCEmWnid57DEsa6e3oHo+yocAOAKqZn5hXZZUQRjOafmk206UftB/0Kga8+G7JOc27GYaFsgUvmwvnzqQQ1ZZl4tJNNjQ2vQX0mAniHNy7zdIK4f27oAhfdS+N2vhcJiFGYYqm0UNZSpYgoiTiSkBsqyY0ToPhXfx0RQx1GFXTnoVitM1g8A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kBLzvpA2EmEwRYFlVzUEtiirwum5YzCBcjn3qcI2w/fF2+FMNm/MMxV+GkVzIPsxAIGC1gMZqwsh1FGc6LHgnETKyx+WI+9zBP9tleiG9khPm5JJTP40MfG80UZubw6/QD/O7QH4d0eS5/kM47ONwmmKuUIjogcSOdZ0/hIQQsT+faxmpYVExswpnhCq+pSoa3EUaxfIcXA6Feds96mlF5sj2MyDbfJ4ec7zHSZyltpPmEULFr3S4cwNRuzATDb2uKpgdTrZhx7EYYC+K4YQLnjrWpLNvumtOJESICNgpcEIex9Oqz5j7zrO+mCcq0r2bcenKjQwIKvOiN5aVUvxFA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Hongyan Xia <hongyxia@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 22 Dec 2022 13:24:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 16.12.2022 12:48, Julien Grall wrote:
> From: Hongyan Xia <hongyxia@xxxxxxxxxx>
> 
> Also add a helper function to retrieve it. Change arch_mfns_in_direct_map
> to check this option before returning.

I think the abstract parts of this want to be generic right away. I can't
see why Arm would not suffer from the same issue that this work is trying
to address.

> This is added as a boot command line option, not a Kconfig to allow
> the user to experiment the feature without rebuild the hypervisor.

I think there wants to be a (generic) Kconfig piece here, to control the
default of the option. Plus a 2nd, prompt-less element which an arch can
select to force the setting to always-on, suppressing the choice of
default. That 2nd control would then be used to compile out the
boolean_param() for Arm for the time being.

That said, I think this change comes too early in the series, or there is
something missing. As said in reply to patch 10, while there the mapcache
is being initialized for the idle domain, I don't think it can be used
just yet. Read through mapcache_current_vcpu() to understand why I think
that way, paying particular attention to the ASSERT() near the end. In
preparation of this patch here I think the mfn_to_virt() uses have to all
disappear from map_domain_page(). Perhaps yet more strongly all
..._to_virt() (except fix_to_virt() and friends) and __va() have to
disappear up front from x86 and any code path which can be taken on x86
(which may simply mean purging all respective x86 #define-s, without
breaking the build in any way).

Jan



 


Rackspace

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