From patchwork Wed Aug 24 09:40:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 12953301 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 7B3B2C00140 for ; Wed, 24 Aug 2022 11:22:22 +0000 (UTC) Received: from localhost ([::1]:59992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQoSj-0006Kl-8u for qemu-devel@archiver.kernel.org; Wed, 24 Aug 2022 07:22:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59094) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQmv1-0004ST-5U; Wed, 24 Aug 2022 05:43:28 -0400 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]:45735) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQmuy-0001oH-9J; Wed, 24 Aug 2022 05:43:26 -0400 Received: by mail-pg1-x536.google.com with SMTP id f4so12712765pgc.12; Wed, 24 Aug 2022 02:43:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=ohy+ZaRm+mExMl6IasKlBa1D9a82pE4z4g4jo6700W8=; b=EFa36jtNPvYtjxpE+KhgJMJiHEArv3lvGNBpYs8rNtYVOJ2h5L5tnNXhwshALvkBSv t+4ACo4IWpzDvvgwlRhuVaaaw7SCVrw62iGL51Ttjv3/GLIGZYSeCyrCWs/0+p52Ho6V eZWyJudGq9qkprfJZ6GfJM1VlhoBq/41m6s2rslW6njYVLH14q/WAPKbT3/SSYtdFL73 OG8Vo3ofAqIR149E7xi3SHvJtZcNmfg66S2co4p0G7FqV5LaoA26twA6Tj0VF9GN6VpE RbDwUhVkf1Tk/C8OHtD159sljtsQ4/suF1p4xMxDnCpER9+qhdikM3hpxsQeBTQ56/Ts S3OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=ohy+ZaRm+mExMl6IasKlBa1D9a82pE4z4g4jo6700W8=; b=j4XidXyxmX+i/X7HLkr+jpiGXW410qpCp36Su+SaEmLr9kFpKJcaRBQ+cIZoJDKTyA M36AonbfR0MNV4xNeHq+HbXH2yyEiL9OOvez43vICKNZIqcbtG7xOgJKwgFIrRXCRQCW twH8IDNMG1E8oxu29jUzMsm7bMpBJ+G24IUKKa7PlgSvd6smXNkur8yP9OmqXfmE7YHf LhjSsKNdaI5lXjF+9FEyFv7EMThSpTjE0H0uxCqMlt4euDeL+MSeD9xUtVud/HCvAQVJ +fGk1v6japuffUmPQ8bmITaZspeN6A9D1IxlcfHV+NAHwR7l+wJNxYsTekwISqlOcddB /t7A== X-Gm-Message-State: ACgBeo1UcRVWZMp/GS2LRriKGMtgGR4h07oizSvbB2lOJbcpRuZQ6GO/ bcQWYQgQzxK2Sld5erNoaLaRqT3tsxY= X-Google-Smtp-Source: AA6agR6bx+H5hvlsCfy0SQNQpJsv5cGpqgtTzuWACh35mc98Z24eSOFRsWe+SJAr8exISxezTqElDQ== X-Received: by 2002:a05:6a00:2918:b0:536:3967:5d08 with SMTP id cg24-20020a056a00291800b0053639675d08mr21463197pfb.68.1661334202610; Wed, 24 Aug 2022 02:43:22 -0700 (PDT) Received: from ubuntu.. (144.168.56.201.16clouds.com. [144.168.56.201]) by smtp.gmail.com with ESMTPSA id b14-20020a170903228e00b001728eb339e2sm12165972plh.286.2022.08.24.02.43.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Aug 2022 02:43:22 -0700 (PDT) From: Bin Meng To: qemu-devel@nongnu.org Cc: Xuzhou Cheng , Bin Meng , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Daniel Henrique Barboza , David Gibson , Greg Kurz , qemu-ppc@nongnu.org Subject: [PATCH 42/51] hw/ppc: spapr: Use qemu_vfree() to free spapr->htab Date: Wed, 24 Aug 2022 17:40:20 +0800 Message-Id: <20220824094029.1634519-43-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220824094029.1634519-1-bmeng.cn@gmail.com> References: <20220824094029.1634519-1-bmeng.cn@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=bmeng.cn@gmail.com; helo=mail-pg1-x536.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, FREEMAIL_FROM=0.001, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Xuzhou Cheng spapr->htab is allocated by qemu_memalign(), hence we should use qemu_vfree() to free it. Fixes: c5f54f3e31bf ("pseries: Move hash page table allocation to reset time") Fixes: b4db54132ffe ("target/ppc: Implement H_REGISTER_PROCESS_TABLE H_CALL"") Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng Reviewed-by: Daniel Henrique Barboza Reviewed-by: Marc-André Lureau --- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index bc9ba6e6dc..4034f4d130 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1522,7 +1522,7 @@ int spapr_hpt_shift_for_ramsize(uint64_t ramsize) void spapr_free_hpt(SpaprMachineState *spapr) { - g_free(spapr->htab); + qemu_vfree(spapr->htab); spapr->htab = NULL; spapr->htab_shift = 0; close_htab_fd(spapr);