public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Junaid Shahid <junaids@google.com>
To: Sean Christopherson <seanjc@google.com>,
	David Matlack <dmatlack@google.com>
Cc: kvm@vger.kernel.org, pbonzini@redhat.com
Subject: Re: [PATCH] kvm: x86: mmu: Always flush TLBs when enabling dirty logging
Date: Tue, 26 Jul 2022 10:23:39 -0700	[thread overview]
Message-ID: <d6076d60-a7fb-1930-2ace-a0d6e2d19414@google.com> (raw)
In-Reply-To: <Yt8aDZDmu/yAwHHC@google.com>

On 7/25/22 15:32, Sean Christopherson wrote:
> ...
> 
> If we go the "always flush" route, I would word the comment to explicitly call out
> that the alternative would be to check if the SPTE is MMU-writable.
> 
> But my preference would actually be to keep the conditional flushing.  Not because
> I think it will provide better performance (probably the opposite if anything),
> but because it documents the dependencies/rules in code, and because "always flush"
> reads like it's working around a KVM bug.  It's not a super strong preference though.
> 
> Partially, I think it'd be this?
> 

This would work, but I am slightly leaning away from it because it could 
increase CPU overhead in some cases. If you don't have a strong preference for 
it, then I think we could just do an unconditional flush with a more detailed 
comment explaining the interaction with clear_young() as well as the alternative 
of checking the MMU-writable bit.

Thanks,
Junaid

      reply	other threads:[~2022-07-26 17:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-23  2:41 [PATCH] kvm: x86: mmu: Always flush TLBs when enabling dirty logging Junaid Shahid
2022-07-25 17:27 ` David Matlack
2022-07-25 22:32   ` Sean Christopherson
2022-07-26 17:23     ` Junaid Shahid [this message]

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=d6076d60-a7fb-1930-2ace-a0d6e2d19414@google.com \
    --to=junaids@google.com \
    --cc=dmatlack@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox