~quark/QuarkContainer

1

HYPERCALL_MMIO_BASE

Details
Message ID
<CA+AW3Mx5Y-Nw4=JqO-G1LVjCgGsg+_Vy_yU9D+aQpiEzNyo=ow@mail.gmail.com>
DKIM signature
pass
Download raw message
Hi, Tianhao,

I see there is one page HYPERCALL_MMIO_BASE is mapped in physical
address space. But I see the memory range is not allocated in the
kvm_userspace_memory_region.

So is this by intention?

Thanks,
Yulin
Details
Message ID
<D1DY8ZOJ7AZJ.3G5IQZHJTR20W@mailbox.org>
In-Reply-To
<CA+AW3Mx5Y-Nw4=JqO-G1LVjCgGsg+_Vy_yU9D+aQpiEzNyo=ow@mail.gmail.com> (view parent)
DKIM signature
pass
Download raw message
On Sun May 19, 2024 at 11:41 PM CEST, Yulin Sun wrote:
> I see there is one page HYPERCALL_MMIO_BASE is mapped in physical
> address space. But I see the memory range is not allocated in the
> kvm_userspace_memory_region.
>
> So is this by intention?

this is intentional. This page is mapped, but not backed by any host
memory. When this (one page) memory is accessed, it will trigger a
KVM_EXIT with MMIO read or write. You have to map it in guest pagetable
otherwise it would be a pagefault exception instead of a MMIO.

The Hypercall ID is calculated from addr - HYPERCALL_MMIO_BASE.

wth.
Reply to thread Export thread (mbox)