[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
signature.asc
Description: OpenPGP digital signature
- [PATCH 0/5] x86: allow building without PC machine types, Paolo Bonzini, 2019/12/12
- [PATCH 1/5] i386: conditionally compile more files, Paolo Bonzini, 2019/12/12
- [PATCH 2/5] fw_cfg: allow building without other devices, Paolo Bonzini, 2019/12/12
- [PATCH 5/5] kvm: check before accessing PCMachineState fields, Paolo Bonzini, 2019/12/12
- [PATCH 4/5] pci-stub: add more MSI functions, Paolo Bonzini, 2019/12/12
- [PATCH 3/5] x86: move more functions to X86MachineState and x86.c, Paolo Bonzini, 2019/12/12