From nobody Thu Nov 13 03:15:53 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576514732; cv=none; d=zohomail.com; s=zohoarc; b=LS0msT9wH4Dtlo/elkvY/s4SU7XweX/k2zdLH7ZqXxQ6HerNIw/+gaJcVrxsyuRmnY8jfQABuJawZJVHzOh/kOzpWhtBe4JfH1m7/JTMY31UG2VdeNZEjrgwLM4ldA873hw2O0yVAQR7CHMN5D1F+t475HWIiTZ0YbWIUde2Wdg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576514732; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=aB/U/Tf7guynfrwJbWpfYI+QRcweDccxGqmzLn8iwE8=; b=Zmwy14Cy/T9yqObSZf4JQrG2rF9qh8d6TEV250qHbtjNrHq4QVGhMjHF0Z8aVIXrbsmMiDZbj/cSwySjBZ6XGRe3aR94TMUtzmZ4mQKAMXM8Vkh3MyItWpwNE78zNIhFVs4nTwjTQE9xdg14mKjaeLAoyuPJZhSMPE/DC5wQiLw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576514732054836.0296510761273; Mon, 16 Dec 2019 08:45:32 -0800 (PST) Received: from localhost ([::1]:56776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igtUw-00008r-8B for importer@patchew.org; Mon, 16 Dec 2019 11:45:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56526) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igtF0-0004nW-2f for qemu-devel@nongnu.org; Mon, 16 Dec 2019 11:29:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igtEz-00077m-0P for qemu-devel@nongnu.org; Mon, 16 Dec 2019 11:29:01 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:40442) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igtEy-00075p-OG for qemu-devel@nongnu.org; Mon, 16 Dec 2019 11:29:00 -0500 Received: by mail-wm1-x332.google.com with SMTP id t14so7384320wmi.5 for ; Mon, 16 Dec 2019 08:29:00 -0800 (PST) Received: from 640k.lan ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id q68sm19962334wme.14.2019.12.16.08.28.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Dec 2019 08:28:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aB/U/Tf7guynfrwJbWpfYI+QRcweDccxGqmzLn8iwE8=; b=scAMYkAdJXxiRlfDh0u5udZNzctVpxvA1sYs2ON/nEpP/Ot+1weZ4Ocs53II+ZPGhv yYxtme4eBWPdx8A2MEqBAenJf46C450guJRWXlgaecJ1yb48mvifwFlOpSrop4FbV+a5 Z59/5wx+Yt83c1vhQ8KMC3ZSyQ7YcBr2lD+1H76FUEApSY9eVO14Sp1wtwVmvcK6dcYy pb9Rw0Qcl7CVy9tmgaiWsTYqCjpdrOwovetn1SyOPjly1+LYYbbEcOK7Izv4Ptix4BxK 77WAr5WkCS9DW2/i/RxD25tMuZ4xd5KiqsDnFyZZUKhHy+AaiP5TWCpGrr8JCzaCeAjc Aj3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=aB/U/Tf7guynfrwJbWpfYI+QRcweDccxGqmzLn8iwE8=; b=O3WPqzxgzxF5gZ5s1iiblnYb21k5wizD7eCv0xKDVsieWcUMSMt8uMzyGw2GxhBfSC Ut5cAKMu91bQV2u8xCw86h6U1tCVE1BCd3jcVpGobyPkmPcNkQwVmwGCo6+riDnio5Ug NYtMRyLjDa7sTZnM9EfEaaFuVtRcvr29eQPVcczNyxw4T+y7UONjHOBMv2qs/6oGxrl6 wd2vCjVReOPUXoH9EeLag5leHm6/d95mrBCcnJH8D4ImZpAQoFvemr2Cnyx0oVp+LXzM Ylc2eE8sX5vyqHOaZUGgWJoJLiMJsqYYUHTOYOKKDsBfnNc7SFSMoIULsi39dTrkmjrT EMvA== X-Gm-Message-State: APjAAAVT3eB+TGwh4VPI2/S3f1zqdbSXLGNUmiG8NFuRC/a/8fHEYxnq 7YPWZl/9mgxlGuSVi/qhUHkop2IT X-Google-Smtp-Source: APXvYqwfzzFLEKUntLhHIG3Slg0P9gtg9WBEpb13U+wqrNUlfBm9KrHSdb5LPHeypPULt6dnO846yQ== X-Received: by 2002:a1c:1f51:: with SMTP id f78mr29872958wmf.60.1576513739538; Mon, 16 Dec 2019 08:28:59 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 12/62] memory: do not look at current_machine->accel Date: Mon, 16 Dec 2019 17:27:56 +0100 Message-Id: <1576513726-53700-13-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1576513726-53700-1-git-send-email-pbonzini@redhat.com> References: <1576513726-53700-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::332 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) "info mtree -f" prints the wrong accelerator name if used with for example "-machine accel=3Dkvm:tcg". The right thing to do is to fetch the name from the AccelClass, which will also work nicely once current_machine->accel stops existing. Tested-by: Thomas Huth Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- memory.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/memory.c b/memory.c index 06484c2..6d79cf1 100644 --- a/memory.c +++ b/memory.c @@ -2979,7 +2979,6 @@ struct FlatViewInfo { bool dispatch_tree; bool owner; AccelClass *ac; - const char *ac_name; }; =20 static void mtree_print_flatview(gpointer key, gpointer value, @@ -3049,7 +3048,7 @@ static void mtree_print_flatview(gpointer key, gpoint= er value, if (fvi->ac->has_memory(current_machine, as, int128_get64(range->addr.start), MR_SIZE(range->addr.size) + 1)) { - qemu_printf(" %s", fvi->ac_name); + qemu_printf(" %s", fvi->ac->name); } } } @@ -3097,8 +3096,6 @@ void mtree_info(bool flatview, bool dispatch_tree, bo= ol owner) =20 if (ac->has_memory) { fvi.ac =3D ac; - fvi.ac_name =3D current_machine->accel ? current_machine->acce= l : - object_class_get_name(OBJECT_CLASS(ac)); } =20 /* Gather all FVs in one table */ --=20 1.8.3.1