diff mbox series

[v2,23/23] config: Add loongarch32-softmmu target

Message ID 20241226-la32-fixes1-v2-23-0414594f8cb5@flygoat.com (mailing list archive)
State New
Headers show
Series target/loongarch: LoongArch32 fixes 1 | expand

Commit Message

Jiaxun Yang Dec. 26, 2024, 9:19 p.m. UTC
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
 MAINTAINERS                                     | 4 ++--
 configs/devices/loongarch32-softmmu/default.mak | 7 +++++++
 configs/targets/loongarch32-softmmu.mak         | 7 +++++++
 3 files changed, 16 insertions(+), 2 deletions(-)

Comments

Philippe Mathieu-Daudé Dec. 26, 2024, 10:58 p.m. UTC | #1
On 26/12/24 22:19, Jiaxun Yang wrote:
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> ---
>   MAINTAINERS                                     | 4 ++--
>   configs/devices/loongarch32-softmmu/default.mak | 7 +++++++
>   configs/targets/loongarch32-softmmu.mak         | 7 +++++++
>   3 files changed, 16 insertions(+), 2 deletions(-)


> diff --git a/configs/targets/loongarch32-softmmu.mak b/configs/targets/loongarch32-softmmu.mak
> new file mode 100644
> index 0000000000000000000000000000000000000000..50e0075a24ac6bf3717db967b03b816b52a25964
> --- /dev/null
> +++ b/configs/targets/loongarch32-softmmu.mak
> @@ -0,0 +1,7 @@
> +TARGET_ARCH=loongarch32
> +TARGET_BASE_ARCH=loongarch
> +TARGET_KVM_HAVE_GUEST_DEBUG=y
> +TARGET_SUPPORTS_MTTCG=y
> +TARGET_XML_FILES= gdb-xml/loongarch-base32.xml gdb-xml/loongarch-fpu.xml gdb-xml/loongarch-lsx.xml gdb-xml/loongarch-lasx.xml
> +# all boards require libfdt
> +TARGET_NEED_FDT=y
> 

I'd really like, if possible, to not add a new target, but make the
current loongarch64-softmmu.mak evolve to support both 32/64 modes.
Richard Henderson Dec. 27, 2024, 5:20 a.m. UTC | #2
On 12/26/24 14:58, Philippe Mathieu-Daudé wrote:
> On 26/12/24 22:19, Jiaxun Yang wrote:
>> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
>> ---
>>   MAINTAINERS                                     | 4 ++--
>>   configs/devices/loongarch32-softmmu/default.mak | 7 +++++++
>>   configs/targets/loongarch32-softmmu.mak         | 7 +++++++
>>   3 files changed, 16 insertions(+), 2 deletions(-)
> 
> 
>> diff --git a/configs/targets/loongarch32-softmmu.mak b/configs/targets/loongarch32- 
>> softmmu.mak
>> new file mode 100644
>> index 0000000000000000000000000000000000000000..50e0075a24ac6bf3717db967b03b816b52a25964
>> --- /dev/null
>> +++ b/configs/targets/loongarch32-softmmu.mak
>> @@ -0,0 +1,7 @@
>> +TARGET_ARCH=loongarch32
>> +TARGET_BASE_ARCH=loongarch
>> +TARGET_KVM_HAVE_GUEST_DEBUG=y
>> +TARGET_SUPPORTS_MTTCG=y
>> +TARGET_XML_FILES= gdb-xml/loongarch-base32.xml gdb-xml/loongarch-fpu.xml gdb-xml/ 
>> loongarch-lsx.xml gdb-xml/loongarch-lasx.xml
>> +# all boards require libfdt
>> +TARGET_NEED_FDT=y
>>
> 
> I'd really like, if possible, to not add a new target, but make the
> current loongarch64-softmmu.mak evolve to support both 32/64 modes.

Yes indeed.  I had assumed the preceding 32-bit target_ulong enablement was for linux-user.


r~
Jiaxun Yang Dec. 27, 2024, 10:48 a.m. UTC | #3
在2024年12月27日十二月 上午5:20,Richard Henderson写道:
[...]
>>> +++ b/configs/targets/loongarch32-softmmu.mak
>>> @@ -0,0 +1,7 @@
>>> +TARGET_ARCH=loongarch32
>>> +TARGET_BASE_ARCH=loongarch
>>> +TARGET_KVM_HAVE_GUEST_DEBUG=y
>>> +TARGET_SUPPORTS_MTTCG=y
>>> +TARGET_XML_FILES= gdb-xml/loongarch-base32.xml gdb-xml/loongarch-fpu.xml gdb-xml/ 
>>> loongarch-lsx.xml gdb-xml/loongarch-lasx.xml
>>> +# all boards require libfdt
>>> +TARGET_NEED_FDT=y
>>>
>> 
>> I'd really like, if possible, to not add a new target, but make the
>> current loongarch64-softmmu.mak evolve to support both 32/64 modes.
>
> Yes indeed.  I had assumed the preceding 32-bit target_ulong enablement 
> was for linux-user.

Ok, I'll drop loongarch32-softmmu.mak for now.

It's indeed mostly for linux-user. I enabled softmmu just for validating the code.

Thanks
>
>
> r~
diff mbox series

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index 8839f22e3ed306a598da1e4ab2f9f1899f574275..0c45d28508015d448c0b8a46cdb83e3974da2e28 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1210,8 +1210,8 @@  M: Bibo Mao <maobibo@loongson.cn>
 R: Jiaxun Yang <jiaxun.yang@flygoat.com>
 S: Maintained
 F: docs/system/loongarch/virt.rst
-F: configs/targets/loongarch64-softmmu.mak
-F: configs/devices/loongarch64-softmmu/default.mak
+F: configs/targets/loongarch*-softmmu.mak
+F: configs/devices/loongarch*-softmmu/default.mak
 F: hw/loongarch/
 F: include/hw/loongarch/virt.h
 F: include/hw/intc/loongarch_*.h
diff --git a/configs/devices/loongarch32-softmmu/default.mak b/configs/devices/loongarch32-softmmu/default.mak
new file mode 100644
index 0000000000000000000000000000000000000000..b28b5c7c9e2195cffe065716ee33ec2bf26e2b31
--- /dev/null
+++ b/configs/devices/loongarch32-softmmu/default.mak
@@ -0,0 +1,7 @@ 
+# Default configuration for loongarch32-softmmu
+
+# Uncomment the following lines to disable these optional devices:
+# CONFIG_PCI_DEVICES=n
+
+# Boards are selected by default, uncomment to keep out of the build.
+# CONFIG_LOONGARCH_VIRT=n
diff --git a/configs/targets/loongarch32-softmmu.mak b/configs/targets/loongarch32-softmmu.mak
new file mode 100644
index 0000000000000000000000000000000000000000..50e0075a24ac6bf3717db967b03b816b52a25964
--- /dev/null
+++ b/configs/targets/loongarch32-softmmu.mak
@@ -0,0 +1,7 @@ 
+TARGET_ARCH=loongarch32
+TARGET_BASE_ARCH=loongarch
+TARGET_KVM_HAVE_GUEST_DEBUG=y
+TARGET_SUPPORTS_MTTCG=y
+TARGET_XML_FILES= gdb-xml/loongarch-base32.xml gdb-xml/loongarch-fpu.xml gdb-xml/loongarch-lsx.xml gdb-xml/loongarch-lasx.xml
+# all boards require libfdt
+TARGET_NEED_FDT=y