qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v8 00/54] Postcopy implementation


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] [PATCH v8 00/54] Postcopy implementation
Date: Mon, 5 Oct 2015 10:34:18 +0100
User-agent: Mutt/1.5.24 (2015-08-30)

* Bharata B Rao (address@hidden) wrote:
> On Mon, Sep 28, 2015 at 05:51:39PM +0100, Dr. David Alan Gilbert (git) wrote:
> > From: "Dr. David Alan Gilbert" <address@hidden>
> > 
> >   This is the 8th cut of my version of postcopy.
> > 
> > The userfaultfd linux kernel code is now in the upstream kernel
> > tree, and so 4.3-rc3 can be used without modification.
> > 
> > This qemu series can be found at:
> > https://github.com/orbitfp7/qemu.git
> > on the wp3-postcopy-v8 tag
> > 
> > 
> > Testing status:
> >   * Tested heavily on x86
> >   * Smoke tested on aarch64 (so it does work on different page sizes)
> >   * Power is unhappy for me (but gets further than the htab problem
> >     v7 used to have) (I get a kvm run failed)
> 
> As I said earlier, postcopy migration works on Power, but memory hotplug
> seems to have some problem.
> 
> qemu-system-ppc64 ... -object memory-backend-ram,id=ram0,size=2G -device 
> pc-dimm,memdev=ram0
> 
> qemu/exec.c:1278: find_ram_offset: Assertion `size != 0' failed.
> 
> Does this happen on x86 too ?

Hmm, yes it does - I hadn't tried that.
The problem is that I added a HOST_PAGE_ALIGN call during RAMBlock creation,
and -object gets parsed pretty early on, before the internal host page masks
have been setup.

The patch below passes a smoke test; I'll look to clean it up.

Thanks,

Dave

diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index a3719b7..b4c4b6e 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -81,7 +81,6 @@ void cpu_gen_init(void);
 int cpu_gen_code(CPUArchState *env, struct TranslationBlock *tb,
                  int *gen_code_size_ptr);
 bool cpu_restore_state(CPUState *cpu, uintptr_t searched_pc);
-void page_size_init(void);
 
 void QEMU_NORETURN cpu_resume_from_signal(CPUState *cpu, void *puc);
 void QEMU_NORETURN cpu_io_recompile(CPUState *cpu, uintptr_t retaddr);
diff --git a/include/qemu-common.h b/include/qemu-common.h
index 01d29dd..ae3530c 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -491,4 +491,6 @@ int parse_debug_env(const char *name, int max, int initial);
 
 const char *qemu_ether_ntoa(const MACAddr *mac);
 
+void page_size_init(void);
+
 #endif
diff --git a/kvm-all.c b/kvm-all.c
index de1924c..62b71fe 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1461,7 +1461,6 @@ static int kvm_init(MachineState *ms)
      * page size for the system though.
      */
     assert(TARGET_PAGE_SIZE <= getpagesize());
-    page_size_init();
 
     s->sigmask_len = 8;
 
diff --git a/vl.c b/vl.c
index e211f6a..818075c 100644
--- a/vl.c
+++ b/vl.c
@@ -4249,6 +4249,7 @@ int main(int argc, char **argv, char **envp)
         exit(1);
     }
 
+    page_size_init();
     socket_init();
 
     if (qemu_opts_foreach(qemu_find_opts("object"),

> 
> Regards,
> Bharata.
> 
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK



reply via email to

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