Hi all,

I am facing two problems with the Stage-2 translation in KVM.

(1)
I reserve a memory region (e.g., 0xa000_0000 ~ 0xa020_0000) from DRAM space
of HostOS, and fill it with some values. Then ask a GuestVM to access this
region.

void __iomem *region=ioremap(0xa0000000, 0x1000);
uint32_t val=ioread32(region);

But I get value 0, which is not the expected value.
I guess the reason is that the Stage-2 translation of the GuestVM does not
map the reserved region, but it should return a translation fault, rather
than 0. So I feel confused, could you provide some helpful explanation?

(2)
I consider mapping a region with the Stage-2 translation. I find that KVM
create the stage-2 table with kvm_alloc_stage2_pgd(). But I could not find
a function that can "arbitrarily add a stage-2 mapping to the physical
address in HostOS" when the VM is activated.

Could you provide such functions?
_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Reply via email to