Re: [PATCH v3] drivers/hv: remove deposited pages from direct map

From: Magnus Kulke

Date: Mon Oct 05 2026 - 07:02:57 EST


On Thu, Oct 01, 2026 at 05:10:14AM +0000, Michael Kelley wrote:
> From: Magnus Kulke <magnuskulke@xxxxxxxxxxxxxxxxxxx> Sent: Wednesday, September 30, 2026 4:33 AM
>
> I went back and refreshed my memory on the discussion from July
> 2023. At least on x86, the faulting address is used only as a sanity
> check in ex_handler_zeropad(). The #GP exception handler already
> calls fixup_exception(), but it calls with fault_addr set to zero, so
> ex_handler_zeropad() always returns false (i.e., it says it can't do the
> fixup). From looking at the code, it appears the deposited pages case
> would "just work" if the sanity test against fault_addr was removed in
> ex_handler_zeropad(). There was a past discussion about removing
> the sanity test [1], but at the time there wasn't a strong reason for
> or against, so it was left in (having been added relatively recently in
> c4e34dd99f2e). An option for the deposited pages problem would
> be to make the case now for removing the sanity test.
>
> I haven't looked at the situation on arm64.
>
> It's your call on how to proceed -- I just wanted to make sure the
> full context is available to you.
>
> Michael
>

Thanks for the context, that's indeed helpful. I'll discuss this with
the mshv team. I'm still leaning towards disabling deposited pages from
the direct map because this seems semantically the right thing, but
Linus' statement gives some confidence that we can make the fixup work
for #GPs.

best,

magnus

> [1] https://lore.kernel.org/lkml/CAHk-=wipev18s9sErt+iNO_rzgyvGTce38fr1CYO0U_hGVGy2Q@xxxxxxxxxxxxxx/