All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Jim Mattson <jmattson@google.com>,
	kvm@vger.kernel.org, Dan Cross <dcross@google.com>,
	Marc Orr <marcorr@google.com>, Peter Shier <pshier@google.com>,
	Liran Alon <liran.alon@oracle.com>
Subject: Re: [PATCH] KVM: nVMX: Don't leak L1 MMIO regions to L2
Date: Mon, 7 Oct 2019 08:18:30 -0700	[thread overview]
Message-ID: <20191007151829.GC18016@linux.intel.com> (raw)
In-Reply-To: <a4570ffc-fa77-bc18-66cb-b08205c237b1@redhat.com>

On Mon, Oct 07, 2019 at 12:07:03PM +0200, Paolo Bonzini wrote:
> As usual, nothing to say about the behavior, just about the code...
> 
> On 04/10/19 19:52, Jim Mattson wrote:
> > + * Returns:
> > + *   0 - success, i.e. proceed with actual VMEnter
> > + *  -EFAULT - consistency check VMExit
> > + *  -EINVAL - consistency check VMFail
> > + *  -ENOTSUPP - kvm internal error
> >   */
> 
> ... the error codes do not mean much here.  Can you define an enum instead?

Agreed.  Liran also suggested an enum.

> (I also thought about passing the exit reason, where bit 31 could be
> used to distinguish VMX instruction failure from an entry failure
> VMexit, which sounds cleaner if you just look at the prototype but
> becomes messy fairly quickly because you have to pass back the exit
> qualification too.  The from_vmentry argument could become u32
> *p_exit_qual and be NULL if not called from VMentry, but it doesn't seem
> worthwhile at all).

Ya.  I also tried (and failed) to find a clever solution that didn't
require a multi-state return value.  As much as I dislike returning an
enum, it's the lesser of all evils.

      reply	other threads:[~2019-10-07 15:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-04 17:52 [PATCH] KVM: nVMX: Don't leak L1 MMIO regions to L2 Jim Mattson
2019-10-07 10:07 ` Paolo Bonzini
2019-10-07 15:18   ` Sean Christopherson [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=20191007151829.GC18016@linux.intel.com \
    --to=sean.j.christopherson@intel.com \
    --cc=dcross@google.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=liran.alon@oracle.com \
    --cc=marcorr@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.