mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Nikita Leshenko <nikita.leshchenko@oracle.com>,
	Liran Alon <liran.alon@oracle.com>
Cc: kernellwp@gmail.com, rkrcmar@redhat.com,
	andrew.cooper3@citrix.com, linux-kernel@vger.kernel.org,
	kvm@vger.kernel.org
Subject: Re: [PATCH 2/2] KVM: VMX: Add Force Emulation Prefix for "emulate the next instruction"
Date: Tue, 27 Mar 2018 11:15:46 +0200	[thread overview]
Message-ID: <6d039f9d-99d9-fa4c-170b-6225bdba302a@redhat.com> (raw)
In-Reply-To: <95B06D42-EFDF-4750-AD03-98D6C78378D5@oracle.com>

On 27/03/2018 11:05, Nikita Leshenko wrote:
> What you are essentially trying to do is create a PV interface to access
> the x86 emulator.
> Why not use a simple hypercall (VMCALL) to accomplish this instead of
> inventing yet another PV method?

Because hypercalls force you to use %rax for the hypercall number.

Paolo

> Something like “KVM_HC_EMULATE_NEXT_INSTRUCTION” in kvm_emulate_hypercall
> should do the trick (however it needs to be placed before the check for
> CPL>0 so that user mode code can test the emulator too).
> 
> Nikita

  reply	other threads:[~2018-03-27  9:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-27  8:26 Liran Alon
2018-03-27  9:05 ` Nikita Leshenko
2018-03-27  9:15   ` Paolo Bonzini [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-03-27  7:52 Liran Alon
2018-03-27  8:19 ` Paolo Bonzini
2018-03-27  9:09 ` Wanpeng Li
2018-03-27  2:12 [PATCH 0/2] " Wanpeng Li
2018-03-27  2:12 ` [PATCH 2/2] " Wanpeng Li
2018-03-27  4:40   ` Konrad Rzeszutek Wilk
2018-03-27  4:55     ` Konrad Rzeszutek Wilk
2018-03-27  5:03       ` Wanpeng Li
2018-03-27  5:18         ` Konrad Rzeszutek Wilk
2018-03-27  7:25           ` Paolo Bonzini
2018-03-27  7:29             ` Wanpeng Li
2018-03-27  5:09     ` Wanpeng Li

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=6d039f9d-99d9-fa4c-170b-6225bdba302a@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=kernellwp@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liran.alon@oracle.com \
    --cc=nikita.leshchenko@oracle.com \
    --cc=rkrcmar@redhat.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

all inboxes | Powered by JetHome®