qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 5/5] kvm: check before accessing PCMachineState fields


From: Paolo Bonzini
Subject: Re: [PATCH 5/5] kvm: check before accessing PCMachineState fields
Date: Thu, 12 Dec 2019 17:18:17 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

On 12/12/19 17:11, Sergio Lopez wrote:
>>      }
>>  
>> -    if (kvm_check_extension(s, KVM_CAP_X86_SMM) &&
>> +    if (
>> +#ifdef CONFIG_PC
>> +        kvm_check_extension(s, KVM_CAP_X86_SMM) &&
>>          object_dynamic_cast(OBJECT(ms), TYPE_PC_MACHINE) &&
>> -        pc_machine_is_smm_enabled(PC_MACHINE(ms))) {
>> +        pc_machine_is_smm_enabled(PC_MACHINE(ms))
>> +#else
>> +    0
>> +#endif
>> +       ) {
>>          smram_machine_done.notify = register_smram_listener;
>>          qemu_add_machine_init_done_notifier(&smram_machine_done);
>>      }
> I'm not familiar with SMM, can we consider it a PC specific thing? If it
> isn't, perhaps we should move smm to X86MachineState.

Ok, I will do that.

Paolo

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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