From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 80D51C636CD for ; Fri, 10 Feb 2023 15:16:49 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQV7z-0006oK-RL; Fri, 10 Feb 2023 10:15:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQV7v-0006ng-Gq for qemu-devel@nongnu.org; Fri, 10 Feb 2023 10:15:52 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQV7t-0001Pm-Vk for qemu-devel@nongnu.org; Fri, 10 Feb 2023 10:15:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676042149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CxLxIR8L4AKiXD2Oy5ixxZ4GEws06ZFqD81tVBGpVUI=; b=anjbBnms4i2lOjJ0z2uucMOytAB/RtezVnZrJE0bvQBvm2AYe+1KNMLW1Hdd6t/xtJ+KEk JTbOivFh+OyN/E79FBqtsE8vDw25nzHZKku4Ll4pml6pU4MWGvLumXvtueVcMdKhDSJtge D7QWE3Ay648RiBrqUsPYSUr08zbLWmE= Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-218-_4No3mmZM0KSq2vYM_knxA-1; Fri, 10 Feb 2023 10:15:46 -0500 X-MC-Unique: _4No3mmZM0KSq2vYM_knxA-1 Received: by mail-pg1-f197.google.com with SMTP id 201-20020a6300d2000000b004ccf545f44fso2694578pga.12 for ; Fri, 10 Feb 2023 07:15:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1676042145; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CxLxIR8L4AKiXD2Oy5ixxZ4GEws06ZFqD81tVBGpVUI=; b=hQ4NNmGNd69OLerYIz4v8SB7FwlHm2vM+KDwDZQqqu+xv5SaJ/Xrz/ey3svT4Knq6Y cG5O6F901eZLY4555/jEdPOo1F5KAWnQttPUCceCevNUa+L+6I2kM4rLtSOw0BowaBsm S0piInCtE+CstewPc7fq+Lpe60xuI8RTF78w32TcxNnesgEYHbkYx+leFPHZLPdqWZNZ Hc9HBOvtHejNxphgGmnst9TBHiPjeJxjSUIxWIdvSdMCUDi8tc1wp4BJSiWCAvgJ+o7v t0wT936/ljHBWEtGqtTGkH9leBqBLcFCf2lBuCd0mxIGQ3l4GkQ0YkbDujsjcH9HqoqD iKJw== X-Gm-Message-State: AO0yUKUteYWhT81R83but2Dvjw9jEynZM4urnVbNnZYyF6bK6DStFUcU +O8SZtoQqFaiNYRshRalXS7A8R3aWGYav+mqKq5wA/rRKIp8RqP/GYqQHvzcUu1DvvNmw37jxwD hQwAQIc1HI5zjS8Wgwd5IdJSJoM486Kk= X-Received: by 2002:aa7:9618:0:b0:592:e66f:6c77 with SMTP id q24-20020aa79618000000b00592e66f6c77mr3257471pfg.34.1676042145630; Fri, 10 Feb 2023 07:15:45 -0800 (PST) X-Google-Smtp-Source: AK7set/I6DZnnBJ8JA99aPPmvM6mgY5K32gNcz3a8pmaRQm6yTp3w0GhDKd7pLfmnTJKQizDvk+SSwHLfZBu4bsQDgU= X-Received: by 2002:aa7:9618:0:b0:592:e66f:6c77 with SMTP id q24-20020aa79618000000b00592e66f6c77mr3257461pfg.34.1676042145235; Fri, 10 Feb 2023 07:15:45 -0800 (PST) MIME-Version: 1.0 References: <20230207005650.1810-1-quintela@redhat.com> <20230207005650.1810-2-quintela@redhat.com> <0dd85902-0071-a915-2655-8aff8d0074d1@msgid.tls.msk.ru> <87ilg9iutl.fsf@secure.mitica> In-Reply-To: From: Juan Quintela Date: Fri, 10 Feb 2023 16:15:33 +0100 Message-ID: Subject: Re: [PULL 01/30] migration: Fix migration crash when target psize larger than host To: Peter Xu Cc: Michael Tokarev , "open list:All patches CC here" , qemu-stable@nongnu.org Content-Type: multipart/alternative; boundary="000000000000b219d705f459f8c7" Received-SPF: pass client-ip=170.10.133.124; envelope-from=quintela@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org --000000000000b219d705f459f8c7 Content-Type: text/plain; charset="UTF-8" On Fri, Feb 10, 2023, 16:01 Peter Xu wrote: > On Fri, Feb 10, 2023 at 01:11:34PM +0100, Juan Quintela wrote: > > Michael Tokarev wrote: > > > 07.02.2023 03:56, Juan Quintela wrote: > > >> From: Peter Xu > > >> Commit d9e474ea56 overlooked the case where the target psize is even > > >> larger > > >> than the host psize. One example is Alpha has 8K page size and > migration > > >> will start to crash the source QEMU when running Alpha migration on > x86. > > >> Fix it by detecting that case and set host start/end just to cover > > >> the > > >> single page to be migrated. > > > > > > FWIW, commit in question, which is d9e474ea56, has been applied after > the > > > last released version to date, which is 7.2.0. So I guess this change > is > > > not applicable to -stable. > > > > I think it should. > > > > This is a bug that can happen when your host page is smaller than the > > guest size. > > > > And has been that way for a long time. > > Once told that, people don't migrate alpha guests a lot, but it can also > > happens with funny combinations of large pages. > > > > Peter Xu knows more about this. > > Thanks, Juan. > > I think Michael was correct that d9e474ea56 is only merged after our most > recent release (which is v7.2.0). So it doesn't need to have stable copied > (aka, it doesn't need to be applied to any QEMU's stable tree). > > Juan, could you help drop the "cc: stable" line if the pull is going to > have a new version? > Sure. I hope the problem is somewhere else. > > Side note: I think in the case where we have wrongly have the cc:stable it > shouldn't hurt either, because when the stable tree tries to pick it up > it'll find it doesn't apply at all, then a downstream-only patch will be > needed, then we'll also figure all things out, just later. > > Thanks, > > -- > Peter Xu > > --000000000000b219d705f459f8c7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Fri, Feb 10, 2023, 16:01 Peter Xu <peterx@redhat.com> wrote:
On Fri, Feb 10, 2023 at 01:11:34PM +0100, Juan Quinte= la wrote:
> Michael Tokarev <mjt@tls.msk.ru> wrote:
> > 07.02.2023 03:56, Juan Quintela wrote:
> >> From: Peter Xu <peterx@redhat.com>
> >> Commit d9e474ea56 overlooked the case where the target psize = is even
> >> larger
> >> than the host psize.=C2=A0 One example is Alpha has 8K page s= ize and migration
> >> will start to crash the source QEMU when running Alpha migrat= ion on x86.
> >> Fix it by detecting that case and set host start/end just to = cover
> >> the
> >> single page to be migrated.
> >
> > FWIW, commit in question, which is d9e474ea56, has been applied a= fter the
> > last released version to date, which is 7.2.0.=C2=A0 So I guess t= his change is
> > not applicable to -stable.
>
> I think it should.
>
> This is a bug that can happen when your host page is smaller than the<= br> > guest size.
>
> And has been that way for a long time.
> Once told that, people don't migrate alpha guests a lot, but it ca= n also
> happens with funny combinations of large pages.
>
> Peter Xu knows more about this.

Thanks, Juan.

I think Michael was correct that d9e474ea56 is only merged after our most recent release (which is v7.2.0).=C2=A0 So it doesn't need to have stab= le copied
(aka, it doesn't need to be applied to any QEMU's stable tree).

Juan, could you help drop the "cc: stable" line if the pull is go= ing to
have a new version?


Sure.

I hope the problem is somewhere else.

Side note: I think in the case where we have wrongly have the cc:stable it<= br> shouldn't hurt either, because when the stable tree tries to pick it up=
it'll find it doesn't apply at all, then a downstream-only patch wi= ll be
needed, then we'll also figure all things out, just later.

Thanks,

--
Peter Xu

--000000000000b219d705f459f8c7--