mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: David Hildenbrand <david@redhat.com>,
	Brijesh Singh <brijesh.singh@amd.com>,
	kvm@vger.kernel.org
Cc: thomas.lendacky@amd.com, rkrcmar@redhat.com, joro@8bytes.org,
	x86@kernel.org, linux-kernel@vger.kernel.org, mingo@redhat.com,
	hpa@zytor.com, tglx@linutronix.de, bp@suse.de
Subject: Re: [PATCH v3] kvm: svm: Use the hardware provided GPA instead of page walk
Date: Thu, 15 Dec 2016 14:31:20 +0100	[thread overview]
Message-ID: <fa4e517a-2f17-eb8f-3d9e-404b40601f35@redhat.com> (raw)
In-Reply-To: <5be2e278-fca0-d08a-3f2a-aa8ec70c9b9e@redhat.com>



On 15/12/2016 14:09, David Hildenbrand wrote:
>>>
>>> bool exception_gpa_valid(struct kvm_vcpu)
>>> {
>>>     // check if svm
>>>     // check if exit code is NPF
>>>     // check ctxt
>>> }
>>
>> No, this would be a layering violation.  The emulator ops don't know
>> about svm and exit codes (and in fact it's trivial to implement this
>> optimization for vmx, with a slightly different logic), so we need to
>> have gpa_available.
> 
> I was rather thinking about adding an vmx/svm independent callback,
> which would return false for vmx for now. I just saw the variable
> and was wondering if it is really necessary.

The variable would probably just move into struct {vmx,svm}_vcpu.  Maybe
you could access the VMX/SVM exitcode directly, but doing that worries
me a bit...

Paolo

  reply	other threads:[~2016-12-15 13:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-14 19:59 [PATCH v3] x86: SVM: " Brijesh Singh
2016-12-14 19:59 ` [PATCH v3] kvm: svm: " Brijesh Singh
2016-12-15 12:42   ` David Hildenbrand
2016-12-15 13:06     ` Paolo Bonzini
2016-12-15 13:09       ` David Hildenbrand
2016-12-15 13:31         ` Paolo Bonzini [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-11-29 18:01 [PATCH v3] x86: SVM: " Brijesh Singh
2016-11-29 18:01 ` [PATCH v3] kvm: svm: " Brijesh Singh
2016-11-29 18:10   ` Paolo Bonzini
2016-11-29 18:20   ` Thomas Gleixner
2016-11-29 19:38     ` Brijesh Singh
2016-12-08 14:53       ` Paolo Bonzini

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=fa4e517a-2f17-eb8f-3d9e-404b40601f35@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=bp@suse.de \
    --cc=brijesh.singh@amd.com \
    --cc=david@redhat.com \
    --cc=hpa@zytor.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®