[PATCH v2 3/3] KVM: arm64: Don't replace a valid hyp block mapping with a table
Xuheng Li
xuheng at cs.columbia.edu
Fri Nov 6 09:17:54 PST 2026
Hi Fuad, Vincent,
On Fri, Nov 06, 2026 at 02:34:55PM +0000, Fuad Tabba wrote:
> Actually, like Vincent pointed out, why the WARN_ON(). The caller can
> just handle the error.
Makes sense, I'll drop the WARN_ON() and just return -EEXIST.
One thing I noticed: the kernel-doc of kvm_pgtable_hyp_map() says that
a mapping over an existing one is "rejected with an error and a
WARN()", and the leaf case in hyp_map_walker_try_leaf() still warns.
Without the WARN_ON(), the comment would no longer match this case.
By the same reasoning, should the leaf case's WARN_ON() go too, in a
separate patch, with the comment reduced to "rejected with an error"?
Thanks,
Xuheng
More information about the linux-arm-kernel
mailing list