[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YJARo9vpAgb6VmLI@hirez.programming.kicks-ass.net>
Date: Mon, 3 May 2021 17:07:15 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Brijesh Singh <brijesh.singh@....com>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
tglx@...utronix.de, bp@...en8.de, jroedel@...e.de,
thomas.lendacky@....com, pbonzini@...hat.com, mingo@...hat.com,
dave.hansen@...el.com, rientjes@...gle.com, seanjc@...gle.com,
hpa@...or.com, tony.luck@...el.com
Subject: Re: [PATCH Part2 RFC v2 08/37] x86/sev: Split the physmap when
adding the page in RMP table
On Fri, Apr 30, 2021 at 07:37:53AM -0500, Brijesh Singh wrote:
> This poses a challenge in the Linux memory model. The Linux kernel
> creates a direct mapping of all the physical memory -- referred to as
> the physmap. The physmap may contain a valid mapping of guest owned pages.
> During the page table walk, the host access may get into the situation where
> one of the pages within the large page is owned by the guest (i.e assigned
> bit is set in RMP). A write to a non-guest within the large page will
> raise an RMP violation. To workaround it, call set_memory_4k() to split
> the physmap before adding the page in the RMP table. This ensures that the
> pages added in the RMP table are used as 4K in the physmap.
What's an RMP violation and why are they a problem?
> The spliting of the physmap is a temporary solution until the kernel page
> fault handler is improved to split the kernel address on demand.
How is that an improvement? Fracturing the physmap sucks whichever way
around.
> One of the
> disadvtange of splitting is that eventually, it will end up breaking down
> the entire physmap unless its coalesce back to a large page. I am open to
> the suggestation on various approaches we could take to address this problem.
Have the hardware fracture the TLB entry internally?
Powered by blists - more mailing lists