Re: [Qemu-devel] [PATCH 0/2] Make migration/ram.c target independent

2017-05-18 Thread Peter Xu
On Wed, May 17, 2017 at 06:08:02PM +0200, Juan Quintela wrote:
> Hi
> 
> Only reason that ram.c is compiled by target is because it use
> TARGET_PAGE_BITS.  As we already have a function to export
> TARGET_PAGE_SIZE, do the same.
> After this, we can make it target independent.
> 
> Please, review.
> 
> Later, Juan.
> 
> 
> 
> 
> Juan Quintela (2):
>   exec: Create include for target_page_size()
>   migration: Make savevm.c target independent
> 
>  Makefile.target|  2 +-
>  exec.c | 10 ++
>  include/exec/target_page.h | 22 ++
>  include/sysemu/sysemu.h|  1 -
>  migration/Makefile.objs|  2 +-
>  migration/migration.c  |  1 +
>  migration/postcopy-ram.c   |  1 +
>  migration/savevm.c | 15 ---
>  8 files changed, 44 insertions(+), 10 deletions(-)
>  create mode 100644 include/exec/target_page.h

Though I am not 100% sure of the relationship between TARGET_PAGE_*,
qemu_target_page_*(), and exec/poison.h, but at least we already have
qemu_target_page_size(), and this patch moves savevm.c out of
arch-dependent list, which does make sense. So:

Reviewed-by: Peter Xu 

-- 
Peter Xu



Re: [Qemu-devel] [PATCH 0/2] Make migration/ram.c target independent

2017-05-18 Thread Juan Quintela
Juan Quintela  wrote:
> Hi

Hi

And I got it wrong subject.

What got target independent is savevm.c

ram.c needs to "cleanup" first include/exec/ram_addr.h

Sorry, Juan.

>
> Only reason that ram.c is compiled by target is because it use
> TARGET_PAGE_BITS.  As we already have a function to export
> TARGET_PAGE_SIZE, do the same.
> After this, we can make it target independent.
>
> Please, review.
>
> Later, Juan.
>
>
>
>
> Juan Quintela (2):
>   exec: Create include for target_page_size()
>   migration: Make savevm.c target independent
>
>  Makefile.target|  2 +-
>  exec.c | 10 ++
>  include/exec/target_page.h | 22 ++
>  include/sysemu/sysemu.h|  1 -
>  migration/Makefile.objs|  2 +-
>  migration/migration.c  |  1 +
>  migration/postcopy-ram.c   |  1 +
>  migration/savevm.c | 15 ---
>  8 files changed, 44 insertions(+), 10 deletions(-)
>  create mode 100644 include/exec/target_page.h



[Qemu-devel] [PATCH 0/2] Make migration/ram.c target independent

2017-05-17 Thread Juan Quintela
Hi

Only reason that ram.c is compiled by target is because it use
TARGET_PAGE_BITS.  As we already have a function to export
TARGET_PAGE_SIZE, do the same.
After this, we can make it target independent.

Please, review.

Later, Juan.




Juan Quintela (2):
  exec: Create include for target_page_size()
  migration: Make savevm.c target independent

 Makefile.target|  2 +-
 exec.c | 10 ++
 include/exec/target_page.h | 22 ++
 include/sysemu/sysemu.h|  1 -
 migration/Makefile.objs|  2 +-
 migration/migration.c  |  1 +
 migration/postcopy-ram.c   |  1 +
 migration/savevm.c | 15 ---
 8 files changed, 44 insertions(+), 10 deletions(-)
 create mode 100644 include/exec/target_page.h

-- 
2.9.3