From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Makarand Sonare <makarandsonare@google.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
pshier@google.com, jmattson@google.com,
Ben Gardon <bgardon@google.com>
Subject: Re: [RESEND PATCH ] KVM: VMX: Enable/disable PML when dirty logging gets enabled/disabled
Date: Thu, 11 Feb 2021 07:53:19 -0800 [thread overview]
Message-ID: <YCVS79fnRkDRqfL2@google.com> (raw)
In-Reply-To: <7c78c6df-36e7-1473-e834-3786e257ebc5@redhat.com>
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.
next prev parent reply other threads:[~2021-02-11 15:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-10 21:23 [RESEND PATCH ] KVM: VMX: Enable/disable PML when dirty logging gets enabled/disabled Makarand Sonare
2021-02-11 0:55 ` Sean Christopherson
2021-02-11 9:04 ` Paolo Bonzini
2021-02-11 18:20 ` Sean Christopherson
2021-02-11 2:07 ` Sean Christopherson
2021-02-11 8:58 ` Paolo Bonzini
2021-02-11 9:04 ` Paolo Bonzini
2021-02-11 15:53 ` Sean Christopherson [this message]
2021-02-12 18:12 ` Sean Christopherson
2021-02-12 19:14 ` Makarand Sonare
2021-02-12 21:18 ` Sean Christopherson
2021-02-12 22:13 ` Sean Christopherson
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=YCVS79fnRkDRqfL2@google.com \
--to=seanjc@google.com \
--cc=bgardon@google.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=makarandsonare@google.com \
--cc=pbonzini@redhat.com \
--cc=pshier@google.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.