Commit b7e9488
committed
KVM: x86/mmu: Don't try to unprotect an INVALID_GPA
If getting the gpa for a gva fails, e.g. because the gva isn't mapped in
the guest page tables, don't try to unprotect the invalid gfn. This is
mostly a performance fix (avoids unnecessarily taking mmu_lock), as
for_each_gfn_valid_sp_with_gptes() won't explode on garbage input, it's
simply pointless.
Link: https://lore.kernel.org/r/20240831001538.336683-13-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent 2df354e commit b7e9488
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2729 | 2729 | | |
2730 | 2730 | | |
2731 | 2731 | | |
2732 | | - | |
| 2732 | + | |
2733 | 2733 | | |
| 2734 | + | |
| 2735 | + | |
| 2736 | + | |
2734 | 2737 | | |
2735 | 2738 | | |
2736 | 2739 | | |
| |||
2749 | 2752 | | |
2750 | 2753 | | |
2751 | 2754 | | |
| 2755 | + | |
| 2756 | + | |
2752 | 2757 | | |
2753 | 2758 | | |
2754 | 2759 | | |
| |||
0 commit comments