From patchwork Fri Aug 18 17:12:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 714650 Delivered-To: patch@linaro.org Received: by 2002:a5d:484e:0:b0:317:ecd7:513f with SMTP id n14csp628510wrs; Fri, 18 Aug 2023 10:14:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFAaOlupBUdstSeS9FIBTQxFnRc0MjB5dGKbjYKVWOWVXbqsq5XV8svnom/rWa3mGPqwE/h X-Received: by 2002:a05:620a:242:b0:76d:4a15:6f53 with SMTP id q2-20020a05620a024200b0076d4a156f53mr3285437qkn.25.1692378862342; Fri, 18 Aug 2023 10:14:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692378862; cv=none; d=google.com; s=arc-20160816; b=EOLa1Dci7QKwyoAPI3VuI4FKFUczDbBy/RLkTlAUd0lT6SFyLWp4aeq93EMS3KiBfH RL3vqkw9rImmLjn5sPc0qOjiuI2pUrBerkM/eFKTI2S+43wcealHOMf8b2+iIbbj6gkZ rLsK/LgIgQs6NQWiwbfOfL8lqt0w72LXl3LEm9rpvOMuXs7xZz7wsqHBtcY4r1kcxMZq 952NhH/TdyhAC7Egi2wfQfVTxm1THvzR/7az08ITCN/c68gcqhn0EOnSfibMH8d/nwqV MYgUro5kFoE+8c28V4qFkWsYpOPtqS9Y9LqBZBHO/S4QczDGFD55dEgrtVDrcdwukRR5 tH2w== 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=oYAd+8Lj9FKlReeF9hgENQXa3P4LhBP5C4njRBbobDA=; b=l4wHtZqhXwcwYxJSKUNb3cl1/M2Uf6hUazRkOwoTb6KU4fP0vaDlwRap2azgrdopsO NXW/m55S4THjpKCMfO4sAJCYpuPz/+CZNgLEaSCOcLwU/JbdFEOG63qVZBTWgPWnazp5 DcoCRv7eF2h2KcCcDPzonlDubCWy/CI8ZluzXz3pKQGuGpSp47YvucoxXn7nZtkBWQKC zpPoqqCz8L9Ws8H1Lae2js3P0qJoWRACt3cBVlvrcDVwr8cOHEOppC9edwT4n6T0BYms 7yEyD7HncW4mo4tu9AxuOJ31OUqKC5dPjUQhIFAWt77h9Ryaif/hddNXNj6X2PJ3E4rz 9kDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Pxt1d9D+; 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 bp11-20020a05620a458b00b0076c8d5c1aeesi1413767qkb.551.2023.08.18.10.14.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Aug 2023 10:14:22 -0700 (PDT) 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=Pxt1d9D+; 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 1qX31m-0008FV-1Y; Fri, 18 Aug 2023 13:12:50 -0400 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 1qX31j-0008Er-Rj for qemu-devel@nongnu.org; Fri, 18 Aug 2023 13:12:47 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qX31h-000821-PS for qemu-devel@nongnu.org; Fri, 18 Aug 2023 13:12:47 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1bc73a2b0easo9420435ad.0 for ; Fri, 18 Aug 2023 10:12:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692378764; x=1692983564; 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=Pxt1d9D+XP0sFJvyHYNG15isOnN3taKco+vzi1yxM43rFgGnHIosqnwtOR+EcrzM1m ZxrJ4+LEbtN/H7B1Ih4SoLJXwyK3TtA8AD+M0JkqvGZZNfLE2ycs7uUMKgkygN1kDk1b xR7BIA6BEfIxZBXae6edvUDWQZEKOqk2XsrYWXJPkL+5ObdblBWLF0YsJJLTEopCo8Fn 9d4C7WxHMu6pKjUIWvz77Yc3PGzwAornGG9VLg+h3r5IfJgn6TgJLRWZehWNHspFROTn G8OxC9PWJhn1X0rAKSatvDAqfl2JvjURvEnwt+CaGi34H4wQLVUHho99AV07mX2kiayq rGtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692378764; x=1692983564; 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=YmRn8jFoXslRGqEd0bx+QFf1oRx2/zSv5eVQgx55ghquG2/VbRb6itVS0ZyReZdUxx sPlG38ULF+ISaezHbktZTDQK7ngcAlq3ZRaX0RlAooiz6AoK2Jux3DWbt0gump8TXyOr OLLd80LzOrWzfn+wor4RQ0nJCguN3T38yM8V2ZjBxDWGs4XllvUz2Recj5Q5AMPVt5SX W/10HbHdV/nvoRFLtvBlZCLCWzNExMhTJA0P1g1ZXvkBL3CsZz44m8xDpG30FbCy7qq+ 5gXpBPrppm4vxHMT3k19RDjP1yWAFwI1VhNEjXAIKC4GwgVvM0sqTzRTLneWH5HXeQPn eUfw== X-Gm-Message-State: AOJu0YxnZfs4Qflt4A/12uALdKdlP9Hzh6OP35JZpHgbzCmXyv4nWEx3 8K11ojAWKUWGpkz1rjxBhhatNbdOvimg1JwQOn8= X-Received: by 2002:a17:902:d904:b0:1bc:25ed:374 with SMTP id c4-20020a170902d90400b001bc25ed0374mr2911066plz.49.1692378764559; Fri, 18 Aug 2023 10:12:44 -0700 (PDT) Received: from stoup.. ([2602:47:d483:7301:cf24:6daf:2b9e:7972]) by smtp.gmail.com with ESMTPSA id jw24-20020a170903279800b001adf6b21c77sm2020025plb.107.2023.08.18.10.12.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Aug 2023 10:12:44 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 12/33] hw/tpm: Remove HOST_PAGE_ALIGN from tpm_ppi_init Date: Fri, 18 Aug 2023 10:12:06 -0700 Message-Id: <20230818171227.141728-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230818171227.141728-1-richard.henderson@linaro.org> References: <20230818171227.141728-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.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 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 --- 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));