From: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
To: Paul Knowles <paul-1LojSYAwM1QXQ3Lr6voeyA@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH] Fix to kvm_arch_vcpu_ioctl_set_sregs so that set_cr0 works properly
Date: Thu, 7 Feb 2008 11:32:43 +0100 [thread overview]
Message-ID: <20080207103243.GI12094@8bytes.org> (raw)
In-Reply-To: <E1C3584C-9A8E-4F97-9C7A-DA709B8A85CB-1LojSYAwM1QXQ3Lr6voeyA@public.gmane.org>
On Thu, Feb 07, 2008 at 08:55:59AM +0000, Paul Knowles wrote:
> Hi Joerg
>
> The problem is this block of code in set_cr0
>
> #ifdef CONFIG_X86_64
> if (vcpu->arch.shadow_efer & EFER_LME) {
> if (!is_paging(vcpu) && (cr0 & X86_CR0_PG))
> enter_lmode(vcpu);
> if (is_paging(vcpu) && !(cr0 & X86_CR0_PG))
> exit_lmode(vcpu);
> }
> #endif
Hmm, the stuff that is done in enter_lmode() is also done in
vmx_set_efer() (except for the TSS fixup). I am still pretty sure it
should work without your fix (also because it will likely break SVM with
Nested Paging). Have you set EFER.LME *and* EFER.LMA when you called
set_sregs?
Joerg
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
next prev parent reply other threads:[~2008-02-07 10:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-06 11:02 [PATCH] Fix to kvm_arch_vcpu_ioctl_set_sregs so that set_cr0 works properly Paul Knowles
[not found] ` <1DF02D2D-98D0-4695-A4A5-724A12616142-1LojSYAwM1QXQ3Lr6voeyA@public.gmane.org>
2008-02-06 20:21 ` Joerg Roedel
[not found] ` <20080206202142.GB6344-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2008-02-07 8:55 ` Paul Knowles
[not found] ` <E1C3584C-9A8E-4F97-9C7A-DA709B8A85CB-1LojSYAwM1QXQ3Lr6voeyA@public.gmane.org>
2008-02-07 10:32 ` Joerg Roedel [this message]
2008-02-11 8:11 ` 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=20080207103243.GI12094@8bytes.org \
--to=joro-zlv9swrftaidnm+yrofe0a@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=paul-1LojSYAwM1QXQ3Lr6voeyA@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.