All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: avi@redhat.com, mtosatti@redhat.com
Cc: kvm@vger.kernel.org
Subject: [PATCH RESEND] KVM: when entering real mode align segment base to 16 bytes
Date: Mon, 27 Dec 2010 15:01:10 +0200	[thread overview]
Message-ID: <20101227130110.GK2231@redhat.com> (raw)

VMX checks that base is equal segment shifted 4 bites left. Otherwise
guest entry fails.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
--
Same as previous one but with correct (I hope) To: header.

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 2260783..45014ba 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1736,7 +1736,7 @@ static void fix_rmode_seg(int seg, struct kvm_save_segment *save)
 	save->limit = vmcs_read32(sf->limit);
 	save->ar = vmcs_read32(sf->ar_bytes);
 	vmcs_write16(sf->selector, save->base >> 4);
-	vmcs_write32(sf->base, save->base & 0xfffff);
+	vmcs_write32(sf->base, save->base & 0xffff0);
 	vmcs_write32(sf->limit, 0xffff);
 	vmcs_write32(sf->ar_bytes, 0xf3);
 }
--
			Gleb.

             reply	other threads:[~2010-12-27 13:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-27 13:01 Gleb Natapov [this message]
2010-12-27 14:21 ` [PATCH RESEND] KVM: when entering real mode align segment base to 16 bytes Avi Kivity
2010-12-27 14:37   ` Gleb Natapov
2010-12-27 14:55     ` Avi Kivity
2010-12-27 14:58       ` Gleb Natapov
2010-12-27 15:15         ` 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=20101227130110.GK2231@redhat.com \
    --to=gleb@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /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.