public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [Question] kvm: About ept identity pagetable and apic access page migration.
       [not found] ` <539A7002.9020905@cn.fujitsu.com>
@ 2014-06-16  7:32   ` Gleb Natapov
  0 siblings, 0 replies; only message in thread
From: Gleb Natapov @ 2014-06-16  7:32 UTC (permalink / raw)
  To: Tang Chen; +Cc: kvm

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-06-16  7:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <539A6EAA.5090506@cn.fujitsu.com>
     [not found] ` <539A7002.9020905@cn.fujitsu.com>
2014-06-16  7:32   ` [Question] kvm: About ept identity pagetable and apic access page migration Gleb Natapov

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