On Thu, Feb 26, 2026 at 10:50:57AM +0100, Ard Biesheuvel wrote:
> From: Ard Biesheuvel <[email protected]>
> 
> hv_crash_c_entry() is a C function that is entered without a stack,
> and this is only allowed for functions that have the __naked attribute,
> which informs the compiler that it must not emit the usual prologue and
> epilogue or emit any other kind of instrumentation that relies on a
> stack frame.
> 
> So split up the function, and set the __naked attribute on the initial
> part that sets up the stack, GDT, IDT and other pieces that are needed
> for ordinary C execution. Given that function calls are not permitted
> either, use the existing long return coded in an asm() block to call the
> second part of the function, which is an ordinary function that is
> permitted to call other functions as usual.
> 
> Fixes: 94212d34618c ("x86/hyperv: Implement hypervisor RAM collection into 
> vmcore")
> Signed-off-by: Ard Biesheuvel <[email protected]>

Ard, thank you for the patch.

For avoidance of doubt, I expect another version to be sent. We will
review and test the new version on our side.

Wei

Reply via email to