From: David Gibson <david@gibson.dropbear.id.au>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: Stefan Berger <stefanb@linux.vnet.ibm.com>,
"open list:sPAPR pseries" <qemu-ppc@nongnu.org>,
QEMU <qemu-devel@nongnu.org>,
Stefan Berger <stefanb@linux.ibm.com>
Subject: Re: [PATCH v8 4/6] tpm_spapr: Support suspend and resume
Date: Tue, 21 Jan 2020 15:02:13 +1100 [thread overview]
Message-ID: <20200121040213.GD265522@umbus.fritz.box> (raw)
In-Reply-To: <CAJ+F1CKbiNZvzdexR6+=0bNTLT4bO0xEsvotRJYoDJ4h+rUYQA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2013 bytes --]
On Fri, Jan 17, 2020 at 05:46:21PM +0400, Marc-André Lureau wrote:
> On Fri, Jan 17, 2020 at 5:41 PM Stefan Berger <stefanb@linux.ibm.com> wrote:
> >
> > On 1/17/20 8:31 AM, Marc-André Lureau wrote:
> > > Hi
> > >
> > > On Wed, Jan 8, 2020 at 8:14 PM Stefan Berger <stefanb@linux.ibm.com> wrote:
> > >> From: Stefan Berger <stefanb@linux.vnet.ibm.com>
> > >>
> > >> Extend the tpm_spapr frontend with VM suspend and resume support.
> > >>
> > >> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
> > >> ---
> > >> hw/tpm/tpm_spapr.c | 67 ++++++++++++++++++++++++++++++++++++++++++++-
> > >> hw/tpm/trace-events | 2 ++
> > >> 2 files changed, 68 insertions(+), 1 deletion(-)
> > >>
> > >> diff --git a/hw/tpm/tpm_spapr.c b/hw/tpm/tpm_spapr.c
> > >> index ab184fbb82..cf5c7851e7 100644
> > >> --- a/hw/tpm/tpm_spapr.c
> > >> +++ b/hw/tpm/tpm_spapr.c
> > >> @@ -76,6 +76,9 @@ typedef struct {
> > >>
> > >> unsigned char buffer[TPM_SPAPR_BUFFER_MAX];
> > >>
> > >> + uint32_t numbytes; /* number of bytes in suspend_buffer */
> > >> + unsigned char *suspend_buffer;
> > > Why do you need a copy suspend_buffer? Why not use and save buffer[] directly?
> >
> >
> > This addresses David's comment:
> >
> > "Transferring the whole 4kiB buffer unconditionally when it mostly
> > won't have anything useful in it doesn't seem like a great idea."
> >
> > https://lists.nongnu.org/archive/html/qemu-devel/2019-12/msg02601.html
>
> Oh ok.. (well really I don't think 4k (usually compressed) will really
> matter much in multi-gigabytes streams ;)
Probably not - though it is in the downtime portion of the stream.
But more to the point you can still make the size / whether you send
conditional on numbytes without having a whole separate buffer for it.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-01-21 4:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-08 16:10 [PATCH v8 0/6] Add vTPM emulator support for ppc64 platform Stefan Berger
2020-01-08 16:10 ` [PATCH v8 1/6] tpm: Move tpm_tis_show_buffer to tpm_util.c Stefan Berger
2020-01-08 16:10 ` [PATCH v8 2/6] spapr: Implement get_dt_compatible() callback Stefan Berger
2020-01-17 12:59 ` Marc-André Lureau
2020-01-21 4:02 ` David Gibson
2020-01-08 16:10 ` [PATCH v8 3/6] tpm_spapr: Support TPM for ppc64 using CRQ based interface Stefan Berger
2020-01-08 16:10 ` [PATCH v8 4/6] tpm_spapr: Support suspend and resume Stefan Berger
2020-01-17 13:31 ` Marc-André Lureau
2020-01-17 13:40 ` Stefan Berger
2020-01-17 13:46 ` Marc-André Lureau
2020-01-21 4:02 ` David Gibson [this message]
2020-01-08 16:10 ` [PATCH v8 5/6] hw/ppc/Kconfig: Enable TPM_SPAPR as part of PSERIES config Stefan Berger
2020-01-17 13:33 ` Marc-André Lureau
2020-01-21 4:02 ` David Gibson
2020-01-08 16:10 ` [PATCH v8 6/6] docs/specs/tpm: reST-ify TPM documentation Stefan Berger
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=20200121040213.GD265522@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=marcandre.lureau@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=stefanb@linux.ibm.com \
--cc=stefanb@linux.vnet.ibm.com \
/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).