All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sheng Yang <sheng@linux.intel.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH 1/7] KVM: VMX: Allocate MSR Bitmap for each vcpu
Date: Wed, 8 Oct 2008 18:41:30 +0800	[thread overview]
Message-ID: <200810081841.30880.sheng@linux.intel.com> (raw)
In-Reply-To: <48EC87FE.3060006@redhat.com>

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)

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. 

However, if you think msr_bitmap for each vcpu is a waste, I'd like to add 
callbacks.

--
regards
Yang, Sheng

  reply	other threads:[~2008-10-08 10:43 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 [this message]
2008-10-08 11:10       ` Avi Kivity
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=200810081841.30880.sheng@linux.intel.com \
    --to=sheng@linux.intel.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.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.