From: Avi Kivity <avi@redhat.com>
To: Sheng Yang <sheng@linux.intel.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH 1/7] KVM: VMX: Allocate MSR Bitmap for each vcpu
Date: Wed, 08 Oct 2008 13:10:46 +0200 [thread overview]
Message-ID: <48EC9536.4060507@redhat.com> (raw)
In-Reply-To: <200810081841.30880.sheng@linux.intel.com>
Sheng Yang wrote:
> On Wednesday 08 October 2008 18:14:22 Avi Kivity wrote:
>
>> Sheng Yang wrote:
>>
>>> Separate msr_bitmap for each vcpu, prepared for guest PAT support.
>>>
>> Why is this necessary? True, it reduces the overhead of the guest
>> reading and writing the PAT MSRs, but is such access frequent?
>>
>> I would think guests set the PAT once, and never change it later.
>>
>
> Yeah. In fact, I just think msr_bitmap for each vcpu would be done sooner or
> later, so get it done here. And it's natural to go with GUEST_PAT. And Xen
> use it for another purpose(DEBUGCTLMSR related, I haven't checked it through)
> (Also svm.c in KVM use per-vcpu msr bitmap)
>
svm.c uses it for last branch record; I think these are also rarely
accessed from the guest.
> And without that, a callback should be implement to hook MSR write and update
> guest pat write for both vmx and svm, or we should update GUEST PAT every
> vmentry according to the vcpu->pat. Either way seems not that natural with
> GUEST_PAT support.
>
We need the callbacks (vmx_set_msr and vmx_get_msr, or did you mean
something else?) anyway for save/restore support.
> However, if you think msr_bitmap for each vcpu is a waste, I'd like to add
> callbacks.
>
I agree that we will likely need msr bitmap support one day; but let's
start without it as this way we test the pat msr callbacks.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
next prev parent reply other threads:[~2008-10-08 11:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-08 4:17 [PATCH 0/7] Enable MTRR/PAT support for KVM EPT(v2) Sheng Yang
2008-10-08 4:17 ` [PATCH 1/7] KVM: VMX: Allocate MSR Bitmap for each vcpu Sheng Yang
2008-10-08 10:14 ` Avi Kivity
2008-10-08 10:41 ` Sheng Yang
2008-10-08 11:10 ` Avi Kivity [this message]
2008-10-08 11:21 ` Sheng Yang
2008-10-08 4:17 ` [PATCH 2/7] KVM: VMX: Add PAT support for EPT Sheng Yang
2008-10-08 4:17 ` [PATCH 3/7] x86: Rename mtrr_state struct and macro names Sheng Yang
2008-10-08 4:17 ` [PATCH 4/7] Export some definition of MTRR Sheng Yang
2008-10-08 4:17 ` [PATCH 5/7] KVM: Improve MTRR structure Sheng Yang
2008-10-08 4:17 ` [PATCH 6/7] Add local get_mtrr_type() to support MTRR Sheng Yang
2008-10-08 4:17 ` [PATCH 7/7] Enable MTRR for EPT Sheng Yang
2008-10-08 10:23 ` [PATCH 0/7] Enable MTRR/PAT support for KVM EPT(v2) 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=48EC9536.4060507@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--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.