<div dir="ltr">Hi,<div><br></div><div>We are currently working on contributing to Qemu a command-line option to disable/enable certain modes in Qemu. I'll keep you posted as soon as I've anything material to share.</div><div><br></div><div>The solution on the OpenJDK should IMO to probe at startup for the satp mode (sv39/sv48/sv57/sv64) and generate the appropriate and cheapest movptr according to this value. I wouldn't want to pay the full cost of sv57 or sv64 while no existing boards or hardware even support anything more than sv48. Especially given the current discussions in RISC-V on reducing the cost of auipc/jalr, movptr, and trampolines.</div><div><br></div><div>Thanks,</div><div>Ludovic</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 23, 2022 at 9:33 AM Vladimir Kempik <<a href="mailto:vladimir.kempik@gmail.com">vladimir.kempik@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Hello<div><br></div><div>A kind of workaround for this case</div><div><br></div><div>disable sv57 csr and rebuild qemu - <a href="https://github.com/qemu/qemu/blob/master/target/riscv/csr.c#L1027" target="_blank">https://github.com/qemu/qemu/blob/master/target/riscv/csr.c#L1027</a> put 0 here</div><div><br></div><div>Regards, Vladimir<br><div><br><blockquote type="cite"><div>23 нояб. 2022 г., в 04:08, Zixian Cai <<a href="mailto:zixian.cai@anu.edu.au" target="_blank">zixian.cai@anu.edu.au</a>> написал(а):</div><br><div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif">This has been discussed in a previous thread.<span> </span><a href="https://mail.openjdk.org/pipermail/riscv-port-dev/2022-September/000636.html" style="color:blue;text-decoration:underline" target="_blank">https://mail.openjdk.org/pipermail/riscv-port-dev/2022-September/000636.html</a><u></u><u></u></div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif">I agree that it would be nice to support different modes. Although with the patches in QEMU/Kernel that can restrict the OS to run with sv39/sv48 only, and the fact that there are not enough real hardware board supporting above sv48, I don’t know whether there will be sufficient motivation to fix the problem in the short term.<u></u><u></u></div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif">Also worth noting until very recently (Intel implemented 5-level paging around the release of Ice Lake), x86_64 has been staying 48 bits a for long time.<u></u><u></u></div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div><div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US">Sincerely,<u></u><u></u></span></div></div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US">Zixian</span><u></u><u></u></div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div><p class="MsoNormal" style="margin:0cm 0cm 12pt;font-size:11pt;font-family:Calibri,sans-serif">On 23/11/2022, 11:58, "riscv-port-dev" <<a href="mailto:riscv-port-dev-retn@openjdk.org" target="_blank">riscv-port-dev-retn@openjdk.org</a>> wrote:<u></u><u></u></p><div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif">hi,<span> </span><u></u><u></u></div></div><div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif">   openjdk 20 crash on linux kernel 5.19, because it can not support huge VM?<u></u><u></u></div></div><div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif">but I think openjdk as a application, it should not has any limitation on virtual address length,<u></u><u></u></div></div><div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif">even if it has very close relationship with hardware, just as qemu should not depend on hardware VM size, it's none of business for an application, because all other apps can run very well.<u></u><u></u></div></div><div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif">when will it support the newest kernel and qemu?<span> </span><u></u><u></u></div></div><div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u></div></div><div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><a href="https://groups.google.com/a/groups.riscv.org/g/sw-dev/c/pILY0WGHhOs" style="color:blue;text-decoration:underline" target="_blank">https://groups.google.com/a/groups.riscv.org/g/sw-dev/c/pILY0WGHhOs</a></div></div></div></div></blockquote></div><br></div></div></blockquote></div>