From: Anthony Liguori <aliguori@us.ibm.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH 00/11] pseries: migration and QOM support
Date: Tue, 16 Jul 2013 09:12:36 -0500 [thread overview]
Message-ID: <87r4eyvbjf.fsf@codemonkey.ws> (raw)
In-Reply-To: <51E5499B.70708@ozlabs.ru>
Alexey Kardashevskiy <aik@ozlabs.ru> writes:
> 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 <aik@ozlabs.ru> 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:
>
> 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;
Ah, right, pre_load isn't enough :-/ Sorry about that. Thanks for
digging in to this.
>
> #ifdef DEBUG_TCE
> fprintf(stderr, "spapr_iommu: New TCE table @ %p, liobn=0x%x, "
>
>
> Honestly, I liked David's approach more when we did not need any extra
> parameter to sync :(
I resisted the urge to refactor but I'm confident that nb_table will end
up with nicer code.
The 'tcet->window_size >> SPAPR_TCE_PAGE_SHIFT' is used all over the
place. It's not very clear without carefully thinking about it that the
table size == the number of pages in the window.
Regards,
Anthony Liguori
>
>
>
> --
> Alexey
prev parent reply other threads:[~2013-07-16 14:13 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-15 15:11 [Qemu-devel] [PATCH 00/11] pseries: migration and QOM support Anthony Liguori
2013-07-15 15:11 ` [Qemu-devel] [PATCH 01/11] target-ppc: Convert ppc cpu savevm to VMStateDescription Anthony Liguori
2013-07-15 15:11 ` [Qemu-devel] [PATCH 02/11] pseries: savevm support for VIO devices Anthony Liguori
2013-07-15 15:11 ` [Qemu-devel] [PATCH 03/11] pseries: savevm support for PAPR VIO logical lan Anthony Liguori
2013-07-15 15:11 ` [Qemu-devel] [PATCH 04/11] pseries: savevm support for PAPR VIO logical tty Anthony Liguori
2013-07-15 15:11 ` [Qemu-devel] [PATCH 05/11] spapr-tce: make sPAPRTCETable a proper device Anthony Liguori
2013-07-16 10:00 ` [Qemu-devel] [PATCH] ppc kvm: fix to compile Alexey Kardashevskiy
2013-07-16 12:32 ` Anthony Liguori
2013-07-16 23:12 ` Alexander Graf
2013-07-16 23:13 ` [Qemu-devel] [Qemu-ppc] " Alexander Graf
2013-07-16 23:26 ` Alexey Kardashevskiy
2013-07-17 7:01 ` [Qemu-devel] [PATCH 05/11] spapr-tce: make sPAPRTCETable a proper device Alexey Kardashevskiy
2013-07-17 13:05 ` Anthony Liguori
2013-07-15 15:11 ` [Qemu-devel] [PATCH 06/11] pseries: rework PAPR virtual SCSI Anthony Liguori
2013-07-15 15:11 ` [Qemu-devel] [PATCH 07/11] pseries: savevm support for " Anthony Liguori
2013-07-15 15:11 ` [Qemu-devel] [PATCH 08/11] pseries: savevm support for pseries machine Anthony Liguori
2013-07-15 15:11 ` [Qemu-devel] [PATCH 09/11] pseries: savevm support for PCI host bridge Anthony Liguori
2013-07-15 15:11 ` [Qemu-devel] [PATCH 10/11] pseries: savevm support with KVM Anthony Liguori
2013-07-15 15:11 ` [Qemu-devel] [PATCH 11/11] xics: rename types to be sane and follow coding style Anthony Liguori
2013-07-16 10:10 ` [Qemu-devel] [PATCH 00/11] pseries: migration and QOM support Alexey Kardashevskiy
2013-07-16 12:33 ` Anthony Liguori
2013-07-16 12:35 ` Alexey Kardashevskiy
2013-07-16 12:48 ` Alexey Kardashevskiy
2013-07-16 13:24 ` Alexey Kardashevskiy
2013-07-16 14:12 ` Anthony Liguori [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r4eyvbjf.fsf@codemonkey.ws \
--to=aliguori@us.ibm.com \
--cc=aik@ozlabs.ru \
--cc=david@gibson.dropbear.id.au \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).