[{"id":9681,"web_url":"http://patchwork.ozlabs.org/comment/9681/","msgid":"<F51E4B63-C0B1-4394-872E-3C8A3C0C0BB4@kernel.crashing.org>","date":"2008-10-13T16:42:49","subject":"Re: [PATCH 2/3] kvmppc: add hypercall infrastructure - guest part v3","submitter":{"id":5,"url":"http://patchwork.ozlabs.org/api/people/5/","name":"Kumar Gala","email":"galak@kernel.crashing.org"},"content":"On Sep 16, 2008, at 1:27 AM, ehrhardt@linux.vnet.ibm.com wrote:\n\n> From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>\n>\n> This adds the guest portion of the hypercall infrastructure.\n>\n> Version 3 now follows the beat ABI, but proposes a new  \n> implementation style as\n> static inline asm functions instead of pure assembler code. That  \n> should allow\n> the compiler to be more flexible and therefore a better optimization.\n>\n> If people agree on that new implementation style we might merge this  \n> code.\n> The current implementation of beat style hypercalls can be found in\n> arch/powerpc/platforms/cell/beat_hvCall.S\n>\n> Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>\n> ---\n>\n> [diffstat]\n> epapr_hcalls.h |   59 +++++++++++++++++++++++++++++++++++++++++++++++ \n> ++++++++++\n> 1 file changed, 59 insertions(+)\n>\n> [diff]\n>\n> diff --git a/include/asm-powerpc/epapr_hcalls.h b/include/asm- \n> powerpc/epapr_hcalls.h\n> new file mode 100644\n> --- /dev/null\n> +++ b/include/asm-powerpc/epapr_hcalls.h\n> @@ -0,0 +1,59 @@\n> +/*\n> + * This program is free software; you can redistribute it and/or  \n> modify\n> + * it under the terms of the GNU General Public License, version 2,  \n> as\n> + * published by the Free Software Foundation.\n> + *\n> + * This program is distributed in the hope that it will be useful,\n> + * but WITHOUT ANY WARRANTY; without even the implied warranty of\n> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n> + * GNU General Public License for more details.\n> + *\n> + * You should have received a copy of the GNU General Public License\n> + * along with this program; if not, write to the Free Software\n> + * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA   \n> 02110-1301, USA.\n> + *\n> + * Copyright IBM Corp. 2008\n> + *\n> + * Authors:\n> + * \tChristian Ehrhardt <ehrhardt@de.ibm.com>\n> + */\n> +\n> +#ifndef __POWERPC_EPAPR_HCALLS_H__\n> +#define __POWERPC_EPAPR_HCALLS_H__\n> +\n> +#ifdef __KERNEL__\n> +\n> +/* Hypercalls use the beat ABI */\n> +#define KVM_HYPERCALL_BIN 0x44000022\n\nAny reason this isn't 'sc' ?\n\nAlso, can we make this \"sc 1\" so its works when we have HW hypervisor  \nsupport?\n\n- k","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@ozlabs.org"],"Received":["from ozlabs.org (localhost [127.0.0.1])\n\tby ozlabs.org (Postfix) with ESMTP id 1444947559\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 14 Oct 2008 03:46:36 +1100 (EST)","from gate.crashing.org (gate.crashing.org [63.228.1.57])\n\t(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\n\t(Client did not present a certificate)\n\tby ozlabs.org (Postfix) with ESMTPS id 0FF7DDE8C7\n\tfor <linuxppc-dev@ozlabs.org>; Tue, 14 Oct 2008 03:46:20 +1100 (EST)","from [IPv6:::1] (localhost.localdomain [127.0.0.1])\n\tby gate.crashing.org (8.14.1/8.13.8) with ESMTP id m9DGgoxH026076;\n\tMon, 13 Oct 2008 11:42:51 -0500"],"Message-Id":"<F51E4B63-C0B1-4394-872E-3C8A3C0C0BB4@kernel.crashing.org>","From":"Kumar Gala <galak@kernel.crashing.org>","To":"ehrhardt@linux.vnet.ibm.com","In-Reply-To":"<1221546450-15761-3-git-send-email-ehrhardt@linux.vnet.ibm.com>","Mime-Version":"1.0 (Apple Message framework v929.2)","Subject":"Re: [PATCH 2/3] kvmppc: add hypercall infrastructure - guest part v3","Date":"Mon, 13 Oct 2008 11:42:49 -0500","References":"<1221546450-15761-1-git-send-email-ehrhardt@linux.vnet.ibm.com>\n\t<1221546450-15761-3-git-send-email-ehrhardt@linux.vnet.ibm.com>","X-Mailer":"Apple Mail (2.929.2)","Cc":"linuxppc-dev@ozlabs.org, hollisb@us.ibm.com, kvm-ppc@vger.kernel.org","X-BeenThere":"linuxppc-dev@ozlabs.org","X-Mailman-Version":"2.1.11","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List <linuxppc-dev.ozlabs.org>","List-Unsubscribe":"<https://ozlabs.org/mailman/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@ozlabs.org?subject=unsubscribe>","List-Archive":"<http://ozlabs.org/pipermail/linuxppc-dev>","List-Post":"<mailto:linuxppc-dev@ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@ozlabs.org?subject=help>","List-Subscribe":"<https://ozlabs.org/mailman/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@ozlabs.org?subject=subscribe>","Content-Transfer-Encoding":"7bit","Content-Type":"text/plain; charset=\"us-ascii\"; Format=\"flowed\"; DelSp=\"yes\"","Sender":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org"}},{"id":9696,"web_url":"http://patchwork.ozlabs.org/comment/9696/","msgid":"<1223918983.16033.30.camel@localhost.localdomain>","date":"2008-10-13T17:29:43","subject":"Re: [PATCH 2/3] kvmppc: add hypercall infrastructure - guest part v3","submitter":{"id":853,"url":"http://patchwork.ozlabs.org/api/people/853/","name":"Hollis Blanchard","email":"hollisb@us.ibm.com"},"content":"On Mon, 2008-10-13 at 11:42 -0500, Kumar Gala wrote:\n> > +\n> > +/* Hypercalls use the beat ABI */\n> > +#define KVM_HYPERCALL_BIN 0x44000022\n> \n> Any reason this isn't 'sc' ?\n> \n> Also, can we make this \"sc 1\" so its works when we have HW hypervisor  \n> support?\n\nActually, it is \"sc 1\".\n\nMany versions of as (including 2.16.1) don't recognize that instruction.\nThis is the standard workaround for situations like that.","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@ozlabs.org"],"Received":["from ozlabs.org (localhost [127.0.0.1])\n\tby ozlabs.org (Postfix) with ESMTP id D3B36476E2\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 14 Oct 2008 04:30:35 +1100 (EST)","from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150])\n\t(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\n\t(Client CN \"e32.co.us.ibm.com\", Issuer \"Equifax\" (verified OK))\n\tby ozlabs.org (Postfix) with ESMTPS id 9B4C5DE194\n\tfor <linuxppc-dev@ozlabs.org>; Tue, 14 Oct 2008 04:29:52 +1100 (EST)","from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com\n\t[9.17.195.106])\n\tby e32.co.us.ibm.com (8.13.8/8.13.8) with ESMTP id m9DHL4lZ021929\n\tfor <linuxppc-dev@ozlabs.org>; Mon, 13 Oct 2008 13:21:04 -0400","from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com\n\t[9.17.195.169])\n\tby d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id\n\tm9DHTlIx171152\n\tfor <linuxppc-dev@ozlabs.org>; Mon, 13 Oct 2008 11:29:47 -0600","from d03av03.boulder.ibm.com (loopback [127.0.0.1])\n\tby d03av03.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id\n\tm9DHTk3v002851\n\tfor <linuxppc-dev@ozlabs.org>; Mon, 13 Oct 2008 11:29:47 -0600","from [9.53.41.42] (slate.austin.ibm.com [9.53.41.42])\n\tby d03av03.boulder.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id\n\tm9DHTibt002645; Mon, 13 Oct 2008 11:29:45 -0600"],"Subject":"Re: [PATCH 2/3] kvmppc: add hypercall infrastructure - guest part v3","From":"Hollis Blanchard <hollisb@us.ibm.com>","To":"Kumar Gala <galak@kernel.crashing.org>","In-Reply-To":"<F51E4B63-C0B1-4394-872E-3C8A3C0C0BB4@kernel.crashing.org>","References":"<1221546450-15761-1-git-send-email-ehrhardt@linux.vnet.ibm.com>\n\t<1221546450-15761-3-git-send-email-ehrhardt@linux.vnet.ibm.com>\n\t<F51E4B63-C0B1-4394-872E-3C8A3C0C0BB4@kernel.crashing.org>","Organization":"IBM Linux Technology Center","Date":"Mon, 13 Oct 2008 12:29:43 -0500","Message-Id":"<1223918983.16033.30.camel@localhost.localdomain>","Mime-Version":"1.0","X-Mailer":"Evolution 2.22.3.1 (2.22.3.1-1.fc9) ","Cc":"kvm-ppc@vger.kernel.org, linuxppc-dev@ozlabs.org","X-BeenThere":"linuxppc-dev@ozlabs.org","X-Mailman-Version":"2.1.11","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List <linuxppc-dev.ozlabs.org>","List-Unsubscribe":"<https://ozlabs.org/mailman/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@ozlabs.org?subject=unsubscribe>","List-Archive":"<http://ozlabs.org/pipermail/linuxppc-dev>","List-Post":"<mailto:linuxppc-dev@ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@ozlabs.org?subject=help>","List-Subscribe":"<https://ozlabs.org/mailman/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@ozlabs.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org"}},{"id":9698,"web_url":"http://patchwork.ozlabs.org/comment/9698/","msgid":"<8BA1DE5D-9815-4855-BC4C-C84809753D57@kernel.crashing.org>","date":"2008-10-13T17:44:07","subject":"Re: [PATCH 2/3] kvmppc: add hypercall infrastructure - guest part v3","submitter":{"id":5,"url":"http://patchwork.ozlabs.org/api/people/5/","name":"Kumar Gala","email":"galak@kernel.crashing.org"},"content":"On Oct 13, 2008, at 12:29 PM, Hollis Blanchard wrote:\n\n> On Mon, 2008-10-13 at 11:42 -0500, Kumar Gala wrote:\n>>> +\n>>> +/* Hypercalls use the beat ABI */\n>>> +#define KVM_HYPERCALL_BIN 0x44000022\n>>\n>> Any reason this isn't 'sc' ?\n>>\n>> Also, can we make this \"sc 1\" so its works when we have HW hypervisor\n>> support?\n>\n> Actually, it is \"sc 1\".\n>\n> Many versions of as (including 2.16.1) don't recognize that  \n> instruction.\n> This is the standard workaround for situations like that.\n\nAhh, we'll than can we add that to the comment, and rename  \n'KVM_HYPERCALL_BIN' to something like 'EPAPR_HYPERCALL_INSTR'\n\n- k","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@ozlabs.org"],"Received":["from ozlabs.org (localhost [127.0.0.1])\n\tby ozlabs.org (Postfix) with ESMTP id B51A4DEA99\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 14 Oct 2008 04:49:10 +1100 (EST)","from gate.crashing.org (gate.crashing.org [63.228.1.57])\n\t(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\n\t(Client did not present a certificate)\n\tby ozlabs.org (Postfix) with ESMTPS id D51D3DE5D0\n\tfor <linuxppc-dev@ozlabs.org>; Tue, 14 Oct 2008 04:47:07 +1100 (EST)","from [IPv6:::1] (localhost.localdomain [127.0.0.1])\n\tby gate.crashing.org (8.14.1/8.13.8) with ESMTP id m9DHi8uh030864;\n\tMon, 13 Oct 2008 12:44:12 -0500"],"Message-Id":"<8BA1DE5D-9815-4855-BC4C-C84809753D57@kernel.crashing.org>","From":"Kumar Gala <galak@kernel.crashing.org>","To":"Hollis Blanchard <hollisb@us.ibm.com>","In-Reply-To":"<1223918983.16033.30.camel@localhost.localdomain>","Mime-Version":"1.0 (Apple Message framework v929.2)","Subject":"Re: [PATCH 2/3] kvmppc: add hypercall infrastructure - guest part v3","Date":"Mon, 13 Oct 2008 12:44:07 -0500","References":"<1221546450-15761-1-git-send-email-ehrhardt@linux.vnet.ibm.com>\n\t<1221546450-15761-3-git-send-email-ehrhardt@linux.vnet.ibm.com>\n\t<F51E4B63-C0B1-4394-872E-3C8A3C0C0BB4@kernel.crashing.org>\n\t<1223918983.16033.30.camel@localhost.localdomain>","X-Mailer":"Apple Mail (2.929.2)","Cc":"kvm-ppc@vger.kernel.org, linuxppc-dev@ozlabs.org","X-BeenThere":"linuxppc-dev@ozlabs.org","X-Mailman-Version":"2.1.11","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List <linuxppc-dev.ozlabs.org>","List-Unsubscribe":"<https://ozlabs.org/mailman/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@ozlabs.org?subject=unsubscribe>","List-Archive":"<http://ozlabs.org/pipermail/linuxppc-dev>","List-Post":"<mailto:linuxppc-dev@ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@ozlabs.org?subject=help>","List-Subscribe":"<https://ozlabs.org/mailman/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@ozlabs.org?subject=subscribe>","Content-Transfer-Encoding":"7bit","Content-Type":"text/plain; charset=\"us-ascii\"; Format=\"flowed\"; DelSp=\"yes\"","Sender":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org"}}]