Re: [PATCH v2 10/20] x86/sev: Use non-instrumented bitops in the GHCB accessors
From: Sean Christopherson
Date: Wed Nov 04 2026 - 08:37:38 EST
On Mon, Nov 02, 2026, Sasha Levin wrote:
> The GHCB accessors are used from noinstr code, such as
> __sev_es_nmi_complete(), but use test_bit() and __set_bit(), which
> call the KASAN and KCSAN checks. arch/x86/coco/sev/Makefile disables
> KASAN and KCSAN for noinstr.o, which turns those checks into empty
> stubs, but they still have to be inlined. Instrumentation such as gcov
> can prevent that and leave calls to kasan_check_write() behind in
> noinstr code.
>
> Use the arch_ bitops, which aren't instrumented, as is done elsewhere
> for noinstr code.
>
> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
> ---
Reviewed-by: Sean Christopherson <seanjc@xxxxxxxxxx>