Re: [Qemu-devel] [PATCH 07/22] memory: add address_space_translate

2013-06-20 Thread Paolo Bonzini
Il 20/06/2013 16:43, Peter Maydell ha scritto: >>> >> There are other places in memory.c which do an int128_get64() >>> >> on mr->size, which also look suspicious... >> > >> > They are all on I/O regions so they are safe > Not entirely sure I understand this. There's no particular > reason I can't

Re: [Qemu-devel] [PATCH 07/22] memory: add address_space_translate

2013-06-20 Thread Peter Maydell
On 20 June 2013 15:19, Paolo Bonzini wrote: > Il 20/06/2013 15:53, Peter Maydell ha scritto: >> There are other places in memory.c which do an int128_get64() >> on mr->size, which also look suspicious... > > They are all on I/O regions so they are safe Not entirely sure I understand this. There's

Re: [Qemu-devel] [PATCH 07/22] memory: add address_space_translate

2013-06-20 Thread Paolo Bonzini
Il 20/06/2013 15:53, Peter Maydell ha scritto: > On 30 May 2013 22:03, Paolo Bonzini wrote: >> +MemoryRegionSection *address_space_translate(AddressSpace *as, hwaddr addr, >> + hwaddr *xlat, hwaddr *plen, >> +

Re: [Qemu-devel] [PATCH 07/22] memory: add address_space_translate

2013-06-20 Thread Peter Maydell
On 30 May 2013 22:03, Paolo Bonzini wrote: > +MemoryRegionSection *address_space_translate(AddressSpace *as, hwaddr addr, > + hwaddr *xlat, hwaddr *plen, > + bool is_write) > +{ > +MemoryRegionSection *sect

[Qemu-devel] [PATCH 07/22] memory: add address_space_translate

2013-05-30 Thread Paolo Bonzini
Using phys_page_find to translate an AddressSpace to a MemoryRegionSection is unwieldy. It requires to pass the page index rather than the address, and later memory_region_section_addr has to be called. Replace memory_region_section_addr with a function that does all of it: call phys_page_find, c

[Qemu-devel] [PATCH 07/22] memory: add address_space_translate

2013-05-24 Thread Paolo Bonzini
Using phys_page_find to translate an AddressSpace to a MemoryRegionSection is unwieldy. It requires to pass the page index rather than the address, and later memory_region_section_addr has to be called. Replace memory_region_section_addr with a function that does all of it: call phys_page_find, c