]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/ppc/kvm: Replace variable length array in kvmppc_read_hptes()
authorThomas Huth <thuth@redhat.com>
Wed, 21 Feb 2024 16:26:35 +0000 (17:26 +0100)
committerThomas Huth <thuth@redhat.com>
Fri, 23 Feb 2024 07:13:52 +0000 (08:13 +0100)
commit97c2fc5076be1fb37e7af5287289c3ee023faabd
tree195e826ff313b3b68f601563295254d416119785
parentaba594da9645aa6bdb4e2729df2755c186023ca3
target/ppc/kvm: Replace variable length array in kvmppc_read_hptes()

HPTES_PER_GROUP is 8 and HASH_PTE_SIZE_64 is 16, so we don't waste
too many bytes by always allocating the maximum amount of bytes on
the stack here to get rid of the variable length array.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Message-ID: <20240221162636.173136-3-thuth@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
target/ppc/kvm.c