From: Paolo Bonzini <pbonzini@redhat.com>
To: Alexander Boettcher <alexander.boettcher@genode-labs.com>,
Richard Henderson <rth@twiddle.net>,
Eduardo Habkost <ehabkost@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [PATCH] tcg/svm: use host cr4 during NPT page table walk
Date: Mon, 29 Jun 2020 17:12:01 +0200 [thread overview]
Message-ID: <2e0f1409-c92b-560d-ca43-82b51cd88d41@redhat.com> (raw)
In-Reply-To: <c9ba7c23-581e-86d8-8174-37d2beeab768@genode-labs.com>
On 29/06/20 15:25, Alexander Boettcher wrote:
> Hello,
>
> during a page table walk of TCG+SVM the code in target/i386/excp_helper.c get_hphys() uses the cr4 register of the guest instead of the hypervisor to check for the PSE bit. In the test case we have, the guest have not enabled (yet) the PSE bit and so the page table walk results in a wrong host physical address resolution and wrong content read by the guest.
>
> Attached patch is against 4.2.1, but works also on 3.1.0. It fixes the issue for our automated testcase, which is a 32bit hypervisor w/o PAE support running a guest VM with tcg+svm.
> The test worked beforehand up to qemu 2.12, started to fail with qemu 3.0 and later. The added TCG/SVM NPT commit seems to introduce the regression.
>
> In case someone want to try to reproduce it, the iso is at [0], the good case is [1] and the failing case is [2]. The used commandline is:
>
> qemu-system-i386 -no-kvm -nographic -cpu phenom -m 512 -machine q35 -cdrom seoul-vmm-test.iso
>
> [0] https://depot.genode.org/alex-ab/images/seoul-vmm-test.iso
> [1] https://depot.genode.org/alex-ab/images/seoul-vmm-good.txt
> [2] https://depot.genode.org/alex-ab/images/seoul-vmm-bad.txt
>
Queued, thanks.
Paolo
prev parent reply other threads:[~2020-06-29 15:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-29 13:25 [PATCH] tcg/svm: use host cr4 during NPT page table walk Alexander Boettcher
2020-06-29 15:12 ` Paolo Bonzini [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=2e0f1409-c92b-560d-ca43-82b51cd88d41@redhat.com \
--to=pbonzini@redhat.com \
--cc=alexander.boettcher@genode-labs.com \
--cc=ehabkost@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).