public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Radim Krčmář" <rkrcmar@redhat.com>
To: James Edouard <jedouard1994@gmail.com>
Cc: kvm@vger.kernel.org, Thomas Huth <thuth@redhat.com>
Subject: Re: Communication in x86
Date: Tue, 28 Mar 2017 16:51:41 +0200	[thread overview]
Message-ID: <20170328145137.GO14081@potion> (raw)
In-Reply-To: <CALDstaYc_gNsq1f9CH3ihxy6OZjgOCcWMxzD=2vBfQXejh0QnQ@mail.gmail.com>

Disclaimer: I have very little knowledge about PPC.

2017-03-16 11:43-0400, James Edouard:
> Hi,
> 
> The hypercall KVM_HC_PPC_MAP_MAGIC_PAGE is only implemented for PPC,
> but I am wondering why there is not a similar hypercall for x86?

PPC traps all privileged instructions while emulating privileged guest
mode and the magic page accelerates instructions where the trap would be
trivial.  By patching instructions to access the page instead.

x86 allows execution of most performance sensitive privileged
instructions without a trap from guest mode.

>                                                                  Is it
> not needed (I'm a complete newbie...)?

Yes, it is optional at best.  I'm not aware of any x86 instruction where
adding a magic page for its emulation would be a clearly good idea.

While there is no magic page in the PPC sense on x86, there are areas of
guest memory where the host writes some data for the guest to read
without a trap, but they are also usually setup using MSR interfaces:
kvm clock, steal time, ...

  reply	other threads:[~2017-03-28 14:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-16 15:43 Communication in x86 James Edouard
2017-03-28 14:51 ` Radim Krčmář [this message]
2017-04-28  1:48   ` James Edouard

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=20170328145137.GO14081@potion \
    --to=rkrcmar@redhat.com \
    --cc=jedouard1994@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=thuth@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