[PATCH RFC 5/8] KVM: SVM: fix: Don't return an error for `GHCB_MSR_PSC_REQ`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Tom Dohrmann <erbse.13@xxxxxx>

There's no reason to return an error when encountering an page state change
request (PSC request) because that's normal behaviour on the guest's part.
Instead 0 should be returned to cause a VM exit so that userspace can handle
the page state change request.

Link: https://lore.kernel.org/lkml/Y77J7C2E9Xd1QcmZ@notebook/
Signed-off-by: Tom Dohrmann <erbse.13@xxxxxx>
Signed-off-by: Jarkko Sakkinen <jarkko@xxxxxxxxxxx>
---
 arch/x86/kvm/svm/sev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index d76127f1499a..899c78d03c35 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -4068,7 +4068,7 @@ static int sev_handle_vmgexit_msr_protocol(struct vcpu_svm *svm)
 		vcpu->run->vmgexit.ghcb_msr = control->ghcb_gpa;
 		vcpu->arch.complete_userspace_io = snp_complete_psc_msr_protocol;
 
-		ret = -1;
+		ret = 0;
 		break;
 	case GHCB_MSR_TERM_REQ: {
 		u64 reason_set, reason_code;
-- 
2.38.1




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux