Skip to contentSkip to conversation

Merge tpm 2020/01/29 v1

GIT PULL Applied Stefan Berger 2 participants 3 messages Jan 29, 2020 – Jan 30, 2020

lore
Share & tools
lore
#0 lore raw

This patch fixes a post-copy migration error due to an unaligned start address.

Stefan

The following changes since commit 4c60e3289875ae6c516a37523bcecb87f68ce67c:

Merge remote-tracking branch 'remotes/rth/tags/pull-pa-20200127' into staging (2020-01-28 15:11:04 +0000)

are available in the Git repository at:

git://github.com/stefanberger/qemu-tpm.git tags/pull-tpm-2020-01-29-1

for you to fetch changes up to 71e415c8a75c130875f14d6b2136825789feb297:

tpm-ppi: page-align PPI RAM (2020-01-29 07:27:07 -0500)

----------------------------------------------------------------
Merge tpm 2020/01/29 v1

----------------------------------------------------------------
Marc-André Lureau (1):
tpm-ppi: page-align PPI RAM

 hw/tpm/tpm_ppi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.24.1
#1 lore raw

[PULL v1 1/1] tpm-ppi: page-align PPI RAM

From: Marc-André Lureau <[email protected]>

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.

Message-id: [email protected]

---
 hw/tpm/tpm_ppi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
hw/tpm/tpm_ppi.c +2 -1
index ff314592b4..6d9c1a3e40 100644
@@ -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));
Signature · 1 line
2.24.1
#2 lore raw
In reply to Stefan Berger
Quoted 20 lines · Stefan Berger

This patch fixes a post-copy migration error due to an unaligned start address.

Stefan

The following changes since commit 4c60e3289875ae6c516a37523bcecb87f68ce67c:

Merge remote-tracking branch 'remotes/rth/tags/pull-pa-20200127' into staging (2020-01-28 15:11:04 +0000)

are available in the Git repository at:

git://github.com/stefanberger/qemu-tpm.git tags/pull-tpm-2020-01-29-1

for you to fetch changes up to 71e415c8a75c130875f14d6b2136825789feb297:

tpm-ppi: page-align PPI RAM (2020-01-29 07:27:07 -0500)

----------------------------------------------------------------
Merge tpm 2020/01/29 v1

Quoted 6 lines

----------------------------------------------------------------
Marc-André Lureau (1):
tpm-ppi: page-align PPI RAM

 hw/tpm/tpm_ppi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.0
for any user-visible changes.

-- PMM