From: Akihiko Odaki <akihiko.odaki@daynix.com>
To: Peter Maydell <peter.maydell@linaro.org>,
Thomas Huth <thuth@redhat.com>,
Laurent Vivier <lvivier@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org, kvm@vger.kernel.org,
Akihiko Odaki <akihiko.odaki@daynix.com>
Subject: [PATCH v3 4/5] hvf: arm: Do not advance PC when raising an exception
Date: Tue, 16 Jul 2024 21:50:33 +0900 [thread overview]
Message-ID: <20240716-pmu-v3-4-8c7c1858a227@daynix.com> (raw)
In-Reply-To: <20240716-pmu-v3-0-8c7c1858a227@daynix.com>
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.
Fixes: a2260983c655 ("hvf: arm: Add support for GICv3")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
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 ef9bc42738d0..eb090e67a2f8 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:
--
2.45.2
next prev parent reply other threads:[~2024-07-16 12:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-16 12:50 [PATCH v3 0/5] target/arm/kvm: Report PMU unavailability Akihiko Odaki
2024-07-16 12:50 ` [PATCH v3 1/5] tests/arm-cpu-features: Do not assume PMU availability Akihiko Odaki
2024-07-16 12:50 ` [PATCH v3 2/5] target/arm/kvm: Fix PMU feature bit early Akihiko Odaki
2024-07-18 12:07 ` Peter Maydell
2024-07-19 7:21 ` Akihiko Odaki
2024-07-19 12:21 ` Cornelia Huck
2024-07-19 16:29 ` Akihiko Odaki
2024-07-16 12:50 ` [PATCH v3 3/5] target/arm: Always add pmu property for Armv8 Akihiko Odaki
2024-07-18 12:08 ` Peter Maydell
2024-07-16 12:50 ` Akihiko Odaki [this message]
2024-07-16 12:50 ` [PATCH v3 5/5] hvf: arm: Properly disable PMU Akihiko Odaki
2024-07-18 12:13 ` Peter Maydell
2024-07-18 12:14 ` [PATCH v3 0/5] target/arm/kvm: Report PMU unavailability Peter Maydell
2024-07-18 12:47 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240716-pmu-v3-4-8c7c1858a227@daynix.com \
--to=akihiko.odaki@daynix.com \
--cc=kvm@vger.kernel.org \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).