Re: Calling to kvm_mmu_load

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Il 30/10/2013 12:39, Arthur Chunqi Li ha scritto:
>> >
>> > kvm_memory_slot just maps a host userspace address range to a guest
>> > physical address range.  Cooperation with Linux memory management is
>> > done with the Linux MMU notifiers.  MMU notifiers let KVM know that a
>> > page has been swapped out, and KVM reacts by invalidating the shadow
>> > page tables for the corresponding guest physical address.
> So for each VM, qemu need to register its memory region and KVM stores
> this region of GPA to HVA mapping in kvm_memory_slot, and at the first
> page fault KVM uses EPT to map GPA to HPA. Am I right?

Yes.

> In this way, how is ballooning mechanism implemented in KVM memory
> management module?

Ballooning is done entirely in userspace with a madvise(MADV_DONTNEED)
call on the HVA.  The userspace has its own GPA->HVA mapping that is
separate from the memslots (e.g. memory_region_find +
memory_region_get_ram_ptr in QEMU).

Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux