[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YCVS79fnRkDRqfL2@google.com>
Date: Thu, 11 Feb 2021 07:53:19 -0800
From: Sean Christopherson <seanjc@...gle.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: Makarand Sonare <makarandsonare@...gle.com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, pshier@...gle.com,
jmattson@...gle.com, Ben Gardon <bgardon@...gle.com>
Subject: Re: [RESEND PATCH ] KVM: VMX: Enable/disable PML when dirty logging
gets enabled/disabled
On Thu, Feb 11, 2021, Paolo Bonzini wrote:
> On 10/02/21 22:23, Makarand Sonare wrote:
> > +void vmx_update_pml_in_vmcs(struct kvm_vcpu *vcpu)
> > +{
> > + if (cpu_has_secondary_exec_ctrls()) {
> > + if (is_guest_mode(vcpu)) {
> > + to_vmx(vcpu)->nested.deferred_update_pml_vmcs = true;
> > + return;
> > + }
> > +
> > + if (vcpu->kvm->arch.pml_enabled)
> > + vmcs_set_bits(SECONDARY_VM_EXEC_CONTROL,
> > + SECONDARY_EXEC_ENABLE_PML);
> > + else
> > + vmcs_clear_bits(SECONDARY_VM_EXEC_CONTROL,
> > + SECONDARY_EXEC_ENABLE_PML);
> > + }
> > +}
>
>
> Since the execution controls are shadowed, they can be read quite
> efficiently. This means that there's no need for
> vcpu->kvm->arch.pml_enabled, and also that the copy can be done
> unconditionally in prepare_vmcs02 and nested_vmx_vmexit.
>
> If the above is not true, we should at least combine
> change_vmcs01_virtual_apic_mode, reload_vmcs01_apic_access_page and the new
> field in a single bit field, for example vmx->nested.dirty_vmcs01_fields or
> vmx->nested.vmexit_requests.
>
> In any case I expect Sean to take care of submitting this patch and I have
> to do nothing more about it, right?
Right, we'll sort it out.
Powered by blists - more mailing lists