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

Re: [PATCH v2 0/7] xen/arm: Sanitize cpuinfo


  • To: Julien Grall <julien@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Mon, 23 Aug 2021 15:48:14 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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-SenderADCheck; bh=w1HbpxITTjsoyKhikva9BLbtIa2JQIM7YNisgW2fNmw=; b=na75W2ZRJxkkZlylICrNKhPsfT/zxVSTS5vLsZ3XqRDEXfdiOaQjhKmreqCsqARpQUdjlwvWGPoPH+INceE4V2+twzsNeKNb8m0wU3Ia8irCQqszuCmsvL3Y0MsVpXykLOja8rFpGBUjAYNCReWGNPHSWzwvw48khVZHas+fSWm2xldO1pF5t5TMOyJrNrbBJXSkkylQEnnXohpfxwEEr/w4n6MFRfjcjSiZNO2AxFI/486fxFja0DZit4d5lGh9+xcw2k0Fp/ydIJVv/jK+ydtPLGwRA+Qnu7fwNTIVrClDA5UAK+9Tx5VtNiBhlZQ7JKVxQ7Vos0sqJAzymdeFEQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n7zlgGSldAbSYfD8JVVLFIFJDjOd1hNEi1OLe2j+aNhtq8/z8C3zqcAADrDVxn5pbOKMlLMjClAcTXKIHIeaxnZrdPl4Q6zp5T7h5sfUqs578QJ1ZuXWTt60pFkRonty9UDAtyAmcB4Plq9eqD2A4Kv15/rGrfo3POvEBK5+eOltLuzej8SQsMRno7FuPUPh6dDrtunRUS57xrdPw2KS4gPI/uPo1w8OMJI8ESvSIJhnj4617hpgMzdmvfqKTjLKbM67+nIQhN1mPLykXSCojStgP9Y39vmhA/DlX+iNhEPhkpT0jcPC+hjWCPWgzq/GFBuwVql7p6C+oCZjSJe9eg==
  • Authentication-results-original: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Mon, 23 Aug 2021 15:48:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHXmApE4Kv6+ShsZkCCCMo7AkZIk6uA/4aAgAA89IA=
  • Thread-topic: [PATCH v2 0/7] xen/arm: Sanitize cpuinfo

Hi Julien,

[Keep only arm maintainers in the CC list]

> On 23 Aug 2021, at 13:10, Julien Grall <julien@xxxxxxx> wrote:
> 
> Hi Bertrand,
> 
> On 23/08/2021 11:32, Bertrand Marquis wrote:
>> On arm architecture we might have heterogeneous platforms with different
>> types of cores. As a guest can potentialy run on any of those cores we
>> have to present them cpu features which are compatible with all cores
>> and discard the features which are only available on some cores.
> 
> Sanitizing the CPU info is important for Xen so it can correctly size the 
> P2M, flush the cache... However, I don't think this is going to be sufficient 
> to be able to move a vCPU between different type of pCPU.
> 
> The main hurdle I can see so far is errata handling. Not all the errata can 
> be fully handled in Xen so some of them are left to the guest to mitigate.

I agree this is something to work on and a problem with the current serie.

> 
> The errata are usually detected based on the MIDR while the OS is booting. 
> IOW, a guest will not be able to know that it needs to handle an errata for 
> pCPU B if it only runs on pCPU A.

Ack.

> 
> I don't know yet how this can be solved, but errata are not that uncommon on 
> Arm. So until this addressed, we will still need to make sure that vCPUs are 
> not migrated between pCPUs with at least a different MIDR.
> 
> This prevention can be either done manually by pinning the vCPUs or 
> implementing the proposal that Dario sent a few years ago (see [1]).

My current proposal would be the following:
- add a command line option to allow to use all cores on a heterogeneous 
platform (different MIDR)
- taint Xen on this case
- keep the feature sanitize as it is as on this case it will create a safer 
setup (apart from the errata potential problem)
- keep current behaviour if command line option is not passed

Having a solution to enable all cores (even if it is unsafe) could still be a 
good improvement for development on big.LITTLE
platforms or for people knowing how to properly configure the system to prevent 
the problems by using properly cpupools so
I still think this serie with the proposed changes is still making a lot of 
sense.

I will start looking at a long term solution, maybe automatically create a 
cpupools on boot or investigate on the design you provided.

Please give me your view on this.

Kind regards
Bertrand

> 
> Cheers,
> 
> [1] https://lists.xenproject.org/archives/html/xen-devel/2016-12/msg00826.html
> 
> -- 
> Julien Grall




 


Rackspace

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