From nobody Sat Nov 23 22:36:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730679893; cv=none; d=zohomail.com; s=zohoarc; b=f6Ek5C8KlgfMGdP2hIf/stx9qGg8cVN0oC0r12KawRJGAdzc79+TvW53YVGYgXlottj0ocrj3M0V33DynHg9IVIxCuY3tZm8SG8+0SOfLT6TCnFg7m2eO27faUwBx5+930wXY/GqF7dQMtp9pKndl9Nw39hFff7bVklVV+LUv18= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730679893; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=4eJLIy23RXCVfnR0kGtJ7WuLAA+UoTfJmrCBuGO1Brw=; b=nrV8aIXHEiL3MVRM0aWFa9TmPzYj4Hf6Ky0rwzchSDrmTJtwI3Sx8n7r/bhvi4vvDAVbKfoVbKEzeGP6wOm4A/sGgpCoJCuVbQmzXfe+4sBy9Rb6j8CclrFVB2FvQ/F52lP5vsxpqM8rewIvLNkgKtqALjbtKO+6FqjXms4Nwm0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730679893291801.5345280596889; Sun, 3 Nov 2024 16:24:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7krq-00083q-K2; Sun, 03 Nov 2024 19:22:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t7krJ-0006Gq-Kx; Sun, 03 Nov 2024 19:22:17 -0500 Received: from mail-pl1-x62f.google.com ([2607:f8b0: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 1t7krI-0002m0-1g; Sun, 03 Nov 2024 19:22:17 -0500 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-20bb39d97d1so32182455ad.2; Sun, 03 Nov 2024 16:22:15 -0800 (PST) Received: from wheely.local0.net (124-171-217-17.tpgi.com.au. [124.171.217.17]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7ee45a0081esm5900648a12.59.2024.11.03.16.22.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 16:22:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730679734; x=1731284534; 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=4eJLIy23RXCVfnR0kGtJ7WuLAA+UoTfJmrCBuGO1Brw=; b=DqdCspEZxZ+eBoT06hfH3gdYH+rZ/QOWaSW7f+TSFQtg9V4eiGl+pSdJSncg19g2Ov 2XLu5Oogm5rwQagEJHsS5Ab5Am62xYzxHRR6qazAp52DN5NbR1VjJ+3JoCknmYQP1l3Y dB+xLDC6olnFa2/ThSD76zG2WY3gyLOB+vPSjleyhSWOSrQNV6vhJBYLOl4XbZ8Je2o0 zT055qepglhAVLJlLhUhZHB/De7HB+J76+VxCWkdvfml8I5dIlXwlYbUNbWiTrhS5rw+ zxmlPqErsbljq4SF7u3tGosxx23aDrI+0yqYJc+l0XT9U4l6FLxIyVqw0OJZ4FcMYN/B KB8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730679734; x=1731284534; 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=4eJLIy23RXCVfnR0kGtJ7WuLAA+UoTfJmrCBuGO1Brw=; b=KEB7v39bD9g80v9BsrLpM4YSWCxzTS0geaYmBkILRBOEs3hlTsE0FuL8zUUqRkvUdV 1M3oSNTOPktA2jnazdibkphTeNK3RHC/J3svfUh9kovBpqDzyOy7C1Y1IISdgoEvyfFi LuX5uuevX0/KbM9iRUKwEJg/wWgZkg71rUo6OTAENtH8IyzyLlZ7CQXr8b5DUJOrc1tw L0dFFtV5QWMfKBWOUDPJ8dHccErcmTRpMhtWOkcJsbTUfZWvrGE5z/xuyOX2wYa0ygRV 7Ovev63jVEclCK13ZmyDuzLAdjGhta55CrLOihFyqtCoSln3XSqSPk8rJhXD7Zs6B4mv yZhA== X-Forwarded-Encrypted: i=1; AJvYcCURykoD3J63LfzvX+oXX+obK+j6p8V+I3s/ndAh6YCwu1QDsKH6zhbQ3gRsb7zDD+fl3DcByK7Z9g==@nongnu.org X-Gm-Message-State: AOJu0YxiutWCWNBIsIqZoOQLGPxQA+yeEklMOgp4Yubal/70Psp+H/+H T+weehailJsYy7xhAJt+AIjOoyzw7xt+yRq6nywy2wGpEL17UKCxmlveGw== X-Google-Smtp-Source: AGHT+IG2gsfF64h2JmUTMYTImFNGscCNPQPKHtTOEBTD2uGSsEZI8Q9Io0b4PbJkqpbHei/njmBEXQ== X-Received: by 2002:a17:902:e741:b0:20c:cf39:fe2d with SMTP id d9443c01a7336-210f74f48e4mr248299805ad.5.1730679733945; Sun, 03 Nov 2024 16:22:13 -0800 (PST) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , qemu-ppc@nongnu.org, Glenn Miles , Michael Kowal , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PULL 51/67] pnv/xive2: Support for "OS LGS Push" TIMA operation Date: Mon, 4 Nov 2024 10:18:40 +1000 Message-ID: <20241104001900.682660-52-npiggin@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241104001900.682660-1-npiggin@gmail.com> References: <20241104001900.682660-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=npiggin@gmail.com; helo=mail-pl1-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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730679893869116600 From: Glenn Miles Adds support for single byte writes to offset 0x15 of the TIMA address space. This offset holds the Logical Server Group Size (LGS) field. The field is used to evenly distribute the interrupt load among the members of a group, but is unused in the current implementation so we just support the writing of the value for now. Signed-off-by: Glenn Miles Signed-off-by: Michael Kowal Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Nicholas Piggin --- hw/intc/xive.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/hw/intc/xive.c b/hw/intc/xive.c index 4532cfc467..caa8dc74b6 100644 --- a/hw/intc/xive.c +++ b/hw/intc/xive.c @@ -341,6 +341,19 @@ static void xive_tm_set_os_cppr(XivePresenter *xptr, X= iveTCTX *tctx, xive_tctx_set_cppr(tctx, TM_QW1_OS, value & 0xff); } =20 +static void xive_tctx_set_lgs(XiveTCTX *tctx, uint8_t ring, uint8_t lgs) +{ + uint8_t *regs =3D &tctx->regs[ring]; + + regs[TM_LGS] =3D lgs; +} + +static void xive_tm_set_os_lgs(XivePresenter *xptr, XiveTCTX *tctx, + hwaddr offset, uint64_t value, unsigned size) +{ + xive_tctx_set_lgs(tctx, TM_QW1_OS, value & 0xff); +} + /* * Adjust the IPB to allow a CPU to process event queues of other * priorities during one physical interrupt cycle. @@ -525,6 +538,8 @@ static const XiveTmOp xive2_tm_operations[] =3D { NULL }, { XIVE_TM_HV_PAGE, TM_QW1_OS + TM_WORD2, 4, xive2_tm_push_os_ctx, NULL }, + { XIVE_TM_OS_PAGE, TM_QW1_OS + TM_LGS, 1, xive_tm_set_os_lgs, + NULL }, { XIVE_TM_HV_PAGE, TM_QW3_HV_PHYS + TM_CPPR, 1, xive_tm_set_hv_cppr, NULL }, { XIVE_TM_HV_PAGE, TM_QW3_HV_PHYS + TM_WORD2, 1, xive_tm_vt_push, --=20 2.45.2