[Top][All Lists]

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

Re: [PATCH v22 5/9] ACPI: Record the Generic Error Status Block address

From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v22 5/9] ACPI: Record the Generic Error Status Block address
Date: Fri, 17 Jan 2020 12:20:48 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

On 1/17/20 11:47 AM, gengdongjiu wrote:
On 2020/1/17 15:39, Philippe Mathieu-Daudé wrote:
         table_offsets = g_array_new(false, true /* clear */,
@@ -831,7 +832,9 @@ void virt_acpi_build(VirtMachineState *vms, AcpiBuildTables 
       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?

if (vms->ras && acpi_ged_state)

No, as:

  if (vms->ras) {
    AcpiGedState *acpi_ged_state;

acpi_ged_state = ACPI_GED(object_resolve_path_type("", TYPE_ACPI_GED, NULL));
    if (acpi_ged_state) {
      acpi_add_table(table_offsets, tables_blob);

Maybe I'm wrong and there is not much impact in VM boot time here, reviews welcomed :)

+    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)

reply via email to

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