All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bernhard Kauer <Bernhard.Kauer@incari.com>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Subject: [PATCH] target/i386: translate GPA to HPA even in unpaged mode
Date: Fri, 20 Jan 2023 22:04:47 +0000	[thread overview]
Message-ID: <BEZP281MB2965D9D27639B815DB6BA2A9E9C59@BEZP281MB2965.DEUP281.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <BEZP281MB2965EA2D8C69925DEFD4B6C8E9C59@BEZP281MB2965.DEUP281.PROD.OUTLOOK.COM>

Guest to host page translation should be done even if the guest runs in unpaged mode.
See last sentence in AMD SDM rev 3.40 section 15.25.5.

Signed-off-by: Bernhard Kauer <bernhard.kauer@incari.com>
---
 target/i386/tcg/sysemu/excp_helper.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/target/i386/tcg/sysemu/excp_helper.c b/target/i386/tcg/sysemu/excp_helper.c
index 55bd1194d3..8d9152245b 100644
--- a/target/i386/tcg/sysemu/excp_helper.c
+++ b/target/i386/tcg/sysemu/excp_helper.c
@@ -576,6 +576,9 @@ static bool get_physical_address(CPUX86State *env, vaddr addr,
             }
             return mmu_translate(env, &in, out, err);
         }
+        if (use_stage2) {
+            return get_physical_address(env, addr, access_type, MMU_NESTED_IDX, out, err);
+        }
         break;
     }
 


      reply	other threads:[~2023-01-20 22:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-20 21:06 [PATCH] target/i386: translate GPA to HPA even in unpaged mode Bernhard Kauer
2023-01-20 22:04 ` Bernhard Kauer [this message]

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=BEZP281MB2965D9D27639B815DB6BA2A9E9C59@BEZP281MB2965.DEUP281.PROD.OUTLOOK.COM \
    --to=bernhard.kauer@incari.com \
    --cc=pbonzini@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.