diff mbox series

hw/arm: Restrict APEI tables generation to the 'virt' machine

Message ID 20200929125609.1088330-1-philmd@redhat.com (mailing list archive)
State New, archived
Headers show
Series hw/arm: Restrict APEI tables generation to the 'virt' machine | expand

Commit Message

Philippe Mathieu-Daudé Sept. 29, 2020, 12:56 p.m. UTC
As only the Virt machine uses the RAS Virtualization feature (see
commit 2afa8c8519: "hw/arm/virt: Introduce a RAS machine option"),
restrict the APEI tables generation code to the virt machine.

Fixes: aa16508f1d ("ACPI: Build related register address fields via hardware error fw_cfg blob")
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Xiang Zheng <zhengxiang9@huawei.com>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Dongjiu Geng <gengdongjiu@huawei.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
---
 default-configs/arm-softmmu.mak | 1 -
 hw/arm/Kconfig                  | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

Comments

no-reply@patchew.org Sept. 29, 2020, 7:37 p.m. UTC | #1
Patchew URL: https://patchew.org/QEMU/20200929125609.1088330-1-philmd@redhat.com/



Hi,

This series failed the docker-quick@centos7 build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
make docker-image-centos7 V=1 NETWORK=1
time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1
=== TEST SCRIPT END ===

C linker for the host machine: cc ld.bfd 2.27-43
Host machine cpu family: x86_64
Host machine cpu: x86_64
../src/meson.build:10: WARNING: Module unstable-keyval has no backwards or forwards compatibility and might not exist in future releases.
Program sh found: YES
Program python3 found: YES (/usr/bin/python3)
Configuring ninjatool using configuration
---
Running test qtest-aarch64: tpm-tis-device-test
Could not allocate dynamic translator buffer
**
ERROR:../src/tests/qtest/tpm-emu.c:97:tpm_emu_ctrl_thread: assertion failed (cmd == CMD_SET_DATAFD): (0 == 16)
../src/tests/qtest/libqtest.c:166: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0)
ERROR qtest-aarch64: tpm-tis-device-test - Bail out! ERROR:../src/tests/qtest/tpm-emu.c:97:tpm_emu_ctrl_thread: assertion failed (cmd == CMD_SET_DATAFD): (0 == 16)
make: *** [run-test-160] Error 1
make: *** Waiting for unfinished jobs....
socket_accept failed: Resource temporarily unavailable
**
ERROR:../src/tests/qtest/libqtest.c:301:qtest_init_without_qmp_handshake: assertion failed: (s->fd >= 0 && s->qmp_fd >= 0)
../src/tests/qtest/libqtest.c:166: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0)
ERROR qtest-x86_64: pxe-test - Bail out! ERROR:../src/tests/qtest/libqtest.c:301:qtest_init_without_qmp_handshake: assertion failed: (s->fd >= 0 && s->qmp_fd >= 0)
make: *** [run-test-110] Error 1
socket_accept failed: Resource temporarily unavailable
**
ERROR:../src/tests/qtest/libqtest.c:301:qtest_init_without_qmp_handshake: assertion failed: (s->fd >= 0 && s->qmp_fd >= 0)
ERROR qtest-x86_64: boot-serial-test - Bail out! ERROR:../src/tests/qtest/libqtest.c:301:qtest_init_without_qmp_handshake: assertion failed: (s->fd >= 0 && s->qmp_fd >= 0)
../src/tests/qtest/libqtest.c:166: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0)
make: *** [run-test-115] Error 1
socket_accept failed: Resource temporarily unavailable
**
ERROR:../src/tests/qtest/libqtest.c:301:qtest_init_without_qmp_handshake: assertion failed: (s->fd >= 0 && s->qmp_fd >= 0)
../src/tests/qtest/libqtest.c:166: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0)
ERROR qtest-x86_64: bios-tables-test - Bail out! ERROR:../src/tests/qtest/libqtest.c:301:qtest_init_without_qmp_handshake: assertion failed: (s->fd >= 0 && s->qmp_fd >= 0)
make: *** [run-test-138] Error 1
socket_accept failed: Resource temporarily unavailable
**
ERROR:../src/tests/qtest/libqtest.c:301:qtest_init_without_qmp_handshake: assertion failed: (s->fd >= 0 && s->qmp_fd >= 0)
ERROR qtest-x86_64: vmgenid-test - Bail out! ERROR:../src/tests/qtest/libqtest.c:301:qtest_init_without_qmp_handshake: assertion failed: (s->fd >= 0 && s->qmp_fd >= 0)
../src/tests/qtest/libqtest.c:166: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0)
make: *** [run-test-147] Error 1
socket_accept failed: Resource temporarily unavailable
**
ERROR:../src/tests/qtest/libqtest.c:301:qtest_init_without_qmp_handshake: assertion failed: (s->fd >= 0 && s->qmp_fd >= 0)
../src/tests/qtest/libqtest.c:166: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0)
ERROR qtest-x86_64: migration-test - Bail out! ERROR:../src/tests/qtest/libqtest.c:301:qtest_init_without_qmp_handshake: assertion failed: (s->fd >= 0 && s->qmp_fd >= 0)
make: *** [run-test-148] Error 1
socket_accept failed: Resource temporarily unavailable
ERROR qtest-aarch64: bios-tables-test - Bail out! ERROR:../src/tests/qtest/libqtest.c:301:qtest_init_without_qmp_handshake: assertion failed: (s->fd >= 0 && s->qmp_fd >= 0)
**
ERROR:../src/tests/qtest/libqtest.c:301:qtest_init_without_qmp_handshake: assertion failed: (s->fd >= 0 && s->qmp_fd >= 0)
../src/tests/qtest/libqtest.c:166: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0)
make: *** [run-test-159] Error 1
Traceback (most recent call last):
  File "./tests/docker/docker.py", line 709, in <module>
    sys.exit(main())
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--rm', '--label', 'com.qemu.instance.uuid=99c49ae59b0c4794b6219b9f20425c74', '-u', '1003', '--security-opt', 'seccomp=unconfined', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=1', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-drpf2emb/src/docker-src.2020-09-29-15.28.45.25816:/var/tmp/qemu:z,ro', 'qemu/centos7', '/var/tmp/qemu/run', 'test-quick']' returned non-zero exit status 2.
filter=--filter=label=com.qemu.instance.uuid=99c49ae59b0c4794b6219b9f20425c74
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-drpf2emb/src'
make: *** [docker-run-test-quick@centos7] Error 2

real    9m3.243s
user    0m13.836s


The full log is available at
http://patchew.org/logs/20200929125609.1088330-1-philmd@redhat.com/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Dongjiu Geng Sept. 30, 2020, 5:08 a.m. UTC | #2
On 2020/9/29 20:56, Philippe Mathieu-Daudé wrote:
> As only the Virt machine uses the RAS Virtualization feature (see
> commit 2afa8c8519: "hw/arm/virt: Introduce a RAS machine option"),
> restrict the APEI tables generation code to the virt machine.

APEI is a generic feature for X86 and arm64.  X86 platform also can use it, although currently it was mainly
used by ARM64. what is reason that we restrict APEI tables generation to the 'virt' machine?

> 
> Fixes: aa16508f1d ("ACPI: Build related register address fields via hardware error fw_cfg blob")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Xiang Zheng <zhengxiang9@huawei.com>
> Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Igor Mammedov <imammedo@redhat.com>
> Cc: Dongjiu Geng <gengdongjiu@huawei.com>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> ---
>  default-configs/arm-softmmu.mak | 1 -
>  hw/arm/Kconfig                  | 1 +
>  2 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
> index 9a94ebd0be..08a32123b4 100644
> --- a/default-configs/arm-softmmu.mak
> +++ b/default-configs/arm-softmmu.mak
> @@ -43,4 +43,3 @@ CONFIG_FSL_IMX7=y
>  CONFIG_FSL_IMX6UL=y
>  CONFIG_SEMIHOSTING=y
>  CONFIG_ALLWINNER_H3=y
> -CONFIG_ACPI_APEI=y
> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
> index f303c6bead..7d040827af 100644
> --- a/hw/arm/Kconfig
> +++ b/hw/arm/Kconfig
> @@ -26,6 +26,7 @@ config ARM_VIRT
>      select ACPI_MEMORY_HOTPLUG
>      select ACPI_HW_REDUCED
>      select ACPI_NVDIMM
> +    select ACPI_APEI
>  
>  config CHEETAH
>      bool
>
Philippe Mathieu-Daudé Sept. 30, 2020, 10:35 a.m. UTC | #3
On 9/30/20 7:08 AM, Dongjiu Geng wrote:
> On 2020/9/29 20:56, Philippe Mathieu-Daudé wrote:
>> As only the Virt machine uses the RAS Virtualization feature (see
>> commit 2afa8c8519: "hw/arm/virt: Introduce a RAS machine option"),
>> restrict the APEI tables generation code to the virt machine.
> 
> APEI is a generic feature for X86 and arm64.  X86 platform also can use it, although currently it was mainly
> used by ARM64. what is reason that we restrict APEI tables generation to the 'virt' machine?

It is currently only selected on (all) the ARM machines, not the X86
ones. I am simply restricting it to the 'virt' machine which is the
single one enabling the RAS. Without RAS the table is not built, so
for the case of the SBSA-Ref machine this code is unreachable, no need
to select ACPI_APEI.

When a X86 machine configure a RAS it will have to 'select ACPI_APEI'
to get it built (I'm not forbidding it, I'm restricting it to where
it is used).

> 
>>
>> Fixes: aa16508f1d ("ACPI: Build related register address fields via hardware error fw_cfg blob")
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>> Cc: Laszlo Ersek <lersek@redhat.com>
>> Cc: Xiang Zheng <zhengxiang9@huawei.com>
>> Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>> Cc: Igor Mammedov <imammedo@redhat.com>
>> Cc: Dongjiu Geng <gengdongjiu@huawei.com>
>> Cc: Michael S. Tsirkin <mst@redhat.com>
>> ---
>>  default-configs/arm-softmmu.mak | 1 -
>>  hw/arm/Kconfig                  | 1 +
>>  2 files changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
>> index 9a94ebd0be..08a32123b4 100644
>> --- a/default-configs/arm-softmmu.mak
>> +++ b/default-configs/arm-softmmu.mak
>> @@ -43,4 +43,3 @@ CONFIG_FSL_IMX7=y
>>  CONFIG_FSL_IMX6UL=y
>>  CONFIG_SEMIHOSTING=y
>>  CONFIG_ALLWINNER_H3=y
>> -CONFIG_ACPI_APEI=y
>> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
>> index f303c6bead..7d040827af 100644
>> --- a/hw/arm/Kconfig
>> +++ b/hw/arm/Kconfig
>> @@ -26,6 +26,7 @@ config ARM_VIRT
>>      select ACPI_MEMORY_HOTPLUG
>>      select ACPI_HW_REDUCED
>>      select ACPI_NVDIMM
>> +    select ACPI_APEI
>>  
>>  config CHEETAH
>>      bool
>>
>
Michael S. Tsirkin Sept. 30, 2020, 10:47 a.m. UTC | #4
On Tue, Sep 29, 2020 at 02:56:09PM +0200, Philippe Mathieu-Daudé wrote:
> As only the Virt machine uses the RAS Virtualization feature (see
> commit 2afa8c8519: "hw/arm/virt: Introduce a RAS machine option"),
> restrict the APEI tables generation code to the virt machine.
> 
> Fixes: aa16508f1d ("ACPI: Build related register address fields via hardware error fw_cfg blob")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Acked-by: Michael S. Tsirkin <mst@redhat.com>


> ---
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Xiang Zheng <zhengxiang9@huawei.com>
> Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Igor Mammedov <imammedo@redhat.com>
> Cc: Dongjiu Geng <gengdongjiu@huawei.com>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> ---
>  default-configs/arm-softmmu.mak | 1 -
>  hw/arm/Kconfig                  | 1 +
>  2 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
> index 9a94ebd0be..08a32123b4 100644
> --- a/default-configs/arm-softmmu.mak
> +++ b/default-configs/arm-softmmu.mak
> @@ -43,4 +43,3 @@ CONFIG_FSL_IMX7=y
>  CONFIG_FSL_IMX6UL=y
>  CONFIG_SEMIHOSTING=y
>  CONFIG_ALLWINNER_H3=y
> -CONFIG_ACPI_APEI=y
> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
> index f303c6bead..7d040827af 100644
> --- a/hw/arm/Kconfig
> +++ b/hw/arm/Kconfig
> @@ -26,6 +26,7 @@ config ARM_VIRT
>      select ACPI_MEMORY_HOTPLUG
>      select ACPI_HW_REDUCED
>      select ACPI_NVDIMM
> +    select ACPI_APEI
>  
>  config CHEETAH
>      bool
> -- 
> 2.26.2
Dongjiu Geng Sept. 30, 2020, 11:05 a.m. UTC | #5
On 2020/9/30 18:35, Philippe Mathieu-Daudé wrote:
> On 9/30/20 7:08 AM, Dongjiu Geng wrote:
>> On 2020/9/29 20:56, Philippe Mathieu-Daudé wrote:
>>> As only the Virt machine uses the RAS Virtualization feature (see
>>> commit 2afa8c8519: "hw/arm/virt: Introduce a RAS machine option"),
>>> restrict the APEI tables generation code to the virt machine.
>>
>> APEI is a generic feature for X86 and arm64.  X86 platform also can use it, although currently it was mainly
>> used by ARM64. what is reason that we restrict APEI tables generation to the 'virt' machine?
> 
> It is currently only selected on (all) the ARM machines, not the X86
> ones. I am simply restricting it to the 'virt' machine which is the
> single one enabling the RAS. Without RAS the table is not built, so
> for the case of the SBSA-Ref machine this code is unreachable, no need
> to select ACPI_APEI.
> 
> When a X86 machine configure a RAS it will have to 'select ACPI_APEI'
> to get it built (I'm not forbidding it, I'm restricting it to where
> it is used).

Got it, thanks for the explanation.

Reviewed-by: Dongjiu Geng <gengdongjiu@huawei.com>

BTW:There is a build test error, but it is seems do not related with this patch.
https://patchew.org/logs/20200929125609.1088330-1-philmd@redhat.com/testing.docker-quick@centos7/?type=message

> 
>>
>>>
>>> Fixes: aa16508f1d ("ACPI: Build related register address fields via hardware error fw_cfg blob")
>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>> ---
>>> Cc: Laszlo Ersek <lersek@redhat.com>
>>> Cc: Xiang Zheng <zhengxiang9@huawei.com>
>>> Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>>> Cc: Igor Mammedov <imammedo@redhat.com>
>>> Cc: Dongjiu Geng <gengdongjiu@huawei.com>
>>> Cc: Michael S. Tsirkin <mst@redhat.com>
>>> ---
>>>  default-configs/arm-softmmu.mak | 1 -
>>>  hw/arm/Kconfig                  | 1 +
>>>  2 files changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
>>> index 9a94ebd0be..08a32123b4 100644
>>> --- a/default-configs/arm-softmmu.mak
>>> +++ b/default-configs/arm-softmmu.mak
>>> @@ -43,4 +43,3 @@ CONFIG_FSL_IMX7=y
>>>  CONFIG_FSL_IMX6UL=y
>>>  CONFIG_SEMIHOSTING=y
>>>  CONFIG_ALLWINNER_H3=y
>>> -CONFIG_ACPI_APEI=y
>>> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
>>> index f303c6bead..7d040827af 100644
>>> --- a/hw/arm/Kconfig
>>> +++ b/hw/arm/Kconfig
>>> @@ -26,6 +26,7 @@ config ARM_VIRT
>>>      select ACPI_MEMORY_HOTPLUG
>>>      select ACPI_HW_REDUCED
>>>      select ACPI_NVDIMM
>>> +    select ACPI_APEI
>>>  
>>>  config CHEETAH
>>>      bool
>>>
>>
> 
> .
>
Philippe Mathieu-Daudé Sept. 30, 2020, 11:34 a.m. UTC | #6
On 9/30/20 1:05 PM, Dongjiu Geng wrote:
> 
> On 2020/9/30 18:35, Philippe Mathieu-Daudé wrote:
>> On 9/30/20 7:08 AM, Dongjiu Geng wrote:
>>> On 2020/9/29 20:56, Philippe Mathieu-Daudé wrote:
>>>> As only the Virt machine uses the RAS Virtualization feature (see
>>>> commit 2afa8c8519: "hw/arm/virt: Introduce a RAS machine option"),
>>>> restrict the APEI tables generation code to the virt machine.
>>>
>>> APEI is a generic feature for X86 and arm64.  X86 platform also can use it, although currently it was mainly
>>> used by ARM64. what is reason that we restrict APEI tables generation to the 'virt' machine?
>>
>> It is currently only selected on (all) the ARM machines, not the X86
>> ones. I am simply restricting it to the 'virt' machine which is the
>> single one enabling the RAS. Without RAS the table is not built, so
>> for the case of the SBSA-Ref machine this code is unreachable, no need
>> to select ACPI_APEI.
>>
>> When a X86 machine configure a RAS it will have to 'select ACPI_APEI'
>> to get it built (I'm not forbidding it, I'm restricting it to where
>> it is used).
> 
> Got it, thanks for the explanation.
> 
> Reviewed-by: Dongjiu Geng <gengdongjiu@huawei.com>

Thanks, I'll reword the description, ...

> 
> BTW:There is a build test error, but it is seems do not related with this patch.
> https://patchew.org/logs/20200929125609.1088330-1-philmd@redhat.com/testing.docker-quick@centos7/?type=message

... and look at that error before posting.

> 
>>
>>>
>>>>
>>>> Fixes: aa16508f1d ("ACPI: Build related register address fields via hardware error fw_cfg blob")
>>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>>> ---
>>>> Cc: Laszlo Ersek <lersek@redhat.com>
>>>> Cc: Xiang Zheng <zhengxiang9@huawei.com>
>>>> Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>>>> Cc: Igor Mammedov <imammedo@redhat.com>
>>>> Cc: Dongjiu Geng <gengdongjiu@huawei.com>
>>>> Cc: Michael S. Tsirkin <mst@redhat.com>
>>>> ---
>>>>  default-configs/arm-softmmu.mak | 1 -
>>>>  hw/arm/Kconfig                  | 1 +
>>>>  2 files changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
>>>> index 9a94ebd0be..08a32123b4 100644
>>>> --- a/default-configs/arm-softmmu.mak
>>>> +++ b/default-configs/arm-softmmu.mak
>>>> @@ -43,4 +43,3 @@ CONFIG_FSL_IMX7=y
>>>>  CONFIG_FSL_IMX6UL=y
>>>>  CONFIG_SEMIHOSTING=y
>>>>  CONFIG_ALLWINNER_H3=y
>>>> -CONFIG_ACPI_APEI=y
>>>> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
>>>> index f303c6bead..7d040827af 100644
>>>> --- a/hw/arm/Kconfig
>>>> +++ b/hw/arm/Kconfig
>>>> @@ -26,6 +26,7 @@ config ARM_VIRT
>>>>      select ACPI_MEMORY_HOTPLUG
>>>>      select ACPI_HW_REDUCED
>>>>      select ACPI_NVDIMM
>>>> +    select ACPI_APEI
>>>>  
>>>>  config CHEETAH
>>>>      bool
>>>>
>>>
>>
>> .
>>
>
diff mbox series

Patch

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 9a94ebd0be..08a32123b4 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -43,4 +43,3 @@  CONFIG_FSL_IMX7=y
 CONFIG_FSL_IMX6UL=y
 CONFIG_SEMIHOSTING=y
 CONFIG_ALLWINNER_H3=y
-CONFIG_ACPI_APEI=y
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index f303c6bead..7d040827af 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -26,6 +26,7 @@  config ARM_VIRT
     select ACPI_MEMORY_HOTPLUG
     select ACPI_HW_REDUCED
     select ACPI_NVDIMM
+    select ACPI_APEI
 
 config CHEETAH
     bool