Am 12.05.2014 08:09, schrieb Paolo Bonzini:
> Il 10/05/2014 18:32, Peter Lieven ha scritto:
>> What about XEN?
>>
>
> You're right, Xen wouldn't work. Your original patch would not break it just
> because Xen doesn't use migration (but the code would be broken).
>
> You would have to cache qemu_g
Il 10/05/2014 18:32, Peter Lieven ha scritto:
What about XEN?
You're right, Xen wouldn't work. Your original patch would not break it
just because Xen doesn't use migration (but the code would be broken).
You would have to cache qemu_get_ram_block rather than qemu_get_ram_ptr,
move RAMBlo
or even this:
diff --git a/include/exec/memory.h b/include/exec/memory.h
index 1d55ad9..3003875 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -161,6 +161,7 @@ struct MemoryRegion {
unsigned ioeventfd_nb;
MemoryRegionIoeventfd *ioeventfds;
NotifierList iommu_notif
Am 10.05.2014 17:33, schrieb Paolo Bonzini:
> Il 10/05/2014 12:51, Peter Lieven ha scritto:
>> we currently look up the ram ptr for each single page. Cache
>> the pointer while we operate on the same block.
>
> Why don't you instead cache the result in the MemoryRegion, so that
> memory_region_get
You mean,
a) extent the MemoryRegion stuct with a pointer?
b) on the first call to memory_region_get_ram_ptr cache the result in the
struct?
Peter
Am 10.05.2014 17:33, schrieb Paolo Bonzini:
> Il 10/05/2014 12:51, Peter Lieven ha scritto:
>> we currently look up the ram ptr for each single pag
Il 10/05/2014 12:51, Peter Lieven ha scritto:
we currently look up the ram ptr for each single page. Cache
the pointer while we operate on the same block.
Why don't you instead cache the result in the MemoryRegion, so that
memory_region_get_ram_ptr becomes a simple, inline field access?
Paol
Am 10.05.2014 13:38, schrieb 陈梁:
> Hi,
> The patch is correct. There is a small improved point.
>> /* In doubt sent page as normal */
>> bytes_sent = -1;
>> @@ -990,16 +996,17 @@ static inline void *host_from_stream_offset(QEMUFile
>> *f,
>>
Hi,
The patch is correct. There is a small improved point.
>
> /* In doubt sent page as normal */
> bytes_sent = -1;
> @@ -990,16 +996,17 @@ static inline void *host_from_stream_offset(QEMUFile *f,
> int flags)
> {
> static RA