On 03.01.24 09:00, maobibo wrote:
On 2024/1/3 下午3:40, Jürgen Groß wrote:On 03.01.24 08:16, Bibo Mao wrote:The patch add paravirt interface for guest kernel, it checks whether system runs on VM mode. If it is, it will detect hypervisor type. And returns true it is KVM hypervisor, else return false. Currently only KVM hypervisor is supported, so there is only hypervisor detection for KVM type.I guess you are talking of pv_guest_init() here? Or do you mean kvm_para_available()?yes, it is pv_guest_init. It will be better if all hypervisor detectionis called in function pv_guest_init. Currently there is only kvm hypervisor, kvm_para_available is hard-coded in pv_guest_init here.
I think this is no problem as long as there are not more hypervisors supported.
I can split file paravirt.c into paravirt.c and kvm.c, paravirt.c is used for hypervisor detection, and move code relative with pv_ipi into kvm.c
I wouldn't do that right now. Just be a little bit more specific in the commit message (use the related function name instead of "it"). Juergen
Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key
Attachment:
OpenPGP_signature.asc
Description: OpenPGP digital signature