[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 13/13] xen/arm: List static shared memory regions as /memory nodes
- To: Julien Grall <julien@xxxxxxx>
- From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
- Date: Tue, 16 Apr 2024 06:27:52 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
- 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=2; 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=Bt7/UPxgS8tEojDfuGPnhAl3QrzKoUPyTsXBWYSJEbQ=; b=DPpL3XLpxO4643+/yHenobQ7sZA5kKZdkPHpqo9EKEOmIR0/o+aIR2EnIG3OhCBqmfYz9/Wc7stL+27HSqbIC0XmgZi8Lol8UZUEH4lO4ZVYQ9ydvSToqYiiuwmuN3bXFvNa+ae906zR8nYlz4kieBLgypf5CM7wIPSsHpt4sdfW2E287T5HU+9b/LRF1o7V3Mz89bhvz6hUPX8d1CfrwWITHalTEnW69/NUKC67nCII23dnMWjl5Lfa1WJCwfIsZDjan7eopRHwpDzPE0CeQcDEhOKx4Rt2Y+yo5O/bb0cLVpED0HsSOZmOWew/DR6fb1omUpGsepLKFqnJhDLxnw==
- 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=Bt7/UPxgS8tEojDfuGPnhAl3QrzKoUPyTsXBWYSJEbQ=; b=jM54nnVFwsCUIHbFXe/3oA+d+OVeyfMXxFrkR0KHwsZGy4KPMCqqqPhYi9Ir2TcMDen6/PO69KmB5otHJ+FfIGWkslOOx0DWi+RKVAe7PZZmapCAaidNOke+2BxLnW19m3Spd3gwlxF6huYolMWkCSyk0O70gE0kyTiTmjGHC5w0cePeh8cLUun0Lz3vzVZbEig4275dJ6p+F1Wxwdb4TnCVSzVrrnaCcfoQZf2Yf3pePc5LPWsYgpGnnuYEtN12/p5L1aoUJWMMwcnLZhqV+O3P9Bj1bAHf3Gdm0C28+y49mLSli+5MRyiiV5Qo+u5qJy9Wx5/zylL1GL2ABeBWsg==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=N+LtYI4vjpSiEUtZQGK3gI75iFndOrjXzKM7+QM6f7WDpuH1YWShrzGtWAHDqcEsVh+eeWpgi3FR1HOl8LeLN+P1JU9cOAwcX1u0QxoneFZF7sN0VU+FG/19pCvfMLdpGsbvebyvHKGv027wPxsfhFwU+tw8eld3d87R3/SEAUnDwl6cfGtBbSAMMsU/XnPjfj/t4bxPZYkCgDPnf+iE7xiEmewe3qDNe3wwKQD0XYSjIM/KuJ+Qfxd51zGIwyCNODcvWZ03s3xQljdG4DtOH1vdlx1i+XyCSxdX4Ksg/mGpI7UASOep5j/kFKrG/M+2lmLBrNZ67uKXFx9EBenjMA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YoZPNqdfpsM00JMSrllF94uJT88P43kwoNmuVLJLqKo1n8Vwxrq7buyxqMaXDFRC7pmzoQXilR/QPqtRxCtW98qkW1loDz2rK7z3g4DPsq53kfJdjrdDfDBKVvE20EXr0rzFhaKTsqxt4lCNMANni/B5vofvo5zI9hNLoQwIvwjMb9wHWedG+chUmB0FCxSQ5OPa59bemI7YXt/7pV42r4L6zD+POcxEn6C36vRb8qAGrzhKaM8Uu5FiQw9J/U6q9hZxFVUjRbABzak5VUzhOU9oEiGctVXmiQrkh0PtkuUj9Ukzut0Q6tzLd/dbAbD3oSOzqY1+J/bh1eyHm8bC1w==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Tue, 16 Apr 2024 06:28:19 +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: AQHainSZ45I8T1wdtkSTioIgDqTSKbFptBmAgADFXAA=
- Thread-topic: [PATCH v2 13/13] xen/arm: List static shared memory regions as /memory nodes
Hi Julien,
> On 15 Apr 2024, at 19:41, Julien Grall <julien@xxxxxxx> wrote:
>
> Hi Luca,
>
> On 09/04/2024 12:45, Luca Fancellu wrote:
>> Currently Xen is not exporting the static shared memory regions
>> to the device tree as /memory node, this commit is fixing this
>> issue.
>> The static shared memory banks can be part of the memory range
>> available for the domain, so if they are overlapping with the
>> normal memory banks, they need to be merged together in order
>> to produce a /memory node with non overlapping ranges in 'reg'.
>
> Before reviewing the code in more details, I would like to understand a bit
> more the use case and whether it should be valid.
>
> From my understanding, the case you are trying to prevent is the following
> setup:
> 1. The Guest Physical region 0x0000 to 0x8000 is used for RAM
> 2. The Guest Physical region 0x0000 to 0x4000 is used for static memory
So far, it was possible to map guest physical regions inside the memory range
given to the guest,
so the above configuration was allowed and the underlying host physical regions
were of course
different and enforced with checks. So I’m not trying to prevent this
behaviour, however ...
>
> The underlying Host Physical regions may be different. Xen doesn't guarantee
> in which order the regions will be mapped, So whether the overlapped region
> will point to the memory or the shared region is unknown (we don't guarantee
> the order of the mapping). So nothing good will happen to the guest.
... now here I don’t understand if this was wrong from the beginning or not,
shall we enforce also that
guest physical regions for static shared memory are outside the memory given to
the guest?
>
> Did I understand correctly? If so, shouldn't this be a configuration we
> should forbid?
>
> Cheers,
>
> --
> Julien Grall
Cheers,
Luca
|