aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorRadim Krčmář <rkrcmar@redhat.com>2014-08-28 09:13:02 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2014-08-29 10:35:55 -0400
commit0865e636aef751966e6e0f8950a26bc7391e923c (patch)
treeebd382925187756575fdbf677fe3a807f7e4d706 /arch/ia64
parent656473003bc7e056c3bbd4a4d9832dad01e86f76 (diff)
KVM: static inline empty kvm_arch functions
Using static inline is going to save few bytes and cycles. For example on powerpc, the difference is 700 B after stripping. (5 kB before) This patch also deals with two overlooked empty functions: kvm_arch_flush_shadow was not removed from arch/mips/kvm/mips.c 2df72e9bc KVM: split kvm_arch_flush_shadow and kvm_arch_sched_in never made it into arch/ia64/kvm/kvm-ia64.c. e790d9ef6 KVM: add kvm_arch_sched_in Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/include/asm/kvm_host.h12
-rw-r--r--arch/ia64/kvm/kvm-ia64.c30
2 files changed, 12 insertions, 30 deletions
diff --git a/arch/ia64/include/asm/kvm_host.h b/arch/ia64/include/asm/kvm_host.h
index fccc09d04649..4729752b7256 100644
--- a/arch/ia64/include/asm/kvm_host.h
+++ b/arch/ia64/include/asm/kvm_host.h
@@ -592,6 +592,18 @@ void kvm_sal_emul(struct kvm_vcpu *vcpu);
592struct kvm *kvm_arch_alloc_vm(void); 592struct kvm *kvm_arch_alloc_vm(void);
593void kvm_arch_free_vm(struct kvm *kvm); 593void kvm_arch_free_vm(struct kvm *kvm);
594 594
595static inline void kvm_arch_sync_events(struct kvm *kvm) {}
596static inline void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu) {}
597static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu) {}
598static inline void kvm_arch_free_memslot(struct kvm *kvm,
599 struct kvm_memory_slot *free, struct kvm_memory_slot *dont) {}
600static inline void kvm_arch_memslots_updated(struct kvm *kvm) {}
601static inline void kvm_arch_commit_memory_region(struct kvm *kvm,
602 struct kvm_userspace_memory_region *mem,
603 const struct kvm_memory_slot *old,
604 enum kvm_mr_change change) {}
605static inline void kvm_arch_hardware_unsetup(void) {}
606
595#endif /* __ASSEMBLY__*/ 607#endif /* __ASSEMBLY__*/
596 608
597#endif 609#endif
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
index 0729ba6acddf..5e14dcaf844e 100644
--- a/arch/ia64/kvm/kvm-ia64.c
+++ b/arch/ia64/kvm/kvm-ia64.c
@@ -1364,10 +1364,6 @@ static void kvm_release_vm_pages(struct kvm *kvm)
1364 } 1364 }
1365} 1365}
1366 1366
1367void kvm_arch_sync_events(struct kvm *kvm)
1368{
1369}
1370
1371void kvm_arch_destroy_vm(struct kvm *kvm) 1367void kvm_arch_destroy_vm(struct kvm *kvm)
1372{ 1368{
1373 kvm_iommu_unmap_guest(kvm); 1369 kvm_iommu_unmap_guest(kvm);
@@ -1376,10 +1372,6 @@ void kvm_arch_destroy_vm(struct kvm *kvm)
1376 kvm_release_vm_pages(kvm); 1372 kvm_release_vm_pages(kvm);
1377} 1373}
1378 1374
1379void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
1380{
1381}
1382
1383void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) 1375void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
1384{ 1376{
1385 if (cpu != vcpu->cpu) { 1377 if (cpu != vcpu->cpu) {
@@ -1468,7 +1460,6 @@ void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu)
1468 kfree(vcpu->arch.apic); 1460 kfree(vcpu->arch.apic);
1469} 1461}
1470 1462
1471
1472long kvm_arch_vcpu_ioctl(struct file *filp, 1463long kvm_arch_vcpu_ioctl(struct file *filp,
1473 unsigned int ioctl, unsigned long arg) 1464 unsigned int ioctl, unsigned long arg)
1474{ 1465{
@@ -1551,21 +1542,12 @@ int kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf)
1551 return VM_FAULT_SIGBUS; 1542 return VM_FAULT_SIGBUS;
1552} 1543}
1553 1544
1554void kvm_arch_free_memslot(struct kvm *kvm, struct kvm_memory_slot *free,
1555 struct kvm_memory_slot *dont)
1556{
1557}
1558
1559int kvm_arch_create_memslot(struct kvm *kvm, struct kvm_memory_slot *slot, 1545int kvm_arch_create_memslot(struct kvm *kvm, struct kvm_memory_slot *slot,
1560 unsigned long npages) 1546 unsigned long npages)
1561{ 1547{
1562 return 0; 1548 return 0;
1563} 1549}
1564 1550
1565void kvm_arch_memslots_updated(struct kvm *kvm)
1566{
1567}
1568
1569int kvm_arch_prepare_memory_region(struct kvm *kvm, 1551int kvm_arch_prepare_memory_region(struct kvm *kvm,
1570 struct kvm_memory_slot *memslot, 1552 struct kvm_memory_slot *memslot,
1571 struct kvm_userspace_memory_region *mem, 1553 struct kvm_userspace_memory_region *mem,
@@ -1597,14 +1579,6 @@ int kvm_arch_prepare_memory_region(struct kvm *kvm,
1597 return 0; 1579 return 0;
1598} 1580}
1599 1581
1600void kvm_arch_commit_memory_region(struct kvm *kvm,
1601 struct kvm_userspace_memory_region *mem,
1602 const struct kvm_memory_slot *old,
1603 enum kvm_mr_change change)
1604{
1605 return;
1606}
1607
1608void kvm_arch_flush_shadow_all(struct kvm *kvm) 1582void kvm_arch_flush_shadow_all(struct kvm *kvm)
1609{ 1583{
1610 kvm_flush_remote_tlbs(kvm); 1584 kvm_flush_remote_tlbs(kvm);
@@ -1853,10 +1827,6 @@ int kvm_arch_hardware_setup(void)
1853 return 0; 1827 return 0;
1854} 1828}
1855 1829
1856void kvm_arch_hardware_unsetup(void)
1857{
1858}
1859
1860int kvm_apic_set_irq(struct kvm_vcpu *vcpu, struct kvm_lapic_irq *irq) 1830int kvm_apic_set_irq(struct kvm_vcpu *vcpu, struct kvm_lapic_irq *irq)
1861{ 1831{
1862 return __apic_accept_irq(vcpu, irq->vector); 1832 return __apic_accept_irq(vcpu, irq->vector);