From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: Communication in x86 Date: Tue, 28 Mar 2017 16:51:41 +0200 Message-ID: <20170328145137.GO14081@potion> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, Thomas Huth To: James Edouard Return-path: Received: from mx1.redhat.com ([209.132.183.28]:42758 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752080AbdC1Ow2 (ORCPT ); Tue, 28 Mar 2017 10:52:28 -0400 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 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, ...