]> git.proxmox.com Git - mirror_qemu.git/commit
i386: kvm: Add support for MSR filtering
authorAlexander Graf <agraf@csgraf.de>
Tue, 4 Oct 2022 22:56:42 +0000 (00:56 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 11 Oct 2022 07:36:01 +0000 (09:36 +0200)
commit860054d8ce4067ef2bc3deb2a98cf93350fc03e4
treeab5395d13844ca7c223f7f58ad6824829c3e0157
parent62a44fddb24fec35a6baf7e2c52b0e935a5bfa90
i386: kvm: Add support for MSR filtering

KVM has grown support to deflect arbitrary MSRs to user space since
Linux 5.10. For now we don't expect to make a lot of use of this
feature, so let's expose it the easiest way possible: With up to 16
individually maskable MSRs.

This patch adds a kvm_filter_msr() function that other code can call
to install a hook on KVM MSR reads or writes.

Signed-off-by: Alexander Graf <agraf@csgraf.de>
Message-Id: <20221004225643.65036-3-agraf@csgraf.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/kvm/kvm.c
target/i386/kvm/kvm_i386.h