On 2020/1/17 15:39, Philippe Mathieu-Daudé wrote: >> table_offsets = g_array_new(false, true /* clear */, >> sizeof(uint32_t)); >> @@ -831,7 +832,9 @@ void virt_acpi_build(VirtMachineState *vms, >> AcpiBuildTables *tables) >> acpi_add_table(table_offsets, tables_blob); >> build_spcr(tables_blob, tables->linker, vms); >> - if (vms->ras) { >> + acpi_ged_state = ACPI_GED(object_resolve_path_type("", TYPE_ACPI_GED, >> + NULL)); > > Testing vms->ras first is cheaper than calling object_resolve_path_type(). > Since some people are spending lot of time to reduce VM boot time, it might > be worth considering. Thanks Philippe's comments. Do you think it should be written to below[1]? right? [1]: if (vms->ras && acpi_ged_state) > >> + if (acpi_ged_state && vms->ras) { >> acpi_add_table(table_offsets, tables_blob); >> build_ghes_error_table(tables->hardware_errors, tables->linker); >> acpi_build_hest(tables_blob, tables->hardware_errors, >> @@ -925,6 +928,7 @@ void virt_acpi_setup(VirtMachineState *vms) >> {
- Re: [PATCH v22 8/9] target-arm: kvm64: handle... Peter Maydell
- Re: [PATCH v22 8/9] target-arm: kvm64: ha... Peter Maydell
- Re: [PATCH v22 8/9] target-arm: kvm64: ha... gengdongjiu
- [PATCH v22 2/9] docs: APEI GHES generation and CPE... Dongjiu Geng
- Re: [PATCH v22 2/9] docs: APEI GHES generatio... Igor Mammedov
- [PATCH v22 4/9] ACPI: Build Hardware Error Source ... Dongjiu Geng
- [PATCH v22 5/9] ACPI: Record the Generic Error Sta... Dongjiu Geng
- Re: [PATCH v22 5/9] ACPI: Record the Generic ... Peter Maydell
- Re: [PATCH v22 5/9] ACPI: Record the Gene... gengdongjiu
- Re: [PATCH v22 5/9] ACPI: Record the Generic ... Philippe Mathieu-Daudé
- Re: [PATCH v22 5/9] ACPI: Record the Gene... gengdongjiu
- Re: [PATCH v22 5/9] ACPI: Record the ... Philippe Mathieu-Daudé
- [PATCH v22 9/9] MAINTAINERS: Add ACPI/HEST/GHES en... Dongjiu Geng
- Re: [PATCH v22 9/9] MAINTAINERS: Add ACPI/HES... Peter Maydell
- Re: [PATCH v22 9/9] MAINTAINERS: Add ACPI... Philippe Mathieu-Daudé
- Re: [PATCH v22 9/9] MAINTAINERS: Add ... gengdongjiu
- Re: [PATCH v22 9/9] MAINTAINERS: Add ... Peter Maydell
- Re: [PATCH v22 9/9] MAINTAINERS: ... Philippe Mathieu-Daudé
- Re: [PATCH v22 9/9] MAINTAIN... gengdongjiu
- Re: [PATCH v22 9/9] MAINTAINERS: ... Michael S. Tsirkin
- [PATCH v22 7/9] ACPI: Record Generic Error Status ... Dongjiu Geng