qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] qemu-kvm: Role of flush_icache_range on PPC
@ 2011-09-28 14:23 Jan Kiszka
  2011-09-28 14:26 ` Alexander Graf
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Kiszka @ 2011-09-28 14:23 UTC (permalink / raw)
  To: Alexander Graf; +Cc: qemu-devel, kvm

Alex,

we have this diff in qemu-kvm:

diff --git a/exec.c b/exec.c
index c1e045d..f188549 100644
--- a/exec.c
+++ b/exec.c
@@ -3950,6 +3955,11 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf,
                     cpu_physical_memory_set_dirty_flags(
                         addr1, (0xff & ~CODE_DIRTY_FLAG));
                 }
+		/* qemu doesn't execute guest code directly, but kvm does
+		   therefore flush instruction caches */
+		if (kvm_enabled())
+		    flush_icache_range((unsigned long)ptr,
+				       ((unsigned long)ptr)+l);
                 qemu_put_ram_ptr(ptr);
             }
         } else {


flush_icache_range() is doing something only on PPC hosts. So do we need
this upstream?

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-09-28 21:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-28 14:23 [Qemu-devel] qemu-kvm: Role of flush_icache_range on PPC Jan Kiszka
2011-09-28 14:26 ` Alexander Graf
2011-09-28 14:45   ` Jan Kiszka
2011-09-28 14:49     ` Jan Kiszka
2011-09-28 14:57       ` Alexander Graf
2011-09-28 17:27     ` Scott Wood
2011-09-28 21:02       ` Benjamin Herrenschmidt
2011-09-28 21:20         ` Scott Wood
2011-09-28 21:34           ` Benjamin Herrenschmidt
2011-09-28 20:58   ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).