FAILED: patch "[PATCH] KVM: SEV: Ignore MMIO requests of length '0'" failed to apply to 7.0-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 7.0-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-7.0.y
git checkout FETCH_HEAD
git cherry-pick -x 1aa8a6dc7dac8b83234b53518311bf78231f4fa5
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026060404-chief-gush-9560@gregkh' --subject-prefix 'PATCH 7.0.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 1aa8a6dc7dac8b83234b53518311bf78231f4fa5 Mon Sep 17 00:00:00 2001
From: Sean Christopherson <[email protected]>
Date: Fri, 1 May 2026 13:22:27 -0700
Subject: [PATCH] KVM: SEV: Ignore MMIO requests of length '0'
Explicitly ignore MMIO requests of length '0', so that setting up the software scratch area (and other code) doesn't have to worry about underflowing the length, and to allow for special casing '0' in the future.
Message-ID: <[email protected]>
arch/x86/kvm/svm/sev.c +7 -3
@@ -4497,13 +4497,17 @@ int sev_handle_vmgexit(struct kvm_vcpu *vcpu)case SVM_VMGEXIT_MMIO_READ :case SVM_VMGEXIT_MMIO_WRITE : {bool is_write = control->exit_code ==SVM_VMGEXIT_MMIO_WRITE ; +u64 len = control->exit_info_2; - ret =setup_vmgexit_scratch (svm, !is_write, control->exit_info_2); +if (!len) +return 1 ; + + ret =setup_vmgexit_scratch (svm, !is_write, len);if (ret)break ; - ret =kvm_sev_es_mmio (vcpu, is_write, control->exit_info_1, - control->exit_info_2, svm->sev_es.ghcb_sa); + ret =kvm_sev_es_mmio (vcpu, is_write, control->exit_info_1, len, + svm->sev_es.ghcb_sa);break ; }case SVM_VMGEXIT_NMI_COMPLETE :