All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: "Kamble,
	Nitin A" <nitin.a.kamble-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel <kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: [PATCH] Handle #SS(0), caused by address size override in vm86 mode
Date: Thu, 17 May 2007 15:51:33 +0300	[thread overview]
Message-ID: <464C4FD5.4010605@qumranet.com> (raw)
In-Reply-To: <1179364298.21228.6.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>

Kamble, Nitin A wrote:
> Hi Avi,
>
> I was playing with KVM while booting SuSE Linux 10.1 on it. And I 
> found it was bailing out with #SS fault. I root caused it to the 
> address size override opcode (0x67) from a mov instruction from the 
> boot loader.
>   The attached patch handles the #SS(0) fault with emulation, letting 
> guest can proceed further.

Applied, thanks.  Please use Linux style comment next time (
/*
 * blah blah
 */
)

> commit e7ae040a34ae99ac4eb08701b1a54a7e4315238a
> Author: Nitin A Kamble <nitin.a.kamble-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Date:   Wed May 16 21:05:58 2007 -0700
>
>      Instruction with address size override prefix opcode 0x67
>      Cause the #SS fault with 0 error code in VM86 mode.
>      <Signed-Off-By: Nitin A Kamble <nitin.a.kamble-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>
> diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
> index b1430e1..7d7edb7 100644
> --- a/drivers/kvm/vmx.c
> +++ b/drivers/kvm/vmx.c
> @@ -1487,7 +1487,9 @@ static int handle_rmode_exception(struct kvm_vcpu *vcpu,
>  	if (!vcpu->rmode.active)
>  		return 0;
>  
> -	if (vec == GP_VECTOR && err_code == 0)
> +    /* Instruction with address size override prefix opcode 0x67
> +       Cause the #SS fault with 0 error code in VM86 mode.  */
> +	if (((vec == GP_VECTOR) || (vec == SS_VECTOR)) && err_code == 0)
>  		if (emulate_instruction(vcpu, NULL, 0, 0) == EMULATE_DONE)
>  			return 1;
>  	return 0;
>   


-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

      parent reply	other threads:[~2007-05-17 12:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-15  3:27 SDL problem with 2.6.21/kvm-17 on x86_64? Joshua Hoblitt
     [not found] ` <20070515032704.GH31709-yzCOL6m36nBBFM95potWkg@public.gmane.org>
2007-05-15  7:54   ` Avi Kivity
     [not found]     ` <4649671D.5000705-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-05-17  1:11       ` [PATCH] Handle #SS(0), caused by address size override in vm86 mode Kamble, Nitin A
     [not found]         ` <1179364298.21228.6.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2007-05-17 12:51           ` Avi Kivity [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=464C4FD5.4010605@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=nitin.a.kamble-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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 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.