From: Peter Maydell <peter.maydell@linaro.org>
To: Pratik Parvati <pratikp@vayavyalabs.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: VMState in QEMU
Date: Mon, 20 Jul 2020 14:40:55 +0100 [thread overview]
Message-ID: <CAFEAcA-Qt=_C3CriF-PVqXrvSP1G_VPR5-jGR32SkAG4b+MhaA@mail.gmail.com> (raw)
In-Reply-To: <CA+aXn+EE2s55Y9gKUpckW_skw5sgonniPuEOFTjC+i1-dcWQyw@mail.gmail.com>
On Mon, 20 Jul 2020 at 11:59, Pratik Parvati <pratikp@vayavyalabs.com> wrote:
> Is it mandatory to define the state of each device? Like, for example, I am referring hw/arm/versatilepb.c; I see the VMState is defined for sic (secondary interrupt controller) Whereas VMState is not defined for PL011 UART device.
The PL011 does have VMState: it is in hw/char/pl011.c,
struct "vmstate_pl011". Generally the vmstate struct for
each device is in the source file where that device
is implemented. The SIC device is implemented in
the same versatilepb.c source file that the board model
is implemented in because it happens to be a simple
device used only by that one board, and so the SIC device's
vmstate is also in that source file. (The other reason
that the SIC device is in the versatile board's source
file is because it's quite old code -- these days we'd probably
put it in its own source file in hw/intc, but the coding style
back when that file was written over a decade ago was
different and devices often got put in the same
source file as the board model.)
thanks
-- PMM
prev parent reply other threads:[~2020-07-20 13:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-20 10:58 VMState in QEMU Pratik Parvati
2020-07-20 12:04 ` Philippe Mathieu-Daudé
2020-07-20 13:40 ` Peter Maydell [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='CAFEAcA-Qt=_C3CriF-PVqXrvSP1G_VPR5-jGR32SkAG4b+MhaA@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=pratikp@vayavyalabs.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).