Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit feb3eb70 authored by Gleb Natapov's avatar Gleb Natapov Committed by Marcelo Tosatti
Browse files

KVM: MMU: make spte_is_locklessly_modifiable() more clear



spte_is_locklessly_modifiable() checks that both SPTE_HOST_WRITEABLE and
SPTE_MMU_WRITEABLE are present on spte. Make it more explicit.

Signed-off-by: default avatarGleb Natapov <gleb@redhat.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent 75d61fbc
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -448,7 +448,8 @@ static bool __check_direct_spte_mmio_pf(u64 spte)

static bool spte_is_locklessly_modifiable(u64 spte)
{
	return !(~spte & (SPTE_HOST_WRITEABLE | SPTE_MMU_WRITEABLE));
	return (spte & (SPTE_HOST_WRITEABLE | SPTE_MMU_WRITEABLE)) ==
		(SPTE_HOST_WRITEABLE | SPTE_MMU_WRITEABLE);
}

static bool spte_has_volatile_bits(u64 spte)