On 12/17/21 16:29, Jing Liu wrote:
@@ -370,6 +397,10 @@ struct kvm_vm *vm_create_with_vcpus(enum vm_guest_mode mode, uint32_t nr_vcpus, #ifdef __x86_64__ vm_create_irqchip(vm); #endif + /* + * Permission needs to be requested before KVM_SET_CPUID2. + */ + vm_xsave_req_perm();for (i = 0; i < nr_vcpus; ++i) {uint32_t vcpuid = vcpuids ? vcpuids[i] : i;
I don't think it's necessary to enable this unconditionally? Paolo