Re: [PING PATCH v4 23/29] LoongArch: KVM: Implement handle gspr exception

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

 



On 3/28/23 14:31, Tianrui Zhao wrote:
+			case 0xc91:
+				/* idle GSPR */
+				er = _kvm_emu_idle(vcpu);
+				break;

So this is my last remark. What some other architectures do is change vcpu->arch.mp_state when entering an idle state, and at this point all calls to KVM_RUN would call the equivalent of _kvm_emu_idle(). This requires implementing the KVM_GET_MPSTATE and KVM_SET_MPSTATE ioctls.

This might also be useful if later you want to implement a mechanism where vCPUs can pause or resume, for example for multi-vCPU VMs.

You can implement this on top of what you have, but I highly recommend that you do it in the first version of what is committed to Linux.

Paolo




[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