* Communication in x86
@ 2017-03-16 15:43 James Edouard
2017-03-28 14:51 ` Radim Krčmář
0 siblings, 1 reply; 3+ messages in thread
From: James Edouard @ 2017-03-16 15:43 UTC (permalink / raw)
To: kvm
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? Is it
not needed (I'm a complete newbie...)?
James
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Communication in x86
2017-03-16 15:43 Communication in x86 James Edouard
@ 2017-03-28 14:51 ` Radim Krčmář
2017-04-28 1:48 ` James Edouard
0 siblings, 1 reply; 3+ messages in thread
From: Radim Krčmář @ 2017-03-28 14:51 UTC (permalink / raw)
To: James Edouard; +Cc: kvm, Thomas Huth
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, ...
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Communication in x86
2017-03-28 14:51 ` Radim Krčmář
@ 2017-04-28 1:48 ` James Edouard
0 siblings, 0 replies; 3+ messages in thread
From: James Edouard @ 2017-04-28 1:48 UTC (permalink / raw)
To: kvm
Thank you the response earlier. Would you know why MSR is more
suitable for implementing these particular features over the hypercall
interface? To me, they seem like alternate methods for guests to send
directives to the host. I'm wondering when one would be preferable
over the other.
On Tue, Mar 28, 2017 at 10:51 AM, Radim Krčmář <rkrcmar@redhat.com> wrote:
> 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, ...
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-28 1:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-16 15:43 Communication in x86 James Edouard
2017-03-28 14:51 ` Radim Krčmář
2017-04-28 1:48 ` James Edouard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).