aboutsummaryrefslogtreecommitdiff
path: root/rust/qemu-api-macros/src/lib.rs
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-12-24 16:59:12 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2025-01-10 23:34:44 +0100
commitd662b66da4bef9272144f7b79715aad90cdbc33e (patch)
treea68555e415b45398e401cb2a2f57d56335a2cad0 /rust/qemu-api-macros/src/lib.rs
parentd2401a6eae8f8fbd8e569c8b0638f0cbc80ec88e (diff)
downloadqemu-d662b66da4bef9272144f7b79715aad90cdbc33e.zip
qemu-d662b66da4bef9272144f7b79715aad90cdbc33e.tar.gz
qemu-d662b66da4bef9272144f7b79715aad90cdbc33e.tar.bz2
target/i386/kvm: Replace ARRAY_SIZE(msr_handlers) with KVM_MSR_FILTER_MAX_RANGES
kvm_install_msr_filters() uses KVM_MSR_FILTER_MAX_RANGES as the bound when traversing msr_handlers[], while other places still compute the size by ARRAY_SIZE(msr_handlers). In fact, msr_handlers[] is an array with the fixed size KVM_MSR_FILTER_MAX_RANGES, and this has to be true because kvm_install_msr_filters copies from one array to the other. For code consistency, assert that they match and use ARRAY_SIZE(msr_handlers) everywehere. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api-macros/src/lib.rs')
0 files changed, 0 insertions, 0 deletions