qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 7/9] Convert address_space_rw to use MMUAccessTy


From: Andrey Smirnov
Subject: Re: [Qemu-devel] [PATCH 7/9] Convert address_space_rw to use MMUAccessType
Date: Tue, 12 Jul 2016 08:41:29 -0700

>>  }
>>
>>  enum write_rom_type {
>> @@ -3643,7 +3646,7 @@ int cpu_memory_rw_debug(CPUState *cpu, target_ulong 
>> addr,
>>          } else {
>>              address_space_rw(cpu->cpu_ases[asidx].as, phys_addr,
>>                               MEMTXATTRS_UNSPECIFIED,
>> -                             buf, l, 0);
>> +                             buf, l, access_type);
>
> Replacing a fixed 0 with access_type looks wrong here, but I don't
> have the context readily to hand to be sure.

In previous patch in the series the "if" part of that statement was
converted to if (access_type == MMU_DATA_STORE), so in the "else"
branch access_type is guaranteed to be MMU_DATA_LOAD (there's also a
g_assert making sure those two are only possible options). Using
"access_type" instead of actual constant here makes the following
patch in which the whole if statement is replaced with just a call to
"address_space_rw" a bit simpler (or at least so I hope).

Andrey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]