Patch "KVM: arm64: Change kvm_handle_mmio_return() return polarity" has been added to the 6.6-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    KVM: arm64: Change kvm_handle_mmio_return() return polarity

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     kvm-arm64-change-kvm_handle_mmio_return-return-polar.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit ce0990dfeedc1119319c45710975ce08a745f787
Author: Fuad Tabba <tabba@xxxxxxxxxx>
Date:   Tue Apr 23 16:05:22 2024 +0100

    KVM: arm64: Change kvm_handle_mmio_return() return polarity
    
    [ Upstream commit cc81b6dfc3bc82c3a2600eefbd3823bdb2190197 ]
    
    Most exit handlers return <= 0 to indicate that the host needs to
    handle the exit. Make kvm_handle_mmio_return() consistent with
    the exit handlers in handle_exit(). This makes the code easier to
    reason about, and makes it easier to add other handlers in future
    patches.
    
    No functional change intended.
    
    Signed-off-by: Fuad Tabba <tabba@xxxxxxxxxx>
    Acked-by: Oliver Upton <oliver.upton@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20240423150538.2103045-15-tabba@xxxxxxxxxx
    Signed-off-by: Marc Zyngier <maz@xxxxxxxxxx>
    Stable-dep-of: e735a5da6442 ("KVM: arm64: Don't retire aborted MMIO instruction")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
index 4742e6c5ea7a0..ffdc2c4d07ee8 100644
--- a/arch/arm64/kvm/arm.c
+++ b/arch/arm64/kvm/arm.c
@@ -900,7 +900,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu)
 
 	if (run->exit_reason == KVM_EXIT_MMIO) {
 		ret = kvm_handle_mmio_return(vcpu);
-		if (ret)
+		if (ret <= 0)
 			return ret;
 	}
 
diff --git a/arch/arm64/kvm/mmio.c b/arch/arm64/kvm/mmio.c
index 3dd38a151d2a6..886ef30e12196 100644
--- a/arch/arm64/kvm/mmio.c
+++ b/arch/arm64/kvm/mmio.c
@@ -86,7 +86,7 @@ int kvm_handle_mmio_return(struct kvm_vcpu *vcpu)
 
 	/* Detect an already handled MMIO return */
 	if (unlikely(!vcpu->mmio_needed))
-		return 0;
+		return 1;
 
 	vcpu->mmio_needed = 0;
 
@@ -117,7 +117,7 @@ int kvm_handle_mmio_return(struct kvm_vcpu *vcpu)
 	 */
 	kvm_incr_pc(vcpu);
 
-	return 0;
+	return 1;
 }
 
 int io_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux