OSDN Git Service

exec: clamp accesses against the MemoryRegionSection
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 17 Jun 2015 08:36:54 +0000 (10:36 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 19 Jun 2015 10:27:14 +0000 (12:27 +0200)
commite4a511f8cc6f4a46d409fb5c9f72c38ba45f8d83
tree0d3a18cf62f3079370d7c412b378aef00fdece8c
parent965eb2fcdfe919ecced6c34803535ad32dc1249c
exec: clamp accesses against the MemoryRegionSection

Because the clamping was done against the MemoryRegion,
address_space_rw was effectively broken if a write spanned
multiple sections that are not linear in underlying memory
(with the memory not being under an IOMMU).

This is visible with the MIPS rc4030 IOMMU, which is implemented
as a series of alias memory regions that point to the actual RAM.

Tested-by: Hervé Poussineau <hpoussin@reactos.org>
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
exec.c