Sukanto Ghosh wrote:
ii) Who does the allocation of host physical memory to the guest, is
it KVM module or the associated QEmu process ?
The QEMU process allocates the memory via malloc().
Doesn't the QEMU process and the guest have different address-spaces ?
So, how can it malloc for the guest ? I thought the QEMU process
requests for the memory allocation to the kvm module via the /dev/kvm
device node.
Yes, the guest has a different address space from the host. The QEMU
process malloc()'s the physical memory for the guest, and tells KVM what
the region is (via an ioctl to /dev/kvm). When the guest tries to
create an address space mapping a guest VA to a guest PA, KVM will build
that mapping by using virtual memory allocated by QEMU. To do this, it
uses the mapping to translate guest PA to host PA. Then it will build
an address space for the guest mapping guest VA to host PA.
Regards,
Anthony Liguori
Thanks and regards
Sukanto
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html