From patchwork Thu Jul 18 13:20:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 813175 Delivered-To: patch@linaro.org Received: by 2002:adf:f288:0:b0:367:895a:4699 with SMTP id k8csp290381wro; Thu, 18 Jul 2024 06:22:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVaWHbU42qQ5U9gU70fR5cSsK9pdXpZ3J5sYUZ1kEGZxoMJzue7eeHl71UJaB7qRLIVz19cbzvqG38TlD+WJ3fo X-Google-Smtp-Source: AGHT+IGWbDrWDl/HnMUGNyUNGrk651EE1U7GUoILMwSC/NR/0pNOmRz/V/RjT9PFFywqJMBhiPD1 X-Received: by 2002:a05:620a:3185:b0:79e:fca5:c312 with SMTP id af79cd13be357-7a19390b959mr89971285a.38.1721308941400; Thu, 18 Jul 2024 06:22:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721308941; cv=none; d=google.com; s=arc-20160816; b=I1tW7HdUGZKLxPBuv9feZt9d19aiWOvVjT3Ow89p/tTNysMt/9Wn7lMQrhOmJ9pquE AQrHa6IZnUhVDRegX1tjpSStffpzUNDFDbuZUMmkG4jF47FNXEFtAO/UuJD8RBaRVAMn YAJwwBW0R0DQWZry2Yy4sEErvr7PMIV30b696fikLEvA7Vb9L5z9UXd+Oru3bQeTylPX qsC08psylIXE4wdXwAyLBymaS8kTDhxs/te2MaqzNgCBftCUVWbTfENrZhudCc6UOARn c3beS6ZVs0x5QHcgU6S+d6kBo6FP0rauRqDAFrxj55mLan4+Sg/BEvft6Wj2bb8Z2gM5 JqPQ== 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:to:from :dkim-signature; bh=79yCY4ObJ0UJwhXu8mzRzCS0V2zPCSrYq+jeYyYlXHs=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=sy0Z7freoi240aDXYthiuZDKn5SjqUr8XJIUonlW4cRZz6k8PokuwEZTzlK2ozDjrU lLTqZ3dTTBH/LLE1TtGk8pA9ne14bpp8A794nTQ+xHTCjelTWQ5D1LHSmnaQwrbzlsoZ sdLtkxwy3dIejL84NMa+h9Bbr1ydYvCEiB+kyrLlQNpiNFIC6ebw3saSF3g4jZMnUBVZ lH8jXA8DzP3Q6fVr5PSojfe2/KeSfb6il5IAMsqDBjtDyd5v4QiToA2sZRU3rOOidTSz dXIunjvFq6Ka7YTjwksBYQmL2m48WcIcnnz3P0UDlhHy+TqV9Ow9EjP5PAcRg7LLEgHr z1IQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Dxt2Kyh3; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a1939de28esi53990485a.712.2024.07.18.06.22.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Jul 2024 06:22:21 -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=Dxt2Kyh3; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sUR4B-00022T-DX; Thu, 18 Jul 2024 09:21: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 1sUR3t-00009q-V4 for qemu-devel@nongnu.org; Thu, 18 Jul 2024 09:20:46 -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 1sUR3s-0004XF-5q for qemu-devel@nongnu.org; Thu, 18 Jul 2024 09:20:45 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3684e8220f9so398649f8f.1 for ; Thu, 18 Jul 2024 06:20:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721308842; x=1721913642; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=79yCY4ObJ0UJwhXu8mzRzCS0V2zPCSrYq+jeYyYlXHs=; b=Dxt2Kyh3FZG1zc8IuuyQ7T1RYfsysRAJaIded8TsEn3Qdg+CQR1lGmv4lRWEPKgjOn W/JRBpZ6RXpSVDHalJMkZFdYwkEWPq7nhKOu8OHmpKzjJoDTkid4zDFQBg2Wa3jWtzvb 3rKNTCl8J7ogM61aiT6GANoRP9Rp1l1QuChZWbR+LJsq/WyeoYMTQfBrUoFu0znOT1Sr Rw/YVGfQOS1CoQU4a+1H6srC7glAX3v4lj7dm7lwYgK74N1HNVRgx+0j9/UnC4JAtamM adr+bu6bqtF9J4vn5PYqvfz2Jc3wovYMnJ6/Uex7Ba2vt2sCPnmzhOxCq0T7k0tSt/y8 RNfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721308842; x=1721913642; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=79yCY4ObJ0UJwhXu8mzRzCS0V2zPCSrYq+jeYyYlXHs=; b=YB4qSO1lZT2pM4WBKxRpNV/QVNLMUtfRIOaK+osxyhVoFVbQE1vmC81DIHGsu1wXZU GlfsMbC1UHIG4llORcDhtVVZRMzNZy6srzDeiTiXIfnskeoafV7VXhf+xPbZIbSrBcNV 9gZJ1TccoIcVdh+mCIOwCoJMFs90VoBpvgthQhbs1/IqGQjR44UK+LG7jzyaPvVmk8fY 5ays9aZ6rICaGRdfrkE5uBs8v849oUvtHF3hGY1+/MWm/FMhtyWfcM1L6FyZeiEWSDoe HE+HvOXBOTOEa+Y+7La59xoRdOYJRnEOqMhn1Eeu/cxRxuP2y3ByZFml96Swbi9Unb/D hwpA== X-Gm-Message-State: AOJu0Yy3i2voq8NlHwwy9UEzi0DPU7U6MllGQDxp6gD173cZdj1TB+68 0ysGIHPiP7A6oN+agJTUyoKvFNkwP8UiaYWNhSxF7eEZSvKZ+1sWzGoVGv35/krqCEABh6tiS/M y X-Received: by 2002:adf:a11b:0:b0:368:37aa:50b3 with SMTP id ffacd0b85a97d-3684b3e3543mr2156357f8f.24.1721308842720; Thu, 18 Jul 2024 06:20:42 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427d2a8e420sm14059315e9.35.2024.07.18.06.20.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jul 2024 06:20:42 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 26/26] hvf: arm: Do not advance PC when raising an exception Date: Thu, 18 Jul 2024 14:20:28 +0100 Message-Id: <20240718132028.697927-27-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240718132028.697927-1-peter.maydell@linaro.org> References: <20240718132028.697927-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=peter.maydell@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 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 hvf did not advance PC when raising an exception for most unhandled system registers, but it mistakenly advanced PC when raising an exception for GICv3 registers. Cc: qemu-stable@nongnu.org Fixes: a2260983c655 ("hvf: arm: Add support for GICv3") Signed-off-by: Akihiko Odaki Message-id: 20240716-pmu-v3-4-8c7c1858a227@daynix.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index ef9bc42738d..eb090e67a2f 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1278,6 +1278,7 @@ static int hvf_sysreg_read(CPUState *cpu, uint32_t reg, uint32_t rt) /* Call the TCG sysreg handler. This is only safe for GICv3 regs. */ if (!hvf_sysreg_read_cp(cpu, reg, &val)) { hvf_raise_exception(cpu, EXCP_UDEF, syn_uncategorized()); + return 1; } break; case SYSREG_DBGBVR0_EL1: