notdirty_mem_write: implement 8-byte accesses
Aligned 8-byte memory writes by a 64-bit target on a 64-bit host should always turn into atomic 8-byte writes on the host, however if we missed in the softmmu, and the TLB line was marked as not dirty, then we would end up tearing the 8-byte write into two 4-byte writes in access_with_adjusted_size(). Signed-off-by: Andrew Baumann <Andrew.Baumann@microsoft.com> Message-Id: <20171013181913.7556-1-Andrew.Baumann@microsoft.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
279836f819
commit
ad52878f97
13
exec.c
13
exec.c
|
@ -2376,6 +2376,9 @@ static void notdirty_mem_write(void *opaque, hwaddr ram_addr,
|
||||||
case 4:
|
case 4:
|
||||||
stl_p(qemu_map_ram_ptr(NULL, ram_addr), val);
|
stl_p(qemu_map_ram_ptr(NULL, ram_addr), val);
|
||||||
break;
|
break;
|
||||||
|
case 8:
|
||||||
|
stq_p(qemu_map_ram_ptr(NULL, ram_addr), val);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
@ -2406,6 +2409,16 @@ static const MemoryRegionOps notdirty_mem_ops = {
|
||||||
.write = notdirty_mem_write,
|
.write = notdirty_mem_write,
|
||||||
.valid.accepts = notdirty_mem_accepts,
|
.valid.accepts = notdirty_mem_accepts,
|
||||||
.endianness = DEVICE_NATIVE_ENDIAN,
|
.endianness = DEVICE_NATIVE_ENDIAN,
|
||||||
|
.valid = {
|
||||||
|
.min_access_size = 1,
|
||||||
|
.max_access_size = 8,
|
||||||
|
.unaligned = false,
|
||||||
|
},
|
||||||
|
.impl = {
|
||||||
|
.min_access_size = 1,
|
||||||
|
.max_access_size = 8,
|
||||||
|
.unaligned = false,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Generate a debug exception if a watchpoint has been hit. */
|
/* Generate a debug exception if a watchpoint has been hit. */
|
||||||
|
|
Loading…
Reference in New Issue