[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 01/12] xen/arm: enable SVE extension for Xen
- To: Julien Grall <julien@xxxxxxx>
- From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
- Date: Wed, 24 May 2023 14:30:16 +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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/nDoDP1cQr2TdFC3oohFVBusjQitDMOHQV8cJuoJidM=; b=hOqHrWJXOXs6owbjcGQiwQUYjXhtb6rDApvstRaIGIb3pPzf0UB0THXRKCc9zCVJHjDNd53ISWK898Txr2XoaUW8ZGAQ6z/7gKP6M/wrGTH56M/qYj0f8OGlBYNODUr+q7TQErOrqe19IZc1Fvmo7PbCp1s/JgwRwnT2nO/msFji02udNsLPB+20tGx2XIIbbHBcknCevBaBrcBLiUZqaQC3F6pgoFO+rjeZT1D6VDZOqh2vNiVk6qECTgZdifJ86Rk12uDFEyMUq6UoSG2Db0XoD8NMnPECmDIef4k9msBdoB3IwV8H1kj0FCPpeapUCbu4xDn3qTELRAVSRFtMbw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b7n4Vdi78k1vjud5o2FBhqBJWZcedU2LJdfjaLfWfq5diSRwGAB/7Iwvi+SPsVcPL2ZaByG4xIO25oQRqL3QLBpJhu/2WAoxF6XopBFwjcUOhrM31vOYP85XuoYNTS6UkCDDWFpnksqRoFwMRNL89CUwdIALObP89iA97/1fkeZXLjrRmOFIHyl97DYGft8zm7TaXAZdFlGjFIye5mDeCKmUvnWdQFWebTdQMRH7NteEnhiIXEuN9Kie00HosBxiHaNuUH7TqlUItD1HevtpRIeFTDqLU08JwnS9VlcM8yI0qCELOcjo7rrqLwBjhOGZQCG0/HEWTcEUgRfCSfDSdg==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Luca Fancellu <Luca.Fancellu@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Wed, 24 May 2023 14:30:38 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHZjUpOMMV4Yflw9E2LiWKuLwqFE69pIiaAgAAP2YCAAEvjgA==
- Thread-topic: [PATCH v7 01/12] xen/arm: enable SVE extension for Xen
Hi Julien,
> On 24 May 2023, at 11:58, Julien Grall <julien@xxxxxxx> wrote:
>
> Hi,
>
> On 24/05/2023 10:01, Bertrand Marquis wrote:
>>> diff --git a/xen/arch/arm/cpufeature.c b/xen/arch/arm/cpufeature.c
>>> index c4ec38bb2554..83b84368f6d5 100644
>>> --- a/xen/arch/arm/cpufeature.c
>>> +++ b/xen/arch/arm/cpufeature.c
>>> @@ -9,6 +9,7 @@
>>> #include <xen/init.h>
>>> #include <xen/smp.h>
>>> #include <xen/stop_machine.h>
>>> +#include <asm/arm64/sve.h>
>>> #include <asm/cpufeature.h>
>>>
>>> DECLARE_BITMAP(cpu_hwcaps, ARM_NCAPS);
>>> @@ -143,6 +144,9 @@ void identify_cpu(struct cpuinfo_arm *c)
>>>
>>> c->zfr64.bits[0] = READ_SYSREG(ID_AA64ZFR0_EL1);
>>>
>>> + if ( cpu_has_sve )
>>> + c->zcr64.bits[0] = compute_max_zcr();
>>> +
>>> c->dczid.bits[0] = READ_SYSREG(DCZID_EL0);
>>>
>>> c->ctr.bits[0] = READ_SYSREG(CTR_EL0);
>>> @@ -199,7 +203,7 @@ static int __init create_guest_cpuinfo(void)
>>> guest_cpuinfo.pfr64.mpam = 0;
>>> guest_cpuinfo.pfr64.mpam_frac = 0;
>>>
>>> - /* Hide SVE as Xen does not support it */
>>> + /* Hide SVE by default to the guests */
>> Everything is for guests and as Jan mentioned in an other comment
>> this could be wrongly interpreted.
>
> (Not directly related to this patch, so no changes expected here)
>
> Hmmm... The name of the function/variable is confusing as well given that the
> cpuinfo should also apply to dom0. Should we s/guest/domain/?
Would make sense to do some kind of coherency check here to use domain whenever
something is for dom0 or guest.
So yes that would be a good idea and I can add this to my todolist (after SVE
is merged to prevent conflicts).
Cheers
Bertrand
>
> Cheers,
>
> --
> Julien Grall
|