Re: [PATCH v14 8/9] hw/arm/virt: Add RAS platform version for migration

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

 



On 28 December 2017 at 14:58, Igor Mammedov <imammedo@xxxxxxxxxx> wrote:
> On Thu, 28 Dec 2017 13:54:17 +0800
> Dongjiu Geng <gengdongjiu@xxxxxxxxxx> wrote:
>
>> Support this feature since version 2.10, disable it by
>> default in the old version.
> patch should go before acpi tables are actually added,
> otherwise it might break bisectability.
>
>>
>> Signed-off-by: Dongjiu Geng <gengdongjiu@xxxxxxxxxx>
>> ---
>> Address Shannon's comments to add platform version in [1].
>>
>> [1]: https://lkml.org/lkml/2017/8/25/821
>>
>> Signed-off-by: Dongjiu Geng <gengdongjiu@xxxxxxxxxx>
>> ---
>>  hw/arm/virt-acpi-build.c | 14 +++++++++-----
>>  hw/arm/virt.c            |  4 ++++
>>  include/hw/arm/virt.h    |  1 +
>>  3 files changed, 14 insertions(+), 5 deletions(-)
>>
>> diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
>> index 06c14b3..b6974ef 100644
>> --- a/hw/arm/virt-acpi-build.c
>> +++ b/hw/arm/virt-acpi-build.c
>> @@ -801,10 +801,11 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables *tables)
>>      acpi_add_table(table_offsets, tables_blob);
>>      build_spcr(tables_blob, tables->linker, vms);
>>
>> -    acpi_add_table(table_offsets, tables_blob);
>> -    build_hardware_error_table(tables->hardware_errors, tables->linker);
>> -    build_apei_ghes(tables_blob, tables->hardware_errors, tables->linker);
>> -
>> +    if (!vmc->no_ras) {
>
> it's better to avoid no_foo, use something like
>
> vmc->has_ras

Fields in VirtMachineClass for this kind of thing tend to
end up having to be no_foo, because the default (false) must
be the setting for the most up to date version of the
virt board, because of the way the virt_machine_X_XX_options()
functions chain together. So no_ras matches the sense used
for all the existing bools in VirtMachineClass.

(In contrast, bools in the VirtMachineState struct are the
conventional sense, so there we have highmem/its/virt/etc.)

thanks
-- PMM



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux