* [Qemu-devel] [PATCH 0/1] kvm stable updates for qemu 0.12.3
@ 2010-02-23 14:54 Avi Kivity
2010-02-23 14:54 ` [Qemu-devel] [PATCH 1/1] kvm: Fix eflags corruption in kvm mode Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Avi Kivity @ 2010-02-23 14:54 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel, kvm
Just one patch, fixing eflags corruption. Also available from git:
git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/stable-0.12
Please pull.
Jan Kiszka (1):
kvm: Fix eflags corruption in kvm mode
cpu-exec.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Qemu-devel] [PATCH 1/1] kvm: Fix eflags corruption in kvm mode
2010-02-23 14:54 [Qemu-devel] [PATCH 0/1] kvm stable updates for qemu 0.12.3 Avi Kivity
@ 2010-02-23 14:54 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2010-02-23 14:54 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel, kvm
From: Jan Kiszka <jan.kiszka@siemens.com>
This should explain a lot of the weird breakages of upstream KVM we've
seen recently (actually we should have seen it much earlier):
Stop translating eflags into TCG format when in kvm mode as we never
translate it back and rather sync this broken state into the kernel.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
---
cpu-exec.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/cpu-exec.c b/cpu-exec.c
index af4595b..3246c9e 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -232,11 +232,13 @@ int cpu_exec(CPUState *env1)
env_to_regs();
#if defined(TARGET_I386)
- /* put eflags in CPU temporary format */
- CC_SRC = env->eflags & (CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C);
- DF = 1 - (2 * ((env->eflags >> 10) & 1));
- CC_OP = CC_OP_EFLAGS;
- env->eflags &= ~(DF_MASK | CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C);
+ if (!kvm_enabled()) {
+ /* put eflags in CPU temporary format */
+ CC_SRC = env->eflags & (CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C);
+ DF = 1 - (2 * ((env->eflags >> 10) & 1));
+ CC_OP = CC_OP_EFLAGS;
+ env->eflags &= ~(DF_MASK | CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C);
+ }
#elif defined(TARGET_SPARC)
#elif defined(TARGET_M68K)
env->cc_op = CC_OP_FLAGS;
--
1.7.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-02-23 14:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-23 14:54 [Qemu-devel] [PATCH 0/1] kvm stable updates for qemu 0.12.3 Avi Kivity
2010-02-23 14:54 ` [Qemu-devel] [PATCH 1/1] kvm: Fix eflags corruption in kvm mode Avi Kivity
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).