[tip:tools/kvm] kvm tools: Fix MMIO ordering problem cause due to coalescing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  e638e39a54d609ad2a28cdf3539d708f2cc03516
Gitweb:     http://git.kernel.org/tip/e638e39a54d609ad2a28cdf3539d708f2cc03516
Author:     Sasha Levin <levinsasha928@xxxxxxxxx>
AuthorDate: Wed, 14 Dec 2011 15:11:22 +0200
Committer:  Pekka Enberg <penberg@xxxxxxxxxx>
CommitDate: Wed, 14 Dec 2011 21:29:13 +0200

kvm tools: Fix MMIO ordering problem cause due to coalescing

If we took a MMIO exit, the data in the coalesced ring should be processes
before the data in the exit itself is processed.

Doing it wrong (like we did so far) will cause ordering issues.

Signed-off-by: Sasha Levin <levinsasha928@xxxxxxxxx>
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx>
---
 tools/kvm/kvm-cpu.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/tools/kvm/kvm-cpu.c b/tools/kvm/kvm-cpu.c
index b7ae3d3..a0f330f 100644
--- a/tools/kvm/kvm-cpu.c
+++ b/tools/kvm/kvm-cpu.c
@@ -126,6 +126,12 @@ int kvm_cpu__start(struct kvm_cpu *cpu)
 		case KVM_EXIT_MMIO: {
 			bool ret;
 
+			/*
+			 * If we had MMIO exit, coalesced ring should be processed
+			 * *before* processing the exit itself
+			 */
+			kvm_cpu__handle_coalesced_mmio(cpu);
+
 			ret = kvm_cpu__emulate_mmio(cpu->kvm,
 						    cpu->kvm_run->mmio.phys_addr,
 						    cpu->kvm_run->mmio.data,
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux