Linux KVM/arm64 development list
 help / color / mirror / Atom feed
* Problems about Stage-2 translation
@ 2021-10-16 12:21 Chenxu Wang
  2021-10-16 21:19 ` Marc Zyngier
  0 siblings, 1 reply; 6+ messages in thread
From: Chenxu Wang @ 2021-10-16 12:21 UTC (permalink / raw)
  To: kvmarm


[-- Attachment #1.1: Type: text/plain, Size: 896 bytes --]

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?

[-- Attachment #1.2: Type: text/html, Size: 1119 bytes --]

[-- Attachment #2: Type: text/plain, Size: 151 bytes --]

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-10-18 19:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-16 12:21 Problems about Stage-2 translation Chenxu Wang
2021-10-16 21:19 ` Marc Zyngier
2021-10-18  8:36   ` Chenxu Wang
2021-10-18 10:06     ` Marc Zyngier
2021-10-18 19:01       ` Chenxu Wang
2021-10-18 19:31         ` Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox