From: Avi Kivity <avi@redhat.com>
To: Sheng Yang <sheng@linux.intel.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH 2/4] KVM: Add accessor for reading cr4 (or some bits of cr4)
Date: Tue, 08 Dec 2009 11:36:59 +0200 [thread overview]
Message-ID: <4B1E1E3B.3020704@redhat.com> (raw)
In-Reply-To: <200912081557.42822.sheng@linux.intel.com>
On 12/08/2009 09:57 AM, Sheng Yang wrote:
> vcpu->arch.cr0 = cr0;
>> - vmx_set_cr4(vcpu, vcpu->arch.cr4);
>> + vmx_set_cr4(vcpu, kvm_read_cr4(vcpu));
>> }
>>
> Another place accessed cr4 directly, in ept_update_paging_mode_cr4()
>
>
That one is called from vmx_set_cr4(); at that time CR4_READ_SHADOW is
not up-to-date and vmx_decache_cr4_guest_bits() will actually corrupt
vcpu->arch.cr4 (except it won't be called, since cr4.pae is never guest
owned).
But you are right, I should have placed a comment. I'll add a patch
that inlines ept_update_paging_mode_cr4 into its caller so it can access
the cr4 parameter directly instead of vcpu->arch.cr4.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2009-12-08 9:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-07 10:47 [PATCH 0/4] cr4 optimizations for vmx/ept Avi Kivity
2009-12-07 10:47 ` [PATCH 1/4] KVM: VMX: Move some cr[04] related constants to vmx.c Avi Kivity
2009-12-07 10:47 ` [PATCH 2/4] KVM: Add accessor for reading cr4 (or some bits of cr4) Avi Kivity
2009-12-08 7:57 ` Sheng Yang
2009-12-08 9:36 ` Avi Kivity [this message]
2009-12-08 14:40 ` Sheng Yang
2009-12-08 14:44 ` Avi Kivity
2009-12-07 10:47 ` [PATCH 3/4] KVM: VMX: Make guest cr4 mask more conservative Avi Kivity
2009-12-07 10:47 ` [PATCH 4/4] KVM: VMX: When using ept, allow the guest to own cr4.pge Avi Kivity
2009-12-15 10:44 ` [PATCH 0/4] cr4 optimizations for vmx/ept 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=4B1E1E3B.3020704@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=sheng@linux.intel.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.