diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2021-10-18 14:13:37 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-10-18 14:13:37 -0400 |
commit | a25c78d04c1b2b37476c1fe6f5604eb173657399 (patch) | |
tree | 61444f2e00f8c904682789a47262b054d9b4bee0 /arch/x86 | |
parent | a7cc099f2ec3117678adeb69749bef7e9dde3148 (diff) | |
parent | fa13843d1565d4c5b3aeb9be3343b313416bef46 (diff) | |
download | linux-stable-a25c78d04c1b2b37476c1fe6f5604eb173657399.tar.gz linux-stable-a25c78d04c1b2b37476c1fe6f5604eb173657399.tar.bz2 linux-stable-a25c78d04c1b2b37476c1fe6f5604eb173657399.zip |
Merge commit 'kvm-pagedata-alloc-fixes' into HEAD
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/svm/sev.c | 2 | ||||
-rw-r--r-- | arch/x86/kvm/x86.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c index 1e8b26b93b4f..3e2769855e51 100644 --- a/arch/x86/kvm/svm/sev.c +++ b/arch/x86/kvm/svm/sev.c @@ -2583,7 +2583,7 @@ int sev_es_string_io(struct vcpu_svm *svm, int size, unsigned int port, int in) return -EINVAL; return kvm_sev_es_string_io(&svm->vcpu, size, port, - svm->ghcb_sa, svm->ghcb_sa_len, in); + svm->ghcb_sa, svm->ghcb_sa_len / size, in); } void sev_es_init_vmcb(struct vcpu_svm *svm) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index db7fa1398f0d..3ea4f6ef2474 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -11370,7 +11370,8 @@ static int memslot_rmap_alloc(struct kvm_memory_slot *slot, int level = i + 1; int lpages = __kvm_mmu_slot_lpages(slot, npages, level); - WARN_ON(slot->arch.rmap[i]); + if (slot->arch.rmap[i]) + continue; slot->arch.rmap[i] = kvcalloc(lpages, sz, GFP_KERNEL_ACCOUNT); if (!slot->arch.rmap[i]) { |