]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
KVM: nSVM: Remove redundant cases in nested_svm_intercept()
authorYosry Ahmed <yosry.ahmed@linux.dev>
Fri, 24 Oct 2025 19:29:16 +0000 (19:29 +0000)
committerSean Christopherson <seanjc@google.com>
Wed, 5 Nov 2025 21:32:36 +0000 (13:32 -0800)
Both the CRx and DRx cases are doing exactly what the default case is
doing, remove them.

No functional change intended.

Signed-off-by: Yosry Ahmed <yosry.ahmed@linux.dev>
Link: https://patch.msgid.link/20251024192918.3191141-2-yosry.ahmed@linux.dev
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/nested.c

index 83de3456df7087e0f97f4765b66bcb2f00d15fca..71664d54d8b2a862c53491dc28b033b84fcd22e3 100644 (file)
@@ -1438,16 +1438,6 @@ static int nested_svm_intercept(struct vcpu_svm *svm)
        case SVM_EXIT_IOIO:
                vmexit = nested_svm_intercept_ioio(svm);
                break;
-       case SVM_EXIT_READ_CR0 ... SVM_EXIT_WRITE_CR8: {
-               if (vmcb12_is_intercept(&svm->nested.ctl, exit_code))
-                       vmexit = NESTED_EXIT_DONE;
-               break;
-       }
-       case SVM_EXIT_READ_DR0 ... SVM_EXIT_WRITE_DR7: {
-               if (vmcb12_is_intercept(&svm->nested.ctl, exit_code))
-                       vmexit = NESTED_EXIT_DONE;
-               break;
-       }
        case SVM_EXIT_EXCP_BASE ... SVM_EXIT_EXCP_BASE + 0x1f: {
                /*
                 * Host-intercepted exceptions have been checked already in