All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Sean Christopherson" <sean.j.christopherson@intel.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Joerg Roedel" <joro@8bytes.org>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH 2/3] KVM: x86: Prevent use of kvm_register_{read,write}() with known GPRs
Date: Tue, 30 Apr 2019 22:34:52 +0200	[thread overview]
Message-ID: <a1dc6d40-feba-4b14-bc23-b25e23bb3c2d@redhat.com> (raw)
In-Reply-To: <20190430173619.15774-3-sean.j.christopherson@intel.com>

On 30/04/19 19:36, Sean Christopherson wrote:
> ... to prevent future code from using the unoptimized generic accessors
> when hardcoding access to always-available GPRs.

This cannot be done in general, because builtin_constant_p could be used
through layers of inlining.  For example you could have a function that
takes an enum kvm_reg argument and _its_ caller passes a constant in
there.  Of course we may just say that we don't have such a case now (do
we?) and so it's unlikely to happen in the future as well.

Paolo

  reply	other threads:[~2019-04-30 20:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-30 17:36 [PATCH 0/3] KVM: x86: Drop "caching" of always-available GPRs Sean Christopherson
2019-04-30 17:36 ` [PATCH 1/3] KVM: x86: Omit caching logic for " Sean Christopherson
2019-04-30 17:36 ` [PATCH 2/3] KVM: x86: Prevent use of kvm_register_{read,write}() with known GPRs Sean Christopherson
2019-04-30 20:34   ` Paolo Bonzini [this message]
2019-04-30 20:44     ` Sean Christopherson
2019-04-30 17:36 ` [PATCH 3/3] KVM: VMX: Use accessors for GPRs outside of dedicated caching logic Sean Christopherson
2019-04-30 20:03 ` [PATCH 0/3] KVM: x86: Drop "caching" of always-available GPRs Paolo Bonzini
2019-04-30 20:19   ` 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=a1dc6d40-feba-4b14-bc23-b25e23bb3c2d@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=rkrcmar@redhat.com \
    --cc=sean.j.christopherson@intel.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.