kvm: Make MMIO requests uncacheable
authorAndreas Sandberg <andreas@sandberg.pp.se>
Thu, 2 May 2013 10:01:50 +0000 (12:01 +0200)
committerAndreas Sandberg <andreas@sandberg.pp.se>
Thu, 2 May 2013 10:01:50 +0000 (12:01 +0200)
Device accesses are normally uncacheable. This change probably doesn't
make any difference since we normally disable caching when KVM is
active. However, there might be devices that check this, so we'd
better enable this flag to be safe.

src/cpu/kvm/base.cc

index 2d993cf35f4498adb2ac2004396e857b66e072a9..59553b42cacd2b9b597c22c112d3b4bdf1145d8d 100644 (file)
@@ -772,9 +772,7 @@ BaseKvmCPU::handleKvmExitFailEntry()
 Tick
 BaseKvmCPU::doMMIOAccess(Addr paddr, void *data, int size, bool write)
 {
-    mmio_req.setPhys(paddr, size,
-                     0, /* flags */
-                     dataMasterId());
+    mmio_req.setPhys(paddr, size, Request::UNCACHEABLE, dataMasterId());
 
     const MemCmd cmd(write ? MemCmd::WriteReq : MemCmd::ReadReq);
     Packet pkt(&mmio_req, cmd);