linux/arch/x86/kvm
Takuya Yoshikawa 7ddca7e43c KVM: MMU: Move kvm_mmu_free_some_pages() into kvm_mmu_alloc_page()
What this function is doing is to ensure that the number of shadow pages
does not exceed the maximum limit stored in n_max_mmu_pages: so this is
placed at every code path that can reach kvm_mmu_alloc_page().

Although it might have some sense to spread this function in each such
code path when it could be called before taking mmu_lock, the rule was
changed not to do so.

Taking this background into account, this patch moves it into
kvm_mmu_alloc_page() and simplifies the code.

Note: the unlikely hint in kvm_mmu_free_some_pages() guarantees that the
overhead of this function is almost zero except when we actually need to
allocate some shadow pages, so we do not need to care about calling it
multiple times in one path by doing kvm_mmu_get_page() a few times.

Signed-off-by: Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2013-03-21 19:44:56 -03:00
..
cpuid.c KVM: x86: Make register state after reset conform to specification 2012-12-05 18:00:07 +02:00
cpuid.h Merge tag 'kvm-3.8-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2012-12-13 15:31:08 -08:00
emulate.c x86 emulator: fix parity calculation for AAD instruction 2013-02-13 18:01:00 +02:00
i8254.c kvm: fix i8254 counter 0 wraparound 2012-12-18 11:12:38 +02:00
i8254.h KVM: fold kvm_pit_timer into kvm_kpit_state 2012-08-01 00:21:07 -03:00
i8259.c KVM: inject ExtINT interrupt before APIC interrupts 2012-12-13 23:05:21 -02:00
irq.c x86, apicv: add virtual interrupt delivery support 2013-01-29 10:48:19 +02:00
irq.h KVM: switch to symbolic name for irq_states size 2012-07-20 16:12:16 -03:00
Kconfig KVM: Depend on HIGH_RES_TIMERS 2012-09-10 11:10:03 +03:00
kvm_cache_regs.h KVM: MMU: Do not unconditionally read PDPTE from guest memory 2011-09-25 19:18:01 +03:00
lapic.c KVM: x86: Rework INIT and SIPI handling 2013-03-13 16:08:10 +02:00
lapic.h KVM: x86: Rework INIT and SIPI handling 2013-03-13 16:08:10 +02:00
Makefile KVM: Remove internal timer abstraction 2012-08-01 00:21:06 -03:00
mmu_audit.c KVM: do not release the error pfn 2012-08-06 16:04:57 +03:00
mmu.c KVM: MMU: Move kvm_mmu_free_some_pages() into kvm_mmu_alloc_page() 2013-03-21 19:44:56 -03:00
mmu.h KVM: MMU: make kvm_mmu_available_pages robust against n_used_mmu_pages > n_max_mmu_pages 2013-03-13 11:46:09 +02:00
mmutrace.h KVM: mmu: remove unused trace event 2013-01-07 19:54:50 -02:00
paging_tmpl.h KVM: MMU: Move kvm_mmu_free_some_pages() into kvm_mmu_alloc_page() 2013-03-21 19:44:56 -03:00
pmu.c Merge branch 'queue' into next 2012-07-26 11:54:21 +03:00
svm.c KVM: x86: correctly initialize the CS base on reset 2013-03-20 17:34:55 -03:00
trace.h KVM: x86: require matched TSC offsets for master clock 2012-11-27 23:29:15 -02:00
tss.h KVM: x86: hardware task switching support 2008-04-27 12:00:39 +03:00
vmx.c KVM: x86: correctly initialize the CS base on reset 2013-03-20 17:34:55 -03:00
x86.c Merge remote-tracking branch 'upstream/master' into queue 2013-03-21 11:11:52 -03:00
x86.h KVM: x86: Add code to track call origin for msr assignment 2012-11-30 18:26:12 -02:00