From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52203) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj2A8-0006RO-5W for qemu-devel@nongnu.org; Mon, 05 Oct 2015 05:34:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zj2A4-0002FV-Qe for qemu-devel@nongnu.org; Mon, 05 Oct 2015 05:34:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59933) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj2A4-0002F0-Je for qemu-devel@nongnu.org; Mon, 05 Oct 2015 05:34:24 -0400 Date: Mon, 5 Oct 2015 10:34:18 +0100 From: "Dr. David Alan Gilbert" Message-ID: <20151005093418.GB2594@work-vm> References: <1443459153-10965-1-git-send-email-dgilbert@redhat.com> <20151005043830.GA15541@in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151005043830.GA15541@in.ibm.com> Subject: Re: [Qemu-devel] [PATCH v8 00/54] Postcopy implementation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bharata B Rao Cc: aarcange@redhat.com, quintela@redhat.com, liang.z.li@intel.com, qemu-devel@nongnu.org, luis@cs.umu.se, amit.shah@redhat.com, pbonzini@redhat.com * Bharata B Rao (bharata@linux.vnet.ibm.com) wrote: > On Mon, Sep 28, 2015 at 05:51:39PM +0100, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > 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 / dgilbert@redhat.com / Manchester, UK