From f65ed4c1529f29a7d62d6733eaa50bed24a4b2ed Mon Sep 17 00:00:00 2001 From: aliguori Date: Tue, 9 Dec 2008 20:09:57 +0000 Subject: KVM: Coalesced MMIO support MMIO exits are more expensive in KVM or Xen than in QEMU because they involve, at least, privilege transitions. However, MMIO write operations can be effectively batched if those writes do not have side effects. Good examples of this include VGA pixel operations when in a planar mode. As it turns out, we can get a nice boost in other areas too. Laurent mentioned a 9.7% performance boost in iperf with the coalesced MMIO changes for the e1000 when he originally posted this work for KVM. Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5961 c046a42c-6fe2-441c-8c8c-71466251a162 --- cpu-all.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'cpu-all.h') diff --git a/cpu-all.h b/cpu-all.h index fadf89cfc1..7102014c7b 100644 --- a/cpu-all.h +++ b/cpu-all.h @@ -973,6 +973,15 @@ void cpu_physical_sync_dirty_bitmap(target_phys_addr_t start_addr, target_phys_a void dump_exec_info(FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...)); +/* Coalesced MMIO regions are areas where write operations can be reordered. + * This usually implies that write operations are side-effect free. This allows + * batching which can make a major impact on performance when using + * virtualization. + */ +void qemu_register_coalesced_mmio(target_phys_addr_t addr, ram_addr_t size); + +void qemu_unregister_coalesced_mmio(target_phys_addr_t addr, ram_addr_t size); + /*******************************************/ /* host CPU ticks (if available) */ -- cgit v1.2.3