All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm <kvm@vger.kernel.org>
Subject: Re: [PATCH] KVM: VMX: Use proper slot index for kvm_set_shared_msr
Date: Thu, 29 Oct 2009 19:13:08 +0200	[thread overview]
Message-ID: <4AE9CD24.8080800@redhat.com> (raw)
In-Reply-To: <4AE9C894.2070601@siemens.com>

On 10/29/2009 06:53 PM, Jan Kiszka wrote:
> We were missing one indirection here to translate from vmx-local to
> x86 slot indices, and this caused subtle host crashes.
>
>    

Ahh, good catch.  How did it work?

> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>
> ---
>
> IOW: Win7 boots for me again.
>
>   arch/x86/kvm/vmx.c |    3 ++-
>   1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index a1976c9..6b818c0 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -660,7 +660,8 @@ static void vmx_save_host_state(struct kvm_vcpu *vcpu)
>   	}
>   #endif
>   	for (i = 0; i<  vmx->save_nmsrs; ++i)
> -		kvm_set_shared_msr(i, vmx->guest_msrs[i].data);
> +		kvm_set_shared_msr(vmx->guest_msrs[i].index,
> +				   vmx->guest_msrs[i].data);
>   }
>
>   static void __vmx_load_host_state(struct vcpu_vmx *vmx)
>    


-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


  reply	other threads:[~2009-10-29 17:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-29 16:53 [PATCH] KVM: VMX: Use proper slot index for kvm_set_shared_msr Jan Kiszka
2009-10-29 17:13 ` Avi Kivity [this message]
2009-11-01  9:09   ` 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=4AE9CD24.8080800@redhat.com \
    --to=avi@redhat.com \
    --cc=jan.kiszka@siemens.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.