qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Max Filippov <jcmvbkbc@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 1/2] target/xtensa: wrap MMU and MPU state into structures
Date: Mon, 22 Jan 2024 20:45:32 +0000	[thread overview]
Message-ID: <CAFEAcA890Q7mwt4CZWRnrhOUm2_8y54PTuk31_B248p+O4PhzA@mail.gmail.com> (raw)
In-Reply-To: <CAMo8BfKWg14m9HG+3D9YiGdJ5JZsphU9AF4d6jha-DPbhr8TOw@mail.gmail.com>

On Mon, 22 Jan 2024 at 18:45, Max Filippov <jcmvbkbc@gmail.com> wrote:
>
> On Mon, Jan 22, 2024 at 10:29 AM Peter Maydell <peter.maydell@linaro.org> wrote:
> >
> > On Fri, 19 Jan 2024 at 20:47, Max Filippov <jcmvbkbc@gmail.com> wrote:
> > > +    union {
> > > +        XtensaMMU mmu;
> > > +        XtensaMPU mpu;
> > > +    };
> >
> > Is it really worth having this be a union ? I suspect it will
> > make adding migration/savevm support later more awkward.
>
> I have a draft implementation of savevm for xtensa and I did this part
> using subsections with the .needed callback checking whether the
> MMU or MPU option is enabled in the config. I wonder where the
> awkwardness is expected.

Oh, well if it works that's fine I guess. I was kind of thinking
that if you didn't have the union you could avoid having
subsections entirely.

On Arm we don't try to save space in the CPU struct by
using unions, even though some fields are A-profile
specific and some are R or M-profile specific.

-- PMM


  reply	other threads:[~2024-01-22 20:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-19 20:46 [PATCH 0/2] target/xtensa: tidy xtensa memory management Max Filippov
2024-01-19 20:46 ` [PATCH 1/2] target/xtensa: wrap MMU and MPU state into structures Max Filippov
2024-01-22 18:29   ` Peter Maydell
2024-01-22 18:45     ` Max Filippov
2024-01-22 20:45       ` Peter Maydell [this message]
2024-01-19 20:46 ` [PATCH 2/2] target/xtensa: tidy TLB way variability logic Max Filippov
2024-01-22 18:42   ` Peter Maydell
2024-01-22 19:11     ` Max Filippov

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=CAFEAcA890Q7mwt4CZWRnrhOUm2_8y54PTuk31_B248p+O4PhzA@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=jcmvbkbc@gmail.com \
    --cc=qemu-devel@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).