Re: [Question] kvm: About ept identity pagetable and apic access page migration.

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

 



Hello, please CC kvm list too.

On Fri, Jun 13, 2014 at 11:29:06AM +0800, Tang Chen wrote:
> On 06/13/2014 11:23 AM, Tang Chen wrote:
> >Hi Gleb,
> >
> >I'm working on host's memory hotplug (not guest) recently. I met a problem
> >in kvm and I'll be very appreciate if you'd like to give some advice. :)
> >
> >When a kvm virtual machine is running, it pins real mode ept identity
> >pagetable
> >and apic access page in memory till the vm is destroyed. Maybe you have
> >known
> >about this, the pinned pages cannot be migrated, as a result they cannot be
> >hot-removed.
> >
> >I'm not very familiar with kvm, and I'm wondering:
> >1. What's these two pages for ?
Identity pagetable is needed for CPUs that do not allow entering guest mode with
paging disabled. On such cpus identity pagetable is populated with ptes that cover
entire guest's memory and guest's CR3 is pointed to it during guest mode entry.

APIC page is used by CPU directly to catch MMIO access to an APIC.

> 
> Sorry, one more question. :)
> 
> Is real mode ept identity pagetable only used in real mode ?
Yes.

> Why does it have to be pinned till the vm is destroyed.
> 
It need not be. Actually both of those may not be pinned at all, it is
just simpler to pin them than to track their whereabouts. If identity
pagetable or APIC page are moved KVM should unmap them from EPT via mmu
notifiers and remap them to a new location on next EPT violation. In
case of APIC page it should update VMCS APIC_ACCESS_ADDR pointer in addition
to EPT page table.

--
			Gleb.
--
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