RE: [PATCH 03/04] qemu-kvm: Remove the dependency for phys_ram_base

"Zhang, Xiantao" <[email protected]>
Newsgroups org.kernel.vger.kvm-ia64,org.kernel.vger.kvm
Message-ID <706158FABBBA044BAD4FE898A02E4BC236A2BD9A@pdsmsx503.ccr.corp.intel.com>
Avi Kivity wrote:
> Jes Sorensen wrote:
>>>>>>> "Avi" = Avi Kivity <[email protected]> writes:
>>>>>>> 
>> 
>> Avi> Zhang, Xiantao wrote:
>> 
>>>>>  qemu_get_ram_ptr() returns a pointer.  Don't cast it to a
>>>>> ram_addr_t, leave it a pointer.
>>>>> 
>>>>> But why not use cpu_physical_memory_write() (or
>>>>> cpu_physical_memory_write_rom())?  It's much simpler and cleaner.
>>>>> 
>>>>> 
>>>>  Good suggestion! I just followed the original logic.  Updated the
>>>> patch. Xiantao 
>>>> 
>> 
>> Avi> Thanks, applied.
>> 
>> Hi,
>> 
>> I am not crazy about this patch. You need to use
>> cpy_physical_memory_rw() in the hob and nvram code too, not just in
>> the ipf.c code. 
>> 
>> What about the flush_icache_range() call you removed - is it safe to
>> just discard that? 
>> 
>> I was in the process of working through this myself, but I am not
>> quite finished. If you don't mind waiting a couple hours, I should
>> have something a fair bit simpler to solve the same problem.
>> 
>> Biggest issue is the flush_icache_range() one.
>> 
>> 
> 
> I haven't pushed this out yet, so I can apply a replacement patch. 

We don't need flush_icache_range here, because I believe it is called in cpu_physical_memory_write. 
Xiantao
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.