qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>, qemu-devel@nongnu.org
Cc: Juan Quintela <quintela@redhat.com>,
	qemu-stable@nongnu.org,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Stefan Berger <stefanb@linux.ibm.com>
Subject: Re: [PATCH 2/2] tpm-ppi: page-align PPI RAM
Date: Fri, 3 Jan 2020 06:15:41 +0100	[thread overview]
Message-ID: <709262ed-fb3d-13c3-c8c7-987ee17c2eec@redhat.com> (raw)
In-Reply-To: <20200102210149.926077-3-marcandre.lureau@redhat.com>

On 1/2/20 10:01 PM, Marc-André Lureau wrote:
> post-copy migration fails on destination with error such as:
> 2019-12-26T10:22:44.714644Z qemu-kvm: ram_block_discard_range:
> Unaligned start address: 0x559d2afae9a0
> 
> Use qemu_memalign() to constrain the PPI RAM memory alignment.
> 
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>   hw/tpm/tpm_ppi.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/tpm/tpm_ppi.c b/hw/tpm/tpm_ppi.c
> index ff314592b4..6d9c1a3e40 100644
> --- a/hw/tpm/tpm_ppi.c
> +++ b/hw/tpm/tpm_ppi.c
> @@ -43,7 +43,8 @@ void tpm_ppi_reset(TPMPPI *tpmppi)
>   void tpm_ppi_init(TPMPPI *tpmppi, struct MemoryRegion *m,
>                     hwaddr addr, Object *obj)
>   {
> -    tpmppi->buf = g_malloc0(HOST_PAGE_ALIGN(TPM_PPI_ADDR_SIZE));
> +    tpmppi->buf = qemu_memalign(qemu_real_host_page_size,
> +                                HOST_PAGE_ALIGN(TPM_PPI_ADDR_SIZE));
>       memory_region_init_ram_device_ptr(&tpmppi->ram, obj, "tpm-ppi",
>                                         TPM_PPI_ADDR_SIZE, tpmppi->buf);
>       vmstate_register_ram(&tpmppi->ram, DEVICE(obj));
> 



      reply	other threads:[~2020-01-03  5:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-02 21:01 [PATCH 0/2] tpm: fix PPI RAM migration Marc-André Lureau
2020-01-02 21:01 ` [PATCH 1/2] RFC: savevm: check RAM is page_size aligned Marc-André Lureau
2020-01-03  5:06   ` Philippe Mathieu-Daudé
2020-01-03  6:39     ` Marc-André Lureau
2020-01-02 21:01 ` [PATCH 2/2] tpm-ppi: page-align PPI RAM Marc-André Lureau
2020-01-03  5:15   ` Philippe Mathieu-Daudé [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=709262ed-fb3d-13c3-c8c7-987ee17c2eec@redhat.com \
    --to=philmd@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanb@linux.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).