From patchwork Tue Jan 2 01:57:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 759345 Delivered-To: patch@linaro.org Received: by 2002:a5d:67c6:0:b0:336:6142:bf13 with SMTP id n6csp5857151wrw; Mon, 1 Jan 2024 18:02:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IE8nXmh2vpRjOKJvF+xPPdgoUJjZWEOwdXRBHN/B8A9ekytKVMDRjYukZuaE0syyGjd09mL X-Received: by 2002:ad4:4ea7:0:b0:67a:cf30:dc22 with SMTP id ed7-20020ad44ea7000000b0067acf30dc22mr27524119qvb.4.1704160941093; Mon, 01 Jan 2024 18:02:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704160941; cv=none; d=google.com; s=arc-20160816; b=q0EETk0u4Nxp153BWYA7lUFefhnHZndwPW0oglrOQdFj7H1ssk4o89NKoWtwfRzf8w Yyg9H3Wf2eiqvlqEeoaGiAju7htCwp5jZp9J6jA2bitsNeFvm8OTX31tG7YFvMhwqw9N IiOknGt4Wh/43uWG0khdcIiMJABal25nx/MUAV6qpLNyqzAEAobRoN7BNZgq4Sm2hcin UEHXEnrxk0mgr/A1PFin5AqzpMAQkR5HB/Zy8Zziuaa6Pp6CQSDi+5Re28VFt/ZSwje0 CMHJdUrCJPGk1UumhMGYkMIwlx0tSadwY4/cT0MccqkHGYjuyN3oB2cagsEUZir/qoSY egTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=jBDFYDN4txkYXCl4MK4JvDX5trolAszB5+TZawsyMV0=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=D8ZcFD1TQBmuS2gNOzz2uctTmHiDg0MDDgpEydcbE+M16a+nv6WArodloWr4yZsObo I7qf5NALbf5Wp4UElq3ZEkR5bRIYOkWe/yZrUbXbW3c5atcY7ZGRAXo0+30NlMWUEvWJ IZFyn8cZjs8LmR35pZ9Zr6dL9AOe9xZqyxN+X2r5T5HJtboLXuX6zE7ZKH/SptZ2rWyt CZtLydUQL5UbyCCTC8VyOtPa7klRP56EIhPofMTiq61xeW9GE0r7gNnCXEN0QjQwtN6O Sk7DgMGzEGei+ehhe98t9LymHwSBBbOL8oZ/gMB/3HFtr99793KqEIPRa/W8RH6LIy1n ff2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uDF82imL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x27-20020a0cb21b000000b006809d5461a6si7095612qvd.510.2024.01.01.18.02.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Jan 2024 18:02:21 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uDF82imL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rKU3H-0003Jo-75; Mon, 01 Jan 2024 20:58:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rKU3F-0003JY-Ls for qemu-devel@nongnu.org; Mon, 01 Jan 2024 20:58:41 -0500 Received: from mail-oi1-x22b.google.com ([2607:f8b0:4864:20::22b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rKU3E-00071D-6a for qemu-devel@nongnu.org; Mon, 01 Jan 2024 20:58:41 -0500 Received: by mail-oi1-x22b.google.com with SMTP id 5614622812f47-3bbd1f9e0b8so2631243b6e.0 for ; Mon, 01 Jan 2024 17:58:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704160718; x=1704765518; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=jBDFYDN4txkYXCl4MK4JvDX5trolAszB5+TZawsyMV0=; b=uDF82imLYBepCEfXFvcLfB9u9YqZe0xZYwaeE+0prisb2eFGZSGK69IUPIctCA7F7k /4ELreAyE8RdFdPEVwJlKXInwvMbv0+KYRv2oI93gihL+j6vkVMV2ytAYoZQi2I1m3zE T6pNU4H4H4X9W9gP7NmKd2iWLlJHzRAMraXeHHsayD5Mna6MqlbhCPFUVBcRdRnpF+oo NS7vFoN0nUffQBPOuonk+Nu1NGRxXLFhzvAKRKygAWS5t2yt922c6kXxyXblNo1kesOP KnL1F0JNEFLaK+ux5ufLD3DW6SADwUvSTtGwSzgx0GgY6Zc4ejFX6HEO6T3z2pnt3Omk Pj5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704160718; x=1704765518; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jBDFYDN4txkYXCl4MK4JvDX5trolAszB5+TZawsyMV0=; b=qnsjyXLwEDWjySbV0MzvI3iep7Y/QM88b181R12gAMWLc2JLCRB7qyninIOwBG1G0M hs2mWMHyRVXgOqFJrY33aJFFdjzPH7RxGQLTsePo4bm77vLinn3FRaOWPiwZnJrV1ZhT eP+yd+LWeKYfujK88sJ6vwjohIGzbKALYRgf90thXxV4m3tNWi2s297MzolByHnK63A4 NnTOw48qqJnZI6KcS2McLlhK0x0/dDKlwXZaRTvR14RMBrGuUuTRlhOeDoRZFWA3LCbu 8WjuefFFNmA+9Nvw75dCg1Wljid2tSwEp35GcfS8r0sPDARU729fVYIM4KneRuk2vF4E ++Zg== X-Gm-Message-State: AOJu0Yw4ohRealh++vsIw8xrX8P0BwuuNPHAa+8emU837uXtw+4kwjtB BuuYobc/EHD2Za1i277AwLFYVBqMrH9iEqimyxHCXM2G2ZU= X-Received: by 2002:a05:6808:148b:b0:3bb:cc89:3fa9 with SMTP id e11-20020a056808148b00b003bbcc893fa9mr8869508oiw.43.1704160717985; Mon, 01 Jan 2024 17:58:37 -0800 (PST) Received: from stoup.. (124-149-254-207.tpgi.com.au. [124.149.254.207]) by smtp.gmail.com with ESMTPSA id g33-20020a635221000000b0058ee60f8e4dsm19561891pgb.34.2024.01.01.17.58.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jan 2024 17:58:37 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 12/33] hw/tpm: Remove HOST_PAGE_ALIGN from tpm_ppi_init Date: Tue, 2 Jan 2024 12:57:47 +1100 Message-Id: <20240102015808.132373-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240102015808.132373-1-richard.henderson@linaro.org> References: <20240102015808.132373-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::22b; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x22b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The size of the allocation need not match the alignment. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Ilya Leoshkevich --- hw/tpm/tpm_ppi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/tpm/tpm_ppi.c b/hw/tpm/tpm_ppi.c index 7f74e26ec6..91eeafd53a 100644 --- a/hw/tpm/tpm_ppi.c +++ b/hw/tpm/tpm_ppi.c @@ -47,8 +47,7 @@ void tpm_ppi_reset(TPMPPI *tpmppi) void tpm_ppi_init(TPMPPI *tpmppi, MemoryRegion *m, hwaddr addr, Object *obj) { - tpmppi->buf = qemu_memalign(qemu_real_host_page_size(), - HOST_PAGE_ALIGN(TPM_PPI_ADDR_SIZE)); + tpmppi->buf = qemu_memalign(qemu_real_host_page_size(), 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));