Re: [PATCH v2 06/29] LoongArch: KVM: Implement vcpu create and destroy interface

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

 





在 2023年02月21日 01:53, Paolo Bonzini 写道:
On 2/20/23 07:57, Tianrui Zhao wrote:
+    vcpu->arch.guest_eentry = (unsigned long)kvm_context->kvm_eentry;
+    vcpu->arch.vcpu_run = kvm_context->kvm_enter_guest;
+    vcpu->arch.handle_exit = _kvm_handle_exit;

Here as well, whatever is constant must not be stored in struct kvm_arch_vcpu.

Paolo

Thanks, we use this in vcpu_arch because the vcpu_arch is used as argument in switch.S' methods, we can quickly access the guest_eentry and handle_exit by using the KVM_ARCH_GEENTRY, KVM_ARCH_HANDLE_EXIT offsets. If we change to global variable , we should relocate it in switch.S and may lead to lower accessing speed.




[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