From: "Hervé Poussineau" <hpoussin@reactos.org>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: Blue Swirl <blauwirbel@gmail.com>,
qemu-devel <qemu-devel@nongnu.org>,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH] kvmvapic: Fix TB invalidation after instruction patching
Date: Sun, 04 Nov 2012 08:51:19 +0100 [thread overview]
Message-ID: <50961E77.9050805@reactos.org> (raw)
In-Reply-To: <50961086.4000704@web.de>
Jan Kiszka a écrit :
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Since 0b57e287, cpu_memory_rw_debug already triggers a TB invalidation.
> As it doesn't (and cannot) set is_cpu_write_access=1 but "consumes" the
> currently executed TB, the tb_invalidate_phys_page_range call from
> patch_instruction didn't work anymore.
>
> Fix this by open-coding the required bits to restore the CPU state from
> the current TB position before patching and resume execution on the
> patched instruction afterward.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>
Tested-by: Hervé Poussineau <hpoussin@reactos.org>
However, I had to initialize current_pc, current_cs_base and
current_flags to 0 to prevent uninitialized warning.
(GCC 4.7.1, KVM disabled by configure)
Regards,
Hervé
next prev parent reply other threads:[~2012-11-04 7:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-04 6:51 [Qemu-devel] [PATCH] kvmvapic: Fix TB invalidation after instruction patching Jan Kiszka
2012-11-04 7:51 ` Hervé Poussineau [this message]
2012-11-04 8:16 ` [Qemu-devel] [PATCH v2] " Jan Kiszka
2012-11-10 19:27 ` 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=50961E77.9050805@reactos.org \
--to=hpoussin@reactos.org \
--cc=blauwirbel@gmail.com \
--cc=david@gibson.dropbear.id.au \
--cc=jan.kiszka@web.de \
--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).