Skip to contentSkip to conversation

loongarch-to-apply queue

GIT PULL Applied Song Gao 4 participants 8 messages Jul 19, 2024

lore
Share & tools
lore

Song Gao

author
#0 lore raw

The following changes since commit 23fa74974d8c96bc95cbecc0d4e2d90f984939f6:

Merge tag 'pull-target-arm-20240718' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2024-07-19 07:02:17 +1000)

are available in the Git repository at:

https://gitlab.com/gaosong/qemu.git tags/pull-loongarch-20240719

for you to fetch changes up to 3ed016f525c8010e66be62d3ca6829eaa9b7cfb5:

hw/loongarch: Modify flash block size to 256K (2024-07-19 10:40:04 +0800)

----------------------------------------------------------------
pull-loongarch-20240719

----------------------------------------------------------------
Song Gao (2):
target/loongarch/gdbstub: Add vector registers support hw/loongarch: Remove unimplemented extioi INT_encode mode

Xianglai Li (1):
hw/loongarch: Modify flash block size to 256K

 configs/targets/loongarch64-linux-user.mak |  2 +-
 configs/targets/loongarch64-softmmu.mak    |  2 +-
 gdb-xml/loongarch-lasx.xml                 | 60 ++++++++++++++++++++++++
 gdb-xml/loongarch-lsx.xml                  | 59 ++++++++++++++++++++++++
 include/hw/intc/loongarch_extioi.h         |  1 -
 include/hw/loongarch/virt.h                |  2 +-
 target/loongarch/gdbstub.c                 | 73 +++++++++++++++++++++++++++++-
 7 files changed, 193 insertions(+), 6 deletions(-)
 create mode 100644 gdb-xml/loongarch-lasx.xml
 create mode 100644 gdb-xml/loongarch-lsx.xml
author
#1 lore raw

[PULL 3/3] hw/loongarch: Modify flash block size to 256K

From: Xianglai Li <[email protected]>

loongarch added a common library for edk2 to parse flash base addresses through fdt.
For compatibility with other architectures, the flash block size in qemu is now changed to 256k.

Message-Id: <[email protected]>

---
 include/hw/loongarch/virt.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/hw/loongarch/virt.h +1 -1
index 8fdfacf268..603c1cebdb 100644
@@ -20,7 +20,7 @@
 #define VIRT_FWCFG_BASE         0x1e020000UL
 #define VIRT_BIOS_BASE          0x1c000000UL
 #define VIRT_BIOS_SIZE          (16 * MiB)
-#define VIRT_FLASH_SECTOR_SIZE  (128 * KiB)
+#define VIRT_FLASH_SECTOR_SIZE  (256 * KiB)
 #define VIRT_FLASH0_BASE        VIRT_BIOS_BASE
 #define VIRT_FLASH0_SIZE        VIRT_BIOS_SIZE
 #define VIRT_FLASH1_BASE        0x1d000000UL
Signature · 1 line
2.34.1
#2 lore raw

Re: [PULL 3/3] hw/loongarch: Modify flash block size to 256K

Quoted 20 lines · Song Gao

From: Xianglai Li <[email protected]>

loongarch added a common library for edk2 to parse flash base addresses through fdt.
For compatibility with other architectures, the flash block size in qemu is now changed to 256k.

Message-Id: <[email protected]>

---
  include/hw/loongarch/virt.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
include/hw/loongarch/virt.h +0 -0
index 8fdfacf268..603c1cebdb 100644

include/hw/loongarch/virt.h line 23

Quoted 5 lines
include/hw/loongarch/virt.h +1 -1
@@ -20,7 +20,7 @@
  #define VIRT_FWCFG_BASE         0x1e020000UL
  #define VIRT_BIOS_BASE          0x1c000000UL
  #define VIRT_BIOS_SIZE          (16 * MiB)
-#define VIRT_FLASH_SECTOR_SIZE  (128 * KiB)
+#define VIRT_FLASH_SECTOR_SIZE  (256 * KiB)

Again, I believe this breaks machine migration. See the recent example Daniel explained to me:
https://lore.kernel.org/qemu-devel/[email protected]/

#3 lore raw

Re: [PULL 3/3] hw/loongarch: Modify flash block size to 256K

Quoted 16 lines · Philippe Mathieu-Daudé
Quoted 15 lines · Song Gao

From: Xianglai Li <[email protected]>

loongarch added a common library for edk2 to parse flash base addresses through fdt.
For compatibility with other architectures, the flash block size in qemu is now changed to 256k.

Message-Id: <[email protected]>

---
  include/hw/loongarch/virt.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines

include/hw/loongarch/virt.h line 23

Quoted 10 lines
include/hw/loongarch/virt.h +1 -1
index 8fdfacf268..603c1cebdb 100644
@@ -20,7 +20,7 @@
  #define VIRT_FWCFG_BASE         0x1e020000UL
  #define VIRT_BIOS_BASE          0x1c000000UL
  #define VIRT_BIOS_SIZE          (16 * MiB)
-#define VIRT_FLASH_SECTOR_SIZE  (128 * KiB)
+#define VIRT_FLASH_SECTOR_SIZE  (256 * KiB)

Again, I believe this breaks machine migration. See the recent example Daniel explained to me:
https://lore.kernel.org/qemu-devel/[email protected]/

Yes, changing flash size breaks migration compat, but note that loongarch does not have any versioned machine types, so it has zero migration compat right now regardles of this change. IOW, now is the right time to make the change, before someone asks for versioned machines with loongarch.

With regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#4 lore raw

Re: [PULL 3/3] hw/loongarch: Modify flash block size to 256K

Quoted 32 lines · Daniel P. Berrangé
Quoted 16 lines · Philippe Mathieu-Daudé
Quoted 15 lines · Song Gao

From: Xianglai Li <[email protected]>

loongarch added a common library for edk2 to parse flash base addresses through fdt.
For compatibility with other architectures, the flash block size in qemu is now changed to 256k.

Message-Id: <[email protected]>

---
   include/hw/loongarch/virt.h | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines

include/hw/loongarch/virt.h line 23

Quoted 10 lines
include/hw/loongarch/virt.h +1 -1
index 8fdfacf268..603c1cebdb 100644
@@ -20,7 +20,7 @@
   #define VIRT_FWCFG_BASE         0x1e020000UL
   #define VIRT_BIOS_BASE          0x1c000000UL
   #define VIRT_BIOS_SIZE          (16 * MiB)
-#define VIRT_FLASH_SECTOR_SIZE  (128 * KiB)
+#define VIRT_FLASH_SECTOR_SIZE  (256 * KiB)

Again, I believe this breaks machine migration. See the recent example Daniel explained to me:
https://lore.kernel.org/qemu-devel/[email protected]/

Quoted 4 lines

Yes, changing flash size breaks migration compat, but note that loongarch does not have any versioned machine types, so it has zero migration compat right now regardles of this change. IOW, now is the right time to make the change, before someone asks for versioned machines with loongarch.

Oh I see now, thanks for clarifying!

It would have been nice to mention that in the commit description, but too late so I don't mind.

Regards,

Phil.

author
#5 lore raw

[PULL 2/3] hw/loongarch: Remove unimplemented extioi INT_encode mode

In reply to Song Gao

Remove extioi INT_encode encode mode, because we don't emulate it.

Message-Id: <[email protected]>

---
 include/hw/intc/loongarch_extioi.h | 1 -
 1 file changed, 1 deletion(-)
include/hw/intc/loongarch_extioi.h +0 -1
index eccc2e0d18..626a37dfa1 100644
@@ -50,7 +50,6 @@
 #define  EXTIOI_HAS_CPU_ENCODE       (3)
 #define  EXTIOI_VIRT_HAS_FEATURES    (BIT(EXTIOI_HAS_VIRT_EXTENSION)  \
                                       | BIT(EXTIOI_HAS_ENABLE_OPTION) \
-                                      | BIT(EXTIOI_HAS_INT_ENCODE)    \
                                       | BIT(EXTIOI_HAS_CPU_ENCODE))
 #define EXTIOI_VIRT_CONFIG           (0x4)
 #define  EXTIOI_ENABLE               (1)
Signature · 1 line
2.34.1
author
#6 lore raw

[PULL 1/3] target/loongarch/gdbstub: Add vector registers support

In reply to Song Gao

GDB already support LoongArch vector extension[1], QEMU gdb adds LoongArch vector registers support, so that users can use 'info all-registers' to get all vector registers values.

[1]: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=1e9569f383a3d5a88ee07d0c2401bd95613c222e

Message-Id: <[email protected]>

---
 configs/targets/loongarch64-linux-user.mak |  2 +-
 configs/targets/loongarch64-softmmu.mak    |  2 +-
 gdb-xml/loongarch-lasx.xml                 | 60 ++++++++++++++++++
 gdb-xml/loongarch-lsx.xml                  | 59 +++++++++++++++++
 target/loongarch/gdbstub.c                 | 73 +++++++++++++++++++++-
 5 files changed, 192 insertions(+), 4 deletions(-)
 create mode 100644 gdb-xml/loongarch-lasx.xml
 create mode 100644 gdb-xml/loongarch-lsx.xml
configs/targets/loongarch64-linux-user.mak +1 -1
index d878e5a113..ea9b7e839a 100644
@@ -1,4 +1,4 @@
 # Default configuration for loongarch64-linux-user
 TARGET_ARCH=loongarch64
 TARGET_BASE_ARCH=loongarch
-TARGET_XML_FILES=gdb-xml/loongarch-base64.xml gdb-xml/loongarch-fpu.xml
+TARGET_XML_FILES=gdb-xml/loongarch-base64.xml gdb-xml/loongarch-fpu.xml gdb-xml/loongarch-lsx.xml gdb-xml/loongarch-lasx.xml
configs/targets/loongarch64-softmmu.mak +1 -1
index 65b65e0c34..ce19ab6a16 100644
@@ -2,6 +2,6 @@ TARGET_ARCH=loongarch64
 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-base64.xml gdb-xml/loongarch-fpu.xml
+TARGET_XML_FILES= gdb-xml/loongarch-base32.xml gdb-xml/loongarch-base64.xml gdb-xml/loongarch-fpu.xml gdb-xml/loongarch-lsx.xml gdb-xml/loongarch-lasx.xml
 # all boards require libfdt
 TARGET_NEED_FDT=y
gdb-xml/loongarch-lasx.xml new file +60 -0

60 lines not on this page · raw message

gdb-xml/loongarch-lsx.xml new file +59 -0

59 lines not on this page · raw message

target/loongarch/gdbstub.c +71 -2

79 lines not on this page · raw message

Signature · 1 line
2.34.1
#7 lore raw
In reply to Song Gao
Quoted 4 lines · Song Gao
   Merge tag 'pull-target-arm-20240718' ofhttps://git.linaro.org/people/pmaydell/qemu-arm into staging (2024-07-19 07:02:17 +1000)

are available in the Git repository at:

Quoted 8 lines
   https://gitlab.com/gaosong/qemu.git tags/pull-loongarch-20240719

for you to fetch changes up to 3ed016f525c8010e66be62d3ca6829eaa9b7cfb5:

   hw/loongarch: Modify flash block size to 256K (2024-07-19 10:40:04 +0800)

----------------------------------------------------------------
pull-loongarch-20240719

Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/9.1 as appropriate.

r~