Skip to contentSkip to conversation

target/mips: Support variable page size

PATCH Applied Huacai Chen 5 participants 16 messages Apr 8, 2020 – Jun 1, 2020

lore
Share & tools
lore
#0 lore raw

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
index 308660d..9c4a6ea 100644
@@ -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
#1 lore raw

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
index 5040afd..23897d7 100644
@@ -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
#6 lore raw

PATCH 3/3 MAINTAINERS: Add myself as fulong2e co-maintainer

In reply to Huacai Chen

I 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
index 642c8e0..3281ff2 100644
@@ -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 · 1 line
2.7.0
#7 lore raw

Re: [PATCH 3/3] MAINTAINERS: Add myself as fulong2e co-maintainer

11:08 Sre, 08.04.2020. Huacai Chen <[email protected]> је написао/ла:

Quoted 28 lines

I 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 -1
index 642c8e0..3281ff2 100644
@@ -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
--
Quoted 2 lines

2.7.0

First of all, I want to express great pleasure and delight seing your series, and this patch in particular.

A warm welcome to QEMU developers communities!

We are currenyly very busy preparing QEMU 5.0 release, and additionaly, Easter holidays are in next few days or week (different parts od Christian world have different calendars), so, fot thay and other reasons, don't expect promot replies from us.

I would also like to see Jiaxng at least having official reviewer status, but, of course, only if he wants that.

Yours,
and wishing you and all people from China best health!

Aleksandar

#8 lore raw

Re: [PATCH 3/3] MAINTAINERS: Add myself as fulong2e co-maintainer

Hi, Aleksandar,

Quoted 35 lines · Aleksandar Markovic

11:08 Sre, 08.04.2020. Huacai Chen <[email protected]> је написао/ла:

Quoted 28 lines

I 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 -1
index 642c8e0..3281ff2 100644
@@ -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
--
Quoted 2 lines

2.7.0

First of all, I want to express great pleasure and delight seing your series, and this patch in particular.

Quoted 5 lines

A warm welcome to QEMU developers communities!

We are currenyly very busy preparing QEMU 5.0 release, and additionaly, Easter holidays are in next few days or week (different parts od Christian world have different calendars), so, fot thay and other reasons, don't expect promot replies from us.

I would also like to see Jiaxng at least having official reviewer status, but, of course, only if he wants that.

Thank you for your best wishes, I'm also very glad to see Jiaxun be an reviewer.

Regards,
Huacai

Quoted 5 lines

Yours,
and wishing you and all people from China best health!

Aleksandar

#9 lore raw

Re: [PATCH 3/3] MAINTAINERS: Add myself as fulong2e co-maintainer

Quoted 49 lines · On Thu, 9 Apr 2020 10:17:46 +0800 Huacai Chen <[email protected]> wrote:

Hi, Aleksandar,

Quoted 45 lines · Aleksandar Markovic

11:08 Sre, 08.04.2020. Huacai Chen <[email protected]> је написао/ла:

Quoted 29 lines

I 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 -1
index 642c8e0..3281ff2 100644
@@ -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
--
Quoted 2 lines

2.7.0

First of all, I want to express great pleasure and delight seing your series, and this patch in particular.

A warm welcome to QEMU developers communities!

We are currenyly very busy preparing QEMU 5.0 release, and additionaly, Easter holidays are in next few days or week (different parts od Christian world have different calendars), so, fot thay and other reasons, don't expect promot replies from us.

Quoted 4 lines
Quoted 2 lines

I would also like to see Jiaxng at least having official reviewer status, but, of course, only if he wants that.

Thank you for your best wishes, I'm also very glad to see Jiaxun be an reviewer.

Thanks, but I was a primary school student at Loongson-2E's era, so I can do nothing with 2E.

My experience with Loongson starts from 2F. And I'm more familiar with 2K and 3A.

I'm happy to contribute QEMU support for these platforms.

Thanks.

Quoted 8 lines

Regards,
Huacai

Quoted 5 lines

Yours,
and wishing you and all people from China best health!

Aleksandar

--
Jiaxun Yang

#10 lore raw

Re: [PATCH 3/3] MAINTAINERS: Add myself as fulong2e co-maintainer

04:39 Čet, 09.04.2020. Jiaxun Yang <[email protected]> је написао/ла:

Quoted 55 lines
Quoted 51 lines · On Thu, 9 Apr 2020 10:17:46 +0800 Huacai Chen <[email protected]> wrote:

Hi, Aleksandar,

Quoted 47 lines · Aleksandar Markovic

11:08 Sre, 08.04.2020. Huacai Chen <[email protected]> је написао/ла:

Quoted 29 lines

I 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 -1
index 642c8e0..3281ff2 100644
@@ -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
--
Quoted 2 lines

2.7.0

First of all, I want to express great pleasure and delight seing your series, and this patch in particular.

A warm welcome to QEMU developers communities!

We are currenyly very busy preparing QEMU 5.0 release, and additionaly, Easter holidays are in next few days or week (different parts od Christian world have different calendars), so, fot thay and other reasons, don't expect promot replies from us.

I would also like to see Jiaxng at least having official reviewer status, but, of course, only if he wants that.

Quoted 9 lines
Quoted 2 lines

Thank you for your best wishes, I'm also very glad to see Jiaxun be an reviewer.

Thanks, but I was a primary school student at Loongson-2E's era, so I can do nothing with 2E.

My experience with Loongson starts from 2F. And I'm more familiar with 2K and 3A.

OK, it makes sense. But, if you ever become wanting to be a reviewer for Foolong 2e, just give me an email.

Quoted 2 lines

I'm happy to contribute QEMU support for these platforms.

I am happy as well.

Best wishes and best health to you, people from China, and the whole region!!

Yours,
Aleksandar

Quoted 13 lines

Thanks.

Quoted 8 lines

Regards,
Huacai

Quoted 5 lines

Yours,
and wishing you and all people from China best health!

Aleksandar

--
Jiaxun Yang

#11 lore raw

Re: [PATCH 3/3] MAINTAINERS: Add myself as fulong2e co-maintainer

Quoted 41 lines · Aleksandar Markovic

04:39 Čet, 09.04.2020. Jiaxun Yang <[email protected] <mailto:[email protected]>> је написао/ла:

Quoted 8 lines
Quoted 4 lines · On Thu, 9 Apr 2020 10:17:46 +0800 Huacai Chen <[email protected]…

Hi, Aleksandar,

On Wed, Apr 8, 2020 at 11:30 PM Aleksandar Markovic <[email protected]

Quoted 2 lines · <mailto:[email protected]>> wrote:
Quoted 2 lines
Quoted 2 lines

11:08 Sre, 08.04.2020. Huacai Chen <[email protected]

<mailto:[email protected]>> је

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

написао/ла:

Quoted 10 lines

I 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.

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Cc Jiaxun Yang <[email protected]

<mailto:[email protected]>>

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

<mailto:[email protected]>>

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

---
  MAINTAINERS | 1 +

  1 file changed, 1 insertion(+)
MAINTAINERS +0 -0
index 642c8e0..3281ff2 100644
@@ -1073,6 +1073,7 @@ F: hw/mips/mips_r4k.c

  Fulong 2E
  M: Philippe Mathieu-Daudé <[email protected]

<mailto:[email protected]>>

Quoted 30 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

  M: Aleksandar Markovic <[email protected]

<mailto:[email protected]>>

Quoted 28 lines
Quoted 18 lines
Quoted 18 lines
Quoted 7 lines

+M: Huacai Chen <[email protected] <mailto:[email protected]>>
  S: Odd Fixes
  F: hw/mips/mips_fulong2e.c
  F: hw/isa/vt82c686.c
--
2.7.0

First of all, I want to express great pleasure and delight seing your series, and this patch in particular.

A warm welcome to QEMU developers communities!

We are currenyly very busy preparing QEMU 5.0 release, and additionaly, Easter holidays are in next few days or week (different parts od Christian world have different calendars), so, fot thay and other reasons, don't expect promot replies from us.

Quoted 4 lines
Quoted 2 lines

I would also like to see Jiaxng at least having official reviewer status, but, of course, only if he wants that.

Thank you for your best wishes, I'm also very glad to see Jiaxun be an reviewer.

Thanks, but I was a primary school student at Loongson-2E's era, so I can do nothing with 2E.

My experience with Loongson starts from 2F. And I'm more familiar with 2K and 3A.

Thank you both of you, your help is very welcome :)

I have a simple series renaming "fulo[o]ng" I plan to send when the 5.1 development window opens, I'll include your patch.

Quoted 30 lines
Quoted 1 line

OK, it makes sense. But, if you ever become wanting to be a reviewer for Foolong 2e, just give me an email.

Quoted 2 lines

I'm happy to contribute QEMU support for these platforms.

I am happy as well.

Best wishes and best health to you, people from China, and the whole region!!

Yours,
Aleksandar

Quoted 13 lines

Thanks.

Quoted 8 lines

Regards,
Huacai

Quoted 5 lines

Yours,
and wishing you and all people from China best health!

Aleksandar

--
Jiaxun Yang

Reviewed-by on v1 1/3
#13 lore raw
In reply to Huacai Chen

сре, 8. апр 2020. у 11:07 Huacai Chen <[email protected]> је написао/ла:

Quoted 11 lines

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(+)
Quoted 20 lines
target/mips/cpu-param.h +5 -1
index 308660d..9c4a6ea 100644
@@ -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
--

2.7.0

Reviewed-by on v1 2/3
#2 lore raw

Re: [PATCH 2/3] mips/mips_fulong2e: Set preferred page size to 16KB

In reply to Huacai Chen

сре, 8. апр 2020. у 11:08 Huacai Chen <[email protected]> је написао/ла:

Quoted 7 lines

Loongson processor prefers 16KB page size in system emulator, so let's define mc->minimum_page_bits to 14.

---

Huacai, thanks for the efforts regarding this series! I will very likely accept patches 1/3 and 2/3 from this series in my next MIPS queue, but the possible problem is that I somehow can't find patch 3/3 from my series in my mailbox. (I think it also the case with the cover letter.) Could you perhaps resend the whole series? I'm concerned that patch 3/3 contains something important, and it would be a shame that it is omitted, and 1/3 and 2/3 are accepted.

For this patch:

Quoted 18 lines
 hw/mips/mips_fulong2e.c | 1 +
 1 file changed, 1 insertion(+)
hw/mips/mips_fulong2e.c +1 -1
index 5040afd..23897d7 100644
@@ -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)
--

2.7.0

#3 lore raw

Re: [PATCH 2/3] mips/mips_fulong2e: Set preferred page size to 16KB

Hi, Aleksandar,

Quoted 10 lines · Aleksandar Markovic

сре, 8. апр 2020. у 11:08 Huacai Chen <[email protected]> је написао/ла:

Quoted 7 lines

Loongson processor prefers 16KB page size in system emulator, so let's define mc->minimum_page_bits to 14.

---

Quoted 7 lines

Huacai, thanks for the efforts regarding this series! I will very likely accept patches 1/3 and 2/3 from this series in my next MIPS queue, but the possible problem is that I somehow can't find patch 3/3 from my series in my mailbox. (I think it also the case with the cover letter.) Could you perhaps resend the whole series? I'm concerned that patch 3/3 contains something important, and it would be a shame that it is omitted, and 1/3 and 2/3 are accepted.

Patch 3/3 is "Add myself as fulong2e co-maintainer", this is already done in your series, so maybe I needn't resend?

Regards,
Huacai

Quoted 23 lines

For this patch:

Quoted 18 lines
 hw/mips/mips_fulong2e.c | 1 +
 1 file changed, 1 insertion(+)
hw/mips/mips_fulong2e.c +1 -1
index 5040afd..23897d7 100644
@@ -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)
--

2.7.0

#4 lore raw

Re: [PATCH 2/3] mips/mips_fulong2e: Set preferred page size to 16KB

сре, 13. мај 2020. у 10:25 Huacai Chen <[email protected]> је написао/ла:

Quoted 22 lines

Hi, Aleksandar,

Quoted 10 lines · Aleksandar Markovic

сре, 8. апр 2020. у 11:08 Huacai Chen <[email protected]> је написао/ла:

Quoted 7 lines

Loongson processor prefers 16KB page size in system emulator, so let's define mc->minimum_page_bits to 14.

---

Quoted 7 lines

Huacai, thanks for the efforts regarding this series! I will very likely accept patches 1/3 and 2/3 from this series in my next MIPS queue, but the possible problem is that I somehow can't find patch 3/3 from my series in my mailbox. (I think it also the case with the cover letter.) Could you perhaps resend the whole series? I'm concerned that patch 3/3 contains something important, and it would be a shame that it is omitted, and 1/3 and 2/3 are accepted.

Quoted 3 lines

Patch 3/3 is "Add myself as fulong2e co-maintainer", this is already done in your series, so maybe I needn't resend?

In that case, no need to resend, thanks!

Aleksandar

Quoted 25 lines

Regards,
Huacai

Quoted 23 lines

For this patch:

Quoted 18 lines
 hw/mips/mips_fulong2e.c | 1 +
 1 file changed, 1 insertion(+)
hw/mips/mips_fulong2e.c +1 -1
index 5040afd..23897d7 100644
@@ -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)
--

2.7.0

Reviewed-by on v1 3/3
#12 lore raw

Re: [PATCH 3/3] MAINTAINERS: Add myself as fulong2e co-maintainer

In reply to Huacai Chen

сре, 8. апр 2020. у 11:08 Huacai Chen <[email protected]> је написао/ла:

Quoted 9 lines

I 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.

Quoted 3 lines

---

Quoted 18 lines
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)
MAINTAINERS +1 -1
index 642c8e0..3281ff2 100644
@@ -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
--

2.7.0

#14 lore raw
In reply to Huacai Chen
Quoted 8 lines · Huacai Chen

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.

---

Applied to MIPS queue.

Thanks and Regards,
Aleksandar

Quoted 24 lines
 target/mips/cpu-param.h | 5 +++++
 1 file changed, 5 insertions(+)
target/mips/cpu-param.h +5 -1
index 308660d..9c4a6ea 100644
@@ -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
--

2.7.0

#5 lore raw

Re: [PATCH 2/3] mips/mips_fulong2e: Set preferred page size to 16KB

In reply to Huacai Chen
Quoted 7 lines · Huacai Chen

Loongson processor prefers 16KB page size in system emulator, so let's define mc->minimum_page_bits to 14.

---

Applied to MIPS queue.

Many thanks!
Aleksandar

Quoted 19 lines
 hw/mips/mips_fulong2e.c | 1 +
 1 file changed, 1 insertion(+)
hw/mips/mips_fulong2e.c +1 -1
index 5040afd..23897d7 100644
@@ -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)
--

2.7.0

#15 lore raw
In reply to Huacai Chen
Quoted 8 lines · Huacai Chen

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.

---

Applied to MIPS queue.

I hope this email will find you and all citizens of China in good health and spirits!

Aleksandar

Quoted 24 lines
 target/mips/cpu-param.h | 5 +++++
 1 file changed, 5 insertions(+)
target/mips/cpu-param.h +5 -1
index 308660d..9c4a6ea 100644
@@ -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
--

2.7.0