From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8E9BC2D0C2 for ; Fri, 3 Jan 2020 16:39:56 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8C9C3206DB for ; Fri, 3 Jan 2020 16:39:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8C9C3206DB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:54254 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1inPzP-0006Re-Id for qemu-devel@archiver.kernel.org; Fri, 03 Jan 2020 11:39:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55072) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1inPxw-0004rD-HI for qemu-devel@nongnu.org; Fri, 03 Jan 2020 11:38:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1inPxv-0003H9-GK for qemu-devel@nongnu.org; Fri, 03 Jan 2020 11:38:24 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:51364 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1inPxt-00032Q-6M; Fri, 03 Jan 2020 11:38:21 -0500 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 003GWNck153344; Fri, 3 Jan 2020 11:38:20 -0500 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 2x9dr6cks8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Jan 2020 11:38:20 -0500 Received: from m0098420.ppops.net (m0098420.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 003GWPjB153494; Fri, 3 Jan 2020 11:38:20 -0500 Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0b-001b2d01.pphosted.com with ESMTP id 2x9dr6ckrr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Jan 2020 11:38:20 -0500 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 003Ga1O4016005; Fri, 3 Jan 2020 16:38:19 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma05wdc.us.ibm.com with ESMTP id 2x5xp6j8yq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Jan 2020 16:38:19 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 003GcI0v46268900 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 3 Jan 2020 16:38:18 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D0D09AE05F; Fri, 3 Jan 2020 16:38:18 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 76E15AE05C; Fri, 3 Jan 2020 16:38:18 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 3 Jan 2020 16:38:18 +0000 (GMT) Subject: Re: [PATCH v2 2/3] tpm-ppi: page-align PPI RAM To: "Dr. David Alan Gilbert" , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= References: <20200103074000.1006389-1-marcandre.lureau@redhat.com> <20200103074000.1006389-3-marcandre.lureau@redhat.com> <20200103100233.GA3804@work-vm> From: Stefan Berger Message-ID: Date: Fri, 3 Jan 2020 11:38:18 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <20200103100233.GA3804@work-vm> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2020-01-03_05:2020-01-02,2020-01-03 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxlogscore=999 adultscore=0 mlxscore=0 malwarescore=0 suspectscore=0 spamscore=0 bulkscore=0 phishscore=0 priorityscore=1501 clxscore=1011 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-2001030152 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx0b-001b2d01.pphosted.com id 003GWNck153344 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , qemu-stable@nongnu.org, Richard Henderson , qemu-devel@nongnu.org, Juan Quintela Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 1/3/20 5:02 AM, Dr. David Alan Gilbert wrote: > * Marc-Andr=C3=A9 Lureau (marcandre.lureau@redhat.com) 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 > Ah good, we got a sane error message! > >> Use qemu_memalign() to constrain the PPI RAM memory alignment. >> >> Cc: qemu-stable@nongnu.org >> Signed-off-by: Marc-Andr=C3=A9 Lureau >> Reviewed-by: Philippe Mathieu-Daud=C3=A9 >> --- >> 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 =3D g_malloc0(HOST_PAGE_ALIGN(TPM_PPI_ADDR_SIZE)); >> + tpmppi->buf =3D qemu_memalign(qemu_real_host_page_size, >> + HOST_PAGE_ALIGN(TPM_PPI_ADDR_SIZE)); > Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Stefan Berger