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 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
