From patchwork Tue Jul 16 13:24:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 259416 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BB6492C010F for ; Tue, 16 Jul 2013 23:25:23 +1000 (EST) Received: from localhost ([::1]:52034 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uz5Fn-0001kG-Vu for incoming@patchwork.ozlabs.org; Tue, 16 Jul 2013 09:25:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uz5FQ-0001jo-TT for qemu-devel@nongnu.org; Tue, 16 Jul 2013 09:25:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uz5FP-0007sB-3i for qemu-devel@nongnu.org; Tue, 16 Jul 2013 09:24:56 -0400 Received: from mail-pb0-f48.google.com ([209.85.160.48]:47323) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uz5FO-0007rt-T8 for qemu-devel@nongnu.org; Tue, 16 Jul 2013 09:24:55 -0400 Received: by mail-pb0-f48.google.com with SMTP id ma3so692226pbc.7 for ; Tue, 16 Jul 2013 06:24:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=4QO5aRAcBjCf0+Kr0SF2ofT+xoDhV5f/fj7YzmNqH+g=; b=LCPxnOtAQooEQM8ecxlPlnHirM++9kcpQTo19cpdpvcqPj2fSuKT4gTwN4ffHEtx9a 8qdkWspJavZH91jFyBFtxx2l7huCJdp6nanlosE5gU09MriI9KejmCe5OoJu2vyBBomb urvn5LBVWniFPV/OrfbO63WxOYmu9LEA9BblC4ZEDtadU3/VbVLeiPF4t++UQKj0otoM l2RvhGPEB106bttvPuAv6EtRa6//ZvVxPBC9bc2P0MfCSOwc+WlYncXVIjHbZdHYDsAd rY4uR66Ks0D9BxvovKVZuac8UzWAoPKm1pCar2IIcLne9dXZ+QT/4N0uZjQYDLr9yMQl 51lw== X-Received: by 10.66.222.138 with SMTP id qm10mr2674451pac.101.1373981093295; Tue, 16 Jul 2013 06:24:53 -0700 (PDT) Received: from aik.ozlabs.ibm.com (60-242-102-4.tpgi.com.au. [60.242.102.4]) by mx.google.com with ESMTPSA id cx3sm1977535pbb.30.2013.07.16.06.24.46 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 16 Jul 2013 06:24:49 -0700 (PDT) Message-ID: <51E5499B.70708@ozlabs.ru> Date: Tue, 16 Jul 2013 23:24:43 +1000 From: Alexey Kardashevskiy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 MIME-Version: 1.0 To: Anthony Liguori References: <1373901083-18730-1-git-send-email-aliguori@us.ibm.com> <51E51C08.20202@ozlabs.ru> <8738reelbt.fsf@codemonkey.ws> <51E53DFA.6090506@ozlabs.ru> <51E54119.903@ozlabs.ru> In-Reply-To: <51E54119.903@ozlabs.ru> X-Gm-Message-State: ALoCoQnZL/cCOZxY22iUJWPa+ZUt2NiOyIkiOLdcy1giOXRW9SpVFx8N7sREZ/ATBTpipyUlwxM4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.160.48 Cc: Paolo Bonzini , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson Subject: Re: [Qemu-devel] [PATCH 00/11] pseries: migration and QOM support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On 07/16/2013 10:48 PM, Alexey Kardashevskiy wrote: > On 07/16/2013 10:35 PM, Alexey Kardashevskiy wrote: >> On 07/16/2013 10:33 PM, Anthony Liguori wrote: >>> Alexey Kardashevskiy writes: >>> >>>> On 07/16/2013 01:11 AM, Anthony Liguori wrote: >>>>> This series is based on Alexey's series: >>>>> >>>>> spapr: migration, pci, msi, power8 >>>>> >>>>> Which in turn was based on work by David Gibson. >>>>> >>>>> I've removed the bits not related to migration and made the >>>>> following changes: >>>>> >>>>> 1) QOMify TCE tables and XICS >>>>> >>>>> 2) Do everything in terms of VMStateDescriptions >>>>> >>>>> 3) Fix endianness problem with TCE table translation >>>>> a) Drop the VMSTATE_DIVIDE thing in the process >>>>> >>>>> I've tested this with a TCG pseries guest on an x86_64 host. >>>> >>>> >>>> It did not compile (fixed, patch is posted) and it fails to migrate with >>>> enabled KVM. >>> >>> With in-kernel XICS? That's not in this series.. >> >> No, as is, without any of my patches. I suspect rather HPTE than XICS though. > > I was wrong. vmstate_spapr_tce_table is broken :) Here it is: Honestly, I liked David's approach more when we did not need any extra parameter to sync :( diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c index 709cc34..3d4a1fc 100644 --- a/hw/ppc/spapr_iommu.c +++ b/hw/ppc/spapr_iommu.c @@ -148,6 +148,7 @@ static int spapr_tce_table_realize(DeviceState *dev) * sizeof(uint64_t); tcet->table = g_malloc0(table_size); } + tcet->nb_table = tcet->window_size >> SPAPR_TCE_PAGE_SHIFT; #ifdef DEBUG_TCE fprintf(stderr, "spapr_iommu: New TCE table @ %p, liobn=0x%x, "