From nobody Mon Apr 29 14:55:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1616421894; cv=none; d=zohomail.com; s=zohoarc; b=bXwp5GYBfGezq0iSBw0K+fYBatWaot+VuSh3eJGJ+B9jN4EnRfuq2MtCKIbppafT9Foq5dHVx/gFjyY7928zguGVcI4AvpFr5HSLizYebd4l+cEhu5xARtLgGxc6U7P9Xz+8R4MnKWGTybUZdKpLaIBAJI/8goEPs27ipWIIhf8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616421894; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=QqnRDcqbG8JtPoVsmIsAnMFqlbytcIG4xMZDFP2Crww=; b=XsXwtEbNPeP787g30+n19oKAKFjxqRAq3BPOKh8A4nC3PUOI5o/EQ8+6bkz24HQinCAMxxAbn7bsIKjplfjhipLOHxno/UzRsOGebdUo27nvAESEJS7k9P8Uy34i9rhknOuYN6+jgcGyg2W4t9x9PX7arPyKNhc5hRvaR2Tk6A4= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 161642189491949.2963502793001; Mon, 22 Mar 2021 07:04:54 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-360-wRgF-PeTMlS3QLWf53bseA-1; Mon, 22 Mar 2021 10:00:50 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A7A07881D7A; Mon, 22 Mar 2021 14:00:43 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7161319C87; Mon, 22 Mar 2021 14:00:43 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 21C0F18005B6; Mon, 22 Mar 2021 14:00:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12ME0AD8028262 for ; Mon, 22 Mar 2021 10:00:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id D98702026D60; Mon, 22 Mar 2021 14:00:10 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D3F892026D65 for ; Mon, 22 Mar 2021 14:00:08 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 60F2780B921 for ; Mon, 22 Mar 2021 14:00:08 +0000 (UTC) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-194-DWaDawJGOMSdkknsHiwSqA-1; Mon, 22 Mar 2021 10:00:05 -0400 Received: by mail-wr1-f42.google.com with SMTP id j18so16976124wra.2 for ; Mon, 22 Mar 2021 07:00:05 -0700 (PDT) Received: from localhost.localdomain (17.red-88-21-201.staticip.rima-tde.net. [88.21.201.17]) by smtp.gmail.com with ESMTPSA id e13sm23252197wrg.72.2021.03.22.07.00.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Mar 2021 07:00:03 -0700 (PDT) X-MC-Unique: wRgF-PeTMlS3QLWf53bseA-1 X-MC-Unique: DWaDawJGOMSdkknsHiwSqA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=QqnRDcqbG8JtPoVsmIsAnMFqlbytcIG4xMZDFP2Crww=; b=nyM6Ff14R6fDXArX37ecDdcXuf54wXG7PBQruGVo6LqgoOmPqBAt8ZAM2aoEvc5T65 XkFeB/hNXoPqcOyZbxPpqFuxFF/IfqtKavaFeH+NNnrxKpCnwkXIl8OxSRpHptN2BS8p VA7IHxOnbjMCieFfpoBZu6Qjsl6yvsb1Q+CXgEa0eAu5t+bD0KmSObwCSAVSlXbQUSaU 79xmCMGNvIEN/8rldfprM5UwdN4x4ZhOkSlwSCmajCJTek1UsRQbHRYgsbdY8IUUPcCx vQzz/fNWb9C7Jv3a4xSWez9yzt+99L17fT1Cll0Tl8RPQUcfqAffDafioWd7jy9TtZo2 vUBQ== X-Gm-Message-State: AOAM5305LgqDsZzzgmCyZGtgmJfGcpBD+L1Aw23hKXBVkl7Pj37ZVeu4 QBUOF57bkUWfg0eXz4LJbBw= X-Google-Smtp-Source: ABdhPJxSV9Pw3D+cZyEEq1dzNnvjDsbkngwylNnN575P8K35hrcy1R+I9VFFeicdDFlZ3dDSU5IK6g== X-Received: by 2002:adf:b1c9:: with SMTP id r9mr18844903wra.51.1616421604280; Mon, 22 Mar 2021 07:00:04 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 1/2] target/mips/mxu_translate.c: Fix array overrun for D16MIN/D16MAX Date: Mon, 22 Mar 2021 14:59:56 +0100 Message-Id: <20210322135957.4108728-2-f4bug@amsat.org> In-Reply-To: <20210322135957.4108728-1-f4bug@amsat.org> References: <20210322135957.4108728-1-f4bug@amsat.org> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: Peter Maydell , Aleksandar Rikalo , libvir-list@redhat.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , qemu-stable@nongnu.org, Aurelien Jarno X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Peter Maydell Coverity reported (CID 1450831) an array overrun in gen_mxu_D16MAX_D16MIN(): 1103 } else if (unlikely((XRb =3D=3D 0) || (XRa =3D=3D 0))) { .... 1112 if (opc =3D=3D OPC_MXU_D16MAX) { 1113 tcg_gen_smax_i32(mxu_gpr[XRa - 1], t0, t1); 1114 } else { 1115 tcg_gen_smin_i32(mxu_gpr[XRa - 1], t0, t1); 1116 } >>> Overrunning array "mxu_gpr" of 15 8-byte elements at element index 4294967295 (byte offset 34359738367) using index "XRa - 1U" (which evaluates to 4294967295). This happens because the code is confused about which of XRa, XRb and XRc is the output, and which are the inputs. XRa is the output, but most of the conditions separating out different special cases are written as if XRc is the output, with the result that we can end up in the code path that assumes XRa is non-0 even when it is zero. Fix the erroneous code, bringing it in to line with the structure used in functions like gen_mxu_S32MAX_S32MIN() and gen_mxu_Q8MAX_Q8MIN(). Fixes: CID 1450831 Fixes: bb84cbf38505bd1d8 Cc: qemu-stable@nongnu.org Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20210316131353.4533-1-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/mips/mxu_translate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/mips/mxu_translate.c b/target/mips/mxu_translate.c index afc008eeeef..fb0a811af6c 100644 --- a/target/mips/mxu_translate.c +++ b/target/mips/mxu_translate.c @@ -1095,12 +1095,12 @@ static void gen_mxu_D16MAX_D16MIN(DisasContext *ctx) =20 if (unlikely(pad !=3D 0)) { /* opcode padding incorrect -> do nothing */ - } else if (unlikely(XRc =3D=3D 0)) { + } else if (unlikely(XRa =3D=3D 0)) { /* destination is zero register -> do nothing */ - } else if (unlikely((XRb =3D=3D 0) && (XRa =3D=3D 0))) { + } else if (unlikely((XRb =3D=3D 0) && (XRc =3D=3D 0))) { /* both operands zero registers -> just set destination to zero */ - tcg_gen_movi_i32(mxu_gpr[XRc - 1], 0); - } else if (unlikely((XRb =3D=3D 0) || (XRa =3D=3D 0))) { + tcg_gen_movi_i32(mxu_gpr[XRa - 1], 0); + } else if (unlikely((XRb =3D=3D 0) || (XRc =3D=3D 0))) { /* exactly one operand is zero register - find which one is not...= */ uint32_t XRx =3D XRb ? XRb : XRc; /* ...and do half-word-wise max/min with one operand 0 */ --=20 2.26.2 From nobody Mon Apr 29 14:55:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1616421635; cv=none; d=zohomail.com; s=zohoarc; b=Xxb4uHyXO5Co65M61pbsNoiIfL9rVuWGl1ePs7gwmVwhyK4TyM9t2ezzo1NMR/CGWFXwOWLCKS5/qaKd3Sc+S1RlNfhQDy24PpnwgzFBoBOWMjp8qnf8g+ut9up0Fdf43yX3jwFHhQX/k+fgkMXaUBTxWtO56/e9Wews/rGesB4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616421635; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=M1U3MX8CXg2oweQX1NBg0mnflTVx5CKvnyZhxQNAl1g=; b=YEQJJ5eeSsgOlpIspvmhUa7I+v7RXI4EFsnvYpQGLtNDMh2rDlsmyCrIOO81gJEsnomE0gj0vwpTCnd9k7cwu0efwr+FL7oUqFQNXut/RIRYaYty3IHx7Qg66OGUu5MlsVx7AttDkEKe6CXzXV/6PRwsUJq3AlFQRpl7nEWmtSw= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1616421635430243.25073315048382; Mon, 22 Mar 2021 07:00:35 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-142-LxiOQUHzMnyzeUyCC4iB-A-1; Mon, 22 Mar 2021 10:00:28 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C21E61084D6D; Mon, 22 Mar 2021 14:00:21 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 959715945D; Mon, 22 Mar 2021 14:00:21 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0D8FF1809C83; Mon, 22 Mar 2021 14:00:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12ME0Jet028281 for ; Mon, 22 Mar 2021 10:00:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id EBC7D1112C0D; Mon, 22 Mar 2021 14:00:18 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E75281120AA6 for ; Mon, 22 Mar 2021 14:00:14 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2C0B7892D34 for ; Mon, 22 Mar 2021 14:00:14 +0000 (UTC) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-598-dvxR-N7wP2CChTHk7dnxpg-1; Mon, 22 Mar 2021 10:00:10 -0400 Received: by mail-wr1-f45.google.com with SMTP id k8so16963876wrc.3 for ; Mon, 22 Mar 2021 07:00:10 -0700 (PDT) Received: from localhost.localdomain (17.red-88-21-201.staticip.rima-tde.net. [88.21.201.17]) by smtp.gmail.com with ESMTPSA id b15sm19128335wmd.41.2021.03.22.07.00.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Mar 2021 07:00:08 -0700 (PDT) X-MC-Unique: LxiOQUHzMnyzeUyCC4iB-A-1 X-MC-Unique: dvxR-N7wP2CChTHk7dnxpg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=M1U3MX8CXg2oweQX1NBg0mnflTVx5CKvnyZhxQNAl1g=; b=mObn/XQmQtK54c/S2247m0Vb4cj9konsRi6d5DPPjL1Gmh+r/YwoH0YJdyfYkH6S5O DHjCsE0MMnqucB6k2nEuKj4lSJ6YeVcCwIc8WH3r3CWhOraCUe5i9f67pkb7D3rX+VD8 IBAyETjiC9MKQ3MOj24XCnQUNPE/dAza6u4PzmylQoB/uS3wrrjZHvBf23zwfD9DXXpm fdoJXNArI8UUtHfn+iYmLoJgZJEQYPrQruL/G9qQp+FZmXH6iEUI5nyAt+yW386Kt4TS rlSaMOuEOhT+ELSm5rWloAReHF/bTZ9aOzCGluYfwhE7brsFD23P0YGkiypqKnMn+M4S 7oAQ== X-Gm-Message-State: AOAM531h3/mpyMtBsq0KTYNOjJZkbXj66gc70ia1Qr0DwwJW9UuMr1s3 PQX6gXliR4lAbDJOevPhn5zP9bmkk8e8HA== X-Google-Smtp-Source: ABdhPJzIttnkbsYm/dXqcOyrcCgtR9OeG8UT5Zlth3+wx8ZRLVxC3xXGgNqAIF6W78nVgTpnC6yZ3w== X-Received: by 2002:a1c:e341:: with SMTP id a62mr19975wmh.152.1616421609251; Mon, 22 Mar 2021 07:00:09 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 2/2] target/mips: Deprecate Trap-and-Emul KVM support Date: Mon, 22 Mar 2021 14:59:57 +0100 Message-Id: <20210322135957.4108728-3-f4bug@amsat.org> In-Reply-To: <20210322135957.4108728-1-f4bug@amsat.org> References: <20210322135957.4108728-1-f4bug@amsat.org> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Cc: libvir-list@redhat.com, Aleksandar Rikalo , Aurelien Jarno , Jiaxun Yang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Jiaxun Yang Upstream kernel had removed both host[1] and guest[2] support. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/= ?id=3D45c7e8af4a5e3f0bea4ac209eea34118dd57ac64 [2]: https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/= ?id=3Da1515ec7204edca770c07929df8538fcdb03ad46 Signed-off-by: Jiaxun Yang Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20210317011235.7425-1-jiaxun.yang@flygoat.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- docs/system/deprecated.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst index 67c98dcaa0c..d3004acf948 100644 --- a/docs/system/deprecated.rst +++ b/docs/system/deprecated.rst @@ -186,6 +186,15 @@ Use the more generic commands ``block-export-add`` and= ``block-export-del`` instead. As part of this deprecation, where ``nbd-server-add`` used a single ``bitmap``, the new ``block-export-add`` uses a list of ``bitmaps``. =20 +System accelerators +------------------- + +MIPS ``Trap-and-Emul`` KVM support (since 6.0) +'''''''''''''''''''''''''''''''''''''''''''''' + +The MIPS ``Trap-and-Emul`` KVM host and guest support has been removed +from upstream kernel, declare it deprecated. + System emulator CPUS -------------------- =20 --=20 2.26.2