Re: [PATCH] x86/hyperv: Export hv_hypercall_pg unconditionally
From: James Bottomley
Date: Thu Sep 18 2025 - 10:21:15 EST
On Thu, 2025-09-18 at 08:47 +0200, Peter Zijlstra wrote:
> On Thu, Sep 18, 2025 at 11:33:18AM +0530, Naman Jain wrote:
>
> > Thank you so much Sean and Paolo for your valuable inputs. I will
> > try out these things. Summarizing the suggestions here:
> > * Use noinstr (no instrumentation)
> > * Have separate .S file
> > * Don't use "register asm".
> > * Use static calls for solving IBT problems
> > * RAX:RCX is probably ok to be used, considering ABI. Whether we
> > would still need to use STACK_FRAME_NON_STANDARD, I am not sure,
> > but I will see based on how it goes.
> >
> > I hope this addresses the concerns Peter raised. If there's
> > anything I might have missed, I'm happy to make further adjustments
> > if needed.
>
> It would be a definite improvement. I'm just *really* sad people
> still create interfaces like this, even though we've known for years
> how bad they are.
Thanks for that. Our only defence at Microsoft is that the hypervisor
ABI for this is 10 years old and counting.
> At some point we've really have to push back and say enough is
> enough.
Although we can't really do anything about the old ABI since we have
tons of things that use it, there is interest in Microsoft for co-
designing a new ABI that we could add to hyper-v for Linux use and
which would also be a part of bringing up and using virtual secure mode
(VSM) in KVM via the planes API. I was thinking the best way of
discussing it as a community would be the PUCK call, but if there are
alternative forums, we could use that as well. This is going to be
pretty long term: besides designing and testing a new ABI, we were
counting on Amazon upstreaming their VSM implementation for KVM and
we're a bit under resourced here if it turns out we have to do
everything.
Regards,
James