[PATCH 2/2] KVM: riscv: selftests: Detect supported vm modes
Radim Krčmář
rkrcmar at ventanamicro.com
Fri Oct 24 08:59:01 PDT 2025
2025-10-24T21:48:01+08:00, Wu Fei <atwufei at 163.com>:
> On 10/22/25 22:26, Radim Krčmář wrote:
>> For tests that that don't care about physical width, we could
>> add:
>>
>> VM_MODE_PXXV39_4K
>
> Intel adds VM_MODE_PXXV48_4K because "x86_64 machines are having various
> physical address width rather than some static values" according to
> commit 567a9f1e9de, and x86 has to probe the real gpa width on vm
> creation. RISC-V has 3 fixed gpa widths, so maybe we can use the
> explicit widths?
Makes sense.
>> It doesn't seem necessary to support more than that, but if our tests
>> want larger virtual address space, we can add V48 and V57 variants.
>
> I think V48/V57 is necessary, if a machine is designed to have SV48
> guests, it's better to test it.
Right. We also get information about available guest satp modes from
KVM, so we ought to test that it was correct.
> So is it okay to have the combination of all 9 modes?
> P(41, 50, 56) x V(39, 48, 57)
> But only several ones are picked up for a specific machine, just as
> mentioned above, we won't select P41V39 for Sv48x4 etc.
Sounds good, thanks.
More information about the kvm-riscv
mailing list