diff mbox series

[NOTFORMERGE,2/2] gitlab: Add Loongarch64 KVM-only build

Message ID 20240102172239.69452-3-philmd@linaro.org
State New
Headers show
Series gitlab: Add config for Loongarch64 custom runner | expand

Commit Message

Philippe Mathieu-Daudé Jan. 2, 2024, 5:22 p.m. UTC
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
Used to test https://lore.kernel.org/qemu-devel/20231228084051.3235354-1-zhaotianrui@loongson.cn/
---
 .../openeuler-22.03-loongarch64.yml           | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)

Comments

Thomas Huth Jan. 11, 2024, 7:10 a.m. UTC | #1
On 02/01/2024 18.22, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> Used to test https://lore.kernel.org/qemu-devel/20231228084051.3235354-1-zhaotianrui@loongson.cn/

So why is it NOTFORMERGE ? Don't we want to test KVM-only builds for 
loongarch in the long run?

  Thomas


> ---
>   .../openeuler-22.03-loongarch64.yml           | 22 +++++++++++++++++++
>   1 file changed, 22 insertions(+)
> 
> diff --git a/.gitlab-ci.d/custom-runners/openeuler-22.03-loongarch64.yml b/.gitlab-ci.d/custom-runners/openeuler-22.03-loongarch64.yml
> index 86d18f820e..60674b8d0f 100644
> --- a/.gitlab-ci.d/custom-runners/openeuler-22.03-loongarch64.yml
> +++ b/.gitlab-ci.d/custom-runners/openeuler-22.03-loongarch64.yml
> @@ -19,3 +19,25 @@ openeuler-22.03-loongarch64-all:
>      || { cat config.log meson-logs/meson-log.txt; exit 1; }
>    - make --output-sync -j`nproc --ignore=40`
>    - make --output-sync -j`nproc --ignore=40` check
> +
> +openeuler-22.03-loongarch64-kvm:
> + extends: .custom_runner_template
> + needs: []
> + stage: build
> + tags:
> + - oe2203
> + - loongarch64
> + rules:
> + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
> +   when: manual
> +   allow_failure: true
> + - if: "$LOONGARCH64_RUNNER_AVAILABLE"
> +   when: manual
> +   allow_failure: true
> + script:
> + - mkdir build
> + - cd build
> + - ../configure --enable-kvm --disable-tcg
> +   || { cat config.log meson-logs/meson-log.txt; exit 1; }
> + - make --output-sync -j`nproc --ignore=40`
> + - make --output-sync -j`nproc --ignore=40` check
Song Gao Jan. 11, 2024, 7:37 a.m. UTC | #2
Hi,

在 2024/1/11 下午3:10, Thomas Huth 写道:
> On 02/01/2024 18.22, Philippe Mathieu-Daudé wrote:
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>> Used to test 
>> https://lore.kernel.org/qemu-devel/20231228084051.3235354-1-zhaotianrui@loongson.cn/
>
> So why is it NOTFORMERGE ? Don't we want to test KVM-only builds for 
> loongarch in the long run?
>
>  Thomas
>
I think we can drop this title.

I tested this job by the latest loongarch kvm patches.  buf I find a 
test-hmp check error.

See:
https://gitlab.com/gaosong/qemu/-/jobs/5906385234

If you want to log in to this machine, we can create an account for you.

Thanks.
Song Gao
>
>> ---
>>   .../openeuler-22.03-loongarch64.yml           | 22 +++++++++++++++++++
>>   1 file changed, 22 insertions(+)
>>
>> diff --git 
>> a/.gitlab-ci.d/custom-runners/openeuler-22.03-loongarch64.yml 
>> b/.gitlab-ci.d/custom-runners/openeuler-22.03-loongarch64.yml
>> index 86d18f820e..60674b8d0f 100644
>> --- a/.gitlab-ci.d/custom-runners/openeuler-22.03-loongarch64.yml
>> +++ b/.gitlab-ci.d/custom-runners/openeuler-22.03-loongarch64.yml
>> @@ -19,3 +19,25 @@ openeuler-22.03-loongarch64-all:
>>      || { cat config.log meson-logs/meson-log.txt; exit 1; }
>>    - make --output-sync -j`nproc --ignore=40`
>>    - make --output-sync -j`nproc --ignore=40` check
>> +
>> +openeuler-22.03-loongarch64-kvm:
>> + extends: .custom_runner_template
>> + needs: []
>> + stage: build
>> + tags:
>> + - oe2203
>> + - loongarch64
>> + rules:
>> + - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH 
>> =~ /^staging/'
>> +   when: manual
>> +   allow_failure: true
>> + - if: "$LOONGARCH64_RUNNER_AVAILABLE"
>> +   when: manual
>> +   allow_failure: true
>> + script:
>> + - mkdir build
>> + - cd build
>> + - ../configure --enable-kvm --disable-tcg
>> +   || { cat config.log meson-logs/meson-log.txt; exit 1; }
>> + - make --output-sync -j`nproc --ignore=40`
>> + - make --output-sync -j`nproc --ignore=40` check
Thomas Huth Jan. 11, 2024, 8:20 a.m. UTC | #3
On 11/01/2024 08.37, gaosong wrote:
> Hi,
> 
> 在 2024/1/11 下午3:10, Thomas Huth 写道:
>> On 02/01/2024 18.22, Philippe Mathieu-Daudé wrote:
>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>> ---
>>> Used to test 
>>> https://lore.kernel.org/qemu-devel/20231228084051.3235354-1-zhaotianrui@loongson.cn/
>>
>> So why is it NOTFORMERGE ? Don't we want to test KVM-only builds for 
>> loongarch in the long run?
>>
>>  Thomas
>>
> I think we can drop this title.
> 
> I tested this job by the latest loongarch kvm patches.  buf I find a 
> test-hmp check error.
Can you recreate the error manually? i.e. compile with configure 
--disable-tcg and then run:

  V=2 QTEST_QEMU_BINARY=./qemu-system-loongarch64 tests/qtest/test-hmp

That should likely provide you with a hint where it is crashing

  Thomas
Song Gao Jan. 11, 2024, 8:50 a.m. UTC | #4
在 2024/1/11 下午4:20, Thomas Huth 写道:
> On 11/01/2024 08.37, gaosong wrote:
>> Hi,
>>
>> 在 2024/1/11 下午3:10, Thomas Huth 写道:
>>> On 02/01/2024 18.22, Philippe Mathieu-Daudé wrote:
>>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>>> ---
>>>> Used to test 
>>>> https://lore.kernel.org/qemu-devel/20231228084051.3235354-1-zhaotianrui@loongson.cn/
>>>
>>> So why is it NOTFORMERGE ? Don't we want to test KVM-only builds for 
>>> loongarch in the long run?
>>>
>>>  Thomas
>>>
>> I think we can drop this title.
>>
>> I tested this job by the latest loongarch kvm patches.  buf I find a 
>> test-hmp check error.
> Can you recreate the error manually? i.e. compile with configure 
> --disable-tcg and then run:
>
>  V=2 QTEST_QEMU_BINARY=./qemu-system-loongarch64 tests/qtest/test-hmp
>
> That should likely provide you with a hint where it is crashing
>
>  Thomas
Thank you,

LoongArch no support these cmds  or some problems .
-    "gva2gpa 0",
-    "memsave 0 4096 \"/dev/null\"",
-    "x /8i 0x100",
-    "xp /16x 0",

Could we disable these 4 cmds or the test_temp check?
After we fix the cmds problems, we can enable them.

Thanks.
Song gao
Thomas Huth Jan. 11, 2024, 9:04 a.m. UTC | #5
On 11/01/2024 09.50, gaosong wrote:
> 在 2024/1/11 下午4:20, Thomas Huth 写道:
>> On 11/01/2024 08.37, gaosong wrote:
>>> Hi,
>>>
>>> 在 2024/1/11 下午3:10, Thomas Huth 写道:
>>>> On 02/01/2024 18.22, Philippe Mathieu-Daudé wrote:
>>>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>>>> ---
>>>>> Used to test 
>>>>> https://lore.kernel.org/qemu-devel/20231228084051.3235354-1-zhaotianrui@loongson.cn/
>>>>
>>>> So why is it NOTFORMERGE ? Don't we want to test KVM-only builds for 
>>>> loongarch in the long run?
>>>>
>>>>  Thomas
>>>>
>>> I think we can drop this title.
>>>
>>> I tested this job by the latest loongarch kvm patches.  buf I find a 
>>> test-hmp check error.
>> Can you recreate the error manually? i.e. compile with configure 
>> --disable-tcg and then run:
>>
>>  V=2 QTEST_QEMU_BINARY=./qemu-system-loongarch64 tests/qtest/test-hmp
>>
>> That should likely provide you with a hint where it is crashing
>>
>>  Thomas
> Thank you,
> 
> LoongArch no support these cmds  or some problems .
> -    "gva2gpa 0",
> -    "memsave 0 4096 \"/dev/null\"",
> -    "x /8i 0x100",
> -    "xp /16x 0",
> 
> Could we disable these 4 cmds or the test_temp check?
> After we fix the cmds problems, we can enable them.

Even if loongarch does not support one of these commands, it should not 
crash QEMU. So please fix the crashes first before considering to enable the 
KVM-only test in the CI.

  Thanks
   Thomas
Philippe Mathieu-Daudé Jan. 11, 2024, 9:26 a.m. UTC | #6
On 11/1/24 08:10, Thomas Huth wrote:
> On 02/01/2024 18.22, Philippe Mathieu-Daudé wrote:
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>> Used to test 
>> https://lore.kernel.org/qemu-devel/20231228084051.3235354-1-zhaotianrui@loongson.cn/
> 
> So why is it NOTFORMERGE ? Don't we want to test KVM-only builds for 
> loongarch in the long run?

We do. I was just waiting the loongarch64/KVM support was first.
Song Gao Jan. 11, 2024, 9:51 a.m. UTC | #7
在 2024/1/11 下午5:04, Thomas Huth 写道:
> On 11/01/2024 09.50, gaosong wrote:
>> 在 2024/1/11 下午4:20, Thomas Huth 写道:
>>> On 11/01/2024 08.37, gaosong wrote:
>>>> Hi,
>>>>
>>>> 在 2024/1/11 下午3:10, Thomas Huth 写道:
>>>>> On 02/01/2024 18.22, Philippe Mathieu-Daudé wrote:
>>>>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>>>>> ---
>>>>>> Used to test 
>>>>>> https://lore.kernel.org/qemu-devel/20231228084051.3235354-1-zhaotianrui@loongson.cn/
>>>>>
>>>>> So why is it NOTFORMERGE ? Don't we want to test KVM-only builds 
>>>>> for loongarch in the long run?
>>>>>
>>>>>  Thomas
>>>>>
>>>> I think we can drop this title.
>>>>
>>>> I tested this job by the latest loongarch kvm patches.  buf I find 
>>>> a test-hmp check error.
>>> Can you recreate the error manually? i.e. compile with configure 
>>> --disable-tcg and then run:
>>>
>>>  V=2 QTEST_QEMU_BINARY=./qemu-system-loongarch64 tests/qtest/test-hmp
>>>
>>> That should likely provide you with a hint where it is crashing
>>>
>>>  Thomas
>> Thank you,
>>
>> LoongArch no support these cmds  or some problems .
>> -    "gva2gpa 0",
>> -    "memsave 0 4096 \"/dev/null\"",
>> -    "x /8i 0x100",
>> -    "xp /16x 0",
>>
>> Could we disable these 4 cmds or the test_temp check?
>> After we fix the cmds problems, we can enable them.
>
> Even if loongarch does not support one of these commands, it should 
> not crash QEMU. So please fix the crashes first before considering to 
> enable the KVM-only test in the CI.
>

Sure,  we will fix the cmds problems first.

Thanks.
Song Gao
Philippe Mathieu-Daudé Jan. 11, 2024, 11:26 a.m. UTC | #8
On 11/1/24 10:51, gaosong wrote:
> 在 2024/1/11 下午5:04, Thomas Huth 写道:
>> On 11/01/2024 09.50, gaosong wrote:
>>> 在 2024/1/11 下午4:20, Thomas Huth 写道:
>>>> On 11/01/2024 08.37, gaosong wrote:

>>> LoongArch no support these cmds  or some problems .
>>> -    "gva2gpa 0",
>>> -    "memsave 0 4096 \"/dev/null\"",
>>> -    "x /8i 0x100",
>>> -    "xp /16x 0",
>>>
>>> Could we disable these 4 cmds or the test_temp check?
>>> After we fix the cmds problems, we can enable them.
>>
>> Even if loongarch does not support one of these commands, it should 
>> not crash QEMU. So please fix the crashes first before considering to 
>> enable the KVM-only test in the CI.
>>
> 
> Sure,  we will fix the cmds problems first.

The issue might be missing get_phys_page_attrs_debug() implementation.
Song Gao Jan. 11, 2024, 11:41 a.m. UTC | #9
在 2024/1/11 下午7:26, Philippe Mathieu-Daudé 写道:
> On 11/1/24 10:51, gaosong wrote:
>> 在 2024/1/11 下午5:04, Thomas Huth 写道:
>>> On 11/01/2024 09.50, gaosong wrote:
>>>> 在 2024/1/11 下午4:20, Thomas Huth 写道:
>>>>> On 11/01/2024 08.37, gaosong wrote:
>
>>>> LoongArch no support these cmds  or some problems .
>>>> -    "gva2gpa 0",
>>>> -    "memsave 0 4096 \"/dev/null\"",
>>>> -    "x /8i 0x100",
>>>> -    "xp /16x 0",
>>>>
>>>> Could we disable these 4 cmds or the test_temp check?
>>>> After we fix the cmds problems, we can enable them.
>>>
>>> Even if loongarch does not support one of these commands, it should 
>>> not crash QEMU. So please fix the crashes first before considering 
>>> to enable the KVM-only test in the CI.
>>>
>>
>> Sure,  we will fix the cmds problems first.
>
> The issue might be missing get_phys_page_attrs_debug() implementation.

yes, I see,  from  hmp_gva2gpa().  I think we need implement it.

Thanks.
Song Gao
Song Gao Jan. 24, 2024, 8:56 a.m. UTC | #10
Hi,

在 2024/1/11 下午7:26, Philippe Mathieu-Daudé 写道:
> On 11/1/24 10:51, gaosong wrote:
>> 在 2024/1/11 下午5:04, Thomas Huth 写道:
>>> On 11/01/2024 09.50, gaosong wrote:
>>>> 在 2024/1/11 下午4:20, Thomas Huth 写道:
>>>>> On 11/01/2024 08.37, gaosong wrote:
>
>>>> LoongArch no support these cmds  or some problems .
>>>> -    "gva2gpa 0",
>>>> -    "memsave 0 4096 \"/dev/null\"",
>>>> -    "x /8i 0x100",
>>>> -    "xp /16x 0",
>>>>
>>>> Could we disable these 4 cmds or the test_temp check?
>>>> After we fix the cmds problems, we can enable them.
>>>
>>> Even if loongarch does not support one of these commands, it should 
>>> not crash QEMU. So please fix the crashes first before considering 
>>> to enable the KVM-only test in the CI.
>>>
>>
>> Sure,  we will fix the cmds problems first.
>
> The issue might be missing get_phys_page_attrs_debug() implementation.

We use  '--enable-kvm --disable-tcg ',
the get_phys_page_debug()  is NULL,  so the test-hmp failed.

target/loongarch/cpu.c
...
#ifndef CONFIG_USER_ONLY
#include "hw/core/sysemu-cpu-ops.h"

static const struct SysemuCPUOps loongarch_sysemu_ops = {
#ifdef CONFIG_TCG
     .get_phys_page_debug = loongarch_cpu_get_phys_page_debug,
#endif
};
...

I see the other architectures  only implement 
get_phys_page_attrs_debug() or  get_phys_page_debug()
and not only build these functions on tcg mode.

Should we need implement  get_phys_page_attrs_debug() ?  or just use 
get_phys_page_debug()

Thanks.
Song Gao
diff mbox series

Patch

diff --git a/.gitlab-ci.d/custom-runners/openeuler-22.03-loongarch64.yml b/.gitlab-ci.d/custom-runners/openeuler-22.03-loongarch64.yml
index 86d18f820e..60674b8d0f 100644
--- a/.gitlab-ci.d/custom-runners/openeuler-22.03-loongarch64.yml
+++ b/.gitlab-ci.d/custom-runners/openeuler-22.03-loongarch64.yml
@@ -19,3 +19,25 @@  openeuler-22.03-loongarch64-all:
    || { cat config.log meson-logs/meson-log.txt; exit 1; }
  - make --output-sync -j`nproc --ignore=40`
  - make --output-sync -j`nproc --ignore=40` check
+
+openeuler-22.03-loongarch64-kvm:
+ extends: .custom_runner_template
+ needs: []
+ stage: build
+ tags:
+ - oe2203
+ - loongarch64
+ rules:
+ - if: '$CI_PROJECT_NAMESPACE == "qemu-project" && $CI_COMMIT_BRANCH =~ /^staging/'
+   when: manual
+   allow_failure: true
+ - if: "$LOONGARCH64_RUNNER_AVAILABLE"
+   when: manual
+   allow_failure: true
+ script:
+ - mkdir build
+ - cd build
+ - ../configure --enable-kvm --disable-tcg
+   || { cat config.log meson-logs/meson-log.txt; exit 1; }
+ - make --output-sync -j`nproc --ignore=40`
+ - make --output-sync -j`nproc --ignore=40` check