target/mips: Support variable page size
PATCH 1/3 target/mips: Support variable page size
Traditionally, MIPS use 4KB page size, but Loongson prefer 16KB page size in system emulator. So, let's define TARGET_PAGE_BITS_VARY and TARGET_PAGE_BITS_MIN to support variable page size.
--- target/mips/cpu-param.h | 5 +++++ 1 file changed, 5 insertions(+)
target/mips/cpu-param.h +5 -0
@@ -23,7 +23,12 @@# define TARGET_VIRT_ADDR_SPACE_BITS 32#endif #endif +#ifdef CONFIG_USER_ONLY #define TARGET_PAGE_BITS 12 +#else +#define TARGET_PAGE_BITS_VARY +#define TARGET_PAGE_BITS_MIN 12 +#endif #define NB_MMU_MODES 4#endif
Signature · 1 line
2.7.0
PATCH 2/3 mips/mips_fulong2e: Set preferred page size to 16KB
Loongson processor prefers 16KB page size in system emulator, so let's define mc->minimum_page_bits to 14.
--- hw/mips/mips_fulong2e.c | 1 + 1 file changed, 1 insertion(+)
hw/mips/mips_fulong2e.c +1 -0
@@ -399,6 +399,7 @@ static void mips_fulong2e_machine_init(MachineClass *mc) mc->default_cpu_type =MIPS_CPU_TYPE_NAME ("Loongson-2E" ); mc->default_ram_size =256 * MiB; mc->default_ram_id ="fulong2e.ram" ; + mc->minimum_page_bits =14 ; }DEFINE_MACHINE ("fulong2e" , mips_fulong2e_machine_init)
Signature · 1 line
2.7.0
PATCH 3/3 MAINTAINERS: Add myself as fulong2e co-maintainer
In reply to Huacai ChenI submitted the MIPS/fulong2e support about ten years ago, and after that I became a MIPS kernel developer. Last year, Philippe Mathieu- Daudé asked me that whether I can be a reviewer of MIPS/fulong2e, and I promised that I will do some QEMU work in the next year (i.e., 2020 and later). I think now (and also in future) I can have some spare time, so I can finally do some real work on QEMU/MIPS. And if possible, I hope I can be a co-maintainer of MIPS/fulong2e.
--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
@@ -1073,6 +1073,7 @@ F: hw/mips/mips_r4k.c Fulong 2E M: Philippe Mathieu-Daudé <[email protected]> M: Aleksandar Markovic <[email protected]> +M: Huacai Chen <[email protected]> S: Odd Fixes F: hw/mips/mips_fulong2e.c F: hw/isa/vt82c686.c
Signature · 6 lines
2.7.0 _______________________________________________ Virtualization mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/virtualization