On 07/26/2012 04:06 PM, liu ping fan wrote:
> On Wed, Jul 25, 2012 at 8:27 PM, Avi Kivity wrote:
>> On 07/25/2012 01:58 PM, Avi Kivity wrote:
while (len > 0) {
page = addr & TARGET_PAGE_MASK;
l = (page + TARGET_PAGE_SIZE) - addr;
if (l > len)
>>>
On Wed, Jul 25, 2012 at 8:27 PM, Avi Kivity wrote:
> On 07/25/2012 01:58 PM, Avi Kivity wrote:
>>> while (len > 0) {
>>> page = addr & TARGET_PAGE_MASK;
>>> l = (page + TARGET_PAGE_SIZE) - addr;
>>> if (l > len)
>>> l = len;
>>> +
>>> +qemu_rwlo
On Wed, Jul 25, 2012 at 5:18 PM, Paolo Bonzini wrote:
> Il 25/07/2012 10:12, liu ping fan ha scritto:
>> +qemu_rwlock_rdlock_devtree();
>> section = phys_page_find(page >> TARGET_PAGE_BITS);
>> +if (!(memory_region_is_ram(section->mr) ||
>> +
On 07/25/2012 01:58 PM, Avi Kivity wrote:
>> while (len > 0) {
>> page = addr & TARGET_PAGE_MASK;
>> l = (page + TARGET_PAGE_SIZE) - addr;
>> if (l > len)
>> l = len;
>> +
>> +qemu_rwlock_rdlock_devtree();
>> section = phys_page_find(pag
On 07/25/2012 06:31 AM, Liu Ping Fan wrote:
> From: Liu Ping Fan
>
> acquire device's refcnt with qemu_device_tree_mutex rwlock, so we
> can safely handle it when mmio dispatch.
>
> If in radix-tree, leaf is subpage, then move further step to acquire
> opaque which is the type --DeiveState.
>
>
Il 25/07/2012 10:12, liu ping fan ha scritto:
>>> >> +qemu_rwlock_rdlock_devtree();
>>> >> section = phys_page_find(page >> TARGET_PAGE_BITS);
>>> >> +if (!(memory_region_is_ram(section->mr) ||
>>> >> +memory_region_is_romd(section->mr)) && !is_write) {
>>> >> +
On Wed, Jul 25, 2012 at 3:43 PM, Stefan Hajnoczi wrote:
> On Wed, Jul 25, 2012 at 4:31 AM, Liu Ping Fan wrote:
>> @@ -3396,13 +3420,25 @@ void cpu_physical_memory_rw(target_phys_addr_t addr,
>> uint8_t *buf,
>> uint32_t val;
>> target_phys_addr_t page;
>> MemoryRegionSection *sect
On Wed, Jul 25, 2012 at 4:31 AM, Liu Ping Fan wrote:
> @@ -3396,13 +3420,25 @@ void cpu_physical_memory_rw(target_phys_addr_t addr,
> uint8_t *buf,
> uint32_t val;
> target_phys_addr_t page;
> MemoryRegionSection *section;
> +Object *bk;
>
> while (len > 0) {
> pa
From: Liu Ping Fan
acquire device's refcnt with qemu_device_tree_mutex rwlock, so we
can safely handle it when mmio dispatch.
If in radix-tree, leaf is subpage, then move further step to acquire
opaque which is the type --DeiveState.
Signed-off-by: Liu Ping Fan
---
exec.c | 38 +++