diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2021-06-28 13:44:20 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-20 17:05:36 +0300 |
commit | bedc5d091138f5ee79aebad252a95ad37017039b (patch) | |
tree | 752af7808311f8e105793b899ceb54aa284aad20 /arch/x86/kvm/x86.c | |
parent | 5b779e597cb79e4721d3bdc7eff4be1cd84d3739 (diff) | |
download | linux-bedc5d091138f5ee79aebad252a95ad37017039b.tar.xz |
KVM: nSVM: Check the value written to MSR_VM_HSAVE_PA
commit fce7e152ffc8f89d02a80617b16c7aa1527847c8 upstream.
APM states that #GP is raised upon write to MSR_VM_HSAVE_PA when
the supplied address is not page-aligned or is outside of "maximum
supported physical address for this implementation".
page_address_valid() check seems suitable. Also, forcefully page-align
the address when it's written from VMM.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20210628104425.391276-2-vkuznets@redhat.com>
Cc: stable@vger.kernel.org
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
[Add comment about behavior for host-provided values. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/kvm/x86.c')
0 files changed, 0 insertions, 0 deletions