Re: [PATCH v2 3/3] KVM: VMX: make MSR bitmaps per-VCPU

2018-01-31 Thread Radim Krčmář
2018-01-31 12:37-0500, Paolo Bonzini: > On 30/01/2018 11:23, Radim Krčmář wrote: > > 2018-01-27 09:50+0100, Paolo Bonzini: > >> Place the MSR bitmap in struct loaded_vmcs, and update it in place > >> every time the x2apic or APICv state can change. This is rare and > >> the loop can handle 64

Re: [PATCH v2 3/3] KVM: VMX: make MSR bitmaps per-VCPU

2018-01-31 Thread Radim Krčmář
2018-01-31 12:37-0500, Paolo Bonzini: > On 30/01/2018 11:23, Radim Krčmář wrote: > > 2018-01-27 09:50+0100, Paolo Bonzini: > >> Place the MSR bitmap in struct loaded_vmcs, and update it in place > >> every time the x2apic or APICv state can change. This is rare and > >> the loop can handle 64

Re: [PATCH v2 3/3] KVM: VMX: make MSR bitmaps per-VCPU

2018-01-31 Thread Paolo Bonzini
On 30/01/2018 11:23, Radim Krčmář wrote: > 2018-01-27 09:50+0100, Paolo Bonzini: >> Place the MSR bitmap in struct loaded_vmcs, and update it in place >> every time the x2apic or APICv state can change. This is rare and >> the loop can handle 64 MSRs per iteration, in a similar fashion as >>

Re: [PATCH v2 3/3] KVM: VMX: make MSR bitmaps per-VCPU

2018-01-31 Thread Paolo Bonzini
On 30/01/2018 11:23, Radim Krčmář wrote: > 2018-01-27 09:50+0100, Paolo Bonzini: >> Place the MSR bitmap in struct loaded_vmcs, and update it in place >> every time the x2apic or APICv state can change. This is rare and >> the loop can handle 64 MSRs per iteration, in a similar fashion as >>

Re: [PATCH v2 3/3] KVM: VMX: make MSR bitmaps per-VCPU

2018-01-30 Thread David Woodhouse
On Tue, 2018-01-30 at 17:23 +0100, Radim Krčmář wrote: > > The physical address of the nested msr_bitmap is never loaded into vmcs. > > The resolution you provided had extra hunk in prepare_vmcs02_full(): > > +   vmcs_write64(MSR_BITMAP, __pa(vmx->nested.vmcs02.msr_bitmap)); > > I have

Re: [PATCH v2 3/3] KVM: VMX: make MSR bitmaps per-VCPU

2018-01-30 Thread David Woodhouse
On Tue, 2018-01-30 at 17:23 +0100, Radim Krčmář wrote: > > The physical address of the nested msr_bitmap is never loaded into vmcs. > > The resolution you provided had extra hunk in prepare_vmcs02_full(): > > +   vmcs_write64(MSR_BITMAP, __pa(vmx->nested.vmcs02.msr_bitmap)); > > I have

Re: [PATCH v2 3/3] KVM: VMX: make MSR bitmaps per-VCPU

2018-01-30 Thread Radim Krčmář
2018-01-27 09:50+0100, Paolo Bonzini: > Place the MSR bitmap in struct loaded_vmcs, and update it in place > every time the x2apic or APICv state can change. This is rare and > the loop can handle 64 MSRs per iteration, in a similar fashion as > nested_vmx_prepare_msr_bitmap. > > This prepares

Re: [PATCH v2 3/3] KVM: VMX: make MSR bitmaps per-VCPU

2018-01-30 Thread Radim Krčmář
2018-01-27 09:50+0100, Paolo Bonzini: > Place the MSR bitmap in struct loaded_vmcs, and update it in place > every time the x2apic or APICv state can change. This is rare and > the loop can handle 64 MSRs per iteration, in a similar fashion as > nested_vmx_prepare_msr_bitmap. > > This prepares

Re: [PATCH v2 3/3] KVM: VMX: make MSR bitmaps per-VCPU

2018-01-29 Thread David Hildenbrand
On 27.01.2018 09:50, Paolo Bonzini wrote: > Place the MSR bitmap in struct loaded_vmcs, and update it in place > every time the x2apic or APICv state can change. This is rare and > the loop can handle 64 MSRs per iteration, in a similar fashion as > nested_vmx_prepare_msr_bitmap. > > This

Re: [PATCH v2 3/3] KVM: VMX: make MSR bitmaps per-VCPU

2018-01-29 Thread David Hildenbrand
On 27.01.2018 09:50, Paolo Bonzini wrote: > Place the MSR bitmap in struct loaded_vmcs, and update it in place > every time the x2apic or APICv state can change. This is rare and > the loop can handle 64 MSRs per iteration, in a similar fashion as > nested_vmx_prepare_msr_bitmap. > > This

[PATCH v2 3/3] KVM: VMX: make MSR bitmaps per-VCPU

2018-01-27 Thread Paolo Bonzini
Place the MSR bitmap in struct loaded_vmcs, and update it in place every time the x2apic or APICv state can change. This is rare and the loop can handle 64 MSRs per iteration, in a similar fashion as nested_vmx_prepare_msr_bitmap. This prepares for choosing, on a per-VM basis, whether to

[PATCH v2 3/3] KVM: VMX: make MSR bitmaps per-VCPU

2018-01-27 Thread Paolo Bonzini
Place the MSR bitmap in struct loaded_vmcs, and update it in place every time the x2apic or APICv state can change. This is rare and the loop can handle 64 MSRs per iteration, in a similar fashion as nested_vmx_prepare_msr_bitmap. This prepares for choosing, on a per-VM basis, whether to