From nobody Thu Nov 14 18:10: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=1708331455; cv=none; d=zohomail.com; s=zohoarc; b=hYyRgoTmuilwVKdW7oCN4kdkJYVhlykDeUSVRIPmSOD648NflNJacxFkJwFpqmu4GSqAJSsnhvFN1sYdR20eFAitCByxX3SzaU3gSRPUFNJF2u9e6hQf6ziFJc5+nO5gdDxGuZHrRHgkwx+m4PN7mSXgDLoaf9f4UUfOm2RzFig= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708331455; h=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=w9FRJ2ZWIfP9zV5rwAD9pnJwp81GQt2uUL68JC2IbS8=; b=FUbbpIZRA+kAMfASpJps85PvUpDo9UO3iFSwyXgPoykjQXe6/zE+WGs+dnXs+cNRFT3fbNyXnRq46Lug2ngaK8ohO1LGWaz15MBSmBi1w6hYY8jWQopIvjzrRb7FmepxhmkFGG1t4nzOM9p7ZTqQx14fbJUo7o+r5T9ycQZYYb0= 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 1708331455780127.22530258756831; Mon, 19 Feb 2024 00:30:55 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rbz2T-0008TL-RK; Mon, 19 Feb 2024 03:30:13 -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 1rbz2K-0008Qa-LX; Mon, 19 Feb 2024 03:30:09 -0500 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rbz2I-0001tq-4c; Mon, 19 Feb 2024 03:30:04 -0500 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-6e4670921a4so252652b3a.0; Mon, 19 Feb 2024 00:30:01 -0800 (PST) Received: from wheely.local0.net ([1.146.38.93]) by smtp.gmail.com with ESMTPSA id mo7-20020a1709030a8700b001db5ecd115bsm3838348plb.276.2024.02.19.00.29.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 00:29:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708331399; x=1708936199; 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=w9FRJ2ZWIfP9zV5rwAD9pnJwp81GQt2uUL68JC2IbS8=; b=Ovbj/8Io7at5Md5NY3UdtlqX/lRLU/v4L/+nx4DpkBfEvGCZr0ZC4tTKP+kwXPtHJN t+pw24X7Xgg2zNT3e5OBlMLaHa/kxdxePrGmUrhVkh0rj2vxV9yoL6g3HgecKpIAoH6D GigVEvk1r07PQurHznEyetH9J1b72/SJZ29cb4QyTNy/A3BALNDimpxtzgEMeuy8S8Pn wjdN586uwVPe1xSzdb2NdOyiMuBY8VQFCZiZt5kNRZwUAAQ50Sk2WUjvhsBqsQmtm3aA scyp9TG/+HLauNtp6AQ/G0VU9hF4jYhNq86ruU0yALyZkxHx4SboTHolLmsV6gz7BFuc DdSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708331399; x=1708936199; 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=w9FRJ2ZWIfP9zV5rwAD9pnJwp81GQt2uUL68JC2IbS8=; b=r/00iajHwz0r+07pT1XjygyHiO3O3muHVmMwR38jFEdl9I3ZoergILIhl7OQ1MOyF1 VrX6ONDxETqyMLlxWSs5BzYO/NpK4oX1cPQull/P608Hbmr51IHVe3hsYA8gavs/+mpb DuPlgCNudR+1t8YL0KH6kSLY/7vV9N4sLLbD0MAz2nAPtTjhUwURGcr1fKLB6q1HZBFs 8cHoOkddZIZneRKYX5PvvTQMUPK3UoxKDB/RVukl+Mu6z5qRl8icB948ayLoO1DsuZFg 1F3LVgkKqIOr6UrGeJ/DC1TyGhZIBrSb4c9mv3JDl17s4aamSsu+jgSdivVKeKWLSjXU /jcA== X-Forwarded-Encrypted: i=1; AJvYcCX6WJNXY5VVCuKNBSARJMdcjAWgNdf7bTZ1lhr3ZWQNob/bcYBo44Cf4qgIkBac5LpFkoLDCUSNGmDNg/fWUfp6EYedeV6E4BBa4DvsWH/YX0pPdxL9q9HksYzQ X-Gm-Message-State: AOJu0YwzgoFyWJKhjBby0U+UInpwjVQ2FKYRJgBKTNew4NK7H+x3gVfW yTG4IHJdRNCSakMI/2SIKYnmg89dznH8NwWvDEJLkJ/7VSBVG1p10zUam5gR X-Google-Smtp-Source: AGHT+IGUPMasGuH6W2xwoS/4QOj8LGTtxFyONubrnI9V8Vpk2+l/QabO6gX0Oc0Nzmqm7/Zw9BlTrw== X-Received: by 2002:a05:6a21:1799:b0:1a0:56c9:608e with SMTP id nx25-20020a056a21179900b001a056c9608emr16097694pzb.61.1708331399599; Mon, 19 Feb 2024 00:29:59 -0800 (PST) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , qemu-ppc@nongnu.org, Daniel Henrique Barboza , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Harsh Prateek Bora , qemu-stable@nongnu.org, Joel Stanley Subject: [PULL 01/49] target/ppc: Fix lxv/stxv MSR facility check Date: Mon, 19 Feb 2024 18:28:50 +1000 Message-ID: <20240219082938.238302-2-npiggin@gmail.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240219082938.238302-1-npiggin@gmail.com> References: <20240219082938.238302-1-npiggin@gmail.com> MIME-Version: 1.0 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::430; envelope-from=npiggin@gmail.com; helo=mail-pf1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1708331457948100003 Content-Type: text/plain; charset="utf-8" The move to decodetree flipped the inequality test for the VEC / VSX MSR facility check. This caused application crashes under Linux, where these facility unavailable interrupts are used for lazy-switching of VEC/VSX register sets. Getting the incorrect interrupt would result in wrong registers being loaded, potentially overwriting live values and/or exposing stale ones. Cc: qemu-stable@nongnu.org Reported-by: Joel Stanley Fixes: 70426b5bb738 ("target/ppc: moved stxvx and lxvx from legacy to decod= tree") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1769 Tested-by: Harsh Prateek Bora Signed-off-by: Nicholas Piggin --- target/ppc/translate/vsx-impl.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/translate/vsx-impl.c.inc b/target/ppc/translate/vsx= -impl.c.inc index 6db87ab336..0266f09119 100644 --- a/target/ppc/translate/vsx-impl.c.inc +++ b/target/ppc/translate/vsx-impl.c.inc @@ -2268,7 +2268,7 @@ static bool do_lstxv(DisasContext *ctx, int ra, TCGv = displ, =20 static bool do_lstxv_D(DisasContext *ctx, arg_D *a, bool store, bool paire= d) { - if (paired || a->rt >=3D 32) { + if (paired || a->rt < 32) { REQUIRE_VSX(ctx); } else { REQUIRE_VECTOR(ctx); --=20 2.42.0