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 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2DE18C433DB for ; Thu, 18 Mar 2021 11:06:31 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 7C124601FD for ; Thu, 18 Mar 2021 11:06:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7C124601FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:40440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMqU1-0003q5-A6 for qemu-devel@archiver.kernel.org; Thu, 18 Mar 2021 07:06:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMqS5-0002tm-Oo for qemu-devel@nongnu.org; Thu, 18 Mar 2021 07:04:31 -0400 Received: from mail-qt1-x82a.google.com ([2607:f8b0:4864:20::82a]:45877) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lMqS2-0008Jg-AL for qemu-devel@nongnu.org; Thu, 18 Mar 2021 07:04:29 -0400 Received: by mail-qt1-x82a.google.com with SMTP id u7so3677184qtq.12 for ; Thu, 18 Mar 2021 04:04:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9bSSX8NczwPFTWjnpK+B3GTyYilsaY1d1Sii6iLs9qI=; b=j/UnQNrj4u6UA+5E6LO+g3CYrx1dgHCsO85qqGeemeC+/STesSCrYKcTfDe2HJcNHq OAQSbWa3G5zes9qSsRiwttVmJsQO+kBXLBMoOcXa32wn069gSdbRmkJK4+OVBtSe7N7R 0R1v33fLrI7NdlUDOxvUrDXNZh0SI2wz2s3X2tSUEdkV54f/S19k8nG5FUoAXaQibIin HDmXhUD8v0s4zwWOzJ5sQ8GQwBQL9MDtps6WyXAbF6l+kpGASMXWcLM74s/a/UXgclte LxvcVes2nB3DEYn1BosT2pfhNVbj2UrHmVPYPFyAdC9kD2N6udtYIkDYTTHHRbAdlKfV FVyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9bSSX8NczwPFTWjnpK+B3GTyYilsaY1d1Sii6iLs9qI=; b=V3cI83frkq9r/V3WnqUa372Vor7cgXRmFI7IF2X5matIlLeQ9IJIJw9EJadMAhokA3 Eh80ZpFR9TKjTiERWU2uybgMkZ84pYo3+XU6fn5qYRhRQ5jVTA+L+lyy9xKaDVjwGF9W dj+286HrKOEzCLnkwBTHk07v+KzCj31bHtjcfjfC5+1HT1CkO2WVPs67YTlKnBLY4hmQ ZSdzSYdWsI42AJeGn1mXuEIvi4EN6QBSR51938o9xM/1fPUdAzIy98eg4AXjXm3Bq6M/ gtGo4MlU/tFXUrS200fqbylzqHjJuX+AveNR+wScd03gTxmKGUx0AXKFpetAvIKaAUNX /d+w== X-Gm-Message-State: AOAM533i6yMgHtI/jmriRIjNpfi5pYeos54h1Cy/3326xKOJtQpfqm4Y 75icXFXMyylJl7wmbfLiztP6PzsU1pIiLCrc/sY= X-Google-Smtp-Source: ABdhPJyBPJ8cqy5LdY55BNIj/mAq397CBn/AO6YltlK7JO+4ObVrtqibS2IkZmtbtWtVUmdQb9sSjX7guSxSKpph1HE= X-Received: by 2002:ac8:734c:: with SMTP id q12mr3215564qtp.160.1616065461502; Thu, 18 Mar 2021 04:04:21 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Michael Rolnik Date: Thu, 18 Mar 2021 13:03:45 +0200 Message-ID: Subject: Re: of AVR target page size To: "Dr. David Alan Gilbert" Content-Type: multipart/alternative; boundary="000000000000c4482605bdcd8f9e" Received-SPF: pass client-ip=2607:f8b0:4864:20::82a; envelope-from=mrolnik@gmail.com; helo=mail-qt1-x82a.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Richard Henderson , =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= , QEMU Developers Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --000000000000c4482605bdcd8f9e Content-Type: text/plain; charset="UTF-8" how do I test my fix? Is there a procedure? Thanks, Michael Rolnik On Thu, Mar 18, 2021 at 12:45 PM Dr. David Alan Gilbert wrote: > * Peter Maydell (peter.maydell@linaro.org) wrote: > > On Thu, 18 Mar 2021 at 10:25, Dr. David Alan Gilbert > > wrote: > > > Oh yes, just: > > > > > > diff --git a/migration/ram.c b/migration/ram.c > > > index 52537f14ac..a7269955b5 100644 > > > --- a/migration/ram.c > > > +++ b/migration/ram.c > > > @@ -81,6 +81,8 @@ > > > /* 0x80 is reserved in migration.h start with 0x100 next */ > > > #define RAM_SAVE_FLAG_COMPRESS_PAGE 0x100 > > > > > > +#define RAM_SAVE_FLAG__MAX RAM_SAVE_FLAG_COMPRESS_PAGE > > > + > > > static inline bool is_zero_range(uint8_t *p, uint64_t size) > > > { > > > return buffer_is_zero(p, size); > > > @@ -4090,5 +4092,6 @@ static SaveVMHandlers savevm_ram_handlers = { > > > void ram_mig_init(void) > > > { > > > qemu_mutex_init(&XBZRLE.lock); > > > + QEMU_BUILD_BUG_ON(RAM_SAVE_FLAG__MAX >= (1 << > TARGET_PAGE_BITS_MIN)); > > > register_savevm_live("ram", 0, 4, &savevm_ram_handlers, > &ram_state); > > > } > > > > > > > > > works; lets keep that in mind somewhere after Michael fixes AVR. > > > > You don't have a great deal of headroom even after getting AVR > > to change, by the way -- TARGET_PAGE_BITS_MIN for Arm is 10. > > So you might want to think about ways to eg reclaim usage of > > that "obsolete, not used" RAM_SAVE_FLAG_FULL bit. > > Yep, I've been warning anyone who adds one for ages > > > Also, what does the > > /* 0x80 is reserved in migration.h start with 0x100 next */ > > comment refer to? migration.h has no instances of "RAM_SAVE" > > or 0x80 or 1 << 7... > > It looks like it got moved to qemu-file.h a few years ago > as RAM_SAVE_FLAG_HOOK. > > Dave > > > thanks > > -- PMM > > > -- > Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK > > -- Best Regards, Michael Rolnik --000000000000c4482605bdcd8f9e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
how do I test my fix? Is there a procedure?

=
Thanks,
Michael Rolnik

On Thu, Mar 18, 2021 at 12:45 PM= Dr. David Alan Gilbert <dgilbert= @redhat.com> wrote:
* Peter Maydell (peter.maydell@linaro.org) wrote:
> On Thu, 18 Mar 2021 at 10:25, Dr. David Alan Gilbert
> <dgilbert@= redhat.com> wrote:
> > Oh yes, just:
> >
> > diff --git a/migration/ram.c b/migration/ram.c
> > index 52537f14ac..a7269955b5 100644
> > --- a/migration/ram.c
> > +++ b/migration/ram.c
> > @@ -81,6 +81,8 @@
> >=C2=A0 /* 0x80 is reserved in migration.h start with 0x100 next */=
> >=C2=A0 #define RAM_SAVE_FLAG_COMPRESS_PAGE=C2=A0 =C2=A0 0x100
> >
> > +#define RAM_SAVE_FLAG__MAX RAM_SAVE_FLAG_COMPRESS_PAGE
> > +
> >=C2=A0 static inline bool is_zero_range(uint8_t *p, uint64_t size)=
> >=C2=A0 {
> >=C2=A0 =C2=A0 =C2=A0 return buffer_is_zero(p, size);
> > @@ -4090,5 +4092,6 @@ static SaveVMHandlers savevm_ram_handlers = =3D {
> >=C2=A0 void ram_mig_init(void)
> >=C2=A0 {
> >=C2=A0 =C2=A0 =C2=A0 qemu_mutex_init(&XBZRLE.lock);
> > +=C2=A0 =C2=A0 QEMU_BUILD_BUG_ON(RAM_SAVE_FLAG__MAX >=3D (1 &l= t;< TARGET_PAGE_BITS_MIN));
> >=C2=A0 =C2=A0 =C2=A0 register_savevm_live("ram", 0, 4, &= amp;savevm_ram_handlers, &ram_state);
> >=C2=A0 }
> >
> >
> > works; lets keep that in mind somewhere after Michael fixes AVR.<= br> >
> You don't have a great deal of headroom even after getting AVR
> to change, by the way -- TARGET_PAGE_BITS_MIN for Arm is 10.
> So you might want to think about ways to eg reclaim usage of
> that "obsolete, not used" RAM_SAVE_FLAG_FULL bit.

Yep, I've been warning anyone who adds one for ages

> Also, what does the
>=C2=A0 /* 0x80 is reserved in migration.h start with 0x100 next */
> comment refer to? migration.h has no instances of "RAM_SAVE"=
> or 0x80 or 1 << 7...

It looks like it got moved to qemu-file.h a few years ago
as RAM_SAVE_FLAG_HOOK.

Dave

> thanks
> -- PMM
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK



--
Best Regards,
Michael Rolnik
--000000000000c4482605bdcd8f9e--