From patchwork Mon Apr 1 20:59:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 161575 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp968767jan; Mon, 1 Apr 2019 14:39:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqzaVm9aFa5mY1vmA8OqqSjyrcPO+vJoN+0crvYwjO/eTTgQFDLeZsUeWNki+yfYV7UZCP8c X-Received: by 2002:a81:2ed2:: with SMTP id u201mr54681252ywu.72.1554154797833; Mon, 01 Apr 2019 14:39:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554154797; cv=none; d=google.com; s=arc-20160816; b=OKd3pHagVaAmqRK3UVg5Pf8IyCt5JF/44tzP2XZkWuz2le3N2nwIHZvrPLilpXVIpv b9oxIIFFDqNDzSCOGa8g+gVC9vy/GtoX4kfRqp0nexUYmeY2TvW1s+F4s626mMFQKNLU h9LFl1csvS++baCfJGmEmd6uImli1LnmU1GsmRKVX0OFwL7NuzptwaO67E0gxN8Uf0kf E644PJb7Xw1S9FgXMi4f6OLNX3JT4nGH9BvzUFdePXmtCKa0uE7gDfER+WczrWJFYJ6m PHbNPGyKiZ7DbLtFtmSiqCzvKhS52isGlHxud/aaIHwrGy29QDbUvAnAftl82gircuGo 93BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:message-id:mime-version:references :in-reply-to:date:to:from; bh=lloQ1Oqn5Ss+GISnAOl0kSA562JbtmayvmqZuYtCsP8=; b=Hq/Rjrexcop1rdKIYMpMFtvU7Lw7NnP0+Y8iSbtFYhcuDoi7NACDsGugzaLH9yqGDc 7T3WFvjM1GpVrs1V9qsDLfF/zaF2mByU7ZDpNnP1fao/3+9VsZ5Lqsui4sNOXS4aZ0bF n9i5emYGqHmT17Lp9JixKbpxUtMVpMIAjID46Rs5lNvocsTP6YcXg6nSTOKlpvg2fkGG wRu2cVC73FWDr+SHVzzIjiVrPtb7Xkk4IVZarmebq9cMYgcnt0eKqzUxqHoJBkXrKYm9 c7AAExit7pPq3t8JXPJqBSC80xejwWyEikfCpIVE39Y8JIIK/P1vCffpZ13XPJEOQETu GeIA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 204si6616554ybs.488.2019.04.01.14.39.57 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 01 Apr 2019 14:39: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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: from localhost ([127.0.0.1]:47439 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hB4er-00036z-AX for patch@linaro.org; Mon, 01 Apr 2019 17:39:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hB46g-0003Gu-Dc for qemu-devel@nongnu.org; Mon, 01 Apr 2019 17:04:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hB46f-0004i6-3a for qemu-devel@nongnu.org; Mon, 01 Apr 2019 17:04:38 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:45558 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hB46e-0004ZN-Ph for qemu-devel@nongnu.org; Mon, 01 Apr 2019 17:04:36 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x31L4KHY054847 for ; Mon, 1 Apr 2019 17:04:24 -0400 Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.149]) by mx0b-001b2d01.pphosted.com with ESMTP id 2rkr97pakc-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 01 Apr 2019 17:04:21 -0400 Received: from localhost by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 1 Apr 2019 22:02:28 +0100 Received: from b03cxnp08026.gho.boulder.ibm.com (9.17.130.18) by e31.co.us.ibm.com (192.168.1.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 1 Apr 2019 22:02:25 +0100 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x31L2OZK65470664 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 1 Apr 2019 21:02:24 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4030CC605A; Mon, 1 Apr 2019 21:02:24 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 15C7BC6055; Mon, 1 Apr 2019 21:02:24 +0000 (GMT) Received: from localhost (unknown [9.80.94.43]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Mon, 1 Apr 2019 21:02:23 +0000 (GMT) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 1 Apr 2019 15:59:23 -0500 X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190401210011.16009-1-mdroth@linux.vnet.ibm.com> References: <20190401210011.16009-1-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19040121-8235-0000-0000-00000E781EBA X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010857; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000283; SDB=6.01182941; UDB=6.00619269; IPR=6.00963684; MB=3.00026249; MTD=3.00000008; XFM=3.00000015; UTC=2019-04-01 21:02:26 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19040121-8236-0000-0000-000044FDC0BB Message-Id: <20190401210011.16009-50-mdroth@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-04-01_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904010136 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0b-001b2d01.pphosted.com id x31L4KHY054847 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH 49/97] virt: Suppress external aborts on virt-2.10 and earlier X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell In commit c79c0a314c43b78 we enabled emulation of external aborts when the guest attempts to access a physical address with no mapped device. In commit 4672cbd7bed88dc6 we suppress this for most legacy boards to prevent breakage of previously working guests, but we didn't suppress it in the 'virt' board, with the rationale "we know that guests won't try to prod devices that we don't describe in the device tree or ACPI tables". This is mostly true, but we've had a report of a Linux guest image that this did break. The problem seems to be that the guest is (incorrectly) configured with a DEBUG_UART_PHYS value that tells it there is a uart at 0x10009000 (which is true for vexpress but not for virt), so in early bootup the kernel probes this bogus address. This is a misconfigured guest, so we don't need to worry about it too much, but we can arrange that guests that ran on QEMU v2.10 (before c79c0a314c43b78) will still run on the "virt-2.10" board model, by suppressing external aborts only for that version and earlier. This seems a reasonable compromise: "virt-2.10" is supposed to behave the same way that "virt" did in the 2.10 release, and making it do that provides a usable workaround for guests with bugs like this. Cc: qemu-stable@nongnu.org Signed-off-by: Peter Maydell Message-id: 20180925144127.31965-1-peter.maydell@linaro.org Reviewed-by: Philippe Mathieu-Daudé (cherry picked from commit 846690dee8ca6a4143d20b39e894fd1f24627561) Signed-off-by: Michael Roth --- hw/arm/virt.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 281ddcdf6e..7f234ff6e8 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1881,6 +1881,8 @@ static void virt_machine_2_10_options(MachineClass *mc) { virt_machine_2_11_options(mc); SET_MACHINE_COMPAT(mc, VIRT_COMPAT_2_10); + /* before 2.11 we never faulted accesses to bad addresses */ + mc->ignore_memory_transaction_failures = true; } DEFINE_VIRT_MACHINE(2, 10)