From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Michael Rolnik <mrolnik@gmail.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: of AVR target page size
Date: Thu, 18 Mar 2021 20:03:08 +0000 [thread overview]
Message-ID: <YFOx/OcdGCLzIZHl@work-vm> (raw)
In-Reply-To: <CAK4993jx4zcuUTW--Qq-YLwqv-y3YxNZ0QU=KT0HVr09TpPLNg@mail.gmail.com>
* Michael Rolnik (mrolnik@gmail.com) wrote:
> how do I test my fix? Is there a procedure?
As long as your TARGET_PAGE_SIZE is now 512 or bigger you should be OK
as long as your AVR stuff still works. If you want you can try and do a
live migrate between two copies of qemu, but that does assume you'vre
wired up the vmstate info for all your devices.
Dave
> 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 @@
> > > > /* 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
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2021-03-18 20:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-17 20:14 of AVR target page size Dr. David Alan Gilbert
2021-03-17 21:32 ` Michael Rolnik
2021-03-18 9:55 ` Dr. David Alan Gilbert
2021-03-18 10:15 ` Michael Rolnik
2021-03-18 10:21 ` Dr. David Alan Gilbert
2021-03-17 22:33 ` Peter Maydell
2021-03-18 7:37 ` Michael Rolnik
2021-03-18 10:18 ` Dr. David Alan Gilbert
2021-03-18 10:21 ` Peter Maydell
2021-03-18 10:25 ` Dr. David Alan Gilbert
2021-03-18 10:34 ` Peter Maydell
2021-03-18 10:45 ` Dr. David Alan Gilbert
2021-03-18 11:03 ` Michael Rolnik
2021-03-18 20:03 ` Dr. David Alan Gilbert [this message]
2021-03-18 11:12 ` Peter Maydell
2021-03-18 20:05 ` Dr. David Alan Gilbert
2021-03-18 20:14 ` Peter Maydell
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=YFOx/OcdGCLzIZHl@work-vm \
--to=dgilbert@redhat.com \
--cc=mrolnik@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.