From 62a2744ca09a0b44b8406ea0c430c4c67a2c3231 Mon Sep 17 00:00:00 2001 From: Sheng Yang Date: Tue, 26 Jan 2010 19:21:16 +0800 Subject: kvm: Flush coalesced MMIO buffer periodly The default action of coalesced MMIO is, cache the writing in buffer, until: 1. The buffer is full. 2. Or the exit to QEmu due to other reasons. But this would result in a very late writing in some condition. 1. The each time write to MMIO content is small. 2. The writing interval is big. 3. No need for input or accessing other devices frequently. This issue was observed in a experimental embbed system. The test image simply print "test" every 1 seconds. The output in QEmu meets expectation, but the output in KVM is delayed for seconds. Per Avi's suggestion, I hooked flushing coalesced MMIO buffer in VGA update handler. By this way, We don't need vcpu explicit exit to QEmu to handle this issue. Signed-off-by: Sheng Yang Signed-off-by: Marcelo Tosatti --- kvm.h | 1 + 1 file changed, 1 insertion(+) (limited to 'kvm.h') diff --git a/kvm.h b/kvm.h index 1c93ac5..59cba18 100644 --- a/kvm.h +++ b/kvm.h @@ -53,6 +53,7 @@ void kvm_setup_guest_memory(void *start, size_t size); int kvm_coalesce_mmio_region(target_phys_addr_t start, ram_addr_t size); int kvm_uncoalesce_mmio_region(target_phys_addr_t start, ram_addr_t size); +void kvm_flush_coalesced_mmio_buffer(void); int kvm_insert_breakpoint(CPUState *current_env, target_ulong addr, target_ulong len, int type); -- cgit v1.1