From patchwork Tue Jun 18 15:59:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805215 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp271416wrx; Tue, 18 Jun 2024 09:03:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWnttDSyHM4WxXpFZNH1oRanf3GG/ND4iDPkyYlbDYzhloW6AmIIn6HP7WW4VwFZHo2l6VlRSvrQ9eZY6UuhF4w X-Google-Smtp-Source: AGHT+IFFP/CJG9kbzW5UW9ODcpW+LIVWEEi5V+maUCFlYM0X88WdmNita+lLUzJZojCt8Y+gItuA X-Received: by 2002:a05:6870:200d:b0:254:9392:e5a2 with SMTP id 586e51a60fabf-25c94a00b62mr203307fac.25.1718726630557; Tue, 18 Jun 2024 09:03:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726630; cv=none; d=google.com; s=arc-20160816; b=GzVyScylr24lhrfPPJWidQIJZIm+8FkcSzV8c/RoxF74WuSzQFbEApprcOLmMLVqul sKjxu/p7M6aM34Z3au5s3UUfrBLWmuIiYEolG+i6eJ26rdO8ViZH0S3j5qve+1/tzarZ MXopBq56cksujn41onV9IajBd0DTME4TsYx/d8FtRoW26/ipjSb1ISIy79ktuI0JtAQn FU02E4FQhImot/jX6Hp28Jhn9WyuT6uyaPnQjaWMGhSsHuIOD3gZZLpmlYlNqAObVx68 c3cmMlF3yfYV68/dAPwMdptRivrx8c1NqCLTLTlze9CI1mPp8O0xZwwaOrBbch8Ei2CG tSdg== 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:cc:to :from:dkim-signature; bh=6hsn1dzY26DF1TLxl9KireRz1A8Sf8ZBFLuWm3kWcmI=; fh=QeIS5kb1Uh2g1z6dWJxoYMIPD1Pl4adL6YUWYeE5yJk=; b=kNdrkSs8NVcDpkUC3fqw9mFjikp3IF8n8eNlW2y+4bSwMLouSfFjUv6phxCeI6vA8J 3f4LOUALbm6oFhVGBD9vGsTl9XTHbkTI51QGksL8+jtG4InVhac5xMNOh9JoZwbCvm3/ tFYxYaQLE2sGMzseyARHnPNaMHFsunu7FSqz9+IaV9sZ81N/aw26xFBmEwxQ6e4n+Aev /bX0jjDFaxXso3HaQjaGI+C6L+ieu/Opqv0DZ0DCMRz3pq5J99PHxwZOYHMaG2ciTXOJ RSN+cfyXzXa5ZdFeQo6BHd0fbbTSE91Y9NO92tJwbrEQGzgQBuGQUJfLSzmDXhRlZJ8c Zf2w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AIZaWhQf; 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 ada2fe7eead31-48da44948e8si2149503137.531.2024.06.18.09.03.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:03:50 -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=AIZaWhQf; 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 1sJbGU-0003J2-AB; Tue, 18 Jun 2024 12:00:58 -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 1sJbGN-0003Gq-9B for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:00:51 -0400 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbGL-0006jV-Lr for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:00:51 -0400 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-57cf8880f95so1498525a12.3 for ; Tue, 18 Jun 2024 09:00:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726448; x=1719331248; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6hsn1dzY26DF1TLxl9KireRz1A8Sf8ZBFLuWm3kWcmI=; b=AIZaWhQfJcJKlb1HjPXlrqbFKmOpnwXozCyJH20MRnmIPxm0O8rP9GzMiIRJ7Tnk9W RqCadU554s7xsP/JT3dDhsCh2og0ftXtbj65XujWJks+HdByCZAdrrsHzWopPbb+VjbZ 4cXO11bIixnupPvcocJL8ewp22JThkSHgA04fde+/P/XVMWQhvDEekR21IRHjzHfeD89 shO0lxdNLzCvnuw/SV2yE/jLL162ML8riXQORN7PReQvWFK/r/6oOr9khuOAlxIxeQBu NNQOZ/Vn4xkhpl/1TQ3XYT8JhZN3A8ad8eUo9g7qbeMEkr7pgiFgGRwBEna4OQ6a5ogF PU4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726448; x=1719331248; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6hsn1dzY26DF1TLxl9KireRz1A8Sf8ZBFLuWm3kWcmI=; b=Y3DelLSljD/sCs2Kdq5ctY4keRxYEcEtv/8BPNptL4fi7IGS7PX1+NDY9+Z7+NsKWj lSf0fL7d1DLpP6CbPxk849qJqu6POFwRXKLL05dOM9wkoSzswxVah/H5EiDSWFUKUs2L V9x1mcbS/TVSn2t1mbCvknILr8/PW8s9yl+ble7JDkSfFjNTo6zXzBXQ0OKrktEC7Yti UBHEhC8SoYDXuVmizv4QY0izdABiVpQ4jA9IlXq4B87Foad7Y0jNX7MvNbiFqS5TRIVR +lVEfb+Af8ALiLEnJ44182lNh+okbeqQ/Wu+Y8W/B9U1rj8JfH8fYmpTCNwy+Ba8W3vd QgSQ== X-Gm-Message-State: AOJu0YzzOq+LsfKKiZtonPWNRb7DIj3CC6IdlmT2z7MVcY/XvfwvqSkn Ts9k/uB0amloyi611V5E0O9bxbfDg0S1oWg8Vm8k3Kadsyc8I6t7X4CVnkCOiCkXuMicAbRXtRI 3 X-Received: by 2002:a17:906:c243:b0:a6f:1839:ed48 with SMTP id a640c23a62f3a-a6f60de24c9mr1047303066b.66.1718726447743; Tue, 18 Jun 2024 09:00:47 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56fa416asm634920566b.224.2024.06.18.09.00.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:00:47 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Zhao Liu , Igor Mammedov Subject: [PULL 01/76] hw/i386/pc: Deprecate 2.4 to 2.12 pc-i440fx machines Date: Tue, 18 Jun 2024 17:59:23 +0200 Message-ID: <20240618160039.36108-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=philmd@linaro.org; helo=mail-ed1-x533.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 Similarly to the commit c7437f0ddb "docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated", deprecate the 2.4 to 2.12 machines. Suggested-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Message-Id: <20240617071118.60464-2-philmd@linaro.org> --- docs/about/deprecated.rst | 4 ++-- hw/i386/pc_piix.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index b62877e51c..66a5f43626 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -212,8 +212,8 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name better reflects the way this property affects all random data within the device tree blob, not just the ``kaslr-seed`` node. -``pc-i440fx-2.0`` up to ``pc-i440fx-2.3`` (since 8.2) -''''''''''''''''''''''''''''''''''''''''''''''''''''' +``pc-i440fx-2.0`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These old machine types are quite neglected nowadays and thus might have various pitfalls with regards to live migration. Use a newer machine type diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index ebb51de380..02878060d0 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -742,6 +742,7 @@ DEFINE_I440FX_MACHINE(v3_0, "pc-i440fx-3.0", NULL, static void pc_i440fx_2_12_machine_options(MachineClass *m) { pc_i440fx_3_0_machine_options(m); + m->deprecation_reason = "old and unattended - use a newer version instead"; compat_props_add(m->compat_props, hw_compat_2_12, hw_compat_2_12_len); compat_props_add(m->compat_props, pc_compat_2_12, pc_compat_2_12_len); } @@ -847,7 +848,6 @@ static void pc_i440fx_2_3_machine_options(MachineClass *m) { pc_i440fx_2_4_machine_options(m); m->hw_version = "2.3.0"; - m->deprecation_reason = "old and unattended - use a newer version instead"; compat_props_add(m->compat_props, hw_compat_2_3, hw_compat_2_3_len); compat_props_add(m->compat_props, pc_compat_2_3, pc_compat_2_3_len); } From patchwork Tue Jun 18 15:59:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805218 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp271627wrx; Tue, 18 Jun 2024 09:04:06 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXsBqjNvdxWpMkkOQvNFraIQN9YlgWtaLP+Y3mZveW3DevxvICDNaW4FD3j83lHA8MYGtxIAUQi7PtjNI/0fGZ5 X-Google-Smtp-Source: AGHT+IFFN5Qlh9dg+aAHZZh3mLG1BFJB/HO99ckwjLvZVDe2u+L5Q0AQ6ml+tYVGV8XGooXZgF7d X-Received: by 2002:a67:f988:0:b0:48c:42ec:594e with SMTP id ada2fe7eead31-48f129f3a4dmr344263137.16.1718726645848; Tue, 18 Jun 2024 09:04:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726645; cv=none; d=google.com; s=arc-20160816; b=hcj3HUqLJlYXzDkmjAS29YKJCf6MNfCNFLiTcO1cUhWhOjJLAtq8/qLSrGXE4yYFsN RL2NWEOCSyehGXPr7gG+NVmSH8+ng826Reupp1xw1bQi7B4YkZeEJThGHzY5ZygVR/qR 7pxh3Z4ED/a+OuZeWIMQ4NG6Ng7rxMHCqjXGKEL8Akce5LPBxIzyoYyY4/O9wa4H2FFv uOL3j29l0on2RfAPYGu3PRjsGzoKYBOpNBBU1YGMM1Ow6FY5br8G5K1+a4B5KAzcx51s 1E3mcbQGZIyCw4i5QvTSIMVy/9rOE13/CDI8l1UxQt4YhVnoSV5wfKa22JL2XZa13Gdz W8Fw== 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:cc:to :from:dkim-signature; bh=b1NBIEWPGGFfeQf1+Y56Aq/tCcRuvL4FEsYlvleZBzo=; fh=QeIS5kb1Uh2g1z6dWJxoYMIPD1Pl4adL6YUWYeE5yJk=; b=Il+SGE2wrAOxI38a86dq3NfhRDOKjxaTqeXFH3FC9nhU2GaeP0IAZyGoaerPalYnpX wlZfy/7XtLZTxk8blEZUb8qgqFP8Ypfb0fXNjqP9SP4an6fXE7MqWOoNNjbRrmqsqwjX DCZjz/I6j8IFqe6+28lNN7zOIphHhu4zcBs/LUwyB4DWvCsbGbKcprxnijXfvlP3e48K hpo2W+eigoBhRH6f07rQVJ3UTSiVgeaC1MtmiRe9r8fPBxbXik8GkXhcEzGiAoo58qlH u7w/y9DZIz88U3k8AMLSzSX98QQvfPduS4efPxirmXKVXh/5uFLaXZaemSdnHXWp294S zWqA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qPvWL+Rl; 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 ada2fe7eead31-48da44a78a4si1911199137.560.2024.06.18.09.04.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:04:05 -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=qPvWL+Rl; 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 1sJbGV-0003JF-DQ; Tue, 18 Jun 2024 12:00:59 -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 1sJbGT-0003Io-NK for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:00:57 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbGR-0006jz-M2 for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:00:57 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a6f0dc80ab9so868697966b.2 for ; Tue, 18 Jun 2024 09:00:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726454; x=1719331254; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=b1NBIEWPGGFfeQf1+Y56Aq/tCcRuvL4FEsYlvleZBzo=; b=qPvWL+Rlez6PLk2jDuklMVFAc3TZ5Fyoey+QX5ueDMRyJ71lspAjFYeB1ei/KPz+ZU w6HL+02gMoqJqm4vFxgXzGlMcKk/xUS/G20oAoflmRdFzaNaMPax+EkQ3sK9v1y3EcdU 8YLOkp8FLX2Nl+M84mdKREcP8ozclHO1FiN7NyOOlzUBMGT2cwp3slygR/dscueRv2L3 RqHGztfDV6BR7kv8PNAsJpjVWzXn2F3R5pEVGiFqqxbtCosnZc2xSrkdpcrYN/giTRWs qw/N8+1hVwpphDtYhoX7yGymb9qkjoi3EyTSypDLjtRe3Jtc6tuIs6Vva/U8DiyxwozX 0BMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726454; x=1719331254; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=b1NBIEWPGGFfeQf1+Y56Aq/tCcRuvL4FEsYlvleZBzo=; b=jIDO/r0rNNA+IOh9P6YDEGMYmurFh4kT9vJ/p5uH7IQoRblfgbfivFCvD+xYJA8RSV 2UWK187CrJNLKOJ1zSBpPFSjX1n+bPlYAj0W9J2tfFQUR693S7q23xqWKsCyJ/oiHczo Cccp6rv4dr5myB4hwWLouGhD2Ayjr8p+eRwPO0Biw0jMJ4PsgECO+TEBNP58X8gcZKzP S4S6HDgHcHvatAnUNUhE7rCdhYTBpyRzv00QkLDwLwzx89aG8axOD9VQhb3BwTNZLcA3 KM7O1NDU//qdPoFii4XoU+tAV+COLJ9YNZLduEv6P8VB50kwwsRIrIvVwmXjuDDlXSw9 QiKg== X-Gm-Message-State: AOJu0YzUD5t0c6RdgiB9jUaC+j877RZRmK92iupCnjcInDl8Rjwh0MUH ifhr5UM2A9egjUc+wNhYqCs05M9nlZgmfiMRTzDJU8jdmhNyBX4jekQYfQ2Ex1/nh7SOZ12EoFp v X-Received: by 2002:a17:906:6889:b0:a6c:8b01:3f78 with SMTP id a640c23a62f3a-a6f60cf3871mr808114866b.9.1718726453561; Tue, 18 Jun 2024 09:00:53 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56db61ebsm625236366b.56.2024.06.18.09.00.52 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:00:53 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Zhao Liu , Igor Mammedov Subject: [PULL 02/76] hw/i386/pc: Remove deprecated pc-i440fx-2.0 machine Date: Tue, 18 Jun 2024 17:59:24 +0200 Message-ID: <20240618160039.36108-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=philmd@linaro.org; helo=mail-ej1-x62e.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 pc-i440fx-2.0 machine was deprecated for the 8.2 release (see commit c7437f0ddb "docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated"), time to remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Message-Id: <20240617071118.60464-3-philmd@linaro.org> --- docs/about/deprecated.rst | 2 +- docs/about/removed-features.rst | 2 +- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 15 ------------- hw/i386/pc_piix.c | 37 --------------------------------- 5 files changed, 2 insertions(+), 57 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 66a5f43626..e12eab1f72 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -212,7 +212,7 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name better reflects the way this property affects all random data within the device tree blob, not just the ``kaslr-seed`` node. -``pc-i440fx-2.0`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) +``pc-i440fx-2.1`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These old machine types are quite neglected nowadays and thus might have diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index eaae82b8a5..f84bfaf2b6 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -948,7 +948,7 @@ mips ``fulong2e`` machine alias (removed in 6.0) This machine has been renamed ``fuloong2e``. -``pc-0.10`` up to ``pc-i440fx-1.7`` (removed in 4.0 up to 8.2) +``pc-0.10`` up to ``pc-i440fx-2.0`` (removed in 4.0 up to 9.0) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These machine types were very old and likely could not be used for live diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index ca7904ac2c..3e606949fb 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -318,9 +318,6 @@ extern const size_t pc_compat_2_2_len; extern GlobalProperty pc_compat_2_1[]; extern const size_t pc_compat_2_1_len; -extern GlobalProperty pc_compat_2_0[]; -extern const size_t pc_compat_2_0_len; - #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \ { \ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 0469af00a7..d0f2628d46 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -320,21 +320,6 @@ GlobalProperty pc_compat_2_1[] = { }; const size_t pc_compat_2_1_len = G_N_ELEMENTS(pc_compat_2_1); -GlobalProperty pc_compat_2_0[] = { - PC_CPU_MODEL_IDS("2.0.0") - { "virtio-scsi-pci", "any_layout", "off" }, - { "PIIX4_PM", "memory-hotplug-support", "off" }, - { "apic", "version", "0x11" }, - { "nec-usb-xhci", "superspeed-ports-first", "off" }, - { "nec-usb-xhci", "force-pcie-endcap", "on" }, - { "pci-serial", "prog_if", "0" }, - { "pci-serial-2x", "prog_if", "0" }, - { "pci-serial-4x", "prog_if", "0" }, - { "virtio-net-pci", "guest_announce", "off" }, - { "ICH9-LPC", "memory-hotplug-support", "off" }, -}; -const size_t pc_compat_2_0_len = G_N_ELEMENTS(pc_compat_2_0); - GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) { GSIState *s; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 02878060d0..a750a0e6ab 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -441,11 +441,6 @@ static void pc_compat_2_1_fn(MachineState *machine) x86_cpu_change_kvm_default("svm", NULL); } -static void pc_compat_2_0_fn(MachineState *machine) -{ - pc_compat_2_1_fn(machine); -} - #ifdef CONFIG_ISAPC static void pc_init_isa(MachineState *machine) { @@ -887,38 +882,6 @@ static void pc_i440fx_2_1_machine_options(MachineClass *m) DEFINE_I440FX_MACHINE(v2_1, "pc-i440fx-2.1", pc_compat_2_1_fn, pc_i440fx_2_1_machine_options); -static void pc_i440fx_2_0_machine_options(MachineClass *m) -{ - PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - - pc_i440fx_2_1_machine_options(m); - m->hw_version = "2.0.0"; - compat_props_add(m->compat_props, pc_compat_2_0, pc_compat_2_0_len); - pcmc->smbios_legacy_mode = true; - pcmc->has_reserved_memory = false; - /* This value depends on the actual DSDT and SSDT compiled into - * the source QEMU; unfortunately it depends on the binary and - * not on the machine type, so we cannot make pc-i440fx-1.7 work on - * both QEMU 1.7 and QEMU 2.0. - * - * Large variations cause migration to fail for more than one - * consecutive value of the "-smp" maxcpus option. - * - * For small variations of the kind caused by different iasl versions, - * the 4k rounding usually leaves slack. However, there could be still - * one or two values that break. For QEMU 1.7 and QEMU 2.0 the - * slack is only ~10 bytes before one "-smp maxcpus" value breaks! - * - * 6652 is valid for QEMU 2.0, the right value for pc-i440fx-1.7 on - * QEMU 1.7 it is 6414. For RHEL/CentOS 7.0 it is 6418. - */ - pcmc->legacy_acpi_table_size = 6652; - pcmc->acpi_data_size = 0x10000; -} - -DEFINE_I440FX_MACHINE(v2_0, "pc-i440fx-2.0", pc_compat_2_0_fn, - pc_i440fx_2_0_machine_options); - #ifdef CONFIG_ISAPC static void isapc_machine_options(MachineClass *m) { From patchwork Tue Jun 18 15:59:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805220 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp271734wrx; Tue, 18 Jun 2024 09:04:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU3JCbRUBWLXv3d7nZN0EfJOHrd29nKxMuzXuw+IPmpE33+dHXfsHqVfPYKqL4y8jC959ktnUpN8tMMTSgpcD2D X-Google-Smtp-Source: AGHT+IFXXAxiI/mkMcvrLTprLJERp1K1WNBO6x64M8+140BBtCaiNJRphSApiLFypD8a3YJQyvs8 X-Received: by 2002:a05:620a:4051:b0:799:7587:d1b7 with SMTP id af79cd13be357-79bb3ee3aadmr11520585a.63.1718726654655; Tue, 18 Jun 2024 09:04:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726654; cv=none; d=google.com; s=arc-20160816; b=iWOCCBxJNbgFxoYrJO7Gc0antoYcyaGSO7OehJXPzrCWdSXs39EsojTLGP8iPe962/ 4l12SViYBp8pbowSl6SoZO7cpEM7Ri178ppVPiWqsZgm1kA+6d4bDWmqHZMn45W+ljMR hEdz1tfwxmdeMc9Dop8xhfYsonE3RfJkoClZvAx3W5rXmLzGi+hR1vcf5jUKwOsztgJK 2zxD3CWTN3h5vbN50yA/2M/7+VNJNB5iSiNrH8MhBcBCTxUNmcbXHQyj8pEZ7BzWt/Fx 3/2/Rg9JsVxMMSmHpexEf6LR+DRPhZcYA3fd1lYIujMQ+Q0sK3DZd/oC0z+hFcs2HeJi 5oyw== 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:cc:to :from:dkim-signature; bh=LOG7Q1advPZZqyRZ93ugLO8dtsxdIWVJ2ikNItPvt4U=; fh=QeIS5kb1Uh2g1z6dWJxoYMIPD1Pl4adL6YUWYeE5yJk=; b=MtgU4eYZh0IObJLM/xf2kOZ28gTM7KSzQwdA1frBoP57qbt1TILKOGic7X3OA8bSIj fbw/bME/2ueQ0UZM9HfjXCUAcElyyyG7BdW7WJyDHa8ld23m50u1u/2/yYI6dR5IuK2H SPuqJE61vg9r8lkNd+9Mm5wMQJAjUtB242accGyQBqlRbilwC/jH2ToGAwS6FkYc1K78 kWKy+tk8jNmAjRNw84dW2/PNLbBKUxaPpTlbazcgcrSzR3atlCwxlfMYctHDOvUD1r0t +n43CIb104eH7x22H0qGDVmCd+hoyuJWcon1nLb51HxiY6G1TiYGInONZVlUKvILvQ7M FWww==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HU91M5IE; 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 af79cd13be357-798aac9dba6si1236430685a.143.2024.06.18.09.04.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:04:14 -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=HU91M5IE; 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 1sJbGb-0003OC-9Q; Tue, 18 Jun 2024 12:01:05 -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 1sJbGZ-0003MC-8d for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:01:03 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbGX-0006kD-Jh for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:01:03 -0400 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a6ef8bf500dso636675366b.0 for ; Tue, 18 Jun 2024 09:01:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726459; x=1719331259; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LOG7Q1advPZZqyRZ93ugLO8dtsxdIWVJ2ikNItPvt4U=; b=HU91M5IEkIVB2QmgmMoUunm+3f+8KtyF5nI11KWpIv6vghsMobam9Y12+6kwFajLzW 3+wVP6+191U4blcNuxdBrFFPNeLVZ92e5Slnk2GGtFu9SlLRPbfKbTOgcXzQnYvgwyUr d+rP5t3UCZHVsKaIEQY/4IebixoTKHnizdpKNXspTMJVrgMMBZ0SZwzZM8uzMlL08P3M H2M1eyaxrK1XOUKGYSUBe8WiS1/F6EXgbKUMe2spuylvZ6d8EfxBLGlEQ6NiVlRJel2u D0lWbEI6KIw5ExWcOC39v1kzfQfYt7Ic/N6w/SsPhyLoLM7Zrrbk4ue1VutT9dAlAYk/ qCIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726459; x=1719331259; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LOG7Q1advPZZqyRZ93ugLO8dtsxdIWVJ2ikNItPvt4U=; b=wP8tzSrjj3Mn5BDe6I8Hw19a6U7+wYvsF3UA6ul6QTh4B9X7YG0qTOXBbg409LBbf+ NA0U6ea5hatXsqfWhgRqNUbHPmUjVlDaOT1ROCe8l2jPKuKhMf3ab04d8F6oPuqgK7UP xOorSJejywI4S4GwIbg/6sr5Z6HX3zTXuhG54kx1PK0BLgO+9Cp90cEXGFXCZZ1IMz7w ZboreuuH8zNiPHwv4WF+s1pvrcMd26E0cxFuQfIAUNQelNSgxHwhbbF4q4mw3dXLmCaC e93KK7MWtxb5AeFXrXHlou8QKB4LYpOH4D6WpGPpE3a/hTmNKyjjxBY9/cy3G5hwpess l3Jg== X-Gm-Message-State: AOJu0YzZE/7prxAs24tAHXazn4y51I298BVKeawU0SL3J8B2l2sqw+jL E6urkRlr87oB9TtWQafMsUdAP4b2gg92/QjM4VPs1IlfZQv7ZbfqEYugmw/EqdGMxxfG3zuiYqI T X-Received: by 2002:a17:907:bb94:b0:a6f:2a43:e956 with SMTP id a640c23a62f3a-a6f60de6a0emr832989766b.74.1718726459399; Tue, 18 Jun 2024 09:00:59 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56fa67ecsm621213766b.215.2024.06.18.09.00.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:00:59 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Zhao Liu , Igor Mammedov Subject: [PULL 03/76] hw/usb/hcd-xhci: Remove XHCI_FLAG_FORCE_PCIE_ENDCAP flag Date: Tue, 18 Jun 2024 17:59:25 +0200 Message-ID: <20240618160039.36108-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=philmd@linaro.org; helo=mail-ej1-x631.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 XHCI_FLAG_FORCE_PCIE_ENDCAP was only used by the pc-i440fx-2.0 machine, which got removed. Remove it and simplify usb_xhci_pci_realize(). Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Message-Id: <20240617071118.60464-4-philmd@linaro.org> --- hw/usb/hcd-xhci.h | 1 - hw/usb/hcd-xhci-nec.c | 2 -- hw/usb/hcd-xhci-pci.c | 3 +-- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h index 98f598382a..1efa4858fb 100644 --- a/hw/usb/hcd-xhci.h +++ b/hw/usb/hcd-xhci.h @@ -37,7 +37,6 @@ typedef struct XHCIEPContext XHCIEPContext; enum xhci_flags { XHCI_FLAG_SS_FIRST = 1, - XHCI_FLAG_FORCE_PCIE_ENDCAP, XHCI_FLAG_ENABLE_STREAMS, }; diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c index 328e5bfe7c..5d5b069cf9 100644 --- a/hw/usb/hcd-xhci-nec.c +++ b/hw/usb/hcd-xhci-nec.c @@ -43,8 +43,6 @@ static Property nec_xhci_properties[] = { DEFINE_PROP_ON_OFF_AUTO("msix", XHCIPciState, msix, ON_OFF_AUTO_AUTO), DEFINE_PROP_BIT("superspeed-ports-first", XHCINecState, flags, XHCI_FLAG_SS_FIRST, true), - DEFINE_PROP_BIT("force-pcie-endcap", XHCINecState, flags, - XHCI_FLAG_FORCE_PCIE_ENDCAP, false), DEFINE_PROP_UINT32("intrs", XHCINecState, intrs, XHCI_MAXINTRS), DEFINE_PROP_UINT32("slots", XHCINecState, slots, XHCI_MAXSLOTS), DEFINE_PROP_END_OF_LIST(), diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c index 4423983308..cbad96f393 100644 --- a/hw/usb/hcd-xhci-pci.c +++ b/hw/usb/hcd-xhci-pci.c @@ -148,8 +148,7 @@ static void usb_xhci_pci_realize(struct PCIDevice *dev, Error **errp) PCI_BASE_ADDRESS_MEM_TYPE_64, &s->xhci.mem); - if (pci_bus_is_express(pci_get_bus(dev)) || - xhci_get_flag(&s->xhci, XHCI_FLAG_FORCE_PCIE_ENDCAP)) { + if (pci_bus_is_express(pci_get_bus(dev))) { ret = pcie_endpoint_cap_init(dev, 0xa0); assert(ret > 0); } From patchwork Tue Jun 18 15:59:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805210 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp270208wrx; Tue, 18 Jun 2024 09:02:06 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVsTaHFMyN0oAyFnom2JBS2Ul3Z/AfvzpY4moEFcFSJ+BWgL/YUYmfxvCxKmRTHs0abeNlELNJGXdoik3QWb1Nj X-Google-Smtp-Source: AGHT+IHZDqEFPitdTJsFp7D+IIdyo3IMNS1QKyovKIqSAJnofYAW0VNpsdNb7CqJ7mqHIL67TGJ1 X-Received: by 2002:a05:6122:3c46:b0:4e4:e6e5:aea with SMTP id 71dfb90a1353d-4ef276c85f7mr355713e0c.1.1718726525985; Tue, 18 Jun 2024 09:02:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726525; cv=none; d=google.com; s=arc-20160816; b=0H/iN690TQnq3g5wckMCHzDXMYJORuBNLLfkK8rJMtksZ5qVucgi5+ZZaxV1Fd7sBD S8AkVsg2FWtAmK/+JjXkNZwfX2GS07LTarduvsWmm1EhV8mPwMsJ/W8dTjF4QAn9TI68 47lFbVt3BrNgxwxmGwQFob8iH8rFe8KS8/Oe3ZIUlpS4KtobbUF00ln00G8PxepDZCTY ra4OIKHWJoC5RxcEkQgtfsmrFc1XMMB/KbUfIsCDqZ/zF1M/6acZ1RPFlNCKGgvQ34cY h7j1CHXNJXh48LOKTtsz9m1HkXCb7ZJxTQasnMGxLJITixw8SafaYXPkDE+qB0P3wXLj FNdA== 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:cc:to :from:dkim-signature; bh=jacREMpFLEylsnLt1SjYSrC7USbVG4MmfPDnE6kQE/g=; fh=QeIS5kb1Uh2g1z6dWJxoYMIPD1Pl4adL6YUWYeE5yJk=; b=zk/6M+PDbzcTUPX1JaH6uFTAj6qgY4uNaWhJOwphBgPDDSvD4X2CzxX6936KwbOIxt IFdYt5izGJdEV/sMyQqaRS9DmyRWyiwyQE/Es7VaFUg4oslGG3aw5OqMzldiDngjlr6w TEZpRC+F/eLbGWbhxy7Ee0Tc3aKPTBkrajU7Dh8J4LnQhPsjag2bnMdVGEAyr2Wa3PkV eQu3d2fUFJR9wR1aOW7l5cxOU2YaI4DF7VIXCsR/FuUPyD+ME0pHsvD0ANxLqDJzqKD1 tbk3IrR1svFyVULAvyCPpWK8LawRjsk6prWtwxM5svW5hiH9J2a98dRujj1/n8yIhvFP uAqg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SC30VAQG; 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 71dfb90a1353d-4ed41b20256si2022191e0c.311.2024.06.18.09.02.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:02:05 -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=SC30VAQG; 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 1sJbGm-0003V6-EC; Tue, 18 Jun 2024 12:01:17 -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 1sJbGe-0003Pw-R5 for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:01:08 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbGd-0006kZ-1A for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:01:08 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-57c73a3b3d7so6403015a12.1 for ; Tue, 18 Jun 2024 09:01:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726465; x=1719331265; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jacREMpFLEylsnLt1SjYSrC7USbVG4MmfPDnE6kQE/g=; b=SC30VAQG/c1xg+Ml+nT8mtGUTrPuPIrS+t23pJBOKql4Pc1LpMc2Y350/Pmt40dPRI CNm+YORA9Omja63W4Um/UdOrLwhFEUFgjA4Ka+UyGwjCb3YbL97QJdhQzJaRgzaHuDZG ldAeIShRS5jTUtzqq73kEdLCq4/IY0gNFW6i9T+/Io9irVaclhIepwrlPHx9HbfcdHe1 M0yfbV+++hDodjuC5iUSg4ACp7FKrXMdfG97Za7Of6rYO4yUayw90QtWu9Zs+R1c8SBi REZluql9nfUiwtinhPGlubT+nWPBumyy/+C5B7QSXUBrq6t+A6QQ0TjHmKH9UTw8B19u IjOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726465; x=1719331265; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jacREMpFLEylsnLt1SjYSrC7USbVG4MmfPDnE6kQE/g=; b=IopyBg8jjZOh6ll4df7J3lPmTVv/72n0gzsAzzpcBqV1qE8oNqNNU0x/IMsPP1rB5c mijvmhg4akvivzIjWXPKLpeRq4fGlWl8Hc5V8KYnG3JkcYGgt0lJ57uYxBVgYcaojuad x0ueXEnYP/36xllgEtx9KCWLJeOitxQZoKbadiXZ+PNNTG8khHpkeRLbDuWyXqA9Gp6Y SY6g2S2l3bUckGrH3L4MkWXbHnAbjEkux8aMlVOrFwaJoHPfx0vvb35RI+0XyfySVgQB RtLa4wFazfT+k+P8IIDfzxm706wroVL5BEeWiDqe2Qr0NNxCxDTEcUI+4WNzW5rI8Ifh GC+w== X-Gm-Message-State: AOJu0Yw1Dc0RjlipvR0DO/NjWMbEjRaM4zRn+6Y0EhVDlGnl5ktQgQ+X mC8ra2H4Ffd7SFqhwRAmx3d8ZsbOYK9HOm57dq0SNeGGaPTlwB5IMn+Trc7Y9LqQ2KHZAN6+yCX p X-Received: by 2002:a50:c349:0:b0:57c:5eeb:b543 with SMTP id 4fb4d7f45d1cf-57cbd663fbbmr8168255a12.13.1718726465303; Tue, 18 Jun 2024 09:01:05 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57cb72e9dd7sm7820991a12.57.2024.06.18.09.01.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:01:04 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Zhao Liu , Igor Mammedov Subject: [PULL 04/76] hw/usb/hcd-xhci: Remove XHCI_FLAG_SS_FIRST flag Date: Tue, 18 Jun 2024 17:59:26 +0200 Message-ID: <20240618160039.36108-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=philmd@linaro.org; helo=mail-ed1-x529.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 XHCI_FLAG_SS_FIRST was only used by the pc-i440fx-2.0 machine, which got removed. Remove it and simplify various functions in hcd-xhci.c. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Message-Id: <20240617071118.60464-5-philmd@linaro.org> --- hw/usb/hcd-xhci.h | 3 +-- hw/usb/hcd-xhci-nec.c | 2 -- hw/usb/hcd-xhci-pci.c | 1 - hw/usb/hcd-xhci.c | 42 ++++++++---------------------------------- 4 files changed, 9 insertions(+), 39 deletions(-) diff --git a/hw/usb/hcd-xhci.h b/hw/usb/hcd-xhci.h index 1efa4858fb..fe16d7ad05 100644 --- a/hw/usb/hcd-xhci.h +++ b/hw/usb/hcd-xhci.h @@ -36,8 +36,7 @@ typedef struct XHCIStreamContext XHCIStreamContext; typedef struct XHCIEPContext XHCIEPContext; enum xhci_flags { - XHCI_FLAG_SS_FIRST = 1, - XHCI_FLAG_ENABLE_STREAMS, + XHCI_FLAG_ENABLE_STREAMS = 1, }; typedef enum TRBType { diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c index 5d5b069cf9..0c063b3697 100644 --- a/hw/usb/hcd-xhci-nec.c +++ b/hw/usb/hcd-xhci-nec.c @@ -41,8 +41,6 @@ struct XHCINecState { static Property nec_xhci_properties[] = { DEFINE_PROP_ON_OFF_AUTO("msi", XHCIPciState, msi, ON_OFF_AUTO_AUTO), DEFINE_PROP_ON_OFF_AUTO("msix", XHCIPciState, msix, ON_OFF_AUTO_AUTO), - DEFINE_PROP_BIT("superspeed-ports-first", XHCINecState, flags, - XHCI_FLAG_SS_FIRST, true), DEFINE_PROP_UINT32("intrs", XHCINecState, intrs, XHCI_MAXINTRS), DEFINE_PROP_UINT32("slots", XHCINecState, slots, XHCI_MAXSLOTS), DEFINE_PROP_END_OF_LIST(), diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c index cbad96f393..264d7ebb77 100644 --- a/hw/usb/hcd-xhci-pci.c +++ b/hw/usb/hcd-xhci-pci.c @@ -242,7 +242,6 @@ static void qemu_xhci_instance_init(Object *obj) s->msix = ON_OFF_AUTO_AUTO; xhci->numintrs = XHCI_MAXINTRS; xhci->numslots = XHCI_MAXSLOTS; - xhci_set_flag(xhci, XHCI_FLAG_SS_FIRST); } static const TypeInfo qemu_xhci_info = { diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index ad40232eb6..b6411f0bda 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -541,18 +541,10 @@ static XHCIPort *xhci_lookup_port(XHCIState *xhci, struct USBPort *uport) case USB_SPEED_LOW: case USB_SPEED_FULL: case USB_SPEED_HIGH: - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - index = uport->index + xhci->numports_3; - } else { - index = uport->index; - } + index = uport->index + xhci->numports_3; break; case USB_SPEED_SUPER: - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - index = uport->index; - } else { - index = uport->index + xhci->numports_2; - } + index = uport->index; break; default: return NULL; @@ -2779,11 +2771,7 @@ static uint64_t xhci_cap_read(void *ptr, hwaddr reg, unsigned size) ret = 0x20425355; /* "USB " */ break; case 0x28: /* Supported Protocol:08 */ - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - ret = (xhci->numports_2<<8) | (xhci->numports_3+1); - } else { - ret = (xhci->numports_2<<8) | 1; - } + ret = (xhci->numports_2 << 8) | (xhci->numports_3 + 1); break; case 0x2c: /* Supported Protocol:0c */ ret = 0x00000000; /* reserved */ @@ -2795,11 +2783,7 @@ static uint64_t xhci_cap_read(void *ptr, hwaddr reg, unsigned size) ret = 0x20425355; /* "USB " */ break; case 0x38: /* Supported Protocol:08 */ - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - ret = (xhci->numports_3<<8) | 1; - } else { - ret = (xhci->numports_3<<8) | (xhci->numports_2+1); - } + ret = (xhci->numports_3 << 8) | 1; break; case 0x3c: /* Supported Protocol:0c */ ret = 0x00000000; /* reserved */ @@ -3349,13 +3333,8 @@ static void usb_xhci_init(XHCIState *xhci) for (i = 0; i < usbports; i++) { speedmask = 0; if (i < xhci->numports_2) { - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - port = &xhci->ports[i + xhci->numports_3]; - port->portnr = i + 1 + xhci->numports_3; - } else { - port = &xhci->ports[i]; - port->portnr = i + 1; - } + port = &xhci->ports[i + xhci->numports_3]; + port->portnr = i + 1 + xhci->numports_3; port->uport = &xhci->uports[i]; port->speedmask = USB_SPEED_MASK_LOW | @@ -3366,13 +3345,8 @@ static void usb_xhci_init(XHCIState *xhci) speedmask |= port->speedmask; } if (i < xhci->numports_3) { - if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) { - port = &xhci->ports[i]; - port->portnr = i + 1; - } else { - port = &xhci->ports[i + xhci->numports_2]; - port->portnr = i + 1 + xhci->numports_2; - } + port = &xhci->ports[i]; + port->portnr = i + 1; port->uport = &xhci->uports[i]; port->speedmask = USB_SPEED_MASK_SUPER; assert(i < XHCI_MAXPORTS); From patchwork Tue Jun 18 15:59:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805208 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp270205wrx; Tue, 18 Jun 2024 09:02:06 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWoOB4SgKb+6oZSNr2hj5pC//tE4ITSkpOfrZSGqR4kTk5Xmv3yDn+BrT1s40cYF1dI27yTduJk+pFn2z/y0hmN X-Google-Smtp-Source: AGHT+IFg72Y4pmKnLNYBHIy4q/Km7+e9YjgYuVFig7nFXoZCibly1Ya3+NhpG9YWCbFS7Krdl+5/ X-Received: by 2002:a05:6358:e4a9:b0:19f:73f3:410d with SMTP id e5c5f4694b2df-1a1fd443c66mr25273355d.16.1718726525871; Tue, 18 Jun 2024 09:02:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726525; cv=none; d=google.com; s=arc-20160816; b=quSo+TrwTCARSZm3g1tMFySYtm23f6c4DPnbNBZYqGU1zyJA/zSkQ47YJ3pZ8elyNT OT1pmiVmSddxukWLLJIN3Q+NccR31oSPXspIRdM7tZ9tpEDYraLF1zkdp3Dgd0Yfqc5G u1B7Upyxm5wxCs6+F2u+31qjbGpm0v/BfrCYo0pwGwYjAup7NMlq1DnJER9zU51ixVnW WxJ81oXL904vuN1znv2cLi6qmH1ERCaNoAgo7vJvirPLX4i7Dz7oij5d7HivicGxqgdr bkgh0EYBQOThGbsaTxX4xXgbOzBi7AngKpY66y8Gxx4vqTcVtMebgBLt5rpvHPSddyS3 baXw== 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:cc:to :from:dkim-signature; bh=92DFCEMVHNRfMYC9GC2mgRPUeb4rRwPGc14j39ovrXg=; fh=qIwwf5yzYdGUjWHfLdZ1pY/abUtmNziDEAnYJGhPICo=; b=G+zPFfM07sIEbNTKEuPsOmlaz0fIiPvM2RD3uc7Pip8ToAyzHz0zidSidpjJew8o9S U22yWMJe3xFnQkN73FYmqxJGBmOgQwvMZC8GExEnvBfvP3vTmUIlBE6F9TIiSaSJxzRR Q0a25hKVerkwyzQM0qZ9e4ZMAYTbJAFi1sucCuR5V+3FvxcgCP48MS9DoFG8WC4CzEe2 Iq/eoKHr4932gu+NAldKkZLEnrb/EdRGI1ILzda10OaPIrTnMvj0A/60dLVHQqjS76m/ puUSbDo/SzD29WafFwFT1pvOLrlkjtSXEbh18MD4p6PQgE+ObSxA5EiRuWXCSxDENlwO 0lsg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YEES+ZGE; 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 71dfb90a1353d-4ed3f1f8014si1877442e0c.58.2024.06.18.09.02.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:02:05 -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=YEES+ZGE; 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 1sJbH9-0003gW-AL; Tue, 18 Jun 2024 12:01:39 -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 1sJbGl-0003Xo-IF for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:01:16 -0400 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbGj-0006ky-LG for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:01:15 -0400 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2ec17eb4493so67108991fa.2 for ; Tue, 18 Jun 2024 09:01:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726471; x=1719331271; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=92DFCEMVHNRfMYC9GC2mgRPUeb4rRwPGc14j39ovrXg=; b=YEES+ZGEnUhfS7r4WKly+AKEBdTU/ouHBJTPwpTcRh1KIIj9vPqUMxNd6zftkZinIY TPw7hCK0pkhARFfvh5Q6eiOjs7MDWplJxBi1FdLCFW/YlZktkNtsf806GvrbsABA0Pmj hfJidImjNnGx9URRH0x2Zn3mURMAwIdBiZjviEnICnOJngB4UUeOcLHzXav5EpnbUCz5 YPxXDbFnJPe+/fbt2R53gC+CbwaIbgvk5PVNNghqZQzuwzgcb3N8yQk091uetDnm1xmk U3pw4w3LXL4LrhHJUVCSEjv3fbMKiiqnvd9BGQXsbT86kJ8HEKR4KsBS5cFWvkBOkDjv Os8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726471; x=1719331271; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=92DFCEMVHNRfMYC9GC2mgRPUeb4rRwPGc14j39ovrXg=; b=OckGSfghptHzraDTu4JPeZ4FOsyKXwGeEt8cwsfwickScO8GSuHLAso3ETJwyLfAPI ryX+fPZVI2vSpsyESIWeEoNtY3bePHQE3iGSqvQ3IhUJ7NNyPcbn4yr8rjYUmf7DJ+gu UaRAsBL5hYRqKBtqa7Xz6xM8X0r/j7bOUda/6otL5ZYkbxC8KE+9bCupX5MIlwtDzjJ9 yP6GnylSOtvsNTRtcTxGgaqxBMLmYayDw08StBT7fb9kOetzr/MrAxqPi3/QwGxlqxhP 296mvETyDeQsXq05AI3MhyT+8OXw0ACBpC3+MlDo9AKequr4ZgANYjIRQj9pOu/j7OVg l/yA== X-Gm-Message-State: AOJu0YyWltwGCqkR4sU/lZe6Bt3u+VioIynfzO1lmcIMyywSETWWovdQ TWe67ValpyQLxgFphbRcudB1sE4QlUdPh6zXPQwr++Dih3pPXcy0cgsE0Os6iSxgsMtoE/wxdWZ 1 X-Received: by 2002:a05:6512:329c:b0:52c:ba7d:f032 with SMTP id 2adb3069b0e04-52ccaa32987mr43817e87.16.1718726471046; Tue, 18 Jun 2024 09:01:11 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56db674esm626117466b.83.2024.06.18.09.01.09 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:01:10 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Igor Mammedov Subject: [PULL 05/76] hw/i386/acpi: Remove PCMachineClass::legacy_acpi_table_size Date: Tue, 18 Jun 2024 17:59:27 +0200 Message-ID: <20240618160039.36108-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::235; envelope-from=philmd@linaro.org; helo=mail-lj1-x235.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 PCMachineClass::legacy_acpi_table_size was only used by the pc-i440fx-2.0 machine, which got removed. Remove it and simplify acpi_build(). Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240617071118.60464-6-philmd@linaro.org> --- include/hw/i386/pc.h | 1 - hw/i386/acpi-build.c | 63 +++++++++----------------------------------- 2 files changed, 12 insertions(+), 52 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 3e606949fb..434e531160 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -103,7 +103,6 @@ struct PCMachineClass { /* ACPI compat: */ bool has_acpi_build; bool rsdp_in_ram; - int legacy_acpi_table_size; unsigned acpi_data_size; int pci_root_uid; diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 53f804ac16..f5d74e2b4b 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -85,7 +85,6 @@ * a little bit, there should be plenty of free space since the DSDT * shrunk by ~1.5k between QEMU 2.0 and QEMU 2.1. */ -#define ACPI_BUILD_LEGACY_CPU_AML_SIZE 97 #define ACPI_BUILD_ALIGN_SIZE 0x1000 #define ACPI_BUILD_TABLE_SIZE 0x20000 @@ -2499,13 +2498,12 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) X86MachineState *x86ms = X86_MACHINE(machine); DeviceState *iommu = pcms->iommu; GArray *table_offsets; - unsigned facs, dsdt, rsdt, fadt; + unsigned facs, dsdt, rsdt; AcpiPmInfo pm; AcpiMiscInfo misc; AcpiMcfgInfo mcfg; Range pci_hole = {}, pci_hole64 = {}; uint8_t *u; - size_t aml_len = 0; GArray *tables_blob = tables->table_data; AcpiSlicOem slic_oem = { .id = NULL, .table_id = NULL }; Object *vmgenid_dev; @@ -2551,19 +2549,12 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) build_dsdt(tables_blob, tables->linker, &pm, &misc, &pci_hole, &pci_hole64, machine); - /* Count the size of the DSDT and SSDT, we will need it for legacy - * sizing of ACPI tables. - */ - aml_len += tables_blob->len - dsdt; - /* ACPI tables pointed to by RSDT */ - fadt = tables_blob->len; acpi_add_table(table_offsets, tables_blob); pm.fadt.facs_tbl_offset = &facs; pm.fadt.dsdt_tbl_offset = &dsdt; pm.fadt.xdsdt_tbl_offset = &dsdt; build_fadt(tables_blob, tables->linker, &pm.fadt, oem_id, oem_table_id); - aml_len += tables_blob->len - fadt; acpi_add_table(table_offsets, tables_blob); acpi_build_madt(tables_blob, tables->linker, x86ms, @@ -2694,49 +2685,19 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) * too simple to be enough. 4k turned out to be too small an * alignment very soon, and in fact it is almost impossible to * keep the table size stable for all (max_cpus, max_memory_slots) - * combinations. So the table size is always 64k for pc-i440fx-2.1 - * and we give an error if the table grows beyond that limit. - * - * We still have the problem of migrating from "-M pc-i440fx-2.0". For - * that, we exploit the fact that QEMU 2.1 generates _smaller_ tables - * than 2.0 and we can always pad the smaller tables with zeros. We can - * then use the exact size of the 2.0 tables. - * - * All this is for PIIX4, since QEMU 2.0 didn't support Q35 migration. + * combinations. */ - if (pcmc->legacy_acpi_table_size) { - /* Subtracting aml_len gives the size of fixed tables. Then add the - * size of the PIIX4 DSDT/SSDT in QEMU 2.0. - */ - int legacy_aml_len = - pcmc->legacy_acpi_table_size + - ACPI_BUILD_LEGACY_CPU_AML_SIZE * x86ms->apic_id_limit; - int legacy_table_size = - ROUND_UP(tables_blob->len - aml_len + legacy_aml_len, - ACPI_BUILD_ALIGN_SIZE); - if ((tables_blob->len > legacy_table_size) && - !pcmc->resizable_acpi_blob) { - /* Should happen only with PCI bridges and -M pc-i440fx-2.0. */ - warn_report("ACPI table size %u exceeds %d bytes," - " migration may not work", - tables_blob->len, legacy_table_size); - error_printf("Try removing CPUs, NUMA nodes, memory slots" - " or PCI bridges.\n"); - } - g_array_set_size(tables_blob, legacy_table_size); - } else { - /* Make sure we have a buffer in case we need to resize the tables. */ - if ((tables_blob->len > ACPI_BUILD_TABLE_SIZE / 2) && - !pcmc->resizable_acpi_blob) { - /* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots. */ - warn_report("ACPI table size %u exceeds %d bytes," - " migration may not work", - tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2); - error_printf("Try removing CPUs, NUMA nodes, memory slots" - " or PCI bridges.\n"); - } - acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE); + /* Make sure we have a buffer in case we need to resize the tables. */ + if ((tables_blob->len > ACPI_BUILD_TABLE_SIZE / 2) && + !pcmc->resizable_acpi_blob) { + /* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots. */ + warn_report("ACPI table size %u exceeds %d bytes," + " migration may not work", + tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2); + error_printf("Try removing CPUs, NUMA nodes, memory slots" + " or PCI bridges.\n"); } + acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE); acpi_align_size(tables->linker->cmd_blob, ACPI_BUILD_ALIGN_SIZE); From patchwork Tue Jun 18 15:59:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805212 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp270580wrx; Tue, 18 Jun 2024 09:02:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVe69oiGBOd4WlXBOlS7ih1zi8vrMaBFEun8hA4f84uCWt6FSQh0i4Uy2nPlzseYkcoi7SxI3WoH+RdOhre9DeD X-Google-Smtp-Source: AGHT+IGRt9s01DR/rMUT8OoF7YtqpwNhan05o7wma4to3ccPI6+dzygfjePCXcmNbXMEBBsBUtKM X-Received: by 2002:ad4:55e3:0:b0:6b2:1094:83bf with SMTP id 6a1803df08f44-6b501df81a9mr1879016d6.4.1718726559185; Tue, 18 Jun 2024 09:02:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726559; cv=none; d=google.com; s=arc-20160816; b=SPPuHgMcYYL0nQia3l07YEoigRJvPeAWJpbh1qtuDMEN1AQZ4VZwrzBUWHnljJuX3i GmuHV65pOoqDrHhYzLYQWso3hsxAT9OkPi3QyIuabQFMSP3/rbC9C0e6tPhESb2zAf1A qmiN+4rhbQOTNI76SrD06ndwCRk6VOfi3PtNiqc4W5KfKeBk8UgreSOMUDLEvHImPgTC Fo5Fik6K0xk9ua5ikGgvtuyi98udtwW3HZuBjf/P2Q5GUxEBTJZioWVMwWHROhriE4PI m9nKko16RhgdamsxXT/c2CeuPmSjV7m3LtRaxxzXiKF5LEgRdnxNd5rgAB6EuaONgQpQ 4/2w== 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:cc:to :from:dkim-signature; bh=qhApRstys1OLcNpLtMQ96a66duaItivdCKXVXSN0oVc=; fh=QeIS5kb1Uh2g1z6dWJxoYMIPD1Pl4adL6YUWYeE5yJk=; b=S8nPDTWG4nlEQ/mK5dx5FR4LBJQwPX8CI5qgJ+lu95MmpgepW/nTF1M3Ya9tAM6Ufw 0Bd2KHrO5TIecKxMwdmcKLyN7w/5FQIwR606MirdOo1HVrjbmqFXrBJm+pmuO3+jfiyv xLjRwWodFKEzOybzuhe8ew0FvEtd1nQYFzxZJYZqz2beXgX7TvAtw+MQjzahFRnBC5Ut JEhqTOl0O6niQLW6vUXUg/yDOsK/85HgYeOgWKnarvWRJwGaV8qgICAXNWo1ye2BNsT6 tJyP9Ls5QKFrj83kK9tOsqynQQHsMuHxNATT3wEBz0IwRF3Q2+LLJz5bC6wEoyOZnH76 9V9w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mdYj28TV; 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 d75a77b69052e-441f2fb74e2si122781881cf.422.2024.06.18.09.02.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:02:39 -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=mdYj28TV; 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 1sJbH9-0003fz-AS; Tue, 18 Jun 2024 12:01:39 -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 1sJbGr-0003Zz-Aj for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:01:23 -0400 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbGp-0006lR-Cp for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:01:20 -0400 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a63359aaacaso884864166b.1 for ; Tue, 18 Jun 2024 09:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726477; x=1719331277; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qhApRstys1OLcNpLtMQ96a66duaItivdCKXVXSN0oVc=; b=mdYj28TVGfVEip245juIWpR4Gp1vblW3GuwlagPsP0GfsPXwkzK+J8CkedJoWLgDeZ Eg0qEGToMmFEe5OI0dV+nMZji6AuZTduf9DVNTe7NRdWUkyU7c9NsV4mlxryWkKPXK9H XjGVBj9ljgoUY4jJmQklAjRTwJs+H+45SmSG2hUI+NCJrWOTv4OBcDPqZgPIEtoOzD1b Ko41My3c0NXAcVFUs5urWEvZwnolk02dWu1QOK5H1CC3O27zIvYZdhRX3Zk0NdM+HVoL CuD7VKRmfkbmfLr54s5SnITD+VYCYrJohEaTD9SmeS3ULHIYWmB8x06pGGbbXcU5/ES9 XSRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726477; x=1719331277; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qhApRstys1OLcNpLtMQ96a66duaItivdCKXVXSN0oVc=; b=Kf+9stOG/aZlxo8T7/mir39g4KsucAliIKv1fE6BKjXBi/NcsRaJ4zlScVwD9R1IBt UulZA4dUg6DYKNJMpWDvQ5MmTRcAtN64RgsFyzG6GIy99f53h2zZvJQ8Mb9LLe0iXtL0 mDs42Yts358k7INUGjkX+FHKFeS/MZznT1cFE18Qmcmoev27pdTt4/U/dH5Pd1bjJ0rq fZ6epqpzVon8vKmnBBUYTPWRjhGmpoapxHGzCBSO3TRLrMU62yxOM2Non5Ylo8Ze5RH6 okQ39DUm4wy24blNclqDT6DfQVI4S1bX7MGCQ3pKH0mkstuMiw0YRFMDySLJkqRz6i78 +cgg== X-Gm-Message-State: AOJu0YzAIqzCszJc1D/JwsdHnA0Tp2BKyrIhNZm2i4tEgToqWrjkRKYr pwiVn2vS/D/f6hvpyF/Ay1t/Kihg7mELdaBoz65gjzp0rn1An9yJ6BdO3dmsQkAY95klFa3/Iea E X-Received: by 2002:a17:906:4953:b0:a6f:df9:6da4 with SMTP id a640c23a62f3a-a6f60d42940mr956115266b.44.1718726477398; Tue, 18 Jun 2024 09:01:17 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f993da434sm83740666b.221.2024.06.18.09.01.16 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:01:17 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Zhao Liu , Igor Mammedov Subject: [PULL 06/76] hw/acpi/ich9: Remove 'memory-hotplug-support' property Date: Tue, 18 Jun 2024 17:59:28 +0200 Message-ID: <20240618160039.36108-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=philmd@linaro.org; helo=mail-ej1-x62d.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 No external code sets the 'memory-hotplug-support' property, remove it. Suggested-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Message-Id: <20240617071118.60464-7-philmd@linaro.org> --- hw/acpi/ich9.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index 573d032e8e..9b605af21a 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -351,21 +351,6 @@ static void ich9_pm_get_gpe0_blk(Object *obj, Visitor *v, const char *name, visit_type_uint32(v, name, &value, errp); } -static bool ich9_pm_get_memory_hotplug_support(Object *obj, Error **errp) -{ - ICH9LPCState *s = ICH9_LPC_DEVICE(obj); - - return s->pm.acpi_memory_hotplug.is_enabled; -} - -static void ich9_pm_set_memory_hotplug_support(Object *obj, bool value, - Error **errp) -{ - ICH9LPCState *s = ICH9_LPC_DEVICE(obj); - - s->pm.acpi_memory_hotplug.is_enabled = value; -} - static bool ich9_pm_get_cpu_hotplug_legacy(Object *obj, Error **errp) { ICH9LPCState *s = ICH9_LPC_DEVICE(obj); @@ -445,9 +430,6 @@ void ich9_pm_add_properties(Object *obj, ICH9LPCPMRegs *pm) NULL, NULL, pm); object_property_add_uint32_ptr(obj, ACPI_PM_PROP_GPE0_BLK_LEN, &gpe0_len, OBJ_PROP_FLAG_READ); - object_property_add_bool(obj, "memory-hotplug-support", - ich9_pm_get_memory_hotplug_support, - ich9_pm_set_memory_hotplug_support); object_property_add_bool(obj, "cpu-hotplug-legacy", ich9_pm_get_cpu_hotplug_legacy, ich9_pm_set_cpu_hotplug_legacy); From patchwork Tue Jun 18 15:59:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805214 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp271403wrx; Tue, 18 Jun 2024 09:03:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXdwHEWr/SXlSRP6fQWjlHjNEx2s7BEzMd0Ti0rNeR3LOt9mJ1Yf74iHulQIVXHmvUF/F0WRR25rsPAffexyKgu X-Google-Smtp-Source: AGHT+IExpvGqzGzOeBvxXrW9bj/m/SlVVZ423+EBxhy1zGQPEgVQx2GLx3vaXEuz1MTzzk8rilqg X-Received: by 2002:a05:620a:2681:b0:795:5d6f:8bbd with SMTP id af79cd13be357-79bb3ee352emr10168685a.73.1718726629230; Tue, 18 Jun 2024 09:03:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726629; cv=none; d=google.com; s=arc-20160816; b=X+/Ti9sv5PUZxG8iDhpehFsvyNF6mnlgaL/0aOqDaqlDh3/uSqHlQY5OuPs9TaCuJF 4+lXG0+PCvUZiFahUJ+qN4Uk4jv9/TOlvbf3VcfUZa7MjEfqsqVuv2aIWwqFuGB0Y/3r KuZQGayvtTWha+hzpSbJ2hE2jJRMUXZI2cKBLnFiwGs7N6sbQTutG6Q+8qTlao9V5xnG kaNkX/HXGUkcZ8oW0UZ9M1kxxe5eRxYHnzLmdGVj1K1HijIkCf8p2/6VeifQa3O1AXPP 0izHrNU4UFLaX4WsEEpEg/C/IhEg/uIZKxO/HbHU//H8YtCMMvy2R9SJbxv0QlVltIny RVXg== 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:cc:to :from:dkim-signature; bh=wZClkhebefv0pxqdA8l3mJykMlig1mw3XzgkSFFa0iE=; fh=qIwwf5yzYdGUjWHfLdZ1pY/abUtmNziDEAnYJGhPICo=; b=QnSzntHsyrgyDuC4rEwW4g2YaUjEACCVxiUxhsW1mFWbf52x/wP72ft+5Mb7d4+ALd ULBUifhot7wZvDy0ZleB6nblXvTL4FiRXv073r+tzxv92ZGpG+oGIFW+7yGNP83wYVJg RL/tJG5gHLH3iHKNwLKbqdcs4kI35rieW8UYE7vREVHNYOn6km8vmpeu5X41565jEkBT uWX2u82WJIp28r/6AM3G6AXXd6ohX7krZ+d0EU/X4zRGAIcqlr8Ygus20bTWFNa2Y6Wz V/8+MKpBWffvU37kQ+woQnup6/kqbi2vmsXQHN05TE5jwQduntTlzgLpQwG/3EIrXL9/ Z4EA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="u/m3GJYZ"; 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 af79cd13be357-79bb1a3fac1si51623185a.354.2024.06.18.09.03.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:03:49 -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="u/m3GJYZ"; 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 1sJbHH-0003xi-8A; Tue, 18 Jun 2024 12:01:48 -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 1sJbGz-0003dE-B8 for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:01:31 -0400 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbGw-0006lu-C4 for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:01:28 -0400 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-57c83100c5fso6174655a12.3 for ; Tue, 18 Jun 2024 09:01:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726483; x=1719331283; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wZClkhebefv0pxqdA8l3mJykMlig1mw3XzgkSFFa0iE=; b=u/m3GJYZeEtuf2iSxdVZ5xlgRgW7qcz2lyRSDrwHmE7TrcS9JAOIFEaaCaTwKVOCNy 8AxN8rc2XKc2mWQAj623yk+YJzQB5HLUklAk6eUjNwvysdvFAWcEwVlaOiNBOCo+t58L dF8I7G2V0wF9kpy+FNM2nnuEdn12NAkNkfoclkbNdXFckR1zF0CsGFpYjvoQLTDp2YoT TGvPAIvQ5nN5LO7WRXxBJPLNxY9TTIGtKp6Esf6iu5LJc3zluOOF/+hjEPlQy4CUGtzF 1BxbL4b//fqP/5DevU/Krf73+DV179F84xvXTS0mP/Wc90q2eeVd3YFJuhKnR2qgMY04 bD/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726483; x=1719331283; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wZClkhebefv0pxqdA8l3mJykMlig1mw3XzgkSFFa0iE=; b=cAudWue8BUmfnase5CVtfrFXVI5kU9o5lJU8jCO1qwdQwviM6Q8eZTrtredTWxOrd5 xZ/mu/QQ/s4Y2Uz0rxqofX6yVR/nyHD5fc0vpO+7Gi/Jlcl8ObtiZl+bBnfh7FI65mNG rwAP5OMIYx0bNDhFeSq1NSw7SOT6DPgq/lzyMX9QxGnXsuEAiNcTGI9z87a1XNDQHU4/ MQVOk7Wsjp52BNVkdieu21J7SAuTw9glf1iXwmSjQTRPO2sQci1ujUcsd7qiD+j8k4Nw Ve6lXdrJWKjFv6mZ48WzPQkdXC54IIzyM6fnMY4EFgVVV7S4T5ZjQ34QXW+HR+zxs4OU LDUQ== X-Gm-Message-State: AOJu0YwrEMPinKVqlna+mwUOtXZWUGC++PxoZJ7w405tywxqaJ92viyL Ie0ndQONaN9exe1uvEWXPbtfyAq8O3LSlaNYj1UN0D1QwHjRHeJv7xenMD3UxUXVcvE0yiN7PW4 f X-Received: by 2002:a50:ab1d:0:b0:57c:6463:9960 with SMTP id 4fb4d7f45d1cf-57cbd8e7abemr7728683a12.37.1718726483157; Tue, 18 Jun 2024 09:01:23 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57cb72e9515sm7906127a12.41.2024.06.18.09.01.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:01:22 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Igor Mammedov Subject: [PULL 07/76] hw/acpi/ich9: Remove dead code related to 'acpi_memory_hotplug' Date: Tue, 18 Jun 2024 17:59:29 +0200 Message-ID: <20240618160039.36108-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=philmd@linaro.org; helo=mail-ed1-x52c.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 acpi_memory_hotplug::is_enabled is set to %true once via ich9_lpc_initfn() -> ich9_pm_add_properties(). No need to check it, so remove now dead code. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Message-Id: <20240617071118.60464-8-philmd@linaro.org> --- hw/acpi/ich9.c | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index 9b605af21a..02d8546bd3 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -153,17 +153,10 @@ static int ich9_pm_post_load(void *opaque, int version_id) .offset = vmstate_offset_pointer(_state, _field, uint8_t), \ } -static bool vmstate_test_use_memhp(void *opaque) -{ - ICH9LPCPMRegs *s = opaque; - return s->acpi_memory_hotplug.is_enabled; -} - static const VMStateDescription vmstate_memhp_state = { .name = "ich9_pm/memhp", .version_id = 1, .minimum_version_id = 1, - .needed = vmstate_test_use_memhp, .fields = (const VMStateField[]) { VMSTATE_MEMORY_HOTPLUG(acpi_memory_hotplug, ICH9LPCPMRegs), VMSTATE_END_OF_LIST() @@ -335,11 +328,9 @@ void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm, qemu_irq sci_irq) legacy_acpi_cpu_hotplug_init(pci_address_space_io(lpc_pci), OBJECT(lpc_pci), &pm->gpe_cpu, ICH9_CPU_HOTPLUG_IO_BASE); - if (pm->acpi_memory_hotplug.is_enabled) { - acpi_memory_hotplug_init(pci_address_space_io(lpc_pci), OBJECT(lpc_pci), - &pm->acpi_memory_hotplug, - ACPI_MEMORY_HOTPLUG_BASE); - } + acpi_memory_hotplug_init(pci_address_space_io(lpc_pci), OBJECT(lpc_pci), + &pm->acpi_memory_hotplug, + ACPI_MEMORY_HOTPLUG_BASE); } static void ich9_pm_get_gpe0_blk(Object *obj, Visitor *v, const char *name, @@ -460,12 +451,7 @@ void ich9_pm_device_pre_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, return; } - if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM) && - !lpc->pm.acpi_memory_hotplug.is_enabled) { - error_setg(errp, - "memory hotplug is not enabled: %s.memory-hotplug-support " - "is not set", object_get_typename(OBJECT(lpc))); - } else if (object_dynamic_cast(OBJECT(dev), TYPE_CPU)) { + if (object_dynamic_cast(OBJECT(dev), TYPE_CPU)) { uint64_t negotiated = lpc->smi_negotiated_features; if (negotiated & BIT_ULL(ICH9_LPC_SMI_F_BROADCAST_BIT) && @@ -509,8 +495,7 @@ void ich9_pm_device_unplug_request_cb(HotplugHandler *hotplug_dev, { ICH9LPCState *lpc = ICH9_LPC_DEVICE(hotplug_dev); - if (lpc->pm.acpi_memory_hotplug.is_enabled && - object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) { + if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) { acpi_memory_unplug_request_cb(hotplug_dev, &lpc->pm.acpi_memory_hotplug, dev, errp); @@ -545,8 +530,7 @@ void ich9_pm_device_unplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, { ICH9LPCState *lpc = ICH9_LPC_DEVICE(hotplug_dev); - if (lpc->pm.acpi_memory_hotplug.is_enabled && - object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) { + if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) { acpi_memory_unplug_cb(&lpc->pm.acpi_memory_hotplug, dev, errp); } else if (object_dynamic_cast(OBJECT(dev), TYPE_CPU) && !lpc->pm.cpu_hotplug_legacy) { From patchwork Tue Jun 18 15:59:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805237 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp274037wrx; Tue, 18 Jun 2024 09:08:01 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXKCdjA7IiKN26uj2wicxcUVTYFakTMKTOAut0DOrLRCkL7pl0YTNClGcnRVJaZFk3zkkFZKusiMU8liu7bDc/L X-Google-Smtp-Source: AGHT+IFLvz7NX4qzHfDhJohGbZ465uWH8+qqf7sFNGFNZF3uSAsYcLnjc2uCwwmeLoSWMN8BpnzI X-Received: by 2002:a25:f622:0:b0:dfb:aee:1d3c with SMTP id 3f1490d57ef6-e02be20b53dmr335713276.46.1718726881013; Tue, 18 Jun 2024 09:08:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726880; cv=none; d=google.com; s=arc-20160816; b=xVQTPuvKxqpCWAvS324Z1rZTtwCAVd1RGwi04RBEwAJEmflkfC/uYTj6VsALv/xG/B FiuoNUJtLt0cAjLXwnhcyCs8LfQDTVJARE+jngS2/HywqLB1N09F/VogqMDUxHIWfMK/ QRss5G/UtUbQ0bBqP/7Ytn02KfKVSQlliuDzLdf89j252cYzoI+uhthnI3hztfcGoKX8 oV3gw7Jg8KvmxWYASU+oZl9+ybRkjsEzT8M33isF0eMq9RIGlW4Q6hI2xRRO8GaDUPm7 O/CwPcQBm0YZJwH5m6AFiP7pwvGYWVuVlnuzWViwWouoeBIx7//4yrJM8fqwhf+FpUAt o0wg== 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:cc:to :from:dkim-signature; bh=GKwfCk465sr7WgOHafBJgyo22SuG659wATLOZz6Tx48=; fh=QeIS5kb1Uh2g1z6dWJxoYMIPD1Pl4adL6YUWYeE5yJk=; b=w/jLwMXYp3H/amkivzTA6rpyZtimhzt+6IYpqxPVLU+bNkJK6aaWKTl5qV1q7Mbcef BrM2PhX7W4SmomCqPlBAH4g7bI3qh3HPebsS/g7YudVosaGh0CnOovWPkHzaQOFfLuCv M8Imc+gGA9idBwWYENFWvfOfh2xQQOyPrjaFdS6OAL631txG9AZ3oUG2uEcxrfT9Xoei md016KJPncpITq/eyXPwCW6jzNLWlZtR463X/McF73ryITJqBDsvHBCNuv/mEc6g8Ths Nx43GqN8MIylAiaSzAO3dOqdoJFqdyiPiGjUnFANz+/hDl9ms/gx7ncQy+7T7uBC5m35 YzMw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oEJUch4D; 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 3f1490d57ef6-dff04602934si4550182276.197.2024.06.18.09.08.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:08:00 -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=oEJUch4D; 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 1sJbHD-0003rZ-Vz; Tue, 18 Jun 2024 12:01:44 -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 1sJbH4-0003gV-6q for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:01:37 -0400 Received: from mail-ej1-x636.google.com ([2a00:1450: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 1sJbH0-0006mH-Ra for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:01:33 -0400 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a6f253a06caso672301366b.1 for ; Tue, 18 Jun 2024 09:01:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726489; x=1719331289; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GKwfCk465sr7WgOHafBJgyo22SuG659wATLOZz6Tx48=; b=oEJUch4Dc/caW6XAjaleA1rEpatNBqm53C76Iw0TZQSduwVuzdyc6m6+FbwdzZ+lef Yw0qxKXpK1ePsD0olMUoTvKNBw9AA6GEVccXGC3G6LqwqhukLfDGda6gPTW8n99L8wUj pDAoQeLaaXja8jlLKf1XrGUB66poVhJrZp2S6bUspJhbGZPWIMYCbjwtYLN6GWrApZ5+ zlYN/Nk6+LNHnavDFRsYJmk+upuqF+Rw6LUdpEkA5dVtz9Ux3Z9OtXnC2UuJtgnrnYIW Z05o6y6HB0mKc3X5n5Fi9+/sM9ExnwJNdvd5O+jDECJyGS1uSXfYIGVLQUdV/vxhGufO ue4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726489; x=1719331289; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GKwfCk465sr7WgOHafBJgyo22SuG659wATLOZz6Tx48=; b=mPOQNP59bPVEA6iicOWp7VrDf2cCdrQmz6LYzdqcekz12foPm1cZz16XXI1kvDz9ts 9I+rarTKICvJf8RhvFHqAJxdc+eEnFc1gzY9wpL71j2bPZp1XoSit7I1mf4ZWJ/JDoDQ NWjkKEfo0jFnVOFjavUa0BFAUOb58V5Y4y9FzxsxHhVBEwXjHbXPKPY+S3ZJLLheqSJY WXYhNCsX4hlfdpD8fCAcY5XNAtjuJiMMY4XPf7auIWDBA/5TdD3qJWLFPTNj92OoIdg2 O6FE8elQdnXm4H1EN107l40qCYrm1aKYGhPyDgmk8huFmbFxsaY7GRghGQtmuP52vgff 2eyg== X-Gm-Message-State: AOJu0Yw0c3z8k9glS9Ab1J4lH7hMLrLGhGfv9IkHlgAYDQYsz+uhRWjo ef5FWOztiot7qFMJeZpGPq+FzRaADV1hwcZW3y+i8ml+lswSIHBRyQcRsuhEFLqQFqdk4gFqEY1 T X-Received: by 2002:a17:906:fb8f:b0:a6f:49bc:e858 with SMTP id a640c23a62f3a-a6f60dc5110mr1012212966b.53.1718726489107; Tue, 18 Jun 2024 09:01:29 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f57552633sm625781966b.191.2024.06.18.09.01.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:01:28 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Zhao Liu , Igor Mammedov Subject: [PULL 08/76] hw/i386/pc: Remove deprecated pc-i440fx-2.1 machine Date: Tue, 18 Jun 2024 17:59:30 +0200 Message-ID: <20240618160039.36108-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=philmd@linaro.org; helo=mail-ej1-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, 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 pc-i440fx-2.1 machine was deprecated for the 8.2 release (see commit c7437f0ddb "docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated"), time to remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Message-Id: <20240617071118.60464-9-philmd@linaro.org> --- docs/about/deprecated.rst | 2 +- docs/about/removed-features.rst | 2 +- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 7 ------- hw/i386/pc_piix.c | 23 ----------------------- 5 files changed, 2 insertions(+), 35 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index e12eab1f72..e332eb46e9 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -212,7 +212,7 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name better reflects the way this property affects all random data within the device tree blob, not just the ``kaslr-seed`` node. -``pc-i440fx-2.1`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) +``pc-i440fx-2.2`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These old machine types are quite neglected nowadays and thus might have diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index f84bfaf2b6..347e04e50e 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -948,7 +948,7 @@ mips ``fulong2e`` machine alias (removed in 6.0) This machine has been renamed ``fuloong2e``. -``pc-0.10`` up to ``pc-i440fx-2.0`` (removed in 4.0 up to 9.0) +``pc-0.10`` up to ``pc-i440fx-2.1`` (removed in 4.0 up to 9.0) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These machine types were very old and likely could not be used for live diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 434e531160..0d730318fe 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -314,9 +314,6 @@ extern const size_t pc_compat_2_3_len; extern GlobalProperty pc_compat_2_2[]; extern const size_t pc_compat_2_2_len; -extern GlobalProperty pc_compat_2_1[]; -extern const size_t pc_compat_2_1_len; - #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \ { \ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index d0f2628d46..b0b8ecd64d 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -313,13 +313,6 @@ GlobalProperty pc_compat_2_2[] = { }; const size_t pc_compat_2_2_len = G_N_ELEMENTS(pc_compat_2_2); -GlobalProperty pc_compat_2_1[] = { - PC_CPU_MODEL_IDS("2.1.0") - { "coreduo" "-" TYPE_X86_CPU, "vmx", "on" }, - { "core2duo" "-" TYPE_X86_CPU, "vmx", "on" }, -}; -const size_t pc_compat_2_1_len = G_N_ELEMENTS(pc_compat_2_1); - GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) { GSIState *s; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index a750a0e6ab..e0b421dd51 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -66,7 +66,6 @@ #include "hw/hyperv/vmbus-bridge.h" #include "hw/mem/nvdimm.h" #include "hw/i386/acpi-build.h" -#include "kvm/kvm-cpu.h" #include "target/i386/cpu.h" #define XEN_IOAPIC_NUM_PIRQS 128ULL @@ -435,12 +434,6 @@ static void pc_compat_2_2_fn(MachineState *machine) pc_compat_2_3_fn(machine); } -static void pc_compat_2_1_fn(MachineState *machine) -{ - pc_compat_2_2_fn(machine); - x86_cpu_change_kvm_default("svm", NULL); -} - #ifdef CONFIG_ISAPC static void pc_init_isa(MachineState *machine) { @@ -866,22 +859,6 @@ static void pc_i440fx_2_2_machine_options(MachineClass *m) DEFINE_I440FX_MACHINE(v2_2, "pc-i440fx-2.2", pc_compat_2_2_fn, pc_i440fx_2_2_machine_options); -static void pc_i440fx_2_1_machine_options(MachineClass *m) -{ - PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - - pc_i440fx_2_2_machine_options(m); - m->hw_version = "2.1.0"; - m->default_display = NULL; - compat_props_add(m->compat_props, hw_compat_2_1, hw_compat_2_1_len); - compat_props_add(m->compat_props, pc_compat_2_1, pc_compat_2_1_len); - pcmc->smbios_uuid_encoded = false; - pcmc->enforce_aligned_dimm = false; -} - -DEFINE_I440FX_MACHINE(v2_1, "pc-i440fx-2.1", pc_compat_2_1_fn, - pc_i440fx_2_1_machine_options); - #ifdef CONFIG_ISAPC static void isapc_machine_options(MachineClass *m) { From patchwork Tue Jun 18 15:59:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805270 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp276219wrx; Tue, 18 Jun 2024 09:11:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV9Bi9fRuHHNILvDb7OlE0qaGcctA7FoQM+06mE7lJzBj0OjWHDOf0lW2vI47pJ88QiDlIvwOFoK64Yje32TB7v X-Google-Smtp-Source: AGHT+IE/+6tgkBTNUbLrzRuY2tjmHguOy5vrcH+AbXH+lawNtL8ZaGV4bBrw6z1uXsm0wUp6hF6P X-Received: by 2002:a05:622a:210:b0:43a:ea41:c9cd with SMTP id d75a77b69052e-444a7a876a6mr2910041cf.59.1718727109195; Tue, 18 Jun 2024 09:11:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727109; cv=none; d=google.com; s=arc-20160816; b=rTpLa+razs8vMbtbYkiGQkSNSgSpYFT3P9ZBu5IkPFYM0Z/m+iQGqpXCu4v8yCN4E8 3F1ycGpKuIJrQgJ1B2o9r4Yc6vN/kV0yCZq+WviFW+O0tfTzV0hAYccKkO/ubM+M52yx i6EXjizUgXga9s/DTHOmjJgVkAbkcjogpe0tOq25MvM7lJ78lb+dqi8KxTXkAJylDm/4 NP2UrDfQ12uSTVmP1hs4A+fEbldZQGNIeII84Jq7bLenfNi16DFKTXqTEPrLOsTEUo0v AWBHM36FLyUaqehEIDuoqZaqe7HCmBGD5YMdo5SVhMRNoaBjwA4JYfMqLXQ7ovvdEeSs +sBw== 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:cc:to :from:dkim-signature; bh=j6xz4zvShz/n3G+e5wncGUZkG18e32dlxx/8hJCVqxk=; fh=QeIS5kb1Uh2g1z6dWJxoYMIPD1Pl4adL6YUWYeE5yJk=; b=XtLEg+u0bht3xi1nYN1YqGBCm6EIQBop/CMAifx6s8bmf227ICVZiIosSQ0wnRZk1w 5yaUHvzw3kNM3acPexqpXwFqapy+qVBvDGJWA5+TlBdHUZc5nVueRm9Fcuw50cnznz4d 8RRva99K+POga7XSf1FwZLUUIYkSDpBnV0BPeobdZWL5shM87oPAM+U1U/W9hUCK9EGG cUGo+B8P+2d3NiavulReECxTFLrvCuXQC67Dx2ReSS1kP2DM2goMP5AWZTXiFMgZ110X KpvPGMT70LHVgm0dVgTSLkhn9KEq3HLzrDz7nXnx/GOt4RhX8AqEFiMwneWn0R+EKns3 rp4Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z0x+yBPD; 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 d75a77b69052e-441f2eaa2dcsi123250511cf.348.2024.06.18.09.11.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:11:49 -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=Z0x+yBPD; 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 1sJbHN-00048d-5M; Tue, 18 Jun 2024 12:01:53 -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 1sJbHB-0003qZ-IH for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:01:42 -0400 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbH7-0006nV-IR for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:01:40 -0400 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-57cf8880f95so1500611a12.3 for ; Tue, 18 Jun 2024 09:01:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726496; x=1719331296; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=j6xz4zvShz/n3G+e5wncGUZkG18e32dlxx/8hJCVqxk=; b=Z0x+yBPDy5VjhLSP1zCZE1sGQSaKP/KfLkcXWh7j28a5xBqTYS62JzmNErsuKO0FVk 7zigvPUZ9bEU17PoGQ7jSkZ1hs0tfm7pwa7BfNWtD/7Rr+RrNferbTxGbcuMch57vRbP cd/hAVJ7sUkVdO2ntwsl2bi24RYUFOtRokGOf04UdIymjiWzxtmIZ0KWhxf1EOyugrxf iNGJo1GA69Ej/Yx5yClncqCbpl8iZgZbv4rf+eGm82v6bKUtEd+HEwo7nEevkW0+L+eA vOnNUtMPU/d03wXlrBU0qtjrPYPOvDzMMWg+bjLFhCyYF3/0Hgmfmgw+ciL9woujJHNu bDCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726496; x=1719331296; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=j6xz4zvShz/n3G+e5wncGUZkG18e32dlxx/8hJCVqxk=; b=tGjndogxfpe5cOxf8gZtnb8NQV5EUdoboDSzsyTzuu13RZD5uiNbJ/ukSwzQxiTb4c 4WUYiTja/ITcQDWRqlwMwyFKxNoCySsPBgAL7pX9SYWkeXaBryL8egeJmvyYzaK5+9pA onKyfadGcxGhIOtdUgnr7KjXkZfkiIxL1SImb56L1mgQdchvENXdCTMKtqDhsjllF4Qb 9p9+RghbtS3vmiNJpOxgVAy60uMxr/gOp16Q02xhz83nicMMylYb0dX7VXRxfrmtWBw0 xvPz7PvbZWFpK2ihugh3EJzfdfNTFOrf2Xko5noOwEqsaBxFEfTBDm9/h22WjSbHOcsG Rh6w== X-Gm-Message-State: AOJu0YzYAyEHyJULepzl5A/MBMjYkwSs9OkHKqCY9UHi8/cKZkNQGf/4 0XP6+OpEDi0FBaOB6O+GkYGevGcjQ3M3ccHKbEPi4jswdNhKfc26gWf8pYMv6BfLBsNvMy7Eofs b X-Received: by 2002:a50:96c3:0:b0:57c:9c5d:d18e with SMTP id 4fb4d7f45d1cf-57cbd6a85e1mr10899410a12.36.1718726495645; Tue, 18 Jun 2024 09:01:35 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57cb72da708sm7888029a12.37.2024.06.18.09.01.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:01:35 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Zhao Liu , Igor Mammedov Subject: [PULL 09/76] target/i386/kvm: Remove x86_cpu_change_kvm_default() and 'kvm-cpu.h' Date: Tue, 18 Jun 2024 17:59:31 +0200 Message-ID: <20240618160039.36108-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=philmd@linaro.org; helo=mail-ed1-x530.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 x86_cpu_change_kvm_default() was only used out of kvm-cpu.c by the pc-i440fx-2.1 machine, which got removed. Make it static, and remove its declaration. "kvm-cpu.h" is now empty, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Message-Id: <20240617071118.60464-10-philmd@linaro.org> --- target/i386/kvm/kvm-cpu.h | 41 --------------------------------------- target/i386/kvm/kvm-cpu.c | 3 +-- 2 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 target/i386/kvm/kvm-cpu.h diff --git a/target/i386/kvm/kvm-cpu.h b/target/i386/kvm/kvm-cpu.h deleted file mode 100644 index e858ca21e5..0000000000 --- a/target/i386/kvm/kvm-cpu.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * i386 KVM CPU type and functions - * - * Copyright (c) 2003 Fabrice Bellard - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, see . - */ - -#ifndef KVM_CPU_H -#define KVM_CPU_H - -#ifdef CONFIG_KVM -/* - * Change the value of a KVM-specific default - * - * If value is NULL, no default will be set and the original - * value from the CPU model table will be kept. - * - * It is valid to call this function only for properties that - * are already present in the kvm_default_props table. - */ -void x86_cpu_change_kvm_default(const char *prop, const char *value); - -#else /* !CONFIG_KVM */ - -#define x86_cpu_change_kvm_default(a, b) - -#endif /* CONFIG_KVM */ - -#endif /* KVM_CPU_H */ diff --git a/target/i386/kvm/kvm-cpu.c b/target/i386/kvm/kvm-cpu.c index f76972e47e..f9b99b5f50 100644 --- a/target/i386/kvm/kvm-cpu.c +++ b/target/i386/kvm/kvm-cpu.c @@ -10,7 +10,6 @@ #include "qemu/osdep.h" #include "cpu.h" #include "host-cpu.h" -#include "kvm-cpu.h" #include "qapi/error.h" #include "sysemu/sysemu.h" #include "hw/boards.h" @@ -178,7 +177,7 @@ static PropValue kvm_default_props[] = { /* * Only for builtin_x86_defs models initialized with x86_register_cpudef_types. */ -void x86_cpu_change_kvm_default(const char *prop, const char *value) +static void x86_cpu_change_kvm_default(const char *prop, const char *value) { PropValue *pv; for (pv = kvm_default_props; pv->prop; pv++) { From patchwork Tue Jun 18 15:59:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805211 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp270261wrx; Tue, 18 Jun 2024 09:02:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVPvj7zEeZs9WcXhSse2ibrjxOADo1X0EsXPxQzG8fDEWJ3Za8DJcNPmM3Tu+1mZN6EcAbvibti2GnJvOEr/i4W X-Google-Smtp-Source: AGHT+IGqtHppt+/iNwLwR1URfR4mPk+SKdN2jUsk1YhYshrL8lKSBX8k6Qklo9FGQZT7h1QvIHi6 X-Received: by 2002:a05:6214:12c8:b0:6b0:6b57:4c56 with SMTP id 6a1803df08f44-6b501e26799mr1276666d6.19.1718726531053; Tue, 18 Jun 2024 09:02:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726531; cv=none; d=google.com; s=arc-20160816; b=lk6J8yBgBrEgoUgz6YmlFMgeyOkzXGNZM8ou/hSmYlOsf65/B7LmVyUskBsB14S2MO rYvtDc+zcV8baWjZhMlDLE5KjLX7x0Oi4X7Wdtu0QYbk3I+vlQv0RtZ2O5K+xQmxUOWS n2eztsuX4y3Cm2QPI2DfGh+qK80NsDWrZs5qMqcBy070Ao5CE7j/wgFiPWnnZQ5No1xY fbQ3CDOry6allRsbMtgA93fIWFg0Sw8xoyN/XHHwj7q1T+wZhzBsy9AjHyOsG0ixUbs7 SGAebkYXOx+m6tasGMBrmxf8K/8NckBVmIjfa1QANZCnIjcbG0SKHLJj5OKlgxaYQYna G9rA== 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:cc:to :from:dkim-signature; bh=gpuxhErWC4Hjg+11YRmyemEnWJkaBfj9X0XpeCPS0AU=; fh=QeIS5kb1Uh2g1z6dWJxoYMIPD1Pl4adL6YUWYeE5yJk=; b=aokc7SQu4s1GWQ23kAydo6E+nXwkfATMUH1eM+gxIEw/qV9wrylFkGa+lmXfD5whhM mHBRS36Z0LfrwatXn4Y/qV5M3lIFRTXoNf7OHEKcCAzBIXPy5wpEU8t04gscvkBaM5m6 ubZBxYupSCqxngjolUYCaaSzEzKSA78c8TEeUaZPUPXr2/Ozrdt95N/BvuBmxkUTe7iM QsYVAej8Yy+/KkMt3JbvVQ+PjGai8eIxtiDsr1NWKD8fkwCCbszimVWGml1UJoukZiGB V1QzJgt6rwuMd7hRmvhjfDh4CBEIbpMi2dX/m0zlYOqC7AezIoH8qTcPBW2gHQP9htEo lHHA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="YgK/2EdC"; 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 6a1803df08f44-6b2a5afd45bsi128003076d6.268.2024.06.18.09.02.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:02:11 -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="YgK/2EdC"; 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 1sJbHP-0004EJ-7Z; Tue, 18 Jun 2024 12:01:57 -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 1sJbHG-0003xq-8d for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:01:46 -0400 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbHD-0006t1-3v for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:01:44 -0400 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-57d0699fd02so83916a12.0 for ; Tue, 18 Jun 2024 09:01:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726501; x=1719331301; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gpuxhErWC4Hjg+11YRmyemEnWJkaBfj9X0XpeCPS0AU=; b=YgK/2EdCl9J/u/RAlm87/stZb2ZoE3/SkwnN55D9fezFvnfA5qvxv5lOOx3ZnyMFQc LMlqmkEhJGHMTD8Cv6Qn+4n0zGLjQWpjlDVMq3Hp4h8eRxkd760tHA/3Ep/iBeM/+KnD efmjPRhGeptVadvB6xdSzVb+3jJZnAuVZVcRhownVMaFcaegCrB+YtHt1lrcia83oJIv 7pQr6YONZSpStIQdKX5f6LLmwHWoWS+XhimKZD6c4uveK8NC6AHBWyTHL5SULRkzyNrg WLwPKfXN2x1M/hhxcW+nZkEj5pVklbh1A6QbI5pKKctPXaJwWB9suSUCPGl4L+OXGcVR g7eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726501; x=1719331301; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gpuxhErWC4Hjg+11YRmyemEnWJkaBfj9X0XpeCPS0AU=; b=gEqmsipTqvbbOujQnYbEPn9j0zlOejlu+NwyxGqFV0H4msWc0RurYmw0UUO0LzViIp ZgnxBi8qTJE/EWrRcFIaR9pa3AO6Fn7nmCVeBtNBQKkV94b0/RjzSz7QLaWeSpLaqD7u oqZHe+d6/3TFWiraAnh8koKrWDhaOK6zKC6GdL1fi/g7io4SSnE4/BIaCMph3mq6CKmw DbABaWcLgrfmRv2pPDH/HntO1QLqwqwUBjLKF8I3e+/agf2x4+aJ9pMI2DmOMoeAwIsf By87psMbZarSx6b/H+t/TBNJalCasZwnEBBqMcoMDnY8edOZKNDn0kq1/QrhvhfM32P+ k49Q== X-Gm-Message-State: AOJu0YwJLtXwGj+HeG0e0hJCBjRoHcpKT/Zvf3J56XTdT6ckc8ZVu8JX ScmnFr2R6O9mooL4YoI1dP2L0j8PPBllAfCu1p7Ew7niYGMWuX1NpoApqYE59pFsfNwdHnncSW1 S X-Received: by 2002:a50:d602:0:b0:56e:3293:3777 with SMTP id 4fb4d7f45d1cf-57cbd684886mr10972146a12.17.1718726501177; Tue, 18 Jun 2024 09:01:41 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56ed3679sm627324366b.122.2024.06.18.09.01.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:01:40 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Zhao Liu , Igor Mammedov Subject: [PULL 10/76] hw/i386/pc: Remove PCMachineClass::smbios_uuid_encoded Date: Tue, 18 Jun 2024 17:59:32 +0200 Message-ID: <20240618160039.36108-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=philmd@linaro.org; helo=mail-ed1-x530.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 PCMachineClass::smbios_uuid_encoded was only used by the pc-i440fx-2.1 machine, which got removed. It is now always true, remove it. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Message-Id: <20240617071118.60464-11-philmd@linaro.org> --- include/hw/i386/pc.h | 1 - hw/i386/fw_cfg.c | 3 +-- hw/i386/pc.c | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 0d730318fe..5667b87ed0 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -109,7 +109,6 @@ struct PCMachineClass { /* SMBIOS compat: */ bool smbios_defaults; bool smbios_legacy_mode; - bool smbios_uuid_encoded; SmbiosEntryPointType default_smbios_ep_type; /* RAM / address space compat: */ diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c index 6e0d9945d0..f9e8af3bf5 100644 --- a/hw/i386/fw_cfg.c +++ b/hw/i386/fw_cfg.c @@ -63,8 +63,7 @@ void fw_cfg_build_smbios(PCMachineState *pcms, FWCfgState *fw_cfg, if (pcmc->smbios_defaults) { /* These values are guest ABI, do not change */ - smbios_set_defaults("QEMU", mc->desc, mc->name, - pcmc->smbios_uuid_encoded); + smbios_set_defaults("QEMU", mc->desc, mc->name, true); } /* tell smbios about cpuid version and features */ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index b0b8ecd64d..215462e861 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1796,7 +1796,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->has_acpi_build = true; pcmc->rsdp_in_ram = true; pcmc->smbios_defaults = true; - pcmc->smbios_uuid_encoded = true; pcmc->gigabyte_align = true; pcmc->has_reserved_memory = true; pcmc->enforce_aligned_dimm = true; From patchwork Tue Jun 18 15:59:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805216 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp271511wrx; Tue, 18 Jun 2024 09:03:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXtXBiHcdKjG6RT99t2FLnSsC1H06kvRXIEigzk3/sRM0UEKj/BSjLeYwkRxs7brVs6/TfWByPzectn2kwIHXIo X-Google-Smtp-Source: AGHT+IHD6yVernjaSnbK2CXYdzmnx1kE6ymTCj+V1oVlCm3Vr2IYhqLRPFniB/UBU2gddbk9F1dB X-Received: by 2002:a05:6808:2223:b0:3d2:27ef:264f with SMTP id 5614622812f47-3d51b9663f9mr242044b6e.10.1718726638640; Tue, 18 Jun 2024 09:03:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726638; cv=none; d=google.com; s=arc-20160816; b=mdv+XhsU9Ou+HB7nCqf2+g4i9yE38tNzhsaOfApzzMA7SlRRTmj/QWAsmFhsZntlWX o/ZwRIAG40bNiTpzFXjqbG/5irdY1tgTQVKRB/yve9HmBb95PTZdBYvY0JEqLyQ5LRg9 CWJJYJPTz6pm3KGGiinwn87oNETZ9e6zKkvRt/BzKoBU5J2+SvK076pNTTBjZ4bKB4Er o2rW2YHNBUW/5iflEZV1nLTxZzrDbKn5IXzSHfRYZ167do8iu3UId/LZaQribXCibFyH ZotCxObtiiJzT7pp789EY+m+ACPTkucD6udZnOfjmmKJt4s0bFnoswmvWJYpVanH4fuz NFYw== 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:cc:to :from:dkim-signature; bh=7l4PL09eKxeC8JrLL1GKj11eH/AENxSskGBoK9GFtHM=; fh=qIwwf5yzYdGUjWHfLdZ1pY/abUtmNziDEAnYJGhPICo=; b=gyktsPWFvhJ3pWQSpbpm8ZIh+vIZnuReJ4SQkxvRp8lPH0xk5mofxB1drwXBwHSy/3 v3T8FRyoG7TTe2ylG/P7O5ZPSgqG5qvOdF6UAjS+XimESszWkRrCXyGHV7FfytkQ14ww 4cr3qAu/lXffYL/tnIDIaDv8ysBalvGYwQLLROTezHSrTQoXgsLw1UG/84J6ZrJiVwA6 r/Vl9RBD8EXF37VtEA/qnB15F9mtoVsxZOVqrl/d9zkYQlFpwPSDsJua0F5wHw7MnVTp 8UlSCzvnUc5cEKxZ3aY6CjRV3gZuFOKIslJOsrdK/ySGdDtbaqVdRmty+2D62kDze7LB /ofQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F5Rv+76h; 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 71dfb90a1353d-4ed41c25215si1806726e0c.300.2024.06.18.09.03.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:03:58 -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=F5Rv+76h; 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 1sJbHU-0004OV-35; Tue, 18 Jun 2024 12:02:02 -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 1sJbHM-00048l-RR for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:01:53 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbHI-0006uI-Q0 for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:01:51 -0400 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a62ef52e837so724265866b.3 for ; Tue, 18 Jun 2024 09:01:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726507; x=1719331307; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7l4PL09eKxeC8JrLL1GKj11eH/AENxSskGBoK9GFtHM=; b=F5Rv+76hO1dDz6pdtsbSDhqZ5q//djbZcXEBqWMZl7VQOG9T5dJGBv0EV5/lND5z5H YmogFposPIwQXjrcXkhPjIbgfA8erLI9ySEUTPmXTka0aEcjJwmZMQ/bL9ohuyhtn7cQ NDMqeSXFHJaDhcg3bt9gHuHUTyUFvjgp1i9TVPT1ICWvQuXC1H0YGfJD3pu1iN7qlyyM 7g6b+3hwXeQ/oQcfly6w5usgi3A1oZ7Qfk6S25bYp7xeWbnrIxG4a9CUleMTHgjFwOr7 NGC2M6R3scqSbp3k6YX/PT/nRO67aKoEZf3OmZ0QFzPJ7X4K/l5RBXyzKz5LmsJmcfCu BEng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726507; x=1719331307; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7l4PL09eKxeC8JrLL1GKj11eH/AENxSskGBoK9GFtHM=; b=X5YuP9R7qm5q6uK0yeNs9geN67UnNHbmLKUHmabeTa7KLmEZdllRbynt+SjmOIoA1k 7WSN02NRAe2sFchKJmFlgxEug4zUXOVJ0zewDx6GSNum2BXvdBgCtvoSF8bhNvGWjG5r td1n533FSMxBCM8OeJtEJjz+j/fmFBmWDb9OsJUHs6mAAU9upMYObR/AdNNOQF/TYuxv H/y+fnapTXG1Nua2S4vLhoapWT85pzxgHLHOTqyfHhDmYn6eteVM1LNyXN7EdJ2bBO25 sOP5LaWrtRtjU/nkKFBxfr5BZuoCzc7hCasHBVjuqY+uqYTmgjp14umunzR6u11NHKaG syKg== X-Gm-Message-State: AOJu0YxaIqz1J3W0BAsk/xO+/W7Er4TZxK9TCBg3iS6eVGXUC3rhXphO GvffZhE8NOlJL72eT3l2GTUmSkbBYQre+D30qEsyC8d5SGL7aEJy1BphEZ8eHN8vUh9JyGmZAcT w X-Received: by 2002:a17:906:99d0:b0:a6f:7834:d3fa with SMTP id a640c23a62f3a-a6f7834d5dfmr861808966b.18.1718726506966; Tue, 18 Jun 2024 09:01:46 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56db6dfesm624580866b.87.2024.06.18.09.01.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:01:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Igor Mammedov Subject: [PULL 11/76] hw/smbios: Remove 'uuid_encoded' argument from smbios_set_defaults() Date: Tue, 18 Jun 2024 17:59:33 +0200 Message-ID: <20240618160039.36108-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=philmd@linaro.org; helo=mail-ej1-x62a.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 'uuid_encoded' is always true, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Message-Id: <20240617071118.60464-12-philmd@linaro.org> --- include/hw/firmware/smbios.h | 3 +-- hw/arm/virt.c | 3 +-- hw/i386/fw_cfg.c | 2 +- hw/loongarch/virt.c | 2 +- hw/riscv/virt.c | 2 +- hw/smbios/smbios.c | 6 ++---- 6 files changed, 7 insertions(+), 11 deletions(-) diff --git a/include/hw/firmware/smbios.h b/include/hw/firmware/smbios.h index 8d3fb2fb3b..f066ab7262 100644 --- a/include/hw/firmware/smbios.h +++ b/include/hw/firmware/smbios.h @@ -331,8 +331,7 @@ void smbios_add_usr_blob_size(size_t size); void smbios_entry_add(QemuOpts *opts, Error **errp); void smbios_set_cpuid(uint32_t version, uint32_t features); void smbios_set_defaults(const char *manufacturer, const char *product, - const char *version, - bool uuid_encoded); + const char *version); void smbios_set_default_processor_family(uint16_t processor_family); uint8_t *smbios_get_table_legacy(size_t *length, Error **errp); void smbios_get_tables(MachineState *ms, diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 3c93c0c0a6..268b25e332 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1677,8 +1677,7 @@ static void virt_build_smbios(VirtMachineState *vms) } smbios_set_defaults("QEMU", product, - vmc->smbios_old_sys_ver ? "1.0" : mc->name, - true); + vmc->smbios_old_sys_ver ? "1.0" : mc->name); /* build the array of physical mem area from base_memmap */ mem_array.address = vms->memmap[VIRT_MEM].base; diff --git a/hw/i386/fw_cfg.c b/hw/i386/fw_cfg.c index f9e8af3bf5..7c43c325ef 100644 --- a/hw/i386/fw_cfg.c +++ b/hw/i386/fw_cfg.c @@ -63,7 +63,7 @@ void fw_cfg_build_smbios(PCMachineState *pcms, FWCfgState *fw_cfg, if (pcmc->smbios_defaults) { /* These values are guest ABI, do not change */ - smbios_set_defaults("QEMU", mc->desc, mc->name, true); + smbios_set_defaults("QEMU", mc->desc, mc->name); } /* tell smbios about cpuid version and features */ diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 66cef201ab..b7ea17d5f3 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -556,7 +556,7 @@ static void virt_build_smbios(LoongArchVirtMachineState *lvms) return; } - smbios_set_defaults("QEMU", product, mc->name, true); + smbios_set_defaults("QEMU", product, mc->name); smbios_get_tables(ms, SMBIOS_ENTRY_POINT_TYPE_64, NULL, 0, diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 4fdb660525..5676d66d12 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -1277,7 +1277,7 @@ static void virt_build_smbios(RISCVVirtState *s) product = "KVM Virtual Machine"; } - smbios_set_defaults("QEMU", product, mc->name, true); + smbios_set_defaults("QEMU", product, mc->name); if (riscv_is_32bit(&s->soc[0])) { smbios_set_default_processor_family(0x200); diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index eed5787b15..8261eb716f 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c @@ -30,7 +30,7 @@ #include "hw/pci/pci_device.h" #include "smbios_build.h" -static bool smbios_uuid_encoded = true; +static const bool smbios_uuid_encoded = true; /* * SMBIOS tables provided by user with '-smbios file=' option */ @@ -1017,11 +1017,9 @@ void smbios_set_default_processor_family(uint16_t processor_family) } void smbios_set_defaults(const char *manufacturer, const char *product, - const char *version, - bool uuid_encoded) + const char *version) { smbios_have_defaults = true; - smbios_uuid_encoded = uuid_encoded; SMBIOS_SET_DEFAULT(smbios_type1.manufacturer, manufacturer); SMBIOS_SET_DEFAULT(smbios_type1.product, product); From patchwork Tue Jun 18 15:59:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805253 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp275183wrx; Tue, 18 Jun 2024 09:09:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXwtuHOprbj0E3ZfksnTT8sXMLl0ajEJx1P7ZyHrSv11WrDKF1EOFE84qqK37EShtmSQskxSVZenLb+wC/y1vuc X-Google-Smtp-Source: AGHT+IE+Sl0ZVPxLeyhVYsiPMDwKxIKxemNuS9Y5hUraihoDZ+NhdHvnYX2mdn3atytwrgUEY3Jr X-Received: by 2002:a0c:f8cb:0:b0:6b0:7f36:8af9 with SMTP id 6a1803df08f44-6b501ec4017mr1518556d6.58.1718726997351; Tue, 18 Jun 2024 09:09:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726997; cv=none; d=google.com; s=arc-20160816; b=OkHFjDe4nzBqsnIdF2kDfIL3cawzT5hjeaw4US2wbXIyHepPfbeWLUub+hsqtvJnT6 LMuxgyKl5L/kATAfHyiPEs4Q28thERFsP5jS9E6p8WiMu4wf/tAvqvABjmQkFnZgNCrP TtZYFJZGHTk+5DrrpLG/XQKICiX6HnlBIsj+5TomWmZDtWpRUo7L6ej+a7QrhvOpxp96 wl91x7I4MGlxAEAhK1LursDfjsX5RMV2CuDcVYVL0Vc1ZkP3oFPzvkXxcxpc5b3MnkSN Rf5abRjU/a1aXET09PEynA25/BsJc48jX6HFj8+GfkFFUnZ6BRCU75XkKaYkd/IKZSUg e0nQ== 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:cc:to :from:dkim-signature; bh=8FeF7HG1jBJoN+fgafsrLpLmoyytTa1LuFpsp6SO8ew=; fh=qIwwf5yzYdGUjWHfLdZ1pY/abUtmNziDEAnYJGhPICo=; b=R5ENtWn9oBkHXOdRmH2PhmBfiRCwIAvoDNiSw0nilW7FrvKACZkLQypIGjh8uh+Jrb /waKKzKMJJZjXV/4Hz7wmeJtP3X4vmABcuiLYvnHtaLnUz0uwBhdbxYn02DLNaOAFuYf Axj68htnt3EvbIfvldxkO9ob7BXodNoOrdzm4niVavOGlZ97zfBh1L1dhBU5v0qsgyDx GFrBh/Si44/Ols6OtknjPPgTmuABE8cHV1cepXjeuIO43kw/chW43l0OCEqw2vzWtm6x heHtFLDD8oLuYeqjv33idNGtBYiSZAjlxOi4UHClINyx6mXGU6GOOqh2QBH7MQ+jzPGj hUEQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K5aw73Pq; 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 d75a77b69052e-441f2ea8ab7si136086591cf.347.2024.06.18.09.09.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:09:57 -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=K5aw73Pq; 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 1sJbHT-0004N5-SC; Tue, 18 Jun 2024 12:01:59 -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 1sJbHR-0004Gz-7I for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:01:57 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbHO-0006um-O7 for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:01:56 -0400 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-57a44c2ce80so6726733a12.0 for ; Tue, 18 Jun 2024 09:01:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726512; x=1719331312; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8FeF7HG1jBJoN+fgafsrLpLmoyytTa1LuFpsp6SO8ew=; b=K5aw73PqCE3xWf9JyOfJRdV0uLMfNpEpYjvOLTuenXN7HD5LqCqOPRzk84MZx4ot8d MaoAjeGnhpg0o2cvNLgEvy4qle5GXcALR/xbUdoRq9PnAEKMMhONZFpOq1Em23077jeZ CG0dBYXQHRJIlY7Sg5NMyQo+rrC1p7NW+4CG6NngjeIVtPMOf8QQY6iCudciq3VLx6wS +D00sha03xEljK4l+dOwjDahv9uJ2DiyclhzASac3WBvp0rbSOmeqP8HUCnp6I0sV7Do 0LSN7khRQ/cDl0VRGsRE/OWQUmcjr0sC6c0yj45nSZ0IduTXJvdUFAK9c2uSsWvj3294 jKcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726512; x=1719331312; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8FeF7HG1jBJoN+fgafsrLpLmoyytTa1LuFpsp6SO8ew=; b=i0S+685bo0qcvLngY101aAySC1e1l/hgmXrFcbAiirkhMwawKOU3dUaa8E0for5EYk H1IEL0C/HsMfYT7xcQN2YZlUNSL5sKCzmyNIAmVllnaTugZJ/w9HDcmQ+N5d0zq0XIqH m54K5KuBGOXg7lckbVIkemMTFI5ED6GqeyFabe21HL4iWA8SI1ApEsuPKJOGvmhcW/UF 8OXpRJdXPAh06ktTDb+GOsLk72nuxDb4yU2a9Xl/Q/HcGTemOCgRYUAZ3o1aFVwFUrFc 3bBLx271jpGaoykV+ENzrSyX/CI2oOllir+UrVS5yt2faUO4Zt1hYvxneE6afX3xi8Zw Digg== X-Gm-Message-State: AOJu0YwOIuHzoY65lhl0uzTT4KiXgLS27h5QVGb9tfG5dUwR2Wyct/Zj IhJcmj01nhKDTYmWY61JBzQpu2FLs5Ankfn0TR1oNDeWRMksUgtw97007DlM3XSJ4VlKOUPmm09 A X-Received: by 2002:a50:d75a:0:b0:57c:6f1d:1926 with SMTP id 4fb4d7f45d1cf-57cbd68f814mr8980753a12.22.1718726512425; Tue, 18 Jun 2024 09:01:52 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57cb72cdfd0sm7894027a12.5.2024.06.18.09.01.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:01:52 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Igor Mammedov Subject: [PULL 12/76] hw/smbios: Remove 'smbios_uuid_encoded', simplify smbios_encode_uuid() Date: Tue, 18 Jun 2024 17:59:34 +0200 Message-ID: <20240618160039.36108-13-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=philmd@linaro.org; helo=mail-ed1-x52d.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 'smbios_encode_uuid' is always true, remove it, simplifying smbios_encode_uuid(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Message-Id: <20240617071118.60464-13-philmd@linaro.org> --- hw/smbios/smbios.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index 8261eb716f..3b7703489d 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c @@ -30,7 +30,6 @@ #include "hw/pci/pci_device.h" #include "smbios_build.h" -static const bool smbios_uuid_encoded = true; /* * SMBIOS tables provided by user with '-smbios file=' option */ @@ -600,11 +599,9 @@ static void smbios_build_type_0_table(void) static void smbios_encode_uuid(struct smbios_uuid *uuid, QemuUUID *in) { memcpy(uuid, in, 16); - if (smbios_uuid_encoded) { - uuid->time_low = bswap32(uuid->time_low); - uuid->time_mid = bswap16(uuid->time_mid); - uuid->time_hi_and_version = bswap16(uuid->time_hi_and_version); - } + uuid->time_low = bswap32(uuid->time_low); + uuid->time_mid = bswap16(uuid->time_mid); + uuid->time_hi_and_version = bswap16(uuid->time_hi_and_version); } static void smbios_build_type_1_table(void) From patchwork Tue Jun 18 15:59:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805217 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp271555wrx; Tue, 18 Jun 2024 09:04:01 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUsJGYFYCxxKl1/go2EYTdMtmmJ40bQ60AEfwnevGALGcFbhWhIjLZsnqTAGPRkUFH+OU8dFQkEluWpwtwMmYYC X-Google-Smtp-Source: AGHT+IEsBWGlsuLaUHtS6wihcX0+dSIh1cWAs5uF01HA61cEu4jVw+mCrkl8wUwnH+P6Xr6rULXI X-Received: by 2002:a05:622a:15c2:b0:440:61ce:2bf1 with SMTP id d75a77b69052e-444a79d935amr3042381cf.29.1718726641148; Tue, 18 Jun 2024 09:04:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726641; cv=none; d=google.com; s=arc-20160816; b=mEu3bY/BfUNok9UiR0gZpPdM+1UjVPC6rOYBZUFWYgArQA/K1CEQ3/5qjtiK4hjth8 v2bAMR0ZoN2H16f8QhjEJBzrGpNa+WhVdHwX9jB9EvHzSZ0Zh9aDIuCfrpoZNHhspzrm aICddAQX2oLiuwMB3XPbth3XswSKsdFGO5BrRpW2uH8Jtu5yipjKDYLC7nzz36v12nNc fGvSkDEOnKPbGe4cxxKWxUjQNxyJKrHtEi+BD4AB3u03ejtNs5HLT3qfVpVHZ9i0QSBk ArnNuIhMtc4xAm8AfkKq3aY7Jwg5oZY+srf7yyX1xaMM9dwyYLWIT81p9dhGJsMuX9R4 R6kw== 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:cc:to :from:dkim-signature; bh=x/tagi0H3adLyS3W/8Dhxle+M9RlwA1PgWDySU+Dgls=; fh=qIwwf5yzYdGUjWHfLdZ1pY/abUtmNziDEAnYJGhPICo=; b=0Iu6/HlznHD0qwE7y4SMTqQnILhnKuElxhM7g1RLJwaRjF89Q2NvGH3ffhCI/utmDh d5vEzWvqYZnscVm24GHDOhwXY8Dh1tiDlhlT6qdsLbMl+WT8Yrn4ZXciPimRWM1tcrm4 5GYD03n52EJl2rJzcssGPOEpqbWIWxSL5vdtKO1q31xT7Mh1AJqpl5+YI1dI/bphvtHy JLPV1SwLFniRYDDwTx3KKJcELwr2LQS1w3qLkmzsPXLJtL5TZK/lzENWCYYemmrlZ1/P JGSYfV0ncCprLHUhTwIeByBfRRhuC15fhuUw7L6kzBmFDbUqmaNqPrNCySFIzGV66CeZ BGvA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hJVuJ3hz; 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 d75a77b69052e-441ef3bafd4si122462091cf.5.2024.06.18.09.04.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:04:01 -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=hJVuJ3hz; 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 1sJbHZ-0004qZ-Gm; Tue, 18 Jun 2024 12:02:06 -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 1sJbHX-0004af-MN for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:02:03 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbHU-0006v0-4O for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:02:02 -0400 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-57d07464aa9so39606a12.2 for ; Tue, 18 Jun 2024 09:01:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726518; x=1719331318; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=x/tagi0H3adLyS3W/8Dhxle+M9RlwA1PgWDySU+Dgls=; b=hJVuJ3hzyMHcP2ruGNYzpcLSvWENi187/ETMk2lDiKSLrhbY3e6YtVFUMjkoxHbQJ0 eQw4XYY8VqojmtzI2QtKfCcLcmK5U3winUIPjenThLpZESl5CtFBrG0xnvO9ZhpBMAxf GRmc0Jdgp582rACKbsbDuXuGzgUFaAinLobi1w3goQNopB8CCsEhV2czUCzUZo7uLT3b 1snHDMpyu7UC39WIdbr3BzMiaSjcX9F8vaJDyqxPYNPecALqPoF8SxX1/dzIt4BbF7Qu pjFpvanM7iPvtbV11IRjz9YsaHIPTbNXCFEID4PQxZh2WjIOTwe25rDyFAfvTyUhLmPT AKTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726518; x=1719331318; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x/tagi0H3adLyS3W/8Dhxle+M9RlwA1PgWDySU+Dgls=; b=xElWcRmw7gOg3WQR///62B+Q9ruKPQJyctV0XfaENpOmL/w3CKxyAnbZbmRQU/Wb/I tc4n83I7lF5UxiWV0ZhHKV5SlcQUrr+YTR5LQ0iYHftbt9nwsz7CD4sZTmfgRCvezMk8 Azs5qW10gv1h7B9V8O9zeIh4hkbZQB6+BzS9OJ1dBmreK4LvgsyUGNYYBXFFE8Akrup5 /DhLifK6CJNvLv1MX0L6IE7N5D6yZJZEBdv7y+B4KzZ7olYUW2pCQKjvTE3GJ333K3XK TwEAnvji1HqsvB+IrK6HLXer+ovUCKJNkSKxmUotc6PWuPN/oVTY278fE+wpgvXeB3pF HBTg== X-Gm-Message-State: AOJu0YyLVkVnB1AgKwBviedQ4EUhf46FVjsb7AsqFVmJ6bXN4yKrWiLU 5cviNCU3aWXbNaMAoU7hDrIT5VSxEaLKOk+Gnc7WtUuQtHPwlCTacmI09vejF8o281oVhKcmbE6 7 X-Received: by 2002:a50:ab53:0:b0:57a:2ccb:b3e5 with SMTP id 4fb4d7f45d1cf-57cbd8e8c1dmr6587342a12.42.1718726518238; Tue, 18 Jun 2024 09:01:58 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57cb741e5a3sm7813974a12.65.2024.06.18.09.01.56 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:01:57 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Igor Mammedov Subject: [PULL 13/76] hw/i386/pc: Remove PCMachineClass::enforce_aligned_dimm Date: Tue, 18 Jun 2024 17:59:35 +0200 Message-ID: <20240618160039.36108-14-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=philmd@linaro.org; helo=mail-ed1-x535.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 PCMachineClass::enforce_aligned_dimm was only used by the pc-i440fx-2.1 machine, which got removed. It is now always true. Remove it, simplifying pc_get_device_memory_range(). Update the comment in Avocado test_phybits_low_pse36(). Reviewed-by: Zhao Liu Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Igor Mammedov Message-Id: <20240617071118.60464-14-philmd@linaro.org> --- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 14 +++----------- tests/avocado/mem-addr-space-check.py | 9 ++++----- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 5667b87ed0..ca72f8cab8 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -74,8 +74,6 @@ typedef struct PCMachineState { * * Compat fields: * - * @enforce_aligned_dimm: check that DIMM's address/size is aligned by - * backend's alignment value if provided * @acpi_data_size: Size of the chunk of memory at the top of RAM * for the BIOS ACPI tables and other BIOS * datastructures. @@ -114,7 +112,6 @@ struct PCMachineClass { /* RAM / address space compat: */ bool gigabyte_align; bool has_reserved_memory; - bool enforce_aligned_dimm; bool broken_reserved_end; bool enforce_amd_1tb_hole; bool isa_bios_alias; diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 215462e861..ff5683a8ee 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -728,7 +728,6 @@ static void pc_get_device_memory_range(PCMachineState *pcms, hwaddr *base, ram_addr_t *device_mem_size) { - PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms); MachineState *machine = MACHINE(pcms); ram_addr_t size; hwaddr addr; @@ -736,10 +735,8 @@ static void pc_get_device_memory_range(PCMachineState *pcms, size = machine->maxram_size - machine->ram_size; addr = ROUND_UP(pc_above_4g_end(pcms), 1 * GiB); - if (pcmc->enforce_aligned_dimm) { - /* size device region assuming 1G page max alignment per slot */ - size += (1 * GiB) * machine->ram_slots; - } + /* size device region assuming 1G page max alignment per slot */ + size += (1 * GiB) * machine->ram_slots; *base = addr; *device_mem_size = size; @@ -1303,12 +1300,9 @@ void pc_i8259_create(ISABus *isa_bus, qemu_irq *i8259_irqs) static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { - const PCMachineState *pcms = PC_MACHINE(hotplug_dev); const X86MachineState *x86ms = X86_MACHINE(hotplug_dev); - const PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms); const MachineState *ms = MACHINE(hotplug_dev); const bool is_nvdimm = object_dynamic_cast(OBJECT(dev), TYPE_NVDIMM); - const uint64_t legacy_align = TARGET_PAGE_SIZE; Error *local_err = NULL; /* @@ -1333,8 +1327,7 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, return; } - pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), - pcmc->enforce_aligned_dimm ? NULL : &legacy_align, errp); + pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp); } static void pc_memory_plug(HotplugHandler *hotplug_dev, @@ -1798,7 +1791,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->smbios_defaults = true; pcmc->gigabyte_align = true; pcmc->has_reserved_memory = true; - pcmc->enforce_aligned_dimm = true; pcmc->enforce_amd_1tb_hole = true; pcmc->isa_bios_alias = true; /* BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K reported diff --git a/tests/avocado/mem-addr-space-check.py b/tests/avocado/mem-addr-space-check.py index af019969c0..85541ea051 100644 --- a/tests/avocado/mem-addr-space-check.py +++ b/tests/avocado/mem-addr-space-check.py @@ -31,11 +31,10 @@ def test_phybits_low_pse36(self): at 4 GiB boundary when "above_4g_mem_size" is 0 (this would be true when we have 0.5 GiB of VM memory, see pc_q35_init()). This means total hotpluggable memory size is 60 GiB. Per slot, we reserve 1 GiB of memory - for dimm alignment for all newer machines (see enforce_aligned_dimm - property for pc machines and pc_get_device_memory_range()). That leaves - total hotpluggable actual memory size of 59 GiB. If the VM is started - with 0.5 GiB of memory, maxmem should be set to a maximum value of - 59.5 GiB to ensure that the processor can address all memory directly. + for dimm alignment for all machines. That leaves total hotpluggable + actual memory size of 59 GiB. If the VM is started with 0.5 GiB of + memory, maxmem should be set to a maximum value of 59.5 GiB to ensure + that the processor can address all memory directly. Note that 64-bit pci hole size is 0 in this case. If maxmem is set to 59.6G, QEMU should fail to start with a message "phy-bits are too low". If maxmem is set to 59.5G with all other QEMU parameters identical, QEMU From patchwork Tue Jun 18 15:59:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805213 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp271401wrx; Tue, 18 Jun 2024 09:03:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWcDiZEBzsZqp4DejHWh7QrAerhl1gPJqatNQYaZXpBc4UJcHGCL+80Ehbjny7ViPmNwbFRM5IKFLsYz7H9y7Ht X-Google-Smtp-Source: AGHT+IGd5sHs2F8dVihlJL+RwKAyIZCWRMYJRWLN+e+HcOvsWx/72u60tRp0xIRGIx+5JBEOkmoI X-Received: by 2002:a05:6102:3a43:b0:48d:9d02:81f3 with SMTP id ada2fe7eead31-48f130595efmr124963137.11.1718726629107; Tue, 18 Jun 2024 09:03:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726629; cv=none; d=google.com; s=arc-20160816; b=wSMF/QbH32IHFJZFKpMtgPc60c9bCCnwhAop4j7CTNInAZGDUccPGrW8N6N7zgy6iE IXy4WEm2CgxCkS2svt6Uj8gdnY89MfrEJ2wbptaY7HhKhfusId7n9ShD/ojkJIwBZdy5 qG3DL/gdUxBUqoAii9jatkgrbYZX5uqvmmD8zabRogeS8rzaboSbNPG614/Zt/eZRNnn E8QeXuaTiJhYoDtRPU7gLO2Gq72NhF8VtpLs8LhT/u4PhMMDMfHHV39iw/Wp5Qbxui9Y 7r+hzlOIH9OBOO/V9u+07WIyN/lORXhKmEUNNvFcCY+VhrxquoN3tqLswFmyDgetMML6 dCAA== 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:cc:to :from:dkim-signature; bh=wCZJ5ylQLswy1jx1rgaB0EFpBR4bZntZL6FEGbk+Shg=; fh=7ciXtIFtKgrEEslf8qyrTQ2ZRTVTrQ4XgPfZ1EtPt9A=; b=JvgFD4JGIzIK/iMTJfYigRKMdPgvzkYJSGYuLAbqY6z8o/zXFI+xV13rqBHZz7466S 4jheKFfgEl9XnJcFHky9FVFUxO9VW2lnoxMT/s1SA1YxIE1XF2c+DLg8A+k6b+v8V02E ISi0sbplHRGqWA6acZCy8fr800F3swov2DxMAkSeL/Xv/3x6W4y4KVQOGjZnxes/tGOe G2nCpljzwEBSMxPZh+sJgC6pqatcHy7mo849wfnuX0gfT9ZFxvmT0UohyeliSKck7JtI jAgScJkEjSEqkXgyYWV+3jyBIRkl5VI8oS6U0aHiihn/XdFlxk2hSAGZKRsQrb0p2JEm govQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZD+1RD3t; 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 ada2fe7eead31-48da4471cefsi2266552137.346.2024.06.18.09.03.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:03:49 -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=ZD+1RD3t; 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 1sJbHf-000544-5n; Tue, 18 Jun 2024 12:02:11 -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 1sJbHd-00051T-DW for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:02:09 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbHa-0006vI-8O for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:02:07 -0400 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-57c778b5742so6557774a12.2 for ; Tue, 18 Jun 2024 09:02:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726524; x=1719331324; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wCZJ5ylQLswy1jx1rgaB0EFpBR4bZntZL6FEGbk+Shg=; b=ZD+1RD3tXGxL7oX1v1m5AVUK5mvd2fIml5ifuB1e3IrvCcTEE1/7AXu1RaJtKBKndG jGtDYm0y00gXsgSe96D7q/GLcShWgI+E50H401f6RHZ9Ozsd7mxc7AM4MX0UehzbMtKa 1W8PhqDOKQQCoy6q4dQE+MbqFuVG0+nE0rMHeVfyPufRqhWNaBVdVFAk1eaaNWeZOM7E 7iukrlEcMSC7MAZQRMLq6Tx5r3n3ttPT/5sXofCFSeooyu/g0gOvNcfxmGIvodY+G65b TdWlT+FfS2Wjm3oxUElQKzt2AqBwrwAL1O8vw0NI0VvW4PMztThCRXrBET6L4uMJpglo m58Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726524; x=1719331324; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wCZJ5ylQLswy1jx1rgaB0EFpBR4bZntZL6FEGbk+Shg=; b=XSHakAlJT9x7LYwm3Yf8qq/XjxOfW4RusX6FwjNeiKdPgKLstOOZPJBw2IaA9YGMQq 6eJ1cH1S2JnGIkwtxJGIwosf9xBHN2uM3pow7HkMiyey9bl4Gs4kfh3w/3roWC2qCdYe R4YVsfrU0ZDlttvvseB5R4s0JipNvbOTq2cBTyDkjD9JXnHccjxqGukbLA6YWb8xPiZ1 ru/0HcLiobCW/zSc0X3+XfieO+PXxd8GAwSFwLqygBGYZFqbAuSLk8MBTniMWdCRTq8Y D6IzxOUhfGmbAfsVJtJDH9r6zQyMrVOTuTdvKzcsf4rVtNtkKLVfp601CGMnZat7Dahk 3Nww== X-Gm-Message-State: AOJu0YyklizNtxmU9c5n4pIqawTUo6jxuuRGA+qXPl8ODanmVQ8nbj0n rWN07Ke3iPOhG22SPpK3qfPZSka43kVMJ8U+6D9kZDmwJC0QXt55TgS7WzsKyZ7s2N+zyvc6FQ+ + X-Received: by 2002:a17:906:4109:b0:a6f:5a48:7b90 with SMTP id a640c23a62f3a-a6f60d413f1mr734751466b.38.1718726524169; Tue, 18 Jun 2024 09:02:04 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f5b5ce0c2sm600947866b.78.2024.06.18.09.02.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:02:03 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , David Hildenbrand , Zhao Liu , Igor Mammedov Subject: [PULL 14/76] hw/mem/pc-dimm: Remove legacy_align argument from pc_dimm_pre_plug() Date: Tue, 18 Jun 2024 17:59:36 +0200 Message-ID: <20240618160039.36108-15-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=philmd@linaro.org; helo=mail-ed1-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, 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 'legacy_align' is always NULL, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: David Hildenbrand Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Message-Id: <20240617071118.60464-15-philmd@linaro.org> --- include/hw/mem/pc-dimm.h | 3 +-- hw/arm/virt.c | 2 +- hw/i386/pc.c | 2 +- hw/loongarch/virt.c | 2 +- hw/mem/pc-dimm.c | 6 ++---- hw/ppc/spapr.c | 2 +- 6 files changed, 7 insertions(+), 10 deletions(-) diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h index 322bebe555..fe0f3ea963 100644 --- a/include/hw/mem/pc-dimm.h +++ b/include/hw/mem/pc-dimm.h @@ -66,8 +66,7 @@ struct PCDIMMDeviceClass { void (*unrealize)(PCDIMMDevice *dimm); }; -void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, - const uint64_t *legacy_align, Error **errp); +void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, Error **errp); void pc_dimm_plug(PCDIMMDevice *dimm, MachineState *machine); void pc_dimm_unplug(PCDIMMDevice *dimm, MachineState *machine); #endif diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 268b25e332..c7a1f754e7 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2763,7 +2763,7 @@ static void virt_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, return; } - pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp); + pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), errp); } static void virt_memory_plug(HotplugHandler *hotplug_dev, diff --git a/hw/i386/pc.c b/hw/i386/pc.c index ff5683a8ee..2d0a517c4c 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1327,7 +1327,7 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, return; } - pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp); + pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), errp); } static void pc_memory_plug(HotplugHandler *hotplug_dev, diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index b7ea17d5f3..8be2d2ff6a 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -1245,7 +1245,7 @@ static bool memhp_type_supported(DeviceState *dev) static void virt_mem_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { - pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), NULL, errp); + pc_dimm_pre_plug(PC_DIMM(dev), MACHINE(hotplug_dev), errp); } static void virt_device_pre_plug(HotplugHandler *hotplug_dev, diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index 37f1f4ccfd..836384a90f 100644 --- a/hw/mem/pc-dimm.c +++ b/hw/mem/pc-dimm.c @@ -44,8 +44,7 @@ static MemoryRegion *pc_dimm_get_memory_region(PCDIMMDevice *dimm, Error **errp) return host_memory_backend_get_memory(dimm->hostmem); } -void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, - const uint64_t *legacy_align, Error **errp) +void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, Error **errp) { Error *local_err = NULL; int slot; @@ -70,8 +69,7 @@ void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, &error_abort); trace_mhp_pc_dimm_assigned_slot(slot); - memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, legacy_align, - errp); + memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, NULL, errp); } void pc_dimm_plug(PCDIMMDevice *dimm, MachineState *machine) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 81a187f126..d7d4b188ee 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3700,7 +3700,7 @@ static void spapr_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, return; } - pc_dimm_pre_plug(dimm, MACHINE(hotplug_dev), NULL, errp); + pc_dimm_pre_plug(dimm, MACHINE(hotplug_dev), errp); } struct SpaprDimmState { From patchwork Tue Jun 18 15:59:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805233 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp274005wrx; Tue, 18 Jun 2024 09:07:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU7K9LJyxhyl0PjjeHfH85K6QPBV86+YZpuNs4T2H0SK76jcF7bayynwBdpgi6hK4FyG4l7SFxHtsMI0nlUiI5S X-Google-Smtp-Source: AGHT+IGgZHJPzYMxGwz304yMgjHoyueag0+rBoeYpRjs+l0kyJYUsORCM1soi7DmQAoXL07FmAPV X-Received: by 2002:a05:6870:6394:b0:254:c62e:440d with SMTP id 586e51a60fabf-25c94990924mr264336fac.23.1718726878055; Tue, 18 Jun 2024 09:07:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726878; cv=none; d=google.com; s=arc-20160816; b=y4OewpjJ+o+E4XhhLKnxDEpVH2pPdZIWKZCoewW6YJoW7ga4nBYdlfifDy9nhXATg9 XE1V9RmYV8FvsdYGOdbYGEJwqCj7ZDUz28VaV/rHHtEIbpwlDBi85WtTSUmoismUInk+ hclv9otG420SvWbepc5UrCy7xSUaYaxxbeU3CO4bD9uLiWckviN9ApE9CXYmB3iolpsj 1bJDo7pb3kZhWiPFJ8z9scEtnbWYVl3GwypwXz2wiwaWSfaPZ5npA2bPBBIsiFlCheoM /b2o+E3RS0LYzyADzId+30vTnITQn923kXvDA5SA3dSBmOB3cPxYWRsn8wLweDvxrlKA 3BvA== 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:cc:to :from:dkim-signature; bh=8eJa9WK/V7TqG4Hnua6nIYiEaeNBOHfc3aooKNXlT7w=; fh=7ciXtIFtKgrEEslf8qyrTQ2ZRTVTrQ4XgPfZ1EtPt9A=; b=RQBCXJQQoR5cd7qbzxRJVE9HD3AYJ85eT8AkMXqNUf5dJP9T4qd9CnjbuQrTE5695N tZq8NB/hGWXgX2kby2Jyf1r6UzR4MCCWeHmXZPomMB2vTC/wn0TFOlvJlt04qI73pafB NslH6DzhvgJGpCq0bjWmQPKxKWAdeA4QFocMS9G7KFtSGo36jR0XKuBORCnK9jhqJdkf 5Cf8Kq+I+L7wIWa5AO7Bd0EaXN2XY5pW9gNsG5yX+E0BMMg3DAKcydz900kKiY1WAPRS 4QYNpFuveBhCkh0+FgrwY1fA6pp6vYLZbBGenOU90EpvwJXixYlMaFdFgmaiucgoGNXp hitQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AnIMnEVR; 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 ada2fe7eead31-48da4498157si2033669137.478.2024.06.18.09.07.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:07:58 -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=AnIMnEVR; 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 1sJbI5-0005ca-5v; Tue, 18 Jun 2024 12:02:37 -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 1sJbHj-0005G6-Hv for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:02:17 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbHf-0006vZ-Sa for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:02:13 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a6f1c4800easo697027666b.3 for ; Tue, 18 Jun 2024 09:02:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726530; x=1719331330; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8eJa9WK/V7TqG4Hnua6nIYiEaeNBOHfc3aooKNXlT7w=; b=AnIMnEVRwudsIzXSTDDZJNNnzyG9NvRT9ZOfDITV9KJCsO0Ot3oDYLSNlKuFn/+ZHB FLxoedZ8QP/CL8dZlzJJLzEkJsFCXUBkWMAPf4yjnyEE7VSdOTo2FRSYd1Y3quQOp13k +ukEIGRQuca4qYl7UOOn+oEUpWXzanh7NDDZLflu4IGZeQPzP37fntybp/cgPM1ok7Fp 7wIHCG8O6DQZABbdHjpsssBkNuRPVjbaGWCVkJkaMXy896Ev9jrjAdPky6LrpdE7x7LA /Pj20kYA43F4+1aLd9EO9hZPk4ijKD//DWpiLqINbrypKt9ZkXG8FaFz3s7OIuZ3YQem HtxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726530; x=1719331330; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8eJa9WK/V7TqG4Hnua6nIYiEaeNBOHfc3aooKNXlT7w=; b=DaoYYbqNjVsplGyEIEfn92rjn1SYZzEKYEVxLBphhwBfFCaRaBiNrPjPYWC3ydZLSX PrTaIm1uzbWX3FLAM6T7RIvK7p4SN3OlRvRZ6OawpGX09Saejvr2WJ+zhZWlz0laxniU 0JK0240ugN/gr8ukNd5Rc+2EU3WoNRz+AU0t8pJuiC+Tl01Ud+WJMW+q9D359UrXpVOT w55JZg3RD755fJVrPWKizdg0oXDx2eC636xuiTb0k6nJHM1Xgy6ri/lBpq0ULOnBvvdA IzjEcxAEHQEQbBTHhgu12OIrBgKlkOusJhpMhsGOzHlhIyzMOLmQ6qaADVhPRmzLMXvs FReg== X-Gm-Message-State: AOJu0Yzs9f23dsrdiNmymfRxMXmseLkXHHUJJceOW/eOsaXpgHR/xPZX ugfTcWgBRrTv/bA2saKAniNU3T3L42hMn0FywIjRM7GGAI/+V6uzQ9Jej2cNWeYw7JoOBw8HuG3 X X-Received: by 2002:a17:907:198e:b0:a6f:98b6:365 with SMTP id a640c23a62f3a-a6f98b60a51mr169213366b.10.1718726529924; Tue, 18 Jun 2024 09:02:09 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56f411a7sm631061766b.158.2024.06.18.09.02.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:02:09 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , David Hildenbrand , Zhao Liu , Igor Mammedov Subject: [PULL 15/76] hw/mem/memory-device: Remove legacy_align from memory_device_pre_plug() Date: Tue, 18 Jun 2024 17:59:37 +0200 Message-ID: <20240618160039.36108-16-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=philmd@linaro.org; helo=mail-ej1-x630.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 'legacy_align' is always NULL, remove it, simplifying memory_device_pre_plug(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: David Hildenbrand Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Message-Id: <20240617071118.60464-16-philmd@linaro.org> --- include/hw/mem/memory-device.h | 2 +- hw/i386/pc.c | 3 +-- hw/mem/memory-device.c | 12 ++++-------- hw/mem/pc-dimm.c | 2 +- hw/virtio/virtio-md-pci.c | 2 +- 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/include/hw/mem/memory-device.h b/include/hw/mem/memory-device.h index e0571c8a31..c0a58087cc 100644 --- a/include/hw/mem/memory-device.h +++ b/include/hw/mem/memory-device.h @@ -169,7 +169,7 @@ uint64_t get_plugged_memory_size(void); unsigned int memory_devices_get_reserved_memslots(void); bool memory_devices_memslot_auto_decision_active(void); void memory_device_pre_plug(MemoryDeviceState *md, MachineState *ms, - const uint64_t *legacy_align, Error **errp); + Error **errp); void memory_device_plug(MemoryDeviceState *md, MachineState *ms); void memory_device_unplug(MemoryDeviceState *md, MachineState *ms); uint64_t memory_device_get_region_size(const MemoryDeviceState *md, diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 2d0a517c4c..8a9c025754 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1395,8 +1395,7 @@ static void pc_hv_balloon_pre_plug(HotplugHandler *hotplug_dev, { /* The vmbus handler has no hotplug handler; we should never end up here. */ g_assert(!dev->hotplugged); - memory_device_pre_plug(MEMORY_DEVICE(dev), MACHINE(hotplug_dev), NULL, - errp); + memory_device_pre_plug(MEMORY_DEVICE(dev), MACHINE(hotplug_dev), errp); } static void pc_hv_balloon_plug(HotplugHandler *hotplug_dev, diff --git a/hw/mem/memory-device.c b/hw/mem/memory-device.c index e098585cda..a5f279adcc 100644 --- a/hw/mem/memory-device.c +++ b/hw/mem/memory-device.c @@ -345,7 +345,7 @@ uint64_t get_plugged_memory_size(void) } void memory_device_pre_plug(MemoryDeviceState *md, MachineState *ms, - const uint64_t *legacy_align, Error **errp) + Error **errp) { const MemoryDeviceClass *mdc = MEMORY_DEVICE_GET_CLASS(md); Error *local_err = NULL; @@ -388,14 +388,10 @@ void memory_device_pre_plug(MemoryDeviceState *md, MachineState *ms, return; } - if (legacy_align) { - align = *legacy_align; - } else { - if (mdc->get_min_alignment) { - align = mdc->get_min_alignment(md); - } - align = MAX(align, memory_region_get_alignment(mr)); + if (mdc->get_min_alignment) { + align = mdc->get_min_alignment(md); } + align = MAX(align, memory_region_get_alignment(mr)); addr = mdc->get_addr(md); addr = memory_device_get_free_addr(ms, !addr ? NULL : &addr, align, memory_region_size(mr), &local_err); diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index 836384a90f..27919ca45d 100644 --- a/hw/mem/pc-dimm.c +++ b/hw/mem/pc-dimm.c @@ -69,7 +69,7 @@ void pc_dimm_pre_plug(PCDIMMDevice *dimm, MachineState *machine, Error **errp) &error_abort); trace_mhp_pc_dimm_assigned_slot(slot); - memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, NULL, errp); + memory_device_pre_plug(MEMORY_DEVICE(dimm), machine, errp); } void pc_dimm_plug(PCDIMMDevice *dimm, MachineState *machine) diff --git a/hw/virtio/virtio-md-pci.c b/hw/virtio/virtio-md-pci.c index 62bfb7920b..9ec5067662 100644 --- a/hw/virtio/virtio-md-pci.c +++ b/hw/virtio/virtio-md-pci.c @@ -37,7 +37,7 @@ void virtio_md_pci_pre_plug(VirtIOMDPCI *vmd, MachineState *ms, Error **errp) * First, see if we can plug this memory device at all. If that * succeeds, branch of to the actual hotplug handler. */ - memory_device_pre_plug(md, ms, NULL, &local_err); + memory_device_pre_plug(md, ms, &local_err); if (!local_err && bus_handler) { hotplug_handler_pre_plug(bus_handler, dev, &local_err); } From patchwork Tue Jun 18 15:59:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805230 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp273575wrx; Tue, 18 Jun 2024 09:07:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU8WMWn+iyPy5WLLqRBbb0OIQXEiMb+Mf7UjDnfz7upBPyb9+oHB/H0HQ5S1sQsLqq/U+Jd9TP5qq9uNe+F2/SY X-Google-Smtp-Source: AGHT+IFdO1dIvNQrAd4XTFigOTlSJevZRjl7EtUbVi4FUv0JfknqTvg7MpDjx2g+QG6JxrbkDKv9 X-Received: by 2002:a05:6358:70d:b0:19f:424f:d06b with SMTP id e5c5f4694b2df-1a1fd59abd2mr24549255d.28.1718726835270; Tue, 18 Jun 2024 09:07:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726835; cv=none; d=google.com; s=arc-20160816; b=VBU3eU8d8X71rhwW7SoBMYnpxVuUlBT9ItKdjYsSWF0ItmiO6qAZn2gbhjYuJitUR5 4XgQ7ah1ZGdQAatrhksqZfIgIe5K9sp2pGN23phSt0AR/cksNIeStrDxqUp5NjfLGhsF qJ37lJt/8TVG0/RRx+RoF4oi3gYY7EmIxmimTo4JAtrdVFCxkfj5gv9ZX00NLjrnqTuu jEWm9N3GRCo4TwIBj7dZi/503zDOG270BIXvEbA/+RFC9Wrhaw8YCaJEMUMnBbjfbWdE Ialg6yJBMBZsDBnUpzWlgiW6hN5tFX96naP9khswGxaKMO0jxY0cLvnmsDMTabh2hA68 UboQ== 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:cc:to :from:dkim-signature; bh=aMAO3xHfioEXwSz2+k/2XWVP8HfNnIoa40YXW/We34A=; fh=QeIS5kb1Uh2g1z6dWJxoYMIPD1Pl4adL6YUWYeE5yJk=; b=Z8x68MHkYFNBYfCZv27RiUtnsF1+VX9rpasIu/YVAEyGx743Bbypk3oWfc3g7QFhj8 7l07jml5SV5lSS6zvqbuqxwi8cl5zF1v8b3mXnGCOZru6YRa3D6sEJWVbmrz0LPTEVJV FhkIQNWci1XKLbiKC/i9+rVUAOlUoO/I9IqAf9lJ4uhIrelmJ6PsZ4GU4Tpm+EiT8y+k sG5ocONqkM+swIgZCqSPR71gSVcRDxmyXQj5sQHpymr2tdto3xkXY1gDlt719wwAk/l2 nJWF58PZbO8odW7OcmL5F4omCc1U0bR4lL09JOp2J8p2c5P6AWuAX6CDNAmrMqSASVsj tHCw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IcOR1H7z; 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 ada2fe7eead31-48da4471d1csi2276900137.353.2024.06.18.09.07.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:07:15 -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=IcOR1H7z; 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 1sJbI5-0005fu-8P; Tue, 18 Jun 2024 12:02:37 -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 1sJbHo-0005Ti-Qe for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:02:25 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbHl-0006wj-VK for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:02:20 -0400 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-57c75464e77so6949629a12.0 for ; Tue, 18 Jun 2024 09:02:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726535; x=1719331335; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aMAO3xHfioEXwSz2+k/2XWVP8HfNnIoa40YXW/We34A=; b=IcOR1H7zWFyj5nFS9gptEndl2JlKGHgl/CU7HDfapFVN5TV0DF9dH1ZQEBWIyMGCIp BCmZA02n4LnqypQ1CsF/DLDT08fUYdg9veTeMyeAI4dhMeMZhowS4ninWUaqQIN1wdQ8 DAiwgLj0/0SNYMMKsmyU+Xv/oTHaiquPqUmmj3g7N8TXZwQnUUKsmOLQuHDObGS3PH+T r+OH/UWiESVNN9WuMHxq/ELisy0eIxuX21YwKCAdI1uy0x6/UXVvGBpORj7OS0ql3uLm 9yw2EPVcMj3f7vcSJPxolpqKpuEsrbAHGR/MtPQ6mDAgu+mi4jNh8yKgT+s68OiP8hkE f+SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726535; x=1719331335; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aMAO3xHfioEXwSz2+k/2XWVP8HfNnIoa40YXW/We34A=; b=sTSq1j6fVDWzeQ8HNoZ/+29cdpfUVPM5BMib5uWULt3UgSwHPmzs9T0rtwO0zNoW1I oTKJQDZj3Nqioe+l4k/K7sEccEd3VuMOwchatmZNd+HLROuiBTOu3q0z9e62G1mTWkso TfcMPCD4+V0J2G8F83I2viwVz4YF5iCh4vjd8e+iWf+XGYDLE2k1256y1Rn+MXTtwFwd lUDrCQOe0OnQM6OQ3tNnBYYxzFW3etBs7+THOmq2gGCdsSWJ7iIgqSovAInphzKnCOS6 t41unWaQP40i/87bAPgol6pCM24Ai+GXlpST+FzEqX0GINYzl0CqF0JBeguF/ghhHQy4 0CoQ== X-Gm-Message-State: AOJu0YzdPDlIV9OcxSLt/wGXCo/zk7+amDOg+ucWa6GSqpP84+jbaO1K uKY3nex/D1Nl/YZnljwysTAjgGD1Jr/tZgpuCxgfjZSvnEOxdSIRrwZWWSwBtKQHrAnijF/J2T8 3 X-Received: by 2002:a50:bb4b:0:b0:57c:f091:f607 with SMTP id 4fb4d7f45d1cf-57cf091f624mr2984177a12.29.1718726535547; Tue, 18 Jun 2024 09:02:15 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57cbc2d4b0dsm7123083a12.33.2024.06.18.09.02.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:02:15 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Zhao Liu , Igor Mammedov Subject: [PULL 16/76] hw/i386/pc: Remove deprecated pc-i440fx-2.2 machine Date: Tue, 18 Jun 2024 17:59:38 +0200 Message-ID: <20240618160039.36108-17-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=philmd@linaro.org; helo=mail-ed1-x52d.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 pc-i440fx-2.2 machine was deprecated for the 8.2 release (see commit c7437f0ddb "docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated"), time to remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Message-Id: <20240617071118.60464-17-philmd@linaro.org> --- docs/about/deprecated.rst | 2 +- docs/about/removed-features.rst | 2 +- include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 23 ----------------------- hw/i386/pc_piix.c | 21 --------------------- 5 files changed, 2 insertions(+), 49 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index e332eb46e9..d7775fbb84 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -212,7 +212,7 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name better reflects the way this property affects all random data within the device tree blob, not just the ``kaslr-seed`` node. -``pc-i440fx-2.2`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) +``pc-i440fx-2.3`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These old machine types are quite neglected nowadays and thus might have diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index 347e04e50e..58821a8695 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -948,7 +948,7 @@ mips ``fulong2e`` machine alias (removed in 6.0) This machine has been renamed ``fuloong2e``. -``pc-0.10`` up to ``pc-i440fx-2.1`` (removed in 4.0 up to 9.0) +``pc-0.10`` up to ``pc-i440fx-2.2`` (removed in 4.0 up to 9.0) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These machine types were very old and likely could not be used for live diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index ca72f8cab8..155a02b1b5 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -307,9 +307,6 @@ extern const size_t pc_compat_2_4_len; extern GlobalProperty pc_compat_2_3[]; extern const size_t pc_compat_2_3_len; -extern GlobalProperty pc_compat_2_2[]; -extern const size_t pc_compat_2_2_len; - #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \ { \ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 8a9c025754..21a9b7a5ae 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -290,29 +290,6 @@ GlobalProperty pc_compat_2_3[] = { }; const size_t pc_compat_2_3_len = G_N_ELEMENTS(pc_compat_2_3); -GlobalProperty pc_compat_2_2[] = { - PC_CPU_MODEL_IDS("2.2.0") - { "kvm64" "-" TYPE_X86_CPU, "vme", "off" }, - { "kvm32" "-" TYPE_X86_CPU, "vme", "off" }, - { "Conroe" "-" TYPE_X86_CPU, "vme", "off" }, - { "Penryn" "-" TYPE_X86_CPU, "vme", "off" }, - { "Nehalem" "-" TYPE_X86_CPU, "vme", "off" }, - { "Westmere" "-" TYPE_X86_CPU, "vme", "off" }, - { "SandyBridge" "-" TYPE_X86_CPU, "vme", "off" }, - { "Haswell" "-" TYPE_X86_CPU, "vme", "off" }, - { "Broadwell" "-" TYPE_X86_CPU, "vme", "off" }, - { "Opteron_G1" "-" TYPE_X86_CPU, "vme", "off" }, - { "Opteron_G2" "-" TYPE_X86_CPU, "vme", "off" }, - { "Opteron_G3" "-" TYPE_X86_CPU, "vme", "off" }, - { "Opteron_G4" "-" TYPE_X86_CPU, "vme", "off" }, - { "Opteron_G5" "-" TYPE_X86_CPU, "vme", "off" }, - { "Haswell" "-" TYPE_X86_CPU, "f16c", "off" }, - { "Haswell" "-" TYPE_X86_CPU, "rdrand", "off" }, - { "Broadwell" "-" TYPE_X86_CPU, "f16c", "off" }, - { "Broadwell" "-" TYPE_X86_CPU, "rdrand", "off" }, -}; -const size_t pc_compat_2_2_len = G_N_ELEMENTS(pc_compat_2_2); - GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) { GSIState *s; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index e0b421dd51..1343fd93e7 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -429,11 +429,6 @@ static void pc_compat_2_3_fn(MachineState *machine) } } -static void pc_compat_2_2_fn(MachineState *machine) -{ - pc_compat_2_3_fn(machine); -} - #ifdef CONFIG_ISAPC static void pc_init_isa(MachineState *machine) { @@ -843,22 +838,6 @@ static void pc_i440fx_2_3_machine_options(MachineClass *m) DEFINE_I440FX_MACHINE(v2_3, "pc-i440fx-2.3", pc_compat_2_3_fn, pc_i440fx_2_3_machine_options); -static void pc_i440fx_2_2_machine_options(MachineClass *m) -{ - PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - - pc_i440fx_2_3_machine_options(m); - m->hw_version = "2.2.0"; - m->default_machine_opts = "firmware=bios-256k.bin,suppress-vmdesc=on"; - compat_props_add(m->compat_props, hw_compat_2_2, hw_compat_2_2_len); - compat_props_add(m->compat_props, pc_compat_2_2, pc_compat_2_2_len); - pcmc->rsdp_in_ram = false; - pcmc->resizable_acpi_blob = false; -} - -DEFINE_I440FX_MACHINE(v2_2, "pc-i440fx-2.2", pc_compat_2_2_fn, - pc_i440fx_2_2_machine_options); - #ifdef CONFIG_ISAPC static void isapc_machine_options(MachineClass *m) { From patchwork Tue Jun 18 15:59:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805221 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp271915wrx; Tue, 18 Jun 2024 09:04:30 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW3IzODj7S97CVj7XLFqZS4WCSlQeaZSac1mUg/4gimwVDvelgzAo678h0zqlwj+rkeV5mOvnOFj0z+eP/Lrk2Z X-Google-Smtp-Source: AGHT+IGto+8OR5FCo5dI0k8Zx3E83vxvfu+2RpurtyjvtLuSMdLJnwHPp33I7pZA0FIWD2b71OdG X-Received: by 2002:a05:6870:d8cf:b0:24f:ecd2:b753 with SMTP id 586e51a60fabf-25c94d07054mr242742fac.43.1718726670532; Tue, 18 Jun 2024 09:04:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726670; cv=none; d=google.com; s=arc-20160816; b=KogCerZrtTTgtK68SRg6l+Kml5oD6s1DjG5Pt4oST1ZfmYvP8A1mnThGzRtXQCvFeI Gq88GtcpQQUnqjQtOm6bWe8Tz+Q1l7hvY64C5mnvAKSP65n10pUlHkLTpmUdowjvR6DR 3Hehj9m6rTDCx0rBkmHh0gICwcnUCnkp1iZLoqhSgYU/rNqToPIpJLA1A57pNPBYVssn YCmsLz0dJ7S7RQA6y4FDD1nRLFMOea+8hGfLpNYwR6zZGdVGiv31NUE/Yp0rHSa4uHle WVf+W5ckgO0251QWc0pwf9TZ/ixhDcT//mXJfrJ8JQ+GLEy+l18iKABatOrycdTlnXoc bJDQ== 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:cc:to :from:dkim-signature; bh=S+nanogCLs1TtntQDLHWZlcaUmy7mJVDY5yva2wn6DY=; fh=qIwwf5yzYdGUjWHfLdZ1pY/abUtmNziDEAnYJGhPICo=; b=q2XX6tOCbYbjf2PD83m8YfXbx/LcCjt+dxoiZ9eKf0PH6FMKNKf47gB14G9w1mGRZt BCxDCmr4sH1xmX7mGrobwS4D9iR168uIDTn2CEp9H9PT3azO2qWJTOA7+4YrPo4UzcJ9 zsDnoYrjsSPpb/aFMiHOys2PWul7mpHKdQlIE/cRs/I1gKr6CM+Nh224KcUrUzAWqIMb uI5r3f+YfRMdUiiV/achIQuvvN5saomwYAmJQe5w38Xeyur1sVZ0EKSQPwKv+LrroXzf 05cgcwRY/CJhT6cep24/4mwowKx2CLIaa1sbsfA76lzJ4jrSMc1/mnloNF7G/BJNr3d9 yySA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fe63QVUP; 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 ada2fe7eead31-48da4471b6asi1853011137.399.2024.06.18.09.04.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:04:30 -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=fe63QVUP; 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 1sJbIJ-00069H-5B; Tue, 18 Jun 2024 12:02:51 -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 1sJbHv-0005YB-3x for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:02:29 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbHt-0006yM-CX for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:02:26 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a6f177b78dcso715784366b.1 for ; Tue, 18 Jun 2024 09:02:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726543; x=1719331343; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=S+nanogCLs1TtntQDLHWZlcaUmy7mJVDY5yva2wn6DY=; b=fe63QVUPQe1YaTN7jjaAbwpT2/EPMg1jqhO/7AHhh5reVCYgqXT86Q81dkB4NzaBUH c1gsuLjfHVwoz2nTAwRS9uz15KDJJAfu8WypCLh1uNu3z5HsIT/OSN8mvvcXFh4mnykd bcaEDUt6bl32zKNcquvE3Os5kwRpKdxd1ciom6ErF53Lj9fBBZCKdMOukLMD0x2GVvpI bivM9TlKjP2/5aovCWPSfMJO95WLeX/78el5928q0YUT4Y68+25bn7tEFMLHzhqBK0US sNhPWMcB0L1GnsVBUuzNxa23nHZjuKS7E7Y2TreiyftWSTlTgEuj/xJ7Y5Id7y8RObRg +/Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726543; x=1719331343; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=S+nanogCLs1TtntQDLHWZlcaUmy7mJVDY5yva2wn6DY=; b=OvJivHgBkHufxyu8Pyqn2b+c11bWM5HOPvTXMPgOPIvfNBW5jrza8blP0VOJi9GYQU Qckivl0IpuZXVP16jtRm4/QoLcISFy5zcAaI2QEFPMFU+wQh99yTXlSTYC47uNY2BG0B wzo0+d9Xedj49BtQ8LU1m2z8mBVImN/CEjXswoaemBAZctn6c1mgZPJXaOiNkxXHRUu1 wWCVeeGi3Ih759UGAyUE90SADu/jAoPH1KdfZw1tfsT7Szdp1DLMK/8ewNMcj1gOG74T fDAwU4G/CUsuJRbGbZVWfHJ/iBR2StK7/gTwKyHOMewufPLyGMaGT3aHeqzUCVxbPNSG eang== X-Gm-Message-State: AOJu0YzPvyREHX0N4rqKD9Qi0wzo2r3WEx50p/haEK7qde06WPKCMA6K Lf7ZYlTJjg37Dnw0GyQ5qq0+43jhTc+E7qMkX2WAYiBN19JXuQvkClhiYYkJ4WisYzJhIw6eVV0 W X-Received: by 2002:a17:906:d296:b0:a6f:5c1a:c9a6 with SMTP id a640c23a62f3a-a6f60dc1fb3mr758303166b.62.1718726543200; Tue, 18 Jun 2024 09:02:23 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56dd135esm632707466b.96.2024.06.18.09.02.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:02:22 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Igor Mammedov Subject: [PULL 17/76] hw/i386/pc: Remove PCMachineClass::resizable_acpi_blob Date: Tue, 18 Jun 2024 17:59:39 +0200 Message-ID: <20240618160039.36108-18-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=philmd@linaro.org; helo=mail-ej1-x629.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 PCMachineClass::resizable_acpi_blob was only used by the pc-i440fx-2.2 machine, which got removed. It is now always true. Remove it, simplifying acpi_build(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Message-Id: <20240617071118.60464-18-philmd@linaro.org> --- include/hw/i386/pc.h | 3 --- hw/i386/acpi-build.c | 10 ---------- hw/i386/pc.c | 1 - 3 files changed, 14 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 155a02b1b5..d01ddc4618 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -125,9 +125,6 @@ struct PCMachineClass { /* create kvmclock device even when KVM PV features are not exposed */ bool kvmclock_create_always; - /* resizable acpi blob compat */ - bool resizable_acpi_blob; - /* * whether the machine type implements broken 32-bit address space bound * check for memory. diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index f5d74e2b4b..eafc3761c8 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2687,16 +2687,6 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) * keep the table size stable for all (max_cpus, max_memory_slots) * combinations. */ - /* Make sure we have a buffer in case we need to resize the tables. */ - if ((tables_blob->len > ACPI_BUILD_TABLE_SIZE / 2) && - !pcmc->resizable_acpi_blob) { - /* As of QEMU 2.1, this fires with 160 VCPUs and 255 memory slots. */ - warn_report("ACPI table size %u exceeds %d bytes," - " migration may not work", - tables_blob->len, ACPI_BUILD_TABLE_SIZE / 2); - error_printf("Try removing CPUs, NUMA nodes, memory slots" - " or PCI bridges.\n"); - } acpi_align_size(tables_blob, ACPI_BUILD_TABLE_SIZE); acpi_align_size(tables->linker->cmd_blob, ACPI_BUILD_ALIGN_SIZE); diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 21a9b7a5ae..a6d50df500 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1774,7 +1774,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->acpi_data_size = 0x20000 + 0x8000; pcmc->pvh_enabled = true; pcmc->kvmclock_create_always = true; - pcmc->resizable_acpi_blob = true; x86mc->apic_xrupt_override = true; assert(!mc->get_hotplug_handler); mc->get_hotplug_handler = pc_get_hotplug_handler; From patchwork Tue Jun 18 15:59:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805224 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp272211wrx; Tue, 18 Jun 2024 09:04:56 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX/FppDMmLhAHpJQ/FUPKsjyLoKJf3XmRPUqaxFckIrSPSWTuEbKUc5VCv6cesDLQXWok2x0EabRgwNCGh9WT+j X-Google-Smtp-Source: AGHT+IFAiEFFyUf76/q/gZIS7ZCTfiBk5iSXxiH67yN+iNObH7gIgYh6LCBGpouuAhdLSjhHhMdD X-Received: by 2002:a67:fd16:0:b0:48c:385e:2322 with SMTP id ada2fe7eead31-48f1304ebe0mr152555137.3.1718726696349; Tue, 18 Jun 2024 09:04:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726696; cv=none; d=google.com; s=arc-20160816; b=iHm3AGO73A8klJvIXkIGp3YcmiYbHb2cZ9y1tDktsV/0Cj5PMds0YQMJCuXoFb9o9U uaaX3K9jfeegh2ZA2x1YBJrcj/5CNwv3fjL+Ciwk5v+jolUa9yDM6Z0a1bw+JGbo7ScZ /xmCD6sNDY9aUS9Zua9oQUB1EDattFvELAiBKI31dWvcpn3bjLQc8y90U/MMSAdV+/Ui GY0zV7HjR/8hULpHIiwhvucBq2F+xRZHvdeGSPvPNkxLWAg04MtBFqaeKOfZixidO9Am 9Fl5JO1cPDUp0PLVZ6f3QZaBOx5o+jX2T/7+1oHh3t0sy84yiDEpajZDmgw3WWLvPNyl WO8Q== 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:cc:to :from:dkim-signature; bh=CNrfF+9zyhqG7px96ZTTBVocmseyNqId2IhLUn86KlM=; fh=QeIS5kb1Uh2g1z6dWJxoYMIPD1Pl4adL6YUWYeE5yJk=; b=Y5nY+CknNFXee8UPvOXBt7hrXHLU7Uc/uQQRhKYNCRlrIE/RDv3l2bJZmtoD4KdUNL yWvFVQFvgJzo17w/M5pXlEduODq/BD6cKM2st3cSyGvnicqRBXE9Htl3VqazpgdCfRrX vgvocUVAXJLs0HdSWQHks4z8ku/W5BAv2s61zY7dFgeWTU0qHW1G2jdsTT2yC8jiHp4o J1og+iQ41EMCxML6CYsY6kIb2UBnqe1UQYLAsqTZnh7Nz/XIqSTzkTqWASNHc8gnk9as emzgHnt68Vn4Oo8Y35l49imO+mQ9bUAaAbL5W1wHNqxVv1I9RohnZATJXwKq6357fZab GcMQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E42MexKa; 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 ada2fe7eead31-48da4472434si2283401137.379.2024.06.18.09.04.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:04:56 -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=E42MexKa; 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 1sJbIH-00065E-5c; Tue, 18 Jun 2024 12:02:51 -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 1sJbI0-0005cb-B0 for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:02:34 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbHy-0006yi-Km for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:02:32 -0400 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-57a44c2ce80so6727664a12.0 for ; Tue, 18 Jun 2024 09:02:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726549; x=1719331349; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CNrfF+9zyhqG7px96ZTTBVocmseyNqId2IhLUn86KlM=; b=E42MexKaj0uqBcecbpBBt+TPukBqnAmatAvaWFZFl99tb6wV5JGNUWqbuI3kt7O2Fe znFnAbuSdTiWrOM9zmc0mWxbQvHoVERu/XgKIG/8qns5zR1tnGzhAhbeTlwCzpfe71UJ f1ZBbUthNLqmIFIaWs7ODNxzfN4RWddZh5TbMbU1PSNTD/OJUF1nsD/8gWinfY47LkPz +rsMLHCPKkB3euCRnJV2DGoVIZ6iA9akIWDTm396FfyvOH2eiSl3UUl8ChYbV+OMAbqR VegckJUglxDIZKdbmvfDgWE7KlXShhFq3wPF34txVo4wcK0BAyGdHI6oDIRa3/Uk1ho9 qOKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726549; x=1719331349; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CNrfF+9zyhqG7px96ZTTBVocmseyNqId2IhLUn86KlM=; b=OJrRGJlZdD5CE1eBoPooXyTizTqdxacFznNb0DjyjZRBOG8mlehhkkPHw64jO3gneR Yz/WXZQ6R4blFfuVkGtLUZnY8ueey9s5tLQurW5sMMbWxXDAgLipDbI0YaXu6Shb/HuC Ex1sc4/WHkfWhEyU837GoIe5aqVmZI36j1bRdV4wUwKlN9quaaV8KMa+gYKTTV2hMLke amIJxB0lOpuuIIoviKNMot5gskcNvA/vy+8sDE6biXVrYZLO70SqtzFv6BWRZXkPMr3h mpsutK4g0pkD/xitTipHt4WuQJcZCyA2oBv5uwix0vFjXH7TjerOS4F95TNau6kpgm93 zG0Q== X-Gm-Message-State: AOJu0Yy1zK5kNP1LBm34GcWHb2InQKFWlZzuJx5C10mzxlxP4Mg7eoag wx6An+Ubjm0z6VvcFVilPbvGvMGossEo7iMcte33aBJOeTK07Si9Fm7uDPn1KJ8F4KmGanAv/WJ / X-Received: by 2002:a50:cd09:0:b0:57c:947c:f9cf with SMTP id 4fb4d7f45d1cf-57cbd6839b8mr8609721a12.11.1718726548977; Tue, 18 Jun 2024 09:02:28 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57cb72e9dd7sm7821785a12.57.2024.06.18.09.02.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:02:28 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Zhao Liu , Igor Mammedov Subject: [PULL 18/76] hw/i386/pc: Remove PCMachineClass::rsdp_in_ram Date: Tue, 18 Jun 2024 17:59:40 +0200 Message-ID: <20240618160039.36108-19-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=philmd@linaro.org; helo=mail-ed1-x52d.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 PCMachineClass::rsdp_in_ram was only used by the pc-i440fx-2.2 machine, which got removed. It is now always true. Remove it, simplifying acpi_setup(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Message-Id: <20240617071118.60464-19-philmd@linaro.org> --- include/hw/i386/pc.h | 1 - hw/i386/acpi-build.c | 35 ++++------------------------------- hw/i386/pc.c | 1 - 3 files changed, 4 insertions(+), 33 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index d01ddc4618..0b7a18a882 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -100,7 +100,6 @@ struct PCMachineClass { /* ACPI compat: */ bool has_acpi_build; - bool rsdp_in_ram; unsigned acpi_data_size; int pci_root_uid; diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index eafc3761c8..158e74f64a 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2494,7 +2494,6 @@ static void acpi_build(AcpiBuildTables *tables, MachineState *machine) { PCMachineState *pcms = PC_MACHINE(machine); - PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms); X86MachineState *x86ms = X86_MACHINE(machine); DeviceState *iommu = pcms->iommu; GArray *table_offsets; @@ -2666,16 +2665,6 @@ void acpi_build(AcpiBuildTables *tables, MachineState *machine) .rsdt_tbl_offset = &rsdt, }; build_rsdp(tables->rsdp, tables->linker, &rsdp_data); - if (!pcmc->rsdp_in_ram) { - /* We used to allocate some extra space for RSDP revision 2 but - * only used the RSDP revision 0 space. The extra bytes were - * zeroed out and not used. - * Here we continue wasting those extra 16 bytes to make sure we - * don't break migration for machine types 2.2 and older due to - * RSDP blob size mismatch. - */ - build_append_int_noprefix(tables->rsdp, 0, 16); - } } /* We'll expose it all to Guest so we want to reduce @@ -2754,7 +2743,6 @@ static const VMStateDescription vmstate_acpi_build = { void acpi_setup(void) { PCMachineState *pcms = PC_MACHINE(qdev_get_machine()); - PCMachineClass *pcmc = PC_MACHINE_GET_CLASS(pcms); X86MachineState *x86ms = X86_MACHINE(pcms); AcpiBuildTables tables; AcpiBuildState *build_state; @@ -2816,25 +2804,10 @@ void acpi_setup(void) tables.vmgenid); } - if (!pcmc->rsdp_in_ram) { - /* - * Keep for compatibility with old machine types. - * Though RSDP is small, its contents isn't immutable, so - * we'll update it along with the rest of tables on guest access. - */ - uint32_t rsdp_size = acpi_data_len(tables.rsdp); - - build_state->rsdp = g_memdup(tables.rsdp->data, rsdp_size); - fw_cfg_add_file_callback(x86ms->fw_cfg, ACPI_BUILD_RSDP_FILE, - acpi_build_update, NULL, build_state, - build_state->rsdp, rsdp_size, true); - build_state->rsdp_mr = NULL; - } else { - build_state->rsdp = NULL; - build_state->rsdp_mr = acpi_add_rom_blob(acpi_build_update, - build_state, tables.rsdp, - ACPI_BUILD_RSDP_FILE); - } + build_state->rsdp = NULL; + build_state->rsdp_mr = acpi_add_rom_blob(acpi_build_update, + build_state, tables.rsdp, + ACPI_BUILD_RSDP_FILE); qemu_register_reset(acpi_build_reset, build_state); acpi_build_reset(build_state); diff --git a/hw/i386/pc.c b/hw/i386/pc.c index a6d50df500..b0fc8686d8 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1763,7 +1763,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->pci_enabled = true; pcmc->has_acpi_build = true; - pcmc->rsdp_in_ram = true; pcmc->smbios_defaults = true; pcmc->gigabyte_align = true; pcmc->has_reserved_memory = true; From patchwork Tue Jun 18 15:59:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805219 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp271632wrx; Tue, 18 Jun 2024 09:04:06 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCViHvX5H764wFuFwZl8SDh14HmV8Y1fuH9YTlEDMxTx3z8F9dCIYEm/rIWd9qbPOfcaM8YaRsJ+NeT8/oDi91aB X-Google-Smtp-Source: AGHT+IElIidDiTEohIEowVr6g+MuRi5kQUuhXBpWNW7ZdYzqyhcZmOWsWv5U/hVHfJV1TdNg3Usd X-Received: by 2002:a05:6870:9121:b0:259:8b7d:1544 with SMTP id 586e51a60fabf-25c949911e3mr225455fac.15.1718726646671; Tue, 18 Jun 2024 09:04:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726646; cv=none; d=google.com; s=arc-20160816; b=rycUG9l8wypOsVTL+gt1pUOeFZA1Kl3Z4YloYqwhkD45erczOJjxSr3aAD0xvxdh4e I3g3aOMNebO1pGZToKJLTs9Z6GyTYh9kgrSioMzHGSYHPNXthtmdTH+RUUPRpbevdbwV P5KbANlziXvNk9GAfVIB9+ENURQgSq8PUTRLeNNc1rd4LplkH9aAX7AMgbniJnxQb/b/ aBinlkAO53z7vxD47E67ltJp449DYGdVyHkfcAACEyA5n0j7+VymRmSHEzcUIEc/YDyd EnoB8oV+IGToBia2rbuL377YmcVdbxJpSRPYiZg/yl8yY5mBHAnCvlSSYSBLPZ8nLSw/ gXCg== 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:cc:to :from:dkim-signature; bh=481P++9pg0zI2n/4exvP8oZom8l9jtwiiKGRbZrAgxw=; fh=QeIS5kb1Uh2g1z6dWJxoYMIPD1Pl4adL6YUWYeE5yJk=; b=qMeHUfUIJAm4Md21Thlqns3+O8/GS430hTuMWMgf6/bDr1voaAnrcF46Fe7BgpBhY8 lCFuevlxsy66FBiVC+kfsB0N6CS7juMoqLV3nD3LEZ1UfRGPTF6TIbzh86sTutE/rVEw +ArkryBD/JO4mTp/jAZhT8GXxqA65fDy0IYccfT2TxbXV8d5jrar9CKGHMG/OoAQ6sRd 52fyLlda/FOD3yEZQ62NsiMousvTFYMAylLzdsLYGX+3U05KV/XCxsr4HaiUHA+xDV/C jr8o/VnbOY1fMmcADhkQbxH7F2IohZdeYoU69/9XzQwpEPYszapV9HEQY1EDgVf97YHz TiiA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="t/IFGzp0"; 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 ada2fe7eead31-48da4471b4fsi2062262137.285.2024.06.18.09.04.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:04:06 -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="t/IFGzp0"; 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 1sJbIU-0006iz-Lo; Tue, 18 Jun 2024 12:03:02 -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 1sJbI6-0005mr-Da for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:02:38 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbI4-0006z2-P5 for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:02:38 -0400 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-57d06101d76so316376a12.3 for ; Tue, 18 Jun 2024 09:02:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726554; x=1719331354; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=481P++9pg0zI2n/4exvP8oZom8l9jtwiiKGRbZrAgxw=; b=t/IFGzp0tf75LtSiVqmcNdMVqB3T80hQy8V7gS5dYbXVoG6NxhKtavRZ6P08RWUa3O Ed6j2KasFBpmBYMpSK5KB57nkLTGV8wlWIXpuDQrBqh0woALiJZJKUVFMKP9Qv2igAgo Il2yjk0rqs1Qwv9ky0WaQG0D8CQSb0kqxshvjbQoQIB5kfBRnF+cZ+ZiUpViBXveVW4E +xCpXym+ZFoNa3nSLfHrLcMeOV3EGxqi6C13DUFQXO/+zj30uXOM8XSNnrCgwYvUXJ12 E0LYonXP+w/Mo9PEKG9hd2pXMYCNtnriJl/3j802f9enZBxnxxg7BnwO12/N5F6B89OL 76ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726554; x=1719331354; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=481P++9pg0zI2n/4exvP8oZom8l9jtwiiKGRbZrAgxw=; b=Qoz7/qAM4Fcm3JqYBj37D1+jMYb3F9BeTJ6tAVGFIMbm9ScWQi6cU1K4ijth7F1N5Y Ag2tW9mDTCXri3+kAQpvO6m7J5FsaaZbwFwYqTmvW0TZIltxrU0RCfkhqE+qvCbHRoUM oDVmmQPlAfsf7EFArzcxQzcNbo7HyYSrds0NtXfQQ9tjIKjhjSPfPVB4G2ZAsrDbPHU7 /eVNFg/fRjnJtBl9OZ8iaddfwVZdSR14eECY6rMYHmIv8Bz53J54EOiCF0/LUXs8lbi1 CRQNF0Zo/f8HpQEUmNSzSw2m0KtDACcsQG+PR93yNOEQjrrX9VKF5m94+WfhiSh5o7tM +yLQ== X-Gm-Message-State: AOJu0YwEgptqFirDwpMKMVwnFTK52EJ3ZybMGpC0kl3KFgpHXgKqZwAx jHrU5sLrY9xw/UVHzAjvg+U0wbIGBamBpq3p2ulj/UEAsJ1pxtf9t4HBQwvXTDMT4bOV8dh/f08 r X-Received: by 2002:a50:fb15:0:b0:57d:3be:5ec2 with SMTP id 4fb4d7f45d1cf-57d03be6373mr910594a12.30.1718726554554; Tue, 18 Jun 2024 09:02:34 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57cb72da32fsm7877548a12.36.2024.06.18.09.02.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:02:34 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Zhao Liu , Igor Mammedov Subject: [PULL 19/76] hw/i386/acpi: Remove AcpiBuildState::rsdp field Date: Tue, 18 Jun 2024 17:59:41 +0200 Message-ID: <20240618160039.36108-20-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=philmd@linaro.org; helo=mail-ed1-x532.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 AcpiBuildState::rsdp is always NULL, remove it, simplifying acpi_build_update(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Message-Id: <20240617071118.60464-20-philmd@linaro.org> --- hw/i386/acpi-build.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 158e74f64a..f4e366f64f 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2458,7 +2458,6 @@ struct AcpiBuildState { MemoryRegion *table_mr; /* Is table patched? */ uint8_t patched; - void *rsdp; MemoryRegion *rsdp_mr; MemoryRegion *linker_mr; } AcpiBuildState; @@ -2714,11 +2713,7 @@ static void acpi_build_update(void *build_opaque) acpi_ram_update(build_state->table_mr, tables.table_data); - if (build_state->rsdp) { - memcpy(build_state->rsdp, tables.rsdp->data, acpi_data_len(tables.rsdp)); - } else { - acpi_ram_update(build_state->rsdp_mr, tables.rsdp); - } + acpi_ram_update(build_state->rsdp_mr, tables.rsdp); acpi_ram_update(build_state->linker_mr, tables.linker->cmd_blob); acpi_build_tables_cleanup(&tables, true); @@ -2804,7 +2799,6 @@ void acpi_setup(void) tables.vmgenid); } - build_state->rsdp = NULL; build_state->rsdp_mr = acpi_add_rom_blob(acpi_build_update, build_state, tables.rsdp, ACPI_BUILD_RSDP_FILE); From patchwork Tue Jun 18 15:59:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805269 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp276151wrx; Tue, 18 Jun 2024 09:11:42 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUwWgrNl5HgI73Y8HLjtTdHX4iWppouKe3tAgGpV5XR25fHw8/+bHjQakl3o8ZqohCNRwIjes4hxZKa9APv0fX3 X-Google-Smtp-Source: AGHT+IFutfH+h8sYmus/9TIHXbJNf2P4VLXc+pVzOK9cuBCnxAcx3BBbLlOuMeWSlgm73B42/VB/ X-Received: by 2002:a05:620a:244b:b0:795:5ddb:cf9b with SMTP id af79cd13be357-79bb3e2e535mr15638285a.17.1718727102286; Tue, 18 Jun 2024 09:11:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727102; cv=none; d=google.com; s=arc-20160816; b=IWbeawIbUMYFGPAIpBw48V1xsxp7hac1/xuMsaF8VOo+dBj0cUXer3vJurjfvFS7EI brzA8L88511UIUY0YBDPDoIUQZdQiPtS24e9qRYqdUCzXwSJH89UjQ3tV9xhDiF3l90Q Aoo3H0K+/emdkmVHIcc/87HbAVKtuLXBWrPwk5GfHYTek6LT76jVszliG8H5swX7xu87 q5ozBZpjEItFMZgCjK1AlJJjLL+TwB8ZA20dHCchG5fScht01lJRCUp4X+Y4F2OCs/gv gpza4e8ACTg6QQndQwswBmTy2qLstwNqo150XMdlqzXFT3ykdVFq4kUIUPLBeSPzKYIw Kvhw== 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:cc:to :from:dkim-signature; bh=xlqTA80CTKBhUFfHICeuz396Eu90w2khPgPyIhgyZ5Q=; fh=QeIS5kb1Uh2g1z6dWJxoYMIPD1Pl4adL6YUWYeE5yJk=; b=R1UKlqzfy07hKR4kPPt4D6EXAjIzX7Y4v7YKqbR/da3Os75hOlpDOHIKguV3Bt/GYT zq2KjtoEtlAxbMW/P9/ULIHbh+b6RFzNcD0B+1iCpNnUIb8h5EFFqu7BqaDUY8qfI/y+ 8nR9bf0fX5IBTKruMmpYZK2uRirVFcWIgWnjriVrdfnLV6tfwk3b0wvD49grJVLaM+Rd 5Ic6xO5sD9pn3ng65v11PKEvP4RJ9C5njyfx3PO1UfC2RdPKwMDigVSZ36v1EcFMH7dP 3NyotgSItvG9rL2C18utKD9tcxCrSkJkqIG2Lb5mBDqSh5/lAPZJ5maOHZJoelaeYqFD c+hw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=glnNNfuF; 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 af79cd13be357-798aac9bebfsi904501085a.98.2024.06.18.09.11.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:11:42 -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=glnNNfuF; 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 1sJbIW-0006sF-FJ; Tue, 18 Jun 2024 12:03:04 -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 1sJbIC-00062g-0b for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:02:45 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbIA-000713-6A for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:02:43 -0400 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a6f1da33826so777005866b.0 for ; Tue, 18 Jun 2024 09:02:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726560; x=1719331360; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xlqTA80CTKBhUFfHICeuz396Eu90w2khPgPyIhgyZ5Q=; b=glnNNfuFMt2Qfn6RDAf4XO2Y2Dci4184Q+4MI2V3kvgfYyE6vyKXJH8bBr/0FGfPfF osP+rMlXVJmW9NtBSmsQqEvguo5HRL/7bCc8XHH5W+UdrDUma2gD1K5K3QcfFSUUtHLn +6wf9+Y8Fl7fIU8lEc/YZUNkjPfrbpT20wooAhcRr5aID45YfUg+7aGd9DYExxxId9+3 N8kccz20d0wcgy066I1wvaL1DcVJxGPHPLihLJpSGqDVkUC4IUGHBl9dX22MKeyiG6nA Zqgj6NR3mHrJcauxl8SGR2Zlm5Fkki2WQEHcZDnfLGGP0Ow0ncWi9UssGVn0b3JafI/9 O/pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726560; x=1719331360; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xlqTA80CTKBhUFfHICeuz396Eu90w2khPgPyIhgyZ5Q=; b=d21kxoaIwdOTwOuCRDdGuK+AEVJ9OzBfFHedmuD+XkYNrQhtCFQGq3n0RWOsOMPsCL 5+K/Sz8j1PvDAhf1NvofS8BGr7u87M3bClAkCnSN6EiIY7l6Iiat1fY8YNyvRWHwjGpy 6Vn+99IHthYDlQYpJaeMib9lQnkxd3FcYkBX7OTAmxQC4qBrGOKtzSV67k0ALS7NTbZV 94BHsSOtCeyaarWa2BRWsc3Odzdsiud7fXzRr2/yLjKxG9nEI4qvS+2yeyTOoovMRq/t jPh48ORCkxOUJ/+CxhnscPl+bUGFFws0iiSnYGHk7+qIdI15qmwpuS6Y7Zr4GMc2W25y /sjw== X-Gm-Message-State: AOJu0YyYYT2fw+256qUfEGjGRYFvMgDHAvv/Mru5baoXfWXcQZ3q3xQA seaTTf4sxkI12VNhWfbxrk/Cydv7DlkcfOudN72E6kIwfapslTaLU7dc+4hBmAPQX1febJhT/// X X-Received: by 2002:a17:906:c2cc:b0:a6f:5eec:37d1 with SMTP id a640c23a62f3a-a6f60dc509bmr938967166b.62.1718726560414; Tue, 18 Jun 2024 09:02:40 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f6a1f2cb9sm500182066b.17.2024.06.18.09.02.38 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:02:39 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Zhao Liu , Igor Mammedov Subject: [PULL 20/76] hw/i386/pc: Remove deprecated pc-i440fx-2.3 machine Date: Tue, 18 Jun 2024 17:59:42 +0200 Message-ID: <20240618160039.36108-21-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=philmd@linaro.org; helo=mail-ej1-x631.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 pc-i440fx-2.3 machine was deprecated for the 8.2 release (see commit c7437f0ddb "docs/about: Mark the old pc-i440fx-2.0 - 2.3 machine types as deprecated"), time to remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Message-Id: <20240617071118.60464-21-philmd@linaro.org> --- docs/about/deprecated.rst | 4 ++-- docs/about/removed-features.rst | 2 +- hw/i386/pc.c | 25 ------------------------- hw/i386/pc_piix.c | 19 ------------------- 4 files changed, 3 insertions(+), 47 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index d7775fbb84..ff3da68208 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -212,8 +212,8 @@ deprecated; use the new name ``dtb-randomness`` instead. The new name better reflects the way this property affects all random data within the device tree blob, not just the ``kaslr-seed`` node. -``pc-i440fx-2.3`` up to ``pc-i440fx-2.3`` (since 8.2) and ``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) -'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +``pc-i440fx-2.4`` up to ``pc-i440fx-2.12`` (since 9.1) +'''''''''''''''''''''''''''''''''''''''''''''''''''''' These old machine types are quite neglected nowadays and thus might have various pitfalls with regards to live migration. Use a newer machine type diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index 58821a8695..fc7b28e637 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -948,7 +948,7 @@ mips ``fulong2e`` machine alias (removed in 6.0) This machine has been renamed ``fuloong2e``. -``pc-0.10`` up to ``pc-i440fx-2.2`` (removed in 4.0 up to 9.0) +``pc-0.10`` up to ``pc-i440fx-2.3`` (removed in 4.0 up to 9.0) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' These machine types were very old and likely could not be used for live diff --git a/hw/i386/pc.c b/hw/i386/pc.c index b0fc8686d8..819a164373 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -265,31 +265,6 @@ GlobalProperty pc_compat_2_4[] = { }; const size_t pc_compat_2_4_len = G_N_ELEMENTS(pc_compat_2_4); -GlobalProperty pc_compat_2_3[] = { - PC_CPU_MODEL_IDS("2.3.0") - { TYPE_X86_CPU, "arat", "off" }, - { "qemu64" "-" TYPE_X86_CPU, "min-level", "4" }, - { "kvm64" "-" TYPE_X86_CPU, "min-level", "5" }, - { "pentium3" "-" TYPE_X86_CPU, "min-level", "2" }, - { "n270" "-" TYPE_X86_CPU, "min-level", "5" }, - { "Conroe" "-" TYPE_X86_CPU, "min-level", "4" }, - { "Penryn" "-" TYPE_X86_CPU, "min-level", "4" }, - { "Nehalem" "-" TYPE_X86_CPU, "min-level", "4" }, - { "n270" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Penryn" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Conroe" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Nehalem" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Westmere" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "SandyBridge" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "IvyBridge" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Haswell" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Haswell-noTSX" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Broadwell" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { "Broadwell-noTSX" "-" TYPE_X86_CPU, "min-xlevel", "0x8000000a" }, - { TYPE_X86_CPU, "kvm-no-smi-migration", "on" }, -}; -const size_t pc_compat_2_3_len = G_N_ELEMENTS(pc_compat_2_3); - GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) { GSIState *s; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 1343fd93e7..217c749705 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -421,14 +421,6 @@ static void pc_set_south_bridge(Object *obj, int value, Error **errp) * hw_compat_*, pc_compat_*, or * pc_*_machine_options(). */ -static void pc_compat_2_3_fn(MachineState *machine) -{ - X86MachineState *x86ms = X86_MACHINE(machine); - if (kvm_enabled()) { - x86ms->smm = ON_OFF_AUTO_OFF; - } -} - #ifdef CONFIG_ISAPC static void pc_init_isa(MachineState *machine) { @@ -827,17 +819,6 @@ static void pc_i440fx_2_4_machine_options(MachineClass *m) DEFINE_I440FX_MACHINE(v2_4, "pc-i440fx-2.4", NULL, pc_i440fx_2_4_machine_options) -static void pc_i440fx_2_3_machine_options(MachineClass *m) -{ - pc_i440fx_2_4_machine_options(m); - m->hw_version = "2.3.0"; - compat_props_add(m->compat_props, hw_compat_2_3, hw_compat_2_3_len); - compat_props_add(m->compat_props, pc_compat_2_3, pc_compat_2_3_len); -} - -DEFINE_I440FX_MACHINE(v2_3, "pc-i440fx-2.3", pc_compat_2_3_fn, - pc_i440fx_2_3_machine_options); - #ifdef CONFIG_ISAPC static void isapc_machine_options(MachineClass *m) { From patchwork Tue Jun 18 15:59:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805226 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp272429wrx; Tue, 18 Jun 2024 09:05:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXnlqP1zpjlPcIfLDoaGcI4JPDZLDC9yp7ODtSLMQ/sHIRVK5X3mLJZZgojT+HgXarPkgdEl9TyFphiUKhLhLq7 X-Google-Smtp-Source: AGHT+IHSqPW/SSmqPpPxmwGKs91dBGSzXacXW3AdYZo6j/YDaHlDynUS//Z6pE4yPlu4PRAS+gB0 X-Received: by 2002:ac8:574f:0:b0:440:e39:372a with SMTP id d75a77b69052e-4449b8cc771mr48379771cf.3.1718726719214; Tue, 18 Jun 2024 09:05:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726719; cv=none; d=google.com; s=arc-20160816; b=SJfP3edb7XaJiJb4L1ux0f2YJAQDZTtMp2r/eprW8kjUSY+Y6Af8TLNUPRZygDjys/ bdszW0W/6V+OVUn5bANl/tShDqrjUcAMFtqVvRoZDBvZ4rbNgAJvudrOzw87xhOGnm3k rV7sFisa4cxqizBlwZVXrwN3ibyMRx+L7nzzOHNxwQAAvOuRlJsreXt3rNkm7ivYOX/k BHWg/iFEVBszfLzRKZVta5LahN/yNEPq4gc7HeUbgdtnkdXWVKe0CdcfjJPXEfGAsHJs OJQOiW4ILiSNGPG/vV0xaULJVyaGhH4yHIa5Z7Bqru5B679DCwWl7Af9dFOvguH6DELN oTwA== 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:cc:to :from:dkim-signature; bh=AGkKAdLR9B1vxvYwpNEkYfLUZGJGkx4Kl51VrhM57lY=; fh=+0HqUyanjMd3G8uAVNRlFo7/4kRuh1fn7gjudQNLuXg=; b=ZcK31AGxg6L7k87GNH+qQLwSIbOlTR1Fznw7s+asucootZPliKKrLv7XY7X71TGRF3 PxiUtrSENmG1CXGFd0ucJGGbk+eSihvemAl8VfVdSA5iGlbPJ9ObTc+WQVFxvsjGK9eG grquY3TfIcRCKGxZwBPidmtExC8BGMrh/VPWT854+Dlm2d+daqHmlikSIVqiitJecOWi vYgakVbs7vE3vbzg+CU4t6gO7F6+qjBUGk/zpblV6ddLUWkZOIAyPKsUpf+4TteDAxKq OHQOjF5Pu8r9gAO8tkhkCpWcRoXhNsoEZJKD7MSSM56lALob21piUmmI5osNNw6YyBSp u7RA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qC6sy+K7; 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 a1e0cc1a2514c-80d78706a23si1816617241.10.2024.06.18.09.05.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:05:19 -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=qC6sy+K7; 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 1sJbIV-0006oY-RN; Tue, 18 Jun 2024 12:03:03 -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 1sJbII-00069J-BB for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:02:51 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbIG-00071H-5D for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:02:50 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a6f7b785a01so344951866b.1 for ; Tue, 18 Jun 2024 09:02:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726566; x=1719331366; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AGkKAdLR9B1vxvYwpNEkYfLUZGJGkx4Kl51VrhM57lY=; b=qC6sy+K7Max8cSiYf9miFGsxEGcneBUZ2rSnb7ja+dlSNTjLwjISrbuGXfkhlqK99V cLjXXGwWAe0NrwxK5dmfcwSkpYmJTe2rCrzTYrH1fBRvbJ/atqLZxhv1RZZZPyjufIZi xM1Iy0Rq2Sy4hmOlKGL7ne8zXNajmAyIw5HVmNS/9UCcJngAGM+bQsOeubp40OWi3GIL E5vDcgiAdmMtB91H7aizDfwNRaT8vP2CenkwhpsZMtXo+IyQjWgiei0ldG4tmHhXi1VV GfkzhKOZRnWGnp+pYSY4fC2BOxNIW7airgUjAx6teK34Fp7zQSNyIHLCuHtgk8K5KKvG BdqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726566; x=1719331366; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AGkKAdLR9B1vxvYwpNEkYfLUZGJGkx4Kl51VrhM57lY=; b=QRQYerBbc/I/9QPAROO9tp0fYkE9DtS/1L9S+Vl2E61UGU8gG6H8KDgxGFNiEdg9Au 3hq3IF/x+NpWusl8kQbJ+eVrAAmWMTK8NOwUy70SNASCV+l0NUeIAhuedPCcS+KI5tuB R2M6cQgMw6ThfKeohX+MJl5S23cPKIqLxMWQzMmZ7l1HjlhublNJcPdiLd7VV9+nZ8Vd E2ynzPyVXaHyTY+KtcWiG1ZlWXm4rVfNVGcqTdo0eR48i+sthEVb5G72SF014aANnU3A FF70zMuLpZsp9RBJ12v2PatQmlG7B4uBUe4w5fCSPxBetRwj27iACVlT7VfenBgrAH/A Tq+Q== X-Gm-Message-State: AOJu0YwGVBybg8cs3pES2IDLCM7Yh8vLWrPex57ok7ptJQRE5E1SBMJb 7SGN5cVuKQEhRRg8ghteou/PYVSFRJ0YJB0amhwI0tdFrBMJitsVeRNQmpOrxtapNDQLeoDYoC+ l X-Received: by 2002:a17:906:3ec4:b0:a6e:a97c:fc93 with SMTP id a640c23a62f3a-a6f60cefd2fmr773735366b.16.1718726566481; Tue, 18 Jun 2024 09:02:46 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56fa67ecsm621310566b.215.2024.06.18.09.02.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:02:45 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?D?= =?utf-8?q?aniel_P_=2E_Berrang=C3=A9?= , Thomas Huth , Zhao Liu , Igor Mammedov Subject: [PULL 21/76] hw/i386/pc: Simplify DEFINE_I440FX_MACHINE() macro Date: Tue, 18 Jun 2024 17:59:43 +0200 Message-ID: <20240618160039.36108-22-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=philmd@linaro.org; helo=mail-ej1-x630.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 Last commit removed the last non-NULL use of DEFINE_I440FX_MACHINE 3rd parameter. 'compatfn' is now obsolete, remove it. Suggested-by: Daniel P. Berrangé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu Reviewed-by: Daniel P. Berrangé Reviewed-by: Igor Mammedov Message-Id: <20240617071118.60464-22-philmd@linaro.org> --- hw/i386/pc_piix.c | 69 ++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 40 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 217c749705..e4930b7f48 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -414,13 +414,6 @@ static void pc_set_south_bridge(Object *obj, int value, Error **errp) pcms->south_bridge = PCSouthBridgeOption_lookup.array[value]; } -/* Looking for a pc_compat_2_4() function? It doesn't exist. - * pc_compat_*() functions that run on machine-init time and - * change global QEMU state are deprecated. Please don't create - * one, and implement any pc-*-2.4 (and newer) compat code in - * hw_compat_*, pc_compat_*, or * pc_*_machine_options(). - */ - #ifdef CONFIG_ISAPC static void pc_init_isa(MachineState *machine) { @@ -452,13 +445,9 @@ static void pc_xen_hvm_init(MachineState *machine) } #endif -#define DEFINE_I440FX_MACHINE(suffix, name, compatfn, optionfn) \ +#define DEFINE_I440FX_MACHINE(suffix, name, optionfn) \ static void pc_init_##suffix(MachineState *machine) \ { \ - void (*compat)(MachineState *m) = (compatfn); \ - if (compat) { \ - compat(machine); \ - } \ pc_init1(machine, TYPE_I440FX_PCI_DEVICE); \ } \ DEFINE_PC_MACHINE(suffix, name, pc_init_##suffix, optionfn) @@ -496,7 +485,7 @@ static void pc_i440fx_9_1_machine_options(MachineClass *m) m->is_default = true; } -DEFINE_I440FX_MACHINE(v9_1, "pc-i440fx-9.1", NULL, +DEFINE_I440FX_MACHINE(v9_1, "pc-i440fx-9.1", pc_i440fx_9_1_machine_options); static void pc_i440fx_9_0_machine_options(MachineClass *m) @@ -512,7 +501,7 @@ static void pc_i440fx_9_0_machine_options(MachineClass *m) pcmc->isa_bios_alias = false; } -DEFINE_I440FX_MACHINE(v9_0, "pc-i440fx-9.0", NULL, +DEFINE_I440FX_MACHINE(v9_0, "pc-i440fx-9.0", pc_i440fx_9_0_machine_options); static void pc_i440fx_8_2_machine_options(MachineClass *m) @@ -527,7 +516,7 @@ static void pc_i440fx_8_2_machine_options(MachineClass *m) pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_64; } -DEFINE_I440FX_MACHINE(v8_2, "pc-i440fx-8.2", NULL, +DEFINE_I440FX_MACHINE(v8_2, "pc-i440fx-8.2", pc_i440fx_8_2_machine_options); static void pc_i440fx_8_1_machine_options(MachineClass *m) @@ -541,7 +530,7 @@ static void pc_i440fx_8_1_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_8_1, pc_compat_8_1_len); } -DEFINE_I440FX_MACHINE(v8_1, "pc-i440fx-8.1", NULL, +DEFINE_I440FX_MACHINE(v8_1, "pc-i440fx-8.1", pc_i440fx_8_1_machine_options); static void pc_i440fx_8_0_machine_options(MachineClass *m) @@ -556,7 +545,7 @@ static void pc_i440fx_8_0_machine_options(MachineClass *m) pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_32; } -DEFINE_I440FX_MACHINE(v8_0, "pc-i440fx-8.0", NULL, +DEFINE_I440FX_MACHINE(v8_0, "pc-i440fx-8.0", pc_i440fx_8_0_machine_options); static void pc_i440fx_7_2_machine_options(MachineClass *m) @@ -566,7 +555,7 @@ static void pc_i440fx_7_2_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_7_2, pc_compat_7_2_len); } -DEFINE_I440FX_MACHINE(v7_2, "pc-i440fx-7.2", NULL, +DEFINE_I440FX_MACHINE(v7_2, "pc-i440fx-7.2", pc_i440fx_7_2_machine_options); static void pc_i440fx_7_1_machine_options(MachineClass *m) @@ -576,7 +565,7 @@ static void pc_i440fx_7_1_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_7_1, pc_compat_7_1_len); } -DEFINE_I440FX_MACHINE(v7_1, "pc-i440fx-7.1", NULL, +DEFINE_I440FX_MACHINE(v7_1, "pc-i440fx-7.1", pc_i440fx_7_1_machine_options); static void pc_i440fx_7_0_machine_options(MachineClass *m) @@ -588,7 +577,7 @@ static void pc_i440fx_7_0_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_7_0, pc_compat_7_0_len); } -DEFINE_I440FX_MACHINE(v7_0, "pc-i440fx-7.0", NULL, +DEFINE_I440FX_MACHINE(v7_0, "pc-i440fx-7.0", pc_i440fx_7_0_machine_options); static void pc_i440fx_6_2_machine_options(MachineClass *m) @@ -598,7 +587,7 @@ static void pc_i440fx_6_2_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_6_2, pc_compat_6_2_len); } -DEFINE_I440FX_MACHINE(v6_2, "pc-i440fx-6.2", NULL, +DEFINE_I440FX_MACHINE(v6_2, "pc-i440fx-6.2", pc_i440fx_6_2_machine_options); static void pc_i440fx_6_1_machine_options(MachineClass *m) @@ -609,7 +598,7 @@ static void pc_i440fx_6_1_machine_options(MachineClass *m) m->smp_props.prefer_sockets = true; } -DEFINE_I440FX_MACHINE(v6_1, "pc-i440fx-6.1", NULL, +DEFINE_I440FX_MACHINE(v6_1, "pc-i440fx-6.1", pc_i440fx_6_1_machine_options); static void pc_i440fx_6_0_machine_options(MachineClass *m) @@ -619,7 +608,7 @@ static void pc_i440fx_6_0_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_6_0, pc_compat_6_0_len); } -DEFINE_I440FX_MACHINE(v6_0, "pc-i440fx-6.0", NULL, +DEFINE_I440FX_MACHINE(v6_0, "pc-i440fx-6.0", pc_i440fx_6_0_machine_options); static void pc_i440fx_5_2_machine_options(MachineClass *m) @@ -629,7 +618,7 @@ static void pc_i440fx_5_2_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_5_2, pc_compat_5_2_len); } -DEFINE_I440FX_MACHINE(v5_2, "pc-i440fx-5.2", NULL, +DEFINE_I440FX_MACHINE(v5_2, "pc-i440fx-5.2", pc_i440fx_5_2_machine_options); static void pc_i440fx_5_1_machine_options(MachineClass *m) @@ -643,7 +632,7 @@ static void pc_i440fx_5_1_machine_options(MachineClass *m) pcmc->pci_root_uid = 1; } -DEFINE_I440FX_MACHINE(v5_1, "pc-i440fx-5.1", NULL, +DEFINE_I440FX_MACHINE(v5_1, "pc-i440fx-5.1", pc_i440fx_5_1_machine_options); static void pc_i440fx_5_0_machine_options(MachineClass *m) @@ -655,7 +644,7 @@ static void pc_i440fx_5_0_machine_options(MachineClass *m) m->auto_enable_numa_with_memdev = false; } -DEFINE_I440FX_MACHINE(v5_0, "pc-i440fx-5.0", NULL, +DEFINE_I440FX_MACHINE(v5_0, "pc-i440fx-5.0", pc_i440fx_5_0_machine_options); static void pc_i440fx_4_2_machine_options(MachineClass *m) @@ -665,7 +654,7 @@ static void pc_i440fx_4_2_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_4_2, pc_compat_4_2_len); } -DEFINE_I440FX_MACHINE(v4_2, "pc-i440fx-4.2", NULL, +DEFINE_I440FX_MACHINE(v4_2, "pc-i440fx-4.2", pc_i440fx_4_2_machine_options); static void pc_i440fx_4_1_machine_options(MachineClass *m) @@ -675,7 +664,7 @@ static void pc_i440fx_4_1_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_4_1, pc_compat_4_1_len); } -DEFINE_I440FX_MACHINE(v4_1, "pc-i440fx-4.1", NULL, +DEFINE_I440FX_MACHINE(v4_1, "pc-i440fx-4.1", pc_i440fx_4_1_machine_options); static void pc_i440fx_4_0_machine_options(MachineClass *m) @@ -687,7 +676,7 @@ static void pc_i440fx_4_0_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_4_0, pc_compat_4_0_len); } -DEFINE_I440FX_MACHINE(v4_0, "pc-i440fx-4.0", NULL, +DEFINE_I440FX_MACHINE(v4_0, "pc-i440fx-4.0", pc_i440fx_4_0_machine_options); static void pc_i440fx_3_1_machine_options(MachineClass *m) @@ -701,7 +690,7 @@ static void pc_i440fx_3_1_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_3_1, pc_compat_3_1_len); } -DEFINE_I440FX_MACHINE(v3_1, "pc-i440fx-3.1", NULL, +DEFINE_I440FX_MACHINE(v3_1, "pc-i440fx-3.1", pc_i440fx_3_1_machine_options); static void pc_i440fx_3_0_machine_options(MachineClass *m) @@ -711,7 +700,7 @@ static void pc_i440fx_3_0_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_3_0, pc_compat_3_0_len); } -DEFINE_I440FX_MACHINE(v3_0, "pc-i440fx-3.0", NULL, +DEFINE_I440FX_MACHINE(v3_0, "pc-i440fx-3.0", pc_i440fx_3_0_machine_options); static void pc_i440fx_2_12_machine_options(MachineClass *m) @@ -722,7 +711,7 @@ static void pc_i440fx_2_12_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_2_12, pc_compat_2_12_len); } -DEFINE_I440FX_MACHINE(v2_12, "pc-i440fx-2.12", NULL, +DEFINE_I440FX_MACHINE(v2_12, "pc-i440fx-2.12", pc_i440fx_2_12_machine_options); static void pc_i440fx_2_11_machine_options(MachineClass *m) @@ -732,7 +721,7 @@ static void pc_i440fx_2_11_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_2_11, pc_compat_2_11_len); } -DEFINE_I440FX_MACHINE(v2_11, "pc-i440fx-2.11", NULL, +DEFINE_I440FX_MACHINE(v2_11, "pc-i440fx-2.11", pc_i440fx_2_11_machine_options); static void pc_i440fx_2_10_machine_options(MachineClass *m) @@ -743,7 +732,7 @@ static void pc_i440fx_2_10_machine_options(MachineClass *m) m->auto_enable_numa_with_memhp = false; } -DEFINE_I440FX_MACHINE(v2_10, "pc-i440fx-2.10", NULL, +DEFINE_I440FX_MACHINE(v2_10, "pc-i440fx-2.10", pc_i440fx_2_10_machine_options); static void pc_i440fx_2_9_machine_options(MachineClass *m) @@ -753,7 +742,7 @@ static void pc_i440fx_2_9_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_2_9, pc_compat_2_9_len); } -DEFINE_I440FX_MACHINE(v2_9, "pc-i440fx-2.9", NULL, +DEFINE_I440FX_MACHINE(v2_9, "pc-i440fx-2.9", pc_i440fx_2_9_machine_options); static void pc_i440fx_2_8_machine_options(MachineClass *m) @@ -763,7 +752,7 @@ static void pc_i440fx_2_8_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_2_8, pc_compat_2_8_len); } -DEFINE_I440FX_MACHINE(v2_8, "pc-i440fx-2.8", NULL, +DEFINE_I440FX_MACHINE(v2_8, "pc-i440fx-2.8", pc_i440fx_2_8_machine_options); static void pc_i440fx_2_7_machine_options(MachineClass *m) @@ -773,7 +762,7 @@ static void pc_i440fx_2_7_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_2_7, pc_compat_2_7_len); } -DEFINE_I440FX_MACHINE(v2_7, "pc-i440fx-2.7", NULL, +DEFINE_I440FX_MACHINE(v2_7, "pc-i440fx-2.7", pc_i440fx_2_7_machine_options); static void pc_i440fx_2_6_machine_options(MachineClass *m) @@ -788,7 +777,7 @@ static void pc_i440fx_2_6_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_2_6, pc_compat_2_6_len); } -DEFINE_I440FX_MACHINE(v2_6, "pc-i440fx-2.6", NULL, +DEFINE_I440FX_MACHINE(v2_6, "pc-i440fx-2.6", pc_i440fx_2_6_machine_options); static void pc_i440fx_2_5_machine_options(MachineClass *m) @@ -802,7 +791,7 @@ static void pc_i440fx_2_5_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_2_5, pc_compat_2_5_len); } -DEFINE_I440FX_MACHINE(v2_5, "pc-i440fx-2.5", NULL, +DEFINE_I440FX_MACHINE(v2_5, "pc-i440fx-2.5", pc_i440fx_2_5_machine_options); static void pc_i440fx_2_4_machine_options(MachineClass *m) @@ -816,7 +805,7 @@ static void pc_i440fx_2_4_machine_options(MachineClass *m) compat_props_add(m->compat_props, pc_compat_2_4, pc_compat_2_4_len); } -DEFINE_I440FX_MACHINE(v2_4, "pc-i440fx-2.4", NULL, +DEFINE_I440FX_MACHINE(v2_4, "pc-i440fx-2.4", pc_i440fx_2_4_machine_options) #ifdef CONFIG_ISAPC From patchwork Tue Jun 18 15:59:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805236 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp274036wrx; Tue, 18 Jun 2024 09:08:01 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXK6DcLWZ+9jksGwpJ2rUq1nCa66Yo3siE6nWop5xnD+18sLgL+hQgg0C8OcxFVK9cAAixDuQq2Ww9siZBvepsR X-Google-Smtp-Source: AGHT+IGvEcV4eQfMQE9q5zaBxIimiMYapotbyEM8qJmMnIGNhisWkvOtXGrxyuyyU8eH2B6aJWZa X-Received: by 2002:a05:6122:32cb:b0:4ec:efaf:a020 with SMTP id 71dfb90a1353d-4ef277b5c96mr324634e0c.15.1718726880955; Tue, 18 Jun 2024 09:08:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726880; cv=none; d=google.com; s=arc-20160816; b=S/84PQ1qdyuHmep9DIe2EHIEd8oDxLJYcqeInMcgNu0gnXZPZ/XQO3BDfpnC53QUsY CoHaCu1frmtDEMoPwovZrB5ionxsE5AQkIjImoMyYSRE4eUQ9YJXU/ddQiZB+HkR5rwh uURJgC59vmPwOKKgDZ4YidPEGhiLf4DoJi/koRxMrGUisjeyT43pNFF1Vflh3V+/NQ2H KUTwWk24Jhbq9egGISDFhIWpJs6bOSsBxK5d5gCS5fIyrCt0UZ8wotT+/P7fpssfTVbZ YxHMwsmcfZ3ViveizrlN2GJN1rfRUrZO3uFuLgYK9g6bSlEE2ZUg0EvvaYk+R+URFX8r TAvA== 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:cc:to :from:dkim-signature; bh=NeFHpBJtgKcbbwJwJ5FK7MJMvna/CViY1T2wLMd8oks=; fh=6w+xFJ76MjqnZluvDV3LDGeqHzAZHg3Vg+kJkwSbDEY=; b=E/qAtlCONQ+YPh3oOvt3yir6/OAOvdr47imp1tHJVZNpxn+uiH3aTCQTsOIzd7wfL6 ReHXWJcf7WnNF43TMEapAi7ONdCY5kqym74wpmALLCdI9csRAUYzC5r2kNUm80eid3lH DdRdyol2XILMcWnHvafWVH5Iw3V0X2J/l0Gs5EKFfyv1QXjSh3fukTfV82CjMqkHYIOf IWhUhE12E5mV/34ZM3AXJlb1hLV5oVuv904rDcg+3wQolaRZtbpqTbpmim4aRXxyYkj0 MORld/EIg938AeMRTdheTcfRi8ovaS3QKS8nQ20yej/feN5T5oJsD9znybHdKP3lMfQ4 KvGQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YZ0Vn4A1; 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 71dfb90a1353d-4ed3f7d155esi2108304e0c.86.2024.06.18.09.08.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:08:00 -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=YZ0Vn4A1; 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 1sJbIX-0006wN-B6; Tue, 18 Jun 2024 12:03:05 -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 1sJbIO-0006W6-Ew for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:02:59 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbIM-00074L-4S for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:02:55 -0400 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-57c6011d75dso6891785a12.3 for ; Tue, 18 Jun 2024 09:02:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726572; x=1719331372; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NeFHpBJtgKcbbwJwJ5FK7MJMvna/CViY1T2wLMd8oks=; b=YZ0Vn4A1qhF8MQPYbQiBD8v4Y6HYYUwXnCJDRXrfNQjOR5CD/i5kTx0JKTBGYLtZ4C ldKiD98SNc9emxL9af6UNGWK5L8x78lCnbsEMu2PG1nmY0kGhpY1sN50vBOuaV/svLfz drlZe6PVCEDN25g6+Ii85ffyI/uY14RdiOLGbkPgMXSxy7bW46khKhjpZNquhfEEdP2M XKYJIsJTP0lSADLAzxfVDxktuJQoqI9LXsRejzSuufdVbVTzivcB6G4E+yFQKLG+q8IF A4L34ICaEhHSSOcWgGuqsfjkufNItL9sWwqD4TkRFHZ6TBN986sGR7DrpvZxV7797fiJ 65iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726572; x=1719331372; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NeFHpBJtgKcbbwJwJ5FK7MJMvna/CViY1T2wLMd8oks=; b=qLF9KdLPDIcU/s888trHaPoa9wcIS1g8Wu9g/VMkOTHv2SPuHKKTa5W1aREJExzRME 9BzrgmWwB9zSgtJQ2p8SaDaMCx2It8HuxfpJzoN7dPHUypDQZQUVRmaj6yBDXFqz+313 1x77ip3zpbpHOWImL6xRXx+AcgzO18o/0BnQhZT1aD2j8DkoSwqgLmsDNTYMVGbOsTVD Sto3G/KY1AJkZuGDj2adfWiVakBjmqZfJGHAJdWbvJ9ffSrKhnAGBCV1LWmfHQLb0JmI hU44AbR+j6vg82GyEp+8vGl/+mD7jnpbgDNSHuRqm1nBs07S52EqdqbOJlAxmb6rmpzs oaPg== X-Gm-Message-State: AOJu0Yym0IHELddiBc9UVzqyftkQ3YndcZfPp+PLYCmmNW/qrWBjPDT1 YAKqTMlDIzrHu0RRE9+DIQLwt6Yk40q4uP245vm3JG5A7kOkIe/Vsih6PdIA9aGmyvP7uDGOQ+2 J X-Received: by 2002:a50:d515:0:b0:57a:2e8d:c308 with SMTP id 4fb4d7f45d1cf-57cbd8b9befmr7763559a12.40.1718726572391; Tue, 18 Jun 2024 09:02:52 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57cddba1a17sm3598763a12.43.2024.06.18.09.02.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:02:52 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Zhao Liu , Thomas Huth , Igor Mammedov Subject: [PULL 22/76] target/i386: Remove X86CPU::kvm_no_smi_migration field Date: Tue, 18 Jun 2024 17:59:44 +0200 Message-ID: <20240618160039.36108-23-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=philmd@linaro.org; helo=mail-ed1-x52f.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 X86CPU::kvm_no_smi_migration was only used by the pc-i440fx-2.3 machine, which got removed. Remove it and simplify kvm_put_vcpu_events(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu Reviewed-by: Thomas Huth Reviewed-by: Igor Mammedov Message-Id: <20240617071118.60464-23-philmd@linaro.org> --- target/i386/cpu.h | 3 --- target/i386/cpu.c | 2 -- target/i386/kvm/kvm.c | 7 +------ 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 7e2a9b56ae..52571ababe 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -2108,9 +2108,6 @@ struct ArchCPU { /* if set, limit maximum value for phys_bits when host_phys_bits is true */ uint8_t host_phys_bits_limit; - /* Stop SMI delivery for migration compatibility with old machines */ - bool kvm_no_smi_migration; - /* Forcefully disable KVM PV features not exposed in guest CPUIDs */ bool kvm_pv_enforce_cpuid; diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 365852cb99..4c2e6f3a71 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -8281,8 +8281,6 @@ static Property x86_cpu_properties[] = { DEFINE_PROP_BOOL("x-vendor-cpuid-only", X86CPU, vendor_cpuid_only, true), DEFINE_PROP_BOOL("lmce", X86CPU, enable_lmce, false), DEFINE_PROP_BOOL("l3-cache", X86CPU, enable_l3_cache, true), - DEFINE_PROP_BOOL("kvm-no-smi-migration", X86CPU, kvm_no_smi_migration, - false), DEFINE_PROP_BOOL("kvm-pv-enforce-cpuid", X86CPU, kvm_pv_enforce_cpuid, false), DEFINE_PROP_BOOL("vmware-cpuid-freq", X86CPU, vmware_cpuid_freq, true), diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 912f5d5a6b..7ad8072748 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -4474,6 +4474,7 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level) events.sipi_vector = env->sipi_vector; if (has_msr_smbase) { + events.flags |= KVM_VCPUEVENT_VALID_SMM; events.smi.smm = !!(env->hflags & HF_SMM_MASK); events.smi.smm_inside_nmi = !!(env->hflags2 & HF2_SMM_INSIDE_NMI_MASK); if (kvm_irqchip_in_kernel()) { @@ -4488,12 +4489,6 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level) events.smi.pending = 0; events.smi.latched_init = 0; } - /* Stop SMI delivery on old machine types to avoid a reboot - * on an inward migration of an old VM. - */ - if (!cpu->kvm_no_smi_migration) { - events.flags |= KVM_VCPUEVENT_VALID_SMM; - } } if (level >= KVM_PUT_RESET_STATE) { From patchwork Tue Jun 18 15:59:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805225 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp272286wrx; Tue, 18 Jun 2024 09:05:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWdetqG6Pf2BvAnQ2IKrjOF48jcwHSKAkDLo1gioNw8xcgNldrZqXI6Hs+9PGer2VjV6tm29wPw2Xk3m2ekh7Sp X-Google-Smtp-Source: AGHT+IGq+JCXm28tVdIjAcSCn90AXpAUd4Tst5KqpH7I0/b8/26uCAg8Ukh1axYI9k10nhIxQBAC X-Received: by 2002:a05:6102:c50:b0:48c:4025:755e with SMTP id ada2fe7eead31-48f130e086cmr143979137.30.1718726705218; Tue, 18 Jun 2024 09:05:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726705; cv=none; d=google.com; s=arc-20160816; b=bEQ5nKuAx9m1ZcpqFARq1LIwnpyWh0S/exNU+uPobpGF6o7WGuuCp4k2ccEFJP7PEH HHZZqrA4g9CvuvZbb4Uz5Sjx5IxKrNYuWBvnVPXKJpYrFtzQlBAZHMI2Od61lSBt6aYa lS1xO4qmRYNTsgVqHv3FTEgtcBImxZO6/LgUSaIrDdTGDuKiB/yNZ3rjGm6FdaIe4QK3 vRh08csMC4Wra4wE3lQHMEHIchkNuxE1ZfsoYYkTTUAkeBj6RAC7/huMXfuJ/SU5+ses 7e2GuJ5BH4+fWkGIIJD9a67AhHhQKv34Z5XBrMEshH4+WMQaYTIe6Sd43+J5USMpz7Di K4Qw== 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:cc:to :from:dkim-signature; bh=5yi1+oyDOeGjldJpCtaWr7mKsqw3FoNEfWgLcD7ET3s=; fh=QeIS5kb1Uh2g1z6dWJxoYMIPD1Pl4adL6YUWYeE5yJk=; b=lh7huAtO1QfhkMOSsRNLmemjym7CclZUkfUO5473HctdCUk7WllTWDxxbia0hc4HB9 YYLaTZt1tplQYOV5Im3p6cKQVT08IWOXAtuoAdO28tuxXXBR7wsA1hClMnXVrxgSlttW VuHPg6+fI7/ta/MHMHPUFyc5LH3R4m3bokZISiBGKYDX2Ko1c8EVAY5QBJ/CLkZQqZnU eKdTp50DMlw9y2rWZpn9XUU32ZTkA4SFjkvF2jmx52RACW0fzPesqAcKQ4PGX1SpiXpG /YqYzfeMGFkzBFFIOzIToNQcs+aEZiLPVwd22fHQKJ9SYowaQ46SMB+N7iuaznWo0vuZ KPDA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VCtRLuQv; 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 ada2fe7eead31-48da4471bf1si2169626137.373.2024.06.18.09.05.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:05:05 -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=VCtRLuQv; 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 1sJbIY-0006yP-0d; Tue, 18 Jun 2024 12:03:06 -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 1sJbIU-0006kR-Mk for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:02 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbIS-00077J-2s for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:02 -0400 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a6e43dad8ecso975497066b.1 for ; Tue, 18 Jun 2024 09:02:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726578; x=1719331378; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5yi1+oyDOeGjldJpCtaWr7mKsqw3FoNEfWgLcD7ET3s=; b=VCtRLuQvq5lPNdFmCU78KEZ2Ly1ippGfOwmEBl2k+4+o//MZEjsKkKXgsAYTLzvtgr lEVR5hHEseduYlxu5h1/U0R1J52fbvHFaSzjgX0eJ1uk1wNeOJtd3ch2gGgzbu5ntDCK K6JTjsfT6nEW8ZZHqbnnu+1+Ze6bVF8CkOfZYNpV8GmEydOSY8BLGTqQ3wtRRs4sn9cM d0wYA/4yM0aMvwZnxXc1QkGKx3NsjmxJZoN2+FjHP62k+6Cp7BSmmqsPh/W4YRz/TCcG yvnn8JU8U5b05qOpK/18JW4P+5n0hxAmvgh7e/ruKAon4t6E0BEF7s3j0KYLZhHekWd/ wGBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726578; x=1719331378; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5yi1+oyDOeGjldJpCtaWr7mKsqw3FoNEfWgLcD7ET3s=; b=qeB0uum5wU0qeXabt2/IJYJeA9k73wTQFT40vaj3fl+9EShlanmo0ajVv9ww7F8IbF F90oPAimfzEOZ5mSWKth37q9Lng12/WRvH4Uhcb685ZFCKQ6Dkn3zuDVNW1v8JNMUggE JDcLlI6Wr8fZ1WmQv0abRxAjy8yj9iMq/0b3R80pBe0YBc4KPA2C2cCWOOf+rPfzEXr2 zZWdwtMF1atmRkQ0bVJ5JIzz2WnzqDjoIrE7/vv+MeYnueitnbd3Qm4CHzSXHpWqJgBl a+I++KnmkqzuC4ojc3KlnF9JyOW1Nhbh0PTnr5BQ/HUFIKdH+kkK0W8A7DogXClPd6mr MyPA== X-Gm-Message-State: AOJu0Yy6tpNTFn/CT0QcE6et9bvDHyfuVSmxtWkaL2SVmFpttxIl6kMY 9o9tLopNne2IgV1e7QDL6p+EQY8WpQoBGAeFkY4U7YZRxq2iJReTzgOjelYRhGTr3Pvx50SstTF E X-Received: by 2002:a17:907:cbc5:b0:a6f:996f:23ea with SMTP id a640c23a62f3a-a6fa4109cdfmr14068466b.15.1718726578053; Tue, 18 Jun 2024 09:02:58 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56f9802csm627137066b.189.2024.06.18.09.02.56 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:02:57 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Zhao Liu , Igor Mammedov Subject: [PULL 23/76] hw/i386/pc: Replace PCMachineClass::acpi_data_size by PC_ACPI_DATA_SIZE Date: Tue, 18 Jun 2024 17:59:45 +0200 Message-ID: <20240618160039.36108-24-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=philmd@linaro.org; helo=mail-ej1-x62a.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 PCMachineClass::acpi_data_size was only used by the pc-i440fx-2.0 machine, which got removed. Since it is constant, replace the class field by a definition (local to hw/i386/pc.c, since not used elsewhere). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Zhao Liu Reviewed-by: Igor Mammedov Message-Id: <20240617071118.60464-24-philmd@linaro.org> --- include/hw/i386/pc.h | 4 ---- hw/i386/pc.c | 19 ++++++++++++------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 0b7a18a882..46bc411063 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -74,9 +74,6 @@ typedef struct PCMachineState { * * Compat fields: * - * @acpi_data_size: Size of the chunk of memory at the top of RAM - * for the BIOS ACPI tables and other BIOS - * datastructures. * @gigabyte_align: Make sure that guest addresses aligned at * 1Gbyte boundaries get mapped to host * addresses aligned at 1Gbyte boundaries. This @@ -100,7 +97,6 @@ struct PCMachineClass { /* ACPI compat: */ bool has_acpi_build; - unsigned acpi_data_size; int pci_root_uid; /* SMBIOS compat: */ diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 819a164373..77415064c6 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -265,6 +265,16 @@ GlobalProperty pc_compat_2_4[] = { }; const size_t pc_compat_2_4_len = G_N_ELEMENTS(pc_compat_2_4); +/* + * @PC_FW_DATA: + * Size of the chunk of memory at the top of RAM for the BIOS ACPI tables + * and other BIOS datastructures. + * + * BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K + * reported to be used at the moment, 32K should be enough for a while. + */ +#define PC_FW_DATA (0x20000 + 0x8000) + GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) { GSIState *s; @@ -646,8 +656,7 @@ void xen_load_linux(PCMachineState *pcms) fw_cfg_add_i16(fw_cfg, FW_CFG_NB_CPUS, x86ms->boot_cpus); rom_set_fw(fw_cfg); - x86_load_linux(x86ms, fw_cfg, pcmc->acpi_data_size, - pcmc->pvh_enabled); + x86_load_linux(x86ms, fw_cfg, PC_FW_DATA, pcmc->pvh_enabled); for (i = 0; i < nb_option_roms; i++) { assert(!strcmp(option_rom[i].name, "linuxboot.bin") || !strcmp(option_rom[i].name, "linuxboot_dma.bin") || @@ -986,8 +995,7 @@ void pc_memory_init(PCMachineState *pcms, } if (linux_boot) { - x86_load_linux(x86ms, fw_cfg, pcmc->acpi_data_size, - pcmc->pvh_enabled); + x86_load_linux(x86ms, fw_cfg, PC_FW_DATA, pcmc->pvh_enabled); } for (i = 0; i < nb_option_roms; i++) { @@ -1743,9 +1751,6 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->has_reserved_memory = true; pcmc->enforce_amd_1tb_hole = true; pcmc->isa_bios_alias = true; - /* BIOS ACPI tables: 128K. Other BIOS datastructures: less than 4K reported - * to be used at the moment, 32K should be enough for a while. */ - pcmc->acpi_data_size = 0x20000 + 0x8000; pcmc->pvh_enabled = true; pcmc->kvmclock_create_always = true; x86mc->apic_xrupt_override = true; From patchwork Tue Jun 18 15:59:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805241 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp274589wrx; Tue, 18 Jun 2024 09:08:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXMROMj2bI6pAFyp03KCwUNfbJOmYBLPgfskk+Q+A7TRihOE6Z9BwDq8/rk7J+0Ngx1i4VymKZR3d2FSVUAfX5F X-Google-Smtp-Source: AGHT+IHfXW9KXmE6yjPd9ixM3MCuGQ+3Ii0vq3Ak7pFns/rdP4QQHn1Kc4cByhZnavZ/S0s3hajY X-Received: by 2002:a05:622a:4ce:b0:440:f5d7:f475 with SMTP id d75a77b69052e-444a79e1f98mr2167771cf.39.1718726938168; Tue, 18 Jun 2024 09:08:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726938; cv=none; d=google.com; s=arc-20160816; b=HbcKv/AtVxd5GBmALOg+/8tpWkJ5zFH0dSgS1Ovv3LYN+n1t6TD/lkOuyp+EwhQrb1 hbu9VoMibHh/ShZrPmA/bpKTO1QSbQqqfOdvKGDarjONUP4tzhRUotHlSoBt6A/1Nl47 k2iuN16xuQAkWdjYwQoFMruoeZUudwqOMaePb7oBt0lw6qec34ntLGfIAtWngR20gJIm Tg3VfLumJ7635SvEaGPFP94+R4UqqQriIBQHcPIiwc41IOC3JX+2gHfZ5ZWnccUSOFXH 2KM3pzWCbEk27qNccbzsTKWLh4gWOLkO4Jq9EtHjd5nQmp1ET8X+boPqu7eDTcd4JGco +vmA== 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:cc:to :from:dkim-signature; bh=oLAsEZ1WvZS0nMNIQBNTpRKUp/i555alHafKiDl+nF8=; fh=RgtV0+nsBGO1lyAzgRSV43uIRHDswO2Q2EZUsQp2nts=; b=u3kqtoSqvA94UC1y3fXyaB+FguxhsJToD5J58wK/rAAOXtpYc8SWyo5+2D6E+YD3K5 ai090vTYg/76R+1Ks602DGlpgIO+BjEINhGJ0vLgUmgia6YXlYYxq1qNPSid2CVWiWFc OWuyvdr16QiOwPVPOg2YYYMNjtLhPv3ggPqAT6VpQWQh+28+0cLWFjIG2pirunaI59j1 /ksWZE7uSFuWIox6/zUdvj5DaFXVYS7mlFPa7N61Gc42g8yNjWSfJGsv+N3NjSdCZKIW 9mGjkdVpPu+f2ann08u4uosErNpKwoPwkmL5NRfKjl1NenIKniIHKwtVPGLrouZsRon8 GXHQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LAU50MYf; 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 d75a77b69052e-441f2fb9d76si123773531cf.420.2024.06.18.09.08.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:08:58 -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=LAU50MYf; 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 1sJbIb-00077C-Ao; Tue, 18 Jun 2024 12:03:09 -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 1sJbIZ-00072s-9D for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:07 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbIX-00077Z-LQ for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:06 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a6efacd25ecso350258366b.1 for ; Tue, 18 Jun 2024 09:03:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726584; x=1719331384; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oLAsEZ1WvZS0nMNIQBNTpRKUp/i555alHafKiDl+nF8=; b=LAU50MYf3XGGj339E4iXSrWXXpdCejEOlUAitjnh2pv+3RgekTuyKnC9OmvyOm0+xC 3mlooR6sd+HgbbQh8gKZve7MbXTf/0n6MqxiM6/eluPpuNwHbDVoubO7+A4fO7O3CoQs +GvTPu4d1meWefqgJ5oN4aFI530j/eFiQ37d2GPOarvMBJ4ZSrFh58hBmI/baM1llpnb 2b8XRHg25w/rHCM6hSTfmH+pw1QMal+PFGNw2K5yXAXUse2BySjrIgJYC4VRLe4f/yqk boJgCyftTWCyE1Flq/tBBSdx2uqXsfm9uVeAxtqcOdTpOdHqdYfMEKTnW4QnWN8HT8fH RY2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726584; x=1719331384; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oLAsEZ1WvZS0nMNIQBNTpRKUp/i555alHafKiDl+nF8=; b=h1eEaR0Y/7uZrsH6nL7tYBC4CK614ZHdGA4q9e4tae/bwe/wo0ctHrI86HkNE4Z4la DmVu/+z3VMBC9DW77URMe0epKNfA/Nb+npGcfTS/3/wfoNp7tKoNS/e94E5mYJq0K8KN sqrOMTB/woM6TqfJiJY8Ze7DAAPJzpNK/YMs+/QF0N1ctkA7WW2ZIyUuozZ8tS/qC0Rr dhF1+v3U6nPQT+nLGHJ2IZtiYpaQvKTaoksly+V1iFZplaXvOwAq95q3BoLOhb6WbroF IVl5IBTn61kzAWfIfeygCGE/owFI6FrvUePw5n316j2Oxaqa8tOboEsfvMrgryVtR/Be DB0g== X-Gm-Message-State: AOJu0Yxwhl3Gmtz3X+n/0k9bOw4MRxci9nC1cmlAQmwM7DcDtIlSAQMy hvkPBv2OZjcVGEZRKiGVEvUaYsa2Osw32oiffA77jqf0g1crd5CnFagNW66Ec0IgQftnzRLpfr3 8 X-Received: by 2002:a50:aa8a:0:b0:57c:6d89:eaef with SMTP id 4fb4d7f45d1cf-57cbd68dbe7mr8665503a12.18.1718726583755; Tue, 18 Jun 2024 09:03:03 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f8176eea5sm288091766b.88.2024.06.18.09.03.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:03:03 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-stable@nongnu.org, "Michael S . Tsirkin" Subject: [PULL 24/76] hw/audio/virtio-snd: Always use little endian audio format Date: Tue, 18 Jun 2024 17:59:46 +0200 Message-ID: <20240618160039.36108-25-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=philmd@linaro.org; helo=mail-ej1-x630.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=unavailable 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 VIRTIO Sound Device conforms with the Virtio spec v1.2, thus only use little endianness. Remove the suspicious target_words_bigendian() noticed during code review. Cc: qemu-stable@nongnu.org Fixes: eb9ad377bb ("virtio-sound: handle control messages and streams") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Message-Id: <20240422211830.25606-1-philmd@linaro.org> --- hw/audio/virtio-snd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index 7d09800d1f..5993f4f040 100644 --- a/hw/audio/virtio-snd.c +++ b/hw/audio/virtio-snd.c @@ -401,7 +401,7 @@ static void virtio_snd_get_qemu_audsettings(audsettings *as, as->nchannels = MIN(AUDIO_MAX_CHANNELS, params->channels); as->fmt = virtio_snd_get_qemu_format(params->format); as->freq = virtio_snd_get_qemu_freq(params->rate); - as->endianness = target_words_bigendian() ? 1 : 0; + as->endianness = 0; /* Conforming to VIRTIO 1.0: always little endian. */ } /* From patchwork Tue Jun 18 15:59:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805243 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp274602wrx; Tue, 18 Jun 2024 09:08:59 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXwdkwtSiFF6CD/wzfOJcpmRVNgTdJ9hLKYGKmLeZFW2GdnM7/ydhvgiIybHeuouTd6zMw9xNzgbv3p0MerNC1c X-Google-Smtp-Source: AGHT+IEqVpgbVKnvE5NW5D3I6ETcI2UTzplTY07AUoEroGkKzrqMb2bdviBo4xnhacav+4KGV0bW X-Received: by 2002:a05:6358:3115:b0:19f:45ca:c1cb with SMTP id e5c5f4694b2df-1a1fd35d52bmr31581755d.7.1718726939038; Tue, 18 Jun 2024 09:08:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726939; cv=none; d=google.com; s=arc-20160816; b=MFISVStFVN/5WcQOE64vzn7+ASx8dWysS3g9uryDGhXyO81kuYJl7vrk9fwx0TcN7Z 9rc0OTBWVWnzeBHeSqS7a++VBQUMLU9NGvAOkJ30CDXDBXgloLjeU9sGAQT71bevgx8v qDZCxiQwPsIiCO/NBtgkHAxQnj/mXz2S8HNxKu3ST211lgM/bmtV9OQHaywan3+fplMp P40mXT0OCS1HpZghoyYyp225iETM6CUVbLBSxgIN6dVo9OdQLxLp9yV/qlkOmVgd7msN I39t3a4f3l1OkA+gC4U9R944Tz1DrajL6XzZYJMwaD/Ew4fim5s+lGccl0oOemRTAYBB MQIw== 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:cc:to :from:dkim-signature; bh=qA5Ge8ZtgAa4V9zb3xBkrJO7P0viojUBuVQA89Wmlaw=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=kOjMqz3GRm0hn/ltCIP2ivix91YJBUPzWYwNUndmOd7wUQaxfZIshy3QyA2TBDHxp2 sZEs/ijHhFn2cx/K3ZQHdGjjR/kCZy35+SAeXgbP2cAF604k3lKW8i6w/0k7k6P0az7K mGp5t2gDt7Lsmnf9x2OEOyvGMWyJz9FDQUbB9kCv5XIh5IsPaOK1f0AWi9TT2iClv9mq mM3hHxdqeul7BRNfi43bbqzA94kXYlYZHG08nROqILs5/r9qV5qPUAWPvCuwsZXtMsxR pmt/va/Lip3Gkg63JSRX8oDTpboijLUMb6DqoMnYG0ulHUpmH3G7GrJ+XoJzMoqjgxa3 /QjA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mmpgc3qs; 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 ada2fe7eead31-48da43bfec4si1947371137.191.2024.06.18.09.08.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:08:59 -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=mmpgc3qs; 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 1sJbIo-0007Nn-Id; Tue, 18 Jun 2024 12:03:24 -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 1sJbIf-0007Cf-Bq for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:14 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbId-00078I-CF for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:12 -0400 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-57cad452f8bso6398504a12.2 for ; Tue, 18 Jun 2024 09:03:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726589; x=1719331389; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qA5Ge8ZtgAa4V9zb3xBkrJO7P0viojUBuVQA89Wmlaw=; b=mmpgc3qscMeX33sSISLRWxVI6CMrUo9Qk9QPYcFgWBmwl4IvqJBPb7Y7xhr/9toVZk 4PGhu8xVEhdup/VIfJbjlu0h9kffXeeliSNpVy8yubXCrYtxG3DFkVo8ltoqkeOpWu4m M7Zv4jJxleuA6WuMmLxHCvlg0g/50mLXivomcuMzh7+YAwyxgDh9rsxFqkaM7n/s0aLI M5HCLqNYrQJ+gvODsUZ3+kDAJrTXQzUoLpvmGc8lrYKuVCCkis//O1qr+wiIS4g3LWMm O+qkTdsho3gyGJr/kj4e8oDbSsufyLryixaEuNDhI05PGq+h73z7Dhi3RRBfPhCPKkgW 70cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726589; x=1719331389; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qA5Ge8ZtgAa4V9zb3xBkrJO7P0viojUBuVQA89Wmlaw=; b=oHH5pDKUwcj9wY/sTbG9gRGPqMIM2cvelwZ5NeHokOvztXcSZCGN8adUqxKf62CEwf 7chgegV4C141zWhQXuuEFV3j41Jg+wHgUCAgKD1zk9VgOEQLp+0Dq2ZyPxmLXMBqxjzB VI+8fBXFXzarO2TOSaYKUB5hMUJclIsafzZIF1C3M9Hw5w6Yk+z/1SU+jbAiXJI7A2TW XukqgwFXLsvE6Y3uMUHWRhJ1w9eYAtgY8VRw5EILoMRLgHEtABUhmWeV5fap6RE4vDvI WIBH5Wa6bxiaJec4DVyWicU4RAjJkZfawEYlh9fukt1BYR2bqMMik5Rn6n6aajUiovMo T6UA== X-Gm-Message-State: AOJu0YwC/+HkxDI1jnhTjfwojlN7FVkooYXkj1xSv0LLAtt1nVuo+2qg Gy2mXSKqmXaEA1w/lYIGswT0PRBu2sqOmYkrBmNDlLCdrGr7o/2XX7fAXjyN3o/mUzNpQeXDkU1 0 X-Received: by 2002:a50:d681:0:b0:57d:579:3ca8 with SMTP id 4fb4d7f45d1cf-57d05793e00mr449766a12.22.1718726589417; Tue, 18 Jun 2024 09:03:09 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57cb743ade6sm7856056a12.95.2024.06.18.09.03.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:03:09 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 25/76] hw/ppc: Avoid using Monitor in pnv_phb3_msi_pic_print_info() Date: Tue, 18 Jun 2024 17:59:47 +0200 Message-ID: <20240618160039.36108-26-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=philmd@linaro.org; helo=mail-ed1-x535.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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-2-philmd@linaro.org> --- include/hw/pci-host/pnv_phb3.h | 2 +- hw/pci-host/pnv_phb3_msi.c | 21 ++++++++++----------- hw/ppc/pnv.c | 8 +++++++- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/include/hw/pci-host/pnv_phb3.h b/include/hw/pci-host/pnv_phb3.h index d62b3091ac..24ca3dddaa 100644 --- a/include/hw/pci-host/pnv_phb3.h +++ b/include/hw/pci-host/pnv_phb3.h @@ -40,7 +40,7 @@ void pnv_phb3_msi_update_config(Phb3MsiState *msis, uint32_t base, void pnv_phb3_msi_send(Phb3MsiState *msis, uint64_t addr, uint16_t data, int32_t dev_pe); void pnv_phb3_msi_ffi(Phb3MsiState *msis, uint64_t val); -void pnv_phb3_msi_pic_print_info(Phb3MsiState *msis, Monitor *mon); +void pnv_phb3_msi_pic_print_info(Phb3MsiState *msis, GString *buf); /* diff --git a/hw/pci-host/pnv_phb3_msi.c b/hw/pci-host/pnv_phb3_msi.c index a6d827f903..77d673da54 100644 --- a/hw/pci-host/pnv_phb3_msi.c +++ b/hw/pci-host/pnv_phb3_msi.c @@ -13,7 +13,6 @@ #include "hw/pci-host/pnv_phb3.h" #include "hw/ppc/pnv.h" #include "hw/pci/msi.h" -#include "monitor/monitor.h" #include "hw/irq.h" #include "hw/qdev-properties.h" #include "sysemu/reset.h" @@ -316,13 +315,13 @@ static void pnv_phb3_msi_register_types(void) type_init(pnv_phb3_msi_register_types); -void pnv_phb3_msi_pic_print_info(Phb3MsiState *msi, Monitor *mon) +void pnv_phb3_msi_pic_print_info(Phb3MsiState *msi, GString *buf) { ICSState *ics = ICS(msi); int i; - monitor_printf(mon, "ICS %4x..%4x %p\n", - ics->offset, ics->offset + ics->nr_irqs - 1, ics); + g_string_append_printf(buf, "ICS %4x..%4x %p\n", + ics->offset, ics->offset + ics->nr_irqs - 1, ics); for (i = 0; i < ics->nr_irqs; i++) { uint64_t ive; @@ -335,12 +334,12 @@ void pnv_phb3_msi_pic_print_info(Phb3MsiState *msi, Monitor *mon) continue; } - monitor_printf(mon, " %4x %c%c server=%04x prio=%02x gen=%d\n", - ics->offset + i, - GETFIELD(IODA2_IVT_P, ive) ? 'P' : '-', - GETFIELD(IODA2_IVT_Q, ive) ? 'Q' : '-', - (uint32_t) GETFIELD(IODA2_IVT_SERVER, ive) >> 2, - (uint32_t) GETFIELD(IODA2_IVT_PRIORITY, ive), - (uint32_t) GETFIELD(IODA2_IVT_GEN, ive)); + g_string_append_printf(buf, " %4x %c%c server=%04x prio=%02x gen=%d\n", + ics->offset + i, + GETFIELD(IODA2_IVT_P, ive) ? 'P' : '-', + GETFIELD(IODA2_IVT_Q, ive) ? 'Q' : '-', + (uint32_t) GETFIELD(IODA2_IVT_SERVER, ive) >> 2, + (uint32_t) GETFIELD(IODA2_IVT_PRIORITY, ive), + (uint32_t) GETFIELD(IODA2_IVT_GEN, ive)); } } diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 6e3a5ccdec..5356a4e295 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -38,6 +38,7 @@ #include "hw/loader.h" #include "hw/nmi.h" #include "qapi/visitor.h" +#include "qapi/type-helpers.h" #include "monitor/monitor.h" #include "hw/intc/intc.h" #include "hw/ipmi/ipmi.h" @@ -774,8 +775,13 @@ static void pnv_chip_power8_pic_print_info(PnvChip *chip, Monitor *mon) for (i = 0; i < chip8->num_phbs; i++) { PnvPHB *phb = chip8->phbs[i]; PnvPHB3 *phb3 = PNV_PHB3(phb->backend); + g_autoptr(GString) buf = g_string_new(""); + g_autoptr(HumanReadableText) info = NULL; + + pnv_phb3_msi_pic_print_info(&phb3->msis, buf); + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); - pnv_phb3_msi_pic_print_info(&phb3->msis, mon); ics_pic_print_info(&phb3->lsis, mon); } } From patchwork Tue Jun 18 15:59:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805238 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp274131wrx; Tue, 18 Jun 2024 09:08:10 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUDHR+T3CW0n4IOORXxbSISWW5XEJY67qAanT0TckzZbxhptGaHAKQwcOddNz94P8fudtR7PXJW98nFU656oVfQ X-Google-Smtp-Source: AGHT+IEJ92DsZ1zKIdQjM4n8am/qPacYn/F0PUmjL0y6Jz4Cw6UElgiPL1r/I9Z81dWPEQvRsfZo X-Received: by 2002:a81:73c2:0:b0:61a:ae79:816a with SMTP id 00721157ae682-63a8dfeaedcmr2421017b3.31.1718726890291; Tue, 18 Jun 2024 09:08:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726890; cv=none; d=google.com; s=arc-20160816; b=rL2XURTa4f8QSMfRqR+iMAzg91mKblpoA35agQU0JgCJ1U8ejy1pGRknP1MktxH49K OvmAD8CeMfToewbv8OBR6Vdk5/ZUO4//40Dn3nHUgIbB9mdce8i1J0EcO1Ye3unULxr9 kuBljrU8jDIzvEo8ImvdgPN4ytgwiDVBcoysn6PkIGUT+3PbmoQCmj5hgeZxV/y7Z2+p 8CGdDRtbNsaslQ4F/UcMA0T0i+nK5FGYQgNDaIxwQR5QhTuJjqosIYEBUcuub/HT/Ufq fFQd7VPdMJMOp4ZmbNoYAj/+pWx+ZxDlbQQmsWXAzs+lvAeRvzDwqa/jLHjpkBTE+s1I 4TGg== 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:cc:to :from:dkim-signature; bh=2h5hZc6LXMjCThYre/XODwbhy/fDBZZML+oz5gALLWA=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=f1uuMb7vct9L86AONNPwFo99FymaTTm0eSZ0KIzi4m21GMiRCkRlp/VgY/LanskBVg 3UR1zUX4/rxzE9BKbXM37jtH4nmBH/UZLJ51CKXNDvS6XLFRIoi2Cv4K1cYgrAYpOSJl KoQq6Gt59q7KLa73CpXf4xffyinGA0AEb6FWqrkoXbhtC+3H7uiTYgrxXsBxCbLZwojm zCTg3mO+Otr4olMM6urFQnpxu+kNGsSzIn6TUMr5Elk52sRMQ64ykBDHdF2yDQpHiyLk nP2uq02fL+Hs9THW03WP6/PJJLuBG8QEwUz7DUqbL40AoKfvM13pST97wd35F6KkSpm6 ImgA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d1EXL3my; 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 00721157ae682-6311b105f5dsi46308017b3.406.2024.06.18.09.08.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:08:10 -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=d1EXL3my; 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 1sJbIr-0007an-W4; Tue, 18 Jun 2024 12:03:26 -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 1sJbIk-0007Ly-Uk for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:20 -0400 Received: from mail-ej1-x636.google.com ([2a00:1450: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 1sJbIi-00078m-Vc for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:18 -0400 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a6f9fe791f8so65682066b.0 for ; Tue, 18 Jun 2024 09:03:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726595; x=1719331395; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2h5hZc6LXMjCThYre/XODwbhy/fDBZZML+oz5gALLWA=; b=d1EXL3myi9i9PZt9+kVwyP9RdCN6V+FdpXCPAhlpWaJJTv6S8VuCOEekepdbhdS+0r whDH7V4hb7unkRDM5LzU+cejFPsRncVjS4P5C9Wu4EHXrYC55DNRNoQMnQN+tUjw1oTm JrBgTI09AoOb9FQoD+G/IRpZV8YliPv1pRYRJKQPacBXk3u0X9DEYRZcivP7H5HI6dVX xse6T7VIH6KRJWjxxMkbr4X9dnG1AfuggFabCIZ/vAicNXqxcNwZpnLpttO+3PrEXNPj MUiqUOaiAxce2aKq4dHwwRUud7MsjcZi/hbdGFz321czFEbEokXakgFLbAeyppNpyfPV oKMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726595; x=1719331395; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2h5hZc6LXMjCThYre/XODwbhy/fDBZZML+oz5gALLWA=; b=nGjoX2H7btaGEACO9Ra5T1fKVMbGS5FH2wRCifO1oyXQDX6BTyFW0A/nGE0lvx+YNS YfYS+7ba0K0NQscXFBAEfh5Uf3l38MVmDPrmVrwQXHOjEmpF8nQ2UAz5dgu02G39LiLR Tp6qSGyuNL7J1CCSHstvV86C5M8WYPuq+vffHHXm3QAIRqWxwaBq0LhpNc6syRIh17yU 7OKf6e0/fyzTRiy4KlNPv0VIs+HwPSP/FxYHmLgGfQp+dbCME9nAWt3R0lwkJ+886kfH GoWoAgkOoHYBx7enwzxzuf11Qvts8MwyEeC17POxWzo7z3P60l0BTdT1Q/+DZPfFsw2x Mt4g== X-Gm-Message-State: AOJu0YyUM3UGzS5f8+wxkhOppIln6TM6olayez4tzlhRNpIJ/t6ZDayN dfLyxxjlUICMqVIsnaKGvK442KPm40Z/owptmQone9KzxGdf7jE40mISDCh6/eHSJDumNPtHUYq B X-Received: by 2002:a17:906:370a:b0:a6f:a262:2f89 with SMTP id a640c23a62f3a-a6fa26234b5mr34753666b.12.1718726595178; Tue, 18 Jun 2024 09:03:15 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56db618dsm626220166b.75.2024.06.18.09.03.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:03:14 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 26/76] hw/ppc: Avoid using Monitor in icp_pic_print_info() Date: Tue, 18 Jun 2024 17:59:48 +0200 Message-ID: <20240618160039.36108-27-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=philmd@linaro.org; helo=mail-ej1-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, 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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-3-philmd@linaro.org> --- include/hw/ppc/xics.h | 2 +- hw/intc/xics.c | 8 ++++---- hw/intc/xics_spapr.c | 8 +++++++- hw/ppc/pnv.c | 8 +++++++- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h index 95ead0dd7c..1116aa6953 100644 --- a/include/hw/ppc/xics.h +++ b/include/hw/ppc/xics.h @@ -171,7 +171,7 @@ static inline bool ics_irq_free(ICSState *ics, uint32_t srcno) } void ics_set_irq_type(ICSState *ics, int srcno, bool lsi); -void icp_pic_print_info(ICPState *icp, Monitor *mon); +void icp_pic_print_info(ICPState *icp, GString *buf); void ics_pic_print_info(ICSState *ics, Monitor *mon); void ics_resend(ICSState *ics); diff --git a/hw/intc/xics.c b/hw/intc/xics.c index 9b3b7abaea..039e10a0e4 100644 --- a/hw/intc/xics.c +++ b/hw/intc/xics.c @@ -42,7 +42,7 @@ #include "sysemu/reset.h" #include "target/ppc/cpu.h" -void icp_pic_print_info(ICPState *icp, Monitor *mon) +void icp_pic_print_info(ICPState *icp, GString *buf) { int cpu_index; @@ -63,9 +63,9 @@ void icp_pic_print_info(ICPState *icp, Monitor *mon) icp_synchronize_state(icp); } - monitor_printf(mon, "CPU %d XIRR=%08x (%p) PP=%02x MFRR=%02x\n", - cpu_index, icp->xirr, icp->xirr_owner, - icp->pending_priority, icp->mfrr); + g_string_append_printf(buf, "CPU %d XIRR=%08x (%p) PP=%02x MFRR=%02x\n", + cpu_index, icp->xirr, icp->xirr_owner, + icp->pending_priority, icp->mfrr); } void ics_pic_print_info(ICSState *ics, Monitor *mon) diff --git a/hw/intc/xics_spapr.c b/hw/intc/xics_spapr.c index 37b2d99977..bab9d88218 100644 --- a/hw/intc/xics_spapr.c +++ b/hw/intc/xics_spapr.c @@ -34,6 +34,8 @@ #include "hw/ppc/xics_spapr.h" #include "hw/ppc/fdt.h" #include "qapi/visitor.h" +#include "qapi/type-helpers.h" +#include "monitor/monitor.h" /* * Guest interfaces @@ -399,12 +401,16 @@ static void xics_spapr_print_info(SpaprInterruptController *intc, Monitor *mon) { ICSState *ics = ICS_SPAPR(intc); CPUState *cs; + g_autoptr(GString) buf = g_string_new(""); + g_autoptr(HumanReadableText) info = NULL; CPU_FOREACH(cs) { PowerPCCPU *cpu = POWERPC_CPU(cs); - icp_pic_print_info(spapr_cpu_state(cpu)->icp, mon); + icp_pic_print_info(spapr_cpu_state(cpu)->icp, buf); } + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); ics_pic_print_info(ics, mon); } diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 5356a4e295..fa23b27a2b 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -1130,7 +1130,13 @@ static void pnv_chip_power8_intc_destroy(PnvChip *chip, PowerPCCPU *cpu) static void pnv_chip_power8_intc_print_info(PnvChip *chip, PowerPCCPU *cpu, Monitor *mon) { - icp_pic_print_info(ICP(pnv_cpu_state(cpu)->intc), mon); + g_autoptr(GString) buf = g_string_new(""); + g_autoptr(HumanReadableText) info = NULL; + + icp_pic_print_info(ICP(pnv_cpu_state(cpu)->intc), buf); + + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); } /* From patchwork Tue Jun 18 15:59:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805249 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp274900wrx; Tue, 18 Jun 2024 09:09:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUSU0oQqgfcrbGrgb2HkZGW8SFzooDWBdjkR9j3YkfIlDzdc15hH6GP6zjL4Ij+3tLlSAziDOq4f262GPhkT5fA X-Google-Smtp-Source: AGHT+IGglqyI81YepUuVavNu5fJzZpi/DWnxKLe1u1EmLR7QK3bjkKB9GsdovG+CP+xZda6Md+hJ X-Received: by 2002:a05:6808:15a3:b0:3d2:2d94:4886 with SMTP id 5614622812f47-3d51b83dc59mr271329b6e.0.1718726970782; Tue, 18 Jun 2024 09:09:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726970; cv=none; d=google.com; s=arc-20160816; b=TvvO+oyMAwOJJ7by3K8DfnSPq5yCuKvvSp0V5KONjaVM2fzyDIW/udBwpvCubTA8ve Cg2BQuGvWqjLDoT3FnXZNlT+08DtMQAXd6jeaN5gm/PrTGmfwh3Z22eWx+u9YgkBkhPC YbS+3UiCH2au75wnirmdcJZ86Rg4AxEN7xWiflU/HB7I1JaSGyUP2XS555F/UbKP7ar+ SyDjFSUZQdKDwWZdhfk1UHgO+oCM7ZouiRhjfZVHZhYE4F9gr+gYIOJSVS7ZbMrOUkE7 rcWfAjfKnGCDpnvVpmvbhFdMU11H8LBe5JrzsuPHHkehoP954g7Nfxd8P4ptLqUwFM/R n25g== 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:cc:to :from:dkim-signature; bh=0D0UVQQFPvgGs+AWFdh2z7yAuwNg5N51LbDWqW4G400=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=kSkrHxuuptB7cynZTJicAv8lXRTz8na/0YOXgegd9xhqzfHJzsrMPEvvbSaJ0vQyNU Sy1wGPVuxlXD2sQ128D9AZaIsFrqirSMStwh1mmnQA6zNdqbdUg7+JCkb8du/KzuJv0i EXAP4k3Iy1Tlnj8+RmvrmuEr8N3t95MAuJPlFFer0XBmrYWg43OctnkVzeEHF0y2Ll0W xzhcPNIyRnPdS0STuMBI5VTUF/6CLEBG51RwIpizf8/lPnT82h/nHnpmxKnCQrisJeq/ H4C7rrwcTDVkjXKRnj/yMV4hW6NJd2yKbibjzmw66EK7hbW62CGOl6X19NGyzm94h82d Y6SA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Th2OKuC/"; 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 af79cd13be357-798aac9bfbdsi1071333785a.95.2024.06.18.09.09.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:09:30 -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="Th2OKuC/"; 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 1sJbIu-0007fS-Fp; Tue, 18 Jun 2024 12:03:28 -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 1sJbIs-0007cG-Eg for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:26 -0400 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbIq-00079l-BK for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:26 -0400 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-52bc27cfb14so6967458e87.0 for ; Tue, 18 Jun 2024 09:03:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726601; x=1719331401; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0D0UVQQFPvgGs+AWFdh2z7yAuwNg5N51LbDWqW4G400=; b=Th2OKuC/CoPBIBcrh8LcVxvv/fH7dXSyWjdcMl192DKu1cQnxccBPtiK7+wfKlWzUD xiU5U/xiZ4R0ce4BAL8/GojX10QxWhidf9XNifRf+nqz2KhFYQtNVSrHGWFUsFZ429UE Nl/rpQaKU08iBxfeoZBx/qxe6AaISu4AIRZghxH96l57jnRanNQRyZp4YPGCCivygehN FCqlq/nuWRppKqwtA1M77big6i9KL5M5vYUMFpTWti0bMXQs0ZODL3JDHEUBZNUSC0dg XpaPggiRTvVa+M1AQxmsO1wWInZU6iZmSANbWH2HVEiGF6J3vWxBi7lqqa2yCo91c6oe eeYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726601; x=1719331401; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0D0UVQQFPvgGs+AWFdh2z7yAuwNg5N51LbDWqW4G400=; b=o8ruIExiCXMvjTs2Wcqs5JFxRGTjUUBDOTuKEbdDckhyJBJRVpHQwu9ghdC5gVXmOc vUXPK0CNDeVoJ/EuDL4U9RWp2LynvMgnoShzqIZ1y/8nocZR3k3CkSfkTiqji6weg1zb Q7J94srCD7BNVStyd62UTOy30nOiM5hG9LSCSj+rhlhtA6q9xNQTaSQo9DASVZJeU17y Xt1/dMkXN7DIh9akjoqLx2/6tp2la4fW2LduyKzP7qHGhz4aAfz6c5MW1nbJ+tJ/p0VH AYcwi81JWJyq92qqoXefPTHIxkcgZ1eSjMQEz1Ex8KUruuiJngs5PV5LUqZ/ZqKEIpFK tGfA== X-Gm-Message-State: AOJu0Ywed6T9EkjFpCEJ83az4THErRCFapDevMXaihm8z35BHHtBkmIp KRTStwHfyxlHDwC0AvwHu30iZABxNxdROJOBQvSATSP7L85KoRRW7x0Ogk9vGDGw9WeNdYqthNM h X-Received: by 2002:ac2:43b5:0:b0:52c:8811:42f7 with SMTP id 2adb3069b0e04-52ccaa32a00mr64711e87.19.1718726600866; Tue, 18 Jun 2024 09:03:20 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56dd3109sm633044166b.95.2024.06.18.09.03.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:03:20 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 27/76] hw/ppc: Avoid using Monitor in xive_tctx_pic_print_info() Date: Tue, 18 Jun 2024 17:59:49 +0200 Message-ID: <20240618160039.36108-28-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::136; envelope-from=philmd@linaro.org; helo=mail-lf1-x136.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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-4-philmd@linaro.org> --- include/hw/ppc/xive.h | 2 +- hw/intc/spapr_xive.c | 7 ++++++- hw/intc/xive.c | 11 ++++++----- hw/ppc/pnv.c | 16 ++++++++++++++-- 4 files changed, 27 insertions(+), 9 deletions(-) diff --git a/include/hw/ppc/xive.h b/include/hw/ppc/xive.h index f120874e0f..bc1cbad8a8 100644 --- a/include/hw/ppc/xive.h +++ b/include/hw/ppc/xive.h @@ -528,7 +528,7 @@ void xive_tctx_tm_write(XivePresenter *xptr, XiveTCTX *tctx, hwaddr offset, uint64_t xive_tctx_tm_read(XivePresenter *xptr, XiveTCTX *tctx, hwaddr offset, unsigned size); -void xive_tctx_pic_print_info(XiveTCTX *tctx, Monitor *mon); +void xive_tctx_pic_print_info(XiveTCTX *tctx, GString *buf); Object *xive_tctx_create(Object *cpu, XivePresenter *xptr, Error **errp); void xive_tctx_reset(XiveTCTX *tctx); void xive_tctx_destroy(XiveTCTX *tctx); diff --git a/hw/intc/spapr_xive.c b/hw/intc/spapr_xive.c index d7e56bfb20..b7c12aa432 100644 --- a/hw/intc/spapr_xive.c +++ b/hw/intc/spapr_xive.c @@ -11,6 +11,7 @@ #include "qemu/log.h" #include "qemu/module.h" #include "qapi/error.h" +#include "qapi/type-helpers.h" #include "qemu/error-report.h" #include "target/ppc/cpu.h" #include "sysemu/cpus.h" @@ -703,12 +704,16 @@ static void spapr_xive_print_info(SpaprInterruptController *intc, Monitor *mon) { SpaprXive *xive = SPAPR_XIVE(intc); CPUState *cs; + g_autoptr(GString) buf = g_string_new(""); + g_autoptr(HumanReadableText) info = NULL; CPU_FOREACH(cs) { PowerPCCPU *cpu = POWERPC_CPU(cs); - xive_tctx_pic_print_info(spapr_cpu_state(cpu)->tctx, mon); + xive_tctx_pic_print_info(spapr_cpu_state(cpu)->tctx, buf); } + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); spapr_xive_pic_print_info(xive, mon); } diff --git a/hw/intc/xive.c b/hw/intc/xive.c index 057b308ae9..a0d7e7ca67 100644 --- a/hw/intc/xive.c +++ b/hw/intc/xive.c @@ -669,7 +669,7 @@ static const char * const xive_tctx_ring_names[] = { xpc->in_kernel ? xpc->in_kernel(xptr) : false; \ })) -void xive_tctx_pic_print_info(XiveTCTX *tctx, Monitor *mon) +void xive_tctx_pic_print_info(XiveTCTX *tctx, GString *buf) { int cpu_index; int i; @@ -693,13 +693,14 @@ void xive_tctx_pic_print_info(XiveTCTX *tctx, Monitor *mon) } } - monitor_printf(mon, "CPU[%04x]: QW NSR CPPR IPB LSMFB ACK# INC AGE PIPR" - " W2\n", cpu_index); + g_string_append_printf(buf, "CPU[%04x]: " + "QW NSR CPPR IPB LSMFB ACK# INC AGE PIPR W2\n", + cpu_index); for (i = 0; i < XIVE_TM_RING_COUNT; i++) { char *s = xive_tctx_ring_print(&tctx->regs[i * XIVE_TM_RING_SIZE]); - monitor_printf(mon, "CPU[%04x]: %4s %s\n", cpu_index, - xive_tctx_ring_names[i], s); + g_string_append_printf(buf, "CPU[%04x]: %4s %s\n", + cpu_index, xive_tctx_ring_names[i], s); g_free(s); } } diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index fa23b27a2b..5854358f65 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -1223,7 +1223,13 @@ static void pnv_chip_power9_intc_destroy(PnvChip *chip, PowerPCCPU *cpu) static void pnv_chip_power9_intc_print_info(PnvChip *chip, PowerPCCPU *cpu, Monitor *mon) { - xive_tctx_pic_print_info(XIVE_TCTX(pnv_cpu_state(cpu)->intc), mon); + g_autoptr(GString) buf = g_string_new(""); + g_autoptr(HumanReadableText) info = NULL; + + xive_tctx_pic_print_info(XIVE_TCTX(pnv_cpu_state(cpu)->intc), buf); + + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); } static void pnv_chip_power10_intc_create(PnvChip *chip, PowerPCCPU *cpu, @@ -1267,7 +1273,13 @@ static void pnv_chip_power10_intc_destroy(PnvChip *chip, PowerPCCPU *cpu) static void pnv_chip_power10_intc_print_info(PnvChip *chip, PowerPCCPU *cpu, Monitor *mon) { - xive_tctx_pic_print_info(XIVE_TCTX(pnv_cpu_state(cpu)->intc), mon); + g_autoptr(GString) buf = g_string_new(""); + g_autoptr(HumanReadableText) info = NULL; + + xive_tctx_pic_print_info(XIVE_TCTX(pnv_cpu_state(cpu)->intc), buf); + + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); } /* From patchwork Tue Jun 18 15:59:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805228 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp273558wrx; Tue, 18 Jun 2024 09:07:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUBdBJMR9gjIZPywlYEUtmsYasQuBjG0CeFH6Ihu90t9TrHq5AAxWOfFK7YPc/ErkHAX6t1IxmcFqh0PLHAn+7E X-Google-Smtp-Source: AGHT+IHljCf8ay2CiFbL4HnnD2lBm6k+IZ141WHCmCUM1eTv/iwEDY3Q/2vGDHN1u3gv096+pEuj X-Received: by 2002:a05:6122:3695:b0:4eb:5cd7:997 with SMTP id 71dfb90a1353d-4ef276b861amr398980e0c.6.1718726833570; Tue, 18 Jun 2024 09:07:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726833; cv=none; d=google.com; s=arc-20160816; b=tXhXfFMuNnXkI/aqBw19D4Lz5fooEnbNOS6G9bYMIFGGp+3FLyHa/sErnt+Dz1dJ1e Is4nMpNWd+aIcLj6Lr01BG/PL0aT7J+sJUIITzuBZ0AUpSr54M0DkEPTGB008sFycfjQ s0/k1Z/ebPUgw8LkVT/3o14czyUE331J0bIfydh8hMeLvqAXtwMJkKaj0Zc2uKYATv6m 3NMsxG8Y11E6R635eTEY4YpGlMbMJ8KQUGcOkA4XZeKqrUnUC6UCEMcIn9auBmIKel8K VQ123UlBwQq2m3zelxE70jzuizDpU+B/5FMrAGAgbV/573jNEdAlgsyHMSvQImVT9Bs5 oK0A== 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:cc:to :from:dkim-signature; bh=Q64a/UtP53Z3SK6mE3/iQc+gyaav2rASLGADleRJIug=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=AUMS33HK0axV+ulsdYLPryLe8VKUfs4cE3JZBd5QfTcQO9yPIQVa2eg+gDjGW70sR7 hB/8geVSaCHNvWgtd4W69IW7wRe8ge5iXmujC+zKeNLZCAVXlA4CUu0fQZRufmBkWwfr 8fKNrUWQD/kC5l3d7H0bDpNg/fM97U+K1Oy71i7XRBuFcldgQ4T66Wzjy5rvoGz618Bl InZ7ec7/csQc2WJoHVCIi1vAOqZimwnNbmg01ZzwcyiNgZHb1/Pwvo9UTk/2ut7iPSEO Al6b7L4oLinqQAOGxe9qXCnd8eGsJuk40EJ1muOQ+XnfTtUz1hVeFwja2J9OL6MMEcA2 +E1Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z0wfAqWi; 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 71dfb90a1353d-4ed40e54868si2150350e0c.180.2024.06.18.09.07.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:07:13 -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=Z0wfAqWi; 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 1sJbIz-0007pQ-30; Tue, 18 Jun 2024 12:03:33 -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 1sJbIw-0007io-Bv for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:30 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbIu-0007AD-9f for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:29 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a6f0c3d0792so665578566b.3 for ; Tue, 18 Jun 2024 09:03:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726606; x=1719331406; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Q64a/UtP53Z3SK6mE3/iQc+gyaav2rASLGADleRJIug=; b=Z0wfAqWi6J5HsRJEtBI6KW7EngpTaiW8p9Y3vCaZ9h38tUsLh/Ih8H5QWeUc7iQ6NZ /XdNJuIlraP5CiY1bYwZuCrX82WT41aot5wUC6lJlBjfE3bvintJHZs/a5vw+Bvly3Bp OGrNO5T6LGNfpgcwD+HWz43HuOPtfhpQhFJ9nryUXhEu4xNjWoIyctej8TAEBfgxJ8I2 tkrURFLAz98uSh21ANfwha23bv5E7cMb8lFHjn4lccGKeznVDJbw5bBIOlD87WitZyhC AApltWYQIUqirtCKjyzEMy6DUqCxFZNP5DsasYT8kzQtOLC5S5VdVwAqYyu22Cbuq7oC WIRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726606; x=1719331406; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Q64a/UtP53Z3SK6mE3/iQc+gyaav2rASLGADleRJIug=; b=wGVn1OAUja6oAeucHiwkf1sLVfvM/GVcHwPPEH633Yztn1gikLDmZKx5Ck2gVG+bxN E4+7ihPgsd4Ka/TWJGeMvbi6h+2F3yZIMEE3zfNHKlAhXN3dcnaO9UpiCaPwMc+QQsWa ciNweocCv+KcQMwhGCrR4s30taLedYMJsAFgp/Su5YaItQsf3UJZThbvLidwIBkD3MO/ XxqSJifdSR3q/FCFnVoHpUbeiUW5KxHbnpI/dBVlLz/6lo0mN8Rxor8NBtxlZOcwdjJY u+fVyf5fhlrQbj1v9Pf5uAWaLPG5MXRYiPak+UXaYZvBAhz499Cimn5dEytk6QF0hoOV ExnA== X-Gm-Message-State: AOJu0YxPZMNf97GbuTO6gYxmpxty/m51mvXTDqhyJcV/NDMjsxx7vDTu 5ylNv102eW+VpmZ4p1hBwh9asE1hINTS3c4NWZ4coQu/jUcAEZETDjs4gfcQqavGSB3YJuZt9oV S X-Received: by 2002:a17:906:7c9:b0:a68:a800:5f7e with SMTP id a640c23a62f3a-a6f60cefe50mr952193366b.10.1718726606530; Tue, 18 Jun 2024 09:03:26 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56da329asm632887466b.37.2024.06.18.09.03.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:03:26 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 28/76] hw/ppc: Avoid using Monitor in ics_pic_print_info() Date: Tue, 18 Jun 2024 17:59:50 +0200 Message-ID: <20240618160039.36108-29-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=philmd@linaro.org; helo=mail-ej1-x62e.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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-5-philmd@linaro.org> --- include/hw/ppc/xics.h | 2 +- hw/intc/xics.c | 17 ++++++++--------- hw/intc/xics_spapr.c | 4 ++-- hw/ppc/pnv.c | 15 ++++++++------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h index 1116aa6953..e94d53405f 100644 --- a/include/hw/ppc/xics.h +++ b/include/hw/ppc/xics.h @@ -172,7 +172,7 @@ static inline bool ics_irq_free(ICSState *ics, uint32_t srcno) void ics_set_irq_type(ICSState *ics, int srcno, bool lsi); void icp_pic_print_info(ICPState *icp, GString *buf); -void ics_pic_print_info(ICSState *ics, Monitor *mon); +void ics_pic_print_info(ICSState *ics, GString *buf); void ics_resend(ICSState *ics); void icp_resend(ICPState *ss); diff --git a/hw/intc/xics.c b/hw/intc/xics.c index 039e10a0e4..6f4d5271ea 100644 --- a/hw/intc/xics.c +++ b/hw/intc/xics.c @@ -35,7 +35,6 @@ #include "qemu/module.h" #include "qapi/visitor.h" #include "migration/vmstate.h" -#include "monitor/monitor.h" #include "hw/intc/intc.h" #include "hw/irq.h" #include "sysemu/kvm.h" @@ -68,12 +67,12 @@ void icp_pic_print_info(ICPState *icp, GString *buf) icp->pending_priority, icp->mfrr); } -void ics_pic_print_info(ICSState *ics, Monitor *mon) +void ics_pic_print_info(ICSState *ics, GString *buf) { uint32_t i; - monitor_printf(mon, "ICS %4x..%4x %p\n", - ics->offset, ics->offset + ics->nr_irqs - 1, ics); + g_string_append_printf(buf, "ICS %4x..%4x %p\n", + ics->offset, ics->offset + ics->nr_irqs - 1, ics); if (!ics->irqs) { return; @@ -89,11 +88,11 @@ void ics_pic_print_info(ICSState *ics, Monitor *mon) if (!(irq->flags & XICS_FLAGS_IRQ_MASK)) { continue; } - monitor_printf(mon, " %4x %s %02x %02x\n", - ics->offset + i, - (irq->flags & XICS_FLAGS_IRQ_LSI) ? - "LSI" : "MSI", - irq->priority, irq->status); + g_string_append_printf(buf, " %4x %s %02x %02x\n", + ics->offset + i, + (irq->flags & XICS_FLAGS_IRQ_LSI) ? + "LSI" : "MSI", + irq->priority, irq->status); } } diff --git a/hw/intc/xics_spapr.c b/hw/intc/xics_spapr.c index bab9d88218..1926373ebd 100644 --- a/hw/intc/xics_spapr.c +++ b/hw/intc/xics_spapr.c @@ -409,10 +409,10 @@ static void xics_spapr_print_info(SpaprInterruptController *intc, Monitor *mon) icp_pic_print_info(spapr_cpu_state(cpu)->icp, buf); } + ics_pic_print_info(ics, buf); + info = human_readable_text_from_str(buf); monitor_puts(mon, info->human_readable_text); - - ics_pic_print_info(ics, mon); } static int xics_spapr_post_load(SpaprInterruptController *intc, int version_id) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 5854358f65..3eaf674efa 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -770,20 +770,21 @@ static void pnv_chip_power8_pic_print_info(PnvChip *chip, Monitor *mon) Pnv8Chip *chip8 = PNV8_CHIP(chip); int i; - ics_pic_print_info(&chip8->psi.ics, mon); + g_autoptr(GString) buf = g_string_new(""); + g_autoptr(HumanReadableText) info = NULL; + + ics_pic_print_info(&chip8->psi.ics, buf); for (i = 0; i < chip8->num_phbs; i++) { PnvPHB *phb = chip8->phbs[i]; PnvPHB3 *phb3 = PNV_PHB3(phb->backend); - g_autoptr(GString) buf = g_string_new(""); - g_autoptr(HumanReadableText) info = NULL; pnv_phb3_msi_pic_print_info(&phb3->msis, buf); - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); - - ics_pic_print_info(&phb3->lsis, mon); + ics_pic_print_info(&phb3->lsis, buf); } + + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); } static int pnv_chip_power9_pic_print_info_child(Object *child, void *opaque) From patchwork Tue Jun 18 15:59:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805222 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp271917wrx; Tue, 18 Jun 2024 09:04:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXxr+jjyckTMTl+2lWBk6XiyyJCAR4u/kyWGAPxYAzWGl9Y4HbO5+TZlIN+jZb3foiYSMZHT2xnLiKD8eb4/Dxj X-Google-Smtp-Source: AGHT+IF6If1qGFuhDesw5fpZ1r0P4xqR3DT7DJHnGc5v1/VKIJYlYzIUY0k7q1uuYX7VQJaymwGU X-Received: by 2002:a05:6870:200d:b0:254:8d79:d7b7 with SMTP id 586e51a60fabf-25c94a1effbmr166232fac.26.1718726670856; Tue, 18 Jun 2024 09:04:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726670; cv=none; d=google.com; s=arc-20160816; b=e63ebwMKHxPLqp3J3iiYbWzL9lKyF9qRGSzvGT0pFF0q9lElHkzjG8DIMeLC6UQQkk 7/S0IjrA2Sy1xi4E8xNoDs9uqtZhg92UbrVp6+VhFqG3DYsQrSu04uOJYb4imn1MY8KG l8swtxQyN4RXigti/suM9ngy1qxM71t0F4AcpK3jjk9pW7abOOpodXpVXab3MoMkiTSa gtYoIjGLBODxugWt9aCDvPifCZXuRe5B0zIdzN0oue2BoH25MAjbqTYzSWBXZqGZ976/ rf4ePaaPUKNGDbp2ov7NJjdtgfLY3aj3oEkh6GzVlx70ivkW+UIojF6SRPwtCxLzSPQ9 SxTw== 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:cc:to :from:dkim-signature; bh=U9G2DPLJNs6E99rtv08P3G2cb9DYQeKMhfy51jfr6pg=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=xZxvONiPQcGfoWZ4JTpohk2IuOETwpyHMtBq+0RDslek6mANpH3/lvwKiwXGjCb8jm Xzlem9fF8RudAhFbcB+YuGwX5x8OBnpkBCyrBVHsJw/xS6xJcJGjwZpIJLNupp5evE5f J7Y8NvCRTm8PQuhiLwpoCbxPNkIMg3nV+o5DTMiHF7qM/pbIDw6Vyx2SwE+vgBgHrHOR ywj6vAkROogxudstpA2k+VQW0CWTXQuGoMtbknVuHy0klQaSupGizC7LeHe4pIdd57GL YOW6eS21FiFV1NIoT/29TfsRzQXDF5kf0zEnMT8Cdb4wrK8bOk7rRaxBDK/Hb1vmIfp1 AQKw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mzFpzcRT; 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 ada2fe7eead31-48da44979e8si2046365137.435.2024.06.18.09.04.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:04:30 -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=mzFpzcRT; 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 1sJbJ5-00083g-9R; Tue, 18 Jun 2024 12:03:39 -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 1sJbJ2-0007xp-TT for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:36 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbJ0-0007Aa-SZ for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:36 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a6efacd25ecso350321766b.1 for ; Tue, 18 Jun 2024 09:03:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726612; x=1719331412; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=U9G2DPLJNs6E99rtv08P3G2cb9DYQeKMhfy51jfr6pg=; b=mzFpzcRTaCdGoZXCP0+kga27c5YRgo5l829SqVAPtwkmwV3d99+ce7R4xdIvY+zNH4 M/jGowJUQtwNE6AC/5wETHS/7qyHfBNYGdyqD1TDaZroLoDioFlAV7lgTjH6D5JpW1XS iA/JYw5L6caeu+dtE/nzQiRrjRZPte00gVec8G6gS/6WlO7u1nwPseofnObjCV76lZ3m Q/nARMP6Jp0nGPbOzL7zheG+71mRlyyG1CHj02LYxPFIgUsn3VfLNrxwxCqraQKJq7D7 oQbqrUjDEbVcfxpgYSnmbVpEMbzIvy9lR+AutzQhPRfaapJybCNssUft76Yfe7uvZ8M7 az5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726612; x=1719331412; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=U9G2DPLJNs6E99rtv08P3G2cb9DYQeKMhfy51jfr6pg=; b=D+sI/osO1qHzNFQgMXz4XMRzmSGh9X+FjpBkAFnZBRZyhKsc3rJU61Fc42piMhDdk3 5V/l2vQMX8I7bdiOJgErS7k01+/c2uhydRaLzcuqENnK7olM5LLE+v2x3d/8Dra5mPRH gz0GdKb4k+oI9ebvj/eg8kpB1Zez/Z2X7YQzFSfdHRUP3dhklgNFBqEqFj1Lydxb6XCg 0NoBHXC8vk73C3uxIiEaaVHIjurL+wjZC++36pIccykGs38Z9CZnUA8ep+tvPKiE+iqa SIXjZpF9zk7d5rVdyI2kQK5BvO38TlsQeGd7LpxYQwtgCS8wf73V6t4PxRVOX6mxmTg3 nDaQ== X-Gm-Message-State: AOJu0YzeS4aLkvOYcuBUyqTb1hQdYV9GEehsb1PvJjcDNO1J2tessA5e P7UnnGeRUjLlpmK3YlFxFXW/drSmWe4cHFeT/L16dS/9tSOhUzRb/wIe6ZnAFjuKEKPOWJmhb5Q h X-Received: by 2002:a50:f61c:0:b0:57d:3df:f881 with SMTP id 4fb4d7f45d1cf-57d03dff928mr1088220a12.3.1718726612244; Tue, 18 Jun 2024 09:03:32 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f86dfdb22sm253599366b.77.2024.06.18.09.03.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:03:31 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 29/76] hw/ppc: Avoid using Monitor in PnvChipClass::intc_print_info() Date: Tue, 18 Jun 2024 17:59:51 +0200 Message-ID: <20240618160039.36108-30-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=philmd@linaro.org; helo=mail-ej1-x62e.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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-6-philmd@linaro.org> --- include/hw/ppc/pnv_chip.h | 2 +- hw/ppc/pnv.c | 30 ++++++++---------------------- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/include/hw/ppc/pnv_chip.h b/include/hw/ppc/pnv_chip.h index 8589f3291e..a5e428be7c 100644 --- a/include/hw/ppc/pnv_chip.h +++ b/include/hw/ppc/pnv_chip.h @@ -151,7 +151,7 @@ struct PnvChipClass { void (*intc_create)(PnvChip *chip, PowerPCCPU *cpu, Error **errp); void (*intc_reset)(PnvChip *chip, PowerPCCPU *cpu); void (*intc_destroy)(PnvChip *chip, PowerPCCPU *cpu); - void (*intc_print_info)(PnvChip *chip, PowerPCCPU *cpu, Monitor *mon); + void (*intc_print_info)(PnvChip *chip, PowerPCCPU *cpu, GString *buf); ISABus *(*isa_create)(PnvChip *chip, Error **errp); void (*dt_populate)(PnvChip *chip, void *fdt); void (*pic_print_info)(PnvChip *chip, Monitor *mon); diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 3eaf674efa..aed6767c8d 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -1129,15 +1129,9 @@ static void pnv_chip_power8_intc_destroy(PnvChip *chip, PowerPCCPU *cpu) } static void pnv_chip_power8_intc_print_info(PnvChip *chip, PowerPCCPU *cpu, - Monitor *mon) + GString *buf) { - g_autoptr(GString) buf = g_string_new(""); - g_autoptr(HumanReadableText) info = NULL; - icp_pic_print_info(ICP(pnv_cpu_state(cpu)->intc), buf); - - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); } /* @@ -1222,15 +1216,9 @@ static void pnv_chip_power9_intc_destroy(PnvChip *chip, PowerPCCPU *cpu) } static void pnv_chip_power9_intc_print_info(PnvChip *chip, PowerPCCPU *cpu, - Monitor *mon) + GString *buf) { - g_autoptr(GString) buf = g_string_new(""); - g_autoptr(HumanReadableText) info = NULL; - xive_tctx_pic_print_info(XIVE_TCTX(pnv_cpu_state(cpu)->intc), buf); - - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); } static void pnv_chip_power10_intc_create(PnvChip *chip, PowerPCCPU *cpu, @@ -1272,15 +1260,9 @@ static void pnv_chip_power10_intc_destroy(PnvChip *chip, PowerPCCPU *cpu) } static void pnv_chip_power10_intc_print_info(PnvChip *chip, PowerPCCPU *cpu, - Monitor *mon) + GString *buf) { - g_autoptr(GString) buf = g_string_new(""); - g_autoptr(HumanReadableText) info = NULL; - xive_tctx_pic_print_info(XIVE_TCTX(pnv_cpu_state(cpu)->intc), buf); - - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); } /* @@ -2363,14 +2345,18 @@ static void pnv_pic_print_info(InterruptStatsProvider *obj, PnvMachineState *pnv = PNV_MACHINE(obj); int i; CPUState *cs; + g_autoptr(GString) buf = g_string_new(""); + g_autoptr(HumanReadableText) info = NULL; CPU_FOREACH(cs) { PowerPCCPU *cpu = POWERPC_CPU(cs); /* XXX: loop on each chip/core/thread instead of CPU_FOREACH() */ PNV_CHIP_GET_CLASS(pnv->chips[0])->intc_print_info(pnv->chips[0], cpu, - mon); + buf); } + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); for (i = 0; i < pnv->num_chips; i++) { PNV_CHIP_GET_CLASS(pnv->chips[i])->pic_print_info(pnv->chips[i], mon); From patchwork Tue Jun 18 15:59:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805223 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp271985wrx; Tue, 18 Jun 2024 09:04:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV+T9/I7wdu6+DQoRKYCol3iwEFn7cFEFgElprBN4g3HraJ0NeuA+vS4WSv3KFTuWDE6zXpEYEtHOWnve51VO3B X-Google-Smtp-Source: AGHT+IGxrMkETsZcRxghW1SuBdQm0MZkcRW+7LdohFsHlYYlru0j9rTOYIW+ELpUUBd33bzPh9bC X-Received: by 2002:ac8:590c:0:b0:441:56d2:6d0 with SMTP id d75a77b69052e-444a7a8960dmr2114661cf.68.1718726677851; Tue, 18 Jun 2024 09:04:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726677; cv=none; d=google.com; s=arc-20160816; b=DaCEJPbSSq6ezNfbfcn3ObciJT7CgtLnlWvUwrHpAW55DbqtBp6HRcyB8Ux02C2Rgn dD4DhnGnAXDp1TyyeFERFNTuQT49ZB1LLTFwNgBLQhTpyi0lajQzdRcUUaKc9pqNEXMg IpcokyCxTJ59TgBU7Nd3K9dWo0nZg4Il5wuJXhSe5I9WrtlPXxNrAwy+BiBqYvp+50iT 7lqa55deGqbYzXTuyobru7EdRxwklSQzpBqDtYyQzIEYFgLDX5s+vqBfOvCnRHjRK4H7 SXUV9hqYbBmu791hIxh06hx+wjaO/or+BNAsJhZNv233ym4iMEF6H1DyR5fcEHWKEhaf i06g== 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:cc:to :from:dkim-signature; bh=RbmmnCUJBjQWo1lmiofvPL4byDgdBrAqOfBylHKE/0k=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=BdqVeKp6tq7kLsnYKIvgInP/Wm7Q8bXDJq9pPO4+NAkCHep7d747AjXQ6eKrdmoJeq Ski0W0R2biMeIhKu/Ck3rhN3NcCqMV9zu6/1gDGCH8QxAIVBEXqJc6dRiwtax+Wo7OAn CMLJtNrjAkaYv6i/QWprlbOJv3TONX9QOn47hcrzc/tlRHHp+e9hyIbjiPNp7SY7adjH KjJ7bowXV9FskAPL1OawR/DfiSX/raZ0QdovA2lU1JolOkj+ahcOaZZ4HVaSJc/YHGGc GrUjvm0bIB47jO+9Wg5vJvkg4qeHZYKcm/ZHFlPPPtEqjmg8ogyJEGJhM9fnNrArG7ox RJTg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="oqNZLc/N"; 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 d75a77b69052e-441ef3bc7e9si122039491cf.126.2024.06.18.09.04.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:04:37 -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="oqNZLc/N"; 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 1sJbJA-0008Fc-63; Tue, 18 Jun 2024 12:03:44 -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 1sJbJ7-0008AG-GL for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:41 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbJ5-0007CW-JC for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:41 -0400 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a6f176c5c10so689472866b.2 for ; Tue, 18 Jun 2024 09:03:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726618; x=1719331418; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RbmmnCUJBjQWo1lmiofvPL4byDgdBrAqOfBylHKE/0k=; b=oqNZLc/NhQz1X+mJbZsecpMWzGNcxBGSQkxsNbFMnftoS1wMSoblwQTqJNpVZ/0qZG sTsdPkTdLL+z7KHRYJeKntiDTvP+3YhmNcCAu9QH7WsdJTRCNGfqszaDKiTvfBsuzOPT qCHuwDW9I/QyHJXOQdZuooIop4HT+C5guTR0+KeQa0DxreuEYCPQYM4OJHfIlkKEteYj EO2xvqug3w+MRtRbyGQzsbhnYovg11OSaq6a3NNoi42gDcUgWcpRwg13Rlaiol/DUTO2 vMZCSy/SGYS0XjQ3lGen4VMnDYLosFS1q72e+iJ7cwQuiUoaVR71g5jjye9JiGOb54KO DenA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726618; x=1719331418; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RbmmnCUJBjQWo1lmiofvPL4byDgdBrAqOfBylHKE/0k=; b=UedaKTOJ+1EEOamY3X100G5Eou6JDSnplCAX6IsR+EpjI9mII+b6QxwXQ3fC9sdaVm IioCcnMxAr4AAYcj1+DZQ0QGZYEjDlGTB/GvWTTi2AP6AEuFcEW/yJBuuD3NGWROSzhN hHu443zJBCHuW1qE8HKTP6uXy1EKc2dIN4HgHjDR+VenC1dodGlmdSWmOPXGBZtNkNqS SzlI9h4sJyuw8W2vSuA4FtJ2P91LZS7Ra9xgXmPAryEMb/+pMcHhNrJwgFoUDhgu/tBc coLyEXzdxAshh/dwuyj6BRzVyrOpYRzyU6KsK7sIvgO9TjkE1znMPHgy/4eivnASte0N guaQ== X-Gm-Message-State: AOJu0YxSPVYfCKLMfjWPWb1u2yj0NqZPhl1E4Wc0DrBC4oAsTkdNc/5k xUDAZPE/rlQgpJjT5Tms8zTtQAMR1eRRiq91sMGPlCbZT2yjQhrqXo1jD90byfFTEwvE1kHXUoa 2 X-Received: by 2002:a17:906:3693:b0:a6f:5318:b8f7 with SMTP id a640c23a62f3a-a6f60d420f5mr964758566b.43.1718726617915; Tue, 18 Jun 2024 09:03:37 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56db6182sm630018366b.51.2024.06.18.09.03.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:03:37 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 30/76] hw/ppc: Avoid using Monitor in xive_end_queue_pic_print_info() Date: Tue, 18 Jun 2024 17:59:52 +0200 Message-ID: <20240618160039.36108-31-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=philmd@linaro.org; helo=mail-ej1-x633.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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-7-philmd@linaro.org> --- include/hw/ppc/xive_regs.h | 2 +- hw/intc/spapr_xive.c | 7 ++++++- hw/intc/xive.c | 17 +++++++++++------ 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/include/hw/ppc/xive_regs.h b/include/hw/ppc/xive_regs.h index 4a3c9badd3..51e9a2152e 100644 --- a/include/hw/ppc/xive_regs.h +++ b/include/hw/ppc/xive_regs.h @@ -262,7 +262,7 @@ static inline uint64_t xive_end_qaddr(XiveEND *end) } void xive_end_pic_print_info(XiveEND *end, uint32_t end_idx, Monitor *mon); -void xive_end_queue_pic_print_info(XiveEND *end, uint32_t width, Monitor *mon); +void xive_end_queue_pic_print_info(XiveEND *end, uint32_t width, GString *buf); void xive_end_eas_pic_print_info(XiveEND *end, uint32_t end_idx, Monitor *mon); /* Notification Virtual Target (NVT) */ diff --git a/hw/intc/spapr_xive.c b/hw/intc/spapr_xive.c index b7c12aa432..3357f6325f 100644 --- a/hw/intc/spapr_xive.c +++ b/hw/intc/spapr_xive.c @@ -142,12 +142,17 @@ static void spapr_xive_end_pic_print_info(SpaprXive *xive, XiveEND *end, uint32_t qentries = 1 << (qsize + 10); uint32_t nvt = xive_get_field32(END_W6_NVT_INDEX, end->w6); uint8_t priority = xive_get_field32(END_W7_F0_PRIORITY, end->w7); + g_autoptr(GString) buf = g_string_new(""); + g_autoptr(HumanReadableText) info = NULL; monitor_printf(mon, "%3d/%d % 6d/%5d @%"PRIx64" ^%d", spapr_xive_nvt_to_target(0, nvt), priority, qindex, qentries, qaddr_base, qgen); - xive_end_queue_pic_print_info(end, 6, mon); + xive_end_queue_pic_print_info(end, 6, buf); + + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); } /* diff --git a/hw/intc/xive.c b/hw/intc/xive.c index a0d7e7ca67..260a94e2ca 100644 --- a/hw/intc/xive.c +++ b/hw/intc/xive.c @@ -11,6 +11,7 @@ #include "qemu/log.h" #include "qemu/module.h" #include "qapi/error.h" +#include "qapi/type-helpers.h" #include "target/ppc/cpu.h" #include "sysemu/cpus.h" #include "sysemu/dma.h" @@ -1323,7 +1324,7 @@ static const TypeInfo xive_source_info = { * XiveEND helpers */ -void xive_end_queue_pic_print_info(XiveEND *end, uint32_t width, Monitor *mon) +void xive_end_queue_pic_print_info(XiveEND *end, uint32_t width, GString *buf) { uint64_t qaddr_base = xive_end_qaddr(end); uint32_t qsize = xive_get_field32(END_W0_QSIZE, end->w0); @@ -1334,7 +1335,7 @@ void xive_end_queue_pic_print_info(XiveEND *end, uint32_t width, Monitor *mon) /* * print out the [ (qindex - (width - 1)) .. (qindex + 1)] window */ - monitor_printf(mon, " [ "); + g_string_append_printf(buf, " [ "); qindex = (qindex - (width - 1)) & (qentries - 1); for (i = 0; i < width; i++) { uint64_t qaddr = qaddr_base + (qindex << 2); @@ -1346,11 +1347,11 @@ void xive_end_queue_pic_print_info(XiveEND *end, uint32_t width, Monitor *mon) HWADDR_PRIx "\n", qaddr); return; } - monitor_printf(mon, "%s%08x ", i == width - 1 ? "^" : "", - be32_to_cpu(qdata)); + g_string_append_printf(buf, "%s%08x ", i == width - 1 ? "^" : "", + be32_to_cpu(qdata)); qindex = (qindex + 1) & (qentries - 1); } - monitor_printf(mon, "]"); + g_string_append_c(buf, ']'); } void xive_end_pic_print_info(XiveEND *end, uint32_t end_idx, Monitor *mon) @@ -1365,6 +1366,8 @@ void xive_end_pic_print_info(XiveEND *end, uint32_t end_idx, Monitor *mon) uint32_t nvt_idx = xive_get_field32(END_W6_NVT_INDEX, end->w6); uint8_t priority = xive_get_field32(END_W7_F0_PRIORITY, end->w7); uint8_t pq; + g_autoptr(GString) buf = g_string_new(""); + g_autoptr(HumanReadableText) info = NULL; if (!xive_end_is_valid(end)) { return; @@ -1389,8 +1392,10 @@ void xive_end_pic_print_info(XiveEND *end, uint32_t end_idx, Monitor *mon) if (qaddr_base) { monitor_printf(mon, " eq:@%08"PRIx64"% 6d/%5d ^%d", qaddr_base, qindex, qentries, qgen); - xive_end_queue_pic_print_info(end, 6, mon); + xive_end_queue_pic_print_info(end, 6, buf); } + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); monitor_printf(mon, "\n"); } From patchwork Tue Jun 18 15:59:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805254 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp275188wrx; Tue, 18 Jun 2024 09:09:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVJz3sGvWjWaqLRL/bkt+W7tbcPsQ6K0mc9UUIx9EsSig7gEduBIQGucOEZg0cdUv8L5lMtM8D3M1Zw45eFZ4lY X-Google-Smtp-Source: AGHT+IGRelNqx1IRTLD9/o3Sssko9IV2fsD9IiNs+zBfXLQb6MEZo2gHC/OkTW/SVffQrMXUZBIj X-Received: by 2002:a05:620a:190f:b0:795:5a7d:44de with SMTP id af79cd13be357-79bb3e3d6e8mr14489285a.25.1718726997755; Tue, 18 Jun 2024 09:09:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726997; cv=none; d=google.com; s=arc-20160816; b=LzMnxiQuyztgMih5FNVtAieOrYRg6VGKiCTG8YduTk7sV2L3/taLmfr8Hqd+W+B1Dk GYFnxTfTKNgBGiS/CwYFXQiCm7MNo9kfd/v+QDo1q+8ZCWY6Svx2bFZEwXJ8Qa5p/tcT jXqr8aD1Xa17V8b1c2WQqhEpHCVl1aHmwLDAf3Yvy1BM5vPNp5hPINtgcCaNJHa6+DXy lzGQ48iY/pkBU9d3vsgvuhxFuiUEjt3Em17cqzEizwz0Jy9CHM5VgpMk7MJDqr76zyVF 7eHEdz1eyxu/H1le4oI23J/u60YCO02FYR7H3ymEWE8yO/UHCWFzdXJRP/coDRdc3O9Q LV0w== 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:cc:to :from:dkim-signature; bh=krPmmezu/ZiSsAEmiOwTBGR2YHLemSWbvTZgat4esgU=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=a/eQMlQXzEKmt0C6u+585eEKVdsZbjESRrB10vDA71F4uDQyWxWC09GFQ4bmmOEc+C uVNOQApbpebkuGRi1z6MQ42zxUC8TZEi23H4E4CVMp84g4qHuK5XA3J3wYXfbkQxqSD3 R5/cmUY+dhytVGgtr+0qeZ6a8bB0ne880QDM5Pa2Y0VR/u3iyybp+MaLt28Ke/wDQD76 cDNiTnaghwv6DXacnfATB0VZC4MHAs0Evk9tzi9msl5OC5N8so+vR/nfV683lMQLWZPp ZODJANb3ClwqaTOG0Pr7rSXlsEdOe6V+Nk3y4cEsHpX/Il2gk7e5Jxfqi8E5X+38X57j tU7g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kXIMsOE9; 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 d75a77b69052e-441ef3bbcf2si123340961cf.146.2024.06.18.09.09.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:09:57 -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=kXIMsOE9; 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 1sJbJF-0000Ss-3c; Tue, 18 Jun 2024 12:03:49 -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 1sJbJD-0000Jn-8D for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:47 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbJB-0007Cp-Eu for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:47 -0400 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a6f958a3a69so128999266b.1 for ; Tue, 18 Jun 2024 09:03:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726623; x=1719331423; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=krPmmezu/ZiSsAEmiOwTBGR2YHLemSWbvTZgat4esgU=; b=kXIMsOE91cmF24ygAsPh2qHliZMam4DFnwYhDLegrKb3tv+6ACPdU8ajX4ag4SkHmf UubEKlf75Z6vdkCVBP/sEm6cLIKs1x4js9XioeI49LX0r7ptJJzRNEQsBaEoblnFVcm0 L6Q8/55gF+F+hgoKXDvDBFDtEBDkxIf2X2bMpTJq4KFeONg/OU8A5KPGLX/CzOeqU1Wd 7e5ieuYmR/8ocdAbxjqaFE+U+rurMtKB5d92PcHm8ZLKb2Cvifa+zbIlSNwXbjtNFTy/ JPm6ScRLXMhbi5MZ14inmTUbcVx4Wgab5J70UScShqFja6cdQWy0FM7Str6EextsXUtd ZACg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726623; x=1719331423; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=krPmmezu/ZiSsAEmiOwTBGR2YHLemSWbvTZgat4esgU=; b=TJaEI6XfeghORgC/Efb6x4rAu/M5qWZO4WSyz6kE+Nlei0CsINCAoFJIXmET52qaly qqC4ohYa4z5i5wpSZkX0KaDmipU0MNd7fC9Scq1rHyCKliHdL7seZHc75ZrpeM7CNrPt PMiltyGPXm7LSgHhS3PGxt+rhUVW443e0FwdYSZS8mm5u3rl4bwE25RW8DLZR9Hd6XG6 D2PczZjqDJhAEzRnhwLHN52/FdmHDRvh9Y+spBieE+QuYSEzRZJ998Ygo9g3/upzcS+C T+62TG1wgIACVSIxLatq0V775BnrpLI91Er4k+4q3QCv0Qiewg3LTdufwluayTGTS75F NNcg== X-Gm-Message-State: AOJu0YyITAttM8P3JLXxJdhfm5v+V2/4jCwm3HFOLQEq3ujNsclzjFFY o5e/Kk7RzUgpBgV8Z29/aeha2wCtr6rwYboTlaG82jFvQT9DSTosS2CjonSK9bX7sTZAkqm5m/k M X-Received: by 2002:a17:906:2288:b0:a6f:1443:1e24 with SMTP id a640c23a62f3a-a6f60d3fd34mr839471766b.34.1718726623576; Tue, 18 Jun 2024 09:03:43 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f5f377dd8sm577968866b.146.2024.06.18.09.03.42 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:03:43 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 31/76] hw/ppc: Avoid using Monitor in spapr_xive_end_pic_print_info() Date: Tue, 18 Jun 2024 17:59:53 +0200 Message-ID: <20240618160039.36108-32-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=philmd@linaro.org; helo=mail-ej1-x62a.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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-8-philmd@linaro.org> --- hw/intc/spapr_xive.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/hw/intc/spapr_xive.c b/hw/intc/spapr_xive.c index 3357f6325f..d571645e9e 100644 --- a/hw/intc/spapr_xive.c +++ b/hw/intc/spapr_xive.c @@ -133,7 +133,7 @@ static int spapr_xive_target_to_end(uint32_t target, uint8_t prio, * structure dumping only the information related to the OS EQ. */ static void spapr_xive_end_pic_print_info(SpaprXive *xive, XiveEND *end, - Monitor *mon) + GString *buf) { uint64_t qaddr_base = xive_end_qaddr(end); uint32_t qindex = xive_get_field32(END_W1_PAGE_OFF, end->w1); @@ -142,17 +142,12 @@ static void spapr_xive_end_pic_print_info(SpaprXive *xive, XiveEND *end, uint32_t qentries = 1 << (qsize + 10); uint32_t nvt = xive_get_field32(END_W6_NVT_INDEX, end->w6); uint8_t priority = xive_get_field32(END_W7_F0_PRIORITY, end->w7); - g_autoptr(GString) buf = g_string_new(""); - g_autoptr(HumanReadableText) info = NULL; - monitor_printf(mon, "%3d/%d % 6d/%5d @%"PRIx64" ^%d", - spapr_xive_nvt_to_target(0, nvt), - priority, qindex, qentries, qaddr_base, qgen); + g_string_append_printf(buf, "%3d/%d % 6d/%5d @%"PRIx64" ^%d", + spapr_xive_nvt_to_target(0, nvt), + priority, qindex, qentries, qaddr_base, qgen); xive_end_queue_pic_print_info(end, 6, buf); - - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); } /* @@ -198,13 +193,18 @@ static void spapr_xive_pic_print_info(SpaprXive *xive, Monitor *mon) if (!xive_eas_is_masked(eas)) { uint32_t end_idx = xive_get_field64(EAS_END_INDEX, eas->w); XiveEND *end; + g_autoptr(GString) buf = g_string_new(""); + g_autoptr(HumanReadableText) info = NULL; assert(end_idx < xive->nr_ends); end = &xive->endt[end_idx]; if (xive_end_is_valid(end)) { - spapr_xive_end_pic_print_info(xive, end, mon); + spapr_xive_end_pic_print_info(xive, end, buf); } + + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); } monitor_printf(mon, "\n"); } From patchwork Tue Jun 18 15:59:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805262 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp275830wrx; Tue, 18 Jun 2024 09:11:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX+crBWk5mpWcHFatHqQKcHrWk0qpUJZOwG711cs9PBOYaxfKTCekG7oELzf+NH8ki8V864Fi6+anXgzseaHuqD X-Google-Smtp-Source: AGHT+IGbMyHRhm78kn1qbDn1bYnkTVFd1HPCbDu93vejFd+92e2ChQ8wTXnokJS3sgkvm9NGlRpC X-Received: by 2002:a05:620a:400b:b0:797:b88e:f321 with SMTP id af79cd13be357-79bb3e5594bmr15156285a.46.1718727065417; Tue, 18 Jun 2024 09:11:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727065; cv=none; d=google.com; s=arc-20160816; b=qbYGLRftzVQ1LITq2DN6ZtL0qvKaZHB/C5E3LpMujfTTPSbWVWRctRAW7l+iw2OIvY eKrIeuhXcrn1qzRHvUiG//stCNx9l55MKt6Qa3ROD1oW4BlqmDMGB1BM2AdfS15RtWoL 2JUJl+C4EWbYuOhFK9vpaqS4qbVo7kjkgncOPS1wGZ6kfuOXhEChKgTLNx/5JWad3vPT QvtE1xyKxhY/37RI99Ds+zrOOeBm6IcdgFVQCoFhrJQSK0X8+w1YVaV/LmRGrMWUAx0/ MuyVdBGong1ycwjFRsnW00S/oehUrnUMZtMlBxoKSCqcIxYOtKc9LUSJUJRFo8CBLZ9J 2yjQ== 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:cc:to :from:dkim-signature; bh=LJr39dskipiLfu+a088UV+dPSqLj27VHgcPOwidtLFc=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=Zs8/Lj1peS3i/MGS3mkDgy2JqK7J9iMdoTyftRmrtTF3zlQKX6nyoMiewXQA9efy/v uGxo3vQBIqt3k0i/nBJsXvrEyw+fY1Ns3YtDm4hx/XawsgC7cTBEzVi+hpq2xJXLGngn btGYH2Gi8dkLnI2Mmca5qrEUeeq7a6j+d6I6584LqJwY0ahPM8zIzhLKYkWtPrYAF0Dv chKRiXuUWwpG0tVMKe7D5MD8fBV50Ggk5G53X1ZOEjzF+dwwdN382sI1kilRrgZB/1D1 SHGRpdTrfKQArGDgzhMBCpQE5tx9k98KSicMpfDEIDlFEMdvSS37hw6B6KrCk7zsSdLu N1bw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tfx1q5VI; 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 af79cd13be357-798abe5582fsi1339412685a.569.2024.06.18.09.11.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:11:05 -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=tfx1q5VI; 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 1sJbJL-00013g-FN; Tue, 18 Jun 2024 12:03:56 -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 1sJbJJ-0000sd-3L for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:53 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbJH-0007DC-7B for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:52 -0400 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a6f177b78dcso716055366b.1 for ; Tue, 18 Jun 2024 09:03:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726629; x=1719331429; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LJr39dskipiLfu+a088UV+dPSqLj27VHgcPOwidtLFc=; b=tfx1q5VIPL9zEkH1m1DqdFSlUFMxSDlcFb/aBkH6y4O2QRMHmm0tugMlUMOj2uLeHd rkeFwzBo8KmO9s05WH2YWlZdVGfwSPo1wDh19iRNZiv1jDIjN+0e33jiQ7iJvdhDOXVV KhhX4EeVm0vsWvpWrdKjrJT9mQDA9tVF2tTS/Kxi2yO4b09h7aYZx7OR2O7memKUtVgF FE5Qw9V0pmRGVy+uWXu5eCy+SDNnOyios21rnwq2LS2AR+ah2T6/Ad77B291djDDVcly AurYRHIII9fhzqoC9mp8KpH47UvqGMeDxCx0TQDlBc9nQa20Ta6bKMcJOdi6HgGPl3YG 4qjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726629; x=1719331429; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LJr39dskipiLfu+a088UV+dPSqLj27VHgcPOwidtLFc=; b=fWomi9l2VbLTFZ8AhgYdAXM5Gr65/p/m8yaDG8JGmEeDMoOjah7FYfo99awORZ1Qwa VzJ175rKXoHKZsN/GAQ0c/jm+7TVBC4SgH/gT2A6248g84arGXmXMuMbEuWC6i0qBma7 Fc1hMwLhSDD3PLHo5O0wHD0klspPihibucxrbe6zHAhaNtEkoPGdc1WQM5Dbmj3vT2H9 825L/pSkqLpkUNs7W/zgSA4HdPMNXWB8NjVcNYuD9V1j+4UuO7oCqVcRiua7JcSMphlW pF4MIbHlZ8/eOP+bnRx8DmEENSRzzMVrc1vSlxkZ8iXdQdNySr3CRyw2DEi4qkZxdeQV fPhw== X-Gm-Message-State: AOJu0YzDVYiDIv618uEKl5naSeJqRAqnd/VWPZ4J6eBYbmm2NqhrdAXt GxLK53d2Ut1eeyj1RI/MN6yHcgu8DX0MXC/kNX+obiG52NOmMxHB4ZmQ10MYVg21apa4Lu1V0M7 R X-Received: by 2002:a17:907:160b:b0:a6f:8264:4582 with SMTP id a640c23a62f3a-a6f8264463fmr557124866b.65.1718726629156; Tue, 18 Jun 2024 09:03:49 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56fa6740sm630108566b.223.2024.06.18.09.03.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:03:48 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 32/76] hw/ppc: Avoid using Monitor in spapr_xive_pic_print_info() Date: Tue, 18 Jun 2024 17:59:54 +0200 Message-ID: <20240618160039.36108-33-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=philmd@linaro.org; helo=mail-ej1-x62b.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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-9-philmd@linaro.org> --- hw/intc/spapr_xive.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/hw/intc/spapr_xive.c b/hw/intc/spapr_xive.c index d571645e9e..9d0d5948ff 100644 --- a/hw/intc/spapr_xive.c +++ b/hw/intc/spapr_xive.c @@ -157,7 +157,7 @@ static void spapr_xive_end_pic_print_info(SpaprXive *xive, XiveEND *end, #define spapr_xive_in_kernel(xive) \ (kvm_irqchip_in_kernel() && (xive)->fd != -1) -static void spapr_xive_pic_print_info(SpaprXive *xive, Monitor *mon) +static void spapr_xive_pic_print_info(SpaprXive *xive, GString *buf) { XiveSource *xsrc = &xive->source; int i; @@ -172,7 +172,7 @@ static void spapr_xive_pic_print_info(SpaprXive *xive, Monitor *mon) } } - monitor_printf(mon, " LISN PQ EISN CPU/PRIO EQ\n"); + g_string_append_printf(buf, " LISN PQ EISN CPU/PRIO EQ\n"); for (i = 0; i < xive->nr_irqs; i++) { uint8_t pq = xive_source_esb_get(xsrc, i); @@ -182,19 +182,17 @@ static void spapr_xive_pic_print_info(SpaprXive *xive, Monitor *mon) continue; } - monitor_printf(mon, " %08x %s %c%c%c %s %08x ", i, - xive_source_irq_is_lsi(xsrc, i) ? "LSI" : "MSI", - pq & XIVE_ESB_VAL_P ? 'P' : '-', - pq & XIVE_ESB_VAL_Q ? 'Q' : '-', - xive_source_is_asserted(xsrc, i) ? 'A' : ' ', - xive_eas_is_masked(eas) ? "M" : " ", - (int) xive_get_field64(EAS_END_DATA, eas->w)); + g_string_append_printf(buf, " %08x %s %c%c%c %s %08x ", i, + xive_source_irq_is_lsi(xsrc, i) ? "LSI" : "MSI", + pq & XIVE_ESB_VAL_P ? 'P' : '-', + pq & XIVE_ESB_VAL_Q ? 'Q' : '-', + xive_source_is_asserted(xsrc, i) ? 'A' : ' ', + xive_eas_is_masked(eas) ? "M" : " ", + (int) xive_get_field64(EAS_END_DATA, eas->w)); if (!xive_eas_is_masked(eas)) { uint32_t end_idx = xive_get_field64(EAS_END_INDEX, eas->w); XiveEND *end; - g_autoptr(GString) buf = g_string_new(""); - g_autoptr(HumanReadableText) info = NULL; assert(end_idx < xive->nr_ends); end = &xive->endt[end_idx]; @@ -203,10 +201,8 @@ static void spapr_xive_pic_print_info(SpaprXive *xive, Monitor *mon) spapr_xive_end_pic_print_info(xive, end, buf); } - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); } - monitor_printf(mon, "\n"); + g_string_append_c(buf, '\n'); } } @@ -717,10 +713,10 @@ static void spapr_xive_print_info(SpaprInterruptController *intc, Monitor *mon) xive_tctx_pic_print_info(spapr_cpu_state(cpu)->tctx, buf); } + spapr_xive_pic_print_info(xive, buf); + info = human_readable_text_from_str(buf); monitor_puts(mon, info->human_readable_text); - - spapr_xive_pic_print_info(xive, mon); } static void spapr_xive_dt(SpaprInterruptController *intc, uint32_t nr_servers, From patchwork Tue Jun 18 15:59:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805273 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp276255wrx; Tue, 18 Jun 2024 09:11:52 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXaimkS4Ts8hky8cTHQ3949cdPyb4BjxxCg2qM/pcHqxO7J0FaO8MNaT8re562TMP6wK4xGt7/Asxd9rduM862C X-Google-Smtp-Source: AGHT+IE9f1WBBzNrMr9PQDBFw8gJOubaOQsDCweQ7xXlagFfoBBjfFH8MyJeEfdMkAQXzU27EGlB X-Received: by 2002:a05:620a:3903:b0:795:4df4:d4f6 with SMTP id af79cd13be357-79bb3e70c60mr14671785a.46.1718727112508; Tue, 18 Jun 2024 09:11:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727112; cv=none; d=google.com; s=arc-20160816; b=FdFQYrO8PRu7ZMG9OhpnE5jfhFUACP49ut4o6KmVYKQDxiuzokMiGrzD2UiTTvd6fl SkfpSM6Yxn0rFTqtRIUnNPexch3YpcqjuC1SU1G+9ahlMCz7DU79NNLMfrVYoNTsSgpO uDhLwlIXTDuD7QDK4kismONFYhPmVtRYXVjPGR1hM9d+HssdU0O49/AyHQeVuL9JiIIW YFqgLMBprQoTPT6EfDcW5OjdhIXvck9KtHgIrD4fd1CQtpWUgeU1i1yFmCqDFfpasSDY OVYRKcmtlnU781YXcvIhrURS/p3D5lp6LrdNbtKzVCMaWlGWMzqcpitJG0iZubW3FQnt EAjg== 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:cc:to :from:dkim-signature; bh=089XdY79KgdMF0Itsg2m4WYzfo4qdafqkNkAig9zmdA=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=VqH/fAiMwFs64Rchis0ZpeO8BknW46jsY7/xQyf8MfUZhJ7PNC4iRTHz6ObBr4I9Xo IacIhxa8HmfUOAWD/rcdRhW7EmCsiEhsJ+v+c0DuA9sMqaNq03GljqxS6Vi3zbNZnDJ/ jV/C97WymVPup/y+MJrmPdS8B4zN/nkvAfyMERNA5HLiTSSRe7msyFoNjXzPcT71F08Q /c/Zeltd+NASQ3Z1n6Raj6h/d32K9l50pkvLEapeabLaRZb0cu0PpppZEhMzdCOUTBdo P+C4sFXoVwZzpgjbcRrx1RrZPwXPCUu7qFRuLTnuEPgyVokSSIJVpyuJTUar8UALNm5P 8EVw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sG3MdXkh; 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 af79cd13be357-798ac096756si1249598885a.749.2024.06.18.09.11.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:11:52 -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=sG3MdXkh; 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 1sJbJQ-0001nb-42; Tue, 18 Jun 2024 12:04:00 -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 1sJbJP-0001fL-3n for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:59 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbJM-0007Dc-U1 for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:03:58 -0400 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a63359aaaa6so866090366b.2 for ; Tue, 18 Jun 2024 09:03:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726635; x=1719331435; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=089XdY79KgdMF0Itsg2m4WYzfo4qdafqkNkAig9zmdA=; b=sG3MdXkhH4/SU2EYspfzuNVSx4HK3kKSM5fpEj/xwjLG8MNTZnhG/g5pA7SxITFzQL wOumYxxMRRXtGaWc8SBba+nw2yNYL4BDE586wKNCSN6YenC4OTSgzM5jNNAASXh4zSCt dsRZEr/HrrE3sdUDNPdkIPx9fKR8Rr96+kpFL/4WzawXj0Yi4A5UdeALIy+gV6F8/noT jhVEskLUamQq5u5bUr/eWBnNgx23SGsi0CvTae/LgLJTnqqqI8k/rZ3O3OZJ7TPcKuHI Vd6jKzmUy/q7H3n8k0Eaujw0+ZuYU0OCzzCJaxF5vQs6ZjuAWTLmkL1A5tIs4UuNTo5S ozgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726635; x=1719331435; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=089XdY79KgdMF0Itsg2m4WYzfo4qdafqkNkAig9zmdA=; b=WsObFkX6Yq3bmXOPwhcxLO8iMox8nMO1pfwsPObYsRJ4ZqMisHa1YCOUOGCGY4ZgWe VXWyzo86M/FEeQIHnXyiwlc4I7fLlFedNzKfYF6+E/kryNGM5MSAdQ3aBjPChJrnUIQa TrHrGeH46uZtkiWT2tjiRxUoRS/LNOJqCs4lOb4NTqjp0rhI2IZ2B0DW7X+pIFYrMvwh SHJDV5jctBallTNnHkIaDQ/2XdEcCskG1GYKHd2dOfT74ZNleKaenrZ61IcMC+6Engw1 UdV4VpqJ0V6gmNQzKzVZ79MsAwReiBwlxnROi9wJhmVe8jMT1RW1uW8qDt7hYqBxbVwz jvWw== X-Gm-Message-State: AOJu0YyflrHsttVNeOFNnFz9gIDP3B3r3hCe3htR0Ns9fzdCajCnqm3j Yqa3npCp19D4B+tHBQ9P9BhojD4rdYETsr1JVAP88wQ8ShIY2K1DnFzbDtT0VeljPm1HwIZg8oF D X-Received: by 2002:a17:906:258b:b0:a6f:6014:6ccf with SMTP id a640c23a62f3a-a6f60cf401bmr698840766b.16.1718726634856; Tue, 18 Jun 2024 09:03:54 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56ed3690sm631055266b.128.2024.06.18.09.03.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:03:54 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 33/76] hw/ppc: Avoid using Monitor in xive_source_pic_print_info() Date: Tue, 18 Jun 2024 17:59:55 +0200 Message-ID: <20240618160039.36108-34-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=philmd@linaro.org; helo=mail-ej1-x631.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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-10-philmd@linaro.org> --- include/hw/ppc/xive.h | 2 +- hw/intc/pnv_xive.c | 11 ++++++++--- hw/intc/pnv_xive2.c | 8 +++++++- hw/intc/xive.c | 16 +++++++--------- hw/pci-host/pnv_phb4.c | 20 ++++++++++++++------ hw/ppc/pnv_psi.c | 12 +++++++++--- 6 files changed, 46 insertions(+), 23 deletions(-) diff --git a/include/hw/ppc/xive.h b/include/hw/ppc/xive.h index bc1cbad8a8..28c181faa2 100644 --- a/include/hw/ppc/xive.h +++ b/include/hw/ppc/xive.h @@ -314,7 +314,7 @@ static inline bool xive_source_is_asserted(XiveSource *xsrc, uint32_t srcno) } void xive_source_pic_print_info(XiveSource *xsrc, uint32_t offset, - Monitor *mon); + GString *buf); static inline bool xive_source_irq_is_lsi(XiveSource *xsrc, uint32_t srcno) { diff --git a/hw/intc/pnv_xive.c b/hw/intc/pnv_xive.c index da10deceb8..520d7e0acd 100644 --- a/hw/intc/pnv_xive.c +++ b/hw/intc/pnv_xive.c @@ -11,6 +11,7 @@ #include "qemu/log.h" #include "qemu/module.h" #include "qapi/error.h" +#include "qapi/type-helpers.h" #include "target/ppc/cpu.h" #include "sysemu/cpus.h" #include "sysemu/dma.h" @@ -1857,10 +1858,14 @@ void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon) XiveNVT nvt; int i; uint64_t xive_nvt_per_subpage; + g_autoptr(GString) buf = g_string_new(""); + g_autoptr(HumanReadableText) info = NULL; - monitor_printf(mon, "XIVE[%x] #%d Source %08x .. %08x\n", chip_id, blk, - srcno0, srcno0 + nr_ipis - 1); - xive_source_pic_print_info(&xive->ipi_source, srcno0, mon); + g_string_append_printf(buf, "XIVE[%x] #%d Source %08x .. %08x\n", + chip_id, blk, srcno0, srcno0 + nr_ipis - 1); + xive_source_pic_print_info(&xive->ipi_source, srcno0, buf); + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); monitor_printf(mon, "XIVE[%x] #%d EAT %08x .. %08x\n", chip_id, blk, srcno0, srcno0 + nr_ipis - 1); diff --git a/hw/intc/pnv_xive2.c b/hw/intc/pnv_xive2.c index 4b8d0a5d81..83e0f6b09f 100644 --- a/hw/intc/pnv_xive2.c +++ b/hw/intc/pnv_xive2.c @@ -10,6 +10,7 @@ #include "qemu/osdep.h" #include "qemu/log.h" #include "qapi/error.h" +#include "qapi/type-helpers.h" #include "target/ppc/cpu.h" #include "sysemu/cpus.h" #include "sysemu/dma.h" @@ -2116,10 +2117,15 @@ void pnv_xive2_pic_print_info(PnvXive2 *xive, Monitor *mon) Xive2Nvp nvp; int i; uint64_t xive_nvp_per_subpage; + g_autoptr(GString) buf = g_string_new(""); + g_autoptr(HumanReadableText) info = NULL; monitor_printf(mon, "XIVE[%x] Source %08x .. %08x\n", blk, srcno0, srcno0 + nr_esbs - 1); - xive_source_pic_print_info(&xive->ipi_source, srcno0, mon); + xive_source_pic_print_info(&xive->ipi_source, srcno0, buf); + + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); monitor_printf(mon, "XIVE[%x] EAT %08x .. %08x\n", blk, srcno0, srcno0 + nr_esbs - 1); diff --git a/hw/intc/xive.c b/hw/intc/xive.c index 260a94e2ca..1adb0439c5 100644 --- a/hw/intc/xive.c +++ b/hw/intc/xive.c @@ -1209,22 +1209,20 @@ void xive_source_set_irq(void *opaque, int srcno, int val) } } -void xive_source_pic_print_info(XiveSource *xsrc, uint32_t offset, Monitor *mon) +void xive_source_pic_print_info(XiveSource *xsrc, uint32_t offset, GString *buf) { - int i; - - for (i = 0; i < xsrc->nr_irqs; i++) { + for (unsigned i = 0; i < xsrc->nr_irqs; i++) { uint8_t pq = xive_source_esb_get(xsrc, i); if (pq == XIVE_ESB_OFF) { continue; } - monitor_printf(mon, " %08x %s %c%c%c\n", i + offset, - xive_source_irq_is_lsi(xsrc, i) ? "LSI" : "MSI", - pq & XIVE_ESB_VAL_P ? 'P' : '-', - pq & XIVE_ESB_VAL_Q ? 'Q' : '-', - xive_source_is_asserted(xsrc, i) ? 'A' : ' '); + g_string_append_printf(buf, " %08x %s %c%c%c\n", i + offset, + xive_source_irq_is_lsi(xsrc, i) ? "LSI" : "MSI", + pq & XIVE_ESB_VAL_P ? 'P' : '-', + pq & XIVE_ESB_VAL_Q ? 'Q' : '-', + xive_source_is_asserted(xsrc, i) ? 'A' : ' '); } } diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c index 075499d36d..4b453997e7 100644 --- a/hw/pci-host/pnv_phb4.c +++ b/hw/pci-host/pnv_phb4.c @@ -10,6 +10,7 @@ #include "qemu/log.h" #include "qapi/visitor.h" #include "qapi/error.h" +#include "qapi/type-helpers.h" #include "monitor/monitor.h" #include "target/ppc/cpu.h" #include "hw/pci-host/pnv_phb4_regs.h" @@ -1807,11 +1808,18 @@ void pnv_phb4_pic_print_info(PnvPHB4 *phb, Monitor *mon) phb->regs[PHB_INT_NOTIFY_ADDR >> 3] & ~PHB_INT_NOTIFY_ADDR_64K; uint32_t offset = phb->regs[PHB_INT_NOTIFY_INDEX >> 3]; bool abt = !!(phb->regs[PHB_CTRLR >> 3] & PHB_CTRLR_IRQ_ABT_MODE); + g_autoptr(GString) buf = g_string_new(""); + g_autoptr(HumanReadableText) info = NULL; - monitor_printf(mon, "PHB4[%x:%x] Source %08x .. %08x %s @%"HWADDR_PRIx"\n", - phb->chip_id, phb->phb_id, - offset, offset + phb->xsrc.nr_irqs - 1, - abt ? "ABT" : "", - notif_port); - xive_source_pic_print_info(&phb->xsrc, 0, mon); + g_string_append_printf(buf, + "PHB4[%x:%x] Source %08x .. %08x " + "%s @%"HWADDR_PRIx"\n", + phb->chip_id, phb->phb_id, + offset, offset + phb->xsrc.nr_irqs - 1, + abt ? "ABT" : "", + notif_port); + xive_source_pic_print_info(&phb->xsrc, 0, buf); + + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); } diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c index 26460d210d..922ac07b2f 100644 --- a/hw/ppc/pnv_psi.c +++ b/hw/ppc/pnv_psi.c @@ -25,6 +25,7 @@ #include "qemu/module.h" #include "sysemu/reset.h" #include "qapi/error.h" +#include "qapi/type-helpers.h" #include "monitor/monitor.h" @@ -980,11 +981,16 @@ type_init(pnv_psi_register_types); void pnv_psi_pic_print_info(Pnv9Psi *psi9, Monitor *mon) { PnvPsi *psi = PNV_PSI(psi9); + g_autoptr(GString) buf = g_string_new(""); + g_autoptr(HumanReadableText) info = NULL; uint32_t offset = (psi->regs[PSIHB_REG(PSIHB9_IVT_OFFSET)] >> PSIHB9_IVT_OFF_SHIFT); - monitor_printf(mon, "PSIHB Source %08x .. %08x\n", - offset, offset + psi9->source.nr_irqs - 1); - xive_source_pic_print_info(&psi9->source, offset, mon); + g_string_append_printf(buf, "PSIHB Source %08x .. %08x\n", + offset, offset + psi9->source.nr_irqs - 1); + xive_source_pic_print_info(&psi9->source, offset, buf); + + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); } From patchwork Tue Jun 18 15:59:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805240 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp274584wrx; Tue, 18 Jun 2024 09:08:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWFdmEchmhHQsR9GyZzOTvah7RJ4w3SozA+8smRXA3tKUubqj91hfJbwTLNp+ftgY2FitbJLMvHa2kyJ4DT5G8b X-Google-Smtp-Source: AGHT+IFGx+Ts9jFxrCRXOmRQPSL4+crXIcaCrV4U1ydMwgqlkMM+Jw0m1X3scPFDLHpJE1o6alRd X-Received: by 2002:a9d:6f02:0:b0:6f9:90de:c67f with SMTP id 46e09a7af769-700748c9d6fmr218273a34.10.1718726937952; Tue, 18 Jun 2024 09:08:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726936; cv=none; d=google.com; s=arc-20160816; b=IdD12uwKd4taYgBaJmZExHeb1h11AABKYElfyj9zwaBBrGpr0bV1TzYSxpw0TG/as/ legHsfSKFEUkAzP3ORVONq6eUV/Y9AeckoiWOfF9vfK0e/0fJA/28ztwUYrRKYVvZ4qH RniH9pSK693cFwcHqZiP4+CUzseFBoZwFJMovUEJwXVT0SHPeer7teSL90fjl/1rYvGk Eg/qIkbn931fyMJg5nqo8fpe76gTEFDDaSG2GLb76+9OjPQKHnNf4x8D4+y/bb2IbhAi g3L0Ov+mdVqLdpwjfNueVx/p0ib7StbKQpLl6Sjt3p+mXx3UNMKJuDi/+q8D9gSVOif8 VU7g== 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:cc:to :from:dkim-signature; bh=P/fRH20LiiHNd6n6UxrfG9EvHyIfE/d9iyXREJbBrfA=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=d7wLESnUBi11dbxUW09hfh8sDVZRxButus1mTciNC0BoUpmBuRIBxS6CExlDBJ+Cc6 cADD7Y5EqiO7fYfqoOJNOPXrBTAI4yK6qfvlBdaJeQoIskfxvYcUOpP5Fxg5ynPQY5cJ S0/4QYOMmup/2al05jiv2JxBQ8ooz2JaI9kuchTKrQK0qdF3whQiJdXpVVeRP0qt9Jp3 iezkKOix+E3h8FlnLH8ooeMn4IXKa7LXdTY6iuYa3gJ4PGujJvkZF+u8WUMyYpcXVYTQ cJen88dTPeU0qwYQP93BxYmEPGgxepTAi3y6vwxtDgWpoHukT/DhIGKblA1XI1b370C9 S78Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gjRNJPIC; 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 6a1803df08f44-6b2a5a37e96si129672906d6.129.2024.06.18.09.08.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:08:56 -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=gjRNJPIC; 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 1sJbJV-0002Z6-2m; Tue, 18 Jun 2024 12:04:05 -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 1sJbJU-0002WN-6Q for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:04:04 -0400 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbJS-0007Dx-Ck for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:04:03 -0400 Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-57cbc2a2496so6075232a12.0 for ; Tue, 18 Jun 2024 09:04:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726640; x=1719331440; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=P/fRH20LiiHNd6n6UxrfG9EvHyIfE/d9iyXREJbBrfA=; b=gjRNJPIC4JkJK2X+4gRfoHS9hknM3VAqW05NzP0e1N0Ge+N7kJgVJTuaF17B2xPrFw C43C77WZrTzUTxiRfTEw2Y8UwoWhsycE4iPlBo1UfrhRaz5wunrwKqZJxmz8nsPbWoji 168SW7XeJDDAczeT32YtTu9PXwjMujrOlLcxgc5nwISmheSNVD9R6Ot6DTZKXfFSX33z SNTHBP5SttqGtFguFoHUK/p26EGCKmtOIvv+tzS3ndcdlZd45yCi6pU9c9uEmeKMjR3Y LFkkSXHmN5+uujvQ59Qq1jp5YJAXPTX6Fxrd3iMm8Ni+ZtC4mJMtKCrdd4Q2TU2jRj2s 4wrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726640; x=1719331440; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=P/fRH20LiiHNd6n6UxrfG9EvHyIfE/d9iyXREJbBrfA=; b=eMYHjJwfNQ/XtwXKwdMUfyPW559D+NfiYxkoydxfj0XHUsrL3DmBakpPUsm7QLyOGu 93gONMmyb9l4i7BIZQndU1y15ZP5Uo/xnoAyXP2Ad+X1aDvH/VZXuJddUYme8G53cY/k RXgoVT4tMuj/UQmVbSyoM7jwjo+7mIwzUUWWgGfinLT5oJzhFi3PvtOj3GNCee/LlSib lyz0PM1hLQ9T8UvqnjK4/f4NJYt3dxxC8Hij56GVlJTupuVnApAOLvEvq0dMV19VopHw PB6HEymnkqIfEzgYd5hM9xmQHkxC4vyyFlzQeKf66/w01b/riFMUOkQZal7jFRs+HaI7 Fh/Q== X-Gm-Message-State: AOJu0Yxsyp6gxynib1xTqTZwJiOf0QgpY8BTDUxOe76xdG+dFUv/mauy vtJceatkArpuM1/kJ0PGxpOBjWTHgI/YExcsZmToIdytXnX7rd9OD3c8o1sov5RgyH4zyGIrmWk f X-Received: by 2002:a17:906:489:b0:a6f:2253:d1f7 with SMTP id a640c23a62f3a-a6f60dc5069mr999916866b.61.1718726640451; Tue, 18 Jun 2024 09:04:00 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56ecdd1fsm625207666b.102.2024.06.18.09.03.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:04:00 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 34/76] hw/ppc: Avoid using Monitor in pnv_phb4_pic_print_info() Date: Tue, 18 Jun 2024 17:59:56 +0200 Message-ID: <20240618160039.36108-35-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::531; envelope-from=philmd@linaro.org; helo=mail-ed1-x531.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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-11-philmd@linaro.org> --- include/hw/pci-host/pnv_phb4.h | 2 +- hw/pci-host/pnv_phb4.c | 9 +-------- hw/ppc/pnv.c | 6 +++++- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/include/hw/pci-host/pnv_phb4.h b/include/hw/pci-host/pnv_phb4.h index 3212e68160..8abee78e4d 100644 --- a/include/hw/pci-host/pnv_phb4.h +++ b/include/hw/pci-host/pnv_phb4.h @@ -155,7 +155,7 @@ struct PnvPHB4 { QLIST_HEAD(, PnvPhb4DMASpace) dma_spaces; }; -void pnv_phb4_pic_print_info(PnvPHB4 *phb, Monitor *mon); +void pnv_phb4_pic_print_info(PnvPHB4 *phb, GString *buf); int pnv_phb4_pec_get_phb_id(PnvPhb4PecState *pec, int stack_index); PnvPhb4PecState *pnv_pec_add_phb(PnvChip *chip, PnvPHB *phb, Error **errp); void pnv_phb4_bus_init(DeviceState *dev, PnvPHB4 *phb); diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c index 4b453997e7..99991008c1 100644 --- a/hw/pci-host/pnv_phb4.c +++ b/hw/pci-host/pnv_phb4.c @@ -10,8 +10,6 @@ #include "qemu/log.h" #include "qapi/visitor.h" #include "qapi/error.h" -#include "qapi/type-helpers.h" -#include "monitor/monitor.h" #include "target/ppc/cpu.h" #include "hw/pci-host/pnv_phb4_regs.h" #include "hw/pci-host/pnv_phb4.h" @@ -1802,14 +1800,12 @@ static void pnv_phb4_register_types(void) type_init(pnv_phb4_register_types); -void pnv_phb4_pic_print_info(PnvPHB4 *phb, Monitor *mon) +void pnv_phb4_pic_print_info(PnvPHB4 *phb, GString *buf) { uint64_t notif_port = phb->regs[PHB_INT_NOTIFY_ADDR >> 3] & ~PHB_INT_NOTIFY_ADDR_64K; uint32_t offset = phb->regs[PHB_INT_NOTIFY_INDEX >> 3]; bool abt = !!(phb->regs[PHB_CTRLR >> 3] & PHB_CTRLR_IRQ_ABT_MODE); - g_autoptr(GString) buf = g_string_new(""); - g_autoptr(HumanReadableText) info = NULL; g_string_append_printf(buf, "PHB4[%x:%x] Source %08x .. %08x " @@ -1819,7 +1815,4 @@ void pnv_phb4_pic_print_info(PnvPHB4 *phb, Monitor *mon) abt ? "ABT" : "", notif_port); xive_source_pic_print_info(&phb->xsrc, 0, buf); - - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); } diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index aed6767c8d..df187c5180 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -791,12 +791,16 @@ static int pnv_chip_power9_pic_print_info_child(Object *child, void *opaque) { Monitor *mon = opaque; PnvPHB *phb = (PnvPHB *) object_dynamic_cast(child, TYPE_PNV_PHB); + g_autoptr(GString) buf = g_string_new(""); + g_autoptr(HumanReadableText) info = NULL; if (!phb) { return 0; } - pnv_phb4_pic_print_info(PNV_PHB4(phb->backend), mon); + pnv_phb4_pic_print_info(PNV_PHB4(phb->backend), buf); + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); return 0; } From patchwork Tue Jun 18 15:59:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805231 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp273822wrx; Tue, 18 Jun 2024 09:07:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW86h5EGBbEpHzO9mNuYY4sIQSg6XaM1FEUcx19cax3GNHHfO1GnD7NFG76Yfd0VkadZZ+v1XY49ra9CoPjdOju X-Google-Smtp-Source: AGHT+IFQcjPEODwXxqJiC3XHOJod0TzXf2UTBh5GnA5RYRWY5fYs/NjXkq1VPXPfM3RYTv5E+b8x X-Received: by 2002:a05:6122:c88:b0:4ec:f4a2:69fc with SMTP id 71dfb90a1353d-4ef277112bemr326212e0c.7.1718726858634; Tue, 18 Jun 2024 09:07:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726858; cv=none; d=google.com; s=arc-20160816; b=Ha/7UK25D7OWO3wT2MInzTfxwOxsM2oKUoqYyAgu49R7MHtIaLoypwyHP8CyrZqnP2 g1XVoRN8bR4KL1tWdxLWvn6WPL2bZMl8nBHQ2ES7tQ6cy+W9C5rhCZFyNVaujUIDgmaU jaTdxCql+YQhraO/OWobfundc/XV7xs/EnWv1rFLa/32P/ksFfJMQbxkPAOor+Ya3c2h wRDg2JnEMn+ciCRCxtYMswxpksi8ExcIAzITfdN3fnoNUxVOAOCw1ONtyj1YEU0Jkq8C EqIDE6ZLRUsEFXYg0g2BGAWCww4scCtvXbgUg97/d7qq4Meu9AoI6vIsSRnJmADz+QxK ZKmA== 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:cc:to :from:dkim-signature; bh=ZUJRlw74V6bj0hWvpTvL5p3m//nV/ZZAuP7J5GTceY8=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=ExSTpJ0JhWejb1niUe5v2RVPmR0RydBjoUElRBY0qEClj//mx1rlas5kYrv0nLOFkz Fx43oay65iABcUH6vGqDUUsnpjm1AAYRQrem7fgtDWEsyz+kMT6y9scCmaU2EEr4pnyP AxrXodDbnKVf3w5wPNsIvN+8Cd2edo3XR+lhfDsHKkNDHJHSu8vtulpZJ/vAgwaQUx4X 2Eg7pPzNGQ+n0rgPhkfosVDNludyZfvDJNL5KTICqRaTb+tQhl6us+ydUAwLDFvDE2CI d4FD4I0kzWLPz+idZrojcOpBHBreFnxpWka3f5Xv55BoQ09t22Mgzf5667VJk9xszQb0 CZCA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PSHsmvlN; 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 71dfb90a1353d-4ed41438491si1945135e0c.200.2024.06.18.09.07.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:07:38 -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=PSHsmvlN; 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 1sJbJb-00031f-QA; Tue, 18 Jun 2024 12:04:11 -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 1sJbJa-0002rQ-Da for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:04:10 -0400 Received: from mail-ej1-x636.google.com ([2a00:1450: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 1sJbJY-0007EI-M5 for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:04:10 -0400 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a63359aaacaso885654966b.1 for ; Tue, 18 Jun 2024 09:04:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726647; x=1719331447; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZUJRlw74V6bj0hWvpTvL5p3m//nV/ZZAuP7J5GTceY8=; b=PSHsmvlNo3hQRASdIc6zbwDSrs7eYHXnyMQIYJeZULFlGgX3aCMS7pPbM8wiOgS1Ol cBLdmVMKal7iKnk6CODTzDzF/FH1jg5WIukK3iDCMcleq9ZhXG/ZqANZ/LnaRrGCyZbn Zz3fuXO1wXSLAKB3vMoZjE2zxvZKwcxzPzctkH7LtgDgo7qU0QFF1820lDy+Wy00fGXt cDbq7iwlCnxnybbEndpKZFUl3mz4+CHZSM/5jOLkh3Wvg/8u//giTo8vsFvnetQVTUEW stFZV2XEhj+ljEAmqfUsgAXbY6Q/SGAOaI7W0l4hlP/I1tRPpUgpJzzd7qU20X0aKM2a SnRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726647; x=1719331447; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZUJRlw74V6bj0hWvpTvL5p3m//nV/ZZAuP7J5GTceY8=; b=tGYsnjfRzIgl6W0kUHqXA33ydHaxwNw6H9N1Ls3KEM3pc8/T78vvT/wZgGWJWlH2ty D8+RtYecrWhcy4S/KUfDnzBy400HwteFGsKQbcA3iglanEHZAdLjeipu+sahrmrPai5X SucAJ2k7eeqQ/4TlcE0mmSGHdaE5533CwJY7UBdf778mz7rInpmzh+S/XSq/eEeQy/pz aP/aHDZXmvKpxaDDjTCq9s+PxFRdrhdkMRFFehNv6y3WijqpBnczBmYhPVkFJg3/JEKh MG9M1RlntZKf3wr8sUYTzoGwERrPJVB3Qd5WJV7wv7+WzDskPZKkX08MCuHu5E0u256o L/KQ== X-Gm-Message-State: AOJu0YzIi68M46CKEaWsY2eJAssqsmSSjC3aBIBgbql6bLHly9zAlEzG 2MKvU/C7mHlWkItPK9AYVJ80SyAksQvbvYs/G15Fa+Bd+kOUFlUUiNAjtgy9XnQNhvtknNZv2Ll a X-Received: by 2002:a17:906:d791:b0:a68:bae4:d66f with SMTP id a640c23a62f3a-a6f60d29797mr891500666b.30.1718726647042; Tue, 18 Jun 2024 09:04:07 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56db6dfesm624700466b.87.2024.06.18.09.04.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:04:05 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 35/76] hw/ppc: Avoid using Monitor in xive_eas_pic_print_info() Date: Tue, 18 Jun 2024 17:59:57 +0200 Message-ID: <20240618160039.36108-36-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=philmd@linaro.org; helo=mail-ej1-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, 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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-12-philmd@linaro.org> --- include/hw/ppc/xive_regs.h | 2 +- hw/intc/pnv_xive.c | 10 +++++----- hw/intc/xive.c | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/hw/ppc/xive_regs.h b/include/hw/ppc/xive_regs.h index 51e9a2152e..dd4a76bcf0 100644 --- a/include/hw/ppc/xive_regs.h +++ b/include/hw/ppc/xive_regs.h @@ -167,7 +167,7 @@ typedef struct XiveEAS { #define xive_eas_is_valid(eas) (be64_to_cpu((eas)->w) & EAS_VALID) #define xive_eas_is_masked(eas) (be64_to_cpu((eas)->w) & EAS_MASKED) -void xive_eas_pic_print_info(XiveEAS *eas, uint32_t lisn, Monitor *mon); +void xive_eas_pic_print_info(XiveEAS *eas, uint32_t lisn, GString *buf); static inline uint64_t xive_get_field64(uint64_t mask, uint64_t word) { diff --git a/hw/intc/pnv_xive.c b/hw/intc/pnv_xive.c index 520d7e0acd..c377823522 100644 --- a/hw/intc/pnv_xive.c +++ b/hw/intc/pnv_xive.c @@ -1864,19 +1864,19 @@ void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon) g_string_append_printf(buf, "XIVE[%x] #%d Source %08x .. %08x\n", chip_id, blk, srcno0, srcno0 + nr_ipis - 1); xive_source_pic_print_info(&xive->ipi_source, srcno0, buf); - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); - monitor_printf(mon, "XIVE[%x] #%d EAT %08x .. %08x\n", chip_id, blk, - srcno0, srcno0 + nr_ipis - 1); + g_string_append_printf(buf, "XIVE[%x] #%d EAT %08x .. %08x\n", + chip_id, blk, srcno0, srcno0 + nr_ipis - 1); for (i = 0; i < nr_ipis; i++) { if (xive_router_get_eas(xrtr, blk, i, &eas)) { break; } if (!xive_eas_is_masked(&eas)) { - xive_eas_pic_print_info(&eas, i, mon); + xive_eas_pic_print_info(&eas, i, buf); } } + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); monitor_printf(mon, "XIVE[%x] #%d ENDT\n", chip_id, blk); i = 0; diff --git a/hw/intc/xive.c b/hw/intc/xive.c index 1adb0439c5..b2203b721b 100644 --- a/hw/intc/xive.c +++ b/hw/intc/xive.c @@ -1921,17 +1921,17 @@ static const TypeInfo xive_router_info = { } }; -void xive_eas_pic_print_info(XiveEAS *eas, uint32_t lisn, Monitor *mon) +void xive_eas_pic_print_info(XiveEAS *eas, uint32_t lisn, GString *buf) { if (!xive_eas_is_valid(eas)) { return; } - monitor_printf(mon, " %08x %s end:%02x/%04x data:%08x\n", - lisn, xive_eas_is_masked(eas) ? "M" : " ", - (uint8_t) xive_get_field64(EAS_END_BLOCK, eas->w), - (uint32_t) xive_get_field64(EAS_END_INDEX, eas->w), - (uint32_t) xive_get_field64(EAS_END_DATA, eas->w)); + g_string_append_printf(buf, " %08x %s end:%02x/%04x data:%08x\n", + lisn, xive_eas_is_masked(eas) ? "M" : " ", + (uint8_t) xive_get_field64(EAS_END_BLOCK, eas->w), + (uint32_t) xive_get_field64(EAS_END_INDEX, eas->w), + (uint32_t) xive_get_field64(EAS_END_DATA, eas->w)); } /* From patchwork Tue Jun 18 15:59:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805256 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp275282wrx; Tue, 18 Jun 2024 09:10:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWiC4U5NvefNlzK9vgDMfdF87hixbHLcxpimk9RStRiKGPmj0f0t8/DeDEJgVzMQCiRf2WrpTLqXfPEe6Inb9Jj X-Google-Smtp-Source: AGHT+IFj7IfoKWi9M4O54Qeqd9WACP2HpTPb6axQ5WgNpjrvznH0BaLNqETF10UOs3d/19UlNDxd X-Received: by 2002:a05:6358:5e08:b0:19f:4a60:e6fc with SMTP id e5c5f4694b2df-1a1fd57ea2amr28471355d.25.1718727005300; Tue, 18 Jun 2024 09:10:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727005; cv=none; d=google.com; s=arc-20160816; b=eTu7d1voggW1KCBiMvBMaW7HIqsdl35zvm4UHK2VupUWOdDr2mf3cSXXrZVKWI5/Lt ZdEk+WgDSYP2pHOz5TIaxhqTOw8MGj631HFUzzyMJ1/0QtrJDSOqBpkGSRlMPczCheI7 4ydHaS0ax4FcD4WzYMS2ToBkZGTL3VNPVIv22wTYg6MrpnNv6a0OHBrxxzsNcSe1wWw9 GXMDxR7WPw5vqtbGpiCnmPhGz6rr7Di77uEMXhuGAfPdpIPoFKbgpP9zrCLuiUGBl/jW 9zt/1rjcUglFvoJxxbTAwx1owBtTX6eKKdFXHW2gpxxHfa3viCM0IVIULXKX/fpsFD6R 2RIg== 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:cc:to :from:dkim-signature; bh=khVkiqMrtLebSa9wzun/miaiMcGkBkr7V5nJnGtflmQ=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=mK4woZV6CuqFwA/CawYYGbES/JLWkr3f+At1eHYyWZ0Dvg7IOIVx6nwhRfR6iApUPg BiHpGPn0Pfb9NXEwSFk8Smo1AVsgb9G0+F6wLyCySeR31B0SAyKIx7+yF3yU4UrEaBKs Amm2NzFqjBJLUMadqzeJ2Rf0wy/LVIqdiT4Jwlt+auR/KFMJHQhXZn9aOX2QlaSs0KFk NkYJHRadudbOG/YcEKtX3VKVwgI3G3kMkFA+u9gAJY/rE/2JyN0XChEFlGKBjE4GPmui nfnz08HbP292bBcewR+PDfB+oQAYnuy1jx6r4f+iO4rNfrcXXmB+tlWsdXsvtTsd5tHJ O8cw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ove9yzAu; 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 af79cd13be357-798ac087ddfsi1240875985a.708.2024.06.18.09.10.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:10:05 -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=Ove9yzAu; 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 1sJbJj-0003cA-SE; Tue, 18 Jun 2024 12:04:19 -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 1sJbJg-0003MN-P0 for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:04:16 -0400 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbJe-0007EY-Nt for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:04:16 -0400 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a6efae34c83so694534566b.0 for ; Tue, 18 Jun 2024 09:04:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726653; x=1719331453; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=khVkiqMrtLebSa9wzun/miaiMcGkBkr7V5nJnGtflmQ=; b=Ove9yzAuKgoLc07rzx2kBM4Tx7n85G7kRIkUNPTNwebprVXREkLOptTexnAhrfyCAG VxKuCZdzCdSQxNkvgO0Ty5j87q5xS+XueUJhT9elTGzTZVGLuCp0NvYw0QkefkZ8WjU+ QVNIWrJXEDDzbV/dgYto/QPif6fQhhGQXVxMDR293LQ9WgE+zwGnZztn5HrpQiNrj9AT gvCoMyu9TVjuZSD1fWJ6PAib7vC4hBtCfRhJZiNE+1unwxqVS/7aun3CbL1XXhO9nJTA BsCE2vo+crpdVck9Xhf0+CJNFe7LVEVUe/yBj/1TMs6vQ54fOnYkR1o6AFJpdPqr+lYg otVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726653; x=1719331453; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=khVkiqMrtLebSa9wzun/miaiMcGkBkr7V5nJnGtflmQ=; b=cdUN2gWo4zvtQCrhPwXuwa/U74OyLHLbJQGkG/deEg3mseJuLae4bsRbFFkaehacd6 e/khVOHCQ3X2k8Z6ZIqsecXUSCF+pNPCUGQy/uv1E9OtG0aZTYt8flEFin+IPKHAJo5I lmlHhN856ZStoAz+PLR0YTboDs25SMSot5B9nWS+LKKe7JpJCwbW+bkIbBSdpBWwvhL9 pJ4IjqTyJKXukhF3Qy0I1GAH0ykbH1fA8ICH7z8FvTZmtCSSplkw3G+AFMlYyfopFBaE +2LVdrQdlc8oNqmcPrAQNXmEW2GliPCYggJmPrcA/Sw0QvfE28CgmpWx6DLemZn5jvm8 kX8w== X-Gm-Message-State: AOJu0YwfgqEimDKkphFoDgtBVq9KN3Y+ERBsJkcnP+JiAhPLWuo+lfdV YxUWA3gQV8dsD/727QpKOMRmO4RRRzy6d4WRweYoYDsv5pI9HELq/G/ulo5uTeeH3F9C9G+xQVz 2 X-Received: by 2002:a17:907:6d08:b0:a66:c338:65cc with SMTP id a640c23a62f3a-a6f60d2991bmr1000055966b.19.1718726652710; Tue, 18 Jun 2024 09:04:12 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56ecdd06sm625651966b.119.2024.06.18.09.04.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:04:12 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 36/76] hw/ppc: Avoid using Monitor in xive_end_pic_print_info() Date: Tue, 18 Jun 2024 17:59:58 +0200 Message-ID: <20240618160039.36108-37-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=philmd@linaro.org; helo=mail-ej1-x62c.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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-13-philmd@linaro.org> --- include/hw/ppc/xive_regs.h | 2 +- hw/intc/pnv_xive.c | 8 ++++---- hw/intc/xive.c | 40 +++++++++++++++++--------------------- 3 files changed, 23 insertions(+), 27 deletions(-) diff --git a/include/hw/ppc/xive_regs.h b/include/hw/ppc/xive_regs.h index dd4a76bcf0..5e6f9d1be4 100644 --- a/include/hw/ppc/xive_regs.h +++ b/include/hw/ppc/xive_regs.h @@ -261,7 +261,7 @@ static inline uint64_t xive_end_qaddr(XiveEND *end) be32_to_cpu(end->w3); } -void xive_end_pic_print_info(XiveEND *end, uint32_t end_idx, Monitor *mon); +void xive_end_pic_print_info(XiveEND *end, uint32_t end_idx, GString *buf); void xive_end_queue_pic_print_info(XiveEND *end, uint32_t width, GString *buf); void xive_end_eas_pic_print_info(XiveEND *end, uint32_t end_idx, Monitor *mon); diff --git a/hw/intc/pnv_xive.c b/hw/intc/pnv_xive.c index c377823522..1dddbf7827 100644 --- a/hw/intc/pnv_xive.c +++ b/hw/intc/pnv_xive.c @@ -1875,14 +1875,14 @@ void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon) xive_eas_pic_print_info(&eas, i, buf); } } - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); - monitor_printf(mon, "XIVE[%x] #%d ENDT\n", chip_id, blk); + g_string_append_printf(buf, "XIVE[%x] #%d ENDT\n", chip_id, blk); i = 0; while (!xive_router_get_end(xrtr, blk, i, &end)) { - xive_end_pic_print_info(&end, i++, mon); + xive_end_pic_print_info(&end, i++, buf); } + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); monitor_printf(mon, "XIVE[%x] #%d END Escalation EAT\n", chip_id, blk); i = 0; diff --git a/hw/intc/xive.c b/hw/intc/xive.c index b2203b721b..f631d7cd6e 100644 --- a/hw/intc/xive.c +++ b/hw/intc/xive.c @@ -11,7 +11,6 @@ #include "qemu/log.h" #include "qemu/module.h" #include "qapi/error.h" -#include "qapi/type-helpers.h" #include "target/ppc/cpu.h" #include "sysemu/cpus.h" #include "sysemu/dma.h" @@ -1352,7 +1351,7 @@ void xive_end_queue_pic_print_info(XiveEND *end, uint32_t width, GString *buf) g_string_append_c(buf, ']'); } -void xive_end_pic_print_info(XiveEND *end, uint32_t end_idx, Monitor *mon) +void xive_end_pic_print_info(XiveEND *end, uint32_t end_idx, GString *buf) { uint64_t qaddr_base = xive_end_qaddr(end); uint32_t qindex = xive_get_field32(END_W1_PAGE_OFF, end->w1); @@ -1364,8 +1363,6 @@ void xive_end_pic_print_info(XiveEND *end, uint32_t end_idx, Monitor *mon) uint32_t nvt_idx = xive_get_field32(END_W6_NVT_INDEX, end->w6); uint8_t priority = xive_get_field32(END_W7_F0_PRIORITY, end->w7); uint8_t pq; - g_autoptr(GString) buf = g_string_new(""); - g_autoptr(HumanReadableText) info = NULL; if (!xive_end_is_valid(end)) { return; @@ -1373,28 +1370,27 @@ void xive_end_pic_print_info(XiveEND *end, uint32_t end_idx, Monitor *mon) pq = xive_get_field32(END_W1_ESn, end->w1); - monitor_printf(mon, " %08x %c%c %c%c%c%c%c%c%c%c prio:%d nvt:%02x/%04x", - end_idx, - pq & XIVE_ESB_VAL_P ? 'P' : '-', - pq & XIVE_ESB_VAL_Q ? 'Q' : '-', - xive_end_is_valid(end) ? 'v' : '-', - xive_end_is_enqueue(end) ? 'q' : '-', - xive_end_is_notify(end) ? 'n' : '-', - xive_end_is_backlog(end) ? 'b' : '-', - xive_end_is_escalate(end) ? 'e' : '-', - xive_end_is_uncond_escalation(end) ? 'u' : '-', - xive_end_is_silent_escalation(end) ? 's' : '-', - xive_end_is_firmware(end) ? 'f' : '-', - priority, nvt_blk, nvt_idx); + g_string_append_printf(buf, + " %08x %c%c %c%c%c%c%c%c%c%c prio:%d nvt:%02x/%04x", + end_idx, + pq & XIVE_ESB_VAL_P ? 'P' : '-', + pq & XIVE_ESB_VAL_Q ? 'Q' : '-', + xive_end_is_valid(end) ? 'v' : '-', + xive_end_is_enqueue(end) ? 'q' : '-', + xive_end_is_notify(end) ? 'n' : '-', + xive_end_is_backlog(end) ? 'b' : '-', + xive_end_is_escalate(end) ? 'e' : '-', + xive_end_is_uncond_escalation(end) ? 'u' : '-', + xive_end_is_silent_escalation(end) ? 's' : '-', + xive_end_is_firmware(end) ? 'f' : '-', + priority, nvt_blk, nvt_idx); if (qaddr_base) { - monitor_printf(mon, " eq:@%08"PRIx64"% 6d/%5d ^%d", - qaddr_base, qindex, qentries, qgen); + g_string_append_printf(buf, " eq:@%08"PRIx64"% 6d/%5d ^%d", + qaddr_base, qindex, qentries, qgen); xive_end_queue_pic_print_info(end, 6, buf); } - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); - monitor_printf(mon, "\n"); + g_string_append_c(buf, '\n'); } static void xive_end_enqueue(XiveEND *end, uint32_t data) From patchwork Tue Jun 18 15:59:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805281 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp276539wrx; Tue, 18 Jun 2024 09:12:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXTXoCDA2jSFVk3TLIqhjQOqCEn3GcdQaFnnHxTBq4+M3vXf0tKmOzwu2js5vZg3cUQB6Y4UZC/+JxdlLe4mga4 X-Google-Smtp-Source: AGHT+IFhO/iCskbqvykpNbdhnd4g7EaVQz8gkxCKpTV9bke/xeRIPmEssaZZW+nJCwnf7ofPosO/ X-Received: by 2002:a05:620a:2448:b0:795:5b23:abcf with SMTP id af79cd13be357-79bb3e56b04mr16687085a.43.1718727142474; Tue, 18 Jun 2024 09:12:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727142; cv=none; d=google.com; s=arc-20160816; b=ia1CuaJDUrY8w0bozvAmE2W5HoTLv7V0eP57gnAXTbq8rq1oinp6cT97VI/fj5kztm rwb/uZXKEmtvpQAirmV6H4TzGKjlv/2927L4HL7q+AXBjK/IRxoR5wm9r/H4a9b+UiRr zuYxroVVchr8KpZvQ5CttKI3ADjCQNAPX8rMo40dQxZRwMvrcpoPqjwAotkS21xGTL5T z5cfNyFGzQKk98dzeUw/28miicAGQ1txjJ/OnMZdCgmHxeP6qg5tm58UdFYFfzL8qTxT NU859siBl8Vkw7sx41XM3AB5ZhULVddLE91DVEt9Iwb7ViT+0h3m2FmV6UyHXOWteYo4 IcZQ== 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:cc:to :from:dkim-signature; bh=VFMERdu5BxdLlmHi+3GbOTwf7lyqGeSd5tYPeFoN3L0=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=Wc2kEEkYMIXurnthWgE5jcwDWb50WmlfmRoqwGUnlEGzBkrZAfw6midpJrORcZLd10 fv4iQRnoiPhszIuMR9qzVUTmYxRPZ6DIWkeMfjUYTDF28Yrc81sFLLWw74l/ujbNAasK i8vBHgi096qeKRtDfAkFQZYklQIKa4NDE0lp8Ipq42U05qPk1GaQnKz8zy6NSIrVXSw4 SsmgiYEUgbm2rtSmK7TpKfLjyds2EPX66RTbNH+Wfk39iXpgMfibAZseB/wuXRK0PNR2 ugUXOb3Lrvj0rXmxMGPhy83dMYttasKiJ+CzpXWf3PedUMNvFIfocC8pmh361SO3GMcM 9Jxw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gVGPKBiD; 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 af79cd13be357-798abd1cce7si1249646285a.448.2024.06.18.09.12.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:12: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=gVGPKBiD; 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 1sJbJp-0003vD-T3; Tue, 18 Jun 2024 12:04:25 -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 1sJbJn-0003rJ-Ab for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:04:23 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbJk-0007Ez-DW for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:04:23 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-57c778b5742so6562143a12.2 for ; Tue, 18 Jun 2024 09:04:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726658; x=1719331458; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VFMERdu5BxdLlmHi+3GbOTwf7lyqGeSd5tYPeFoN3L0=; b=gVGPKBiDqFia8h3/YmO9Qb8WmIf5+YoAIMT/ZTIWNWiSSzfdhhgGMaszTJgbL1ocmD uyUWSEfcvKPrNSLJ6iFOGPy1PcwBKupapzHrB6lQJpdppj+Pf8AUNOrinwJWbYDDNi3S +ILMA3AU22ncZFk+8cWMMwbtnDcl0ssLAMWB0xS41J/l8q859KMAffCaEEsVoLy4SVjB 6GuSdcqWevtN9+BPwi8OQmLMNLlahMRxtvgjJ2Sc3CmNbwgDns12ItBlovrOmx133S1J eDWhXJ6RRcV8oLckRYlA0FReXht3dr2SlzpuYgTA9IX52+46AV1i174hpBn/ZcOmkPta EzWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726658; x=1719331458; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VFMERdu5BxdLlmHi+3GbOTwf7lyqGeSd5tYPeFoN3L0=; b=hu2N9u2aEaQwF50Qvi5gt5EdMdJTGqQ2MyTkX1vgHtWR8E/O7hp0JMg+1btMaRhsy4 6zmDWodyvpz1Lp9JIZmsvQ0qRQNngrsZnmRb+Z7Uj604VGjPqZw/yPSLpnPn2s8MxdX0 JwUWJkFtj+3wIFXjFRF/cc6dAcvbTLjXHwLFVgLndnussdufkHVVC3/Llyo+JNx6kAwD AwINEbRFwzZb/klBSY5TEs5beghhIicyvcQqdZvvtUqzifIjZVmwja6zu+9IIIpfUA0C GPuLT7agC4MVjXFBFtwtkPW0qzDXy3UOoTAK8ch9X4rPD4f3kmcX7gdInnKUiZzNo1PH m12g== X-Gm-Message-State: AOJu0YwcNZ99NkrUTSOOdKmcLH1A7jTQ4q/D0/rWVViErq8s14E7b9SF c5F3hSe1/HXSgkKLH5MVt8vTx6jhv8OV+oH6mJm9XazfSUnaFvQ1Jmt3MnlsH9Wsl9lNHtvYlJE Z X-Received: by 2002:a17:906:9c89:b0:a6f:9f4a:fb11 with SMTP id a640c23a62f3a-a6f9f4afccfmr77583866b.28.1718726658513; Tue, 18 Jun 2024 09:04:18 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56f43220sm625702166b.185.2024.06.18.09.04.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:04:18 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 37/76] hw/ppc: Avoid using Monitor in xive_end_eas_pic_print_info() Date: Tue, 18 Jun 2024 17:59:59 +0200 Message-ID: <20240618160039.36108-38-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=philmd@linaro.org; helo=mail-ed1-x529.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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-14-philmd@linaro.org> --- include/hw/ppc/xive_regs.h | 2 +- hw/intc/pnv_xive.c | 9 +++++---- hw/intc/xive.c | 22 ++++++++++------------ 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/include/hw/ppc/xive_regs.h b/include/hw/ppc/xive_regs.h index 5e6f9d1be4..b9db7abc2e 100644 --- a/include/hw/ppc/xive_regs.h +++ b/include/hw/ppc/xive_regs.h @@ -263,7 +263,7 @@ static inline uint64_t xive_end_qaddr(XiveEND *end) void xive_end_pic_print_info(XiveEND *end, uint32_t end_idx, GString *buf); void xive_end_queue_pic_print_info(XiveEND *end, uint32_t width, GString *buf); -void xive_end_eas_pic_print_info(XiveEND *end, uint32_t end_idx, Monitor *mon); +void xive_end_eas_pic_print_info(XiveEND *end, uint32_t end_idx, GString *buf); /* Notification Virtual Target (NVT) */ typedef struct XiveNVT { diff --git a/hw/intc/pnv_xive.c b/hw/intc/pnv_xive.c index 1dddbf7827..a0c6dee5db 100644 --- a/hw/intc/pnv_xive.c +++ b/hw/intc/pnv_xive.c @@ -1881,14 +1881,15 @@ void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon) while (!xive_router_get_end(xrtr, blk, i, &end)) { xive_end_pic_print_info(&end, i++, buf); } - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); - monitor_printf(mon, "XIVE[%x] #%d END Escalation EAT\n", chip_id, blk); + g_string_append_printf(buf, "XIVE[%x] #%d END Escalation EAT\n", + chip_id, blk); i = 0; while (!xive_router_get_end(xrtr, blk, i, &end)) { - xive_end_eas_pic_print_info(&end, i++, mon); + xive_end_eas_pic_print_info(&end, i++, buf); } + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); monitor_printf(mon, "XIVE[%x] #%d NVTT %08x .. %08x\n", chip_id, blk, 0, XIVE_NVT_COUNT - 1); diff --git a/hw/intc/xive.c b/hw/intc/xive.c index f631d7cd6e..70f11f993b 100644 --- a/hw/intc/xive.c +++ b/hw/intc/xive.c @@ -17,7 +17,6 @@ #include "sysemu/reset.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" -#include "monitor/monitor.h" #include "hw/irq.h" #include "hw/ppc/xive.h" #include "hw/ppc/xive2.h" @@ -1419,8 +1418,7 @@ static void xive_end_enqueue(XiveEND *end, uint32_t data) end->w1 = xive_set_field32(END_W1_PAGE_OFF, end->w1, qindex); } -void xive_end_eas_pic_print_info(XiveEND *end, uint32_t end_idx, - Monitor *mon) +void xive_end_eas_pic_print_info(XiveEND *end, uint32_t end_idx, GString *buf) { XiveEAS *eas = (XiveEAS *) &end->w4; uint8_t pq; @@ -1431,15 +1429,15 @@ void xive_end_eas_pic_print_info(XiveEND *end, uint32_t end_idx, pq = xive_get_field32(END_W1_ESe, end->w1); - monitor_printf(mon, " %08x %c%c %c%c end:%02x/%04x data:%08x\n", - end_idx, - pq & XIVE_ESB_VAL_P ? 'P' : '-', - pq & XIVE_ESB_VAL_Q ? 'Q' : '-', - xive_eas_is_valid(eas) ? 'V' : ' ', - xive_eas_is_masked(eas) ? 'M' : ' ', - (uint8_t) xive_get_field64(EAS_END_BLOCK, eas->w), - (uint32_t) xive_get_field64(EAS_END_INDEX, eas->w), - (uint32_t) xive_get_field64(EAS_END_DATA, eas->w)); + g_string_append_printf(buf, " %08x %c%c %c%c end:%02x/%04x data:%08x\n", + end_idx, + pq & XIVE_ESB_VAL_P ? 'P' : '-', + pq & XIVE_ESB_VAL_Q ? 'Q' : '-', + xive_eas_is_valid(eas) ? 'V' : ' ', + xive_eas_is_masked(eas) ? 'M' : ' ', + (uint8_t) xive_get_field64(EAS_END_BLOCK, eas->w), + (uint32_t) xive_get_field64(EAS_END_INDEX, eas->w), + (uint32_t) xive_get_field64(EAS_END_DATA, eas->w)); } /* From patchwork Tue Jun 18 16:00:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805278 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp276392wrx; Tue, 18 Jun 2024 09:12:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVoDJPFt1y3gPRG7z/JPiJEAQN5yZkSOFgTt5PBFK5Rup0iaebcAd0jnSOYar3wemEJ7Mg5J8aUP4o48whzYLWJ X-Google-Smtp-Source: AGHT+IHvY1+4CIDuIkux3BGAZ9ICLU+jBqHAgRupSFcX34LeZ7QLFpYBexWtEve05FtJB29Imwy4 X-Received: by 2002:a05:6122:987:b0:4ec:f52b:e4db with SMTP id 71dfb90a1353d-4ef27833e36mr360245e0c.16.1718727127428; Tue, 18 Jun 2024 09:12:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727127; cv=none; d=google.com; s=arc-20160816; b=jh1BJKhutc84qK1AesDnMos4kfix0N30tOE96p2C/bk56CySRqiYYRFKFUNcXO77Ye V3wZMVJYufg99d7ak5zGt+ZtSkEV+ojid2MrfmCfHv1CCfWhxx7qn9lCXsPjpv9+mUKl W/izo0Hu4IZYSgMp6kHW8yRxB4Rm8F/RG/sUwKRVYoMKY/1B6alfT1rML1lRUMlrJkb8 zhrjOp6DVg7wFi/bxZVLOZgKfivn5Uc6CnjOO7/3hoJ+iVuc0V9X7aRywYLSFDUXptSJ oG4fY/Mm3owCKvypeuKSksleZ1Su+IjH8F6/1Vl/4p1bkylZ2zWYYqxIL9fyENzpcIed +ptQ== 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:cc:to :from:dkim-signature; bh=r0OrXW9b+XN8YsCIUyH/dpkBirMjCPjOco0x9NNBa2Y=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=eDKYDq3syd2OhRvMQXga1QOkUPX4Q1iMRAoGbmfZ0iBNHHHZDqfJNXpLC3zp/x39k8 hArRljraap/3hvetxEVSMwsPS/4Lv2w4R+jzK3GZ+v4swAHPkuihAK4GCTbfhZ93PbGf o/8FbCgFyTjTKVLi6Eb9qb37ON489L1Nc7g+II3qKWZAE2Q7kO5+WnLlMMqmZBUElJWq AmYSNpx9vKlyTkkleMuugMVlooSFNSTkc8GCitRGbDKvP8OCZX/vy/u2d00rgTZtuX3g rXKXSW0Ony5HUCs9p1eKS3sf0YgU0dfY6sfviajlSZ4IXZvkdXUgL48VPK3bAV9/VD+1 hpSA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KCkXwesS; 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 71dfb90a1353d-4ed40f4a54dsi1904818e0c.164.2024.06.18.09.12.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:12:07 -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=KCkXwesS; 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 1sJbJt-0004FE-SM; Tue, 18 Jun 2024 12:04:29 -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 1sJbJs-00046D-9y for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:04:28 -0400 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbJq-0007FS-DN for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:04:28 -0400 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-52c9034860dso7113258e87.2 for ; Tue, 18 Jun 2024 09:04:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726664; x=1719331464; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=r0OrXW9b+XN8YsCIUyH/dpkBirMjCPjOco0x9NNBa2Y=; b=KCkXwesSj0HXqEOtm9OX84nlpySUPOvvRpX8SjCP4s9pSZ5yaFnpFymTW+HtzUNKkh 1dHznbgvHIr6splMxTy6E0znGergPFiHfq1UkNa6+fEJbklt+mU1G1GlkPICUyWRsbxZ y+tCL4xLmIf4nGLYLFlpjR4UAHPnjC4dzAx1lW8NtTl6uIfjvsaub4kCQ6s4N72A9Edl lsGKCi7zMBPnyAwzsX9cDxyavGlf6n3+ifjySKsk6Sp858l5PtFGGMEGdtL0RtI1IMr5 kqQGkeNlpsEf07XOu1R65T+Y31vW74JhJvkNfzOqJa+zjT2Aq/4n4O1mNPo5iNYeWrkK ON3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726664; x=1719331464; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=r0OrXW9b+XN8YsCIUyH/dpkBirMjCPjOco0x9NNBa2Y=; b=N5Pv6ClMTMhbPU5fFBDVhYg+vBCYjVDFaww6YIEnxSw8RwIr8PQIo1OQYvZbd1zeqG MT4TZBiaExQ/aeyzRHF8wk5+vaq2rN+XKa6v5PwEO97CEWWlYgcg18fuL/j4EL1ibUyO BdpR/4twRUfOk95wdNIUn92DudpdiV8b5P0aM4ZTN6DKp/Pbj6UHZveGtZFFrq0hO1i5 +LR7JHCQ2DFsK2GP7MMIte+hOQbt5deAj3REoDSjK3CodSSABEjllfVA1dDzwrEmaPmS WkhhwgESXPr/GwT2bDVWOp59HESwGhlKvNcIfmlokuX2LKlCTdBRkGFlrfM3Zw5mo1Bi fzcg== X-Gm-Message-State: AOJu0YwiwadCrB25K5J9UOsewYXG/fdTxH6CP1MN2ipfX13E0hc2sf18 FGZZyrB862Va3YNKJUX4a0o6c/WcnVX+IwhPIGG/f8sxnxaD6W25inxNlQuiIsdiIoWXjNY0dS4 i X-Received: by 2002:ac2:5b04:0:b0:52c:9523:f0db with SMTP id 2adb3069b0e04-52ccaa523e4mr44812e87.45.1718726664248; Tue, 18 Jun 2024 09:04:24 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56da32c3sm638640566b.13.2024.06.18.09.04.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:04:23 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 38/76] hw/ppc: Avoid using Monitor in xive_nvt_pic_print_info() Date: Tue, 18 Jun 2024 18:00:00 +0200 Message-ID: <20240618160039.36108-39-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::132; envelope-from=philmd@linaro.org; helo=mail-lf1-x132.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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-15-philmd@linaro.org> --- hw/intc/pnv_xive.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/hw/intc/pnv_xive.c b/hw/intc/pnv_xive.c index a0c6dee5db..3ad4ac8e7d 100644 --- a/hw/intc/pnv_xive.c +++ b/hw/intc/pnv_xive.c @@ -1832,7 +1832,7 @@ static const MemoryRegionOps pnv_xive_pc_ops = { }; static void xive_nvt_pic_print_info(XiveNVT *nvt, uint32_t nvt_idx, - Monitor *mon) + GString *buf) { uint8_t eq_blk = xive_get_field32(NVT_W1_EQ_BLOCK, nvt->w1); uint32_t eq_idx = xive_get_field32(NVT_W1_EQ_INDEX, nvt->w1); @@ -1841,9 +1841,9 @@ static void xive_nvt_pic_print_info(XiveNVT *nvt, uint32_t nvt_idx, return; } - monitor_printf(mon, " %08x end:%02x/%04x IPB:%02x\n", nvt_idx, - eq_blk, eq_idx, - xive_get_field32(NVT_W4_IPB, nvt->w4)); + g_string_append_printf(buf, " %08x end:%02x/%04x IPB:%02x\n", + nvt_idx, eq_blk, eq_idx, + xive_get_field32(NVT_W4_IPB, nvt->w4)); } void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon) @@ -1888,17 +1888,18 @@ void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon) while (!xive_router_get_end(xrtr, blk, i, &end)) { xive_end_eas_pic_print_info(&end, i++, buf); } - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); - monitor_printf(mon, "XIVE[%x] #%d NVTT %08x .. %08x\n", chip_id, blk, - 0, XIVE_NVT_COUNT - 1); + g_string_append_printf(buf, "XIVE[%x] #%d NVTT %08x .. %08x\n", + chip_id, blk, 0, XIVE_NVT_COUNT - 1); xive_nvt_per_subpage = pnv_xive_vst_per_subpage(xive, VST_TSEL_VPDT); for (i = 0; i < XIVE_NVT_COUNT; i += xive_nvt_per_subpage) { while (!xive_router_get_nvt(xrtr, blk, i, &nvt)) { - xive_nvt_pic_print_info(&nvt, i++, mon); + xive_nvt_pic_print_info(&nvt, i++, buf); } } + + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); } static void pnv_xive_reset(void *dev) From patchwork Tue Jun 18 16:00:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805227 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp272951wrx; Tue, 18 Jun 2024 09:06:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVdSABXfghwnSWuwg1HrM8ARikH4ZxnPkR63djFz66WzA1oJO8LYhQV9R6Kh6isM3On6p5u++Yi3IFPZkGFREDH X-Google-Smtp-Source: AGHT+IER/sasIgY5pduNvYBfwZgqHii/+p4QPQ3B3qxmoBW4uMRZUBSC94peWox0msoXlRJ9WDlJ X-Received: by 2002:a05:6808:13d0:b0:3d2:29d6:fe7e with SMTP id 5614622812f47-3d51b9ad6camr275074b6e.21.1718726775147; Tue, 18 Jun 2024 09:06:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726775; cv=none; d=google.com; s=arc-20160816; b=fTUTCtbkh2sY8rjpJPSpNtDKbvkI7g9Q5ks4OxLqWtMqQ80UDkth0hzj2IDI0fmzXJ +ITRf5sk9VwnLp1pGMUP7LBEzWIBtQEyGR/hQc9NljMUEc2IuFEPq0aXGbdfjW+qP+Uy rByS7uRC0NFwgOBJTO2hKi5RBBB5hSTd3q5/lAapWAplxQbbmKq/skxTWwng+2ZtNx6V cysqAXGXrqBHUlDbe4UgpIzsUQTg3LV1o7TIq56s1IAQp/T+lLQx3UjB8A7j5uzJsGQr n9mTv7ErPoKZvk4VJAMwWekoK7cZiUMpk7VSzSDlkoLpcRycR7dqpSZp4yh84eyZfH8n hVDA== 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:cc:to :from:dkim-signature; bh=KQOeE1YU7c9+9ll5qN8I/U6cfEvkRwOcyGoeslhCPQU=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=eGUlTXUrhhTsUzpxT62b7z2kcRkC6tIFOxcRCvLiuKko2Q7xxxNp7Vm2e1+0/77P+n oBsBHcS0nbgEzDQ6Xxi3rB3rIwzXjxd206sWLUpGDnp2SqGGPFUp+x+tVxkyMSxoTlwn 5BMK75Y9DuzHcQd9Q1fITH0Pz4EPaJLQ/zc5mV0hAmngB3OwsWULfdejzDJHhydTcSTD 9TMx/pKghylV6Ibw/czyUkr8ztfyLnfCW5ouNQSd/RfkLl2Kxk2cCMROR9ZRdenV5Q/9 +Z/rgOdWjiRq4th41CPPpkVJaOayiM00aOA74FVo2RpqgjmZ3tXCePUBFwHKtm4Ggl7W akxg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DbQrUav0; 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 a1e0cc1a2514c-80d7871c503si1830944241.71.2024.06.18.09.06.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:06:14 -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=DbQrUav0; 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 1sJbJz-0004kA-Rq; Tue, 18 Jun 2024 12:04:35 -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 1sJbJx-0004dD-Md for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:04:33 -0400 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbJv-0007Fs-R5 for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:04:33 -0400 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a6ef793f4b8so579261166b.1 for ; Tue, 18 Jun 2024 09:04:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726670; x=1719331470; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KQOeE1YU7c9+9ll5qN8I/U6cfEvkRwOcyGoeslhCPQU=; b=DbQrUav0EH3hE385aLcb3D+pazryUW96O8dpr/dT/7OnAPzh6/BJTrBiTNXLfTpHu6 qGYn1fP4p1HO+Jyn8AVfVWzEXHZh20kSN0IQjYJdyoPF/lPsNNpMdRKMEhT0vnyvrIEq o/+OGNc9r2rJiKEpl6hpcMZta+WaYBKNeBjrh/aVsyWMYWH72xb/Q4/9Sscb2e1Fc1XY ckfY1tl/BJy7PrrqXWI0oUf9uk4JIlfqFUZYUwA/xCmd7zOR2qZI72CO1V14m+XpE5/H Zq8hLEUOcWgDHE7vlqH0PgkcT2Nox3pElbAs9iAbciXEZIiJxE7W8N/JZEbCCTu7SfCf Lf1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726670; x=1719331470; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KQOeE1YU7c9+9ll5qN8I/U6cfEvkRwOcyGoeslhCPQU=; b=LFcTnpORQPq9PuHPpPVUNBVO3thYYcM+NFiI1oXZGpuPkfz5py1TjSKN9lTZhmWWi9 /HZjzm1A4h++WgqUIAuoN578uUj2/NCBxQnMxDNI5qVLjTfhVMtLMPwu4MDUIDgm8stF 6dkwp0UEt5iOKc7L6fOHnRB12Xw1ZQnMULis6shz7RlaUEhSOfEHpGeaT86Z9j9wwNed pAp58A2SZ98M9Tw34vfkR9gWI0kTw0UD7N9x75zeH8Olk8RsZt/uIMViXVqg4GVag93c TyXYG4R40DnG36buu5MNC5v1aScOOSyqPGcbcQq1hMWGQAA0x+/h2pYKLJ5mJoC8uWQp DuDQ== X-Gm-Message-State: AOJu0Yye7/l/npYKkSC785roU3Nsyewalh/WWkg67KxpKqz+HIksnnA+ U45ZDeG+Jc7NqUHP3mLsJ1yrPPQOlCY3UKKUycABRkzBBgZloZjHyR6mu/EANZrFCosX+A4S3+h s X-Received: by 2002:a17:906:b858:b0:a68:ece7:8db5 with SMTP id a640c23a62f3a-a6f60d2c9e0mr786413166b.31.1718726670048; Tue, 18 Jun 2024 09:04:30 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56db5bafsm630006166b.50.2024.06.18.09.04.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:04:29 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 39/76] hw/ppc: Avoid using Monitor in pnv_xive_pic_print_info() Date: Tue, 18 Jun 2024 18:00:01 +0200 Message-ID: <20240618160039.36108-40-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=philmd@linaro.org; helo=mail-ej1-x62d.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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-16-philmd@linaro.org> --- include/hw/ppc/pnv_xive.h | 2 +- hw/intc/pnv_xive.c | 9 +-------- hw/ppc/pnv.c | 8 +++++++- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/include/hw/ppc/pnv_xive.h b/include/hw/ppc/pnv_xive.h index 9c48430ee4..7d634e469c 100644 --- a/include/hw/ppc/pnv_xive.h +++ b/include/hw/ppc/pnv_xive.h @@ -93,7 +93,7 @@ struct PnvXiveClass { DeviceRealize parent_realize; }; -void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon); +void pnv_xive_pic_print_info(PnvXive *xive, GString *buf); /* * XIVE2 interrupt controller (POWER10) diff --git a/hw/intc/pnv_xive.c b/hw/intc/pnv_xive.c index 3ad4ac8e7d..5bacbce6a4 100644 --- a/hw/intc/pnv_xive.c +++ b/hw/intc/pnv_xive.c @@ -11,12 +11,10 @@ #include "qemu/log.h" #include "qemu/module.h" #include "qapi/error.h" -#include "qapi/type-helpers.h" #include "target/ppc/cpu.h" #include "sysemu/cpus.h" #include "sysemu/dma.h" #include "sysemu/reset.h" -#include "monitor/monitor.h" #include "hw/ppc/fdt.h" #include "hw/ppc/pnv.h" #include "hw/ppc/pnv_chip.h" @@ -1846,7 +1844,7 @@ static void xive_nvt_pic_print_info(XiveNVT *nvt, uint32_t nvt_idx, xive_get_field32(NVT_W4_IPB, nvt->w4)); } -void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon) +void pnv_xive_pic_print_info(PnvXive *xive, GString *buf) { XiveRouter *xrtr = XIVE_ROUTER(xive); uint8_t blk = pnv_xive_block_id(xive); @@ -1858,8 +1856,6 @@ void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon) XiveNVT nvt; int i; uint64_t xive_nvt_per_subpage; - g_autoptr(GString) buf = g_string_new(""); - g_autoptr(HumanReadableText) info = NULL; g_string_append_printf(buf, "XIVE[%x] #%d Source %08x .. %08x\n", chip_id, blk, srcno0, srcno0 + nr_ipis - 1); @@ -1897,9 +1893,6 @@ void pnv_xive_pic_print_info(PnvXive *xive, Monitor *mon) xive_nvt_pic_print_info(&nvt, i++, buf); } } - - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); } static void pnv_xive_reset(void *dev) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index df187c5180..7e6f923c7e 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -808,8 +808,14 @@ static int pnv_chip_power9_pic_print_info_child(Object *child, void *opaque) static void pnv_chip_power9_pic_print_info(PnvChip *chip, Monitor *mon) { Pnv9Chip *chip9 = PNV9_CHIP(chip); + g_autoptr(GString) buf = g_string_new(""); + g_autoptr(HumanReadableText) info = NULL; + + pnv_xive_pic_print_info(&chip9->xive, buf); + + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); - pnv_xive_pic_print_info(&chip9->xive, mon); pnv_psi_pic_print_info(&chip9->psi, mon); object_child_foreach_recursive(OBJECT(chip), From patchwork Tue Jun 18 16:00:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805229 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp273572wrx; Tue, 18 Jun 2024 09:07:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVYqbpyNQEb75v7LvyNBSQdyhULBUDsePqoxcN3DaJyX2nHBxJCZUgVNETt8sLxRLxM0NZQqcEMWAgNe4hDfG6E X-Google-Smtp-Source: AGHT+IE19hFRuxOp62sS4GGNzB9M++/X+PW7PFdgli14JN/r45OmEv/pPMx309K0blM0AD98vA0r X-Received: by 2002:a05:6808:648b:b0:3d2:15a5:99ff with SMTP id 5614622812f47-3d51b9e6506mr282152b6e.32.1718726835073; Tue, 18 Jun 2024 09:07:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726835; cv=none; d=google.com; s=arc-20160816; b=s7JkrRLBI8xpbSQez09qGCmeAdryj6gm+M3C9USWqb4FSMlorUB2EWOGj69+7MW+C+ 74ZNEhn0Rl8YfAG3YaHuTwYIPjD9TKaCXqA8EmHq2JC5JfqgJ3v2r6sJ/cXaAUf8YxxJ j7bmQ1etPKnNMqSTURolMX4cSwoj+7ixwq1tZGp4/XuFd1MyU+ymUcjpeRojV83V90cx zh65PdOkc/3AHxkeFTKY9SioqTC/1eyjhFEsPraRVE/WZHEZirbW2aCARJeqJLivBkxU c8c3f3l3610kPIlaCFFM4SGl7zA+8E4YSjWJQ4Iegh1TO3L93c1FMAcrS7WEe8BW+24D pcBA== 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:cc:to :from:dkim-signature; bh=qVtSo8VEN7VL+g7C38Zor1BdlGunwOz0xsqYxtmzihw=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=R7HyX4EM6NagHiu3shjk6H9ON7hwJVIWv4MPcBZXy2kcC4pf4xRRgz5fcCEk2YzgBL Db6saiKXkyeJiO2k4aUBSfpZ7EuqFPIRrf/0IVv/A7CS70TZYXvKNd2PNLV/+hLIIXN/ PUObML9cpMzpo/CgyvoSlS45UjgbyOJXFIyiyC3gFEnRBHO9e8wXCyppWnxlYFzjph6W qT9qVHbFlLdjXsB4zbK6qrpc7GW01Ro2f0EKcTDHN9vm223mWRkoOUgUggG6HSjD6RQj hFcFcrvS8lspn26aVyX/Cu5F2TtHJNevmCDeN7P0lEvXdaWnyaUhRJVtuvhQmPWDrVMT b7ew==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="hE+/VqK8"; 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 71dfb90a1353d-4ed3f1f802dsi1811046e0c.63.2024.06.18.09.07.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:07:15 -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="hE+/VqK8"; 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 1sJbKG-0004x9-29; Tue, 18 Jun 2024 12:04:52 -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 1sJbK3-0004qc-VS for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:04:42 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbK2-0007HR-3f for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:04:39 -0400 Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-57c75464e77so6953614a12.0 for ; Tue, 18 Jun 2024 09:04:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726676; x=1719331476; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qVtSo8VEN7VL+g7C38Zor1BdlGunwOz0xsqYxtmzihw=; b=hE+/VqK81K73qBgO7Y2KJqfW017ORMRdnibDWIyKo3N1qxuHY8BHLtV/UKv4H6ynXx WO5/Ctjbec364HyEpthragOkwrB3g1OULUkRKfh4tBiurfj+h0aOiejNpof1XQOmaUgF Bssysx9DuIZ7dBTwrYgYkrQpOzoWfO8BzhEfB0zl0wfDpC1+hut4Q+pL0GNB441SJkve SfhuTBEoqKILleF6c9myVdoInRiB08VOsHGxQp1H/lttoEEtLfCFqX+jb4CknnUdJQKM aQ6PqfjmfBThLRYnEvcsiDPHoqwjFJdhfwg2YpUUPZ0rfj2B2MRdvH2GphUqHZu5Ga0K J2dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726676; x=1719331476; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qVtSo8VEN7VL+g7C38Zor1BdlGunwOz0xsqYxtmzihw=; b=fGsAcQ/kUqPoRCt9QkBTZKFkEy5iWUcxK5a2aJjhIgPxMvIUokVcSiBlwQ/jq62C9l NYD7MECjTgxgdNk9N3s1dgbGlvhK4Z9SRs8txUo9kZ+uYd0rrdPuLCu7Hsikiy/WASjR TN/mPMfQ0jZTIg/sEWKUmh1NwtPLVbzmOxNH2I6BIbmUC5w8Q5XU/4poGtHlNhWIDwpK sVixEPMH7/+nCWIk3kmpdeiNpge+EuraTo0LKShLhYDXNYs089XG/KtiaT0Y9h6LORfz fDP0zTF/q9I+TlHG1GI8qzzTaNJs1ioqX0iTtsMUMHW68o5E+hfXuYm6myGZVcbK0r06 fbjQ== X-Gm-Message-State: AOJu0YzL9IG8k80GEfvR5s6gqPuw+oZx3Y/qlMhHbjmVlnhha7wI5s9p oga2fXfx/vNy5Gd+9fFi6oQJ/qHPvHd5dyn4KI7cds2rVa4ihBQzwH+2ecUDRJv9n84DKjxd4Fd 1 X-Received: by 2002:a17:906:48d:b0:a6f:5fa8:1b7 with SMTP id a640c23a62f3a-a6f60cf333amr861278666b.15.1718726675685; Tue, 18 Jun 2024 09:04:35 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f9bbc2136sm62937066b.123.2024.06.18.09.04.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:04:35 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 40/76] hw/ppc: Avoid using Monitor in pnv_psi_pic_print_info() Date: Tue, 18 Jun 2024 18:00:02 +0200 Message-ID: <20240618160039.36108-41-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=philmd@linaro.org; helo=mail-ed1-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, 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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-17-philmd@linaro.org> --- include/hw/ppc/pnv_psi.h | 2 +- hw/ppc/pnv.c | 10 +++++++--- hw/ppc/pnv_psi.c | 9 +-------- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/include/hw/ppc/pnv_psi.h b/include/hw/ppc/pnv_psi.h index 2a6f715350..cf7f95a6b1 100644 --- a/include/hw/ppc/pnv_psi.h +++ b/include/hw/ppc/pnv_psi.h @@ -110,6 +110,6 @@ typedef enum PnvPsiIrq { #define PSIHB9_IRQ_PSU 13 #define PSIHB9_NUM_IRQS 14 -void pnv_psi_pic_print_info(Pnv9Psi *psi, Monitor *mon); +void pnv_psi_pic_print_info(Pnv9Psi *psi, GString *buf); #endif /* PPC_PNV_PSI_H */ diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 7e6f923c7e..4a1a302a25 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -812,12 +812,11 @@ static void pnv_chip_power9_pic_print_info(PnvChip *chip, Monitor *mon) g_autoptr(HumanReadableText) info = NULL; pnv_xive_pic_print_info(&chip9->xive, buf); + pnv_psi_pic_print_info(&chip9->psi, buf); info = human_readable_text_from_str(buf); monitor_puts(mon, info->human_readable_text); - pnv_psi_pic_print_info(&chip9->psi, mon); - object_child_foreach_recursive(OBJECT(chip), pnv_chip_power9_pic_print_info_child, mon); } @@ -862,9 +861,14 @@ static void pnv_ipmi_bt_init(ISABus *bus, IPMIBmc *bmc, uint32_t irq) static void pnv_chip_power10_pic_print_info(PnvChip *chip, Monitor *mon) { Pnv10Chip *chip10 = PNV10_CHIP(chip); + g_autoptr(GString) buf = g_string_new(""); + g_autoptr(HumanReadableText) info = NULL; pnv_xive2_pic_print_info(&chip10->xive, mon); - pnv_psi_pic_print_info(&chip10->psi, mon); + + pnv_psi_pic_print_info(&chip10->psi, buf); + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); object_child_foreach_recursive(OBJECT(chip), pnv_chip_power9_pic_print_info_child, mon); diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c index 922ac07b2f..18cc76a7e4 100644 --- a/hw/ppc/pnv_psi.c +++ b/hw/ppc/pnv_psi.c @@ -25,8 +25,6 @@ #include "qemu/module.h" #include "sysemu/reset.h" #include "qapi/error.h" -#include "qapi/type-helpers.h" -#include "monitor/monitor.h" #include "hw/ppc/fdt.h" @@ -978,11 +976,9 @@ static void pnv_psi_register_types(void) type_init(pnv_psi_register_types); -void pnv_psi_pic_print_info(Pnv9Psi *psi9, Monitor *mon) +void pnv_psi_pic_print_info(Pnv9Psi *psi9, GString *buf) { PnvPsi *psi = PNV_PSI(psi9); - g_autoptr(GString) buf = g_string_new(""); - g_autoptr(HumanReadableText) info = NULL; uint32_t offset = (psi->regs[PSIHB_REG(PSIHB9_IVT_OFFSET)] >> PSIHB9_IVT_OFF_SHIFT); @@ -990,7 +986,4 @@ void pnv_psi_pic_print_info(Pnv9Psi *psi9, Monitor *mon) g_string_append_printf(buf, "PSIHB Source %08x .. %08x\n", offset, offset + psi9->source.nr_irqs - 1); xive_source_pic_print_info(&psi9->source, offset, buf); - - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); } From patchwork Tue Jun 18 16:00:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805247 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp274806wrx; Tue, 18 Jun 2024 09:09:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUdQS5wIofKVzlsbHMM7vQstvPi2W2Mj2JMAKvvV8Trci2U4ILb/WKJCTtnkJRwYcAt6tHVYyss1kXBfyHJQcf2 X-Google-Smtp-Source: AGHT+IFhE3onLd6Crt7iNS8VMUxTcaHQfR9Ujv4HlDm6IOAPxIrr2DadcCZeJXxGBhfzeHFHgTPs X-Received: by 2002:a05:6830:1603:b0:6f9:ab3b:9ee8 with SMTP id 46e09a7af769-70075e58e84mr177606a34.34.1718726960998; Tue, 18 Jun 2024 09:09:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726960; cv=none; d=google.com; s=arc-20160816; b=fkpqnYP9Q4ZLymoNqbko6w/UujMsKgFzp5yWWR2AOzp7Ah6fT2hCcrDKt1czasXXOr F5W7w+dV6zil5BG7MDe3Hh+uPzvaXeV4E6CQixjw+8dYNVpp3vefFSEhezxBQIofQ6Ne ChBn/lNLjTZf11Ujtjq/YAGuP1crGnrn54Qhw+mMMyKjaPs/eXf6XFVgN2jVD7G76R2G sKeks6owT9cY2c4R9buMMJu7zOK8SmtZQ8mNy3wMGMNJwd4ago7Ztz6KS4oKY2aohl6E 1LtRJ5qMD9W3HvrBZNGa92gglJuQ8IdX6+5JuO/KV3VoKZFyQZNxqO8fOjjj03LikbIY w2Eg== 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:cc:to :from:dkim-signature; bh=Y1+oxv23q6Bk7GlvZzdYo0BA6/qyvhXfndKAl5a7yhw=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=LiM795rN+cAB9stfu3K6FAXRRJWeyE6xrcd4IkkLfgNArldJUo3wgnkqXwPpSMprR/ cPzQ7wUTD8Kk9NQpdWecLycXpiODrMB8q6sUVjuISOJKLVfe+eYVVhWKfEFpJUl8emKk n13acV+BZZbsHYWkvTvgzoE44DLyExMYI8QMObcOZoguqeRlV0jn/f7zwBgRfjiDzmuM 2AUWBID+1J/RHwkFr8JeN84wVh6UwCqLtSmsQFDPY10e90E9h6gbb1TraywFK9djeK4T dh+nsLUk9AuErgcm8UU07UNZdO2laMbtM2RQOm3Onb/njIPhbOhRhfhX0PQL94VwUrsK kpAw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MX+jzLPH; 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 6a1803df08f44-6b2a5afd518si126989246d6.196.2024.06.18.09.09.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:09:20 -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=MX+jzLPH; 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 1sJbKI-00050q-S1; Tue, 18 Jun 2024 12:04:54 -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 1sJbKC-0004wK-87 for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:04:50 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbK8-0007Js-Kx for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:04:47 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a62ef52e837so724863066b.3 for ; Tue, 18 Jun 2024 09:04:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726681; x=1719331481; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Y1+oxv23q6Bk7GlvZzdYo0BA6/qyvhXfndKAl5a7yhw=; b=MX+jzLPHufI/r2Z3CzQvMTzGEtQBo33yIt6Fl+2Jc5D9vJ34WvyPkW1AErz6d2A3f6 kdoWrUrp1xvS7Mkleyf6gUHAFxFFStP8KFgi6R7iJ5xydHOTURv86slat8sJkCO6xgJy 7asXO6oFLhYqwA9i/ZB9N9v6YgbXB61undYDaq/eCopsdk39hiVhxc1P8rC0lyugsy+q QyXk4hGKbv9zNeUeKlV6j4Kja98W0m28W0juy6NkH55KSjDWhBMrOJvDo4YIIuz7Hwop ySsV2zCTlLMz0TtuQNgdORAlXYJmXIsBN0F3CdOx1VJTKyT+hvIt8/jtVR4M4eX6YOWN R4Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726681; x=1719331481; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y1+oxv23q6Bk7GlvZzdYo0BA6/qyvhXfndKAl5a7yhw=; b=HWthAN0Htpt/8DDn8rYgosu6h+jY4yC+KHRHHGgpTtHi3zkN/KCTrEno8nyf7eIFgr 9Nh5urBY4VMCOjLNWe9mfqGUJCjoClk0JvKDB49r+oHp84QQAPlnERR9K8e5iX7+ZSbW bSgfc3oau/+VQTHKjo/32TkcYlbm5dBtjMR9hz8lxWz2kMOJ9suNYclNT6F4PrpCItoY J4betDmdjy/bOPmallsJZWLjJqDwDJ478wwHlNiGfP4j/3ACYven+NmEu2xlt3QSmJxj 0p/prvrZl8g1YImN+zf1ldlkaZD4arc9Lolqt9SQ+cNxLHeJvdOTh9qf5w0MrrNlhdGr Co6A== X-Gm-Message-State: AOJu0Yz4NGJV0AoC/gojr88AFcBrvDsw4PhFMgbn9jSoNHK2pYlLiyj4 b2vQzOoojIuu5DLll5k3LuIljw+R9SHBFhWH6VfrOgv9vwrB7PmzuvrUHqPwD7LJV9ZKIKvrVbw v X-Received: by 2002:a17:906:3848:b0:a6f:507a:b0fe with SMTP id a640c23a62f3a-a6f60dc4ed6mr899341066b.62.1718726681325; Tue, 18 Jun 2024 09:04:41 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f7ea3a5c9sm302023166b.169.2024.06.18.09.04.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:04:40 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 41/76] hw/ppc: Avoid using Monitor in xive2_eas_pic_print_info() Date: Tue, 18 Jun 2024 18:00:03 +0200 Message-ID: <20240618160039.36108-42-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=philmd@linaro.org; helo=mail-ej1-x62e.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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-18-philmd@linaro.org> --- include/hw/ppc/xive2_regs.h | 2 +- hw/intc/pnv_xive2.c | 16 ++++++++-------- hw/intc/xive2.c | 12 ++++++------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/include/hw/ppc/xive2_regs.h b/include/hw/ppc/xive2_regs.h index 816f5d0e84..f662f0e325 100644 --- a/include/hw/ppc/xive2_regs.h +++ b/include/hw/ppc/xive2_regs.h @@ -48,7 +48,7 @@ typedef struct Xive2Eas { #define xive2_eas_is_valid(eas) (be64_to_cpu((eas)->w) & EAS2_VALID) #define xive2_eas_is_masked(eas) (be64_to_cpu((eas)->w) & EAS2_MASKED) -void xive2_eas_pic_print_info(Xive2Eas *eas, uint32_t lisn, Monitor *mon); +void xive2_eas_pic_print_info(Xive2Eas *eas, uint32_t lisn, GString *buf); /* * Event Notifification Descriptor (END) diff --git a/hw/intc/pnv_xive2.c b/hw/intc/pnv_xive2.c index 83e0f6b09f..649e5001fd 100644 --- a/hw/intc/pnv_xive2.c +++ b/hw/intc/pnv_xive2.c @@ -2120,24 +2120,24 @@ void pnv_xive2_pic_print_info(PnvXive2 *xive, Monitor *mon) g_autoptr(GString) buf = g_string_new(""); g_autoptr(HumanReadableText) info = NULL; - monitor_printf(mon, "XIVE[%x] Source %08x .. %08x\n", blk, srcno0, - srcno0 + nr_esbs - 1); + g_string_append_printf(buf, "XIVE[%x] Source %08x .. %08x\n", + blk, srcno0, srcno0 + nr_esbs - 1); xive_source_pic_print_info(&xive->ipi_source, srcno0, buf); - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); - - monitor_printf(mon, "XIVE[%x] EAT %08x .. %08x\n", blk, srcno0, - srcno0 + nr_esbs - 1); + g_string_append_printf(buf, "XIVE[%x] EAT %08x .. %08x\n", + blk, srcno0, srcno0 + nr_esbs - 1); for (i = 0; i < nr_esbs; i++) { if (xive2_router_get_eas(xrtr, blk, i, &eas)) { break; } if (!xive2_eas_is_masked(&eas)) { - xive2_eas_pic_print_info(&eas, i, mon); + xive2_eas_pic_print_info(&eas, i, buf); } } + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); + monitor_printf(mon, "XIVE[%x] #%d END Escalation EAT\n", chip_id, blk); i = 0; while (!xive2_router_get_end(xrtr, blk, i, &end)) { diff --git a/hw/intc/xive2.c b/hw/intc/xive2.c index 98c0d8ba44..0154ebb59c 100644 --- a/hw/intc/xive2.c +++ b/hw/intc/xive2.c @@ -27,17 +27,17 @@ uint32_t xive2_router_get_config(Xive2Router *xrtr) return xrc->get_config(xrtr); } -void xive2_eas_pic_print_info(Xive2Eas *eas, uint32_t lisn, Monitor *mon) +void xive2_eas_pic_print_info(Xive2Eas *eas, uint32_t lisn, GString *buf) { if (!xive2_eas_is_valid(eas)) { return; } - monitor_printf(mon, " %08x %s end:%02x/%04x data:%08x\n", - lisn, xive2_eas_is_masked(eas) ? "M" : " ", - (uint8_t) xive_get_field64(EAS2_END_BLOCK, eas->w), - (uint32_t) xive_get_field64(EAS2_END_INDEX, eas->w), - (uint32_t) xive_get_field64(EAS2_END_DATA, eas->w)); + g_string_append_printf(buf, " %08x %s end:%02x/%04x data:%08x\n", + lisn, xive2_eas_is_masked(eas) ? "M" : " ", + (uint8_t) xive_get_field64(EAS2_END_BLOCK, eas->w), + (uint32_t) xive_get_field64(EAS2_END_INDEX, eas->w), + (uint32_t) xive_get_field64(EAS2_END_DATA, eas->w)); } void xive2_end_queue_pic_print_info(Xive2End *end, uint32_t width, From patchwork Tue Jun 18 16:00:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805244 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp274647wrx; Tue, 18 Jun 2024 09:09:03 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXpc/DmhEmru0TPaM48NhjiTxwax6m+jFQ/I3eetXfcCxluFSwFGJ2XdlIqAtdGTftX9HbK1rUAG05Cz3eFqGPx X-Google-Smtp-Source: AGHT+IHqyC9LeVf6fkzmYuc7c2+snSrnT8AUVtUn1pEyOOvor6Vp10f5XJU0o1KxHYAds503dVP8 X-Received: by 2002:a0c:ed27:0:b0:6b2:a0eb:682b with SMTP id 6a1803df08f44-6b5019ed3fbmr4808776d6.15.1718726943219; Tue, 18 Jun 2024 09:09:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726943; cv=none; d=google.com; s=arc-20160816; b=WsUb2PA8ZAnxfZPk2j+WGhOiNqTAI0jbcNMzoilFfPQQrHo5sYpQDQOWqeIhjVS9/p AVdJvGfWwYZa+/WH9An6wOyKFb8mg5uSq6vBXgZbgFdQjBBMnhb3rnz8nBJAgeT4Cbf7 4W8IcQNSVSyvRN28ij4oJDbvo6qglDaWkH1Cs0dW0hwCYlxX7vNva1ctNznQd+kIws4h CDpd0077PZzBMgStpKGEpLPn4iKkHRy014mzoatkYYKunraJhlLN0a9YzUHGGuYBrZ83 3DgiK1tokJ2GKgTiEQpK3iGWRRnpStT2sTmqr3RkoBz7kQaXZ1FuojWkbFzq6AdLrvcm 6PLw== 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:cc:to :from:dkim-signature; bh=bBbXvZQRPypaSl3gh9f7m2D/B8J51wUHOUkRF4HQox4=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=KRiTrif+JTvyBbVEYEmk5K5rHhrTMb9W5rU7cUkoqNtMEUYwQvUwPgoIZ+vCENCBVw S5dM3d//I/2ffTYk1T4ZFW70CAumgrhw4Io3s4GAwxIsyWOrx3El6T0uyM6QilJWq8SU 5ooj90d6j8m/UgzIfgiAVSLeYeabD7LM734x9PGv+zmrsAZFdcfUex1jYkAA4QAf1jbH XnEFrV88JVJEsKwLDf5hvy4AChnWykdQiBfKoto9j+zQrlT5FkYoXl2oL1CWkGZiubFc kVSxiKSp1B1t9+a9B4UHpqHr4pOuZQbL/MDuIh8Q1blkYeoXtF57o2uyXNeV8t/i+wC1 tdug==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iWjmmdba; 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 6a1803df08f44-6b2a5a17129si116625886d6.47.2024.06.18.09.09.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:09:03 -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=iWjmmdba; 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 1sJbKK-00055D-UQ; Tue, 18 Jun 2024 12:04:57 -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 1sJbKG-0004xz-8D for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:04:53 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbKD-0007K7-Qr for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:04:51 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a6e43dad8ecso975837966b.1 for ; Tue, 18 Jun 2024 09:04:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726687; x=1719331487; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bBbXvZQRPypaSl3gh9f7m2D/B8J51wUHOUkRF4HQox4=; b=iWjmmdba0prKDq2sEbpQ1q74fMadEOUqD0NEq9DBhkIjEt5qQPvyi2gZ/6VahlJMk1 Jv7NplwN1VQixyoO5JckeyiL31/i88npeaQDB0YYq99ihoslzrUdEF7ZPJSZZ4O48ZYO uaPSgQ7fLi30VrBPEOhiMxajN4Bf2MEWq7Qvb/2Ld+o9NHVjY74gtgRDx2E6nYlZ50DT 90SKKPn+F+pe6czTihR7sr+ZZs9+rHnI6F6OhkIDeF5qVIkGGXlenn1UlyND7zL8YLBX qS2RnWTJqHUzLechXkGa8kFPkHME2HMOGO82jm8feV3tv/ThaEnnjNwxxmUYvsMjzuuR H+RA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726687; x=1719331487; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bBbXvZQRPypaSl3gh9f7m2D/B8J51wUHOUkRF4HQox4=; b=J4zJwEKUEOxEsOtWZHiyBUpZFO4wHapO46fqRYOFg2o85XBR/S1+XbGeu96g0y/d4j YvMbGW2i1niQZZ0vujygaisLndTdB5n+mzYL4mO/JDI4BzFQjxahvGzKDPIp+Oc/CwfU ueqBVJ0FsLQaygqVQclLUgODxRGuW53mJnSGq/LAdhMfxMKi0XdsKfl2HIN78rSEW7Q8 XD0QCeHkSBfmADnOQ05m4F2GwJw487C4uVg7/QVa/r1rpDa+IjhiDI3FiUdsnrai+9rX 9OA7+rSZpewqE5Qrcji9noOu4pdeN3b2nuyOhM6kG52FWSQqVI85DZXaEPBAAF7HfT3C GlEQ== X-Gm-Message-State: AOJu0YxOJ6TSft936Ly4qLNO8OvtkJrj9KLYyyhcqYfDZoCoGVFs/wMU jTNxz/J/BM8UxS/1DX4Oc/oriNhQ7R/QWPSomDjKVmX6s2js19FNMFuDj7z+wfUa2dcNQq4GvPo Q X-Received: by 2002:a17:907:20f1:b0:a6e:6555:4bcd with SMTP id a640c23a62f3a-a6fa449aa71mr14354566b.35.1718726686860; Tue, 18 Jun 2024 09:04:46 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56f9c86esm629412166b.219.2024.06.18.09.04.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:04:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 42/76] hw/ppc: Avoid using Monitor in xive2_end_eas_pic_print_info() Date: Tue, 18 Jun 2024 18:00:04 +0200 Message-ID: <20240618160039.36108-43-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=philmd@linaro.org; helo=mail-ej1-x630.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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-19-philmd@linaro.org> --- include/hw/ppc/xive2_regs.h | 2 +- hw/intc/pnv_xive2.c | 10 +++++----- hw/intc/xive2.c | 20 ++++++++++---------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/hw/ppc/xive2_regs.h b/include/hw/ppc/xive2_regs.h index f662f0e325..37f572ed6d 100644 --- a/include/hw/ppc/xive2_regs.h +++ b/include/hw/ppc/xive2_regs.h @@ -134,7 +134,7 @@ void xive2_end_pic_print_info(Xive2End *end, uint32_t end_idx, Monitor *mon); void xive2_end_queue_pic_print_info(Xive2End *end, uint32_t width, Monitor *mon); void xive2_end_eas_pic_print_info(Xive2End *end, uint32_t end_idx, - Monitor *mon); + GString *buf); /* * Notification Virtual Processor (NVP) diff --git a/hw/intc/pnv_xive2.c b/hw/intc/pnv_xive2.c index 649e5001fd..9535f60828 100644 --- a/hw/intc/pnv_xive2.c +++ b/hw/intc/pnv_xive2.c @@ -2135,14 +2135,14 @@ void pnv_xive2_pic_print_info(PnvXive2 *xive, Monitor *mon) } } - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); - - monitor_printf(mon, "XIVE[%x] #%d END Escalation EAT\n", chip_id, blk); + g_string_append_printf(buf, "XIVE[%x] #%d END Escalation EAT\n", + chip_id, blk); i = 0; while (!xive2_router_get_end(xrtr, blk, i, &end)) { - xive2_end_eas_pic_print_info(&end, i++, mon); + xive2_end_eas_pic_print_info(&end, i++, buf); } + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); monitor_printf(mon, "XIVE[%x] #%d ENDT\n", chip_id, blk); i = 0; diff --git a/hw/intc/xive2.c b/hw/intc/xive2.c index 0154ebb59c..23356acff7 100644 --- a/hw/intc/xive2.c +++ b/hw/intc/xive2.c @@ -116,7 +116,7 @@ void xive2_end_pic_print_info(Xive2End *end, uint32_t end_idx, Monitor *mon) } void xive2_end_eas_pic_print_info(Xive2End *end, uint32_t end_idx, - Monitor *mon) + GString *buf) { Xive2Eas *eas = (Xive2Eas *) &end->w4; uint8_t pq; @@ -127,15 +127,15 @@ void xive2_end_eas_pic_print_info(Xive2End *end, uint32_t end_idx, pq = xive_get_field32(END2_W1_ESe, end->w1); - monitor_printf(mon, " %08x %c%c %c%c end:%02x/%04x data:%08x\n", - end_idx, - pq & XIVE_ESB_VAL_P ? 'P' : '-', - pq & XIVE_ESB_VAL_Q ? 'Q' : '-', - xive2_eas_is_valid(eas) ? 'v' : ' ', - xive2_eas_is_masked(eas) ? 'M' : ' ', - (uint8_t) xive_get_field64(EAS2_END_BLOCK, eas->w), - (uint32_t) xive_get_field64(EAS2_END_INDEX, eas->w), - (uint32_t) xive_get_field64(EAS2_END_DATA, eas->w)); + g_string_append_printf(buf, " %08x %c%c %c%c end:%02x/%04x data:%08x\n", + end_idx, + pq & XIVE_ESB_VAL_P ? 'P' : '-', + pq & XIVE_ESB_VAL_Q ? 'Q' : '-', + xive2_eas_is_valid(eas) ? 'v' : ' ', + xive2_eas_is_masked(eas) ? 'M' : ' ', + (uint8_t) xive_get_field64(EAS2_END_BLOCK, eas->w), + (uint32_t) xive_get_field64(EAS2_END_INDEX, eas->w), + (uint32_t) xive_get_field64(EAS2_END_DATA, eas->w)); } static void xive2_end_enqueue(Xive2End *end, uint32_t data) From patchwork Tue Jun 18 16:00:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805284 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp276676wrx; Tue, 18 Jun 2024 09:12:34 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWCgWVxqL+yO2waxr1iCHiy/oclFSiRQ5Rsdw6h1Fxnz5guEtJdgtdn9FiBHZ08KZ18oa0gles4BIfPnTugYS8l X-Google-Smtp-Source: AGHT+IE4mjGFkFy+D2f49EV83aLd6VBGXttiCze80VzC4R8J7zqYtMPZe35ltYf6ExFu/iEASDuy X-Received: by 2002:a05:6359:5fa0:b0:1a1:d75e:9bd2 with SMTP id e5c5f4694b2df-1a1fd60c050mr24977555d.30.1718727154040; Tue, 18 Jun 2024 09:12:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727154; cv=none; d=google.com; s=arc-20160816; b=untFmMsusIhnYqjyzz8wRUtDxLZ8SeRAzqXe7vpTtB2iV7erMmv5XaYXOkNuuvuAfH LnzaHvNVdBDkMZjene8kvUqGrewJtG3NldwvdnjVN0VvnDqjnM2RbeTmIqZ2mzoQEGSK tb9Rk9grRMXNBPOxYba+WFgLPAWtp8eThFloiPQS3JUOoW0iDgP7S6xt7GJDqsxIK+SR d5/7FxbQ39sUhlDUWziExOLISJp/ey2AgZamQuCMzWp3Buf25m9Q/cjQc/pKFUHEzTpz lrMrDvtjv9jF+W2DS0/daOAIx7JiYnEv9LWllm8xTZGlcfKMWzusn0Wm6QwqdcQ8W23z VQeg== 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:cc:to :from:dkim-signature; bh=H4fKIHkIifq0nx9RAUE9jEIghQddp4LMxW3UC4IhhV4=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=Rea/SJKcjYPdf1MuhaqTQ3Qs3qmi1IBpY6RJ4HMztjOdukgHXa7guCyt4K4N3x40Yb 8ST4dR35PUez5EVcQxVOCzwvovIau0zFaFHBJzjsSC3+mJtjBUqRbLDK98S2+kVHV0H2 tfFrGI2c44/MG+Yo4J5+1MHJFdQUbiSuAC0o14AmHUsrar3tnPjiHRO15lTeY3r9OD9V olrLaC474S3kdz1pvZBurNZSDYF2K0nDt1ZAgXxWN/TUgHOl9VJPwSPD9+vS39Bc++pl N3bSQIAuxfaJ2kW4w3z/sUOxoyQKf8138Kn5g3oOqQ8pei/PNy5JyRHKf7geDXOKTUv7 dTiQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ff53kd3V; 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 af79cd13be357-798abd23418si1365820185a.479.2024.06.18.09.12.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:12:34 -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=ff53kd3V; 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 1sJbKN-00056h-UR; Tue, 18 Jun 2024 12:04:59 -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 1sJbKK-00054q-Cb for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:04:56 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbKI-0007Kq-2n for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:04:56 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-57cbc2a2496so6076846a12.0 for ; Tue, 18 Jun 2024 09:04:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726692; x=1719331492; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=H4fKIHkIifq0nx9RAUE9jEIghQddp4LMxW3UC4IhhV4=; b=ff53kd3VH4CYl+x9AeDrZ21UhUghvLQ0LcA674onynN1+EqxXlaNL1HbXOVEJG64dd MRV/cboPvytytucICf4vP4MEJEIFnwyqZkUIPuEEIwKrQhsNNXXl7zxneDC+TpWtCx6a bp8jqltkSGLn+WJb8YhbxhSNyVfd8kcJxXGv6Ar5Bb+4GA7sHzF7+njRB2OjIIJcArNI cGYub8Vkjpp/jNSwHORKdpC65Vo5EDvOHtEmrRUnpZmRStlmCfdWId751c4JlRTPXt2d BKvF6znuIsF74PQFo6Sl649yPAPv2oQimAObVchdSWCz+KRUZ7p3Y3gw0G8AFJwLf8/c Z5JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726692; x=1719331492; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H4fKIHkIifq0nx9RAUE9jEIghQddp4LMxW3UC4IhhV4=; b=kCSttbJo73sEn8scogVqK1CwjHYzn1DDnW4A4RBmVgcRyytnu+wc1pn3UAvNFJfL04 ovF2GU0DhyENK1tiil8R0LtUtUKjz4p6YFRPVtdm+wjCzq/JFOj83NXtM0pEmq/98+rT vr2pCaZiemqZaAhcr8Nkv5ruIA0P8gj3MqV8+ZqEU2Sc6RCRZONCfgP7qQbaV9U79uvZ 4UO6TNaNWEfVacqkKOmB/ZYFYu5DYX4qunYkaWmKZhyXZ8DA0D8yw/CwBZld8BTzTOCi 4IEc86Gh6geb/7RP3Z28j9Y4V7VPjCJbqRqVFvqu3jyp2SsUF4vsRZFjU17MAkEIFCYT cAvw== X-Gm-Message-State: AOJu0YyhaB12jyxoWKmRX3EIYTl5s+kTl//El5N6YvIdpx3lLJ31I/oS YmKRTA1McBshA4UVN/BVDPXyuiMpGOPFPgMwx56U7HefbKhlNW3QZPtU6nBZ6C3L2DbNK8w7e2F X X-Received: by 2002:a50:d59b:0:b0:57c:738c:2c84 with SMTP id 4fb4d7f45d1cf-57cbd66a4e3mr10532877a12.10.1718726692396; Tue, 18 Jun 2024 09:04:52 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57cb741e5aesm7826977a12.60.2024.06.18.09.04.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:04:52 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 43/76] hw/ppc: Avoid using Monitor in xive2_end_queue_pic_print_info() Date: Tue, 18 Jun 2024 18:00:05 +0200 Message-ID: <20240618160039.36108-44-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=philmd@linaro.org; helo=mail-ed1-x529.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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-20-philmd@linaro.org> --- include/hw/ppc/xive2_regs.h | 2 +- hw/intc/xive2.c | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/include/hw/ppc/xive2_regs.h b/include/hw/ppc/xive2_regs.h index 37f572ed6d..4d32703c26 100644 --- a/include/hw/ppc/xive2_regs.h +++ b/include/hw/ppc/xive2_regs.h @@ -132,7 +132,7 @@ static inline uint64_t xive2_end_qaddr(Xive2End *end) void xive2_end_pic_print_info(Xive2End *end, uint32_t end_idx, Monitor *mon); void xive2_end_queue_pic_print_info(Xive2End *end, uint32_t width, - Monitor *mon); + GString *buf); void xive2_end_eas_pic_print_info(Xive2End *end, uint32_t end_idx, GString *buf); diff --git a/hw/intc/xive2.c b/hw/intc/xive2.c index 23356acff7..6a15b4d1e4 100644 --- a/hw/intc/xive2.c +++ b/hw/intc/xive2.c @@ -11,6 +11,7 @@ #include "qemu/log.h" #include "qemu/module.h" #include "qapi/error.h" +#include "qapi/type-helpers.h" #include "target/ppc/cpu.h" #include "sysemu/cpus.h" #include "sysemu/dma.h" @@ -40,8 +41,7 @@ void xive2_eas_pic_print_info(Xive2Eas *eas, uint32_t lisn, GString *buf) (uint32_t) xive_get_field64(EAS2_END_DATA, eas->w)); } -void xive2_end_queue_pic_print_info(Xive2End *end, uint32_t width, - Monitor *mon) +void xive2_end_queue_pic_print_info(Xive2End *end, uint32_t width, GString *buf) { uint64_t qaddr_base = xive2_end_qaddr(end); uint32_t qsize = xive_get_field32(END2_W3_QSIZE, end->w3); @@ -52,7 +52,7 @@ void xive2_end_queue_pic_print_info(Xive2End *end, uint32_t width, /* * print out the [ (qindex - (width - 1)) .. (qindex + 1)] window */ - monitor_printf(mon, " [ "); + g_string_append_printf(buf, " [ "); qindex = (qindex - (width - 1)) & (qentries - 1); for (i = 0; i < width; i++) { uint64_t qaddr = qaddr_base + (qindex << 2); @@ -64,11 +64,11 @@ void xive2_end_queue_pic_print_info(Xive2End *end, uint32_t width, HWADDR_PRIx "\n", qaddr); return; } - monitor_printf(mon, "%s%08x ", i == width - 1 ? "^" : "", - be32_to_cpu(qdata)); + g_string_append_printf(buf, "%s%08x ", i == width - 1 ? "^" : "", + be32_to_cpu(qdata)); qindex = (qindex + 1) & (qentries - 1); } - monitor_printf(mon, "]"); + g_string_append_printf(buf, "]"); } void xive2_end_pic_print_info(Xive2End *end, uint32_t end_idx, Monitor *mon) @@ -108,9 +108,14 @@ void xive2_end_pic_print_info(Xive2End *end, uint32_t end_idx, Monitor *mon) priority, nvp_blk, nvp_idx); if (qaddr_base) { + g_autoptr(GString) buf = g_string_new(""); + g_autoptr(HumanReadableText) info = NULL; + monitor_printf(mon, " eq:@%08"PRIx64"% 6d/%5d ^%d", qaddr_base, qindex, qentries, qgen); - xive2_end_queue_pic_print_info(end, 6, mon); + xive2_end_queue_pic_print_info(end, 6, buf); + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); } monitor_printf(mon, "\n"); } From patchwork Tue Jun 18 16:00:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805257 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp275289wrx; Tue, 18 Jun 2024 09:10:06 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW0jaLSIJoNyNI0ka+hfFyDyE9oLgJtmB+ubdcj+NcEiX2GWp5qAxKISebUyE5PGF9AfS+KFAOKlwdapBPAjbMt X-Google-Smtp-Source: AGHT+IFnKZktlDB9G5JW/CFVRCjUWiM1hy4Jc15pr8xNRMuM5Z0Xhu9mzuHiQZ3nFvlapZLg01Sb X-Received: by 2002:a05:6870:658a:b0:254:c27c:1b19 with SMTP id 586e51a60fabf-25c94e4aceemr311140fac.54.1718727005763; Tue, 18 Jun 2024 09:10:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727005; cv=none; d=google.com; s=arc-20160816; b=kcY2z1jhSs4KpnLZTNHDOALYBO3fldUbY7jBfrlHO8RPtYu8a/HJErBWF8Neb0Ggwb YtDnLz2/AMHIOj6K4adPz7l3f6AxVT9/f18hQvJgDkc1u9wBTYZEnsiqTslmIbvptlWd PYLY5KS2/pvprx1HVbj3eAA/3iWzbcBPcTnXDLwFmN5jfmV0OJH5a5qr1GjHa9uelfxn g/sWqh/ywAn+dUV2XR9keRJktsbz1iAg/wHlq32BfSMFDsJv2OjGM5dhqQD9LOfMxcJs 0yrJlq/qpXzP7ssIWNwennBjo7Ng70MIM7912Wr4MV9cZFEqhMwq3+WAt9fT0x2GNFFu ta3w== 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:cc:to :from:dkim-signature; bh=IFkN9FtAnePRG8NjARWMoT/J4rXKp/M9AdXLddBQS3E=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=wnAdOiOijoGJlDIgsO9e4HeZU1JQ6gkxGIY9gjdB98TsXuxsCsUr8wqoOktn0ZcBj8 MCp7YnDyV+R0iDbdHzqes+HbGF2QPSgeKVSskAj/m5m1qloxcx8AKMhNzxJx1KVarfM9 3DfDdte+xljhYj0X5sNq66Z9pKCFcPqUonlYNqSBBzMIQ5azTArdgM3ZO1Y7TA0ZRfhY ykNbOOdQ+xaeMM5vmonbAFm6ktjZqW5inaij2nhlASU+GCuWem4FlSIvF4HSzfzQn120 3oGh3uVYlWho+D8Tra0FubMPrEnHlfxL7ybOFHUY2HkMsN616zed0n+a1WHa2XE0qZGi ySZg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eFM1UkJ4; 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 ada2fe7eead31-48da44ab055si1883163137.563.2024.06.18.09.10.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:10:05 -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=eFM1UkJ4; 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 1sJbKT-0005Cm-Af; Tue, 18 Jun 2024 12:05:08 -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 1sJbKQ-00059O-Bn for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:05:02 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbKO-0007Lq-77 for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:05:01 -0400 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a6f51660223so338680866b.0 for ; Tue, 18 Jun 2024 09:04:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726698; x=1719331498; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IFkN9FtAnePRG8NjARWMoT/J4rXKp/M9AdXLddBQS3E=; b=eFM1UkJ4jVq/2pdXI0ZBLxvVn2S1K71wjepiJJGijmnSzHUVhT1iT9RgzIZgKudgyt WmCgx2xwz1OgYjPVCuVw5jCk7+Pw16SBiiuIeiv4hXwJdhC445yCQ/r5svPrhlFxjWDD yaUak3FNkttbOf6caHllg11LRizlv5Hom6KEFhcyZABhMyAC9ues9nMLpW6Xc2I/o/o1 123CH/cmm4rgtSf3oGw0nh6NCoRfrIikLA03aw3KxO/NDhnSGgTWcVqEptCJEagGJeeb r9/tL5Kb2uUcQjImBs6UfX1UD1Rr88YGsUXGKD365vk+LKwEZyHDNUa2CVSIaf8fARe5 7Ysw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726698; x=1719331498; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IFkN9FtAnePRG8NjARWMoT/J4rXKp/M9AdXLddBQS3E=; b=ENcNgQELA7G6VkUbMCp8/XPmngaXx3PK9WjNPYVrp2F8OpKcKzsZYoE11PzBhPglwG IWieTL1DxgY7bjmGAaRwD+QlSgutZv4Qr14vfo78uWVbyt5h1XFtCtPae3xludOPGnee xRZ3q+afnHMA6lGAUQZqLURF+1Qq/pHXOBUmFnfq4cpcK9zAZw297tC2l7D4prYiaQ0y /idgrYAwCmIBd/Dmev7+N17HexFCRpxxjtOpYPr5dyP4RVj7KZI8RtFKMZJw08WRnY0r cB9u6/Vl/1XFH4yUhPFTqGj8A0vvBtqj0KSGEpF6lek+qBKLRLFKmYVk0Y9YiyK3K2r9 sjeQ== X-Gm-Message-State: AOJu0YzhXmS0VCb+FnIRighQrgxCVRzgDZV20GF9Wyj8hNNHseiD81cX mbISp1wvlvtJc0qyVz7eEGawnY3f4v8ZHrTcM8/JnBzRqL4ySny7lgOx656NPvrIFqYKZGlj5Pm a X-Received: by 2002:a50:9314:0:b0:57a:70fa:8875 with SMTP id 4fb4d7f45d1cf-57cbd8b9c3bmr9305086a12.40.1718726698155; Tue, 18 Jun 2024 09:04:58 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57cb72da785sm7832728a12.28.2024.06.18.09.04.56 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:04:57 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 44/76] hw/ppc: Avoid using Monitor in xive2_end_pic_print_info() Date: Tue, 18 Jun 2024 18:00:06 +0200 Message-ID: <20240618160039.36108-45-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=philmd@linaro.org; helo=mail-ej1-x631.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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-21-philmd@linaro.org> --- include/hw/ppc/xive2_regs.h | 2 +- hw/intc/pnv_xive2.c | 8 +++---- hw/intc/xive2.c | 48 ++++++++++++++++--------------------- 3 files changed, 26 insertions(+), 32 deletions(-) diff --git a/include/hw/ppc/xive2_regs.h b/include/hw/ppc/xive2_regs.h index 4d32703c26..4e5e17cd89 100644 --- a/include/hw/ppc/xive2_regs.h +++ b/include/hw/ppc/xive2_regs.h @@ -130,7 +130,7 @@ static inline uint64_t xive2_end_qaddr(Xive2End *end) (be32_to_cpu(end->w3) & END2_W3_EQ_ADDR_LO); } -void xive2_end_pic_print_info(Xive2End *end, uint32_t end_idx, Monitor *mon); +void xive2_end_pic_print_info(Xive2End *end, uint32_t end_idx, GString *buf); void xive2_end_queue_pic_print_info(Xive2End *end, uint32_t width, GString *buf); void xive2_end_eas_pic_print_info(Xive2End *end, uint32_t end_idx, diff --git a/hw/intc/pnv_xive2.c b/hw/intc/pnv_xive2.c index 9535f60828..52505fd1a4 100644 --- a/hw/intc/pnv_xive2.c +++ b/hw/intc/pnv_xive2.c @@ -2141,14 +2141,14 @@ void pnv_xive2_pic_print_info(PnvXive2 *xive, Monitor *mon) while (!xive2_router_get_end(xrtr, blk, i, &end)) { xive2_end_eas_pic_print_info(&end, i++, buf); } - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); - monitor_printf(mon, "XIVE[%x] #%d ENDT\n", chip_id, blk); + g_string_append_printf(buf, "XIVE[%x] #%d ENDT\n", chip_id, blk); i = 0; while (!xive2_router_get_end(xrtr, blk, i, &end)) { - xive2_end_pic_print_info(&end, i++, mon); + xive2_end_pic_print_info(&end, i++, buf); } + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); monitor_printf(mon, "XIVE[%x] #%d NVPT %08x .. %08x\n", chip_id, blk, 0, XIVE2_NVP_COUNT - 1); diff --git a/hw/intc/xive2.c b/hw/intc/xive2.c index 6a15b4d1e4..3e7238c663 100644 --- a/hw/intc/xive2.c +++ b/hw/intc/xive2.c @@ -11,12 +11,10 @@ #include "qemu/log.h" #include "qemu/module.h" #include "qapi/error.h" -#include "qapi/type-helpers.h" #include "target/ppc/cpu.h" #include "sysemu/cpus.h" #include "sysemu/dma.h" #include "hw/qdev-properties.h" -#include "monitor/monitor.h" #include "hw/ppc/xive.h" #include "hw/ppc/xive2.h" #include "hw/ppc/xive2_regs.h" @@ -71,7 +69,7 @@ void xive2_end_queue_pic_print_info(Xive2End *end, uint32_t width, GString *buf) g_string_append_printf(buf, "]"); } -void xive2_end_pic_print_info(Xive2End *end, uint32_t end_idx, Monitor *mon) +void xive2_end_pic_print_info(Xive2End *end, uint32_t end_idx, GString *buf) { uint64_t qaddr_base = xive2_end_qaddr(end); uint32_t qindex = xive_get_field32(END2_W1_PAGE_OFF, end->w1); @@ -90,34 +88,30 @@ void xive2_end_pic_print_info(Xive2End *end, uint32_t end_idx, Monitor *mon) pq = xive_get_field32(END2_W1_ESn, end->w1); - monitor_printf(mon, - " %08x %c%c %c%c%c%c%c%c%c%c%c%c prio:%d nvp:%02x/%04x", - end_idx, - pq & XIVE_ESB_VAL_P ? 'P' : '-', - pq & XIVE_ESB_VAL_Q ? 'Q' : '-', - xive2_end_is_valid(end) ? 'v' : '-', - xive2_end_is_enqueue(end) ? 'q' : '-', - xive2_end_is_notify(end) ? 'n' : '-', - xive2_end_is_backlog(end) ? 'b' : '-', - xive2_end_is_escalate(end) ? 'e' : '-', - xive2_end_is_escalate_end(end) ? 'N' : '-', - xive2_end_is_uncond_escalation(end) ? 'u' : '-', - xive2_end_is_silent_escalation(end) ? 's' : '-', - xive2_end_is_firmware1(end) ? 'f' : '-', - xive2_end_is_firmware2(end) ? 'F' : '-', - priority, nvp_blk, nvp_idx); + g_string_append_printf(buf, + " %08x %c%c %c%c%c%c%c%c%c%c%c%c " + "prio:%d nvp:%02x/%04x", + end_idx, + pq & XIVE_ESB_VAL_P ? 'P' : '-', + pq & XIVE_ESB_VAL_Q ? 'Q' : '-', + xive2_end_is_valid(end) ? 'v' : '-', + xive2_end_is_enqueue(end) ? 'q' : '-', + xive2_end_is_notify(end) ? 'n' : '-', + xive2_end_is_backlog(end) ? 'b' : '-', + xive2_end_is_escalate(end) ? 'e' : '-', + xive2_end_is_escalate_end(end) ? 'N' : '-', + xive2_end_is_uncond_escalation(end) ? 'u' : '-', + xive2_end_is_silent_escalation(end) ? 's' : '-', + xive2_end_is_firmware1(end) ? 'f' : '-', + xive2_end_is_firmware2(end) ? 'F' : '-', + priority, nvp_blk, nvp_idx); if (qaddr_base) { - g_autoptr(GString) buf = g_string_new(""); - g_autoptr(HumanReadableText) info = NULL; - - monitor_printf(mon, " eq:@%08"PRIx64"% 6d/%5d ^%d", - qaddr_base, qindex, qentries, qgen); + g_string_append_printf(buf, " eq:@%08"PRIx64"% 6d/%5d ^%d", + qaddr_base, qindex, qentries, qgen); xive2_end_queue_pic_print_info(end, 6, buf); - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); } - monitor_printf(mon, "\n"); + g_string_append_c(buf, '\n'); } void xive2_end_eas_pic_print_info(Xive2End *end, uint32_t end_idx, From patchwork Tue Jun 18 16:00:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805266 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp276040wrx; Tue, 18 Jun 2024 09:11:30 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU+E9WW74P0IjI+oWP+7nFRNRhdtXFvv2a+sqjkam08+OqFbT0cHx1xWCc237JFNF9J0ET1cXnaceM8DolKJBRm X-Google-Smtp-Source: AGHT+IHO30n7gEEd7BckOCLHAqw8EkFKTJATIYN/S5ptQbIEpoYpJb+HYAvwl4Akf92bn1DYhNG2 X-Received: by 2002:a05:6808:10d5:b0:3d2:2e87:c108 with SMTP id 5614622812f47-3d51ba766e8mr221765b6e.35.1718727089807; Tue, 18 Jun 2024 09:11:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727089; cv=none; d=google.com; s=arc-20160816; b=hFdopuOclp/WXPM4Zpopug+baiVkhq0zQ/yznYhIqvMOqF+AIV0e7KXAwuejb18AAn AI2MW3wDyZD3OWc6jAD1KlBEDb0BOch9WPeKJ70QzmM/mNre7N5q+YiHXuOa/OUq8qpI AB2zHheP+0Pbx+f6uyrO7gVATclfvX0shj0klTaIKgvp6XGthDw8X+DDv1IDkKp51CCy oOiW4fsUeQH5XTy98en7kjzdq+dAnT6otcFYQgQme3/S0R0WGJ1dG2zv9BtpKHYQynJs kaKCdBEphunAwCFULIZtoR9jImzhZuzGBd0OvTF6T/wfYoN4zJ/2RjwNLakuxQeQHchA 6A3Q== 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:cc:to :from:dkim-signature; bh=MLTZXMk8f7jCos7Oua6eYCL2IKl5sjVIn9SYnGqK2mg=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=BtePgyZundd9np+BxOJ06fKPOSYu6o0EK1lYvVNboqxwjXwGCSXH+f6yFM3hSF1T9v DgCglHA5REjbfj3980fF+bElj4zeTDtzz1VeF/3ZEkJhpVvfpw2lEl9Pp5IjsDasNZIV ScQIVyBUgViixiFcV2RC25P2HFz7mr9zW8cWDpiLbMfOObefLuAe+gk7wy+pQ8bExUlJ oMA0cXUXOJ3j6X/vkEMFnwhWCn2HfAOKH8hknwHRyB5BFjPj33mBI01fr3IiakJoYjc8 aqCGHUz4/xbfTVV/NkgKEUTrf04C7Rf391mcse4NV57LmDL+RwKyznDhxHDtyEjEAWHQ d56A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ed9tuF9a; 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 a1e0cc1a2514c-80d7871d4cbsi1846593241.90.2024.06.18.09.11.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:11:29 -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=Ed9tuF9a; 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 1sJbKa-0005Si-UI; Tue, 18 Jun 2024 12:05:12 -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 1sJbKW-0005L2-3a for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:05:08 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbKU-0007Xd-66 for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:05:07 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a6f8ebbd268so291492366b.0 for ; Tue, 18 Jun 2024 09:05:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726704; x=1719331504; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MLTZXMk8f7jCos7Oua6eYCL2IKl5sjVIn9SYnGqK2mg=; b=Ed9tuF9arUeqezvHHqsmvy7lUbmTRf8TJ0RwFF6+cVyeXXthAhw9q6vDI0YeQzZnr6 kvWHkV+udskLzAF3qkZ6yuYATtYrZH6O5onmQhZufpex1oFNZplo3c5Rur7Uw3HNZrKE h442zKzOErPSWq6NR/uy/NxWTo6TZR/EU1L9lj4JDtNPo6b2HPb6D1AHSITXI4QpD3Ky nN0dVljXFjztUJPlz9ojOWhigQUgCRxNbTJ7ss+21TZzoi9npTDEr3vxFGi6TNmuFCj5 Rsmi/yysWKMnPYynfgsSd+HQR3ARdyZ/dzTym9aJVywtPpbWcbxlvyI1qssLklqmVSGS nAIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726704; x=1719331504; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MLTZXMk8f7jCos7Oua6eYCL2IKl5sjVIn9SYnGqK2mg=; b=b7oOvn3uDZFFoDEi9wpghCOiAwhv2M5XV2HVvc41lpMk6rw/P+n1vRjcYkwzdD5JI6 4MnGLszgyJMt7j+fUKc7ymbD3qkEvndYcMjFd/WMmwG+akCgYCqBinwh6YzOdawrHHu+ InQAixTwyejCz8XendsU34dIOfMnZiLRYg88wMZgo/Gl0/c9SKF9NVK2BULYivcWyfzm Yr8G0pPXSwrQ+sYdN5eZjdaDN67os5Yd3MHnxwBtl0T77uHJYPRAA2kBOxJfjga1zIN7 hT8QhrMKNznRLZxZHhp1lYkBPx0xdc3AazQR7ca6IqXFZXzD0GPT01q5xhuRAz2/4ju6 WkpQ== X-Gm-Message-State: AOJu0YzIxZ50825UkpOE79XVM4Q/BvurVQO59pTVVj+Kp9M3vu8ko0BK NmYCVTjaxIOaRBKwW4AIsai24HHlzCCQ8OopvTKJaa0j+gsjxlz+ugvVwMqe01G5+JTiQtfM/y6 H X-Received: by 2002:a17:906:99cf:b0:a6f:4ebd:1463 with SMTP id a640c23a62f3a-a6fa430f30amr17930166b.20.1718726703947; Tue, 18 Jun 2024 09:05:03 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56f41684sm628373866b.153.2024.06.18.09.05.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:05:03 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 45/76] hw/ppc: Avoid using Monitor in xive2_nvp_pic_print_info() Date: Tue, 18 Jun 2024 18:00:07 +0200 Message-ID: <20240618160039.36108-46-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=philmd@linaro.org; helo=mail-ej1-x629.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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-22-philmd@linaro.org> --- hw/intc/pnv_xive2.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/hw/intc/pnv_xive2.c b/hw/intc/pnv_xive2.c index 52505fd1a4..10914b04df 100644 --- a/hw/intc/pnv_xive2.c +++ b/hw/intc/pnv_xive2.c @@ -2028,7 +2028,7 @@ static void pnv_xive2_register_types(void) type_init(pnv_xive2_register_types) static void xive2_nvp_pic_print_info(Xive2Nvp *nvp, uint32_t nvp_idx, - Monitor *mon) + GString *buf) { uint8_t eq_blk = xive_get_field32(NVP2_W5_VP_END_BLOCK, nvp->w5); uint32_t eq_idx = xive_get_field32(NVP2_W5_VP_END_INDEX, nvp->w5); @@ -2037,21 +2037,21 @@ static void xive2_nvp_pic_print_info(Xive2Nvp *nvp, uint32_t nvp_idx, return; } - monitor_printf(mon, " %08x end:%02x/%04x IPB:%02x", - nvp_idx, eq_blk, eq_idx, - xive_get_field32(NVP2_W2_IPB, nvp->w2)); + g_string_append_printf(buf, " %08x end:%02x/%04x IPB:%02x", + nvp_idx, eq_blk, eq_idx, + xive_get_field32(NVP2_W2_IPB, nvp->w2)); /* * When the NVP is HW controlled, more fields are updated */ if (xive2_nvp_is_hw(nvp)) { - monitor_printf(mon, " CPPR:%02x", - xive_get_field32(NVP2_W2_CPPR, nvp->w2)); + g_string_append_printf(buf, " CPPR:%02x", + xive_get_field32(NVP2_W2_CPPR, nvp->w2)); if (xive2_nvp_is_co(nvp)) { - monitor_printf(mon, " CO:%04x", - xive_get_field32(NVP2_W1_CO_THRID, nvp->w1)); + g_string_append_printf(buf, " CO:%04x", + xive_get_field32(NVP2_W1_CO_THRID, nvp->w1)); } } - monitor_printf(mon, "\n"); + g_string_append_c(buf, '\n'); } /* @@ -2147,15 +2147,16 @@ void pnv_xive2_pic_print_info(PnvXive2 *xive, Monitor *mon) while (!xive2_router_get_end(xrtr, blk, i, &end)) { xive2_end_pic_print_info(&end, i++, buf); } - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); - monitor_printf(mon, "XIVE[%x] #%d NVPT %08x .. %08x\n", chip_id, blk, - 0, XIVE2_NVP_COUNT - 1); + g_string_append_printf(buf, "XIVE[%x] #%d NVPT %08x .. %08x\n", + chip_id, blk, 0, XIVE2_NVP_COUNT - 1); xive_nvp_per_subpage = pnv_xive2_vst_per_subpage(xive, VST_NVP); for (i = 0; i < XIVE2_NVP_COUNT; i += xive_nvp_per_subpage) { while (!xive2_router_get_nvp(xrtr, blk, i, &nvp)) { - xive2_nvp_pic_print_info(&nvp, i++, mon); + xive2_nvp_pic_print_info(&nvp, i++, buf); } } + + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); } From patchwork Tue Jun 18 16:00:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805234 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp274031wrx; Tue, 18 Jun 2024 09:08:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWoSOP0cWQoyNpECPOBfqp5Sl6w44rbwUem2Y1O3PBFS8ymAnnODs6ZtU7ewe2TZYz9yyfsVUrMvCzPnQoAHdxF X-Google-Smtp-Source: AGHT+IGDUA/sAfHhO4y+xGUXe3gWY18vFvn2WLiBWSyRxoFJBVYH86QCkG4r8FquMyoJmBvNTb5S X-Received: by 2002:a25:18b:0:b0:e02:b4ad:10c4 with SMTP id 3f1490d57ef6-e02be10becbmr362596276.8.1718726880537; Tue, 18 Jun 2024 09:08:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726880; cv=none; d=google.com; s=arc-20160816; b=pjUwrU+Q+ChEiadMNyPmrz+HBBzZruKPJPohE34BXnH5xaEB2qfTBiR4rW+tWUfscX cEp+U88xxMoXqyh2Va5b8rWMc8m9ehJHAUnkiho8cdyGgm9F/Uo+EzupGqXWtsI9El/4 bhdMD9md2+bRnBb71Z32UvqsF5IEPlLEKuhVJ26yFi5AkLbWtR6AA/k3E0fI7OUwX2v3 iSy2L8SZUinaVsDMX+4vS8o1omGvNBs4nwexQReuTS684HuYq0l6BmkCi0DLUviQvec0 01Csh72VU9nhBh4vW+UCiHg9llEtmFTSU7Dbt5c1M+4+D7Sk6B3dgfANptbf5Co4kJCc 40gw== 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:cc:to :from:dkim-signature; bh=UQ/vKPLAFvWQQZA4qFYQnETyiIwxVEeu0Q/3lMWAKrA=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=Qngsdqp+r4JBnhO4i/M9nqUmXzizJ8LIvzWejMBMj1AEqTVwfilCbYJzGdLpBd4T2Z mXvMHAje/BfRIRAGv7KOV0m0+DUn9iCAmr8w7UdNPurjn99/FXirWphUJccWKepwZCgw K8HdyWUHjDJZ1jfXPuo9VsdYyG3abPRFEJBTT9/dVVLM3Ca07vbX9HgqPtdhej93uTrF vgupDdthJ9urN5aTkQ8dhVTX9QFwMgLL00btiA7lrc7nYxBmPan48tcY1WMzuVRbE2Ol G/kAGTeVsElApaiiy9xTUgeRiFq7Xzmly2tL7eon67tG2HDp/G4JNJU1glIU5qUhbUEc /G4A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="K/WB8J+4"; 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 3f1490d57ef6-e02b4098980si570498276.353.2024.06.18.09.08.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:08:00 -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="K/WB8J+4"; 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 1sJbKe-0005jv-GE; Tue, 18 Jun 2024 12:05:16 -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 1sJbKb-0005aj-Lj for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:05:14 -0400 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbKZ-0007YX-Rq for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:05:13 -0400 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a6efe62f583so568368466b.3 for ; Tue, 18 Jun 2024 09:05:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726709; x=1719331509; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UQ/vKPLAFvWQQZA4qFYQnETyiIwxVEeu0Q/3lMWAKrA=; b=K/WB8J+4gGHPyztQnH9Q7qehrD0qHF3E8pYqEvAexxkegpnZEJboO107KyGm95dAMs cUkQHcB9MDvMD0vwzAeNRdKbA8mY0JmFDdGnEwwdux+VM79d87wCMfI8NJ7za5PVCHHZ AwZ+AKy/QLFkLrMPd0p7mWo+wJnRA75Np8PFMikvRz9OjE7Rnl+AzQ2flGpOHFOC/NtI Qt7wSLj4hi4VaoeKrdEABXVcSqjhfRdDKcfcJwItV1776t6FhBOIM3fNWM231b+rAZAJ LK7zLBScgquMuYWRiBHXtZtc43g1pVtVlI5IgGY97xeYadOyamedWZcLJv1bqdJTxeRm Cxjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726709; x=1719331509; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UQ/vKPLAFvWQQZA4qFYQnETyiIwxVEeu0Q/3lMWAKrA=; b=nkSUkmHHu5K8nOjqrX5146Y0gBr+0awcwvfvTezlapi36Zn43IhxSPxeU9D8uFVuh7 Bql6+SzGCHPBZ/x/6dzW4FuVWKmzmVD5Ou3edNmzRF6JfRQvEXoM1T2WH8w7PqkeYfpS 39YhwckRp8nxE7JiHnjY16WD/6dtJ6h5g9HJzBtM486HxKMWBA0F2M8KZ2F92PVF1GRD 7cacmODvmLpQScNO8GFWnpv0RBh4PvX9JmwBkIFsBlW75N0i8h1F21eIf9mwxcI8OPLP XVF97hPQycLBsvUNXx844WoM4ELdmVInJL7ZcwAFR3szbsXFdh4XOwAu994pim1sU2ER SDPA== X-Gm-Message-State: AOJu0YxVNNT1nY0RNBgFh7PGEXBpRaJ5asaFFUtZ0USsVlbmCYLTRvlI MC2lFzFczdlRyfJeAZfwTtUTyQyqCTRq6KyipLL+wu4GSM+T1pRKsvBwqJmgzqdH/76nxrEL0dz 6 X-Received: by 2002:a17:907:874e:b0:a6f:7834:d40a with SMTP id a640c23a62f3a-a6f7834d63fmr593235266b.24.1718726709556; Tue, 18 Jun 2024 09:05:09 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f56f99b67sm625233066b.201.2024.06.18.09.05.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:05:09 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 46/76] hw/ppc: Avoid using Monitor in pnv_xive2_pic_print_info() Date: Tue, 18 Jun 2024 18:00:08 +0200 Message-ID: <20240618160039.36108-47-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=philmd@linaro.org; helo=mail-ej1-x62d.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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-23-philmd@linaro.org> --- include/hw/ppc/pnv_xive.h | 2 +- hw/intc/pnv_xive2.c | 9 +-------- hw/ppc/pnv.c | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/include/hw/ppc/pnv_xive.h b/include/hw/ppc/pnv_xive.h index 7d634e469c..5b4cb4167b 100644 --- a/include/hw/ppc/pnv_xive.h +++ b/include/hw/ppc/pnv_xive.h @@ -163,6 +163,6 @@ typedef struct PnvXive2Class { DeviceRealize parent_realize; } PnvXive2Class; -void pnv_xive2_pic_print_info(PnvXive2 *xive, Monitor *mon); +void pnv_xive2_pic_print_info(PnvXive2 *xive, GString *buf); #endif /* PPC_PNV_XIVE_H */ diff --git a/hw/intc/pnv_xive2.c b/hw/intc/pnv_xive2.c index 10914b04df..2fb4fa29d4 100644 --- a/hw/intc/pnv_xive2.c +++ b/hw/intc/pnv_xive2.c @@ -10,11 +10,9 @@ #include "qemu/osdep.h" #include "qemu/log.h" #include "qapi/error.h" -#include "qapi/type-helpers.h" #include "target/ppc/cpu.h" #include "sysemu/cpus.h" #include "sysemu/dma.h" -#include "monitor/monitor.h" #include "hw/ppc/fdt.h" #include "hw/ppc/pnv.h" #include "hw/ppc/pnv_chip.h" @@ -2105,7 +2103,7 @@ static uint64_t pnv_xive2_vst_per_subpage(PnvXive2 *xive, uint32_t type) return (1ull << page_shift) / info->size; } -void pnv_xive2_pic_print_info(PnvXive2 *xive, Monitor *mon) +void pnv_xive2_pic_print_info(PnvXive2 *xive, GString *buf) { Xive2Router *xrtr = XIVE2_ROUTER(xive); uint8_t blk = pnv_xive2_block_id(xive); @@ -2117,8 +2115,6 @@ void pnv_xive2_pic_print_info(PnvXive2 *xive, Monitor *mon) Xive2Nvp nvp; int i; uint64_t xive_nvp_per_subpage; - g_autoptr(GString) buf = g_string_new(""); - g_autoptr(HumanReadableText) info = NULL; g_string_append_printf(buf, "XIVE[%x] Source %08x .. %08x\n", blk, srcno0, srcno0 + nr_esbs - 1); @@ -2156,7 +2152,4 @@ void pnv_xive2_pic_print_info(PnvXive2 *xive, Monitor *mon) xive2_nvp_pic_print_info(&nvp, i++, buf); } } - - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); } diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 4a1a302a25..5b9dbff754 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -864,7 +864,7 @@ static void pnv_chip_power10_pic_print_info(PnvChip *chip, Monitor *mon) g_autoptr(GString) buf = g_string_new(""); g_autoptr(HumanReadableText) info = NULL; - pnv_xive2_pic_print_info(&chip10->xive, mon); + pnv_xive2_pic_print_info(&chip10->xive, buf); pnv_psi_pic_print_info(&chip10->psi, buf); info = human_readable_text_from_str(buf); From patchwork Tue Jun 18 16:00:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805263 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp275904wrx; Tue, 18 Jun 2024 09:11:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUGCQEtQEkV9OzAQl3tuJKKxX0Wwv/Wpkh0cnezeyIyTv60I/qWfIQ8pYUITmMNSoLOolCJ2TiczwCqYTQQtdFt X-Google-Smtp-Source: AGHT+IGo60C22xc+cQSgRro6v5oK8tjfUGWHYEwbCPTqZOW1XmMK9jVIQnDBRQ9qMpPDs8SdJ3ZP X-Received: by 2002:a05:6102:2414:b0:47e:f56e:c1d9 with SMTP id ada2fe7eead31-48f13097430mr167781137.25.1718727072501; Tue, 18 Jun 2024 09:11:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727072; cv=none; d=google.com; s=arc-20160816; b=UocbrKfKjn3fyY5RhzhAdKhOtiMvAOOctare8vUgoyhjBnAa9nFlJtffarAMhnqQd+ 5RtLZx8rN7oRPz5pvvi8bUmwPs1hzOj8DDg5xlItj2beUQIIwFPeJ5Tx9tJhZXUOC9Rl u5OA2OxXcvKfuB/iaeWWgj3q+fwQdccZIjs7wpEJWCvpkVDJgGdh7I9FZefrGrKMY6hS BK3WviJWJtQfLMmFYYhA3gR3o2lsCTFD3vP5OcA+WiZid3sZRgq2ejW/zmf9+WeZrzvE J3SsGyfY4gBE3ZebBU81b/HRqm59/ApKvI8iQVkhmB6ejHcX3d7c2LYYMYrRmjsScA22 aIow== 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:cc:to :from:dkim-signature; bh=R4W1MGJBRGFUEbFiT0ZVw3zxdKeF/zBKMMBgexrp4K4=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=duU+9popFhwHrV52q/pNBfuaYvlpCs5xvUnvlb7/Sq2KfO+eRinvlce2ba+8snaLVf TeIytHKbzRkKkuMySkQup+edxjYn742hGoWrpuHmoZNpI7NBFSgZNEZVSAcQbzLnbDNW 1U3D+XSdcUQ/W1q+jOT3tIjvtdw/5b5+VwSfBkXDiQG0Tz+WEYzoWG2n+k9fqImOK1ca c6CjCbjcQuRN5iRxUOph31+00iblGK5wqPIJiKq4352NFdpMmuXdE2cSn/57j+gxeVOh 7Bb0vGQMOv8WB3HAHy7cgYMOFZH3lTrIUMTE+WAJhrebF95vP/czt8NVzFOoKKjbkGm7 8XOg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dgwvBwje; 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 ada2fe7eead31-48da43864f8si2062603137.19.2024.06.18.09.11.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:11:12 -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=dgwvBwje; 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 1sJbKi-000639-E0; Tue, 18 Jun 2024 12:05:20 -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 1sJbKg-0005x1-QG for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:05:18 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbKe-0007ap-Tp for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:05:18 -0400 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-57c60b13a56so6736618a12.0 for ; Tue, 18 Jun 2024 09:05:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726715; x=1719331515; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=R4W1MGJBRGFUEbFiT0ZVw3zxdKeF/zBKMMBgexrp4K4=; b=dgwvBwjetCSPnYvlZh7Loa7PKF1WXsWF/RczlizHZHs7zadLkgwWCB2JyrrBUjnZ6/ 66uw8Ljl2+2KSjdEIAWKBR1KMDAi0oY6BFpJBEXJja6xavBiUFei21s4xMq8BSECjMDD teJdcyuYHXm6evy9bmF+oqNI35btZsN4vVXEc4KQ9KBUjKjWrOEbbFQdTmtiKX7R844j Q6j0Ol25ZC9KRen5s/Oh+YAu6XOQuTQTGdEpZU8Y9eLsKo8rC/xEEHJvspXGlMRfmC9Z ku46iIhbKZMQDkHiBTDKGJgUVziio9ydpm826CTY+Ag5A6JVLoti1c83jYyNGxOswfRq uBvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726715; x=1719331515; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=R4W1MGJBRGFUEbFiT0ZVw3zxdKeF/zBKMMBgexrp4K4=; b=d49sMSgZ70NnNeuctf7flOsPHFDnev2kh9BaUlo/sNl0pC1XYF5GEayI3Crkf39V8S XLchsPeN4L6S2LGmj5EmCZmBGK74ayHTkCzRe7pfS6z4SIkkHHnBRBPcx8CCyVFeKYbi tD84UXqQYEsC1HHDKx1gr4o93rFfbCRIyAn4imgvhgUnIc0OjRPvm6X4X5C7UFfISaqz pNqIIGkB1l8JTe86wV/M1H4T8f0otScQ7Edr4bzi9w+v2rirxBXu1qApicKaYWjrZG0C ZWqL3pAOdzDeiSz5bbKBD1JJOwj9De0mAIQSUJIqzC/E+ceWKuJFVTjLTHwtWCOvx5vS JeCA== X-Gm-Message-State: AOJu0YxaKYqTB6L/M5r8a90r01ej3LR1UxNS50kC34OeQJRg5SiawRjr HXhIUf43Jg2ZNcb3hAZSEWZuRSzdAMP/FS3mHnCKKdA9Bt0UPg7gBMp1ncAzDjQdBTS0PAzHQEL F X-Received: by 2002:a50:d5c2:0:b0:573:555e:6d89 with SMTP id 4fb4d7f45d1cf-57cbd652436mr8404843a12.1.1718726715115; Tue, 18 Jun 2024 09:05:15 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57cb7439606sm7870168a12.90.2024.06.18.09.05.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:05:14 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 47/76] hw/ppc: Avoid using Monitor in SpaprInterruptControllerClass::print_info() Date: Tue, 18 Jun 2024 18:00:09 +0200 Message-ID: <20240618160039.36108-48-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=philmd@linaro.org; helo=mail-ed1-x52a.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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-24-philmd@linaro.org> --- include/hw/ppc/spapr_irq.h | 2 +- hw/intc/spapr_xive.c | 9 +-------- hw/intc/xics_spapr.c | 9 +-------- hw/ppc/spapr_irq.c | 8 +++++++- 4 files changed, 10 insertions(+), 18 deletions(-) diff --git a/include/hw/ppc/spapr_irq.h b/include/hw/ppc/spapr_irq.h index 4fd2d5853d..6e50470cff 100644 --- a/include/hw/ppc/spapr_irq.h +++ b/include/hw/ppc/spapr_irq.h @@ -73,7 +73,7 @@ struct SpaprInterruptControllerClass { /* These methods should only be called on the active intc */ void (*set_irq)(SpaprInterruptController *intc, int irq, int val); - void (*print_info)(SpaprInterruptController *intc, Monitor *mon); + void (*print_info)(SpaprInterruptController *intc, GString *buf); void (*dt)(SpaprInterruptController *intc, uint32_t nr_servers, void *fdt, uint32_t phandle); int (*post_load)(SpaprInterruptController *intc, int version_id); diff --git a/hw/intc/spapr_xive.c b/hw/intc/spapr_xive.c index 9d0d5948ff..283a6b8fd2 100644 --- a/hw/intc/spapr_xive.c +++ b/hw/intc/spapr_xive.c @@ -11,13 +11,11 @@ #include "qemu/log.h" #include "qemu/module.h" #include "qapi/error.h" -#include "qapi/type-helpers.h" #include "qemu/error-report.h" #include "target/ppc/cpu.h" #include "sysemu/cpus.h" #include "sysemu/reset.h" #include "migration/vmstate.h" -#include "monitor/monitor.h" #include "hw/ppc/fdt.h" #include "hw/ppc/spapr.h" #include "hw/ppc/spapr_cpu_core.h" @@ -701,12 +699,10 @@ static void spapr_xive_set_irq(SpaprInterruptController *intc, int irq, int val) } } -static void spapr_xive_print_info(SpaprInterruptController *intc, Monitor *mon) +static void spapr_xive_print_info(SpaprInterruptController *intc, GString *buf) { SpaprXive *xive = SPAPR_XIVE(intc); CPUState *cs; - g_autoptr(GString) buf = g_string_new(""); - g_autoptr(HumanReadableText) info = NULL; CPU_FOREACH(cs) { PowerPCCPU *cpu = POWERPC_CPU(cs); @@ -714,9 +710,6 @@ static void spapr_xive_print_info(SpaprInterruptController *intc, Monitor *mon) xive_tctx_pic_print_info(spapr_cpu_state(cpu)->tctx, buf); } spapr_xive_pic_print_info(xive, buf); - - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); } static void spapr_xive_dt(SpaprInterruptController *intc, uint32_t nr_servers, diff --git a/hw/intc/xics_spapr.c b/hw/intc/xics_spapr.c index 1926373ebd..a0d97bdefe 100644 --- a/hw/intc/xics_spapr.c +++ b/hw/intc/xics_spapr.c @@ -34,8 +34,6 @@ #include "hw/ppc/xics_spapr.h" #include "hw/ppc/fdt.h" #include "qapi/visitor.h" -#include "qapi/type-helpers.h" -#include "monitor/monitor.h" /* * Guest interfaces @@ -397,12 +395,10 @@ static void xics_spapr_set_irq(SpaprInterruptController *intc, int irq, int val) ics_set_irq(ics, srcno, val); } -static void xics_spapr_print_info(SpaprInterruptController *intc, Monitor *mon) +static void xics_spapr_print_info(SpaprInterruptController *intc, GString *buf) { ICSState *ics = ICS_SPAPR(intc); CPUState *cs; - g_autoptr(GString) buf = g_string_new(""); - g_autoptr(HumanReadableText) info = NULL; CPU_FOREACH(cs) { PowerPCCPU *cpu = POWERPC_CPU(cs); @@ -410,9 +406,6 @@ static void xics_spapr_print_info(SpaprInterruptController *intc, Monitor *mon) icp_pic_print_info(spapr_cpu_state(cpu)->icp, buf); } ics_pic_print_info(ics, buf); - - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); } static int xics_spapr_post_load(SpaprInterruptController *intc, int version_id) diff --git a/hw/ppc/spapr_irq.c b/hw/ppc/spapr_irq.c index 97b2fc42ab..b43917e7fe 100644 --- a/hw/ppc/spapr_irq.c +++ b/hw/ppc/spapr_irq.c @@ -11,6 +11,7 @@ #include "qemu/log.h" #include "qemu/error-report.h" #include "qapi/error.h" +#include "qapi/type-helpers.h" #include "hw/irq.h" #include "hw/ppc/spapr.h" #include "hw/ppc/spapr_cpu_core.h" @@ -18,6 +19,7 @@ #include "hw/ppc/xics.h" #include "hw/ppc/xics_spapr.h" #include "hw/qdev-properties.h" +#include "monitor/monitor.h" #include "cpu-models.h" #include "sysemu/kvm.h" @@ -269,8 +271,12 @@ void spapr_irq_print_info(SpaprMachineState *spapr, Monitor *mon) { SpaprInterruptControllerClass *sicc = SPAPR_INTC_GET_CLASS(spapr->active_intc); + g_autoptr(GString) buf = g_string_new(""); + g_autoptr(HumanReadableText) info = NULL; - sicc->print_info(spapr->active_intc, mon); + sicc->print_info(spapr->active_intc, buf); + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); } void spapr_irq_dt(SpaprMachineState *spapr, uint32_t nr_servers, From patchwork Tue Jun 18 16:00:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805246 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp274759wrx; Tue, 18 Jun 2024 09:09:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWlN3/BedP04aygGWcUEQxs1hUz2KIBOr8vMbOGE1mVoJ5SlrLx3uaP5B60ZU0XDXTRr0y8EwxRpr24TzNQEyV8 X-Google-Smtp-Source: AGHT+IH5U9UEd7umFGeWgSUlq1RGWlRBcmNdm/0Jpg/KF3wGHcdKQJW0I+onVzaWhBaAMBuxS45Y X-Received: by 2002:a05:6122:1692:b0:4df:261c:fc0c with SMTP id 71dfb90a1353d-4ef277c009emr353548e0c.13.1718726955144; Tue, 18 Jun 2024 09:09:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726955; cv=none; d=google.com; s=arc-20160816; b=xJcKLI1mUo50UTkbxP2+7Wh60qlFjOYt9d+QAgqHCarXJlTfzfzfRS2THdLVMYjfnq ZgxVR/fr2vu2Z7wD/ioGiOTtXKZsquzEnqv1szEVO3loQ+I+/W7HqsE6cMB6uUXg9lbU aVxT7XwHOTLxFA8UdfbqMpPiExeRE2FAFG38AinZDfXBsA6eddcw0f7qXrJut9rGsb55 FS43/GsOyFHh/pDXV4WBPFqd0hw7FybkMnUzyo3oiuWzdhk5MAKDkhJOxmfZRbXZNh8d ad9fPwKGH5UxuSr3IBSyd1HPVbq8znJG8eGVL+f/ZzQQM74/dsIXSuyePHDnZf63taFs KAYg== 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:cc:to :from:dkim-signature; bh=QAchbjd4STB4wMqJvx/3nQ2+YymWCSUHWaZzeEkCQ5E=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=i5qdgE9QveGzsTQwyhyPlIG6vt6A6U8SpqJo/j28G72hLIOnnLj5bDdQTK9/Q6OXuo n5tbjrfujLfNjfOL4iGtgvmRozqr6ICwpcHSIo89lVQvgArNxAORD9vllYXUVaCmTuNT xrzu8ggg0ADztzNKQUfoWcGrxfO0+Xj9cp9+bqq2ut+Zv9k6VlhETw2G0PL1L3SPKJaE 7NfXJm0g7jJGN0OkOBOwcdHp3ecE7SGArNByO01Pw0nMmps8OEJcA27sO1k+FUUMtWT4 llMFtBXyUDQqOZvo3yNy1P3RDzkf7kTuxuTS7apvJe9zrQACA5++YDpSxxXIWwTzxGNC 3VOA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cPRB3OCx; 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 71dfb90a1353d-4ed41a25fa8si2099097e0c.295.2024.06.18.09.09.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:09:15 -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=cPRB3OCx; 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 1sJbKo-0006Fk-Cz; Tue, 18 Jun 2024 12:05:26 -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 1sJbKm-000671-A7 for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:05:24 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbKk-0007c6-G1 for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:05:24 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4217990f8baso50180835e9.2 for ; Tue, 18 Jun 2024 09:05:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726720; x=1719331520; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QAchbjd4STB4wMqJvx/3nQ2+YymWCSUHWaZzeEkCQ5E=; b=cPRB3OCxlusfI2SWZ/lhTcTMaq3DrB0+D6cp65VxoirsM7fWALmj3miAuB5Hovn/HM q0nMBBEpClrVpWzE4d4wp12M5aAtVvcMy/fTWU/0iuK5DActklRBwhcs8EUr8iP19xk1 DH7ah5Q12WXzMZ1aA3w5xtmfd3M+4agN9itTXYTpryNpM5/eduSbbhuQqoNQfTefap3H eCYmPn882HHjXRmR2HhQsItyC4217jBPiqmX4NJEvqITJxG7mVZrvB5fZq704jFqFaoE CT14wl/Hm4vteX70cZN9C6bsZ2B3vrdWA05CuhjIBvKp5kFXvjYPGsp44xUCJbEs86PH 9P/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726720; x=1719331520; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QAchbjd4STB4wMqJvx/3nQ2+YymWCSUHWaZzeEkCQ5E=; b=KY25wIEGGtgyNx9f7gWxC4q8CD/X6avVbCZZzlJbC5+/v0OZWeUaPxK0L6O4O2Ce/Y 3hqLMIcWrFxjWeDnEaPID5Lpw01RXJPIh/qkCZSg7zJhonoN6VZoh1HHdhduA4wYmtB/ NEHIJYmszkx/uhzacNrwtsAS70CyikCLyq4ldzBhaBgAPz5W955Ah/pXWHVuqnJrxp+L a62pMwY19c0DlYaGYs1xzsHQRMbGun4SvkhjZrtj2fglh34+CWE8MtYt4XYm4kkIhqpF 9pDloDmQorLBajX94DUnbLHt3IlMZM63teQbt3T3ljPbgllAxCylUA1CJZ6Fy6F+jCwU yKOw== X-Gm-Message-State: AOJu0YxmWb0E0X58t5LBZC/lR/mZwWT22y+rCqDGSZ8ycPSN3loHSete ZlePVDidUkbXa7d1SoMSLeGUSqzRVpzVJ9uIrOwiOLgdJZoPrA1i9w8mzmDobF6ha10EhfEemE3 K X-Received: by 2002:a7b:cc84:0:b0:422:5953:343b with SMTP id 5b1f17b1804b1-42304858452mr95492735e9.34.1718726720638; Tue, 18 Jun 2024 09:05:20 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-423b7a61501sm113840875e9.46.2024.06.18.09.05.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:05:20 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 48/76] hw/ppc: Avoid using Monitor in spapr_irq_print_info() Date: Tue, 18 Jun 2024 18:00:10 +0200 Message-ID: <20240618160039.36108-49-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-25-philmd@linaro.org> --- include/hw/ppc/spapr_irq.h | 2 +- hw/ppc/spapr.c | 11 ++++++++--- hw/ppc/spapr_irq.c | 8 +------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/include/hw/ppc/spapr_irq.h b/include/hw/ppc/spapr_irq.h index 6e50470cff..cb9a85f657 100644 --- a/include/hw/ppc/spapr_irq.h +++ b/include/hw/ppc/spapr_irq.h @@ -85,7 +85,7 @@ int spapr_irq_cpu_intc_create(struct SpaprMachineState *spapr, PowerPCCPU *cpu, Error **errp); void spapr_irq_cpu_intc_reset(struct SpaprMachineState *spapr, PowerPCCPU *cpu); void spapr_irq_cpu_intc_destroy(struct SpaprMachineState *spapr, PowerPCCPU *cpu); -void spapr_irq_print_info(struct SpaprMachineState *spapr, Monitor *mon); +void spapr_irq_print_info(struct SpaprMachineState *spapr, GString *buf); void spapr_irq_dt(struct SpaprMachineState *spapr, uint32_t nr_servers, void *fdt, uint32_t phandle); diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index d7d4b188ee..a22decb643 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -31,6 +31,7 @@ #include "qapi/error.h" #include "qapi/qapi-events-machine.h" #include "qapi/qapi-events-qdev.h" +#include "qapi/type-helpers.h" #include "qapi/visitor.h" #include "sysemu/sysemu.h" #include "sysemu/hostmem.h" @@ -4530,10 +4531,14 @@ static void spapr_pic_print_info(InterruptStatsProvider *obj, Monitor *mon) { SpaprMachineState *spapr = SPAPR_MACHINE(obj); + g_autoptr(GString) buf = g_string_new(""); + g_autoptr(HumanReadableText) info = NULL; - spapr_irq_print_info(spapr, mon); - monitor_printf(mon, "irqchip: %s\n", - kvm_irqchip_in_kernel() ? "in-kernel" : "emulated"); + spapr_irq_print_info(spapr, buf); + g_string_append_printf(buf, "irqchip: %s\n", + kvm_irqchip_in_kernel() ? "in-kernel" : "emulated"); + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); } /* diff --git a/hw/ppc/spapr_irq.c b/hw/ppc/spapr_irq.c index b43917e7fe..aebd7eaabb 100644 --- a/hw/ppc/spapr_irq.c +++ b/hw/ppc/spapr_irq.c @@ -11,7 +11,6 @@ #include "qemu/log.h" #include "qemu/error-report.h" #include "qapi/error.h" -#include "qapi/type-helpers.h" #include "hw/irq.h" #include "hw/ppc/spapr.h" #include "hw/ppc/spapr_cpu_core.h" @@ -19,7 +18,6 @@ #include "hw/ppc/xics.h" #include "hw/ppc/xics_spapr.h" #include "hw/qdev-properties.h" -#include "monitor/monitor.h" #include "cpu-models.h" #include "sysemu/kvm.h" @@ -267,16 +265,12 @@ static void spapr_set_irq(void *opaque, int irq, int level) sicc->set_irq(spapr->active_intc, irq, level); } -void spapr_irq_print_info(SpaprMachineState *spapr, Monitor *mon) +void spapr_irq_print_info(SpaprMachineState *spapr, GString *buf) { SpaprInterruptControllerClass *sicc = SPAPR_INTC_GET_CLASS(spapr->active_intc); - g_autoptr(GString) buf = g_string_new(""); - g_autoptr(HumanReadableText) info = NULL; sicc->print_info(spapr->active_intc, buf); - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); } void spapr_irq_dt(SpaprMachineState *spapr, uint32_t nr_servers, From patchwork Tue Jun 18 16:00:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805280 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp276535wrx; Tue, 18 Jun 2024 09:12:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUzsHWZVbTsGwBGWsXHGgbVsdzwXb7VNOMYL9Lzcx7tiFYAYgUld4SxlLpqQme/QhfbGxppAfkrSUFIvTTQrmSZ X-Google-Smtp-Source: AGHT+IGDoOJKxSzzVK8RIomF8vafY9jCUqAcBdVKmkWh793ssViyXcQqZ2pjkua52EXGA3STSByY X-Received: by 2002:a05:620a:3903:b0:799:2d50:14a3 with SMTP id af79cd13be357-79bb3cdbbc0mr18864385a.0.1718727142223; Tue, 18 Jun 2024 09:12:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727142; cv=none; d=google.com; s=arc-20160816; b=FMPMx62aoQ/NvWIU8D6aGJ0Wn9HaQPsbNPOBG0uJu3AKAPEWTJ/20IqWy4mEn1P15M rErYHRZW9otE/QXJHPRcfAs0COY74l6pukYyF2muVrBDKE0AT71Vn+jAhd529c0ogqOP 53/9pJwoxeHcnbSjB4uRNZdebWZj5eZPIQbO/k0DECZVQZo168g7WosDrqx7mdbZfe0e ZXgDHYdpU6OuRLY3UvgFCLUSG9ooYZZurkqo2BqYebLPmAeCAMAEdNB8MRVjZq8JdatX 1L1MnSM9e+WbWaECwsvvgqa5CmthGQzEyiD5fihDlJxRE15+WZoORwFC9s+CJLX3sCsY a+eQ== 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:cc:to :from:dkim-signature; bh=XaPptVDdD74GAIoHXJ+it7pWAc5JUuZ8+jYkYbmUa/U=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=i3Ou9PJnayB2fRmHOReNlNh+HTQM+ccapJCycs0aYNkLmZMnQurhjJw4SPyWZIVdZ4 ir/NW0YszQnVl/1oB3OYvdx2W8rmo3VMhRB8Pxr1IJ6/+1sn4sBROWp4nGeBHRrzpWfh NDhzQVmVL2zGhH1GzW/6gFGHCiD22tg9x+/X5iUL7/5ltS5oLZgOlsqCkrHcW+pOH+rJ zpkzKd/n+vC9A0Y/XEgiD/7lue0BnqDGPLLjfjkB+ehBY/Ntz2DaVHVrynb87CX7U4Qg FbfJgfiGgxmbKkhsmoJFmSZrCZmmWvFq7gCA4YjHhNVqg12LT0/xZDTL3T+IlUC/6OPL m2nA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QUaobIrP; 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 af79cd13be357-798abe55404si928269685a.555.2024.06.18.09.12.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:12: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=QUaobIrP; 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 1sJbKt-0006JK-QA; Tue, 18 Jun 2024 12:05:31 -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 1sJbKt-0006J8-4H for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:05:31 -0400 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbKr-0007g8-E7 for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:05:30 -0400 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-52c8c0d73d3so5900272e87.1 for ; Tue, 18 Jun 2024 09:05:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726727; x=1719331527; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XaPptVDdD74GAIoHXJ+it7pWAc5JUuZ8+jYkYbmUa/U=; b=QUaobIrPXC7yonNGOiXVcQR+iLCxnB3jXVz0NYzXKym8+t4IG/cWBmqOfETvlqSN5q vovA+9GmuI0GclnEH3b4zJYFZI9lYeOMT4NI+7OMqsu2DVuO+X423dBoIKi8ZHm+iP/0 RgIKpJbPx79n+E1L4oGLz/pF2HLzDgdsRaRggsTfuZJZm/2B9I7FOGhtwVPj9QoJR3z0 BnbuF3qG7ii+jTdTSuirLmoZKiDvlNmSRj0S8cq6lJgfzbJ9kFuzS7E7iFvq8mHm+QEt s2wx2U5Fl23iiR0a9XechiaMB6eY5qEY4MweGCrU5IT7f8oXkWtpzVI/HPo/e8cNHhs4 NWGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726727; x=1719331527; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XaPptVDdD74GAIoHXJ+it7pWAc5JUuZ8+jYkYbmUa/U=; b=D7WuKHG+Kh4Ddg7kdH8rICxtlno94KJBCJgje9jbJnp+htHEQoS9GX35eK+Qu/JlGc mrp88wtwE/ZEcSdAujcg25CBrPHyj6sB1cbrGKxg3+UBqiLSfVNxRcif0AvpKYA+pZeW 7cNrgHFnp8t3PGu43WUHmzrGgTXJLudHBzVV6ctnwlxhALoft/WyITjdjEJmXb7IFcX+ u+Ap4UN7UxNpEGWUJNSZ9nmkxZfcPW5/iVZccSihXd4A1+t3CgoDjqL4M3no+98Wwnc8 OaLc9vT2R8MiWQc1ZL9ipejaZ5SS2Lc1C5aoSHEHorw8FqKeavPJPpSR8p2lPCHNGRSq 7lmQ== X-Gm-Message-State: AOJu0YyZOHQ4oD8iSY8tTgyA+b3HJ6gAk6n9QZ0n/w+GH+iv6CArHVo6 mVLm9pfMlF3NgOZnytw3Aw8EbSs64FdibLviFKG5dF26EPV6xSBZvx8XOv5gRPsREYYZfogDbG1 M X-Received: by 2002:a05:6512:3d04:b0:52b:c262:99b3 with SMTP id 2adb3069b0e04-52ccaa5693emr40607e87.11.1718726726214; Tue, 18 Jun 2024 09:05:26 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-422870e986asm233047535e9.27.2024.06.18.09.05.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:05:25 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 49/76] hw/ppc: Avoid using Monitor in pnv_chip_power9_pic_print_info_child() Date: Tue, 18 Jun 2024 18:00:11 +0200 Message-ID: <20240618160039.36108-50-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=philmd@linaro.org; helo=mail-lf1-x12c.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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-26-philmd@linaro.org> --- hw/ppc/pnv.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 5b9dbff754..9039c1777a 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -789,18 +789,14 @@ static void pnv_chip_power8_pic_print_info(PnvChip *chip, Monitor *mon) static int pnv_chip_power9_pic_print_info_child(Object *child, void *opaque) { - Monitor *mon = opaque; + GString *buf = opaque; PnvPHB *phb = (PnvPHB *) object_dynamic_cast(child, TYPE_PNV_PHB); - g_autoptr(GString) buf = g_string_new(""); - g_autoptr(HumanReadableText) info = NULL; if (!phb) { return 0; } pnv_phb4_pic_print_info(PNV_PHB4(phb->backend), buf); - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); return 0; } @@ -813,12 +809,11 @@ static void pnv_chip_power9_pic_print_info(PnvChip *chip, Monitor *mon) pnv_xive_pic_print_info(&chip9->xive, buf); pnv_psi_pic_print_info(&chip9->psi, buf); + object_child_foreach_recursive(OBJECT(chip), + pnv_chip_power9_pic_print_info_child, buf); info = human_readable_text_from_str(buf); monitor_puts(mon, info->human_readable_text); - - object_child_foreach_recursive(OBJECT(chip), - pnv_chip_power9_pic_print_info_child, mon); } static uint64_t pnv_chip_power8_xscom_core_base(PnvChip *chip, @@ -865,13 +860,12 @@ static void pnv_chip_power10_pic_print_info(PnvChip *chip, Monitor *mon) g_autoptr(HumanReadableText) info = NULL; pnv_xive2_pic_print_info(&chip10->xive, buf); - pnv_psi_pic_print_info(&chip10->psi, buf); + object_child_foreach_recursive(OBJECT(chip), + pnv_chip_power9_pic_print_info_child, buf); + info = human_readable_text_from_str(buf); monitor_puts(mon, info->human_readable_text); - - object_child_foreach_recursive(OBJECT(chip), - pnv_chip_power9_pic_print_info_child, mon); } /* Always give the first 1GB to chip 0 else we won't boot */ From patchwork Tue Jun 18 16:00:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805239 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp274191wrx; Tue, 18 Jun 2024 09:08:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXPEi2++uVypE5eEKqQ8BX9sR7ckP9h+iI+z8I2uurRAj26w3+Y8kTF375rdUzbO9KyyYeBi0wwN8ZoYY1WWwzs X-Google-Smtp-Source: AGHT+IGW2aTR/xfzQ2LGU8NJrpj/UBARXvUfoHiqRrVy+RD434EKZIHaS9Orl3QR7IESoeMQ2/V7 X-Received: by 2002:a05:6870:148d:b0:259:8b2f:8d76 with SMTP id 586e51a60fabf-25c9498dc84mr267279fac.20.1718726897322; Tue, 18 Jun 2024 09:08:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726897; cv=none; d=google.com; s=arc-20160816; b=TIFZcWEUnGyUZHfZyqi2M/VJjOSCGfHh3BAX6bXFDCQn5wbAxQQzSYsHad3cXwEXbP pYwe+vR9Xa7bq8SL9IyeT6Xq8ubs/X49Ti3H8OtGaavM6xRLQ/+ak+CHUrOphhl4s2fB Bz+BzPqKInW2pgQvUFRH034+mhBpYfIc6AUNQG6bK1ePnSQrNIWlPPGd4REGIUaf7ZZY umCWaQiz4mOMZz0xb3CX+5/kfWSfPewiu+FYeKMPleONu9nymWmoYy9yhnqssKtu/Qtr KzPd+SVXCDayMw6y8HaISlv1ckduq+avx9469PyoX7GMeUxaNCWU1ElWfnZLYmL6y5GI bDhg== 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:cc:to :from:dkim-signature; bh=PbhmY9JoTUClAzzbpCxEJXIDCxC/FdxyMxXmvUNLqdM=; fh=Q+oQ03yQfuoTTxzUPDLJKoTd4xZYvGHM4rKHQJt4bQ4=; b=W/zgm17dRXZ93arbTDtMozp00z+66GoIdxy8fN7pNNyIHiGy1mYFHv7Gcne0tmt7Fj Iz5NU058vym0lEMpf3+LVbGdALARSvoK2aoTh3RdnA5tzZSD3TybplNQynJJVCOA1RPu ofXeGxh8QJQgtA+LpPagbRnw65OfpYICu43riARsYH/Qf4YyrF+OGkqsNKa41c7ONS3E gMsO+B9qr/510EoXJb3JdMYULAK975GM3Wv1I6r/gJokyOMHl7frQhR4Ssjy7J24A/jx GI0mw29yvTf59fu6LPwMi9KQw/EC8C73jT5J4rxhqGbn36nsqcbqWFjTfHh7n62Dx1G5 dtOg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="XyY8y+Y/"; 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 ada2fe7eead31-48da43c45besi1934742137.225.2024.06.18.09.08.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:08:17 -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="XyY8y+Y/"; 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 1sJbL1-0006Ky-EB; Tue, 18 Jun 2024 12:05:39 -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 1sJbL0-0006KU-BA for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:05:38 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbKx-0007h5-Ey for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:05:38 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-42172ed3597so35419755e9.0 for ; Tue, 18 Jun 2024 09:05:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726733; x=1719331533; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PbhmY9JoTUClAzzbpCxEJXIDCxC/FdxyMxXmvUNLqdM=; b=XyY8y+Y/LJQahZi2bUle4r2HrSy7hIiI2K6N9qYaDwKGPmnwaaxvylooAW9unrDx4j xHyY54z+suKPoIjxx1L6J2g/atbclQ5lZY39DZV3C5vXUp2KNm2EV6qkIuyturJKezRn bG7dYABZhqU9BOis/RE4/NrOTFOzYTQnj9c9rSXnWtcaYOZuc4Z28v+lQAL5aA8aa2gf p/Je5G6FuNpxow6E6+I62Cg59ujaKJGOhyoLk0AlXSTPfqXpg95cB+rPtrdHRuEr9l5c UCweei7Js4iMYrUGMc2PZeh1H9xh0xZl6R86K5Pr082LdZSRn8dRmF5MbN6Y5o5FznDf B5dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726733; x=1719331533; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PbhmY9JoTUClAzzbpCxEJXIDCxC/FdxyMxXmvUNLqdM=; b=RyFc7735OyCmw3EyBOEJimNBLdJc36RkRrq0ZmZ6Lq5brYa+iC48Oi9kXhc7UAQLIe WVwplDy+Ss57V2X0iO7EDc2m8jrPqwXpQUpnxFynHLfsvLDZlO6bFB+pQ/EhTDEORwxX jloOaYELifvw4L6ULoOb9MDe7NMjoKOB/bsHS4CMEIWZxSl8Wxa/Rxhi9Pz2l95w1cWf Cc7EGAhSIhjj+hFAwyKErQ5fNHnH4DMXsMzU+7xuiotNWXl8j/3PAFmN0QVXAzcOpysM 5aUmNG2Z4z8X8wPraKaUj2V+Gf2WZ8zwrtwmuHKI/qK8t6rn0ydgFbS4I/Bya5ugXAYx 6Dtg== X-Gm-Message-State: AOJu0YxyiRcsB2QcfBHycY9bMqgFMA7YycF6vVqWor1+bxabsxX7bpOd AIlgqghEVG4MN4CMAI2BERL1tuYxavojkG3jWBXWX1O9XW8zf2I5WsOZAe4jWS/fPuQbhZEyYi6 J X-Received: by 2002:a05:600c:1c93:b0:421:b906:8088 with SMTP id 5b1f17b1804b1-4246f514b4fmr30171935e9.0.1718726733468; Tue, 18 Jun 2024 09:05:33 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-422f602ee95sm196650265e9.13.2024.06.18.09.05.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:05:33 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Manos Pitsidianakis , =?utf-8?q?C=C3=A9dric?= =?utf-8?q?_Le_Goater?= , Harsh Prateek Bora Subject: [PULL 50/76] hw/ppc: Avoid using Monitor in pic_print_info() Date: Tue, 18 Jun 2024 18:00:12 +0200 Message-ID: <20240618160039.36108-51-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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 Replace Monitor API by HumanReadableText one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Manos Pitsidianakis Reviewed-by: Cédric Le Goater Reviewed-by: Harsh Prateek Bora Message-Id: <20240610062105.49848-27-philmd@linaro.org> --- include/hw/ppc/pnv_chip.h | 2 +- hw/ppc/pnv.c | 29 +++++++---------------------- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/include/hw/ppc/pnv_chip.h b/include/hw/ppc/pnv_chip.h index a5e428be7c..a4ed17ac59 100644 --- a/include/hw/ppc/pnv_chip.h +++ b/include/hw/ppc/pnv_chip.h @@ -154,7 +154,7 @@ struct PnvChipClass { void (*intc_print_info)(PnvChip *chip, PowerPCCPU *cpu, GString *buf); ISABus *(*isa_create)(PnvChip *chip, Error **errp); void (*dt_populate)(PnvChip *chip, void *fdt); - void (*pic_print_info)(PnvChip *chip, Monitor *mon); + void (*pic_print_info)(PnvChip *chip, GString *buf); uint64_t (*xscom_core_base)(PnvChip *chip, uint32_t core_id); uint32_t (*xscom_pcba)(PnvChip *chip, uint64_t addr); }; diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 9039c1777a..df74f032d7 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -765,14 +765,11 @@ static ISABus *pnv_isa_create(PnvChip *chip, Error **errp) return PNV_CHIP_GET_CLASS(chip)->isa_create(chip, errp); } -static void pnv_chip_power8_pic_print_info(PnvChip *chip, Monitor *mon) +static void pnv_chip_power8_pic_print_info(PnvChip *chip, GString *buf) { Pnv8Chip *chip8 = PNV8_CHIP(chip); int i; - g_autoptr(GString) buf = g_string_new(""); - g_autoptr(HumanReadableText) info = NULL; - ics_pic_print_info(&chip8->psi.ics, buf); for (i = 0; i < chip8->num_phbs; i++) { @@ -782,9 +779,6 @@ static void pnv_chip_power8_pic_print_info(PnvChip *chip, Monitor *mon) pnv_phb3_msi_pic_print_info(&phb3->msis, buf); ics_pic_print_info(&phb3->lsis, buf); } - - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); } static int pnv_chip_power9_pic_print_info_child(Object *child, void *opaque) @@ -801,19 +795,14 @@ static int pnv_chip_power9_pic_print_info_child(Object *child, void *opaque) return 0; } -static void pnv_chip_power9_pic_print_info(PnvChip *chip, Monitor *mon) +static void pnv_chip_power9_pic_print_info(PnvChip *chip, GString *buf) { Pnv9Chip *chip9 = PNV9_CHIP(chip); - g_autoptr(GString) buf = g_string_new(""); - g_autoptr(HumanReadableText) info = NULL; pnv_xive_pic_print_info(&chip9->xive, buf); pnv_psi_pic_print_info(&chip9->psi, buf); object_child_foreach_recursive(OBJECT(chip), pnv_chip_power9_pic_print_info_child, buf); - - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); } static uint64_t pnv_chip_power8_xscom_core_base(PnvChip *chip, @@ -853,19 +842,14 @@ static void pnv_ipmi_bt_init(ISABus *bus, IPMIBmc *bmc, uint32_t irq) isa_realize_and_unref(dev, bus, &error_fatal); } -static void pnv_chip_power10_pic_print_info(PnvChip *chip, Monitor *mon) +static void pnv_chip_power10_pic_print_info(PnvChip *chip, GString *buf) { Pnv10Chip *chip10 = PNV10_CHIP(chip); - g_autoptr(GString) buf = g_string_new(""); - g_autoptr(HumanReadableText) info = NULL; pnv_xive2_pic_print_info(&chip10->xive, buf); pnv_psi_pic_print_info(&chip10->psi, buf); object_child_foreach_recursive(OBJECT(chip), pnv_chip_power9_pic_print_info_child, buf); - - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); } /* Always give the first 1GB to chip 0 else we won't boot */ @@ -2363,12 +2347,13 @@ static void pnv_pic_print_info(InterruptStatsProvider *obj, PNV_CHIP_GET_CLASS(pnv->chips[0])->intc_print_info(pnv->chips[0], cpu, buf); } - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); for (i = 0; i < pnv->num_chips; i++) { - PNV_CHIP_GET_CLASS(pnv->chips[i])->pic_print_info(pnv->chips[i], mon); + PNV_CHIP_GET_CLASS(pnv->chips[i])->pic_print_info(pnv->chips[i], buf); } + + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); } static int pnv_match_nvt(XiveFabric *xfb, uint8_t format, From patchwork Tue Jun 18 16:00:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805242 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp274586wrx; Tue, 18 Jun 2024 09:08:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCURMzVxpmBekcMIyBxsZ84COFel4JON0XvBEcHeSv56RCWr8t0u4UbAIMCuAfeVBQ+6ioWaX8sXV27wPw67mNT0 X-Google-Smtp-Source: AGHT+IH2coZCS5djnALghCMJbJm58IYhJmwV6JWPprPRJxrLzGMiOb4HhP/edGbZvU2UvDLOLav2 X-Received: by 2002:a05:622a:24a:b0:441:5985:3fca with SMTP id d75a77b69052e-444a79a4050mr2713011cf.14.1718726938051; Tue, 18 Jun 2024 09:08:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726938; cv=none; d=google.com; s=arc-20160816; b=yG15cXpPLGHaVzNQQcfiZgYuL5wSqHlTRimx5HhNkqRA4rP4YG3JufKKyXDW7qBSaI fSTNxzpykAwK3Z25LNQ0xEHfhaj9Ve0ttiLEu09ElDipLcew07bTVzg6xH7vw0LMAZyo pJaU3K/mYnSJT7OHVIKrj98FJ27rGIbc1XQozem1SAJvScfASqaAisyx8+nbIrqkih12 78p4G9oJ6Tec7DuHpr55tAP6H0bWZSASiEgJ4LKmV2ht6jCa33LrZRh7lGoMGJSATmMq cf7BlbhSVzALnjRXrI7FGixcPRZZOc9A7wbGEXLLL7TOiBUWy7HjA/syufWV4TN5wWR6 eggg== 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:cc:to :from:dkim-signature; bh=r8OyoSWiqYqZ724G+eBiG4m3ZHua/dJD8d+E6MeWDOQ=; fh=iBCV4w7YK1vyHYfwyxOoXBCd3sIBF9+yH+94qSO9meY=; b=zY2x2n320n/y08aRU+JyxkkC6lQEDpukrSGeHMm2t48lQDi1i0i77WI4iFjZbXA4oY BS3t1qZxt7e32r0JRNzbx8rUCLFIBf6MsZXV/oYRBvkkOPVD9Nyx9vY9jMCMwKv4Nu0E PNbXaC+iMeFqSy67iiK2AEItbsSnda+snCVK1c1IJiJAOE7k6JKjNewnix/BDgh2Q/EA hw5v7N8aEq+nqkcUn0DCAfdix6q2Wyh/W2yANycCNr/xYuO4eWNieAQug7jgNdGQazhv 5G7EqmEVyPDownv1UOt7wZJB5TRuj+EKddV9wEWtHl9HUVVj4a7JiWrRmzycCK05CWhk Wthw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aEr5CGEL; 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 d75a77b69052e-441f3102a7fsi132294801cf.722.2024.06.18.09.08.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:08:58 -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=aEr5CGEL; 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 1sJbL6-0006NK-97; Tue, 18 Jun 2024 12:05:44 -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 1sJbL5-0006Ms-FG for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:05:43 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbL3-0007i1-1H for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:05:43 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-42172ab4b60so49809485e9.0 for ; Tue, 18 Jun 2024 09:05:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726739; x=1719331539; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=r8OyoSWiqYqZ724G+eBiG4m3ZHua/dJD8d+E6MeWDOQ=; b=aEr5CGEL0RzR/py+wn1xHLnu3TH4eQvWvjM0idtSXjviLTiWjrZesQETxME1yLko6O DsCFDSW2iwZP6Pucm7GubnmnWwG5Ljrjfkw7NY6ytNlhGtXAlx8uj0FNUqG7NUiNnVsG S1wXhwrGd3HPK7XqWRXAZOPu/dfg6zYYA+nk8JhkOgt/TiJzV+pPgiGnB722NIT5x0Dj 5OJ6YcOiI++b9UFLChOwi8RI53K+k2ZKNkxQL6sZx6FpPk/1MpllM7urYJ+5L+aXoKOe W7lCUGfXIP4DAZdz+Ws0G720OJMwyztCcXkKySymaRdIM4jmItQQOLe21ALTpSltqtvM VuFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726739; x=1719331539; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=r8OyoSWiqYqZ724G+eBiG4m3ZHua/dJD8d+E6MeWDOQ=; b=LbVMazA5q3WElwEokQ6ye9sPp7WjboFL80HgIdqX8Rt3zPTaaGYVxzLo43ht7kCZhs ouxeZte2iCJMsgDM5bCInKHzVNtncYuhJ5w45n87uWoNjKJ4n/7eBxsbY403yy80Y9Ab rpEfF3SQ4azC6JHyth2u18xXoCR08EH2nUWz4bgeUHKEokQ3GwbuPQND1+eCJgkOcGtU FIYMSFJVG8eQIp03c1By5CLMdhq7nGIRp4DO50LT5+I05dfbWQ+g/Z7rEEPN/kiTGHXC pzi8j1uhHuMlXOFo+b6nsOSOOAqyaZdZghSQuWGkLAjaOM0vnPtXgC91PVgQJyrgsf6N Y93Q== X-Gm-Message-State: AOJu0YzDCSaZbsLoqlFkA+o01CvQj9Kkr761ITGCfEeX3UKHB2ST3fjb PhESpS9zD6fvLY2wPnB+Zu/pT0TzeUlr/EyzXukyw7AHAN7tD+TZdRqrMiw2r5ne8D+ZZnq8vje Z X-Received: by 2002:a05:600c:808:b0:423:b756:cdaf with SMTP id 5b1f17b1804b1-423b756ce01mr62225025e9.23.1718726739079; Tue, 18 Jun 2024 09:05:39 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4247101aac6sm17490365e9.0.2024.06.18.09.05.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:05:38 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?D?= =?utf-8?q?aniel_P_=2E_Berrang=C3=A9?= Subject: [PULL 51/76] hw/intc: Avoid using Monitor in INTERRUPT_STATS_PROVIDER::print_info() Date: Tue, 18 Jun 2024 18:00:13 +0200 Message-ID: <20240618160039.36108-52-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.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 Replace Monitor API by HumanReadableText one (see commit f2de406f29 "docs/devel: document expectations for QAPI data modelling for QMP" for rationale). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Message-Id: <20240610063518.50680-2-philmd@linaro.org> --- include/hw/intc/intc.h | 2 +- hw/intc/goldfish_pic.c | 8 +++--- hw/intc/i8259_common.c | 14 +++++----- hw/intc/ioapic_common.c | 57 +++++++++++++++++++++-------------------- hw/intc/m68k_irqc.c | 5 ++-- hw/intc/slavio_intctl.c | 11 ++++---- hw/ppc/pnv.c | 10 +------- hw/ppc/spapr.c | 10 +------- monitor/hmp-cmds.c | 8 +++++- 9 files changed, 57 insertions(+), 68 deletions(-) diff --git a/include/hw/intc/intc.h b/include/hw/intc/intc.h index 7018f608ca..e40194b8e3 100644 --- a/include/hw/intc/intc.h +++ b/include/hw/intc/intc.h @@ -22,7 +22,7 @@ struct InterruptStatsProviderClass { */ bool (*get_statistics)(InterruptStatsProvider *obj, uint64_t **irq_counts, unsigned int *nb_irqs); - void (*print_info)(InterruptStatsProvider *obj, Monitor *mon); + void (*print_info)(InterruptStatsProvider *obj, GString *buf); }; #endif diff --git a/hw/intc/goldfish_pic.c b/hw/intc/goldfish_pic.c index d662dfeb99..6cc1c69d26 100644 --- a/hw/intc/goldfish_pic.c +++ b/hw/intc/goldfish_pic.c @@ -12,7 +12,6 @@ #include "hw/qdev-properties.h" #include "hw/sysbus.h" #include "migration/vmstate.h" -#include "monitor/monitor.h" #include "qemu/log.h" #include "trace.h" #include "hw/intc/intc.h" @@ -39,11 +38,12 @@ static bool goldfish_pic_get_statistics(InterruptStatsProvider *obj, return true; } -static void goldfish_pic_print_info(InterruptStatsProvider *obj, Monitor *mon) +static void goldfish_pic_print_info(InterruptStatsProvider *obj, GString *buf) { GoldfishPICState *s = GOLDFISH_PIC(obj); - monitor_printf(mon, "goldfish-pic.%d: pending=0x%08x enabled=0x%08x\n", - s->idx, s->pending, s->enabled); + g_string_append_printf(buf, + "goldfish-pic.%d: pending=0x%08x enabled=0x%08x\n", + s->idx, s->pending, s->enabled); } static void goldfish_pic_update(GoldfishPICState *s) diff --git a/hw/intc/i8259_common.c b/hw/intc/i8259_common.c index ee0041115c..d9558e3940 100644 --- a/hw/intc/i8259_common.c +++ b/hw/intc/i8259_common.c @@ -28,7 +28,6 @@ #include "hw/isa/i8259_internal.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" -#include "monitor/monitor.h" #include "qapi/error.h" static int irq_level[16]; @@ -132,16 +131,17 @@ static bool pic_get_statistics(InterruptStatsProvider *obj, return true; } -static void pic_print_info(InterruptStatsProvider *obj, Monitor *mon) +static void pic_print_info(InterruptStatsProvider *obj, GString *buf) { PICCommonState *s = PIC_COMMON(obj); pic_dispatch_pre_save(s); - monitor_printf(mon, "pic%d: irr=%02x imr=%02x isr=%02x hprio=%d " - "irq_base=%02x rr_sel=%d elcr=%02x fnm=%d\n", - s->master ? 0 : 1, s->irr, s->imr, s->isr, s->priority_add, - s->irq_base, s->read_reg_select, s->elcr, - s->special_fully_nested_mode); + g_string_append_printf(buf, "pic%d: irr=%02x imr=%02x isr=%02x hprio=%d " + "irq_base=%02x rr_sel=%d elcr=%02x fnm=%d\n", + s->master ? 0 : 1, s->irr, s->imr, s->isr, + s->priority_add, + s->irq_base, s->read_reg_select, s->elcr, + s->special_fully_nested_mode); } static bool ltim_state_needed(void *opaque) diff --git a/hw/intc/ioapic_common.c b/hw/intc/ioapic_common.c index efbe6958c8..769896353a 100644 --- a/hw/intc/ioapic_common.c +++ b/hw/intc/ioapic_common.c @@ -23,7 +23,6 @@ #include "qapi/error.h" #include "qemu/module.h" #include "migration/vmstate.h" -#include "monitor/monitor.h" #include "hw/intc/intc.h" #include "hw/intc/ioapic.h" #include "hw/intc/ioapic_internal.h" @@ -59,59 +58,62 @@ static bool ioapic_get_statistics(InterruptStatsProvider *obj, return true; } -static void ioapic_irr_dump(Monitor *mon, const char *name, uint32_t bitmap) +static void ioapic_irr_dump(GString *buf, const char *name, uint32_t bitmap) { int i; - monitor_printf(mon, "%-10s ", name); + g_string_append_printf(buf, "%-10s ", name); if (bitmap == 0) { - monitor_printf(mon, "(none)\n"); + g_string_append_printf(buf, "(none)\n"); return; } for (i = 0; i < IOAPIC_NUM_PINS; i++) { if (bitmap & (1 << i)) { - monitor_printf(mon, "%-2u ", i); + g_string_append_printf(buf, "%-2u ", i); } } - monitor_printf(mon, "\n"); + g_string_append_c(buf, '\n'); } -static void ioapic_print_redtbl(Monitor *mon, IOAPICCommonState *s) +static void ioapic_print_redtbl(GString *buf, IOAPICCommonState *s) { static const char *delm_str[] = { "fixed", "lowest", "SMI", "...", "NMI", "INIT", "...", "extINT"}; uint32_t remote_irr = 0; int i; - monitor_printf(mon, "ioapic0: ver=0x%x id=0x%02x sel=0x%02x", - s->version, s->id, s->ioregsel); + g_string_append_printf(buf, "ioapic0: ver=0x%x id=0x%02x sel=0x%02x", + s->version, s->id, s->ioregsel); if (s->ioregsel) { - monitor_printf(mon, " (redir[%u])\n", - (s->ioregsel - IOAPIC_REG_REDTBL_BASE) >> 1); + g_string_append_printf(buf, " (redir[%u])\n", + (s->ioregsel - IOAPIC_REG_REDTBL_BASE) >> 1); } else { - monitor_printf(mon, "\n"); + g_string_append_c(buf, '\n'); } for (i = 0; i < IOAPIC_NUM_PINS; i++) { uint64_t entry = s->ioredtbl[i]; uint32_t delm = (uint32_t)((entry & IOAPIC_LVT_DELIV_MODE) >> IOAPIC_LVT_DELIV_MODE_SHIFT); - monitor_printf(mon, " pin %-2u 0x%016"PRIx64" dest=%"PRIx64 - " vec=%-3"PRIu64" %s %-5s %-6s %-6s %s\n", - i, entry, - (entry >> IOAPIC_LVT_DEST_SHIFT) & - (entry & IOAPIC_LVT_DEST_MODE ? 0xff : 0xf), - entry & IOAPIC_VECTOR_MASK, - entry & IOAPIC_LVT_POLARITY ? "active-lo" : "active-hi", - entry & IOAPIC_LVT_TRIGGER_MODE ? "level" : "edge", - entry & IOAPIC_LVT_MASKED ? "masked" : "", - delm_str[delm], - entry & IOAPIC_LVT_DEST_MODE ? "logical" : "physical"); + g_string_append_printf(buf, " pin %-2u 0x%016"PRIx64" dest=%"PRIx64 + " vec=%-3"PRIu64" %s %-5s %-6s %-6s %s\n", + i, entry, + (entry >> IOAPIC_LVT_DEST_SHIFT) & + (entry & IOAPIC_LVT_DEST_MODE ? 0xff : 0xf), + entry & IOAPIC_VECTOR_MASK, + entry & IOAPIC_LVT_POLARITY + ? "active-lo" : "active-hi", + entry & IOAPIC_LVT_TRIGGER_MODE + ? "level" : "edge", + entry & IOAPIC_LVT_MASKED ? "masked" : "", + delm_str[delm], + entry & IOAPIC_LVT_DEST_MODE + ? "logical" : "physical"); remote_irr |= entry & IOAPIC_LVT_TRIGGER_MODE ? (entry & IOAPIC_LVT_REMOTE_IRR ? (1 << i) : 0) : 0; } - ioapic_irr_dump(mon, " IRR", s->irr); - ioapic_irr_dump(mon, " Remote IRR", remote_irr); + ioapic_irr_dump(buf, " IRR", s->irr); + ioapic_irr_dump(buf, " Remote IRR", remote_irr); } void ioapic_reset_common(DeviceState *dev) @@ -171,13 +173,12 @@ static void ioapic_common_realize(DeviceState *dev, Error **errp) ioapic_no++; } -static void ioapic_print_info(InterruptStatsProvider *obj, - Monitor *mon) +static void ioapic_print_info(InterruptStatsProvider *obj, GString *buf) { IOAPICCommonState *s = IOAPIC_COMMON(obj); ioapic_dispatch_pre_save(s); - ioapic_print_redtbl(mon, s); + ioapic_print_redtbl(buf, s); } static const VMStateDescription vmstate_ioapic_common = { diff --git a/hw/intc/m68k_irqc.c b/hw/intc/m68k_irqc.c index 4b11fb9f72..cf3beefcfe 100644 --- a/hw/intc/m68k_irqc.c +++ b/hw/intc/m68k_irqc.c @@ -10,7 +10,6 @@ #include "qemu/osdep.h" #include "cpu.h" #include "migration/vmstate.h" -#include "monitor/monitor.h" #include "hw/qdev-properties.h" #include "hw/nmi.h" #include "hw/intc/intc.h" @@ -27,10 +26,10 @@ static bool m68k_irqc_get_statistics(InterruptStatsProvider *obj, return true; } -static void m68k_irqc_print_info(InterruptStatsProvider *obj, Monitor *mon) +static void m68k_irqc_print_info(InterruptStatsProvider *obj, GString *buf) { M68KIRQCState *s = M68K_IRQC(obj); - monitor_printf(mon, "m68k-irqc: ipr=0x%x\n", s->ipr); + g_string_append_printf(buf, "m68k-irqc: ipr=0x%x\n", s->ipr); } static void m68k_set_irq(void *opaque, int irq, int level) diff --git a/hw/intc/slavio_intctl.c b/hw/intc/slavio_intctl.c index 36b4a12f60..d6e49d29aa 100644 --- a/hw/intc/slavio_intctl.c +++ b/hw/intc/slavio_intctl.c @@ -24,7 +24,6 @@ #include "qemu/osdep.h" #include "migration/vmstate.h" -#include "monitor/monitor.h" #include "qemu/module.h" #include "hw/sysbus.h" #include "hw/intc/intc.h" @@ -401,17 +400,17 @@ static bool slavio_intctl_get_statistics(InterruptStatsProvider *obj, } #endif -static void slavio_intctl_print_info(InterruptStatsProvider *obj, Monitor *mon) +static void slavio_intctl_print_info(InterruptStatsProvider *obj, GString *buf) { SLAVIO_INTCTLState *s = SLAVIO_INTCTL(obj); int i; for (i = 0; i < MAX_CPUS; i++) { - monitor_printf(mon, "per-cpu %d: pending 0x%08x\n", i, - s->slaves[i].intreg_pending); + g_string_append_printf(buf, "per-cpu %d: pending 0x%08x\n", i, + s->slaves[i].intreg_pending); } - monitor_printf(mon, "master: pending 0x%08x, disabled 0x%08x\n", - s->intregm_pending, s->intregm_disabled); + g_string_append_printf(buf, "master: pending 0x%08x, disabled 0x%08x\n", + s->intregm_pending, s->intregm_disabled); } static void slavio_intctl_init(Object *obj) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index df74f032d7..03c595788f 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -38,8 +38,6 @@ #include "hw/loader.h" #include "hw/nmi.h" #include "qapi/visitor.h" -#include "qapi/type-helpers.h" -#include "monitor/monitor.h" #include "hw/intc/intc.h" #include "hw/ipmi/ipmi.h" #include "target/ppc/mmu-hash64.h" @@ -2331,14 +2329,11 @@ static ICPState *pnv_icp_get(XICSFabric *xi, int pir) return cpu ? ICP(pnv_cpu_state(cpu)->intc) : NULL; } -static void pnv_pic_print_info(InterruptStatsProvider *obj, - Monitor *mon) +static void pnv_pic_print_info(InterruptStatsProvider *obj, GString *buf) { PnvMachineState *pnv = PNV_MACHINE(obj); int i; CPUState *cs; - g_autoptr(GString) buf = g_string_new(""); - g_autoptr(HumanReadableText) info = NULL; CPU_FOREACH(cs) { PowerPCCPU *cpu = POWERPC_CPU(cs); @@ -2351,9 +2346,6 @@ static void pnv_pic_print_info(InterruptStatsProvider *obj, for (i = 0; i < pnv->num_chips; i++) { PNV_CHIP_GET_CLASS(pnv->chips[i])->pic_print_info(pnv->chips[i], buf); } - - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); } static int pnv_match_nvt(XiveFabric *xfb, uint8_t format, diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index a22decb643..a9908545e6 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -31,7 +31,6 @@ #include "qapi/error.h" #include "qapi/qapi-events-machine.h" #include "qapi/qapi-events-qdev.h" -#include "qapi/type-helpers.h" #include "qapi/visitor.h" #include "sysemu/sysemu.h" #include "sysemu/hostmem.h" @@ -90,8 +89,6 @@ #include "hw/ppc/spapr_nvdimm.h" #include "hw/ppc/spapr_numa.h" -#include "monitor/monitor.h" - #include /* SLOF memory layout: @@ -4527,18 +4524,13 @@ static ICPState *spapr_icp_get(XICSFabric *xi, int vcpu_id) return cpu ? spapr_cpu_state(cpu)->icp : NULL; } -static void spapr_pic_print_info(InterruptStatsProvider *obj, - Monitor *mon) +static void spapr_pic_print_info(InterruptStatsProvider *obj, GString *buf) { SpaprMachineState *spapr = SPAPR_MACHINE(obj); - g_autoptr(GString) buf = g_string_new(""); - g_autoptr(HumanReadableText) info = NULL; spapr_irq_print_info(spapr, buf); g_string_append_printf(buf, "irqchip: %s\n", kvm_irqchip_in_kernel() ? "in-kernel" : "emulated"); - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); } /* diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index ea79148ee8..fbff7fdb57 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -25,6 +25,7 @@ #include "qapi/qapi-commands-machine.h" #include "qapi/qapi-commands-misc.h" #include "qapi/qmp/qdict.h" +#include "qapi/type-helpers.h" #include "qemu/cutils.h" #include "hw/intc/intc.h" #include "qemu/log.h" @@ -92,7 +93,12 @@ static int hmp_info_pic_foreach(Object *obj, void *opaque) intc = INTERRUPT_STATS_PROVIDER(obj); k = INTERRUPT_STATS_PROVIDER_GET_CLASS(obj); if (k->print_info) { - k->print_info(intc, mon); + g_autoptr(GString) buf = g_string_new(""); + g_autoptr(HumanReadableText) info = NULL; + + k->print_info(intc, buf); + info = human_readable_text_from_str(buf); + monitor_puts(mon, info->human_readable_text); } else { monitor_printf(mon, "Interrupt controller information not available for %s.\n", object_get_typename(obj)); From patchwork Tue Jun 18 16:00:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805232 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp273987wrx; Tue, 18 Jun 2024 09:07:56 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWfAqgILiJcbDIk9AvMyqdt+fRPWQHV6T7NYJdI1q1x78mCNIYdsPQtOyeVDeY1pxOi8cL2dYfdd6l0uzgdnBBJ X-Google-Smtp-Source: AGHT+IEjLBKs3rnpFjeX1zoIXAjSf7Symnf4xgAugEembYZruTmRX3yey0Oh/Z39VBY0rETy+U1D X-Received: by 2002:a67:f7ca:0:b0:48c:3bd8:5bf2 with SMTP id ada2fe7eead31-48f02c26920mr2862347137.15.1718726876579; Tue, 18 Jun 2024 09:07:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726876; cv=none; d=google.com; s=arc-20160816; b=E6Jsk3AQ5qHO1BejlsRikqRTGBw73teyEco0wUcH9wE//e9wDi0MLnld293LdeEGje j0MiRprIkb8sBp+o/LpiWKxiRSqrtvcmZHI8W0CcvP4Jh+dr/V6EwHUbFvZmPM+9A+iH A5tu6VBI8gRCS5BN5tmf/WCKfopvNNYHyOpgGiOWcdiDvxYQpW0RcFP77Wt77NaQkoi6 ehdciibXdKXXpACl0ngy9xcD9+JlFPm86s4JxT2vk7X01g+dOXPhgPCeDseT2nwDGZSP GSE/NGRk9mYOEATmQa7A9vC6UGj+fyXxtdtkmE4Opfk7m51w3NWHZq9Ah/WyXLp7/GRX qaBQ== 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:cc:to :from:dkim-signature; bh=hythfOpvKdnQtXG8QgrEpQziqfs8Kk/FNjGJNS+WjGI=; fh=iBCV4w7YK1vyHYfwyxOoXBCd3sIBF9+yH+94qSO9meY=; b=cjDhdDYQ3nZV92a82AzpW0uYjWaBeiaWIC4wxIA4oyKtT2mlEO2qTn545bFzJ2Ly6d UryNfPTi61SR0AvjIZTFkaferXDzEw1vVt4Itjn9ujdrfB4c4EyKf5TDjL4jIYkGtQsV pOt/tzSLT9GVxlhK1gsn1hhUw/cLgpOn2+X55eCFRtpw9UgceYqQRlvL/7uQUqGo3FyD zcg5lS85/yDQujO5lCBRObdheaZUXIUusxOnvbBxHrY6LnND1BNoGbREkfTzr6sh99p3 SijFq5i6I6dDBdq757BI6HsjU34yhZAKmfGrPRAoLmgrYs2t8Gywsyxn0ei/8oW+stPf 2TgQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BNjXYHEr; 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 ada2fe7eead31-48da449b04asi2211901137.446.2024.06.18.09.07.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:07:56 -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=BNjXYHEr; 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 1sJbLC-0006OZ-3k; Tue, 18 Jun 2024 12:05: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 1sJbLA-0006OF-NW for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:05:48 -0400 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbL8-0007jD-Gq for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:05:48 -0400 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-57d05e0017aso264987a12.1 for ; Tue, 18 Jun 2024 09:05:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726744; x=1719331544; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hythfOpvKdnQtXG8QgrEpQziqfs8Kk/FNjGJNS+WjGI=; b=BNjXYHErjlqlm3ifAFGeoB3OFnJD5OvpgzqL6CSiKutObcmT5dKCjgjfQMBsegAM4L awI4NYnTlgrgbHNOW5oTOxojpQ1By29C8l4DzRp0ic7LnEMEUFSV05MLl00u3PrUxm7b YE9YZiwl2N4Oj2UvZ8jsyx2qq/NIZT/y7J874013oTMsNhcZ9dcRuSSvBp2TOZHziNPZ tvbnNxvgF5QW8+VK7gM8KndHHlxoNfxFAePODbBSfTO7ryGbSocXX/wAR1psHNc42fu+ g5uoGRYDclaQIAxPKjRR8PwVAamkKEqd1qnf/JuFol+ajJFCSsR0U6FeQnVO5ZMLTTUv F3UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726744; x=1719331544; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hythfOpvKdnQtXG8QgrEpQziqfs8Kk/FNjGJNS+WjGI=; b=Zb5BDUHq07TEy5weRxIY7Q/RviJcvETKqRHUnil6X8I1TbQ5KAAAwq+d+POSoIsBR1 M+MU/QjkpPu1h/3Jq/rqwLL+zpfySv36RqASxysBlTxwH5+xArc7R6pRxdandobhf0R7 mxmHJ+GbMQnTks0/QUQWh7sU+lcNOiSH5aCBG7aD3/SA28NH3m0Axub1/UnD+pqRhTGt o0Jcb9XVeV89ufVGVcjEnJXcx95C1kdUwH73BBs2DBtha7IeAsfHcyCHJYJxwAKQBMao XqkuJu/Ex+NpYTRz16MGlhoVNyzwfpTNA/CrI/TcBxSJ6lyjG5xeB/GIckhVK7YWLKPP a6qA== X-Gm-Message-State: AOJu0YzS2OACu2wQ97OfnI6aoVN1D2Q7ZzMx5q1Xr63WUFqjKCyZTgJb TUiLCz9vmGe4PKqcD308eMcqaA8boW6yApzxZUQRy8kkn7+BR5AQeR2XU2Voz+/pwf7nOTH9zsQ P X-Received: by 2002:a50:a402:0:b0:57c:d4e9:4a03 with SMTP id 4fb4d7f45d1cf-57cd4e94b6emr3841204a12.41.1718726744386; Tue, 18 Jun 2024 09:05:44 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36075104a26sm14440062f8f.97.2024.06.18.09.05.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:05:44 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?D?= =?utf-8?q?aniel_P_=2E_Berrang=C3=A9?= Subject: [PULL 52/76] hw/intc: Introduce x-query-interrupt-controllers QMP command Date: Tue, 18 Jun 2024 18:00:14 +0200 Message-ID: <20240618160039.36108-53-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=philmd@linaro.org; helo=mail-ed1-x530.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 This is a counterpart to the HMP "info pic" command. It is being added with an "x-" prefix because this QMP command is intended as an adhoc debugging tool and will thus not be modelled in QAPI as fully structured data, nor will it have long term guaranteed stability. The existing HMP command is rewritten to call the QMP command. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Message-Id: <20240610063518.50680-3-philmd@linaro.org> --- qapi/machine.json | 17 +++++++++++++++++ hw/core/machine-qmp-cmds.c | 29 +++++++++++++++++++++++++++++ monitor/hmp-cmds.c | 33 --------------------------------- hmp-commands-info.hx | 2 +- 4 files changed, 47 insertions(+), 34 deletions(-) diff --git a/qapi/machine.json b/qapi/machine.json index 453feb9347..2fd3e9c3d5 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -1864,3 +1864,20 @@ { 'command': 'dumpdtb', 'data': { 'filename': 'str' }, 'if': 'CONFIG_FDT' } + +## +# @x-query-interrupt-controllers: +# +# Query information on interrupt controller devices +# +# Features: +# +# @unstable: This command is meant for debugging. +# +# Returns: Interrupt controller devices information +# +# Since: 9.1 +## +{ 'command': 'x-query-interrupt-controllers', + 'returns': 'HumanReadableText', + 'features': [ 'unstable' ]} diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c index 5972100b1f..130217da8f 100644 --- a/hw/core/machine-qmp-cmds.c +++ b/hw/core/machine-qmp-cmds.c @@ -361,6 +361,35 @@ HumanReadableText *qmp_x_query_irq(Error **errp) return human_readable_text_from_str(buf); } +static int qmp_x_query_intc_foreach(Object *obj, void *opaque) +{ + InterruptStatsProvider *intc; + InterruptStatsProviderClass *k; + GString *buf = opaque; + + if (object_dynamic_cast(obj, TYPE_INTERRUPT_STATS_PROVIDER)) { + intc = INTERRUPT_STATS_PROVIDER(obj); + k = INTERRUPT_STATS_PROVIDER_GET_CLASS(obj); + if (k->print_info) { + k->print_info(intc, buf); + } else { + g_string_append_printf(buf, + "Interrupt controller information not available for %s.\n", + object_get_typename(obj)); + } + } + + return 0; +} + +HumanReadableText *qmp_x_query_interrupt_controllers(Error **errp) +{ + g_autoptr(GString) buf = g_string_new(""); + object_child_foreach_recursive(object_get_root(), + qmp_x_query_intc_foreach, buf); + return human_readable_text_from_str(buf); +} + GuidInfo *qmp_query_vm_generation_id(Error **errp) { GuidInfo *info; diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index fbff7fdb57..45ee3a9e1f 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -25,9 +25,7 @@ #include "qapi/qapi-commands-machine.h" #include "qapi/qapi-commands-misc.h" #include "qapi/qmp/qdict.h" -#include "qapi/type-helpers.h" #include "qemu/cutils.h" -#include "hw/intc/intc.h" #include "qemu/log.h" #include "sysemu/sysemu.h" @@ -83,37 +81,6 @@ void hmp_info_version(Monitor *mon, const QDict *qdict) qapi_free_VersionInfo(info); } -static int hmp_info_pic_foreach(Object *obj, void *opaque) -{ - InterruptStatsProvider *intc; - InterruptStatsProviderClass *k; - Monitor *mon = opaque; - - if (object_dynamic_cast(obj, TYPE_INTERRUPT_STATS_PROVIDER)) { - intc = INTERRUPT_STATS_PROVIDER(obj); - k = INTERRUPT_STATS_PROVIDER_GET_CLASS(obj); - if (k->print_info) { - g_autoptr(GString) buf = g_string_new(""); - g_autoptr(HumanReadableText) info = NULL; - - k->print_info(intc, buf); - info = human_readable_text_from_str(buf); - monitor_puts(mon, info->human_readable_text); - } else { - monitor_printf(mon, "Interrupt controller information not available for %s.\n", - object_get_typename(obj)); - } - } - - return 0; -} - -void hmp_info_pic(Monitor *mon, const QDict *qdict) -{ - object_child_foreach_recursive(object_get_root(), - hmp_info_pic_foreach, mon); -} - void hmp_quit(Monitor *mon, const QDict *qdict) { monitor_suspend(mon); diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index 20a9835ea8..cfd4ad5651 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -174,7 +174,7 @@ ERST .args_type = "", .params = "", .help = "show PIC state", - .cmd = hmp_info_pic, + .cmd_info_hrt = qmp_x_query_interrupt_controllers, }, SRST From patchwork Tue Jun 18 16:00:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805282 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp276570wrx; Tue, 18 Jun 2024 09:12:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW5CBkJpDEIRxF7mcRW9BN0mwV1p0xzATWxcQmeFVsfFnUF4NAhvDMReJeSbSDOxFkEtHrMRjK7BxoRO4RmSngM X-Google-Smtp-Source: AGHT+IF7oVYAW4vbZQAt0wQuQi37aitHGMIzI74KdhEIhfe6pQ3Rf+XmxzkrDzveOWOFrZaX1X79 X-Received: by 2002:a0c:f587:0:b0:6b2:9f24:605c with SMTP id 6a1803df08f44-6b501e289f7mr2197176d6.24.1718727145048; Tue, 18 Jun 2024 09:12:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727145; cv=none; d=google.com; s=arc-20160816; b=H6j2zmIFr1/FkoBNXaF2J0gM0PRkpZj867cyMCb/5w4IXWZLyHW4OlcOdDo9rEyOOL bWb5qNk/xLrxZHbEMZuYmbBxOfHLkDmlr0r3g3r8bK2TZ4CV7ZXqdmc7TJbAvq0g9Bx6 UllG+JNfBtP4KuS42LxGcE7G0hrnLLrnHqycY3s61UfzGkk9rQuYsf1LRmX2hOMKOhun zLiGYpGjk7q1X8lXZq6DSMj60CTJICK0AsSTHp2WW/5flIm/mgabBS7luk7K7CCn0+3y AwBAujf9uHDm6WZyP15Arqa+AEpRpdXGReFmgEnac8KWnlBeUoDJ8HqgA20HYsnU5hvZ +uxA== 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:cc:to :from:dkim-signature; bh=KzZq3iGA+Ys+b27eQPwLx5mcriu5b6pZoRIjvgOYd8M=; fh=v9GsDU5a361u0ETIB4Ja/BMhdxpva4C3MabdrQ1wtbA=; b=hvjQCqdfTkwNjtduKgFHcL3QhBPAfvbHMrGVX1BxYsKKGFoSE3TjeqWWytIkhdz3MW 6BICMMomT9dr5vjByF5HCLyelssGfzq1g6CIED1haCPfvK9svdcIzNfe85Bv/AQMJpUo eOE8Zvi4qlX2vGiapwF3AzdeDYIchjwCkd1VIOGZYg9MaiVkrHUtaEpu0ngrL0LAACCa Y5g2XZxrUT2ZiiwT2uLdaVhOF+jRNpVRrViIWg2zxrPjpIkuJu3JXde4j+tq4FhhinD9 AZcXwzA6UobCxf/22so2FD0q5QhkTakzqagtZ8hu20TkMFj+ng0c16K0aSjm+eMIut4m FVCQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="e8h/2Afy"; 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 d75a77b69052e-441f2ea898csi123763951cf.284.2024.06.18.09.12.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:12:25 -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="e8h/2Afy"; 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 1sJbLN-0006PY-Rr; Tue, 18 Jun 2024 12:06:01 -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 1sJbLF-0006PE-Hp for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:05:53 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbLD-0007jV-LF for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:05:53 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-362f62ae4c5so120809f8f.1 for ; Tue, 18 Jun 2024 09:05:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726750; x=1719331550; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KzZq3iGA+Ys+b27eQPwLx5mcriu5b6pZoRIjvgOYd8M=; b=e8h/2AfyKnK3l7aVl4AN8Rzky0GrIIOYTQqJq0d3WaKkQTDGV43dJOgQhTREfKVjy9 Ypn1IEjrTS6DuacOnjbrOISQAyNPR8/1RlQWQoW9/mzKpP4uDPJGpjqltOdpcWdND47J 06aeaBJ86FopD+JqCMB5ws8taqWhG8q0ZhPjjcbTr1MHRRkdMcLVotzD5pxtGzXmy/8i 7USeyp0qwOQar+JfaaosRgoO+rn05OtBwoqW4iDvQmlQf7hbGdDMyuhwJT1SyBX/qNet Lwm44tRYLBUeK7FgmeAqoNaqbwaBmnbExIOf/fqhCcbc5Mo3X5nsVpxG0LBoBW8+X17/ jN2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726750; x=1719331550; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KzZq3iGA+Ys+b27eQPwLx5mcriu5b6pZoRIjvgOYd8M=; b=ICS7q8s6PeuNlhGdMI/xlCttFN80RdJ4iJRodEBRJlnnHEEhe7G8kPUuyALbiGJfA2 OeSD1FaeuZKIDPKdeYsCeU4ezlbl4iWXl1zOHz+GIPc7H/AVGghy+nHtoKpC+JxUIeE+ Zgc2iEp/cwnYjt6BkN5/d/ckyZYIowIFC79NgWSseJ52c/9yNZqdMulHDmWUghGCaemF M/Qyj7xVHtex89AOhPZeL6mOo7yjrHMuylvQ2VQRjIzo38G46v2WaO+xqIwzPC0wiVy1 2w4TaUhgTAIi00RB9L02hlx3FIgXizhlpx5RC94q4ob76p1phZXcqma+xY/+DiembdX2 gEOA== X-Gm-Message-State: AOJu0YzlOJqA5sfKiuI6N8JxEXqf1YanNyIs2oWSTJyf5VFb6QtNDPyu gLWXgnOjSCHpTCBb2GBUooj+3CxdjzTXOx4umg/9Q0BSlDmxKbssyXTLbhKP8nQbfB1jFH1V6ub B X-Received: by 2002:a5d:4052:0:b0:362:8138:f45e with SMTP id ffacd0b85a97d-362ffb429d4mr362808f8f.17.1718726749759; Tue, 18 Jun 2024 09:05:49 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36075093a3fsm14582256f8f.1.2024.06.18.09.05.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:05:49 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?C=C3=A9dric_Le_Goater?= , Nicholas Piggin , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 53/76] ppc/pnv: Introduce pnv_chip_foreach_cpu() Date: Tue, 18 Jun 2024 18:00:15 +0200 Message-ID: <20240618160039.36108-54-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.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 From: Cédric Le Goater This helper routine uses the machine definition, sockets, cores and threads, to loop on all CPUs of the machine. Replace CPU_FOREACH() with it. Signed-off-by: Cédric Le Goater Reviewed-by: Nicholas Piggin Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240424093048.180966-1-clg@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/pnv.c | 50 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 13 deletions(-) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 03c595788f..6b41d1d2dd 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -2261,6 +2261,21 @@ PowerPCCPU *pnv_chip_find_cpu(PnvChip *chip, uint32_t pir) return NULL; } +static void pnv_chip_foreach_cpu(PnvChip *chip, + void (*fn)(PnvChip *chip, PowerPCCPU *cpu, void *opaque), + void *opaque) +{ + int i, j; + + for (i = 0; i < chip->nr_cores; i++) { + PnvCore *pc = chip->cores[i]; + + for (j = 0; j < CPU_CORE(pc)->nr_threads; j++) { + fn(chip, pc->threads[j], opaque); + } + } +} + static ICSState *pnv_ics_get(XICSFabric *xi, int irq) { PnvMachineState *pnv = PNV_MACHINE(xi); @@ -2329,22 +2344,25 @@ static ICPState *pnv_icp_get(XICSFabric *xi, int pir) return cpu ? ICP(pnv_cpu_state(cpu)->intc) : NULL; } +static void pnv_pic_intc_print_info(PnvChip *chip, PowerPCCPU *cpu, + void *opaque) +{ + PNV_CHIP_GET_CLASS(chip)->intc_print_info(chip, cpu, opaque); +} + static void pnv_pic_print_info(InterruptStatsProvider *obj, GString *buf) { PnvMachineState *pnv = PNV_MACHINE(obj); int i; - CPUState *cs; - - CPU_FOREACH(cs) { - PowerPCCPU *cpu = POWERPC_CPU(cs); - - /* XXX: loop on each chip/core/thread instead of CPU_FOREACH() */ - PNV_CHIP_GET_CLASS(pnv->chips[0])->intc_print_info(pnv->chips[0], cpu, - buf); - } for (i = 0; i < pnv->num_chips; i++) { - PNV_CHIP_GET_CLASS(pnv->chips[i])->pic_print_info(pnv->chips[i], buf); + PnvChip *chip = pnv->chips[i]; + + /* First CPU presenters */ + pnv_chip_foreach_cpu(chip, pnv_pic_intc_print_info, buf); + + /* Then other devices, PHB, PSI, XIVE */ + PNV_CHIP_GET_CLASS(chip)->pic_print_info(chip, buf); } } @@ -2545,12 +2563,18 @@ static void pnv_cpu_do_nmi_on_cpu(CPUState *cs, run_on_cpu_data arg) } } +static void pnv_cpu_do_nmi(PnvChip *chip, PowerPCCPU *cpu, void *opaque) +{ + async_run_on_cpu(CPU(cpu), pnv_cpu_do_nmi_on_cpu, RUN_ON_CPU_NULL); +} + static void pnv_nmi(NMIState *n, int cpu_index, Error **errp) { - CPUState *cs; + PnvMachineState *pnv = PNV_MACHINE(qdev_get_machine()); + int i; - CPU_FOREACH(cs) { - async_run_on_cpu(cs, pnv_cpu_do_nmi_on_cpu, RUN_ON_CPU_NULL); + for (i = 0; i < pnv->num_chips; i++) { + pnv_chip_foreach_cpu(pnv->chips[i], pnv_cpu_do_nmi, NULL); } } From patchwork Tue Jun 18 16:00:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805235 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp274032wrx; Tue, 18 Jun 2024 09:08:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWhHDSNXUD/jS0PORSleyzg3X4jxkni2GNsxKwf83oQ5HdTi3QRJcecwnXuLrCLQ22M94DseAv5depEy/qbk6rZ X-Google-Smtp-Source: AGHT+IEvf2ut1YkyCRaCrw7VcUpjXAVwfz9nv0XNr7FBzCvtpF1z3Wn8H0/ytWkrwPaWOn0OeMwH X-Received: by 2002:a05:6358:6156:b0:1a1:fe25:f1f3 with SMTP id e5c5f4694b2df-1a1fe25f50dmr7847955d.0.1718726880534; Tue, 18 Jun 2024 09:08:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726880; cv=none; d=google.com; s=arc-20160816; b=R/FPfkGZnY4j0KGw0do7Rj0ybutX/60B5C9k4a4e738oHLM++jm0Db5j+F3eeGY0CP da2AQNHTHEmp7ds8S3GFNHOQ0nNlsGZonMROKiRovSv8qVxXK3TyOEj0jrbTuJTN6Tuk ex8CkAS3QQg6z7wBmb60Dh2MiZFvCmzPzdcxkZiO+FkTEbaMKddGpHIOr9xr6wR/aiHn h4LfybefBFfzD75Bs/OsSYi9QON8ksxLDTvterLbvyGV2HldNFnjv7v06DGW6ypbDj60 7i0EfL6Hvq3yhkAcLIXtDBSB1Smds9gE+EhgYiUN2+jToJlaVkUsaficN5vOUkrzzeqc shcw== 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:cc:to :from:dkim-signature; bh=0/64oD6YGuylDgLtXH7Lbj+6VvSz1oEhiWnSPMdAPVU=; fh=MVtmONGgcwaswePOsQaFbzD/JigNLxHXgB5l4X9593E=; b=mx5JFI99x6KlmZJ3ktHZk8Ql/q3ir9xqxHFv4NhwPFJkiXZgo+W36ucEO1Jio4SOWw FebzTaSkte0og1/v1Zu+opf9m47Mi6IHtCC0ZU7sRn7z/wJBdFx/Lfsqfjw51HSvint+ 3TJksDaZstwN5u+4r7SJu7fdimeGdRuGdu1/PpRZc4qRlZZ+bXP3pdtH8+m19jYsxFXF pofePB2e2oLG76BX3t5jzn9XcAxPmRFRLKLbfyXu2TugKf78y1qDJp/mBVTCFjYOSUmp BOuojz50eS1keXEhDN8Kf4xcMlmNqypV7WH9bH4GUqf70beJQvG0ZvAGK+Uqq7z1+4tU 5/ZQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HhHcU31j; 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 71dfb90a1353d-4ed3f7d1779si1836901e0c.109.2024.06.18.09.08.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:08:00 -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=HhHcU31j; 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 1sJbLb-0006gM-4r; Tue, 18 Jun 2024 12:06:15 -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 1sJbLX-0006be-EU for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:11 -0400 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbLK-0007jj-VN for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:00 -0400 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-52c7f7fdd24so6967927e87.1 for ; Tue, 18 Jun 2024 09:05:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726756; x=1719331556; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0/64oD6YGuylDgLtXH7Lbj+6VvSz1oEhiWnSPMdAPVU=; b=HhHcU31jtoze88KvXQobPGm56ZERIATDlciQoSUeAwxAir2KY4W3DM6ySO9zLrM8FG xQ7gCaJnV5gN2lk8p6D1rUbF41Js3YHFYcHOGpukqQdEZT2mpRIB6WtIXYVwgx9YKtiC 2g5AMIKXA6SD8SxpzNstvtGbAfoEJdO+uWkyn3ka5SLZZoew0KwsCkGRdJsqekVlbsT7 ArDNbrx0Ary7pbz6QNnhTDbYR8R15mi4XZJuw90d9v5wQeXn/HdhPqSf0UDTKB1ghlC9 quk9fbOFWqB766DA2QsQOvdLUySxRYdWcojv4aeouK5an0N6VqJHnJVUiN43bRskNi9g H/rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726756; x=1719331556; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0/64oD6YGuylDgLtXH7Lbj+6VvSz1oEhiWnSPMdAPVU=; b=GjxAWsCWkOf8tmgEcrAdAYUABU2SyolbzZVqtSUmY2jAhHXhQF3NQUG08tQ34JOKzi fG3mba8p6dIBSF/Fyh4tFwBdNqbfscX1Vqv7ndYS38NGye8omP7D3v2Xm9WO0767dNBx 0GDRgfT+HwL0YwCD0Lu3O+eIFxDD9JQklx/qnm12OXi8+fB4N3jXZPO9kIo4d3dWnceC zz9oW823nQ9EW2fBGtQHnGR5UnsjmSJ1E0FANqCeBHdmzhA9xkx3OEYdqb7t8zvIXNnW wZneN+noyEz09O97UArPaMjBHR1aNadKEMFSvBCKHKOeIm1pH3md9R6dvjdKLfxUd4l2 vdew== X-Gm-Message-State: AOJu0Yzxh6pCFIMiITvbwCHBlXw95XMTW0c8xdMb1QgdTrU2Qg6tCC9r nlm+wNfIEseE7un+XNjhKFiTm4vxGeEuFc2O2jjoAdugjFrkACnrr58Wa/I8oN0YTa0AFGDEYKX O X-Received: by 2002:a05:6512:1152:b0:52c:8ddd:7beb with SMTP id 2adb3069b0e04-52ccaa5879amr57074e87.6.1718726756569; Tue, 18 Jun 2024 09:05:56 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4246b67f0aesm60973935e9.45.2024.06.18.09.05.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:05:54 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Richard Henderson Subject: [PULL 54/76] target/arm: Set arm_v7m_tcg_ops cpu_exec_halt to arm_cpu_exec_halt() Date: Tue, 18 Jun 2024 18:00:16 +0200 Message-ID: <20240618160039.36108-55-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::135; envelope-from=philmd@linaro.org; helo=mail-lf1-x135.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 From: Peter Maydell In commit a96edb687e76 we set the cpu_exec_halt field of the TCGCPUOps arm_tcg_ops to arm_cpu_exec_halt(), but we left the arm_v7m_tcg_ops struct unchanged. That isn't wrong, because for M-profile FEAT_WFxT doesn't exist and the default handling for "no cpu_exec_halt method" is correct, but it's perhaps a little confusing. We would also like to make setting the cpu_exec_halt method mandatory. Initialize arm_v7m_tcg_ops cpu_exec_halt to the same function we use for A-profile. (On M-profile we never set up the wfxt timer so there is no change in behaviour here.) Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240603160933.1141717-2-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- target/arm/internals.h | 3 +++ target/arm/cpu.c | 2 +- target/arm/tcg/cpu-v7m.c | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/target/arm/internals.h b/target/arm/internals.h index 11b5da2562..e45ccd983e 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -364,6 +364,9 @@ void arm_restore_state_to_opc(CPUState *cs, #ifdef CONFIG_TCG void arm_cpu_synchronize_from_tb(CPUState *cs, const TranslationBlock *tb); + +/* Our implementation of TCGCPUOps::cpu_exec_halt */ +bool arm_cpu_exec_halt(CPUState *cs); #endif /* CONFIG_TCG */ typedef enum ARMFPRounding { diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 35fa281f1b..948e904bd8 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1133,7 +1133,7 @@ static bool arm_cpu_virtio_is_big_endian(CPUState *cs) } #ifdef CONFIG_TCG -static bool arm_cpu_exec_halt(CPUState *cs) +bool arm_cpu_exec_halt(CPUState *cs) { bool leave_halt = cpu_has_work(cs); diff --git a/target/arm/tcg/cpu-v7m.c b/target/arm/tcg/cpu-v7m.c index c059c681e9..5496f14dc1 100644 --- a/target/arm/tcg/cpu-v7m.c +++ b/target/arm/tcg/cpu-v7m.c @@ -244,6 +244,7 @@ static const TCGCPUOps arm_v7m_tcg_ops = { #else .tlb_fill = arm_cpu_tlb_fill, .cpu_exec_interrupt = arm_v7m_cpu_exec_interrupt, + .cpu_exec_halt = arm_cpu_exec_halt, .do_interrupt = arm_v7m_cpu_do_interrupt, .do_transaction_failed = arm_cpu_do_transaction_failed, .do_unaligned_access = arm_cpu_do_unaligned_access, From patchwork Tue Jun 18 16:00:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805274 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp276256wrx; Tue, 18 Jun 2024 09:11:52 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUj09EWPLjfmmx8wFHKNjR9/tOv91o5sNEWOnbQxSor65aU5paHjxW8fqrjOdXLcgMbn3Icr0FBle97i0DEfNhb X-Google-Smtp-Source: AGHT+IHhupE808ibjMC8gGj8WiTCXCv75cQQ877w2b5/SbMOxpZSCDGYILSHK3a6cXBZpmK8r1WJ X-Received: by 2002:a05:6214:1627:b0:6b0:89ac:ad3a with SMTP id 6a1803df08f44-6b501ec5ab6mr1399476d6.59.1718727112521; Tue, 18 Jun 2024 09:11:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727112; cv=none; d=google.com; s=arc-20160816; b=BRsnRnlTSopN+AFqF6smaZCqL4aYY4ojqORll0HY6sGjsAiDmNWK4ZbGHHU/fLGf3F BChAPK8JycUFTuwEBAbdlDFPKty5PO0zpmbkgpyAMCJIK+G1wY+VQ6ar0fT1b5WLplVa 4421FuZDj4coM6erL7eqJnVQDvJ3aSrom09+oRr4DtWDkqAsqu0ZsRYtGCqvqSM7c+jA XwqiNG6Uqx7a87CCIGSatDJ7XVY9niNQE5pyOgtXKjDsCG9XyYe96CI3FHOzccElW9Gn S5coBMY2vZ0GYR0X1Yn+Zuj2B5glbotox3cHhMMsiCvq9RfOft9q/r7GmbyudMVuzkNz HTlA== 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:cc:to :from:dkim-signature; bh=bfUqxR+YdQnuO0BjXJLFGV/JOzU+pFYUWIcFFlx9+/c=; fh=MVtmONGgcwaswePOsQaFbzD/JigNLxHXgB5l4X9593E=; b=rr4YLrp2PvRcKee2egfaubhCUyPaC0ijuOS4GSi0nIFuU53MMWyyjKc0eA7k7GZEQg Q5Lc4AfDewH/X18x7fgxwSDdpbaAcZGSU+O4fq+SMrLAH96WdL0vH8qTzl4OuFpwXrx4 zsPbPTGJ4Rce4SJWZ7uxsgMPJwNNPn6J3E+2iG5vt57H7bDER969KbPfi3Za016eoSUF zuvnGy1Q0K6B4pokJ3+O0hjASMNFwzxCA4be5l125ZOh7ALEuv7r/qbgw9MsVcOjXUMf CPCV7fLKeqbGPC82NFcQ7RqVkSk0HurWzU9N2rfI+aYP9wvVgwEANUIO3792HJnyPJCg BcDw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iJb5s+Qx; 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 6a1803df08f44-6b2a5a16056si126986106d6.98.2024.06.18.09.11.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:11:52 -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=iJb5s+Qx; 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 1sJbLd-0006ul-P6; Tue, 18 Jun 2024 12:06:17 -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 1sJbLa-0006dg-6M for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:14 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbLT-0007jt-6m for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:13 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a6f13dddf7eso685223666b.0 for ; Tue, 18 Jun 2024 09:06:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726762; x=1719331562; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bfUqxR+YdQnuO0BjXJLFGV/JOzU+pFYUWIcFFlx9+/c=; b=iJb5s+QxUeDA2DwWjA4Ck4CC8JRS2s6ej5sKpc4tsxa5Os8hm0fnJShkTVa6BGp/Mx xtSQmxKOXfCzP5X1M/Y2c8pmwseveIxFwg6DYeIbPyFac2Ytgka32oRK0ZG0fMZxnorf zH8DE488ph9rq+zazJv7TlDqlftleJqpAxjhCw009QOpUH+UPNPgVegVBd4D5ktkGsUJ WFuBn+ahvMVeRx1PcnKuBBgofuLn+er67ZE9PpdjlbFApNN3SS849FRN/haxUX9e1yax eVmy6EzFd/cIZ84DJJB3I6KAboRmUYdvoqwXFOtZRqqOtcZuPbt7knzMlfPJR0NhRRxx HG8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726762; x=1719331562; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bfUqxR+YdQnuO0BjXJLFGV/JOzU+pFYUWIcFFlx9+/c=; b=MiG+qso4bd3wXprWNiJmQPu08CrOSHAB9anj79EcAcAo+Oy8y5hROxKzd08wfspFV7 wkswsMmV1OQVp85o/WG2bZD2FDX4oxEE6AQ9UCfhVB22BGwV4QmMEyN3ne16dDWYQ1Nb QNW//cuKgDMdlgwDO05sbdsxVZDxYrNbymS1MZ/luTjOV3mPB5etHBukt70o9OxZI2ED H1P2hUpdLrk+5zz7RZWqmpDKGk4R5gsCSqZPqikU5g9eKQSIywHGuw5XGvmxaeoO8pcL 5dRMmzWAeE6L+yKn0ERAzV/j/xpB/VN2OI7O7VP8ST5hOrTzpMVM3uWdLAcdAypwxBPP SPNQ== X-Gm-Message-State: AOJu0YzkvnRnEdCj4EuqcYZpa962DmZ93Kh0zZ4kPtgBuGCm8nSqsrK9 Ac67i59anW7GxsxmFv7fAZEqXUpJaWk6Ii+x84BRomWKCawTdAndqEGmoq2AvpZvpgOxtcNXUKO A X-Received: by 2002:a17:906:5919:b0:a6f:1378:1329 with SMTP id a640c23a62f3a-a6f60cf1dc0mr934319466b.4.1718726762119; Tue, 18 Jun 2024 09:06:02 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-362c19d798bsm650072f8f.40.2024.06.18.09.06.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:06:01 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Richard Henderson Subject: [PULL 55/76] target: Set TCGCPUOps::cpu_exec_halt to target's has_work implementation Date: Tue, 18 Jun 2024 18:00:17 +0200 Message-ID: <20240618160039.36108-56-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=philmd@linaro.org; helo=mail-ej1-x62e.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 From: Peter Maydell Currently the TCGCPUOps::cpu_exec_halt method is optional, and if it is not set then the default is to call the CPUClass::has_work method (which has an identical function signature). We would like to make the cpu_exec_halt method mandatory so we can remove the runtime check and fallback handling. In preparation for that, make all the targets which don't need special handling in their cpu_exec_halt set it to their cpu_has_work implementation instead of leaving it unset. (This is every target except for arm and i386.) In the riscv case this requires us to make the function not be local to the source file it's defined in. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240603160933.1141717-3-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- target/riscv/internals.h | 3 +++ target/alpha/cpu.c | 1 + target/avr/cpu.c | 1 + target/cris/cpu.c | 2 ++ target/hppa/cpu.c | 1 + target/loongarch/cpu.c | 1 + target/m68k/cpu.c | 1 + target/microblaze/cpu.c | 1 + target/mips/cpu.c | 1 + target/openrisc/cpu.c | 1 + target/ppc/cpu_init.c | 2 ++ target/riscv/cpu.c | 2 +- target/riscv/tcg/tcg-cpu.c | 2 ++ target/rx/cpu.c | 1 + target/s390x/cpu.c | 1 + target/sh4/cpu.c | 1 + target/sparc/cpu.c | 1 + target/xtensa/cpu.c | 1 + 18 files changed, 23 insertions(+), 1 deletion(-) diff --git a/target/riscv/internals.h b/target/riscv/internals.h index 8239ae83cc..0ac17bc5ad 100644 --- a/target/riscv/internals.h +++ b/target/riscv/internals.h @@ -136,4 +136,7 @@ static inline float16 check_nanbox_h(CPURISCVState *env, uint64_t f) } } +/* Our implementation of CPUClass::has_work */ +bool riscv_cpu_has_work(CPUState *cs); + #endif diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 0e2fbcb397..9db1dffc03 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -219,6 +219,7 @@ static const TCGCPUOps alpha_tcg_ops = { #else .tlb_fill = alpha_cpu_tlb_fill, .cpu_exec_interrupt = alpha_cpu_exec_interrupt, + .cpu_exec_halt = alpha_cpu_has_work, .do_interrupt = alpha_cpu_do_interrupt, .do_transaction_failed = alpha_cpu_do_transaction_failed, .do_unaligned_access = alpha_cpu_do_unaligned_access, diff --git a/target/avr/cpu.c b/target/avr/cpu.c index f53e1192b1..3132842d56 100644 --- a/target/avr/cpu.c +++ b/target/avr/cpu.c @@ -210,6 +210,7 @@ static const TCGCPUOps avr_tcg_ops = { .synchronize_from_tb = avr_cpu_synchronize_from_tb, .restore_state_to_opc = avr_restore_state_to_opc, .cpu_exec_interrupt = avr_cpu_exec_interrupt, + .cpu_exec_halt = avr_cpu_has_work, .tlb_fill = avr_cpu_tlb_fill, .do_interrupt = avr_cpu_do_interrupt, }; diff --git a/target/cris/cpu.c b/target/cris/cpu.c index 535ec39c73..ff31ca7fbc 100644 --- a/target/cris/cpu.c +++ b/target/cris/cpu.c @@ -186,6 +186,7 @@ static const TCGCPUOps crisv10_tcg_ops = { #ifndef CONFIG_USER_ONLY .tlb_fill = cris_cpu_tlb_fill, .cpu_exec_interrupt = cris_cpu_exec_interrupt, + .cpu_exec_halt = cris_cpu_has_work, .do_interrupt = crisv10_cpu_do_interrupt, #endif /* !CONFIG_USER_ONLY */ }; @@ -197,6 +198,7 @@ static const TCGCPUOps crisv32_tcg_ops = { #ifndef CONFIG_USER_ONLY .tlb_fill = cris_cpu_tlb_fill, .cpu_exec_interrupt = cris_cpu_exec_interrupt, + .cpu_exec_halt = cris_cpu_has_work, .do_interrupt = cris_cpu_do_interrupt, #endif /* !CONFIG_USER_ONLY */ }; diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index f0507874ce..7cf2e2f266 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -228,6 +228,7 @@ static const TCGCPUOps hppa_tcg_ops = { #ifndef CONFIG_USER_ONLY .tlb_fill = hppa_cpu_tlb_fill, .cpu_exec_interrupt = hppa_cpu_exec_interrupt, + .cpu_exec_halt = hppa_cpu_has_work, .do_interrupt = hppa_cpu_do_interrupt, .do_unaligned_access = hppa_cpu_do_unaligned_access, .do_transaction_failed = hppa_cpu_do_transaction_failed, diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index 270f711f11..69f9ad7711 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -736,6 +736,7 @@ static const TCGCPUOps loongarch_tcg_ops = { #ifndef CONFIG_USER_ONLY .tlb_fill = loongarch_cpu_tlb_fill, .cpu_exec_interrupt = loongarch_cpu_exec_interrupt, + .cpu_exec_halt = loongarch_cpu_has_work, .do_interrupt = loongarch_cpu_do_interrupt, .do_transaction_failed = loongarch_cpu_do_transaction_failed, #endif diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index efd6bbded8..1d49f4cb23 100644 --- a/target/m68k/cpu.c +++ b/target/m68k/cpu.c @@ -536,6 +536,7 @@ static const TCGCPUOps m68k_tcg_ops = { #ifndef CONFIG_USER_ONLY .tlb_fill = m68k_cpu_tlb_fill, .cpu_exec_interrupt = m68k_cpu_exec_interrupt, + .cpu_exec_halt = m68k_cpu_has_work, .do_interrupt = m68k_cpu_do_interrupt, .do_transaction_failed = m68k_cpu_transaction_failed, #endif /* !CONFIG_USER_ONLY */ diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 41ad47d04c..135947ee80 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -413,6 +413,7 @@ static const TCGCPUOps mb_tcg_ops = { #ifndef CONFIG_USER_ONLY .tlb_fill = mb_cpu_tlb_fill, .cpu_exec_interrupt = mb_cpu_exec_interrupt, + .cpu_exec_halt = mb_cpu_has_work, .do_interrupt = mb_cpu_do_interrupt, .do_transaction_failed = mb_cpu_transaction_failed, .do_unaligned_access = mb_cpu_do_unaligned_access, diff --git a/target/mips/cpu.c b/target/mips/cpu.c index bbe01d07dd..89655b1900 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -555,6 +555,7 @@ static const TCGCPUOps mips_tcg_ops = { #if !defined(CONFIG_USER_ONLY) .tlb_fill = mips_cpu_tlb_fill, .cpu_exec_interrupt = mips_cpu_exec_interrupt, + .cpu_exec_halt = mips_cpu_has_work, .do_interrupt = mips_cpu_do_interrupt, .do_transaction_failed = mips_cpu_do_transaction_failed, .do_unaligned_access = mips_cpu_do_unaligned_access, diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c index fdaaa09fc8..6ec54ad7a6 100644 --- a/target/openrisc/cpu.c +++ b/target/openrisc/cpu.c @@ -233,6 +233,7 @@ static const TCGCPUOps openrisc_tcg_ops = { #ifndef CONFIG_USER_ONLY .tlb_fill = openrisc_cpu_tlb_fill, .cpu_exec_interrupt = openrisc_cpu_exec_interrupt, + .cpu_exec_halt = openrisc_cpu_has_work, .do_interrupt = openrisc_cpu_do_interrupt, #endif /* !CONFIG_USER_ONLY */ }; diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 01e358a4a5..cdada7987d 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -1,3 +1,4 @@ + /* * PowerPC CPU initialization for qemu. * @@ -7481,6 +7482,7 @@ static const TCGCPUOps ppc_tcg_ops = { #else .tlb_fill = ppc_cpu_tlb_fill, .cpu_exec_interrupt = ppc_cpu_exec_interrupt, + .cpu_exec_halt = ppc_cpu_has_work, .do_interrupt = ppc_cpu_do_interrupt, .cpu_exec_enter = ppc_cpu_exec_enter, .cpu_exec_exit = ppc_cpu_exec_exit, diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 69a08e8c2c..a849a0ffcb 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -903,7 +903,7 @@ static vaddr riscv_cpu_get_pc(CPUState *cs) return env->pc; } -static bool riscv_cpu_has_work(CPUState *cs) +bool riscv_cpu_has_work(CPUState *cs) { #ifndef CONFIG_USER_ONLY RISCVCPU *cpu = RISCV_CPU(cs); diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c index 683f604d9f..4fe6d2f09d 100644 --- a/target/riscv/tcg/tcg-cpu.c +++ b/target/riscv/tcg/tcg-cpu.c @@ -21,6 +21,7 @@ #include "exec/exec-all.h" #include "tcg-cpu.h" #include "cpu.h" +#include "internals.h" #include "pmu.h" #include "time_helper.h" #include "qapi/error.h" @@ -137,6 +138,7 @@ static const TCGCPUOps riscv_tcg_ops = { #ifndef CONFIG_USER_ONLY .tlb_fill = riscv_cpu_tlb_fill, .cpu_exec_interrupt = riscv_cpu_exec_interrupt, + .cpu_exec_halt = riscv_cpu_has_work, .do_interrupt = riscv_cpu_do_interrupt, .do_transaction_failed = riscv_cpu_do_transaction_failed, .do_unaligned_access = riscv_cpu_do_unaligned_access, diff --git a/target/rx/cpu.c b/target/rx/cpu.c index 8a584f0a11..36d2a6f189 100644 --- a/target/rx/cpu.c +++ b/target/rx/cpu.c @@ -192,6 +192,7 @@ static const TCGCPUOps rx_tcg_ops = { #ifndef CONFIG_USER_ONLY .cpu_exec_interrupt = rx_cpu_exec_interrupt, + .cpu_exec_halt = rx_cpu_has_work, .do_interrupt = rx_cpu_do_interrupt, #endif /* !CONFIG_USER_ONLY */ }; diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 2bbeaca36e..0fbfcd35d8 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -370,6 +370,7 @@ static const TCGCPUOps s390_tcg_ops = { #else .tlb_fill = s390_cpu_tlb_fill, .cpu_exec_interrupt = s390_cpu_exec_interrupt, + .cpu_exec_halt = s390_cpu_has_work, .do_interrupt = s390_cpu_do_interrupt, .debug_excp_handler = s390x_cpu_debug_excp_handler, .do_unaligned_access = s390x_cpu_do_unaligned_access, diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index 618aa7154e..8f07261dcf 100644 --- a/target/sh4/cpu.c +++ b/target/sh4/cpu.c @@ -254,6 +254,7 @@ static const TCGCPUOps superh_tcg_ops = { #ifndef CONFIG_USER_ONLY .tlb_fill = superh_cpu_tlb_fill, .cpu_exec_interrupt = superh_cpu_exec_interrupt, + .cpu_exec_halt = superh_cpu_has_work, .do_interrupt = superh_cpu_do_interrupt, .do_unaligned_access = superh_cpu_do_unaligned_access, .io_recompile_replay_branch = superh_io_recompile_replay_branch, diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index 9bacfb68cb..54cb269e0a 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -926,6 +926,7 @@ static const TCGCPUOps sparc_tcg_ops = { #ifndef CONFIG_USER_ONLY .tlb_fill = sparc_cpu_tlb_fill, .cpu_exec_interrupt = sparc_cpu_exec_interrupt, + .cpu_exec_halt = sparc_cpu_has_work, .do_interrupt = sparc_cpu_do_interrupt, .do_transaction_failed = sparc_cpu_do_transaction_failed, .do_unaligned_access = sparc_cpu_do_unaligned_access, diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index de907cfeb1..a08c7a0b1f 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -234,6 +234,7 @@ static const TCGCPUOps xtensa_tcg_ops = { #ifndef CONFIG_USER_ONLY .tlb_fill = xtensa_cpu_tlb_fill, .cpu_exec_interrupt = xtensa_cpu_exec_interrupt, + .cpu_exec_halt = xtensa_cpu_has_work, .do_interrupt = xtensa_cpu_do_interrupt, .do_transaction_failed = xtensa_cpu_do_transaction_failed, .do_unaligned_access = xtensa_cpu_do_unaligned_access, From patchwork Tue Jun 18 16:00:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805259 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp275569wrx; Tue, 18 Jun 2024 09:10:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXjj8atJ/IetKW9WiYzP/g06TrGixQ26FFS4Z/46NxkiK9v5tn4RrSBfT+y1M5gpDeUHOOOzOPtjN1jj6Fv2NGm X-Google-Smtp-Source: AGHT+IFFlHeX/cAa3xA/Yu9zsRZnxVqch72bmBqiD1dgKtehMmguga5BZPRrMQ3mcOIFE8NLHl7A X-Received: by 2002:a05:6808:1444:b0:3d2:1ce6:1ef5 with SMTP id 5614622812f47-3d51b9e2dacmr227484b6e.26.1718727037952; Tue, 18 Jun 2024 09:10:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727037; cv=none; d=google.com; s=arc-20160816; b=rmHfvChizi+NFZEk0Q6ZLokY/l/QeIWFL9Lue1CVP693jI5Ifxc9bF6U9UND5Wwxou jdULZIVam0wzKabL/QT4cE+tiegUP6v3EDgH3R6ofaS3AHyHbhpsIoiw/A/6CwcscULL HX2ae/+M9vubdAx9DgHI4iwlfDmViWiSkD9fv6ICDwwD43SbfCZX5yreCN02ekQNqJmE HfaIBKO3X5U7aF9T8U4GRBcEefm95HJI7Ip95hmoXE81UlOOZhc3d7DWPeouHdbgz79S vBvoBvHaHw09e1lMBjOFRThItsy7Iz2rKHA6Qlc2frCmXraKRiUVWVskbWNs8zN89Xc1 03BA== 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:cc:to :from:dkim-signature; bh=bnMf30zvDwvxbd6Rx2qugerMz4GF67L/Ogj3GpoZRCs=; fh=MVtmONGgcwaswePOsQaFbzD/JigNLxHXgB5l4X9593E=; b=eWE7SOfd5/4AmlJAnfzUmBNX1qPxlxExmDg1++4FcaLCyLxH1sOsq13f8NgiQXMPkO YwkOYzWdGZfxil3EmxfgHAIP/Z3GFSNfo7DkadBywl2QIo8BfK8KdMGZk4RdkYsmscQr Y20MmJH8xtQvvF+ZoYlVhz9To6ngCBXe9IC/f/+x3yzEAZyONWWHCLODzs9XC40pBoU8 +LxOpz3bXAsGwGWz1nhfNHgnauuXhNdpfVqmrap268TWhBgHv4fKBWqQM366IOW/LYf5 KBciQdgn2yDN1kAimMJs8Wfuq7HIUulQgJ44eOn5s1mips5OO6kJEzycTrr1ek7dG28N rCkg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="M/4m5+4l"; 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 a1e0cc1a2514c-80d78971ed4si1748635241.123.2024.06.18.09.10.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:10:37 -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="M/4m5+4l"; 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 1sJbLc-0006j5-8M; Tue, 18 Jun 2024 12:06:16 -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 1sJbLZ-0006dL-9P for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:13 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbLX-0007k2-7n for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:12 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4218008c613so42804085e9.2 for ; Tue, 18 Jun 2024 09:06:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726767; x=1719331567; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bnMf30zvDwvxbd6Rx2qugerMz4GF67L/Ogj3GpoZRCs=; b=M/4m5+4lCsT9kwLPYf4cRncvvu4lwXQSlSXq4I5OfUFz8ne2XylcilG0e00hSeMtRY Lm+ULQZEDvVUttbXAmJ5Mx0mT0tlQMt1HpspogSZQPgS817DN5sQ6q7zvEb0qNOWLnF4 nykq9tEz/LmDmq9ygOauLFjJhyWYo2pMmGQZ4d3dQQCHy8y2ESt7S84zsFd/sDeC3Ly/ t8rD9lvHoJd2O0NPuuTVIo/dIE2x6a0e6kjEN5m75OQeae9dtRC+GmjKu7R+/1tiO/MJ Gy7vSARBPba+0nWGURyeC1/OPLtqFHrPbr8R092eTCxeZiGh5+DFS9/zYJsxFSa6a6c9 8V8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726767; x=1719331567; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bnMf30zvDwvxbd6Rx2qugerMz4GF67L/Ogj3GpoZRCs=; b=u9/tviXzzoe5NesMxLvLScTgryb9QXNdsH5LXV3csm8LZjU6wucksi+IUMNtavkoza 6acaSDZzbYYnoMS/ubUBaMUZhX1lKeCM18ibanOD0X20VfGoHlVYX8i31T08d281JZkN lYIeIN3b68ZjQWydH5XknG73RLuN/9qot3w7i6PyJG2J4mVw8sATvUwPnbk2CdWg7TLn 8ILS0YpSVrStUV3eu27vtRbcIKWTDf1dYVPMqejboQt12xVkWRdUZO7gcA5pfMLjwo7m 8YVS0KfVOgw0h0iANx49dl2qtYqZWCyXmvzfZRiFhENzN6RFUxflXbyW3VhG5cQWAsu+ goTA== X-Gm-Message-State: AOJu0YwzyQDWjBVKNFhdSja+wq8A346uTHdrTGK1PvlG2WCoAnmoRfQE aSur5WwbvXZuxBl9p4TV/7BsKDlZrME3M090TVXw2vuspDuHUQTv4PYk1POnwCGSFj3/ROBvpJD 4 X-Received: by 2002:a05:600c:3b05:b0:421:565b:e71a with SMTP id 5b1f17b1804b1-4230482278emr88215265e9.5.1718726767490; Tue, 18 Jun 2024 09:06:07 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-360750f22absm14649703f8f.79.2024.06.18.09.06.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:06:07 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Richard Henderson Subject: [PULL 56/76] accel/tcg: Make TCGCPUOps::cpu_exec_halt mandatory Date: Tue, 18 Jun 2024 18:00:18 +0200 Message-ID: <20240618160039.36108-57-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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 From: Peter Maydell Now that all targets set TCGCPUOps::cpu_exec_halt, we can make it mandatory and remove the fallback handling that calls cpu_has_work. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240603160933.1141717-4-peter.maydell@linaro.org> [PMD: Add assert(cpu_exec_halt) call in tcg_exec_realizefn] Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/tcg-cpu-ops.h | 9 ++++++--- accel/tcg/cpu-exec.c | 12 ++++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/include/hw/core/tcg-cpu-ops.h b/include/hw/core/tcg-cpu-ops.h index 099de3375e..34318cf0e6 100644 --- a/include/hw/core/tcg-cpu-ops.h +++ b/include/hw/core/tcg-cpu-ops.h @@ -122,10 +122,13 @@ struct TCGCPUOps { * to do when the CPU is in the halted state. * * Return true to indicate that the CPU should now leave halt, false - * if it should remain in the halted state. + * if it should remain in the halted state. (This should generally + * be the same value that cpu_has_work() would return.) * - * If this method is not provided, the default is to do nothing, and - * to leave halt if cpu_has_work() returns true. + * This method must be provided. If the target does not need to + * do anything special for halt, the same function used for its + * CPUClass::has_work method can be used here, as they have the + * same function signature. */ bool (*cpu_exec_halt)(CPUState *cpu); /** diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 6711b58e0b..f7f8683a1b 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -682,13 +682,8 @@ static inline bool cpu_handle_halt(CPUState *cpu) #ifndef CONFIG_USER_ONLY if (cpu->halted) { const TCGCPUOps *tcg_ops = cpu->cc->tcg_ops; - bool leave_halt; + bool leave_halt = tcg_ops->cpu_exec_halt(cpu); - if (tcg_ops->cpu_exec_halt) { - leave_halt = tcg_ops->cpu_exec_halt(cpu); - } else { - leave_halt = cpu_has_work(cpu); - } if (!leave_halt) { return true; } @@ -1082,6 +1077,11 @@ bool tcg_exec_realizefn(CPUState *cpu, Error **errp) static bool tcg_target_initialized; if (!tcg_target_initialized) { + /* Check mandatory TCGCPUOps handlers */ +#ifndef CONFIG_USER_ONLY + assert(cpu->cc->tcg_ops->cpu_exec_halt); +#endif /* !CONFIG_USER_ONLY */ + cpu->cc->tcg_ops->initialize(); tcg_target_initialized = true; } From patchwork Tue Jun 18 16:00:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805261 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp275770wrx; Tue, 18 Jun 2024 09:10:59 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWy5lwNDiLL42zyfkfdyt/XJk3N47J8O64cxumC2k3uQgrEAxUsnU87tPCQcDVWcx/ZirB6rbE1OffhMXt/hkDu X-Google-Smtp-Source: AGHT+IHVNNs9B4x8LMk5Ns7PHB5Oi2YcyJ3hJt3WZFDBhCOTBXVvaX4h8tS8+cjOB6s79CaBZ3Bl X-Received: by 2002:a05:6808:1708:b0:3d2:1a43:d1b with SMTP id 5614622812f47-3d51b9b57a1mr254094b6e.14.1718727059172; Tue, 18 Jun 2024 09:10:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727059; cv=none; d=google.com; s=arc-20160816; b=gzYpuCJYlhbqQXhWlC2RuiCmWdpJvnHwjzkeUToZ5//bxPTmPQx0N3jaHuesd/3+Sc vTrDvF0ohheBgdmnFVAamLxiuILLu1RU7Z2vkTPmk6liU2mbDJG80hJ3QtbYghv7p6Hh PCyZN0IBopepfiMJpq9FhvAoMnxB6QNAhaVTfTACwneLvNxZ8RNkBMvPiNUiSa/La3gM lUauckIGfZ6aeQYta5yFauR796D4ItiW0j+rbYyKDdKIqLfGzFPHM9toe2JO6MDwNHGD 6gWMC5n9I/EXmmzBnwdFbJUFgN7CI1iC7agPMkzWpuviusfRfoRNF6zkK6UuAlogCYHD 6Scw== 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:cc:to :from:dkim-signature; bh=HtmX+S2yK/Vz8/u+qz4/0UFgu+q37Y7br+Oj/kr8kUw=; fh=vbGUDJIv0td6conUnGz4oHw5hGzDnkUZulGjJDPiw2E=; b=y+QpTn5o3Pg62J/4UbcLTkGcL2MiJGMDiaKZdq2GcBevzzyGjKa7M5jdFKlbh5UacI dn7Kso+RXK5ZZuyUZX02as9FvuIWYJUPV6i1J9sUh3F+eGZjJ+EthHUifqu1zd2b9nwL WBOOSap7Z0+8YexktoUEz6qRPdmwwTEnMx0Uxjd1cR/8DC+kvICxGkvRgrxjsnlK19ur 7YVFUUIJByF4qMaGrag3Wl+mW/TysjKt29GNKZeJ0KgCmi/H9Ad+7I3AHv9JNGwC9Kbf fbjA+yv698uSPyV7yON2AQCMacqVU3q4UnYJXxReo+9EQkf70dE7aloipdbP4eXRmw6m YcTg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gRVUg5s5; 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 a1e0cc1a2514c-80d7872a569si1775251241.95.2024.06.18.09.10.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:10:59 -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=gRVUg5s5; 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 1sJbLh-0007At-Jk; Tue, 18 Jun 2024 12:06:22 -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 1sJbLd-0006v5-LN for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:17 -0400 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbLa-0007kX-Q5 for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:17 -0400 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2ec0f3b9cfeso51060771fa.0 for ; Tue, 18 Jun 2024 09:06:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726773; x=1719331573; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HtmX+S2yK/Vz8/u+qz4/0UFgu+q37Y7br+Oj/kr8kUw=; b=gRVUg5s53KnJZxK1be+9I6jBVj5BXXJT2lzVkc/g4F34OB4u7ltoblPZ8T3QydS8Ks rGc520bYIv7QegJPI4fjFZm4USKp+fAo/BFmcVRsi13XX3uwHVJFvpG7ZBZzIoFp1byp Sjfzd40iP4onk9I0qymIgbEc6sv4XrzKYfl/navj05D8nEdp8GKcuT06IDKc6+5lw6pU NSa6FZkoqwbnCVXzdiOk/SrTKTdfyn71BzQ3ACLWRAxcKy96eEGIP0gs4Q4l4TVu5jOY QRmTBz0gb++qwqvA/fcqSRYYKW3nFuEbsVeqpfKjyu3ySpi49XTpFEizHfo/g1vzFH8i m8Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726773; x=1719331573; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HtmX+S2yK/Vz8/u+qz4/0UFgu+q37Y7br+Oj/kr8kUw=; b=USpCl9k0lcGiD/+lur6KHHVGrfFgFbPDPI5tXsWEaUjk9K169OOyW+i/tbGj4QQ1jX P+EMq9UuF46SsTv6wUYJMgXZT1blpqtLNhCi4JrNQ/VRp8inMzn8zl7UeUHP+1xTDVft LUqR3iq1YUsZXwI8DxjDOPr0YeUEuKbhfjfCkK/KM47ljl3nizeumiad6twRqJ127PzH PqM3sGmgYixDnW7Bux3ghyAgM3wEFoE4+oz1fuS6MztikhS2OQtFC+todJ5/01bspfvx MYWQ82OG5iWXAUPPoNSW5auKSXktEDlBkGOUBBaOdZ5p9FUyinR8H9Oc0eQ6MHtrUwy8 Xscg== X-Gm-Message-State: AOJu0Yya14Korn/FMIiY4xDb3rc8cywIA34828ds47jtCAwZExxSvPZJ mPmwHQUh9fCJyXKtWXAOcs2y8xM3WdR68DNutHGkcOplRW6LWhivMZUBUX1maIvqT4AZdN5dSop P X-Received: by 2002:a2e:9694:0:b0:2ea:91cf:a5f0 with SMTP id 38308e7fff4ca-2ec3ceb6a0cmr1879591fa.19.1718726772788; Tue, 18 Jun 2024 09:06:12 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-422f6320bd8sm191966715e9.32.2024.06.18.09.06.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:06:12 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Xu Subject: [PULL 57/76] memory: Constify IOMMUTLBEvent in memory_region_notify_iommu_one() Date: Tue, 18 Jun 2024 18:00:19 +0200 Message-ID: <20240618160039.36108-58-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::230; envelope-from=philmd@linaro.org; helo=mail-lj1-x230.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 @event access is read-only. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu Message-Id: <20240612132532.85928-2-philmd@linaro.org> --- include/exec/memory.h | 2 +- system/memory.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 1be58f694c..2bf5e23b6a 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -1852,7 +1852,7 @@ void memory_region_notify_iommu(IOMMUMemoryRegion *iommu_mr, * range. */ void memory_region_notify_iommu_one(IOMMUNotifier *notifier, - IOMMUTLBEvent *event); + const IOMMUTLBEvent *event); /** * memory_region_unmap_iommu_notifier_range: notify a unmap for an IOMMU diff --git a/system/memory.c b/system/memory.c index 74cd73ebc7..f3a37c97c1 100644 --- a/system/memory.c +++ b/system/memory.c @@ -2006,9 +2006,9 @@ void memory_region_unregister_iommu_notifier(MemoryRegion *mr, } void memory_region_notify_iommu_one(IOMMUNotifier *notifier, - IOMMUTLBEvent *event) + const IOMMUTLBEvent *event) { - IOMMUTLBEntry *entry = &event->entry; + const IOMMUTLBEntry *entry = &event->entry; hwaddr entry_end = entry->iova + entry->addr_mask; IOMMUTLBEntry tmp = *entry; From patchwork Tue Jun 18 16:00:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805268 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp276124wrx; Tue, 18 Jun 2024 09:11:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUch4cOAA7qAJYrvU3oXOLYyi+lURs66eCafpGl4L1csoVv4pQAM4mRzmyFEVzIUS2xEVXh68oJzBmXm6NL8FiD X-Google-Smtp-Source: AGHT+IExWWhcChYFmmketLos7ZqsM4ClMZizKReeF01KBEcr31/oD5n5IZFx/jrIqmYyH69uvRxf X-Received: by 2002:a05:6122:1da1:b0:4eb:1499:607f with SMTP id 71dfb90a1353d-4ef277d5a58mr362100e0c.14.1718727098938; Tue, 18 Jun 2024 09:11:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727098; cv=none; d=google.com; s=arc-20160816; b=r3vr+E/cMKM8MLUIPZYiF2sEfVwpKjiigkUYnNuX4/7AFX37c6QWxIprNhbKtTzcQ/ dmoJnAvprcB0isrh4PpbRZVZSfBnvq8ZVnw0B8bROFJwSpRh/jxVCK8LZzYvhdKITebi 5ra3KJh0nI3gy8Wx60TYp0BPeFwKX93BMtXIDJIoT2hrXlgMAM4JYTrvjVAFFx5vXYTf JkF4b7EJrSP+++q81PjlCcgArgZafdN73GoltBG+/j3gNBBNSJWTucT8fDfuLIAY/KK9 JT5zTzb7WJ3IATS1pRkoRwltgaHz3L+nLtVc08fGg4uqD5E2hNVEpEOXKKBXcCN6iJlt qiPw== 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:cc:to :from:dkim-signature; bh=lKcHfZILllwrpcTCju5XbZjvoufywq+KUF9g31cZ3+o=; fh=vbGUDJIv0td6conUnGz4oHw5hGzDnkUZulGjJDPiw2E=; b=SF8/Kua0z0bADMF6mvd1z6ZraGlEpdrVrav6vFUIkDemmPRlF5KMYohV99w0nIwkKg bGZckyANnwzlKgLHHd9+ydUq645fiuwvfAbxXVl0s2GwUAk5qOkt34CsRza9LEy01UD9 oCf2DGpxXRZwhLUfTyf+cRSX+yV35JDV6DBrAIS/4GW2+C+FnQeYN2V1oDWdOLo3j026 qtiXr7Nfj684eizMb+IxMhiivIeKyviHs5+vPwxA29okexbisusEzED/+w4NT/a+X91p AH0EvsKyIyBBLVYUIvWeelZCAQ/MlkDehTinN0aMYyxfEJ1tpbv4TpN/iR0xQ+mVJmn+ 37fg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HuWYRsiP; 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 ada2fe7eead31-48da44aa797si1907533137.561.2024.06.18.09.11.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:11:38 -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=HuWYRsiP; 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 1sJbLl-0007dt-0U; Tue, 18 Jun 2024 12:06:25 -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 1sJbLi-0007M8-Gy for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:22 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbLg-0007lT-Kc for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:22 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a6265d3ba8fso662871466b.0 for ; Tue, 18 Jun 2024 09:06:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726778; x=1719331578; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lKcHfZILllwrpcTCju5XbZjvoufywq+KUF9g31cZ3+o=; b=HuWYRsiP6XEFAzJQJQvlaWNN1kB6JWUpBd0bjpunhHnmq/QMBs3hcPPkSUYbAj6FqC jeof6DM8j6maI+Eg7HE4aBR/y8Y86x6dlfFkPPzcvqbMaaYdM+vSBW+oU5erjAVNtF3I fRBb5GL6WiixBHTEim5NZbR6i3MmVxojYec95omrEssCLvdUfPf0fTFej+R1UXDB6RL8 b2J+QnAe58zPLIaxvAiH8jEykcM9tLbpFWWuqKqiUPeoH2m1wJK7fVeZ02JRmfF0VBY3 VNGvWAVA1ebgjFBlJQCy9hVg2jpWHMHEijRimQoYVnC4YfIafvnhg/iAEHdBlU1G/m34 Wnww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726778; x=1719331578; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lKcHfZILllwrpcTCju5XbZjvoufywq+KUF9g31cZ3+o=; b=CPkAjFp8XjgZmLoGL87ftNVD4+xVz6mEfcim+MhD6HYgdmXYFoM6UXEe5slxBqMxGy DcD5h6g9svR0easKs+oYihCimnBeUFh8xD4ai7capQlG7lLgX4W3MsXGyrNjxhCjBrGC VlagA1scTo/nQlecfWqag3zIRpKDlZfl6ncaxvYIx5vp2dZAFma3Am88vWBeb/0IXd03 y6WWqkTgu8opR+m4+2M0rTbmQ4/8OUQEd+++jw63McNgponVMMkjwyeWvfnhzuKZ4ipp Tw0s5JF+TlNXsHqDWj0fRa08cBdhSdRSUaYSk0Mqsg4W3fvwSlkU7fTW4kCmOIRqOVv2 uMwg== X-Gm-Message-State: AOJu0YxR1Fa8si/xFF/FAAo6oxc70rJsj75E5QcGPqDxh7uIJZTYKLPw 0eIryjy1xqHaosiB0KdjMDfRtyGKwjr+eOThpFbTpQT+37RT+96WlQDkUCMGYj3FcUdvIbwLPop j X-Received: by 2002:a17:907:c00f:b0:a6f:6721:b06d with SMTP id a640c23a62f3a-a6f6721b860mr961204366b.24.1718726778203; Tue, 18 Jun 2024 09:06:18 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36095093653sm5811030f8f.11.2024.06.18.09.06.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:06:17 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Xu Subject: [PULL 58/76] memory: Constify IOMMUTLBEvent in memory_region_notify_iommu() Date: Tue, 18 Jun 2024 18:00:20 +0200 Message-ID: <20240618160039.36108-59-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=philmd@linaro.org; helo=mail-ej1-x62e.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 @event access is read-only. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu Message-Id: <20240612132532.85928-3-philmd@linaro.org> --- include/exec/memory.h | 2 +- system/memory.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 2bf5e23b6a..2d7c278b9f 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -1837,7 +1837,7 @@ uint64_t memory_region_iommu_get_min_page_size(IOMMUMemoryRegion *iommu_mr); */ void memory_region_notify_iommu(IOMMUMemoryRegion *iommu_mr, int iommu_idx, - IOMMUTLBEvent event); + const IOMMUTLBEvent event); /** * memory_region_notify_iommu_one: notify a change in an IOMMU translation diff --git a/system/memory.c b/system/memory.c index f3a37c97c1..47c600df63 100644 --- a/system/memory.c +++ b/system/memory.c @@ -2052,7 +2052,7 @@ void memory_region_unmap_iommu_notifier_range(IOMMUNotifier *notifier) void memory_region_notify_iommu(IOMMUMemoryRegion *iommu_mr, int iommu_idx, - IOMMUTLBEvent event) + const IOMMUTLBEvent event) { IOMMUNotifier *iommu_notifier; From patchwork Tue Jun 18 16:00:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805267 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp276071wrx; Tue, 18 Jun 2024 09:11:34 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXMSjHjO0NDZ4fi/p6FQh4KppbfklNHYP9KsNY3yD9xQV3FdE76Q/moJKXf4tNk1l791jgjhwAqiKWNPQq9vm2w X-Google-Smtp-Source: AGHT+IGbmYDUTflYOFry5uiYFtYhmmtAmLh2OHbAGneT7nQyDt6i80fAwal5QF5wy57TBV1UYcrU X-Received: by 2002:a05:620a:4496:b0:795:5ca2:374e with SMTP id af79cd13be357-79bb3eca9cemr12149985a.54.1718727094086; Tue, 18 Jun 2024 09:11:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727094; cv=none; d=google.com; s=arc-20160816; b=w8IGFmv6tJCC1qL0f4I09t94uknznK+yVGPDywxzhwjVudJHmOAAwyJpEpv9MNiDUD TMlPg3ANESdfKD0nanMC+k2SlWuhnd2HsjiQ7bNGigl3Cny1DdDg+yZZtHX1b832iQ9+ kKCkYLcGnQSZFKfbT5jhtOiFrPf04eXOA6dsT6d0PoNoK9KMxrKKjn9pKwZrDrahYeiX O++hfgkkikT4lGF9xs0Y2RX2dlsbjpjOA3d3qDghXdwFF6m6RZFWdbctKNGsgnIxq9/T oR8QY7Po8rvGcqGU2QyoJ2yzsnnj3d9ZzbKBEiW4VMY55CcwPogdy/H6/7W+D6CcSwXR D7LQ== 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:cc:to :from:dkim-signature; bh=aZqLfefuSJqvtpGWlLdOMb144pE69iIqAnMbzj9lfMc=; fh=vbGUDJIv0td6conUnGz4oHw5hGzDnkUZulGjJDPiw2E=; b=vRTnm5lYch/I4UB/zrMeZwRfBs/qUNwO6xrzfJ5PaLQcDkZizJknnCtWfzEvgrk7VI Wj7Hyd8YD/TViJDGTagf01pIvOaALbmHjKr5xFHKnhPJJ3pCjJnDCjwHdINiG1W7f85b CxbOfiNqbcQoZcopHKoxFElJzQr7P9EgXV+S0lOOGWrxenSwDs8Mtz07WuRRiSJIcG6e 7cxSbtuj7xkFgq9n4lun7n9uGlsaZo6fI+a+Y4yWONjzDDS185NxaR+foDJ/JM8FO/F6 0pLM2VdmfarX7TvNcN7XGovAokIq7ZuAv2bedsOjKz1MsgHdnoNY3T3Imey+ffea1zp5 2P4g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gYJRYVCX; 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 af79cd13be357-798abd17131si1219606985a.392.2024.06.18.09.11.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:11:34 -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=gYJRYVCX; 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 1sJbLs-0008QE-Ll; Tue, 18 Jun 2024 12:06:34 -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 1sJbLp-0008GX-6a for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:29 -0400 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbLm-0007lr-Nq for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:28 -0400 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-52c819f6146so7474894e87.1 for ; Tue, 18 Jun 2024 09:06:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726784; x=1719331584; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aZqLfefuSJqvtpGWlLdOMb144pE69iIqAnMbzj9lfMc=; b=gYJRYVCXAQ050McA92JbN+Q9sRO4AFPx+ViK3Xd6Pe0a/9tKU4ydROA7WBNQKBgjUF vLRBbjoc2QVNlYlQ6EQiMEUv/v6HacerdOWf2nx3IqhCP3n+zj8yON1U5XF5KuXCBJZw OoEQTyR6Id2DpkICJxkCdTKDhXw9IYhE8XBd85uN1roaD5LhwmliJBiB5OYKp4pc8hMn 9Tj9vf3PZ8XagmpJ61JNk1uPFLpNLTCbUTk+17C5LJ7OUbyQml4uJUriSlp6SDi+LD32 qX1OGuOOTN5R4Wq4Xtb3BYuMRkwYGmTjwHR0KNZvejyH/qwUHb2XClZVEj30rMx3u3iI uSkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726784; x=1719331584; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aZqLfefuSJqvtpGWlLdOMb144pE69iIqAnMbzj9lfMc=; b=YOagtMuLN43NhQ9Ghvr2c9SHPZVlKZCLX9VGFSZBd/6MPMmNYteSxn9oxgLqT15Gn1 6V9TJQ1yIwTmUVGasNukIZqxKeI/limqRrZK0btDcQQ8c/J5aLYMheGVqgfmXuApS53d bsVRlz2jIvxffMjbthK0Kiw8NXGI1qtZj5kO/wT7rRBQsGhYhiCPKewtQHCuT6HcEYMF oF93iLGgWRML+qUFQmb1aCap5GA22tVRLHrocJP8rVKSmO7VcOO4EvlO8yLsR0AyXe8a MHXMlqN+phjXczUMlhiGo2Zd7GMis82KVMPZcIwuyFUKrJajbO2g4mSP9cS8NxVZHbhH 4FOA== X-Gm-Message-State: AOJu0Yyiaw0XlBBcwhspr8oi9pVFuvlANn+mXfAMNGLP5u2WOp8FfYMu gV84KQNXLJSAcLLYkQzXtdPnk8o1aK8fmDmIUtUDoRJLkaLgj+42jGt1AvesuzzjQuQV75dnUD8 0 X-Received: by 2002:a05:6512:3691:b0:52c:8316:d0c9 with SMTP id 2adb3069b0e04-52ccaa0a1c5mr64321e87.0.1718726783668; Tue, 18 Jun 2024 09:06:23 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-360750f2489sm14358289f8f.69.2024.06.18.09.06.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:06:23 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Xu Subject: [PULL 59/76] hw/i386/iommu: Constify IOMMUTLBEvent in vtd_page_walk_hook prototype Date: Tue, 18 Jun 2024 18:00:21 +0200 Message-ID: <20240618160039.36108-60-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12d; envelope-from=philmd@linaro.org; helo=mail-lf1-x12d.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 @event access is read-only. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu Message-Id: <20240612132532.85928-4-philmd@linaro.org> --- hw/i386/intel_iommu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index cc8e59674e..c4350e0ff0 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -1170,7 +1170,7 @@ static int vtd_iova_to_slpte(IntelIOMMUState *s, VTDContextEntry *ce, } } -typedef int (*vtd_page_walk_hook)(IOMMUTLBEvent *event, void *private); +typedef int (*vtd_page_walk_hook)(const IOMMUTLBEvent *event, void *private); /** * Constant information used during page walking @@ -1533,7 +1533,7 @@ static int vtd_dev_to_context_entry(IntelIOMMUState *s, uint8_t bus_num, return 0; } -static int vtd_sync_shadow_page_hook(IOMMUTLBEvent *event, +static int vtd_sync_shadow_page_hook(const IOMMUTLBEvent *event, void *private) { memory_region_notify_iommu(private, 0, *event); @@ -2219,7 +2219,7 @@ static void vtd_iotlb_page_invalidate_notify(IntelIOMMUState *s, * page tables. We just deliver the PSI down to * invalidate caches. */ - IOMMUTLBEvent event = { + const IOMMUTLBEvent event = { .type = IOMMU_NOTIFIER_UNMAP, .entry = { .target_as = &address_space_memory, @@ -3889,7 +3889,7 @@ static void vtd_address_space_refresh_all(IntelIOMMUState *s) vtd_switch_address_space_all(s); } -static int vtd_replay_hook(IOMMUTLBEvent *event, void *private) +static int vtd_replay_hook(const IOMMUTLBEvent *event, void *private) { memory_region_notify_iommu_one(private, event); return 0; From patchwork Tue Jun 18 16:00:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805271 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp276222wrx; Tue, 18 Jun 2024 09:11:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXRnvyYxgDBKzSqFytt19Du7VQH95GLBtx58o71bP7V/C1uhX0jkqbNZWGD2eCAi2dyhAXgxqQIc6vGVdXDMZpE X-Google-Smtp-Source: AGHT+IEZpsKjkuivxHnP3LICnwKwOOOn+3FgKaQdMj83PYtl1mhJU4UmQ9c6hHcWwr2Tn6fMBaMw X-Received: by 2002:a05:620a:29d6:b0:795:5672:927a with SMTP id af79cd13be357-79bb3ed476dmr10794785a.54.1718727109262; Tue, 18 Jun 2024 09:11:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727109; cv=none; d=google.com; s=arc-20160816; b=hhJVWPtU7MsSJDDJ9H3qwjmoe7ouFrsuZZBdDRh6Z6p80asibPUX3nJ2pAzMDoExIn ZtpuLgy74fH22MH5GRJDo0ZTCITIDQdcL71SFSHmNPna/k5AMDbDO32oeUO4dI5NljGm NFvqPd2jzLi1ZfHJumk70NrzV0kWOT3Hpj9staGhnRAKW8j9lsf77u1BTcyBrbbfgarC +xPeUVK38kQAWFdG0iUMFnpcI77ck+yijqaFRZQqHmbpn1NPwdkZ5wEvCJqBYnV4J7in 7UVIRYTHwFamS7WQ7kQPI+qYKeeVmzRj1Laza/1fkirK0cTq/RAKlbBKG1D2aGzCfa5+ G4Pg== 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:cc:to :from:dkim-signature; bh=jmfqhTI871PevJRRppe1121NzLfqeW2EbWjz+frAkMg=; fh=iBCV4w7YK1vyHYfwyxOoXBCd3sIBF9+yH+94qSO9meY=; b=Aglxi6dbh1s2VkHf+o+I/C/klAA/xtMdUN5e+l9OJTYZLQppCfgQod5rfvkWr7uWsa J0jElkw8YL+/xQtIBOllUCi092feKTYcDlsoNVSZCMbXkNOdQcfh7QLXKr/RLQ//HKa4 5gZZ0v1S6qJ3zbyUcTXCR6axPPXDfBri6gHxtR0lRZFVOcLwUytK9iosFUm7SVBrbOcF ectohUzT/8zZqCRINOZTshzALEZNCw/m5jXtE40ULDxmceWUtRZUiBQvAqIByLgeTkVU QONF+8dv6ynwMdJoHkDaRi1UTbQAZk/ZDuqXGYWn1AMZQnxAgTKXdjhzrAR4mCH5MoDK dqPw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Yz858Glo; 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 af79cd13be357-798ab8ffbe3si1355791185a.277.2024.06.18.09.11.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:11:49 -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=Yz858Glo; 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 1sJbMM-0000Vc-0w; Tue, 18 Jun 2024 12:07:02 -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 1sJbLu-0008UP-8v for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:34 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbLs-0007m9-5C for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:33 -0400 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-362f62ae4c5so121444f8f.1 for ; Tue, 18 Jun 2024 09:06:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726790; x=1719331590; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jmfqhTI871PevJRRppe1121NzLfqeW2EbWjz+frAkMg=; b=Yz858Glon500OPl1/YHcd2z7AzcnoykufjMlbK5APFYukpAx0xP/GDLWwCPvI7VBur nhDWbElh+yaLnPdwsWHiFS1gGlBusQwZOQnmrt35D8HkMXgLT6w5ZHvNbtJMcx/3E1Dw 79UdfwuQ2gkDWrRMAN6I0H9Rs0Ka8oLrDcgYEwp3z9n44bWwNk5DL4lYWdfqgVdYiTMZ IBiJtb4hwG+M+RZOorgrK3T0/mj/rJSDTvYacNDcQGcotPDHFliyeUZe6bvDMwnj3qEP 2zLBA9dg+I66j+JMse2jBf23S6yuih2lZQW+TlQN97k6JMQxo+tWKAQGPtowIDEoX8Mo Kr2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726790; x=1719331590; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jmfqhTI871PevJRRppe1121NzLfqeW2EbWjz+frAkMg=; b=fbWlyGD3/AnLClhByhLiDtH0eX4XzILSTxJ9OZjK8PjLHLHhxLFxoh7oJ/vF2NH/Kr C4vuix8/tuJhW8H3GLxw59eTaC0CQi9I26oi4Yhqy4/ecwiigNDNtrFPoGwiz2/ADOgv SDa34LDUKYBv6Yw0l8KSV+d4ydcxyS9Qys7QbmAHKeNrZxsbAAH2sW3n2ak30cyL+t0C z5geJPO+UXeUAtD5VsM3CZCQuBfd9Vop5RFnhFPmdE1pyj4HcgqR+aq2cP8UWD26XSMO VJ1jSkCeD8OMaTk1sTYuNbrT+HTVpQ6GBUHkDZsycf0S1RFAjZOu5xnUper24t5WVaHd XmWQ== X-Gm-Message-State: AOJu0Yx8VaADi5mNqxdvDhzpzIX+Rfo2+i/8/xFl71BGOuU1h2TrvkK/ VABks3SaiIDT+TEkj2nuHkXoa0stPv/jYitGPqJqpPdXrhJvyydB3HWCRZXUyrmyAyfKhfXoYdJ x X-Received: by 2002:a05:6000:2:b0:362:363a:9594 with SMTP id ffacd0b85a97d-362363a95f1mr2093169f8f.11.1718726790083; Tue, 18 Jun 2024 09:06:30 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-422874e71dcsm227153835e9.44.2024.06.18.09.06.29 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:06:29 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?D?= =?utf-8?q?aniel_P_=2E_Berrang=C3=A9?= Subject: [PULL 60/76] hw/usb: Remove unused 'host.h' header Date: Tue, 18 Jun 2024 18:00:22 +0200 Message-ID: <20240618160039.36108-61-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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 Since commit 99761176ee ("usb: Remove legacy -usbdevice options (host, serial, disk and net)") hw/usb/host.h is not used, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Message-Id: <20240611102305.60735-2-philmd@linaro.org> --- hw/usb/host.h | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 hw/usb/host.h diff --git a/hw/usb/host.h b/hw/usb/host.h deleted file mode 100644 index 048ff3b482..0000000000 --- a/hw/usb/host.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Linux host USB redirector - * - * Copyright (c) 2005 Fabrice Bellard - * - * Copyright (c) 2008 Max Krasnyansky - * Support for host device auto connect & disconnect - * Major rewrite to support fully async operation - * - * Copyright 2008 TJ - * Added flexible support for /dev/bus/usb /sys/bus/usb/devices in addition - * to the legacy /proc/bus/usb USB device discovery and handling - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef QEMU_USB_HOST_H -#define QEMU_USB_HOST_H - -struct USBAutoFilter { - uint32_t bus_num; - uint32_t addr; - char *port; - uint32_t vendor_id; - uint32_t product_id; -}; - -#endif /* QEMU_USB_HOST_H */ From patchwork Tue Jun 18 16:00:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805272 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp276231wrx; Tue, 18 Jun 2024 09:11:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXXaAmuyZPf75apmiY/yBjny/cVAjAVMlyU3lbX/DdUfU1y8Z9kQKp76e6x4zE88MTX3T0GoRhe1zEliYBqbAg0 X-Google-Smtp-Source: AGHT+IFC8FUIQQ4INR07MCwipweyYQ6eobrxfwNkGWl2bc8M5lONuHToeRJ4AsbGUF1/nuvh0jDI X-Received: by 2002:a05:620a:4109:b0:797:a866:3a73 with SMTP id af79cd13be357-79bb3e2d683mr15751285a.21.1718727109979; Tue, 18 Jun 2024 09:11:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727109; cv=none; d=google.com; s=arc-20160816; b=MSoBH5oL/crfjBzgAzOYqvZ/m0uN7ElfNNi55KEO4KT7ez0MJMRCkwo7WvvW0NHR6k 27UbambnIJT279FaEPpvBeX/mACzVIcBO7U1M2eNoa2YwFXaxaZTRBeRbTG3S5c79YLb jA+9dfr0x8wvyWqAiDuH1uJ7qUpNce+iWUmfMxG5ke/2C03ppWJdsE+5zesbVdkl/u8V GXc60Wv6LhwNPM60a0E9VTcqR2nQkLaCxLLFP8wzG6XoDoRs2cAQ7MKV7B2tZUreZUmZ MXUBMbJw1OBVTk8Uatpa7BKFbUq0QbBsMl5kAIJWkG5uUZa+WqNZRtnhjWLXHgaOSFXP IpHg== 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:cc:to :from:dkim-signature; bh=kgk379QG4gces2QJuUS6NM5ocwUhk589UugM1F9rqoM=; fh=iUXIqOsU/orsH1G9AH5dcMUQj012orP/6MYSV2sTJvA=; b=z/9Ec9io+gtwCSvE07gC7QiEiT+MAnRcPjPvhXOQx2riywaoW0B60L+14WxViV0rGv gA2gs2CRt7HoXttAhXUulMM4zE12jjt3EDRDLAAkSucJxTi52mGlFc15dSol7GCiBUJa qV/J66yW5IeVsI5aYGRVDW9yYkkKa3b3Eba1815GiIqzMjftaNSvAlJOozHMOrMJEvGY Uqsh4/dzU65sAuhFnYmfaLbzB02HdYzzeLtprkujTPVBfy1ahanLA0DGBvtZ2bqiAtMl DihNHbnBGl2Y+YchEF+Ce1kGDX0CCi7KXZG5E7k0QGvsYEeK8Gz4Yop4kd+EHPE7fxAz 7xeg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=agBYO7DX; 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 af79cd13be357-798abe5544csi1191657885a.553.2024.06.18.09.11.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:11:49 -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=agBYO7DX; 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 1sJbMP-00012Z-Tx; Tue, 18 Jun 2024 12:07:05 -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 1sJbM8-0000R1-VI for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:54 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbM4-0007mj-DK for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:45 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-35f23f3da44so5042982f8f.0 for ; Tue, 18 Jun 2024 09:06:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726795; x=1719331595; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kgk379QG4gces2QJuUS6NM5ocwUhk589UugM1F9rqoM=; b=agBYO7DXcHMscWdtP7LQgpZKed52yeVyJ8X/jjEMjCtqtcwxL2Fzv1Rtr3NRGiRqwy 1OhJfsIi+vhdIqqlBRbyr4+G+AL+C10afDGk78utDHuwIlfPBzBDoTe0s+nEenSBrhia ppRZ1DgPY7qbB/f9H+Ol5xDG2gXqeM6OgBopao7fsjCzGw0WvAZH5DwB15bpLnQ8WtnR wI7bUcX1OrYEhiLdmmGA7aXDa4EF++01tXTn4JtsFuR1chIHiNGI27Vw/rKry34Tv+EU xXqmGrieO7k3+KVqUeb+nMYs/4LUur25fQqimEt3FUbftfVzMfw4f99FrtLEzdtbq4MV pWug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726795; x=1719331595; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kgk379QG4gces2QJuUS6NM5ocwUhk589UugM1F9rqoM=; b=TAhzxVGyzZFNOBrIObauX+lS5ekyJs91Kn7lpxyYJz1u4PlJT/CTuZJ03yplZJUXQS 7SDEOe2c9TJTOy6EK/qsOFKwjJ4I0MFlstlnT/HUTJUTuwD4YRzdz/qVqTavXculJBfZ qLG3ajid2JOpGK7+uzhtAWiy9ehwmeavC1oJ6zk2LYGLrYcCL2WPFVcu2w20m2HQHTeI IJOeDrlQlQfFekqv4SDyv38wtLZkrzH2j11ZRy7sAOWRsckS45jJfKmbB6rrv2dieVsc MNvdKxrJbTwhKhVFbDLe75Z8qWYa9MIR2PpXizI/aorLY1yT2xdI6OmZtm0sj1r1E+DY ngzg== X-Gm-Message-State: AOJu0YxD7ET8GHHNmKkFt15HEAphazoH54zatuwnJxUXZyfqIXh3ugX0 JY7TALdfUv5tQG/Y7gP+sKykpoToGq7cRTv70QNVodTZKW0YOfs6XGJmMH4dEIsajLnqvhMO9y/ v X-Received: by 2002:adf:f04e:0:b0:360:9180:760f with SMTP id ffacd0b85a97d-36319a85e94mr8325f8f.66.1718726795416; Tue, 18 Jun 2024 09:06:35 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3621a4a17e6sm1580858f8f.19.2024.06.18.09.06.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:06:35 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Fabio D'Urso , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 61/76] hw/usb/dev-mtp: Correctly report free space Date: Tue, 18 Jun 2024 18:00:23 +0200 Message-ID: <20240618160039.36108-62-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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 From: Fabio D'Urso In order to compute the amount of free space (in bytes), the number of available blocks (f_bavail) should be multiplied by the block size (f_frsize) instead of the total number of blocks (f_blocks). Signed-off-by: Fabio D'Urso Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240618003657.3344685-1-fdurso@google.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/dev-mtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 7e4a0765ae..554b397e88 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -886,7 +886,7 @@ static MTPData *usb_mtp_get_storage_info(MTPState *s, MTPControl *c) rc = statvfs(s->root, &buf); if (rc == 0) { usb_mtp_add_u64(d, (uint64_t)buf.f_frsize * buf.f_blocks); - usb_mtp_add_u64(d, (uint64_t)buf.f_bavail * buf.f_blocks); + usb_mtp_add_u64(d, (uint64_t)buf.f_frsize * buf.f_bavail); usb_mtp_add_u32(d, buf.f_ffree); } else { usb_mtp_add_u64(d, 0xffffffff); From patchwork Tue Jun 18 16:00:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805277 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp276314wrx; Tue, 18 Jun 2024 09:11:59 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXjq2BXgVGbOxPsnIgXHs8FafmttzqtEia/X0GG1atTQeCt62RNCqc8iMC5+5DRimAnLV8k1qFKmyyOjie2fpUr X-Google-Smtp-Source: AGHT+IGanKbwF8xuoRyNASk/TOp9iCCYrwggKlmKjrpunGyn1YPoBGGjj9X0Df6bsWKs3KNeoQMb X-Received: by 2002:a05:6358:4883:b0:19c:329d:b13c with SMTP id e5c5f4694b2df-1a1fd48d270mr25737655d.15.1718727119501; Tue, 18 Jun 2024 09:11:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727119; cv=none; d=google.com; s=arc-20160816; b=Jo9TrqiI6JcqHFW6zGGfLObniNmN7oFAqS0Msa9WajMtbFkw/xPJhFdekDd9pJtUhM /v3qmRIl9luV3LawP09o9NrW7RG0ZUM57pGmc2JdERNr2Ybiepa47dwVT8Vkp3IbFuJD aEFxNFdNeDCk8/qEYZc7ydyA83pkGiXZxGMDRQFH8ZI6arXJLIuZUeIT0NBTD9r1rKBw AiyFv0T5tfGaQm50QeX9I4yeQCEwEVe7kASMZv/29Qxdav7qTkDa8lMJUpiToFh4H90w QjWwHiKviAhi4NvPbKlVUqYgROzsCx1sMSkziHn+8bEz+pV4ZjAZYDB3STNCMRYQJC1a SwPQ== 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:cc:to :from:dkim-signature; bh=cymkwF82VC/Hy5B+jHzMH3ViY4En2eCo0AZnv/UEfWU=; fh=OA14dF5uBSva/lf1QnoIY/pZiYFXceo0aTsESKqeglc=; b=ilIDgzp8IrEF/+4QY97zu/raZaShst73PzaE6kufF8sZQiOujVzjLwN8IY/N7ma9/1 +FGxP/hs/5i+C9z7xyCUV55xEQofLfpPBNAAbsH6z7smRSzC7GJpSy7iSFK4z1H4nHK0 VUnFharXyjVKu08XKwibspoX13K7qhIOEXLWipUdBbGqZRUfQvqGORZ9RyK37l6/v98P WF/H4gCDSLz1A0Y4AxlCGYecPBCSPg0VzdaSklwXNmc9TCcy1MUPZz/6wvZzgTbXax7B kTodCRIcL6qMJ5OiKuKckm4chPSDX2x/oTmGDlwbPNYrbfaOa7hnCkedzXKCeRSpTc8Y TR5w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k2LffBkn; 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 af79cd13be357-798aac9c261si1210700985a.128.2024.06.18.09.11.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:11:59 -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=k2LffBkn; 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 1sJbMP-0000rE-9y; Tue, 18 Jun 2024 12:07:05 -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 1sJbM8-0000R0-VF for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:54 -0400 Received: from mail-lj1-x22b.google.com ([2a00:1450: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 1sJbM4-0007oL-Cx for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:46 -0400 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2e72224c395so57289171fa.3 for ; Tue, 18 Jun 2024 09:06:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726801; x=1719331601; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cymkwF82VC/Hy5B+jHzMH3ViY4En2eCo0AZnv/UEfWU=; b=k2LffBknCEN6MRBQ/V2+LE+k9V9WZ5Ln8KkUNt7ioDXXuGumqcrhrlCfOo9Bdzq2wQ AmGm4cPw+0mgnqRoU7ryfSj9BAm9EQXxAjWp8v+XnQ0ffdanbszDCEtCIs/AEzf0TDEP AYO9SUtkPnvwX8rq2e/qyGixmfFTgUOAIlFMNzgMN1Xpdcjq1YaIHU2lXIkp0KuOufmC hNpeGTFSS6Lo4bub888hPECPsI0Fi6UUemyjklMcIze66ZrNWCxg3o0rKJeHFpdRITgr Fwfh/UNM5MKxrGalufVdGcCTc5RtIaiQ4oohQWVAnUlRqveYJywNbkJG/Q57N36goywn YFOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726801; x=1719331601; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cymkwF82VC/Hy5B+jHzMH3ViY4En2eCo0AZnv/UEfWU=; b=dVKbaFYfTjIINtXYuUiGOsa1PMWiWxapeezcMQEiUuVCbOyo7D0kL+RuMFRILCSkJL f6KrxLa3gvZU+svQnSohbbSvRuSOXaBQtD5sNXBkqOFBC7Xn52B8KtiFAQrXnBmY9Cgm ykwxicGon1NSzot2Qeyfc4PdNZehyc6Xioy/oVHEuRX98eBFVd45vdX//ZJURDNPjEai ThzsLor4+WsYfxSMrevjm+i/cNUq53U/V9cng5UyHH/Ng/4nllo10Jp+RVfNWZ3jKgtq 37giuNudKwpdaXqUxS9uk0EjhpGopLiRgM2rt9T4kX+KQY5Lb0ce1oZGedhqCR7zZ/H+ f2rg== X-Gm-Message-State: AOJu0YwWjnS55aoazIpxo3WLN+EtwBkyF8ov6noDypw7+mEf5Wx2ab03 Jl1EMQFEC1yDbNG8DAXnYnpTuqXTgEqtKpVWXiJyS5ZFrjfj4oOnoXinEQaB/DwaA8L/mihDxA1 m X-Received: by 2002:a05:651c:91:b0:2ec:22c0:66e6 with SMTP id 38308e7fff4ca-2ec3ce9b78cmr2086891fa.7.1718726800962; Tue, 18 Jun 2024 09:06:40 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-422869d4f2esm231014525e9.0.2024.06.18.09.06.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:06:40 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Song Gao , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 62/76] hw/intc: Remove loongarch_ipi.c Date: Tue, 18 Jun 2024 18:00:24 +0200 Message-ID: <20240618160039.36108-63-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22b; envelope-from=philmd@linaro.org; helo=mail-lj1-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 From: Jiaxun Yang It was missed out in previous commit. Fixes: b4a12dfc2132 ("hw/intc/loongarch_ipi: Rename as loongson_ipi") Signed-off-by: Jiaxun Yang Reviewed-by: Song Gao Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240605-loongson3-ipi-v3-1-ddd2c0e03fa3@flygoat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/intc/loongarch_ipi.c | 347 ---------------------------------------- 1 file changed, 347 deletions(-) delete mode 100644 hw/intc/loongarch_ipi.c diff --git a/hw/intc/loongarch_ipi.c b/hw/intc/loongarch_ipi.c deleted file mode 100644 index 44b3b9c138..0000000000 --- a/hw/intc/loongarch_ipi.c +++ /dev/null @@ -1,347 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* - * LoongArch ipi interrupt support - * - * Copyright (C) 2021 Loongson Technology Corporation Limited - */ - -#include "qemu/osdep.h" -#include "hw/boards.h" -#include "hw/sysbus.h" -#include "hw/intc/loongarch_ipi.h" -#include "hw/irq.h" -#include "hw/qdev-properties.h" -#include "qapi/error.h" -#include "qemu/log.h" -#include "exec/address-spaces.h" -#include "migration/vmstate.h" -#include "target/loongarch/cpu.h" -#include "trace.h" - -static MemTxResult loongarch_ipi_readl(void *opaque, hwaddr addr, - uint64_t *data, - unsigned size, MemTxAttrs attrs) -{ - IPICore *s; - LoongArchIPI *ipi = opaque; - uint64_t ret = 0; - int index = 0; - - s = &ipi->cpu[attrs.requester_id]; - addr &= 0xff; - switch (addr) { - case CORE_STATUS_OFF: - ret = s->status; - break; - case CORE_EN_OFF: - ret = s->en; - break; - case CORE_SET_OFF: - ret = 0; - break; - case CORE_CLEAR_OFF: - ret = 0; - break; - case CORE_BUF_20 ... CORE_BUF_38 + 4: - index = (addr - CORE_BUF_20) >> 2; - ret = s->buf[index]; - break; - default: - qemu_log_mask(LOG_UNIMP, "invalid read: %x", (uint32_t)addr); - break; - } - - trace_loongarch_ipi_read(size, (uint64_t)addr, ret); - *data = ret; - return MEMTX_OK; -} - -static void send_ipi_data(CPULoongArchState *env, uint64_t val, hwaddr addr, - MemTxAttrs attrs) -{ - int i, mask = 0, data = 0; - - /* - * bit 27-30 is mask for byte writing, - * if the mask is 0, we need not to do anything. - */ - if ((val >> 27) & 0xf) { - data = address_space_ldl(env->address_space_iocsr, addr, - attrs, NULL); - for (i = 0; i < 4; i++) { - /* get mask for byte writing */ - if (val & (0x1 << (27 + i))) { - mask |= 0xff << (i * 8); - } - } - } - - data &= mask; - data |= (val >> 32) & ~mask; - address_space_stl(env->address_space_iocsr, addr, - data, attrs, NULL); -} - -static int archid_cmp(const void *a, const void *b) -{ - CPUArchId *archid_a = (CPUArchId *)a; - CPUArchId *archid_b = (CPUArchId *)b; - - return archid_a->arch_id - archid_b->arch_id; -} - -static CPUArchId *find_cpu_by_archid(MachineState *ms, uint32_t id) -{ - CPUArchId apic_id, *found_cpu; - - apic_id.arch_id = id; - found_cpu = bsearch(&apic_id, ms->possible_cpus->cpus, - ms->possible_cpus->len, sizeof(*ms->possible_cpus->cpus), - archid_cmp); - - return found_cpu; -} - -static CPUState *ipi_getcpu(int arch_id) -{ - MachineState *machine = MACHINE(qdev_get_machine()); - CPUArchId *archid; - - archid = find_cpu_by_archid(machine, arch_id); - if (archid) { - return CPU(archid->cpu); - } - - return NULL; -} - -static MemTxResult mail_send(uint64_t val, MemTxAttrs attrs) -{ - uint32_t cpuid; - hwaddr addr; - CPUState *cs; - - cpuid = extract32(val, 16, 10); - cs = ipi_getcpu(cpuid); - if (cs == NULL) { - return MEMTX_DECODE_ERROR; - } - - /* override requester_id */ - addr = SMP_IPI_MAILBOX + CORE_BUF_20 + (val & 0x1c); - attrs.requester_id = cs->cpu_index; - send_ipi_data(&LOONGARCH_CPU(cs)->env, val, addr, attrs); - return MEMTX_OK; -} - -static MemTxResult any_send(uint64_t val, MemTxAttrs attrs) -{ - uint32_t cpuid; - hwaddr addr; - CPUState *cs; - - cpuid = extract32(val, 16, 10); - cs = ipi_getcpu(cpuid); - if (cs == NULL) { - return MEMTX_DECODE_ERROR; - } - - /* override requester_id */ - addr = val & 0xffff; - attrs.requester_id = cs->cpu_index; - send_ipi_data(&LOONGARCH_CPU(cs)->env, val, addr, attrs); - return MEMTX_OK; -} - -static MemTxResult loongarch_ipi_writel(void *opaque, hwaddr addr, uint64_t val, - unsigned size, MemTxAttrs attrs) -{ - LoongArchIPI *ipi = opaque; - IPICore *s; - int index = 0; - uint32_t cpuid; - uint8_t vector; - CPUState *cs; - - s = &ipi->cpu[attrs.requester_id]; - addr &= 0xff; - trace_loongarch_ipi_write(size, (uint64_t)addr, val); - switch (addr) { - case CORE_STATUS_OFF: - qemu_log_mask(LOG_GUEST_ERROR, "can not be written"); - break; - case CORE_EN_OFF: - s->en = val; - break; - case CORE_SET_OFF: - s->status |= val; - if (s->status != 0 && (s->status & s->en) != 0) { - qemu_irq_raise(s->irq); - } - break; - case CORE_CLEAR_OFF: - s->status &= ~val; - if (s->status == 0 && s->en != 0) { - qemu_irq_lower(s->irq); - } - break; - case CORE_BUF_20 ... CORE_BUF_38 + 4: - index = (addr - CORE_BUF_20) >> 2; - s->buf[index] = val; - break; - case IOCSR_IPI_SEND: - cpuid = extract32(val, 16, 10); - /* IPI status vector */ - vector = extract8(val, 0, 5); - cs = ipi_getcpu(cpuid); - if (cs == NULL) { - return MEMTX_DECODE_ERROR; - } - - /* override requester_id */ - attrs.requester_id = cs->cpu_index; - loongarch_ipi_writel(ipi, CORE_SET_OFF, BIT(vector), 4, attrs); - break; - default: - qemu_log_mask(LOG_UNIMP, "invalid write: %x", (uint32_t)addr); - break; - } - - return MEMTX_OK; -} - -static const MemoryRegionOps loongarch_ipi_ops = { - .read_with_attrs = loongarch_ipi_readl, - .write_with_attrs = loongarch_ipi_writel, - .impl.min_access_size = 4, - .impl.max_access_size = 4, - .valid.min_access_size = 4, - .valid.max_access_size = 8, - .endianness = DEVICE_LITTLE_ENDIAN, -}; - -/* mail send and any send only support writeq */ -static MemTxResult loongarch_ipi_writeq(void *opaque, hwaddr addr, uint64_t val, - unsigned size, MemTxAttrs attrs) -{ - MemTxResult ret = MEMTX_OK; - - addr &= 0xfff; - switch (addr) { - case MAIL_SEND_OFFSET: - ret = mail_send(val, attrs); - break; - case ANY_SEND_OFFSET: - ret = any_send(val, attrs); - break; - default: - break; - } - - return ret; -} - -static const MemoryRegionOps loongarch_ipi64_ops = { - .write_with_attrs = loongarch_ipi_writeq, - .impl.min_access_size = 8, - .impl.max_access_size = 8, - .valid.min_access_size = 8, - .valid.max_access_size = 8, - .endianness = DEVICE_LITTLE_ENDIAN, -}; - -static void loongarch_ipi_realize(DeviceState *dev, Error **errp) -{ - LoongArchIPI *s = LOONGARCH_IPI(dev); - SysBusDevice *sbd = SYS_BUS_DEVICE(dev); - int i; - - if (s->num_cpu == 0) { - error_setg(errp, "num-cpu must be at least 1"); - return; - } - - memory_region_init_io(&s->ipi_iocsr_mem, OBJECT(dev), &loongarch_ipi_ops, - s, "loongarch_ipi_iocsr", 0x48); - - /* loongarch_ipi_iocsr performs re-entrant IO through ipi_send */ - s->ipi_iocsr_mem.disable_reentrancy_guard = true; - - sysbus_init_mmio(sbd, &s->ipi_iocsr_mem); - - memory_region_init_io(&s->ipi64_iocsr_mem, OBJECT(dev), - &loongarch_ipi64_ops, - s, "loongarch_ipi64_iocsr", 0x118); - sysbus_init_mmio(sbd, &s->ipi64_iocsr_mem); - - s->cpu = g_new0(IPICore, s->num_cpu); - if (s->cpu == NULL) { - error_setg(errp, "Memory allocation for ExtIOICore faile"); - return; - } - - for (i = 0; i < s->num_cpu; i++) { - qdev_init_gpio_out(dev, &s->cpu[i].irq, 1); - } -} - -static const VMStateDescription vmstate_ipi_core = { - .name = "ipi-single", - .version_id = 2, - .minimum_version_id = 2, - .fields = (const VMStateField[]) { - VMSTATE_UINT32(status, IPICore), - VMSTATE_UINT32(en, IPICore), - VMSTATE_UINT32(set, IPICore), - VMSTATE_UINT32(clear, IPICore), - VMSTATE_UINT32_ARRAY(buf, IPICore, IPI_MBX_NUM * 2), - VMSTATE_END_OF_LIST() - } -}; - -static const VMStateDescription vmstate_loongarch_ipi = { - .name = TYPE_LOONGARCH_IPI, - .version_id = 2, - .minimum_version_id = 2, - .fields = (const VMStateField[]) { - VMSTATE_STRUCT_VARRAY_POINTER_UINT32(cpu, LoongArchIPI, num_cpu, - vmstate_ipi_core, IPICore), - VMSTATE_END_OF_LIST() - } -}; - -static Property ipi_properties[] = { - DEFINE_PROP_UINT32("num-cpu", LoongArchIPI, num_cpu, 1), - DEFINE_PROP_END_OF_LIST(), -}; - -static void loongarch_ipi_class_init(ObjectClass *klass, void *data) -{ - DeviceClass *dc = DEVICE_CLASS(klass); - - dc->realize = loongarch_ipi_realize; - device_class_set_props(dc, ipi_properties); - dc->vmsd = &vmstate_loongarch_ipi; -} - -static void loongarch_ipi_finalize(Object *obj) -{ - LoongArchIPI *s = LOONGARCH_IPI(obj); - - g_free(s->cpu); -} - -static const TypeInfo loongarch_ipi_info = { - .name = TYPE_LOONGARCH_IPI, - .parent = TYPE_SYS_BUS_DEVICE, - .instance_size = sizeof(LoongArchIPI), - .class_init = loongarch_ipi_class_init, - .instance_finalize = loongarch_ipi_finalize, -}; - -static void loongarch_ipi_register_types(void) -{ - type_register_static(&loongarch_ipi_info); -} - -type_init(loongarch_ipi_register_types) From patchwork Tue Jun 18 16:00:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805283 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp276627wrx; Tue, 18 Jun 2024 09:12:30 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXuJUeYEi7gwcM59ut8cwZ0OIXEmJ3Vz3USp6VNNfJBbIMpSdU5LEHuEDbYCmZ/wzHnIyidE7bnxfIE7ffg1Vd2 X-Google-Smtp-Source: AGHT+IFiOAdMZKd5H6X+DA5H4TYlaInBeVo163HXGNtEN7/LNwKp9f5xd6CUPn8ftz2csOoNRTlA X-Received: by 2002:a05:620a:1a14:b0:795:5e1b:d0d2 with SMTP id af79cd13be357-79bb3e2d818mr17504485a.22.1718727149798; Tue, 18 Jun 2024 09:12:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727149; cv=none; d=google.com; s=arc-20160816; b=MFeeJBb2os9V8wQLfjOlvCrIY0nhrhNluEnYDO/ip/YBkvAs2R/o/e7clxmljmrdcB H97XnH+dN6zQwZsywBpc173DVbsJiv7CLeIttudubkTxKlru94ZKu3b09aDQh/AqpYWl GXgGrod9GNpnyy4aFJD8DD13vFPnGhE5XrBTaxHUHh/24wvrPmzG38fkWql2nqh1bkSN AIFwEAdxNI/P9+c7jxSOjZ9m+JfChZBzxTMuyX+uywwKv4sPgcIDkaYhtW40eKvwLLI/ Z7LNJYVVrukfCvnQUYUeKXlGUqk+DPW6uo/cgQ/G/PdrzPg5G7WJ9u/Yyd7PIZNyKUuh cQfg== 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:cc:to :from:dkim-signature; bh=rOeXVUMAZHBjW9XDQ/kaolb4y+LTzn2/7YBfwTD0b4w=; fh=OA14dF5uBSva/lf1QnoIY/pZiYFXceo0aTsESKqeglc=; b=dTST1vTncTEc5Yft8S06C4Pmg4trKxVGl8Yw0z8YW4WQcLNoCCYump9VmZe8CX+PxY t7WvYijM+aEJM4ijbyYky7mK5jmf6pb90Le9gnD9trELN/9Z6VbFAhZ/OGl8MEZ9hBUT WRVPbf58uX/4HVMCRhE1XflRX+sjqbVsdLr8O9yRMvy7ncImiV1HwL6Ak5+pzbaUFGxw MsNOow1C6Fvve5FnkKJ3KKrA8YwdMmhhu0HQ/gPREi2u4+QFS6IhVRK8FTP0C0A8R13e W9jE4HFGBYbwrGxGdn9tfRkbCbIY5hHh2UmwsO618hmkP8r/+EzC3CeTVvVJ4SioKIms EOSw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gneVIZUT; 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 af79cd13be357-798ab9f9aacsi1316680585a.257.2024.06.18.09.12.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:12:29 -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=gneVIZUT; 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 1sJbMN-0000g2-TS; Tue, 18 Jun 2024 12:07:03 -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 1sJbMB-0000RW-VD for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:56 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbM8-0007oq-OY for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:51 -0400 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a6f11a2d18aso739220666b.2 for ; Tue, 18 Jun 2024 09:06:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726806; x=1719331606; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rOeXVUMAZHBjW9XDQ/kaolb4y+LTzn2/7YBfwTD0b4w=; b=gneVIZUT5bC/wIv8I8GHGXueWGc1wTmDYrUT3uknGan6hQHrd0kuegJP6JxMKj+Ieh 0dLJ60RZ0jhKM4HFG6jj0FO4nugQwOTUbacuGoMQjgxf+ks9Gg07OMCCcIJ8tcvWknza hKocRA1r+G9brw5pb1Z5JcMsSoHoZedPdYtgsTkwlyfgi8Q/BtDedZqB6pFPp1ZsjRmf nQi6zEPKAKxqihSIK0LFVgWDhUipAyFM7NuXaXRQRqhSOBo8sdwannGgs0Tr/pUFasgK 0NwoZgKsQYYAVXSGmIWrW1XrrmTwcKZTedrLsGBtsoHq5rwXOIMituhmCcFc0JIKYpHt dDTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726806; x=1719331606; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rOeXVUMAZHBjW9XDQ/kaolb4y+LTzn2/7YBfwTD0b4w=; b=gB6a8IN1KSlJ8P9w4W3tBMM+7RwiFtK8V6Hdrhtlb/hQwVJ9RAXRGVTpcBYoHGGWKF wP4+VF10Yni+84K3gH5Lhn7lJzflaHlNP+PdI2Q5q07K/hZfDcSisPnPz6nFfNP/gehg OEVYd6AXJt6T71sLC6G03D98/AoPb6kHcwcGuriPkRReFoxRcUvLoN0bTgFPnhj+EcYj VmjZi/9x2f6pnd3bfVgezHnnopYQ8/JXXUjCBl6RowG5mH6vmNbdfjZ0qOX4RoAFaWVt kD9A7jEQJJQDVbfE2rzTTwIdflugTqy/1zLIfoIxMi/kWaHGeLlMX1V3FCDOacU/nIAZ ZNJg== X-Gm-Message-State: AOJu0YyPgvSxDyIWRXFanuMOL9F41DP9HBpN5v5GkEyx2s934yejB+Ug 6PDzYRP3NcM5JC8msptODAGlcP9CoacDoTMiQp5AnKwce54AyAEvzHiPGKtnnaDDkRe9rIWHwA+ 4 X-Received: by 2002:a17:906:3890:b0:a6f:4fc8:265f with SMTP id a640c23a62f3a-a6f60d41459mr745614766b.42.1718726806557; Tue, 18 Jun 2024 09:06:46 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-360917c264bsm7145160f8f.56.2024.06.18.09.06.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:06:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Song Gao , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 63/76] hw/intc/loongson_ipi: Provide per core MMIO address spaces Date: Tue, 18 Jun 2024 18:00:25 +0200 Message-ID: <20240618160039.36108-64-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=philmd@linaro.org; helo=mail-ej1-x62f.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 From: Jiaxun Yang The real IPI hardware have dedicated MMIO registers mapped into memory address space for every core. This is not used by LoongArch guest software but it is essential for CPU without IOCSR such as Loongson-3A1000. Implement it with existing infrastructure. Acked-by: Song Gao Signed-off-by: Jiaxun Yang Message-ID: <20240605-loongson3-ipi-v3-2-ddd2c0e03fa3@flygoat.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/intc/loongson_ipi.h | 2 + hw/intc/loongson_ipi.c | 86 +++++++++++++++++++++++++--------- 2 files changed, 67 insertions(+), 21 deletions(-) diff --git a/include/hw/intc/loongson_ipi.h b/include/hw/intc/loongson_ipi.h index 2c0e8820f5..3f795edbf3 100644 --- a/include/hw/intc/loongson_ipi.h +++ b/include/hw/intc/loongson_ipi.h @@ -34,6 +34,8 @@ OBJECT_DECLARE_SIMPLE_TYPE(LoongsonIPI, LOONGSON_IPI) typedef struct IPICore { + LoongsonIPI *ipi; + MemoryRegion *ipi_mmio_mem; uint32_t status; uint32_t en; uint32_t set; diff --git a/hw/intc/loongson_ipi.c b/hw/intc/loongson_ipi.c index 93cc50a37a..08a74a0b4f 100644 --- a/hw/intc/loongson_ipi.c +++ b/hw/intc/loongson_ipi.c @@ -23,16 +23,14 @@ #endif #include "trace.h" -static MemTxResult loongson_ipi_readl(void *opaque, hwaddr addr, - uint64_t *data, - unsigned size, MemTxAttrs attrs) +static MemTxResult loongson_ipi_core_readl(void *opaque, hwaddr addr, + uint64_t *data, + unsigned size, MemTxAttrs attrs) { - IPICore *s; - LoongsonIPI *ipi = opaque; + IPICore *s = opaque; uint64_t ret = 0; int index = 0; - s = &ipi->cpu[attrs.requester_id]; addr &= 0xff; switch (addr) { case CORE_STATUS_OFF: @@ -61,6 +59,21 @@ static MemTxResult loongson_ipi_readl(void *opaque, hwaddr addr, return MEMTX_OK; } +static MemTxResult loongson_ipi_iocsr_readl(void *opaque, hwaddr addr, + uint64_t *data, + unsigned size, MemTxAttrs attrs) +{ + LoongsonIPI *ipi = opaque; + IPICore *s; + + if (attrs.requester_id >= ipi->num_cpu) { + return MEMTX_DECODE_ERROR; + } + + s = &ipi->cpu[attrs.requester_id]; + return loongson_ipi_core_readl(s, addr, data, size, attrs); +} + static AddressSpace *get_cpu_iocsr_as(CPUState *cpu) { #ifdef TARGET_LOONGARCH64 @@ -174,17 +187,17 @@ static MemTxResult any_send(uint64_t val, MemTxAttrs attrs) return send_ipi_data(cs, val, addr, attrs); } -static MemTxResult loongson_ipi_writel(void *opaque, hwaddr addr, uint64_t val, - unsigned size, MemTxAttrs attrs) +static MemTxResult loongson_ipi_core_writel(void *opaque, hwaddr addr, + uint64_t val, unsigned size, + MemTxAttrs attrs) { - LoongsonIPI *ipi = opaque; - IPICore *s; + IPICore *s = opaque; + LoongsonIPI *ipi = s->ipi; int index = 0; uint32_t cpuid; uint8_t vector; CPUState *cs; - s = &ipi->cpu[attrs.requester_id]; addr &= 0xff; trace_loongson_ipi_write(size, (uint64_t)addr, val); switch (addr) { @@ -215,13 +228,11 @@ static MemTxResult loongson_ipi_writel(void *opaque, hwaddr addr, uint64_t val, /* IPI status vector */ vector = extract8(val, 0, 5); cs = ipi_getcpu(cpuid); - if (cs == NULL) { + if (cs == NULL || cs->cpu_index >= ipi->num_cpu) { return MEMTX_DECODE_ERROR; } - - /* override requester_id */ - attrs.requester_id = cs->cpu_index; - loongson_ipi_writel(ipi, CORE_SET_OFF, BIT(vector), 4, attrs); + loongson_ipi_core_writel(&ipi->cpu[cs->cpu_index], CORE_SET_OFF, + BIT(vector), 4, attrs); break; default: qemu_log_mask(LOG_UNIMP, "invalid write: %x", (uint32_t)addr); @@ -231,9 +242,34 @@ static MemTxResult loongson_ipi_writel(void *opaque, hwaddr addr, uint64_t val, return MEMTX_OK; } -static const MemoryRegionOps loongson_ipi_ops = { - .read_with_attrs = loongson_ipi_readl, - .write_with_attrs = loongson_ipi_writel, +static MemTxResult loongson_ipi_iocsr_writel(void *opaque, hwaddr addr, + uint64_t val, unsigned size, + MemTxAttrs attrs) +{ + LoongsonIPI *ipi = opaque; + IPICore *s; + + if (attrs.requester_id >= ipi->num_cpu) { + return MEMTX_DECODE_ERROR; + } + + s = &ipi->cpu[attrs.requester_id]; + return loongson_ipi_core_writel(s, addr, val, size, attrs); +} + +static const MemoryRegionOps loongson_ipi_core_ops = { + .read_with_attrs = loongson_ipi_core_readl, + .write_with_attrs = loongson_ipi_core_writel, + .impl.min_access_size = 4, + .impl.max_access_size = 4, + .valid.min_access_size = 4, + .valid.max_access_size = 8, + .endianness = DEVICE_LITTLE_ENDIAN, +}; + +static const MemoryRegionOps loongson_ipi_iocsr_ops = { + .read_with_attrs = loongson_ipi_iocsr_readl, + .write_with_attrs = loongson_ipi_iocsr_writel, .impl.min_access_size = 4, .impl.max_access_size = 4, .valid.min_access_size = 4, @@ -282,7 +318,8 @@ static void loongson_ipi_realize(DeviceState *dev, Error **errp) return; } - memory_region_init_io(&s->ipi_iocsr_mem, OBJECT(dev), &loongson_ipi_ops, + memory_region_init_io(&s->ipi_iocsr_mem, OBJECT(dev), + &loongson_ipi_iocsr_ops, s, "loongson_ipi_iocsr", 0x48); /* loongson_ipi_iocsr performs re-entrant IO through ipi_send */ @@ -297,11 +334,18 @@ static void loongson_ipi_realize(DeviceState *dev, Error **errp) s->cpu = g_new0(IPICore, s->num_cpu); if (s->cpu == NULL) { - error_setg(errp, "Memory allocation for ExtIOICore faile"); + error_setg(errp, "Memory allocation for IPICore faile"); return; } for (i = 0; i < s->num_cpu; i++) { + s->cpu[i].ipi = s; + s->cpu[i].ipi_mmio_mem = g_new0(MemoryRegion, 1); + g_autofree char *name = g_strdup_printf("loongson_ipi_cpu%d_mmio", i); + memory_region_init_io(s->cpu[i].ipi_mmio_mem, OBJECT(dev), + &loongson_ipi_core_ops, &s->cpu[i], name, 0x48); + sysbus_init_mmio(sbd, s->cpu[i].ipi_mmio_mem); + qdev_init_gpio_out(dev, &s->cpu[i].irq, 1); } } From patchwork Tue Jun 18 16:00:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805255 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp275198wrx; Tue, 18 Jun 2024 09:09:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVXZhh4+5ZVsXT72E2d9CUp2zjBOW5GCbuHxfkyfMlAV3/qqIya/MWgNMTVr4/z1igHUA+GSnCGxVpL4Xt4LFMy X-Google-Smtp-Source: AGHT+IFexHXJ4TpwXxsF2w4QW/VxUpGX74gBhjq2uhrDbU09/rDpU130hhmeOn5UoerS0wXjW+e+ X-Received: by 2002:a05:620a:2949:b0:795:5bdb:44ca with SMTP id af79cd13be357-79bb3e2da28mr15429385a.18.1718726998595; Tue, 18 Jun 2024 09:09:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726998; cv=none; d=google.com; s=arc-20160816; b=XlY9q7GZLhuE6g4Fjx1u02hOflI/5HuA2Gq+MZV5aQWuFwYAg01vlEyXri3KZPfLbM IFskTpAlVZPu9MdCFcEB9ubGau6bZeKO4mfGpVNjD08aRthxBEI+W/gTqNwEb6xaIL4t DGKbj3C83Rqawrt8zJO+BzMRpMFBhNGgA22MfU1vJXUSNVWgo0Ze6vE8gH2u5JTiwVrM /z5upLeMnVjWN2iPdC+U8Czb+f04egxLP1cu1o4/oma9J59mQhjxlFvMMyFUprTZsgIZ ZmpAN+cEUig0zKVK9QMA5yIjOR6dvSxdoJaN3WoSSmYs7a4AtVXPqaUDDMIcgjPWSO+x 8vzA== 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:cc:to :from:dkim-signature; bh=hte3egNIkJ/sFzULQkXNn/TRVVq6KAGN1byrZgRqcoo=; fh=OA14dF5uBSva/lf1QnoIY/pZiYFXceo0aTsESKqeglc=; b=jCPthhocRXT5zYKuLcFy8wjfqL2fG/BftAH8fUgxTLsRaY7ZF51j1ZRb3By/w32UcL FvnXLMJ/JVjS7J4w0AleNNa/A1L1pMlNq4DOV8f6WN36BHEH7uuoeCDm6RdaGGfRtxUA 7PGI72nPAkze8QK9CQINnle83gfqEAJx3suUGfgdkvAFVBKetIQvEDiiiJ1fBHW2A0d/ rDZyKUu8HFx77fSqZy8T/IQkvJ8y0NYJaUk5cwIr1E++oiOhJen28l37XcA7+4Dj4ya+ XYiTqNho265AzJjgdFs6lJn0/hI2HfG4dSTfEeyGbloNMqaXLVFouHz6eEqP4Gg+Y3Ei T6mQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RkTVKHrP; 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 af79cd13be357-798aadc3806si1234628985a.185.2024.06.18.09.09.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:09:58 -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=RkTVKHrP; 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 1sJbMQ-0001Bz-V2; Tue, 18 Jun 2024 12:07:07 -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 1sJbMF-0000UT-FF for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:56 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbMD-0007pI-RY for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:06:55 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-42281d8cd2dso39992775e9.3 for ; Tue, 18 Jun 2024 09:06:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726812; x=1719331612; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hte3egNIkJ/sFzULQkXNn/TRVVq6KAGN1byrZgRqcoo=; b=RkTVKHrP8jQnl4Moe7m8vNYOoYo8ZyAOE468q+ciVzgKtYF1F4N2AHxubiO9z3OOA/ uRdWng9uIgv6K9rzFLY7mxWiiczgykk7W/n0bza0JLzt3kkIoBpQX51LTbTMm1NZQKUd z9W4gLhnn0YYQKdjCI9+GT3Fuzq5TshCVNyEU41VR2y/HJpocS0jjIDZWknVNssmQMCL K+SX1q8xCYBM1xIvdUyC1TIeQQYUTLzN59/mooJoc6jalG6qB4j9vH5LXHGXno5qTLdF YRYUl+6AtHfwWA4Z/iIqnOWEogQj72Im31nEDk2Lx7Rap+z9NRDhiDIsDuRDjOgi14ge 1W2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726812; x=1719331612; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hte3egNIkJ/sFzULQkXNn/TRVVq6KAGN1byrZgRqcoo=; b=jXXed5dQrqsalNEmpkbdepz2JW2qAErkOsZYQx9uzc5yhgVTXo0VLzgFferH56PI9P OmHlVTWxijp3YDzgwSKvvK/CpWgm9HlqLd+9VvSnM+eB10UDZYm/prYmDN+Op1ynomXC 1gGIfM5vL4k7kmY5x4cRCy6f3SAV/u5z0TD/GG2K8opkc4EV+nnelzr+myy7K4ffCVQv DUK08SI/QIDW6o+SoTTZTb/FVz+2ZTrHFnNId5Jn8bpCsbGZu4+X84ZOKx59a9TzTVdm tVrMtTqV5LuLN9r67qEppSfS6oClMQcSGReIq7nIp0cTzMkBCcp1vqzteYG6KWVtn/QH HS0g== X-Gm-Message-State: AOJu0YxzNBvEXvjMMC8th5KPCVQ1GIEro9y7eG4t6OilKxrS1WxlbbSk 7dhR0iRtqQoaruVjzqNDuJSoG6Mr+xgEeg1CD1j39s3Z5uMvC615OziWN0+wozgkPBgKhddECbw L X-Received: by 2002:a05:600c:2e51:b0:41b:f979:e19b with SMTP id 5b1f17b1804b1-42304854eeamr106019825e9.39.1718726812035; Tue, 18 Jun 2024 09:06:52 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-422f641a633sm193554665e9.43.2024.06.18.09.06.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:06:51 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Song Gao , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 64/76] hw/intc/loongson_ipi: Replace ipi_getcpu with cpu_by_arch_id Date: Tue, 18 Jun 2024 18:00:26 +0200 Message-ID: <20240618160039.36108-65-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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 From: Jiaxun Yang cpu_by_arch_id is doing the same thing as our ipi_getcpu logic. Signed-off-by: Jiaxun Yang Reviewed-by: Song Gao Message-ID: <20240605-loongson3-ipi-v3-4-ddd2c0e03fa3@flygoat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/intc/loongson_ipi.c | 39 +++------------------------------------ 1 file changed, 3 insertions(+), 36 deletions(-) diff --git a/hw/intc/loongson_ipi.c b/hw/intc/loongson_ipi.c index 08a74a0b4f..e6a7142480 100644 --- a/hw/intc/loongson_ipi.c +++ b/hw/intc/loongson_ipi.c @@ -118,39 +118,6 @@ static MemTxResult send_ipi_data(CPUState *cpu, uint64_t val, hwaddr addr, return MEMTX_OK; } -static int archid_cmp(const void *a, const void *b) -{ - CPUArchId *archid_a = (CPUArchId *)a; - CPUArchId *archid_b = (CPUArchId *)b; - - return archid_a->arch_id - archid_b->arch_id; -} - -static CPUArchId *find_cpu_by_archid(MachineState *ms, uint32_t id) -{ - CPUArchId apic_id, *found_cpu; - - apic_id.arch_id = id; - found_cpu = bsearch(&apic_id, ms->possible_cpus->cpus, - ms->possible_cpus->len, sizeof(*ms->possible_cpus->cpus), - archid_cmp); - - return found_cpu; -} - -static CPUState *ipi_getcpu(int arch_id) -{ - MachineState *machine = MACHINE(qdev_get_machine()); - CPUArchId *archid; - - archid = find_cpu_by_archid(machine, arch_id); - if (archid) { - return CPU(archid->cpu); - } - - return NULL; -} - static MemTxResult mail_send(uint64_t val, MemTxAttrs attrs) { uint32_t cpuid; @@ -158,7 +125,7 @@ static MemTxResult mail_send(uint64_t val, MemTxAttrs attrs) CPUState *cs; cpuid = extract32(val, 16, 10); - cs = ipi_getcpu(cpuid); + cs = cpu_by_arch_id(cpuid); if (cs == NULL) { return MEMTX_DECODE_ERROR; } @@ -176,7 +143,7 @@ static MemTxResult any_send(uint64_t val, MemTxAttrs attrs) CPUState *cs; cpuid = extract32(val, 16, 10); - cs = ipi_getcpu(cpuid); + cs = cpu_by_arch_id(cpuid); if (cs == NULL) { return MEMTX_DECODE_ERROR; } @@ -227,7 +194,7 @@ static MemTxResult loongson_ipi_core_writel(void *opaque, hwaddr addr, cpuid = extract32(val, 16, 10); /* IPI status vector */ vector = extract8(val, 0, 5); - cs = ipi_getcpu(cpuid); + cs = cpu_by_arch_id(cpuid); if (cs == NULL || cs->cpu_index >= ipi->num_cpu) { return MEMTX_DECODE_ERROR; } From patchwork Tue Jun 18 16:00:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805258 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp275393wrx; Tue, 18 Jun 2024 09:10:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUkhPftBQL3tKf2361lTGQMCIfni9kwc778oCcZjZCNL8rtRRmUdc/XPTo4TETDMS+bFfa6L4mB6D6j4s7C0VDN X-Google-Smtp-Source: AGHT+IHvsK8wiKOmx7DPW9ZORmUV3Otb5cGhlSYMPZXCqxN2rdvsZ5bKIWSOOYXt7QE1q0JjS3gZ X-Received: by 2002:ad4:452b:0:b0:6b2:c840:7a2 with SMTP id 6a1803df08f44-6b501ea9e87mr1929206d6.45.1718727018111; Tue, 18 Jun 2024 09:10:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727018; cv=none; d=google.com; s=arc-20160816; b=r0oJYN7v7wp3uWFzbL8EpYWi4oxoUead4zcrF5IydXyR1nz6uGdc3JE31QOtZbL9Ir eJdaOKSzH7B2hOQMDP9q5h66NKuHZTuHPcqCVMIa1VEk49JgYE4bsqjccVTkeBtP3qlc zVeiUpP5W9rOfLEOxAg5eq3E54TLMeI46dAz8t+b1W2APY5WWg7AUNkyQGXbeOujN3XK inBct/qRQ2Ec2Jc9JWZwS1D642E7r+4uY1PuvWgXyqb8cpe6Brj7hcDP38LKn5Wyk/oF biAy0EES/kgV97xphvEMh13sg+YjRBK4ngbOnuQUwwT7sgDaQBlZ9aAsCuaXIFvsJ0i9 BCbQ== 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:cc:to :from:dkim-signature; bh=UdyOIVb0kwKldvxXufDtNTljWmLNSVsoqAXvT0XU1zs=; fh=OA14dF5uBSva/lf1QnoIY/pZiYFXceo0aTsESKqeglc=; b=URqKwPvVqVaEfoe98CpogXZb47l7Hu5zFE7LOp3fo3S12Bl5+nbB630QCgu/luEs1w Xl5eSXY4btiQLyfSs0pJ///SDFGjn4mCSbkp9lzqkUypOOHO7ZezbQgwleGYkrd0syXd 9H+a0XvJbOfL7iAneX3cet9sJblhGIt2oD4KMJqtIrLq65psHDw4698WUEx+xmU4G7KL ICbWEFqguKgsRRIJJmjRYD52vtTBAQRIEKCwnOiiPNaoqZn023bLdegXlmiRMZi5IB29 yz/0HpS03egg/NfPWguBE6Nkbms+KlLil28usW24HzytG3XcuY1MkOE8tY3LB2UTmwqV yMHA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QV2SMnwk; 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 6a1803df08f44-6b2a5afd4absi126174686d6.298.2024.06.18.09.10.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:10:18 -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=QV2SMnwk; 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 1sJbMT-0001ac-Fu; Tue, 18 Jun 2024 12:07:09 -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 1sJbMM-0000ZR-2N for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:07:02 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbMJ-0007qe-Tr for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:07:01 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-42108856c33so41031105e9.1 for ; Tue, 18 Jun 2024 09:06:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726817; x=1719331617; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UdyOIVb0kwKldvxXufDtNTljWmLNSVsoqAXvT0XU1zs=; b=QV2SMnwkbqvLOU0cMEnRZf1RrdKfoDXzUX+utuWZXVEDhGExHLIS6cDe3xV0h9P/iO XeWJLdCRkJi6cuc+OQOjjqckGxvLtUIe2p23vAM4sY9GD2q2FrEFb+2Utxw/qRhUiGPp 6jy9eotntk9IpyhYnm1HRJ1MPBNEgWk3PbNxoWrYCV2leR3dZXllphkhd1gqThwGWGAl PVfWmpNJqmw9KIIQhHoyUQqt8oWKmcITMJPTZUkPXizHe0I3UZ4TzgSVYnYM1nUZCdho 7qEkN8mpdKNIbnuZ5pIjtEocA3I4Dv4ehdzt3YiQ8FuTHzPc2v+lcpCyHsR/di0xbMgb glRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726817; x=1719331617; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UdyOIVb0kwKldvxXufDtNTljWmLNSVsoqAXvT0XU1zs=; b=ekf8vBvSwt/vhw8GSlaiTCu2pDMplMQEzsqBkHuWv1TQaHoeft8IWhmBzOI8moaLmS NUlhQ315cWVil5R6HV/TVRRk9J8dax3qXfZ26ipcJC/Ehs1V6X6cTAm5fSCGBWgU1Pmr /vPVGlaxBjKMFObxE6nuvTd696yRqblD1kvLeHFAcddruu/p8//3EnWI9oJyNQZA1Uph lNocO4UKUOg+jApZrBKoLOq1PV5f/wgSD5nkKeo/qwNeC/sr+hQw/0LWz6hacCusZ8ua OhGpSaUhQVkuSudy6i95HmZ7sOMzhh9Ez9hcH3tI6W7rU0Mvz/cb4JsbAtlwAUTSJVKG eqcQ== X-Gm-Message-State: AOJu0YxaiLI3QqmKDdg5PRQLIBgss1Uo6OqZiw/O4AGBBgsVnXK+yz6Z UAbECklgCIAlJNm9PYmmGj675AouNVjd7QLROfhykrdGfOKKNii6/Z/o9evq5PPTEz45Tx0rcNc b X-Received: by 2002:adf:fa81:0:b0:362:8f0f:1c7c with SMTP id ffacd0b85a97d-3630191cb58mr322903f8f.33.1718726817413; Tue, 18 Jun 2024 09:06:57 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3631488c450sm49823f8f.60.2024.06.18.09.06.56 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:06:57 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , Song Gao , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 65/76] hw/mips/loongson3_virt: Wire up loongson_ipi device Date: Tue, 18 Jun 2024 18:00:27 +0200 Message-ID: <20240618160039.36108-66-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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 From: Jiaxun Yang Wire up loongson_ipi device for loongson3_virt machine, so we can have SMP support for TCG backend as well. Signed-off-by: Jiaxun Yang Acked-by: Song Gao Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240605-loongson3-ipi-v3-3-ddd2c0e03fa3@flygoat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/loongson3_bootp.h | 3 +++ hw/mips/loongson3_bootp.c | 2 -- hw/mips/loongson3_virt.c | 39 +++++++++++++++++++++++++++++++++++++-- hw/mips/Kconfig | 1 + 4 files changed, 41 insertions(+), 4 deletions(-) diff --git a/hw/mips/loongson3_bootp.h b/hw/mips/loongson3_bootp.h index 1b0dd3b591..9091265df7 100644 --- a/hw/mips/loongson3_bootp.h +++ b/hw/mips/loongson3_bootp.h @@ -200,6 +200,8 @@ struct boot_params { struct efi_reset_system_t reset_system; }; +#define LOONGSON3_CORE_PER_NODE 4 + /* Overall MMIO & Memory layout */ enum { VIRT_LOWMEM, @@ -211,6 +213,7 @@ enum { VIRT_BIOS_ROM, VIRT_UART, VIRT_LIOINTC, + VIRT_IPI, VIRT_PCIE_MMIO, VIRT_HIGHMEM }; diff --git a/hw/mips/loongson3_bootp.c b/hw/mips/loongson3_bootp.c index 03a10b63c1..b97b81903b 100644 --- a/hw/mips/loongson3_bootp.c +++ b/hw/mips/loongson3_bootp.c @@ -25,8 +25,6 @@ #include "hw/boards.h" #include "hw/mips/loongson3_bootp.h" -#define LOONGSON3_CORE_PER_NODE 4 - static void init_cpu_info(void *g_cpuinfo, uint64_t cpu_freq) { struct efi_cpuinfo_loongson *c = g_cpuinfo; diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c index 440268a074..4ad36f0c5b 100644 --- a/hw/mips/loongson3_virt.c +++ b/hw/mips/loongson3_virt.c @@ -36,6 +36,7 @@ #include "hw/mips/loongson3_bootp.h" #include "hw/misc/unimp.h" #include "hw/intc/i8259.h" +#include "hw/intc/loongson_ipi.h" #include "hw/loader.h" #include "hw/isa/superio.h" #include "hw/pci/msi.h" @@ -74,6 +75,7 @@ const MemMapEntry virt_memmap[] = { [VIRT_PCIE_ECAM] = { 0x1a000000, 0x2000000 }, [VIRT_BIOS_ROM] = { 0x1fc00000, 0x200000 }, [VIRT_UART] = { 0x1fe001e0, 0x8 }, + [VIRT_IPI] = { 0x3ff01000, 0x400 }, [VIRT_LIOINTC] = { 0x3ff01400, 0x64 }, [VIRT_PCIE_MMIO] = { 0x40000000, 0x40000000 }, [VIRT_HIGHMEM] = { 0x80000000, 0x0 }, /* Variable */ @@ -485,6 +487,7 @@ static void mips_loongson3_virt_init(MachineState *machine) Clock *cpuclk; CPUMIPSState *env; DeviceState *liointc; + DeviceState *ipi = NULL; char *filename; const char *kernel_cmdline = machine->kernel_cmdline; const char *kernel_filename = machine->kernel_filename; @@ -494,6 +497,7 @@ static void mips_loongson3_virt_init(MachineState *machine) MemoryRegion *ram = g_new(MemoryRegion, 1); MemoryRegion *bios = g_new(MemoryRegion, 1); MemoryRegion *iomem = g_new(MemoryRegion, 1); + MemoryRegion *iocsr = g_new(MemoryRegion, 1); /* TODO: TCG will support all CPU types */ if (!kvm_enabled()) { @@ -527,6 +531,19 @@ static void mips_loongson3_virt_init(MachineState *machine) create_unimplemented_device("mmio fallback 0", 0x10000000, 256 * MiB); create_unimplemented_device("mmio fallback 1", 0x30000000, 256 * MiB); + memory_region_init(iocsr, OBJECT(machine), "loongson3.iocsr", UINT32_MAX); + + /* IPI controller is in kernel for KVM */ + if (!kvm_enabled()) { + ipi = qdev_new(TYPE_LOONGSON_IPI); + qdev_prop_set_uint32(ipi, "num-cpu", machine->smp.cpus); + sysbus_realize_and_unref(SYS_BUS_DEVICE(ipi), &error_fatal); + memory_region_add_subregion(iocsr, SMP_IPI_MAILBOX, + sysbus_mmio_get_region(SYS_BUS_DEVICE(ipi), 0)); + memory_region_add_subregion(iocsr, MAIL_SEND_ADDR, + sysbus_mmio_get_region(SYS_BUS_DEVICE(ipi), 1)); + } + liointc = qdev_new("loongson.liointc"); sysbus_realize_and_unref(SYS_BUS_DEVICE(liointc), &error_fatal); @@ -543,6 +560,8 @@ static void mips_loongson3_virt_init(MachineState *machine) clock_set_hz(cpuclk, DEF_LOONGSON3_FREQ); for (i = 0; i < machine->smp.cpus; i++) { + int node = i / LOONGSON3_CORE_PER_NODE; + int core = i % LOONGSON3_CORE_PER_NODE; int ip; /* init CPUs */ @@ -553,12 +572,28 @@ static void mips_loongson3_virt_init(MachineState *machine) cpu_mips_clock_init(cpu); qemu_register_reset(main_cpu_reset, cpu); - if (i >= 4) { + if (ipi) { + hwaddr base = ((hwaddr)node << 44) + virt_memmap[VIRT_IPI].base; + base += core * 0x100; + qdev_connect_gpio_out(ipi, i, cpu->env.irq[6]); + sysbus_mmio_map(SYS_BUS_DEVICE(ipi), i + 2, base); + } + + if (ase_lcsr_available(&MIPS_CPU(cpu)->env)) { + MemoryRegion *core_iocsr = g_new(MemoryRegion, 1); + g_autofree char *name = g_strdup_printf("core%d_iocsr", i); + memory_region_init_alias(core_iocsr, OBJECT(cpu), name, + iocsr, 0, UINT32_MAX); + memory_region_add_subregion(&MIPS_CPU(cpu)->env.iocsr.mr, + 0, core_iocsr); + } + + if (node > 0) { continue; /* Only node-0 can be connected to LIOINTC */ } for (ip = 0; ip < 4 ; ip++) { - int pin = i * 4 + ip; + int pin = core * LOONGSON3_CORE_PER_NODE + ip; sysbus_connect_irq(SYS_BUS_DEVICE(liointc), pin, cpu->env.irq[ip + 2]); } diff --git a/hw/mips/Kconfig b/hw/mips/Kconfig index a7f26edebe..692bede538 100644 --- a/hw/mips/Kconfig +++ b/hw/mips/Kconfig @@ -67,6 +67,7 @@ config LOONGSON3V imply USB_OHCI_PCI select SERIAL select GOLDFISH_RTC + select LOONGSON_IPI select LOONGSON_LIOINTC select PCI_EXPRESS_GENERIC_BRIDGE select MSI_NONBROKEN From patchwork Tue Jun 18 16:00:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805250 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp274980wrx; Tue, 18 Jun 2024 09:09:40 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVECBT7Ktmk7Smt3CDDYOEhPtMZFbcehYA7GCA0uB0XqA1oM0gf6fKgoU6QuGL5Bh6yppal/MyAzpEQM4mNiL/L X-Google-Smtp-Source: AGHT+IHYNNctfmwCHRynNII2XZC1sfoF9iwg/gE645ivtULs3HJPZ0RG4WSXgr1gQ2o5mBw4DEuE X-Received: by 2002:a05:620a:3906:b0:795:36b8:24ca with SMTP id af79cd13be357-79bb3e3d709mr16595485a.21.1718726979891; Tue, 18 Jun 2024 09:09:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726979; cv=none; d=google.com; s=arc-20160816; b=FHcH8o2eTQCkss2uw0U9uTVTI+J5KB+D75PQI4ICQ1FWvX+gGl/sfS64tQDpRRPEUN b7AX3g3//3UjGDLWmDahtSeMthHAZztimj+7Gwlr8UiaV4igQ8zxEcwFkvl1QIYvStbP gqJ2LTo61xmPzDAd8xW/qIC5fIfMVij13WeeRyO4Sy+Xx/mPgPGrWhHWuvAmmWSqw+5u DeK5SMGWQoAz0/CHoyEWLUdBSML8+FEjwe77Atgik0chgsbokHrY0+U+IC3xGQ3eMy2a rCKXhCoZL1g8Ca7T9JlavTfkHbKwTyW94l7i7UoldLoRifqeUFll/dY1uUMX7YDVe9n7 LWLA== 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:cc:to :from:dkim-signature; bh=hkNlA20kHSDOIhmvlUTbRhNSgQ9/ouK3bJTAy3+65gs=; fh=7pAJ/JzK0JeXy9rTMidVcRJ/xp+yDkh4jef9lXv4k6c=; b=vmQbh1eOFRFOKw6sdX2YfhwZmzHJIE/vD7/mBX4kXAfC5wE9HVknvF3JVCJcHasNWe BS1lDO5PxY5CGD9k+IG92mXKb8dvQvr5aG+9XyRZAt5I+dbGBOqOkvcYCJ9EKjf40dea S0XVqobQHyOUQluUDjzESu28zRrtRI8r6q+WEYkP+11sGv8tpnFHs/mRLBBLT6hygS21 j+/Y1WdG6f5UtVFKg6/XeqRZw2xipwgW2Xh0NZJTBmaaQ4ymzZhXq59sra4s1gZNKRZk hc2wvEXcm7wft7kDHvlEVBxVYpzq70ozSc9CsGPJiWSKHLFx6TgbANz7luKHXlPh0dNC f3cQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="K7mxt/1d"; 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 d75a77b69052e-441f2fddb8esi135594011cf.518.2024.06.18.09.09.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:09:39 -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="K7mxt/1d"; 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 1sJbMT-0001YD-8P; Tue, 18 Jun 2024 12:07:09 -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 1sJbMR-0001H7-4u for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:07:07 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbMO-0007uG-VW for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:07:06 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-35f236a563cso4389520f8f.2 for ; Tue, 18 Jun 2024 09:07:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726822; x=1719331622; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hkNlA20kHSDOIhmvlUTbRhNSgQ9/ouK3bJTAy3+65gs=; b=K7mxt/1dw2SasnYObYDz1LqPBxiGDT7KbiimwIS9whMbTdkxl2hhvWLpZ8ug2nujR9 KTnU5mhDCyCIXF1mEzDKdBhSOxgi01gGHrwWMIVuda/m0tLkoiLnw+ZFGnmqFLhsHifK tiBJ4+NRNcP3WK4X22XhO8C5B1lMKo5a4S3vVtKcOthpIz4wOxG25GxL1fJ//fMy1Xt9 +bgqMN0wyJRI65LFEmRKCuDPQCgZzdjOuRFE93XnoFeYThKdu13XYnaLeD5xirmEKIZG xBVsAaVda7EwZn4e8oWRwseG+bC+osD3VKm5ee0ZOI3hRIVxga5jt7eQcQBm4XtWylvx Nz8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726822; x=1719331622; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hkNlA20kHSDOIhmvlUTbRhNSgQ9/ouK3bJTAy3+65gs=; b=mOhDDsJv5cutSfpq0ydJeyBpjjprXT2XyRZBIZ7omzrTfccddVcfSf9E/9MPyMC7M7 X7VGf/BhOZy5JjE9cEQnp9x3kofcseD3wZxmlEvM4HxyBv9Fa2L9Amkn/f1jmWrkoE+6 tOKBH5/YtugpGo/XDAQomZ+4C+j64esfSQ77xlfOF2daJ750OFi/uMEACJcueIIXWJ1d h/qOBN0no1Wht2kIUR81WDFuZfy/kcV8ahao73Wzt0PsY/tN4bQhrwQmPUMr0t7p4Ac7 z3oZ4guHeT6CxTrmxuCjZJxk4mhV+fTbGiNpwVhWjVqo9RxsclfFC1mCzwudF7QycUoz AcAg== X-Gm-Message-State: AOJu0YxuHucdRsftwQsvMX6zcui8glP28TdWLtx6W+6vKLJjdV8HdvVs C8T9nkzEVad+wDt/9fF3wZTyLOyFVtncsczH4aEi9Zn8xpVVTUWucwt2jNWl2TDpweRZafuv0jb 8 X-Received: by 2002:a05:6000:104:b0:35f:2774:9c2f with SMTP id ffacd0b85a97d-363192d07bcmr16723f8f.49.1718726822753; Tue, 18 Jun 2024 09:07:02 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3607a43eedfsm12693341f8f.78.2024.06.18.09.07.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:07:02 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Paolo Bonzini Subject: [PULL 66/76] hw/s390x: Introduce s390_skeys_get|set() helpers Date: Tue, 18 Jun 2024 18:00:28 +0200 Message-ID: <20240618160039.36108-67-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.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 s390_skeys_set() dispatch to S390SKeysClass::set_skeys(), and s390_skeys_get() to S390SKeysClass::get_skeys(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Paolo Bonzini Message-Id: <20240613104415.9643-2-philmd@linaro.org> --- include/hw/s390x/storage-keys.h | 10 ++++++++++ hw/s390x/s390-skeys.c | 27 +++++++++++++++++++++++++++ hw/s390x/trace-events | 4 ++++ 3 files changed, 41 insertions(+) diff --git a/include/hw/s390x/storage-keys.h b/include/hw/s390x/storage-keys.h index aa2ec2aae5..976ffb2039 100644 --- a/include/hw/s390x/storage-keys.h +++ b/include/hw/s390x/storage-keys.h @@ -111,6 +111,16 @@ struct QEMUS390SKeysState { }; void s390_skeys_init(void); +/** + * @s390_skeys_get: See S390SKeysClass::get_skeys() + */ +int s390_skeys_get(S390SKeysState *ks, uint64_t start_gfn, + uint64_t count, uint8_t *keys); +/** + * @s390_skeys_set: See S390SKeysClass::set_skeys() + */ +int s390_skeys_set(S390SKeysState *ks, uint64_t start_gfn, + uint64_t count, uint8_t *keys); S390SKeysState *s390_get_skeys_device(void); diff --git a/hw/s390x/s390-skeys.c b/hw/s390x/s390-skeys.c index 5c535d483e..bf22d6863e 100644 --- a/hw/s390x/s390-skeys.c +++ b/hw/s390x/s390-skeys.c @@ -23,6 +23,7 @@ #include "sysemu/kvm.h" #include "migration/qemu-file-types.h" #include "migration/register.h" +#include "trace.h" #define S390_SKEYS_BUFFER_SIZE (128 * KiB) /* Room for 128k storage keys */ #define S390_SKEYS_SAVE_FLAG_EOS 0x01 @@ -54,6 +55,32 @@ void s390_skeys_init(void) qdev_realize(DEVICE(obj), NULL, &error_fatal); } +int s390_skeys_get(S390SKeysState *ks, uint64_t start_gfn, + uint64_t count, uint8_t *keys) +{ + S390SKeysClass *kc = S390_SKEYS_GET_CLASS(ks); + int rc; + + rc = kc->get_skeys(ks, start_gfn, count, keys); + if (rc) { + trace_s390_skeys_get_nonzero(rc); + } + return rc; +} + +int s390_skeys_set(S390SKeysState *ks, uint64_t start_gfn, + uint64_t count, uint8_t *keys) +{ + S390SKeysClass *kc = S390_SKEYS_GET_CLASS(ks); + int rc; + + rc = kc->set_skeys(ks, start_gfn, count, keys); + if (rc) { + trace_s390_skeys_set_nonzero(rc); + } + return rc; +} + static void write_keys(FILE *f, uint8_t *keys, uint64_t startgfn, uint64_t count, Error **errp) { diff --git a/hw/s390x/trace-events b/hw/s390x/trace-events index 34da5ea323..4e74bf4484 100644 --- a/hw/s390x/trace-events +++ b/hw/s390x/trace-events @@ -36,3 +36,7 @@ s390_pci_unknown(const char *msg, uint32_t cmd) "%s unknown command 0x%x" s390_pci_bar(uint32_t bar, uint32_t addr, uint64_t size, uint32_t barsize) "bar %d addr 0x%x size 0x%" PRIx64 "barsize 0x%x" s390_pci_nodev(const char *cmd, uint32_t fh) "%s no pci dev fh 0x%x" s390_pci_invalid(const char *cmd, uint32_t fh) "%s invalid space fh 0x%x" + +# s390-skeys.c +s390_skeys_get_nonzero(int rc) "SKEY: Call to get_skeys unexpectedly returned %d" +s390_skeys_set_nonzero(int rc) "SKEY: Call to set_skeys unexpectedly returned %d" From patchwork Tue Jun 18 16:00:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805245 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp274747wrx; Tue, 18 Jun 2024 09:09:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWKh+Ux7fahdBxM/S5A8XpI6G+Ccl/2EL2DZypaKQvcg9U8IWbSr1hhFQcMrkorO8UewJPpFZk7V/O0JoXQ9JFj X-Google-Smtp-Source: AGHT+IFGZxfkwhac6foBzKnIlona38MQ1cehIyArHlMrlXkfe5PzfTf4QnSZ15otv4RepmYMAHyi X-Received: by 2002:a0c:df90:0:b0:6b5:1af:dd98 with SMTP id 6a1803df08f44-6b501e4e70dmr1633476d6.32.1718726953161; Tue, 18 Jun 2024 09:09:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726953; cv=none; d=google.com; s=arc-20160816; b=vTmKmE7LHQbvq5a1C8WZyj57WSRh9j69gFF+6mbKKDUc9kB4xP41hncSulQpvRmEhg J4kcb+Km1LqZ2YA7P6KddT48retWdxok24NJQogcMhijSH8papY+WLw29tS2tndlioy2 eP9DPWzr0uxxhg4qCFoiz0mujK3FIeyeQATmzVhG9zJF5Y4IPJc2RHkkvFftmg1ZLtI7 Be5yziK8AqevhQjyr8zJQ8Kp8vjo6c4I+LaBC+CJuQYiwfn8FBUxvoHSYtjjjWHsu3t8 7obBzKwFAXEwsL1UpdadtqJ9vW7gmlmbaeCbwI6O9eM9LJ9XdCZeffTOckePwKFW/U+n 5UTg== 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:cc:to :from:dkim-signature; bh=n/LkBj7LoTcIamDeZoGEisyJw5TF9TRn7cK0fhUgkPQ=; fh=bvZ/xdneCeCrGj18muZbE+RFwh5fXTX0JjA7SvNcHWo=; b=dtCVo667gLO7jOjAfWpY5MvoD99XYQjxeaplX8KlCLPZJK/3RSJsM6h5fhE5TpWfBl S6k6iR1UKbDayLLxaLGCjdJZasemdwuAbUSGwOGCfABnAKJMd6mB21hLWZGHUU9A3p+7 L/tn/+OpP6dCqISHJadOUIVaUP2vTnYtA3EhfvvDD8OWRusd4eO67R6S7kpVLV+OE98w czQ26HuDXszJ2WU6s6PlU/CRZx+AtSJshXhDjzFwrAbVV+VEdKPZei31Hct2R3f43Gsj dKTL17OLsrRZZaPUh65B60vKHK2EfmbOXn3/B4xI2qNwFI8R7BgtUvO258HbbZaer/a+ E4TQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="MH/AIcwM"; 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 6a1803df08f44-6b2a5b754d2si123190316d6.516.2024.06.18.09.09.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:09:13 -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="MH/AIcwM"; 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 1sJbMX-0002D1-UI; Tue, 18 Jun 2024 12:07:13 -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 1sJbMW-0001xm-8W for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:07:12 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbMT-0007va-Rv for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:07:11 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4217990f997so40756535e9.2 for ; Tue, 18 Jun 2024 09:07:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726828; x=1719331628; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=n/LkBj7LoTcIamDeZoGEisyJw5TF9TRn7cK0fhUgkPQ=; b=MH/AIcwM7bfqlobDnMex9svJF353wJON/rdZWL9rGdx6ogb7q2kL0lKSAHJSQLu2s/ +AkR1U4EwFzLsMKzpBpWIn9FEYup0R6e2+2c6lPvFpJ2jktMF590h4nwzq/+LgSbKmR0 aEkMxfwzCx4mdsi/wvCuxURN9B39+xafT+ZUoC3WdL3GbX9iDj4DROJjgjxKWvUQxaPf RvnqgGjP31L9W6vzVHyM8gpfROjfH+7ty4/iFtgUgTmxDAZLxcCKveACktD3aopYBLqG Uo21HZlhdD7DFXT6BFjEC7vTAyZvVQeBKdwpKHVmYSylq44FO8kab1A32+ldo4nHKmu+ OFbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726828; x=1719331628; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n/LkBj7LoTcIamDeZoGEisyJw5TF9TRn7cK0fhUgkPQ=; b=n8x8iFSqgKJv7tsZENLQOrBaQogmi1Qb3DR0ctlBdeQcdzW0Oryzxuq8PgDfR6xGeY YtTAXLCvG7y0mGdtms25w1rPGo93y/Y9caoEgw4M2WAB+VjM7OrEVm2j+kNP6lqHDF9t 1jUpHBwXLhTX77Uin6rCRZe52BKVh7sr6gfbjouEWem9olFVsGgj2BjvVgPIfTavX92o N3Lr0xamxmURmcTSIDTYsiQmmTzKkqUU4yZQgxoYKrg2FQu2+UXY8T9EPIpAKOm0oihS w6BJjZQoFtpitHaDyTOZFu91qk5Q/mrovTZSOQqEyKGD+7mdcWWS1Imxk6XYonn3aEzu WyZg== X-Gm-Message-State: AOJu0Yx9vOCgS50ii4YpgpKsyqIQDzCfxTY/sUyFZA+ihfu+8jziHOAa T1NiFS88OF8rW2QIlJWztMDO0HHAaPoFyghS7hWph6btgulF/7sUIseizCT8GvCQCjqsnFVCAus e X-Received: by 2002:a05:600c:524f:b0:421:8e64:5f23 with SMTP id 5b1f17b1804b1-4230481194amr85240325e9.5.1718726828136; Tue, 18 Jun 2024 09:07:08 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-422874e73b1sm231071855e9.45.2024.06.18.09.07.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:07:07 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mark Cave-Ayland , Thomas Huth , Paolo Bonzini Subject: [PULL 67/76] target/s390x: Use s390_skeys_get|set() helper Date: Tue, 18 Jun 2024 18:00:29 +0200 Message-ID: <20240618160039.36108-68-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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 Commit c9274b6bf0 ("target/s390x: start moving TCG-only code to tcg/") moved mem_helper.c, but the trace-events file is still in the parent directory, so is the generated trace.h. Call the s390_skeys_get|set() helper, removing the need for the trace event shared with the tcg/ sub-directory, fixing the following build failure: In file included from ../target/s390x/tcg/mem_helper.c:33: ../target/s390x/tcg/trace.h:1:10: fatal error: 'trace/trace-target_s390x_tcg.h' file not found #include "trace/trace-target_s390x_tcg.h" Reported-by: Mark Cave-Ayland Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Paolo Bonzini Message-Id: <20240613104415.9643-3-philmd@linaro.org> --- target/s390x/mmu_helper.c | 11 ++--------- target/s390x/tcg/mem_helper.c | 16 ++++------------ target/s390x/trace-events | 4 ---- 3 files changed, 6 insertions(+), 25 deletions(-) diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c index f3a2f25a5c..6c59d0d216 100644 --- a/target/s390x/mmu_helper.c +++ b/target/s390x/mmu_helper.c @@ -25,7 +25,6 @@ #include "sysemu/tcg.h" #include "exec/exec-all.h" #include "exec/page-protection.h" -#include "trace.h" #include "hw/hw.h" #include "hw/s390x/storage-keys.h" #include "hw/boards.h" @@ -303,7 +302,6 @@ static void mmu_handle_skey(target_ulong addr, int rw, int *flags) static S390SKeysClass *skeyclass; static S390SKeysState *ss; uint8_t key, old_key; - int rc; /* * We expect to be called with an absolute address that has already been @@ -341,9 +339,7 @@ static void mmu_handle_skey(target_ulong addr, int rw, int *flags) * * TODO: we have races between getting and setting the key. */ - rc = skeyclass->get_skeys(ss, addr / TARGET_PAGE_SIZE, 1, &key); - if (rc) { - trace_get_skeys_nonzero(rc); + if (s390_skeys_get(ss, addr / TARGET_PAGE_SIZE, 1, &key)) { return; } old_key = key; @@ -371,10 +367,7 @@ static void mmu_handle_skey(target_ulong addr, int rw, int *flags) key |= SK_R; if (key != old_key) { - rc = skeyclass->set_skeys(ss, addr / TARGET_PAGE_SIZE, 1, &key); - if (rc) { - trace_set_skeys_nonzero(rc); - } + s390_skeys_set(ss, addr / TARGET_PAGE_SIZE, 1, &key); } } diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c index 6a308c5553..6cdbc34178 100644 --- a/target/s390x/tcg/mem_helper.c +++ b/target/s390x/tcg/mem_helper.c @@ -30,7 +30,6 @@ #include "hw/core/tcg-cpu-ops.h" #include "qemu/int128.h" #include "qemu/atomic128.h" -#include "trace.h" #if !defined(CONFIG_USER_ONLY) #include "hw/s390x/storage-keys.h" @@ -2093,9 +2092,8 @@ uint64_t HELPER(iske)(CPUS390XState *env, uint64_t r2) } } - rc = skeyclass->get_skeys(ss, addr / TARGET_PAGE_SIZE, 1, &key); + rc = s390_skeys_get(ss, addr / TARGET_PAGE_SIZE, 1, &key); if (rc) { - trace_get_skeys_nonzero(rc); return 0; } return key; @@ -2108,7 +2106,6 @@ void HELPER(sske)(CPUS390XState *env, uint64_t r1, uint64_t r2) static S390SKeysClass *skeyclass; uint64_t addr = wrap_address(env, r2); uint8_t key; - int rc; addr = mmu_real2abs(env, addr); if (!mmu_absolute_addr_valid(addr, false)) { @@ -2124,10 +2121,7 @@ void HELPER(sske)(CPUS390XState *env, uint64_t r1, uint64_t r2) } key = r1 & 0xfe; - rc = skeyclass->set_skeys(ss, addr / TARGET_PAGE_SIZE, 1, &key); - if (rc) { - trace_set_skeys_nonzero(rc); - } + s390_skeys_set(ss, addr / TARGET_PAGE_SIZE, 1, &key); /* * As we can only flush by virtual address and not all the entries * that point to a physical address we have to flush the whole TLB. @@ -2157,18 +2151,16 @@ uint32_t HELPER(rrbe)(CPUS390XState *env, uint64_t r2) } } - rc = skeyclass->get_skeys(ss, addr / TARGET_PAGE_SIZE, 1, &key); + rc = s390_skeys_get(ss, addr / TARGET_PAGE_SIZE, 1, &key); if (rc) { - trace_get_skeys_nonzero(rc); return 0; } re = key & (SK_R | SK_C); key &= ~SK_R; - rc = skeyclass->set_skeys(ss, addr / TARGET_PAGE_SIZE, 1, &key); + rc = s390_skeys_set(ss, addr / TARGET_PAGE_SIZE, 1, &key); if (rc) { - trace_set_skeys_nonzero(rc); return 0; } /* diff --git a/target/s390x/trace-events b/target/s390x/trace-events index 729cb012b4..d371ef71b9 100644 --- a/target/s390x/trace-events +++ b/target/s390x/trace-events @@ -1,9 +1,5 @@ # See docs/devel/tracing.rst for syntax documentation. -# mmu_helper.c -get_skeys_nonzero(int rc) "SKEY: Call to get_skeys unexpectedly returned %d" -set_skeys_nonzero(int rc) "SKEY: Call to set_skeys unexpectedly returned %d" - # ioinst.c ioinst(const char *insn) "IOINST: %s" ioinst_sch_id(const char *insn, int cssid, int ssid, int schid) "IOINST: %s (%x.%x.%04x)" From patchwork Tue Jun 18 16:00:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805260 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp275742wrx; Tue, 18 Jun 2024 09:10:56 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVqmdYxHTYyjQTxG3xa1xQumfxwYZ9slT+e3orr4UlSKwd74b9O48nTHyYF7LbYKtgfBoyQpdkmOSJXzCm3gWkM X-Google-Smtp-Source: AGHT+IF4nuTwDsfjpX8iyUuBkEBJKGWjHgulNcFz+cKgipEIQEvg9trYzxhfZWeS+/gaZx81oQw1 X-Received: by 2002:a05:6122:3c46:b0:4ef:2480:31b6 with SMTP id 71dfb90a1353d-4ef27705128mr369669e0c.4.1718727056118; Tue, 18 Jun 2024 09:10:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727056; cv=none; d=google.com; s=arc-20160816; b=FaZQrn3iCe76ZcSkAmF2SckIYU3+GpqmBBDxAXB+80kGl8QM4uuuQbJgdCWC8WADnR eV6xJvvqpcbLOJzVqD1BGJlm3Ygj2nczbYikTzar9YOlBzplgHwWzkKdORUJIAxOBgWD 6ZVHVjHsPhyxWM1Rw6NbtiO4NrZXzkS+LNwbcZXBdtfSug39deYUooZjHPuZyVxdShHQ E/QFhHW+rTekx+LEqtI2rROS2mdmWbqo3DCoS8lLnTJtF6QTCHUJS1Ivm0ubvwD0Kan6 xSsbIe0SUOm5zPMF4V3RYLzCu0nMUmVqUkDPdbOGjyNM56OnvSnwTpZIZGQeENG+rhFG 9khQ== 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:cc:to :from:dkim-signature; bh=0HjswWTIF2bPBshuYqltbFOwZ+QqTaElXct08AW44WA=; fh=pZcG4NSfKQ5SN0gxGz7Y/cXigufyIVK6IJCS2EFEHg8=; b=nRE8zMsEEnMuBHEIpNqQADB+Cvd2Vwtzg03fyJwTDw0GR2NspHokT2pKg211KLSf// OoNsRTHAQB+zqnD2xklY9W+kYmxTRw3t3+z0MbGKkmbcAaUkdr7FiRyrxOP7r25v5S1n HkPonnHylsixba8ObgxD9KRvXFPn3lWufJ6OtV+tIHf32eWPLUyZw7JGajKfEXSvkp9o nUGRL1lBFnbHoLTEMmItjpjZqDYvGap5R1ydFx9fyCQ6sLX8/2f4J++m2naXj9XvJcus eUb2hGJ+160W2a2OxtMEU6xrArxJbk/sDenMHFRp+pcW5ppZ2ZUkmh9Ig5YK0nH48bzY D9OA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bRORFV9o; 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 71dfb90a1353d-4ed3f1fa0e0si2122962e0c.14.2024.06.18.09.10.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:10:56 -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=bRORFV9o; 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 1sJbMc-00035h-Tx; Tue, 18 Jun 2024 12:07:18 -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 1sJbMb-0002p1-4b for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:07:17 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbMZ-0007vl-8v for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:07:16 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-35f14af40c2so4690702f8f.0 for ; Tue, 18 Jun 2024 09:07:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726833; x=1719331633; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0HjswWTIF2bPBshuYqltbFOwZ+QqTaElXct08AW44WA=; b=bRORFV9o58Xbm4og8tsgKVD8oho4hz2qvjSAAhMI95sU+FG0DZEATkz8jSRepwzDCD Hd9Ui1JgxdMp+Sz5Y6jzUSjWxndAOsyNaxycZVSWPdj/evt5kkawXk2TY+HffpCY8fzg sVt/ekp9Lwncy8u0MawVFLJni34U1oLgLRyXZsbq+1n95S7xdsKRErIMFcKb576y2MMW Y825xWuor4/Yjkfc3PJ0j5DBMzZ5Wpyu8rENfaXGgJ5drzkpPcH6Cw5vJi8UESSL7lxC IdJ/Vm+dKw8wOMN2EsXVS1NqfHr3TsQiFJuaTHJQ2hBIT/zb+YzB7EEGJcxU3165hgFG cEqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726833; x=1719331633; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0HjswWTIF2bPBshuYqltbFOwZ+QqTaElXct08AW44WA=; b=LYi2Fug2LdCS+AnvWoy0YPwlmgxIaT6mQWD+cmiy273OJaL3uqfjFcZrBRkmGGNTsQ RidE5tnsNyBs2KOUMC07VY41J+rj29mJLGZag81Vh/UGugmoxcY+PUV26q3RuP0V88xR L9bs7dO5SzJZFhp76uR860C+RlK+b4+KHnUunYf2Hx8kNnae15N6sIpdessY2i/AcceF kcQMjLL/0nJxfmLirGActuCqWpdu+9INCycMls/O3VAsn2TvbSSGyayjhRuG8oiYp0AH rARJ7sAgdeR7z8ZTLsXsTFMMKRbbLhb+Jc6MuQcpfEQoi4ODD/kUBs/bS12Z0JkD5wCZ vQWA== X-Gm-Message-State: AOJu0YzQ/XdooqE1eufsy7NqRnAG4QTzRpvCJhQpPwFFaUvZ0Hww+Vjg 9QbvtqFThMXCH6cPfqUAOY+KKuqL0kaLLEzgj4QuCDxBhOCNuBpSXAvIm3Kc9W8t4AJ8Ndcz96S Q X-Received: by 2002:adf:f983:0:b0:362:a46e:e7e6 with SMTP id ffacd0b85a97d-36317b79c8amr22530f8f.38.1718726833454; Tue, 18 Jun 2024 09:07:13 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3615d7a1a0csm1929801f8f.23.2024.06.18.09.07.12 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:07:13 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Manos Pitsidianakis , =?utf-8?q?Marc-And?= =?utf-8?q?r=C3=A9_Lureau?= , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= Subject: [PULL 68/76] util/readline: Fix lints for readline_handle_byte Date: Tue, 18 Jun 2024 18:00:30 +0200 Message-ID: <20240618160039.36108-69-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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 From: Manos Pitsidianakis While they do not give warnings under our current buildsystem configuration, my clang's language server daemon was complaining about missing default: labels in switch statements. While at it, add /* fallthrough */ annotations where appropriate. This is a purely style and not functional change. Signed-off-by: Manos Pitsidianakis Reviewed-by: Marc-André Lureau Message-ID: <16f745ac7f5fef74498709ffd98857e76edff6aa.1718265822.git.manos.pitsidianakis@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- util/readline.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/util/readline.c b/util/readline.c index 494a3d924e..ded31b04b7 100644 --- a/util/readline.c +++ b/util/readline.c @@ -405,7 +405,7 @@ void readline_handle_byte(ReadLineState *rs, int ch) case 12: readline_clear_screen(rs); break; - case 10: + case 10: /* fallthrough */ case 13: rs->cmd_buf[rs->cmd_buf_size] = '\0'; if (!rs->read_password) { @@ -425,7 +425,7 @@ void readline_handle_byte(ReadLineState *rs, int ch) case 27: rs->esc_state = IS_ESC; break; - case 127: + case 127: /* fallthrough */ case 8: readline_backspace(rs); break; @@ -452,11 +452,11 @@ void readline_handle_byte(ReadLineState *rs, int ch) break; case IS_CSI: switch (ch) { - case 'A': + case 'A': /* fallthrough */ case 'F': readline_up_char(rs); break; - case 'B': + case 'B': /* fallthrough */ case 'E': readline_down_char(rs); break; @@ -480,12 +480,15 @@ void readline_handle_byte(ReadLineState *rs, int ch) case 4: readline_eol(rs); break; + default: + break; } break; default: break; } rs->esc_state = IS_NORM; + /* fallthrough */ the_end: break; case IS_SS3: @@ -496,9 +499,13 @@ void readline_handle_byte(ReadLineState *rs, int ch) case 'H': readline_bol(rs); break; + default: + break; } rs->esc_state = IS_NORM; break; + default: + break; } readline_update(rs); } From patchwork Tue Jun 18 16:00:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805264 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp275915wrx; Tue, 18 Jun 2024 09:11:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUwMb3rZyHH3GMbkdnTdw1S8jmhE/9TJ+624C+j/1gLEA+0SuaS+NDYfDseL1dniBmo07KBbtgtKJuhLb5Sw92W X-Google-Smtp-Source: AGHT+IFyYYJfndcChsp3S0mkAkUh3WELpxKZfg/5n1Flj0/G2XZbJvTeLVxWxgYf3FgtTBqPvld/ X-Received: by 2002:a05:620a:4085:b0:795:6b7b:6929 with SMTP id af79cd13be357-79bb3e0dd17mr16946385a.1.1718727072533; Tue, 18 Jun 2024 09:11:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727072; cv=none; d=google.com; s=arc-20160816; b=iH3R5fpg03M8zTIPz/d53La8Q6MUZ48GyvoZQNjgCS5d+7P2gcDIBsr1XPmQNFrYDP FSefhVN14AXGoTTJvCZQCZMNaXckLAkghwLaukG21EX5iQmEUbnxrHKtyLHESfWS86nP 1TtRQUXan+U0fd1lof5sEboOhLYX3GMxTFEufopaEBUcluhWEZE3iVBJ7OXQ2xb5Wd8K 1GqMOhAGMSumQ3u8j/nREozTAXlsIIODvMQpYanhQJL3mY3WcYer7GkOZ8mWhP2YlhQP rZYbUM18Z+6vJwUkFqMikLUN6ej8E1eTHgcYwzE6s2/HN/QnVkylMMLNxGDnPxnl02es QdtA== 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:cc:to :from:dkim-signature; bh=EZXir4tyTbilkK4IBj2or6kvXipnQF2t170oQXRmlK8=; fh=pZcG4NSfKQ5SN0gxGz7Y/cXigufyIVK6IJCS2EFEHg8=; b=jtRfo7g3Yho5vzjmcLlE9TYm5R2CxCF+ZgZwBgyTWO7YBvQVwvxAXkFx6JE/N5hTzg 5YFEHlDa7GOG0YgPOuTl2PrlFwYhY/70jojbj04YjJT2g6S1I0Zqs69wdzWqRe8XZPOq vXH1ZVO28GC33TH8TTaCbdb6hSRTgov6ep19eQK1cjkRQXq8Bnu2vZm3NDJJ3dn3XA01 KIEaaXBaR9oB9XWVTcsZRw+DmWTqVC3vsaocpkxgNKlneTx7PgQ/Drxn/zHeU76ADB7l mCuZUxnC+Uf1G+apZLfbHZgb/1Vj6grwr5TbeDB4DKGy/twLylBFHmfgIgDkTqy8+TgR j2jw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=veCTUDeU; 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 d75a77b69052e-441ef3bc33fsi124549761cf.35.2024.06.18.09.11.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:11:12 -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=veCTUDeU; 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 1sJbMl-0003ez-RT; Tue, 18 Jun 2024 12:07:29 -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 1sJbMg-0003Wb-Q4 for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:07:22 -0400 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbMf-0007w1-1V for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:07:22 -0400 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-52cc9b887f1so265302e87.3 for ; Tue, 18 Jun 2024 09:07:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726839; x=1719331639; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EZXir4tyTbilkK4IBj2or6kvXipnQF2t170oQXRmlK8=; b=veCTUDeUOqojRNpix/sHUi60FGTI7ra2NE/S5TFVOh6km5bPIIYWLSAX8r95Z8qDTv 3X4dccb2JX4M6fEYOsASDcq+UoIWKLMe3FIrdTSrFSw4UDy4NnPikR/Y5LeK0AqPYGwN jcbUcILqGTGi6hsVhPqcIeePjKfBC1a1Vgyroa3TO+tmNyxw3vsFzE26Qf2STHrlPvzN lfUy75wnbjpfptKDspajF/JNwbqNAuJvX113/QuYYry1uh6rWyxRCsMLCduO0Mz7w+Sg QcvubhOZpUmOL7wU690GIoe6ngZ/17rJou1CiRNHPgV9O3yUuzlCU7QUdjAjF8eUzl4B P5gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726839; x=1719331639; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EZXir4tyTbilkK4IBj2or6kvXipnQF2t170oQXRmlK8=; b=ZWsmDzFBY5g7etOfNPp88fKciwsFEC44l4UqHpqTGqEWg1YxEePRG5FUy0e3WtLDsc Gp5kjqTNNnOr5Jeb02VucAKWmJBgyxeKy2FFgaeync3MmJqKH8QgbgKQrcOJtg8AUgI4 E3wd1JEatoEBuuWmMVMPy/VFy8m/MNDMsyeVXRodG6GfqjZ4fh11sj4zC/Fvnk9yjmCo Rexh8MeHKqmM0o+aItF3SXpstBYaH1UX+MneYdWoI92Kxwc0Txz8z36N5jgoQj6HZt+Y fJaAwrCUEKtNDJTHL/Sm/PRismUbANjNj2llEnjNS4bfZC6eqNld1ZKTfopBJfIbJB8H D5Eg== X-Gm-Message-State: AOJu0YwKouFn4Rsbc0tjwgLInLRm0TCBUegTyyh4tNgZyzhmhCuw6pDy 4u3yNcTe0hwPnYtTqTglExoVQpIOPJuH/RvKCivVqxgYUBUBVx6SLuH0rF2y+8rKiFsmmtPXv6O + X-Received: by 2002:a05:6512:3285:b0:52b:c08d:d947 with SMTP id 2adb3069b0e04-52ccaa62665mr36547e87.35.1718726838926; Tue, 18 Jun 2024 09:07:18 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-422874de68asm232231605e9.29.2024.06.18.09.07.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:07:18 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Manos Pitsidianakis , =?utf-8?q?Marc-And?= =?utf-8?q?r=C3=A9_Lureau?= , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= Subject: [PULL 69/76] util/readline: Add C-n, C-p shortcuts Date: Tue, 18 Jun 2024 18:00:31 +0200 Message-ID: <20240618160039.36108-70-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=philmd@linaro.org; helo=mail-lf1-x12e.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 From: Manos Pitsidianakis C-n and C-p are the default bindings for readline's next-history and previous-history respectively. They have the same functionality as the Down and Up arrow keys. Signed-off-by: Manos Pitsidianakis Reviewed-by: Marc-André Lureau Message-ID: <9876594132d1f2e7210ab3f7ca01a82f95206447.1718265822.git.manos.pitsidianakis@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- util/readline.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/util/readline.c b/util/readline.c index ded31b04b7..0b627d62ad 100644 --- a/util/readline.c +++ b/util/readline.c @@ -418,6 +418,14 @@ void readline_handle_byte(ReadLineState *rs, int ch) rs->last_cmd_buf_size = 0; rs->readline_func(rs->opaque, rs->cmd_buf, rs->readline_opaque); break; + case 14: + /* ^N Next line in history */ + readline_down_char(rs); + break; + case 16: + /* ^P Prev line in history */ + readline_up_char(rs); + break; case 23: /* ^W */ readline_backword(rs); From patchwork Tue Jun 18 16:00:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805265 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp275938wrx; Tue, 18 Jun 2024 09:11:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVO86TS6U+o4A3g02cvBcFwR1Lp5UUy0MjP707PsXe6952W3CEEQk1mq0V3OIoV6Y4//6gVcSnw/pJQao9JPfbM X-Google-Smtp-Source: AGHT+IEbs8obiVl432nCVrZB9pV2G8HH1+tPtale70lJjrVoc2PPpdG6idlvK56fvuZ+s+7mnwwx X-Received: by 2002:a0c:da85:0:b0:6ae:e4f7:6c5f with SMTP id 6a1803df08f44-6b501eb4a00mr1798136d6.52.1718727076386; Tue, 18 Jun 2024 09:11:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727076; cv=none; d=google.com; s=arc-20160816; b=s/rzUZiG/8rzpvkmIDKh626W3khg/fP6ZvblBa17xq/Y6YH3vfI+Ei8LK/w9FCjDT8 /OVyiCK1W48btOTKtToLusdAKjXXpZaD3VmenjqUot6vIIFgPaJJ8JvuxOdRmFnfuser geWCYvVxQ9RAyU9LIvtkDNxDX8Cz2VVXinAc4vfba1dw5dLbn2ElXO+muyoq52LhbA0Y MwzjB987glDKy9fC1agMefEnV+CMDS8Lq54pwm9Q51mVez6WHbvL9hNcK9obnBssOp56 ymF8Bkcg+cckVf+Vz9qmvQfpZmhb6y8V9rBIbqqrgG3KBO2HPDBNHiIaRxV1HTQOaZlV DXIw== 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:cc:to :from:dkim-signature; bh=PS+Ds4Sxagrc7IIxNg9ZZud7Od1JFilSTGGm4uz6pIM=; fh=pZcG4NSfKQ5SN0gxGz7Y/cXigufyIVK6IJCS2EFEHg8=; b=U1LAsIw+JH7tbiqxnNL4/ibFpSMuutV2No8cUAB2GxeQVdcWCI3MqFUS7w6OvRJBat bZ1aFN0bZPN9W5R/+VPeC8tqQXU19w/UsWPUddm8/laQaFBUA48J9Vnw2cgTe2ehBN3H uWD08fwBchF0PDNeedMLgB8VHzWs2UEyzYitR4YA+kl4Pu8e7iUQfzXwDg8i6lYl121Q kVlezNgh6Ivdp8LUj+FUliVa7Y12wBttxRbEzjc/gI04EeBvScTIqJdgaMy+hywZJ9Pz HVFqDG/u1ZrIKtp8IwiPAO931ysDNAabpIanu3AqTrE6wywd+FdaSf7s8W9G3BuhIBZW 1Lyg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VFY+lOI7; 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 6a1803df08f44-6b2a5a1764bsi128696576d6.72.2024.06.18.09.11.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:11:16 -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=VFY+lOI7; 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 1sJbN0-0004Gu-VG; Tue, 18 Jun 2024 12:07:44 -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 1sJbMl-0003kl-Sm for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:07:31 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbMk-0007x9-0z for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:07:27 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-35f27eed98aso4572035f8f.2 for ; Tue, 18 Jun 2024 09:07:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726844; x=1719331644; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PS+Ds4Sxagrc7IIxNg9ZZud7Od1JFilSTGGm4uz6pIM=; b=VFY+lOI7zzf0/XZQybqtM3JpQ6DtCRlgf2AOnKK+kfgWfajTzrVDA/joRvWpOYpknX 1/w65l8As+IbXLEqrsvUQh99BEvNT4MblfyxXTDgYt8goYR1oslGMxNrPd1oG/m+ePkZ JzhKM11nJK+X0ecSI4rP37RZ4wY1EAlAsjGrwVIlMAutWwjC+EKixlBzz8ZVZduOKYRJ 9UDHladWGcPYO6EbNToEAYGVWRKRupEF0zYj9VtFdGR1CcPFqYWTUeFwIeaAqqNKYZBC tEZICAlwazTidHgeMipXD1r7YoffjT9xz5cLUGq9TmtFXGNVqp5lPAPyNgb+/jOMDkwW +DRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726844; x=1719331644; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PS+Ds4Sxagrc7IIxNg9ZZud7Od1JFilSTGGm4uz6pIM=; b=XSQKh5KeXCXsEw+DA2UehkpuYM2LrOkn1p+73rjD+ZN2vyvOispT5o18SACp7OSWrM MwOCZjbG4x/QgP+yMMtVsJT63UbvgMrLx4BB1duiesBDzIN/K1zIF9HfXyREyh3bu06M zxqpSD+zQ2bXPE28piyIpbyfITbVkK3JUBXQdruUMkSEyxOUJJTUySggzrG840bvQ+ix 4c0h3gq6WNYmlLLgKeFhguwifclXfmY6jxLkSEjPblC8kHqrIVqlXOyZfRhjwrQ1ETb9 qaLNqCDW471LqnwSmPfA6Rv/R3LdN97xuJsEu0k5fJW7yiDd1dlDGf4Ngmat+oshQgeo xURw== X-Gm-Message-State: AOJu0YwPMsd2BDLfSTm6I7quVJCaHUVUu9vVQYuTh46g4KtEAeBZeaCx aTf4z3fYKwzg//UiKt6DB1UYxDiy3WqgUwr0e1mTDgUS6zp5RdeB5odtS+Vdc3fGuWzEYOOgcvd 7 X-Received: by 2002:adf:9789:0:b0:361:d3ec:1031 with SMTP id ffacd0b85a97d-36317b7d4e1mr28270f8f.31.1718726844276; Tue, 18 Jun 2024 09:07:24 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3607509c9a0sm14398446f8f.27.2024.06.18.09.07.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:07:23 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Manos Pitsidianakis , =?utf-8?q?Marc-And?= =?utf-8?q?r=C3=A9_Lureau?= , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= Subject: [PULL 70/76] util/readline: Add C-u shortcut Date: Tue, 18 Jun 2024 18:00:32 +0200 Message-ID: <20240618160039.36108-71-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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 From: Manos Pitsidianakis Add support for the unix-line-discard readline action, which erases from the cursor position up to the beginning of the line. The default binding, C-u, was chosen. This is useful to quickly erase command input while working on the monitor interface. Signed-off-by: Manos Pitsidianakis Reviewed-by: Marc-André Lureau Message-ID: <6772067e1c0d4b1c5310e5446e9e3e1c6b3b5bc0.1718265822.git.manos.pitsidianakis@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- util/readline.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/util/readline.c b/util/readline.c index 0b627d62ad..0f19674f52 100644 --- a/util/readline.c +++ b/util/readline.c @@ -271,6 +271,14 @@ static void readline_hist_add(ReadLineState *rs, const char *cmdline) rs->hist_entry = -1; } +static void readline_kill_line(ReadLineState *rs) +{ + while (rs->cmd_buf_index > 0) { + readline_backward_char(rs); + readline_delete_char(rs); + } +} + /* completion support */ void readline_add_completion(ReadLineState *rs, const char *str) @@ -426,6 +434,10 @@ void readline_handle_byte(ReadLineState *rs, int ch) /* ^P Prev line in history */ readline_up_char(rs); break; + case 21: + /* ^U Kill backward from point to the beginning of the line. */ + readline_kill_line(rs); + break; case 23: /* ^W */ readline_backword(rs); From patchwork Tue Jun 18 16:00:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805276 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp276315wrx; Tue, 18 Jun 2024 09:11:59 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXhpFEbTw5vs5oiphfhvRIvgBD02s5XRGjA0Yz8tgPjEl3qVX2LFjAnfB39mRt0UUs4sWjDIwIjyDjV8PHE07gF X-Google-Smtp-Source: AGHT+IEBfbcxCKGPsv4VgvHy2eWGlAqjguhk5DgxZsTMJuWGbZB0RI0Jk3xrL8xVFN4fhouWoR7H X-Received: by 2002:a05:6358:7e89:b0:1a1:fb38:8acf with SMTP id e5c5f4694b2df-1a1fd5d4200mr28413255d.24.1718727119490; Tue, 18 Jun 2024 09:11:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727119; cv=none; d=google.com; s=arc-20160816; b=ds4xZYAsNHhz217DZp4yp/hTiZ7xjunUrru2j+BRy843Q1Pr7qd5lDJD2a0YC5y4IB 9ubLnd7IV3cR8ugfSFHUSuPqYCh80zMR7jjy/MqRNVXF3RVAEJiwDzAO3Ns4nR2xJfQP lH2hDrme0h6mNf8tKZHLWziiAeNSUtxju/7EsyBU841U5y7Xo4TCQ6ZH8/CONGBRu/fT uiVgrD4DuclRZHv6Cd84dpyPNk45UZfgS72IZMoW3hg4F+YtvjZluOcVmrCkcTPQdhr3 3E1LIM0163+SM2MoVRmvvDfNzYWUIMU9mAIIRMpKmQ7Cy+bjy8WtK3AlthhoOQUCwJQ8 Pmew== 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:cc:to :from:dkim-signature; bh=o9oK3hagVT3DDExa4pE11FCGGKWewTtrkZCXKVX3HNA=; fh=FNGkAXNQEXEC+3UHY+FqTmM7uCfvfLry1ntoXxwtcbg=; b=Dv9bVOFdATVN8v8teIha/o0IfM2L/bkXdGaoHpBshWvDu4CIKsKTJlK8EkSZQ+4WTo rvzrbBmo1ScC8aVgTy8oemPzqV/bnbeP4xpskZ0Vmex7iqT2Q6hr2X86YFypivoHmE/Q QKBzx7lT63NbzQG/x2p33TZsKC+qp+z4TIEInYjQyFmBuyR+P+yP0S6QfskfiAvXfOhO 3MGlzsepUlOqMX61sEc+nHA+fvTfNr32d+rtSoNqDkawXm9HImqcs9NlcyFq7GcJPTW1 qXJ0LEYMkae8jaAwsVI0/9nIE0hq+hBCn6Jk2qQJbgfiobsdxCKVu2LLp8s6xxdo+mOy wTJQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yKu6cDhJ; 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 d75a77b69052e-441ef3dcd18si139293181cf.225.2024.06.18.09.11.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:11:59 -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=yKu6cDhJ; 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 1sJbN3-0004IV-6U; Tue, 18 Jun 2024 12:07:45 -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 1sJbMr-0003ot-0S for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:07:35 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbMp-0007y7-DW for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:07:32 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-421bb51d81aso42791895e9.3 for ; Tue, 18 Jun 2024 09:07:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726849; x=1719331649; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=o9oK3hagVT3DDExa4pE11FCGGKWewTtrkZCXKVX3HNA=; b=yKu6cDhJQ9Dv+ixnNd+8nXWJCnM0uOr+D8HdVZMKcIEnEIwOFjvMR6u9Gcr9L579ku KIPduuwd6WmaljwkD0Z4kHxilTJ8KNSnUSZpHjEAEZyWSqARFzBy2uytlxWVmQKCn0wR N9SNlEueQ3Aa/Bsh7M7gVzT9D5LUCwthpriyISmPO7T66lB29YauOFHbA5YHaFulizGc KT+nvuea+aH6xWbXt55HY+qOw72NIazZqkfd7jyaq/KWXWBTYETWjkHX7oG1IdG6mqdY 6XjhnGTTDGI9SAYJxBasyZx3Uds91IQkslsWYXrlgUSsSs+fFOuyJP50uClG8o9xAazo L00g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726849; x=1719331649; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o9oK3hagVT3DDExa4pE11FCGGKWewTtrkZCXKVX3HNA=; b=rnqlEjaxlJZSHBtSI6h0Bytfc5ofTYO4XweyKYwT+amWNQVe9SfZFKzL62BT9iCcUQ 9w59sNBhKsUFMwj1N5O3iTd7qLihJbx2FDSh+mf78hCySmghPHnZJtadmhN304hr/3WG lKSvC/P36Hh1aj01sIrxlL9BWm1aF7FXu54IZV/GQzY+owUyy8w5DSV7OQPNdVScdFQW SuiF8LWfv4pXOyxTe1zFjWFgtlmF8qUWySGlmHylJp2T7Y8Xdi2a/qTKmrEwnEHlEngb er981XHqCt/w5bvq/cDmJMCHfoxPZJ9JBu9ZCCcs66FLjb8J99zsK4cOwMC3UMLhxSZS nIlQ== X-Gm-Message-State: AOJu0Yxv8Ctgrf3vsYZmw8fSCK151GTxSRvolAnYnvXzpF9nhOjleffc Tg3q8/qtETKS2J9zqosbVPh5CSTPKjgDTCODZIBFLgdJsCLFjbLIEw21iMWaOmAqoZva6eQzJew T X-Received: by 2002:a05:600c:5349:b0:421:1dde:cb5a with SMTP id 5b1f17b1804b1-42304859dcfmr106905045e9.35.1718726849608; Tue, 18 Jun 2024 09:07:29 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-422870e986asm233111365e9.27.2024.06.18.09.07.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:07:29 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Manos Pitsidianakis , =?utf-8?q?Philippe_Ma?= =?utf-8?q?thieu-Daud=C3=A9?= Subject: [PULL 71/76] MAINTAINERS: drop virtio-gpu maintainership Date: Tue, 18 Jun 2024 18:00:33 +0200 Message-ID: <20240618160039.36108-72-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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 From: Gerd Hoffmann Remove myself from virtio-gpu entries. Flip status to "Orphan" for entries which have nobody else listed. Signed-off-by: Gerd Hoffmann Reviewed-by: Manos Pitsidianakis Message-ID: <20240528083858.836262-4-kraxel@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 0f63bcdc7d..7cc6421e3b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2579,8 +2579,7 @@ F: hw/display/ramfb*.c F: include/hw/display/ramfb.h virtio-gpu -M: Gerd Hoffmann -S: Odd Fixes +S: Orphan F: hw/display/virtio-gpu* F: hw/display/virtio-vga.* F: include/hw/virtio/virtio-gpu.h @@ -2602,7 +2601,6 @@ F: include/hw/virtio/virtio-blk-common.h vhost-user-gpu M: Marc-André Lureau -R: Gerd Hoffmann S: Maintained F: docs/interop/vhost-user-gpu.rst F: contrib/vhost-user-gpu From patchwork Tue Jun 18 16:00:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805252 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp275172wrx; Tue, 18 Jun 2024 09:09:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVtjZsHaOGP6TAOzOGKhk1jakLCdydhoXtPY6Xl9GoXceORvvhbIRriW1vw8yC56LqXJVQXZ8zojvMvsdsZz2yz X-Google-Smtp-Source: AGHT+IHrzZSwHqQjGhdIHJWuMZyGEpDSKtcGjBr6us8096eTU8noIoABL3UwA3yE6O3cSyXGU6yU X-Received: by 2002:ac8:7d07:0:b0:440:1e02:9e1d with SMTP id d75a77b69052e-444a7a6449fmr2796191cf.60.1718726996675; Tue, 18 Jun 2024 09:09:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726996; cv=none; d=google.com; s=arc-20160816; b=VP9Gp6XtFIvZ0xWt2LYolU7XPKdjkpUXPwN+9B4xdm7LbhAaygvF4S/ybW7YEWOc0s ViS+tgYrxqQTm0/p3WAyWc5Nqq9FVFiPUbNcaURvKKmiLIm6xx8E0MFpC0o+kjuF6UUn NdEuEL0ElTJ2ZwE9MX9RYgwyFAbqNLvXeCT1CW099nt+zFrpLQ61r+X0O/KKQzftMR53 ZwEzGmfcKTNkdsFz8Tg/h5rsNlNHceJ/hA68dWlVIAPM46k9LlyaW/lSR0GFea6eeLD3 GYD7huU31zHNF/ACGA13PQoGhvtIR8v6ckqcPI9nZapumY+FeTWEo4yurctwLSI+nj0T Rojg== 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:cc:to :from:dkim-signature; bh=VSnmDwNBD5C9wQDCycF4RnH2v2NxTyHLs0bPJHduo1E=; fh=FNGkAXNQEXEC+3UHY+FqTmM7uCfvfLry1ntoXxwtcbg=; b=oYmudfWitUazDtO+Ab0H3KbvfBJinvZb1LcJZoZw+kT87tXgsugjAhJW987vSMqK0f gy8zsGuqPhbcq/9ekrXLdsdxzJMpyNwoQPR1Rv6Ez+4bIDP+QlzgQ0UYHtwhNweNF7rR syREJsKOOjjxRS3pdnM7AC42QTvN3wxSkaCW7QfL1KKAHmQy7cP/nfqpR8qhbuvkNUIb OkED1TOEK8Y239d2DZYI6B4I4xAMqMF0qxXloaT4q6/6PRY/iW1E5Qe4CJnPaczDWrqW TcXrkO/FOYci0NpKqR8yNZx7XH64yrWy8olllAy53NE6zX49Q0CaZneJoIyEn2StXExD N8Fg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XX3Eje40; 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 d75a77b69052e-441f2fba15dsi122814481cf.425.2024.06.18.09.09.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:09:56 -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=XX3Eje40; 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 1sJbN4-0004Mn-Cc; Tue, 18 Jun 2024 12:07:46 -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 1sJbMx-0003yC-8l for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:07:40 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbMv-0007yi-3h for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:07:39 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a6efae34c83so695101766b.0 for ; Tue, 18 Jun 2024 09:07:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726855; x=1719331655; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VSnmDwNBD5C9wQDCycF4RnH2v2NxTyHLs0bPJHduo1E=; b=XX3Eje40VtMdJKpiZG9zfwykKlhSmFHcZCPEzfvp9KdJLR305k6otiZpp7Hbvl/7y+ Y3AqrzRCHflUcAQF4W3k2nECjVTG+GDDq/g3tmZE6iY5hLzdWa6omFqMHd1R1Glrom7f TMVpordJiN2lV3Af0ifLPjtE9WkTpWf9JwCpN98GzV0M6IHCVEZ7iiftQgfq+Vg2JHlg 4uElKD0afvIkulF3ES5R3yEBahgnifOlTz2JYDKQJYuJvCAGEska0OQNRHRhb6jrR43i 3nhW2qppDDnc9scfABV6RKnwjXEHkWdXMr53ty5f59X6ANobo+igb0/UE7z9Pp+fVhMK Et6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726855; x=1719331655; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VSnmDwNBD5C9wQDCycF4RnH2v2NxTyHLs0bPJHduo1E=; b=tbotw9kfZPawCKj0EwBSofdj838WsKd0Gh9QnWDS9oWDc9fz30Soq4tWNeuaK9UwpU zJGMgPtW/18/vxDsndeGgyAN8XGoatOBzZwzG7ZJVSxnILmI0N++hohrw/GIdluvJS/8 ca5KLit03XVExHfhPboEFtRBal5o8CMILd3vhXiG2KTVIhoAUkR2w9e4hdtgCxLG3aws sYSiB/DvbUOmqKM6t+yInN/LK5RXn9q1sph3ch3q0LtD5fjMU2MNyZIwlgRjYiX+2z1y 8c1qqQY4YPacsK2fJ03cG3pw8Fx5txUfmCdxdH77TjYH18oXwhnfdzeLaXDy9vUVjYES T+qA== X-Gm-Message-State: AOJu0Yy+TxDRCwe2DSi0xSLwk9+K2/0uULpAFSEQs3LcxhHRgOd6uQ+D EPGdRe7u8T2BngOCOVGr3UkJWIIapRdOw88R9CsG5UXqD9c6l7/rBGI59WRnOB6xMuRVQ7HpVgC E X-Received: by 2002:a17:906:b182:b0:a6f:2a1d:b5cb with SMTP id a640c23a62f3a-a6f60d2c436mr731691166b.22.1718726855390; Tue, 18 Jun 2024 09:07:35 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3607509c785sm14365407f8f.34.2024.06.18.09.07.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:07:35 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Manos Pitsidianakis , =?utf-8?q?Philippe_Ma?= =?utf-8?q?thieu-Daud=C3=A9?= Subject: [PULL 72/76] MAINTAINERS: drop spice+ui maintainership Date: Tue, 18 Jun 2024 18:00:34 +0200 Message-ID: <20240618160039.36108-73-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=philmd@linaro.org; helo=mail-ej1-x629.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 From: Gerd Hoffmann Remove myself from spice and ui entries. Flip status to "Orphan" for entries which have nobody else listed. Signed-off-by: Gerd Hoffmann Reviewed-by: Manos Pitsidianakis Message-ID: <20240528083858.836262-5-kraxel@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 7cc6421e3b..cef54de759 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3058,8 +3058,7 @@ F: stubs/memory_device.c F: docs/nvdimm.txt SPICE -M: Gerd Hoffmann -S: Odd Fixes +S: Orphan F: include/ui/qemu-spice.h F: include/ui/spice-display.h F: ui/spice-*.c @@ -3069,7 +3068,6 @@ F: qapi/ui.json F: docs/spice-port-fqdn.txt Graphics -M: Gerd Hoffmann M: Marc-André Lureau S: Odd Fixes F: ui/ From patchwork Tue Jun 18 16:00:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805279 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp276532wrx; Tue, 18 Jun 2024 09:12:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW7/N7ndgHGMtYACmAiQFyCOb9QAy9+E7IwD/k9iliaER1VrLF29usRZEnOZ5Vcp0auW0+ziu0X6iq7xddzcYS0 X-Google-Smtp-Source: AGHT+IHrunk7lbbXqrO6ZFq2Pl13qzovJGu/jh1v3pZ1sS0mzS4GEkXVl0c0jsw2frwTT8J8lH0c X-Received: by 2002:a0c:f90e:0:b0:6b4:f6f6:98c with SMTP id 6a1803df08f44-6b501e0a60cmr2020546d6.13.1718727142054; Tue, 18 Jun 2024 09:12:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727142; cv=none; d=google.com; s=arc-20160816; b=l/bZxCR/K0IQ03lge+x8xCVDaB7DsnF+fNxZAAiFV2CltMI/pbSax+1iMWy5UG5BLV wVLpuAULM2T+uTU5QMusL/3od+jDX66FKInGbWYsX/moRygf7ZaKapxZg/Wtw5VJTOh3 crGDBUXhw+XLDzqxgZ8ThqzHpJ80VatZhCi9FcufD5KutTMrCQl+KB5avkPqhrd7CoUm yamSRQSvWH0RVte7fZZ5HuSe1peVXGvk+EPKtITV+oEl7POIKmUd5lwISOtxRjkv2oCW SIjxZAUWfphC+4m2HtOUBziPvjGmlUUbqSAqfcpsMgXllGX8xkppf8w7XSG7dPhUD+bU hvww== 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:cc:to :from:dkim-signature; bh=s1CzEgsqs5Q5WzI+sZtnD/HRhJpPC0ikB+DYXS0unQ8=; fh=wiKz0x7qvKwceerDkCg/vXelUIS3VMX4wuMEccF/XUs=; b=MYKKvm4AYiuzVFqpu4O7X4vjm51CTVfNRCTTwf8wS7km15dodI3RUQnOqZy7nP1P10 I5w47sALfgQAc4hLPMPaa6urt+WGasd/y1ui2YhcOoG6gKQtCdeSRt3QmNQaW+NIddES 5ZDuN6vJBfQzhZUXi/rLy7iHdCM40KF9TDrtznl3XSLxG0AlRsK5ra8RmtgyL01kV3Wb qJh/9mNIJu1xQ5mahZe16yClSJg8ZstEbvrUjJv8SyEEHk7PFQPIwv+0MQPhoyA7fEPM tOxhzmtW4g/JAy8R4NinkMW18lw1ZHuR3UXROr0x9O7wUMh1sQVMafmARI94fbVVJNi2 5yRw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uPbRMYM0; 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 6a1803df08f44-6b2a5b82d09si125357376d6.531.2024.06.18.09.12.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:12: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=uPbRMYM0; 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 1sJbN6-0004Tn-1s; Tue, 18 Jun 2024 12:07:48 -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 1sJbN3-0004MM-T7 for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:07:45 -0400 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbN1-00081v-UQ for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:07:45 -0400 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-52bc274f438so6003000e87.0 for ; Tue, 18 Jun 2024 09:07:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726862; x=1719331662; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=s1CzEgsqs5Q5WzI+sZtnD/HRhJpPC0ikB+DYXS0unQ8=; b=uPbRMYM0U8RZ7tnUA1myn7e9KJzt8mn36dK6SePyQ9ap87NaySfyG9r9UHbv9bDnQk a+g3sdOtaHCev5uxhBf0FT91QgF2QqJQwa8KZtWRhRv10DG5FG+ERd4f0G8kZdg/Z9EY xEoSmu0sqIfDki2pG/r+icUkQXMTUtdXR78F61DVHuyCoooAIJg2cZwncFhoUKLcfUKU +fI9uX4hehZINTTeVxIb3YlX3JIjhXnDIHfaD7dCRk32ZBqJfqc87Jk03QXUk5zUNK/b kB6sR6UGXeROQ2pn284GJgB/lOPAvIyrJqZTvq9Ezc2dwH/f8N7jRfu3OHn1a9vIvfZ0 f9Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726862; x=1719331662; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=s1CzEgsqs5Q5WzI+sZtnD/HRhJpPC0ikB+DYXS0unQ8=; b=vS9MvPueT5sByr10nXNe5nPrlTPz8l/aF8QHWu1VBndtOj8VhKNAEHvYDSzar/Be5b gxztAg6BC79ImeRYDmbiOurOqaqDiUqSlFNwuNDVMDRPLXfIbiLgGn2Ztj4tZQUarSeB NuA02YFB5iZxyNBBsTGpiEa09PPg0ERqSlY9tL6At3CfPjzurVDL6y3Ai2spV4ht6yl3 scnxQwFSeDNN1ijypUIusNJrxWFllVoq+1LJSJ+xwx8GVMie7dzltx6J2jrvl5mOaz0k umT/LPJlQBELMfr/z8lnhptRs75MSdfJ4143DphIFujAz8E9cAWOdPtYuVaX0A1zLgn0 QYnA== X-Gm-Message-State: AOJu0Yw2VHU70I/Bc3HDnkxZWUBrW+cwbN6hpnDwajgc8E+/2BqbI2n4 rzFTAzzVFYt5yGc8SpcJeEDOG1gY/6+XdlKTeHL8HJW0Vr0y+rHiN5oSQpPzOOJsZvZTKUTgYM5 z X-Received: by 2002:a05:6512:b0d:b0:52c:a1ad:18bd with SMTP id 2adb3069b0e04-52ccaa59580mr58703e87.6.1718726860905; Tue, 18 Jun 2024 09:07:40 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36075104a8fsm14332891f8f.110.2024.06.18.09.07.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:07:40 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , Phil Dennis-Jordan , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 73/76] ui/cocoa: Use qemu_add_mouse_change_notifier Date: Tue, 18 Jun 2024 18:00:35 +0200 Message-ID: <20240618160039.36108-74-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::130; envelope-from=philmd@linaro.org; helo=mail-lf1-x130.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 From: Akihiko Odaki This eliminates the polling in cocoa_refresh and implements the propagation of the mouse mode change from absolute to relative. Signed-off-by: Akihiko Odaki Reviewed-by: Phil Dennis-Jordan Tested-by: Phil Dennis-Jordan Message-ID: <20240322-mouse-v1-1-0b7d4d9bdfbf@daynix.com> Signed-off-by: Philippe Mathieu-Daudé --- ui/cocoa.m | 62 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 24 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 981615a8b9..2935247cdd 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -296,6 +296,14 @@ @interface QemuCocoaView : NSView { QEMUScreen screen; pixman_image_t *pixman_image; + /* The state surrounding mouse grabbing is potentially confusing. + * isAbsoluteEnabled tracks qemu_input_is_absolute() [ie "is the emulated + * pointing device an absolute-position one?"], but is only updated on + * next refresh. + * isMouseGrabbed tracks whether GUI events are directed to the guest; + * it controls whether special keys like Cmd get sent to the guest, + * and whether we capture the mouse when in non-absolute mode. + */ BOOL isMouseGrabbed; BOOL isAbsoluteEnabled; CFMachPortRef eventsTap; @@ -307,17 +315,8 @@ - (void) setFullGrab:(id)sender; - (void) handleMonitorInput:(NSEvent *)event; - (bool) handleEvent:(NSEvent *)event; - (bool) handleEventLocked:(NSEvent *)event; -- (void) setAbsoluteEnabled:(BOOL)tIsAbsoluteEnabled; -/* The state surrounding mouse grabbing is potentially confusing. - * isAbsoluteEnabled tracks qemu_input_is_absolute() [ie "is the emulated - * pointing device an absolute-position one?"], but is only updated on - * next refresh. - * isMouseGrabbed tracks whether GUI events are directed to the guest; - * it controls whether special keys like Cmd get sent to the guest, - * and whether we capture the mouse when in non-absolute mode. - */ +- (void) notifyMouseModeChange; - (BOOL) isMouseGrabbed; -- (BOOL) isAbsoluteEnabled; - (QEMUScreen) gscreen; - (void) raiseAllKeys; @end @@ -404,6 +403,7 @@ - (void) selectConsoleLocked:(unsigned int)index qkbd_state_switch_console(kbd, con); dcl.con = con; register_displaychangelistener(&dcl); + [self notifyMouseModeChange]; [self updateUIInfo]; } @@ -1109,14 +1109,26 @@ - (void) ungrabMouse [self raiseAllButtons]; } -- (void) setAbsoluteEnabled:(BOOL)tIsAbsoluteEnabled { +- (void) notifyMouseModeChange { + bool tIsAbsoluteEnabled = bool_with_bql(^{ + return qemu_input_is_absolute(dcl.con); + }); + + if (tIsAbsoluteEnabled == isAbsoluteEnabled) { + return; + } + isAbsoluteEnabled = tIsAbsoluteEnabled; + if (isMouseGrabbed) { - CGAssociateMouseAndMouseCursorPosition(isAbsoluteEnabled); + if (isAbsoluteEnabled) { + [self ungrabMouse]; + } else { + CGAssociateMouseAndMouseCursorPosition(isAbsoluteEnabled); + } } } - (BOOL) isMouseGrabbed {return isMouseGrabbed;} -- (BOOL) isAbsoluteEnabled {return isAbsoluteEnabled;} - (QEMUScreen) gscreen {return screen;} /* @@ -1791,6 +1803,17 @@ static void addRemovableDevicesMenuItems(void) qapi_free_BlockInfoList(pointerToFree); } +static void cocoa_mouse_mode_change_notify(Notifier *notifier, void *data) +{ + dispatch_async(dispatch_get_main_queue(), ^{ + [cocoaView notifyMouseModeChange]; + }); +} + +static Notifier mouse_mode_change_notifier = { + .notify = cocoa_mouse_mode_change_notify +}; + @interface QemuCocoaPasteboardTypeOwner : NSObject @end @@ -1975,17 +1998,6 @@ static void cocoa_refresh(DisplayChangeListener *dcl) COCOA_DEBUG("qemu_cocoa: cocoa_refresh\n"); graphic_hw_update(dcl->con); - if (qemu_input_is_absolute(dcl->con)) { - dispatch_async(dispatch_get_main_queue(), ^{ - if (![cocoaView isAbsoluteEnabled]) { - if ([cocoaView isMouseGrabbed]) { - [cocoaView ungrabMouse]; - } - } - [cocoaView setAbsoluteEnabled:YES]; - }); - } - if (cbchangecount != [[NSPasteboard generalPasteboard] changeCount]) { qemu_clipboard_info_unref(cbinfo); cbinfo = qemu_clipboard_info_new(&cbpeer, QEMU_CLIPBOARD_SELECTION_CLIPBOARD); @@ -2062,6 +2074,8 @@ static void cocoa_display_init(DisplayState *ds, DisplayOptions *opts) // register vga output callbacks register_displaychangelistener(&dcl); + qemu_add_mouse_mode_change_notifier(&mouse_mode_change_notifier); + [cocoaView notifyMouseModeChange]; [cocoaView updateUIInfo]; qemu_event_init(&cbevent, false); From patchwork Tue Jun 18 16:00:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805251 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp275161wrx; Tue, 18 Jun 2024 09:09:56 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUZcrkhc476en5NfsZ61QuBkPrtUODOpKEzX2wMQIrBnpDvhcLuecJlHOivZsdLxC/FME9JKzEvVtCyYm3moEdg X-Google-Smtp-Source: AGHT+IEPxg1FMZNdL5jey3JlHEZsdkUoNAE0gWOUKpaySws3l596rQN6uEJahg8Vvf4tAfCH+lZw X-Received: by 2002:a05:620a:4722:b0:795:4cde:3b21 with SMTP id af79cd13be357-79bb3e11686mr13067285a.9.1718726996304; Tue, 18 Jun 2024 09:09:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726996; cv=none; d=google.com; s=arc-20160816; b=aKC4yWuOUDEFGWNgn/dTtkmO2lT8vmRh7zY+5sOTRivaSzgDMydCfX0XdOmWQZm/OM 3ppq/Gfqty+J91AS3DXYvqOoNBPg9teZoXJBJE8T+z5iKrJq+IzueCWkoQ9+G6UDuuA7 CF9wkPVX649WLEgoBIrLyM4BgxtJ+wEo9iX5TRAEkwBHw+HUgjfbaQLgHoBEZfJ3GygW G3tjqWTmHYsVbCDI4SXq4uOgJ0SNnLYviV/m6DkjHOjZ4As9IRiCeUSPrdOFvBxP5e2Y pcSIei+XENxDvaiY6Qerd22yUBWMzsLpTeTDOcAR6A8JznyPmXCALPL92Uz5rdMNHOQ7 u47A== 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:cc:to :from:dkim-signature; bh=hgUnXKkoM7jtlbKnZKLo4tSSRCpVvLzL3fhZptpwhrQ=; fh=BbHsmTn4NGR0nFlicuIKAA0mP6zYQdjnySzQ4lTJJzY=; b=tYkT4BGks0RqfByb+Jf+ghx46oSO3vR4qXvPj+0jff/i4aD5SlTlpcMNuhiHWiT53h YuTULHEoOfM20IEyB3TE/xX2wPa2MENI5DklUztrEiQb7oRk26q2gLO71mk4LDecxt0E QFTpC0eyHxkbSxJygPjieOcYmz0q5WYIJdO5VbzyJ5y66caXwgJRjLbnItyxk96HNzfn FC6cotBDDHf+GViinOfchcp1Zilm79dL6HeYdsg8+F+s94mXYFY5saglTdq2ZI1sNhQ9 jDWe/d362lZsD9G6yCygyefiSMrKAaBPXjBvZxOHXlnW/cieck/PgtFg6VbCimcGok1J /Kmw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qlzVBCze; 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 af79cd13be357-798aadc39e4si1199230985a.211.2024.06.18.09.09.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:09:56 -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=qlzVBCze; 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 1sJbNA-0004mU-Ps; Tue, 18 Jun 2024 12:07:52 -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 1sJbN9-0004ir-Au for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:07:51 -0400 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbN7-00082d-Dq for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:07:50 -0400 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2eaae2a6dc1so98808041fa.0 for ; Tue, 18 Jun 2024 09:07:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726867; x=1719331667; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hgUnXKkoM7jtlbKnZKLo4tSSRCpVvLzL3fhZptpwhrQ=; b=qlzVBCzeNWM3z10jbymipWUzLbHCgfifZ/FNHa3JPNYy1YBOeerfO0Dsr/ZzxWJ+s1 fZrf6xqe0fCQjBSXKFLAF1uK8X8eP+xQht6GKi1VP1j0r0aNmDzWURSZi1wfAoPhMmjk Mcg65UXs7Zm0DIIt1RINE3vLc0ey/Pgi8IBNzu8DYl6AQfWlYellXvRDn7HsNbYfElpG 2hFF6Q5Lb5Mdwj7Zi3VowJIjnAo/7NvGLpEpiohg+SSSFlo3wCWmZbjwPGiA+EhGYYmd M2exSL6FeGqQrJ6dxMu4Ybi/6q2rALaD4dIFKw1EckdGCWPUfQIxf81kRw0PN4h+BTSz 0aFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726867; x=1719331667; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hgUnXKkoM7jtlbKnZKLo4tSSRCpVvLzL3fhZptpwhrQ=; b=XR5m8EJChQT3VYGyJjoxI1rBOuEH/v5QOgQj8mxh/454swanQOuAXF/+SfYygbCuQ5 18yj39Hon7/wMsB4zPfoti+uvUQCc0LQm4or4ReKv3b1IjxeW1P3N69IH1sFez/jp1UL eMG4n5zfJOzbUppsqXQHDOU5EXvyeoIyCfqKtXBRBLlx6jPNiM7703LFQTN5ExA3rkJD 918fKUilMJXRLscWI2+zl/YWWteYC/Pebt6dKbqFpgbAlgBVV6xzmWNIszs5y3LT513n iIJrinRKyTtdaO0RH2yVPVqwydmzhFFDeO9LYVfEA4UQ2qrT1HBDPMQpNczNeTciq5ou ASUg== X-Gm-Message-State: AOJu0YyoFuJng5XxFZIqKu5UsZK/p4/yFBZk8TsP54RiZjlsycXLw6BD 75/JFqxqSU+vdoz1tmo6E32MEvbuewGCQnOIVMR3wRFD3J3LC5JZHx/ba+B0wwg35LptVqX6Htl o X-Received: by 2002:a2e:7814:0:b0:2eb:f365:8751 with SMTP id 38308e7fff4ca-2ec3ced1e1fmr2599821fa.31.1718726867397; Tue, 18 Jun 2024 09:07:47 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-422f6320b11sm193452445e9.29.2024.06.18.09.07.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:07:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , qemu-stable@nongnu.org, =?utf-8?q?Mar?= =?utf-8?q?c-Andr=C3=A9_Lureau?= , =?utf-8?q?Ph?= =?utf-8?q?ilippe_Mathieu-Daud=C3=A9?= Subject: [PULL 74/76] stdvga: fix screen blanking Date: Tue, 18 Jun 2024 18:00:36 +0200 Message-ID: <20240618160039.36108-75-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::232; envelope-from=philmd@linaro.org; helo=mail-lj1-x232.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=unavailable 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 From: Gerd Hoffmann In case the display surface uses a shared buffer (i.e. uses vga vram directly instead of a shadow) go unshare the buffer before clearing it. This avoids vga memory corruption, which in turn fixes unblanking not working properly with X11. Cc: qemu-stable@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2067 Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau Message-ID: <20240605131444.797896-2-kraxel@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/display/vga.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hw/display/vga.c b/hw/display/vga.c index 30facc6c8e..be2b19b839 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -1762,6 +1762,13 @@ static void vga_draw_blank(VGACommonState *s, int full_update) if (s->last_scr_width <= 0 || s->last_scr_height <= 0) return; + if (is_buffer_shared(surface)) { + /* unshare buffer, otherwise the blanking corrupts vga vram */ + surface = qemu_create_displaysurface(s->last_scr_width, + s->last_scr_height); + dpy_gfx_replace_surface(s->con, surface); + } + w = s->last_scr_width * surface_bytes_per_pixel(surface); d = surface_data(surface); for(i = 0; i < s->last_scr_height; i++) { From patchwork Tue Jun 18 16:00:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805248 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp274824wrx; Tue, 18 Jun 2024 09:09:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV/S/e4uc//kONJ7TQk5oY/GMSmfNRRVwnZHr0Uy/Fuji8Bh0v/mlaKwThLwyjf8/QUziNlrJa4qZFOMXosQsUS X-Google-Smtp-Source: AGHT+IFnGO6PG6VaL/+j0ID6tByXdLxdg2Q/diPKK4q7dXE7D7km2aMgk4NU/rH/yKdib8qC1X8X X-Received: by 2002:ac8:7d07:0:b0:441:6021:df43 with SMTP id d75a77b69052e-444a7a88b28mr1734641cf.62.1718726962565; Tue, 18 Jun 2024 09:09:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718726962; cv=none; d=google.com; s=arc-20160816; b=CPfSsKZABvgnvtTCoBQe/vJoCpivcYXQBF/U5YGRAPbs3idBd9WxyMOjABfxzMHlDN 5Ja37neaZvYbISAp+yDenVHavo52ncyn2ovAbZ+oiuZn7Je40kIy/cKLcQ0ElbKBh9se uGUd9Q+9JfOrlExPzMO5w6PsYxqtMSBU8KtUHZOZVtFVIxP4lMxh4UITBXCaLMK8gD6M 9DaKXE5KVTWyWtOCJpVpUOtVopix83YGTcaDHbZznZshZByUuS2efgyrICjpT6OiXuri ttrjUqrInPT7kgFWKwnDfu3XQ1+hbilpD3HKS644Czp8ZpYn1kEJYilTQg8Astkpo981 Ipow== 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:cc:to :from:dkim-signature; bh=m05MQTWN136ywld4BWQZjNr1NDxuOKLdLbQOIjKC4nw=; fh=yJVMKDitIrP4rNTPp+GOQ57i+l0GvlL2NKIvX23LgTI=; b=bdFHwO8KjWCHiMVIRJTeXMTxiGrTfqKH4LlpGkPP/sWSiHgOUDUkkaD/ZVxcIUZkTR INwXt0JJ8i8IgZl3J8h51qYgWlcxLBxbfUW4vhPnIWJ7a57pmiDllETmjTpY8nrgF11P lFr2br0LHjVPGjX2rdh1bt88RRI5615cFPnR5TgGF0B2gwjYOIy1ZVmiRr4Hcnp7HPnb Ak/ohceBiAWFm561/b89tLigNtXVpv9azCLqZa55Fu447oOLd8RQgaKoheabzhLJHe1r ITkivLKaIKASbMM1GuimiO/r4YCkOaiZYTnMfZ1jXUPSbA0jdBXbZY6if2D43Wci3rxl EtEw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K6zo6Osh; 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 d75a77b69052e-441ef3bdb42si121324291cf.129.2024.06.18.09.09.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:09: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=K6zo6Osh; 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 1sJbNG-0005Ho-To; Tue, 18 Jun 2024 12:07:58 -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 1sJbNE-00052a-Nl for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:07:56 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbNC-000838-Vd for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:07:56 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4218314a6c7so47747695e9.0 for ; Tue, 18 Jun 2024 09:07:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726873; x=1719331673; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=m05MQTWN136ywld4BWQZjNr1NDxuOKLdLbQOIjKC4nw=; b=K6zo6OshfOFlvMdyPKvZJ8SiszAugyMxK2BkjQN9fnFBXLMjftdocJekJWWuKciDZg w77AMMH0INptV2W+OZ5ncnWLQ/9kz3F8yM2QnF2vMZVESeSW97TP99AlGvpshPwz8Ci8 02JlJEb1D9aBKrTi/cfbDZfX0m5k0hTuwz36F+FzOEJTCXiCxsxp9asDaZ6y7V/1DMbv 91rStaqrKIukqjpmTh0VnSnkoZVPRZJZGlFKIAp/fTwuCBtdhmDsX29L5q6XQXZdGbK5 AZWEZkV0alRIgN6sokFSIIGF/kO6YweOv7dWEsc6rLhaFJo8XZcJ1ylahkOfLHPuOCs6 iBNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726873; x=1719331673; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=m05MQTWN136ywld4BWQZjNr1NDxuOKLdLbQOIjKC4nw=; b=ZgxPof1y7hSB+StrfLWpp5JxB2i1ptFpsbywgBsCm/3tD02ZmUGG2kqXqrbQvePdLO Np3vLc1ReDS/GF8qeO/5/Em5cMMIsiiIU4kQ2RCeKsb4dCU9okVtqtCCp2PsdttdapWk WXr/Z/Q5FRfiO/Us3qtiv+Tfj8FQVpnDsZ9RFQlyDJqsAjvEvFd0a9abDKd1Mm1R4Jqp vClIGDu6LliP6mZ5Beq30E4aA9Rpkt6Vf9v6wi+Xs+BZYiDog/jcFKrcK0ItDA83+Kx0 b5lztSpP/+gr6/qxDbJtx9hxmqzvPBf7O1gleySTt/I49+S7f40kyn1lWoGW0DD4hUU3 ak7A== X-Gm-Message-State: AOJu0YxCpmS4jcIG06qqYW5HGO97ucAc5rHvK91HZKrSOW+9mivbaO3x d5Z4IJH2X7rVoxGw77auuVHjSMmVXkk1/8Cg+o74R2SskDX/57cfwRMYHWMwdPO2M1v3BkHyKaX 7 X-Received: by 2002:a05:600c:4f84:b0:422:7037:54d7 with SMTP id 5b1f17b1804b1-4230484fa59mr113319525e9.28.1718726872795; Tue, 18 Jun 2024 09:07:52 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-422f641a5b4sm192298675e9.41.2024.06.18.09.07.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:07:52 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 75/76] ui+display: rename is_placeholder() -> surface_is_placeholder() Date: Tue, 18 Jun 2024 18:00:37 +0200 Message-ID: <20240618160039.36108-76-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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 From: Gerd Hoffmann No functional change. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240605131444.797896-3-kraxel@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- include/ui/surface.h | 2 +- ui/console.c | 2 +- ui/sdl2-2d.c | 2 +- ui/sdl2-gl.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/ui/surface.h b/include/ui/surface.h index 4244e0ca4a..273bb4769a 100644 --- a/include/ui/surface.h +++ b/include/ui/surface.h @@ -50,7 +50,7 @@ static inline int is_buffer_shared(DisplaySurface *surface) return !(surface->flags & QEMU_ALLOCATED_FLAG); } -static inline int is_placeholder(DisplaySurface *surface) +static inline int surface_is_placeholder(DisplaySurface *surface) { return surface->flags & QEMU_PLACEHOLDER_FLAG; } diff --git a/ui/console.c b/ui/console.c index 1b2cd0c736..c2173fc0b1 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1510,7 +1510,7 @@ void qemu_console_resize(QemuConsole *s, int width, int height) assert(QEMU_IS_GRAPHIC_CONSOLE(s)); if ((s->scanout.kind != SCANOUT_SURFACE || - (surface && !is_buffer_shared(surface) && !is_placeholder(surface))) && + (surface && !is_buffer_shared(surface) && !surface_is_placeholder(surface))) && qemu_console_get_width(s, -1) == width && qemu_console_get_height(s, -1) == height) { return; diff --git a/ui/sdl2-2d.c b/ui/sdl2-2d.c index 06468cd493..73052383c2 100644 --- a/ui/sdl2-2d.c +++ b/ui/sdl2-2d.c @@ -72,7 +72,7 @@ void sdl2_2d_switch(DisplayChangeListener *dcl, scon->texture = NULL; } - if (is_placeholder(new_surface) && qemu_console_get_index(dcl->con)) { + if (surface_is_placeholder(new_surface) && qemu_console_get_index(dcl->con)) { sdl2_window_destroy(scon); return; } diff --git a/ui/sdl2-gl.c b/ui/sdl2-gl.c index 28d796607c..91b7ee2419 100644 --- a/ui/sdl2-gl.c +++ b/ui/sdl2-gl.c @@ -89,7 +89,7 @@ void sdl2_gl_switch(DisplayChangeListener *dcl, scon->surface = new_surface; - if (is_placeholder(new_surface) && qemu_console_get_index(dcl->con)) { + if (surface_is_placeholder(new_surface) && qemu_console_get_index(dcl->con)) { qemu_gl_fini_shader(scon->gls); scon->gls = NULL; sdl2_window_destroy(scon); From patchwork Tue Jun 18 16:00:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 805275 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:144:b0:362:4979:7f74 with SMTP id r4csp276289wrx; Tue, 18 Jun 2024 09:11:56 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXusWMFQ6KMrlzPlHRemLjRKu/y7372SHgxEImNZ2aTZTqSaBsaD11VplnPqOGvPZoNHNvH9Fo3C6M5JlyiZ33s X-Google-Smtp-Source: AGHT+IFrhSqT7tdHpu3Sb25tzBWHOLDmJSG33Q63KI0o2AJs1Dtey9XGle9QtPgE0aTHotChb/Zt X-Received: by 2002:ac8:5812:0:b0:43a:c0c7:a218 with SMTP id d75a77b69052e-444a78dd2c8mr5993391cf.33.1718727116090; Tue, 18 Jun 2024 09:11:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718727116; cv=none; d=google.com; s=arc-20160816; b=NDYPOHKCvEGsjDbYqEkqRvNtGLD1relVcu/b3W4sD2rzMX07tfAZrabBIIzE0XaZqu eJEUHsnSy9zd3HKc9dQqR3JAnAWlouDmOo/z/+1GqpQoZR0k5fgfCzG0/e1cE3NErB7g kIqFOHRyoeiX8xtJN6Ro9kimYGcpE4jP6+ef5ZvBhvhgRoGzKhYLXRyYEPK/pbRJL9mq eVm3wxc9Ubr2WKtamL5CVityq0LSynVtKXIeyYRZgMXjoIhozNZVvmB1YdTS6exkofFR lnPcg9LeFFWE4G1VKSPLfnADySmvTKqtl553nZxSavQTmkMb/5JAGFr9zEX1GHJ/9Isv DyrA== 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:cc:to :from:dkim-signature; bh=BqjFfkPLwT0VSYgNamjDwX1J5syzJFrA1eN6oC3z1MQ=; fh=vOhyd1OFr2hhbhhzwsFFkJM+Pkxtv3oqXX9OFfHpEhk=; b=bX2FE4EnBRVY63+tths5vUPjJ8qDWl3wXw152FUXnUgByIVfHXWNGLEcdvIFXWpql+ jSzyVI/XGJvHxqNRTLJlGoFldSMtJzqupRrx7Jr7kM/zjfUtlWPFFbDlqC3F8nER3zQJ io6MLk6UyFRbfuPlzGLENjC2RvDJHuTGveqBZ7A70d1hAj/5RCiVRCQ2jj9g5giTJrKq YVltjrnAAbQcAvwLSk05oDbQl3Ah81eY5nU/c9PIdIEBidba7Mlf9cK6ok6BbM58F+lz OgrPP0exaPJC5JNWAD3RfMFOMrbh77a3+YJkZUwQvj15uGeH8LDONOv5BiLTpdi6y/Fo 7Ksg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ZL/p4Oud"; 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 d75a77b69052e-441f2fe65e4si131618011cf.583.2024.06.18.09.11.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Jun 2024 09:11:56 -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="ZL/p4Oud"; 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 1sJbNN-0006Sr-0n; Tue, 18 Jun 2024 12:08:05 -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 1sJbNK-00063a-RU for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:08:02 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sJbNI-00083J-Nk for qemu-devel@nongnu.org; Tue, 18 Jun 2024 12:08:02 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4230366ad7bso51141675e9.1 for ; Tue, 18 Jun 2024 09:08:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718726878; x=1719331678; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BqjFfkPLwT0VSYgNamjDwX1J5syzJFrA1eN6oC3z1MQ=; b=ZL/p4Oudt8JpziXSt4wKpOKHhCkuP39SXxtSp0kNd+k7Nu20VYMUnvran1/wJnArTQ Vvzah2c3mkGO7lHffdqOwLQ3Y/snpt+2fQW48skUcufGdUnhUwF2InRY6iltjhHILRrw XeBg+rD9i7qrhgDMCcJGn6+4N/PcG/Rka/FWronO7zt3i1D2G8ek3fmN+3oMzAVzChGz WkS1KDtJ8lTv5PcW7KX8Hs1LTRNfA9Gwu7xN8Dm7sbSQzdl5dqQk4AhEFnKPzht70Owi ixTeFUyFXX1DWn8cZsCt3AQDmR5RNrJozzLs+4njJZSqJCvufkx1z1CY5AwUNEmbl6Vi QeLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718726878; x=1719331678; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BqjFfkPLwT0VSYgNamjDwX1J5syzJFrA1eN6oC3z1MQ=; b=Eq8JZ1dCMX4wMDWZ7E+JTYPHUyZGPfS7+0Jpsl06awWpcQ6qdiEX4TuhuycPJjRDcx ghAmQOKLnFSYQihFiulZIMT9WhKdMG+26P+p8VUUSDe6plOMIGK7p3XU8Uo7vrIUkMWm T+G3QMr64e2LWd2Hj3GTzv5+MIPVhnts+8JiDITwSFfRB1TMHFImiZNTC7ETy08jU5Cv NhwtbEwTWH5zhXPd/u32w7YkAyHN8kxAR7J0nJCqEVlB0udhU9AO9s6t9HWMw2VQBP4m WwCBkk4uAFoK/tAL8fDxwFZJg4bI24Om6S9FjGYGQvGkDVaTBGbz5pwJYIaS1HR+T800 1KYQ== X-Gm-Message-State: AOJu0Yx0zldmL+uowz7p6Iiwz7vYI0TgJFJwDLuDKPKJQ+zvndC24J7G vUZKHvacAJMgbsQ6nlyd54cCiIxjeJLEBVsrlvOqOiDNWE72Y7Hv673ifhiReTdKEl8P/JUiI5a 4 X-Received: by 2002:a05:600c:468e:b0:422:469a:f0ec with SMTP id 5b1f17b1804b1-42304820c6emr130483585e9.12.1718726878516; Tue, 18 Jun 2024 09:07:58 -0700 (PDT) Received: from m1x-phil.lan ([176.187.212.55]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-422f602ee95sm196723925e9.13.2024.06.18.09.07.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 18 Jun 2024 09:07:58 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paul Durrant , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 76/76] ui+display: rename is_buffer_shared() -> surface_is_allocated() Date: Tue, 18 Jun 2024 18:00:38 +0200 Message-ID: <20240618160039.36108-77-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240618160039.36108-1-philmd@linaro.org> References: <20240618160039.36108-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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 From: Gerd Hoffmann Boolean return value is reversed, to align with QEMU_ALLOCATED_FLAG, so all callers must be adapted. Also rename share_surface variable in vga_draw_graphic() to reduce confusion. No functional change. Suggested-by: Marc-André Lureau Signed-off-by: Gerd Hoffmann Reviewed-by: Paul Durrant Reviewed-by: Marc-André Lureau Message-ID: <20240605131444.797896-4-kraxel@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- include/ui/surface.h | 4 ++-- hw/display/qxl-render.c | 2 +- hw/display/vga.c | 20 ++++++++++---------- hw/display/xenfb.c | 5 +++-- ui/console.c | 3 ++- 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/include/ui/surface.h b/include/ui/surface.h index 273bb4769a..345b19169d 100644 --- a/include/ui/surface.h +++ b/include/ui/surface.h @@ -45,9 +45,9 @@ void qemu_displaysurface_win32_set_handle(DisplaySurface *surface, DisplaySurface *qemu_create_displaysurface(int width, int height); void qemu_free_displaysurface(DisplaySurface *surface); -static inline int is_buffer_shared(DisplaySurface *surface) +static inline int surface_is_allocated(DisplaySurface *surface) { - return !(surface->flags & QEMU_ALLOCATED_FLAG); + return surface->flags & QEMU_ALLOCATED_FLAG; } static inline int surface_is_placeholder(DisplaySurface *surface) diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c index ec99ec887a..8daae72c8d 100644 --- a/hw/display/qxl-render.c +++ b/hw/display/qxl-render.c @@ -31,7 +31,7 @@ static void qxl_blit(PCIQXLDevice *qxl, QXLRect *rect) uint8_t *src; int len, i; - if (is_buffer_shared(surface)) { + if (!surface_is_allocated(surface)) { return; } trace_qxl_render_blit(qxl->guest_primary.qxl_stride, diff --git a/hw/display/vga.c b/hw/display/vga.c index be2b19b839..892fedc8dc 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -1487,7 +1487,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update) uint8_t *d; uint32_t v, addr1, addr; vga_draw_line_func *vga_draw_line = NULL; - bool share_surface, force_shadow = false; + bool allocate_surface, force_shadow = false; pixman_format_code_t format; #if HOST_BIG_ENDIAN bool byteswap = !s->big_endian_fb; @@ -1609,10 +1609,10 @@ static void vga_draw_graphic(VGACommonState *s, int full_update) */ format = qemu_default_pixman_format(depth, !byteswap); if (format) { - share_surface = dpy_gfx_check_format(s->con, format) - && !s->force_shadow && !force_shadow; + allocate_surface = !dpy_gfx_check_format(s->con, format) + || s->force_shadow || force_shadow; } else { - share_surface = false; + allocate_surface = true; } if (s->params.line_offset != s->last_line_offset || @@ -1620,7 +1620,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update) height != s->last_height || s->last_depth != depth || s->last_byteswap != byteswap || - share_surface != is_buffer_shared(surface)) { + allocate_surface != surface_is_allocated(surface)) { /* display parameters changed -> need new display surface */ s->last_scr_width = disp_width; s->last_scr_height = height; @@ -1635,14 +1635,14 @@ static void vga_draw_graphic(VGACommonState *s, int full_update) full_update = 1; } if (surface_data(surface) != s->vram_ptr + (s->params.start_addr * 4) - && is_buffer_shared(surface)) { + && !surface_is_allocated(surface)) { /* base address changed (page flip) -> shared display surfaces * must be updated with the new base address */ full_update = 1; } if (full_update) { - if (share_surface) { + if (!allocate_surface) { surface = qemu_create_displaysurface_from(disp_width, height, format, s->params.line_offset, s->vram_ptr + (s->params.start_addr * 4)); @@ -1655,7 +1655,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update) vga_draw_line = vga_draw_line_table[v]; - if (!is_buffer_shared(surface) && s->cursor_invalidate) { + if (surface_is_allocated(surface) && s->cursor_invalidate) { s->cursor_invalidate(s); } @@ -1707,7 +1707,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update) if (update) { if (y_start < 0) y_start = y; - if (!(is_buffer_shared(surface))) { + if (surface_is_allocated(surface)) { uint8_t *p; p = vga_draw_line(s, d, addr, width, hpel); if (p) { @@ -1762,7 +1762,7 @@ static void vga_draw_blank(VGACommonState *s, int full_update) if (s->last_scr_width <= 0 || s->last_scr_height <= 0) return; - if (is_buffer_shared(surface)) { + if (!surface_is_allocated(surface)) { /* unshare buffer, otherwise the blanking corrupts vga vram */ surface = qemu_create_displaysurface(s->last_scr_width, s->last_scr_height); diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c index ff442ced1a..314d378a1b 100644 --- a/hw/display/xenfb.c +++ b/hw/display/xenfb.c @@ -638,7 +638,7 @@ static void xenfb_guest_copy(struct XenFB *xenfb, int x, int y, int w, int h) int linesize = surface_stride(surface); uint8_t *data = surface_data(surface); - if (!is_buffer_shared(surface)) { + if (surface_is_allocated(surface)) { switch (xenfb->depth) { case 8: if (bpp == 16) { @@ -756,7 +756,8 @@ static void xenfb_update(void *opaque) xen_pv_printf(&xenfb->c.xendev, 1, "update: resizing: %dx%d @ %d bpp%s\n", xenfb->width, xenfb->height, xenfb->depth, - is_buffer_shared(surface) ? " (shared)" : ""); + surface_is_allocated(surface) + ? " (allocated)" : " (borrowed)"); xenfb->up_fullscreen = 1; } diff --git a/ui/console.c b/ui/console.c index c2173fc0b1..e67c5dae2b 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1510,7 +1510,8 @@ void qemu_console_resize(QemuConsole *s, int width, int height) assert(QEMU_IS_GRAPHIC_CONSOLE(s)); if ((s->scanout.kind != SCANOUT_SURFACE || - (surface && !is_buffer_shared(surface) && !surface_is_placeholder(surface))) && + (surface && surface_is_allocated(surface) && + !surface_is_placeholder(surface))) && qemu_console_get_width(s, -1) == width && qemu_console_get_height(s, -1) == height) { return;