qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] target/i386: kvm: add VMX and SVM migration blo


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] target/i386: kvm: add VMX and SVM migration blockers
Date: Mon, 19 Nov 2018 19:21:15 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0

On 16/11/18 17:56, Dr. David Alan Gilbert wrote:
> * Paolo Bonzini (address@hidden) wrote:
>> Nested VMX and SVM do not support live migration yet.  Add a blocker
>> until that is worked out.
>>
>> Signed-off-by: Paolo Bonzini <address@hidden>
>> ---
>>  target/i386/kvm.c | 25 +++++++++++++++++++++++++
>>  1 file changed, 25 insertions(+)
>>
>> diff --git a/target/i386/kvm.c b/target/i386/kvm.c
>> index db1f4104b6..3b6fbd3f20 100644
>> --- a/target/i386/kvm.c
>> +++ b/target/i386/kvm.c
>> @@ -860,6 +860,8 @@ static int hyperv_init_vcpu(X86CPU *cpu)
>>  }
>>  
>>  static Error *invtsc_mig_blocker;
>> +static Error *vmx_mig_blocker;
>> +static Error *svm_mig_blocker;
>>  
>>  #define KVM_MAX_CPUID_ENTRIES  100
>>  
>> @@ -1250,6 +1252,29 @@ int kvm_arch_init_vcpu(CPUState *cs)
>>      if (c) {
>>          has_msr_feature_control = !!(c->ecx & CPUID_EXT_VMX) ||
>>                                    !!(c->ecx & CPUID_EXT_SMX);
>> +
>> +    }
>> +
>> +    if ((env->features[FEAT_1_ECX] & CPUID_EXT_VMX) && !vmx_mig_blocker) {
>> +        error_setg(&vmx_mig_blocker,
>> +                   "Nested VMX virtualization does not support live 
>> migration yet");
>> +        r = migrate_add_blocker(vmx_mig_blocker, &local_err);
>> +        if (local_err) {
>> +            error_report_err(local_err);
>> +            error_free(vmx_mig_blocker);
>> +            return r;
>> +        }
>> +    }
>> +
>> +    if ((env->features[FEAT_8000_0001_ECX] & CPUID_EXT3_SVM) && 
>> !svm_mig_blocker) {
>> +        error_setg(&svm_mig_blocker,
>> +                   "Nested SVM virtualization does not support live 
>> migration yet");
>> +        r = migrate_add_blocker(svm_mig_blocker, &local_err);
>> +        if (local_err) {
>> +            error_report_err(local_err);
>> +            error_free(svm_mig_blocker);
>> +            return r;
>> +        }
> 
> I think that's OK from a migration point of view; my only worry is if
> people have nesting enabled by default.  On AMD isn't it common to have
> it enabled by default in KVM? Especially if using -cpu host ?

Hmm, yeah.  I'll send a v2 with only nested VMX.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]