From: Tsuneo Saito <tsnsaito@gmail.com>
To: qemu-devel@nongnu.org
Cc: Tsuneo Saito <tsnsaito@gmail.com>
Subject: [Qemu-devel] [PATCH 5/7] SPARC64: fix fault status overwritten on nonfaulting load
Date: Fri, 22 Jul 2011 00:16:31 +0900 [thread overview]
Message-ID: <1311261393-47400-6-git-send-email-tsnsaito@gmail.com> (raw)
In-Reply-To: <1311261393-47400-1-git-send-email-tsnsaito@gmail.com>
cpu_get_phys_page_nofault() calls get_physical_address() twice,
that results in overwriting the fault status in the SFSR.
We need this change in order for nonfaulting loads to raising MMU faults
as normal loads do.
Also removed the call to cpu_get_physical_page_desc() since we are
going to modify nonfaulting loads raising MMU faults.
Signed-off-by: Tsuneo Saito <tsnsaito@gmail.com>
---
target-sparc/helper.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/target-sparc/helper.c b/target-sparc/helper.c
index cb8d706..b6e62a7 100644
--- a/target-sparc/helper.c
+++ b/target-sparc/helper.c
@@ -752,13 +752,9 @@ target_phys_addr_t cpu_get_phys_page_nofault(CPUState *env, target_ulong addr,
{
target_phys_addr_t phys_addr;
- if (cpu_sparc_get_phys_page(env, &phys_addr, addr, 2, mmu_idx) != 0) {
- if (cpu_sparc_get_phys_page(env, &phys_addr, addr, 0, mmu_idx) != 0) {
- return -1;
- }
- }
- if (cpu_get_physical_page_desc(phys_addr) == IO_MEM_UNASSIGNED)
+ if (cpu_sparc_get_phys_page(env, &phys_addr, addr, 0, mmu_idx) != 0) {
return -1;
+ }
return phys_addr;
}
#endif
--
1.7.5.4
next prev parent reply other threads:[~2011-07-21 15:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-21 15:16 [Qemu-devel] [PATCH 0/7] SPARC64: fix nonfaulting load on softmmu Tsuneo Saito
2011-07-21 15:16 ` [Qemu-devel] [PATCH 1/7] SPARC64: TTE bits cleanup Tsuneo Saito
2011-07-21 15:16 ` [Qemu-devel] [PATCH 2/7] SPARC64: SFSR cleanup and fix Tsuneo Saito
2011-07-21 15:16 ` [Qemu-devel] [PATCH 3/7] SPARC64: introduce a convenience function for getting physical addresses Tsuneo Saito
2011-07-21 15:16 ` [Qemu-devel] [PATCH 4/7] SPARC64: split cpu_get_phys_page_debug() from cpu_get_phys_page_nofault() Tsuneo Saito
2011-07-21 15:16 ` Tsuneo Saito [this message]
2011-07-21 15:16 ` [Qemu-devel] [PATCH 6/7] SPARC64: implement MMU miss traps on nonfaulting loads Tsuneo Saito
2011-07-21 15:16 ` [Qemu-devel] [PATCH 7/7] SPARC64: implement addtional MMU faults related to nonfaulting load Tsuneo Saito
2011-07-21 20:15 ` [Qemu-devel] [PATCH 0/7] SPARC64: fix nonfaulting load on softmmu Blue Swirl
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=1311261393-47400-6-git-send-email-tsnsaito@gmail.com \
--to=tsnsaito@gmail.com \
--cc=qemu-devel@nongnu.org \
/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).