accel/kvm: check for KVM_CAP_MEMORY_ATTRIBUTES on vm
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 11 Oct 2024 08:39:58 +0000 (10:39 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Oct 2024 17:41:30 +0000 (19:41 +0200)
commit586d708c1e3e5e29a0b3c05c347290aed9478854
tree222e9776af6c0a9fe20d7f68be249ce63dfaf3bd
parent60de433d4cb17211dbea5c1e6b74d476dec16370
accel/kvm: check for KVM_CAP_MEMORY_ATTRIBUTES on vm

The exact set of available memory attributes can vary by VM.  In the
future it might vary depending on enabled capabilities, too.  Query the
extension on the VM level instead of on the KVM level, and only after
architecture-specific initialization.

Inspired by an analogous patch by Tom Dohrmann.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
accel/kvm/kvm-all.c