aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-01-30 13:12:39 +0000
committerPeter Maydell <peter.maydell@linaro.org>2020-01-30 13:12:39 +0000
commita09a2b5a4d85d4bf2f04b0e503d7dd7905967148 (patch)
treea01001ab4218c8127e0c9841bc44624a7d97e8ca
parentb7382e9e92cba6779dc03ba3cb19ec3572699dd5 (diff)
parent71e415c8a75c130875f14d6b2136825789feb297 (diff)
downloadqemu-a09a2b5a4d85d4bf2f04b0e503d7dd7905967148.zip
qemu-a09a2b5a4d85d4bf2f04b0e503d7dd7905967148.tar.gz
qemu-a09a2b5a4d85d4bf2f04b0e503d7dd7905967148.tar.bz2
Merge remote-tracking branch 'remotes/stefanberger/tags/pull-tpm-2020-01-29-1' into staging
Merge tpm 2020/01/29 v1 # gpg: Signature made Wed 29 Jan 2020 13:01:37 GMT # gpg: using RSA key B818B9CADF9089C2D5CEC66B75AD65802A0B4211 # gpg: Good signature from "Stefan Berger <stefanb@linux.vnet.ibm.com>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: B818 B9CA DF90 89C2 D5CE C66B 75AD 6580 2A0B 4211 * remotes/stefanberger/tags/pull-tpm-2020-01-29-1: tpm-ppi: page-align PPI RAM Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--hw/tpm/tpm_ppi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/tpm/tpm_ppi.c b/hw/tpm/tpm_ppi.c
index ff31459..6d9c1a3 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));