public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: kvm-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org,
	Laurent Vivier <Laurent.Vivier@bull.net>,
	Avi Kivity <avi@qumranet.com>
Subject: [PATCH 02/11] KVM: x86 emulator: fix repne/repnz decoding
Date: Sun, 21 Oct 2007 13:08:03 +0200	[thread overview]
Message-ID: <11929648921877-git-send-email-avi@qumranet.com> (raw)
In-Reply-To: <1192964892617-git-send-email-avi@qumranet.com>

From: Laurent Vivier <Laurent.Vivier@bull.net>

The repnz/repne instructions must set rep_prefix to 1 like rep/repe/repz.

This patch correct the disk probe problem met with OpenBSD.

This issue appears with commit e70669abd4e60dfea3ac1639848e20e2b8dd1255
because before it, the decoding was done internally to kvm and after it
is done by x86_emulate.c (which doesn't do it correctly).

Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Avi Kivity <avi@qumranet.com>
---
 drivers/kvm/x86_emulate.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index b1026d2..80b1758 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -596,11 +596,10 @@ x86_emulate_memop(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
 		case 0xf0:	/* LOCK */
 			lock_prefix = 1;
 			break;
+		case 0xf2:	/* REPNE/REPNZ */
 		case 0xf3:	/* REP/REPE/REPZ */
 			rep_prefix = 1;
 			break;
-		case 0xf2:	/* REPNE/REPNZ */
-			break;
 		default:
 			goto done_prefixes;
 		}
-- 
1.5.3


  parent reply	other threads:[~2007-10-21 11:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-21 11:08 [PATCH 00/11] KVM updates for Linux 2.6.24-rc review Avi Kivity
2007-10-21 11:08 ` [PATCH 01/11] KVM: x86 emulator: fix merge screwup due to emulator split Avi Kivity
2007-10-21 11:08 ` Avi Kivity [this message]
2007-10-21 11:08 ` [PATCH 03/11] KVM: MMU: Set shadow pte atomically in mmu_pte_write_zap_pte() Avi Kivity
2007-10-21 11:08 ` [PATCH 04/11] KVM: VMX: Handle NMIs before enabling interrupts and preemption Avi Kivity
2007-10-21 11:08 ` [PATCH 05/11] KVM: VMX: Reset mmu context when entering real mode Avi Kivity
2007-10-21 11:08 ` [PATCH 06/11] KVM: x86 emulator: implement 'movnti mem, reg' Avi Kivity
2007-10-21 11:08 ` [PATCH 07/11] KVM: VMX: Force vm86 mode if setting flags during real mode Avi Kivity
2007-10-21 11:08 ` [PATCH 08/11] KVM: x86 emulator: fix access registers for instructions with ModR/M byte and Mod = 3 Avi Kivity
2007-10-21 11:08 ` [PATCH 09/11] KVM: Move kvm_guest_exit() after local_irq_enable() Avi Kivity
2007-10-21 11:08 ` [PATCH 10/11] KVM: Fix local apic timer divide by zero Avi Kivity
2007-10-21 11:08 ` [PATCH 11/11] KVM: Improve local apic timer wraparound handling Avi Kivity
2007-10-21 11:12 ` [PATCH 00/11] KVM updates for Linux 2.6.24-rc review Avi Kivity
2007-10-21 11:53   ` Laurent Vivier
2007-10-21 12:07     ` Avi Kivity
2007-10-21 12:38       ` [kvm-devel] " Laurent Vivier
2007-10-22  9:36         ` Avi Kivity

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=11929648921877-git-send-email-avi@qumranet.com \
    --to=avi@qumranet.com \
    --cc=Laurent.Vivier@bull.net \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.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