From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Subject: Re: [PATCH 1/2] kvm/powerpc: rename kvm_hypercall() to epapr_hypercall() Date: Wed, 2 Oct 2013 12:04:52 -0500 Message-ID: <1380733492.12932.17.camel@snotra.buserror.net> References: <1379913839-11347-1-git-send-email-Bharat.Bhushan@freescale.com> <1379913839-11347-2-git-send-email-Bharat.Bhushan@freescale.com> <90F2E123-022D-4F4E-A350-44CA1051B484@suse.de> <1380732029.12932.3.camel@snotra.buserror.net> <684A050C-5885-4678-8C6A-7E57001DD341@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Bharat Bhushan , , , Bharat Bhushan To: Alexander Graf Return-path: Received: from co9ehsobe003.messaging.microsoft.com ([207.46.163.26]:51528 "EHLO co9outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753593Ab3JBRFD (ORCPT ); Wed, 2 Oct 2013 13:05:03 -0400 In-Reply-To: <684A050C-5885-4678-8C6A-7E57001DD341@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, 2013-10-02 at 18:53 +0200, Alexander Graf wrote: > On 02.10.2013, at 18:40, Scott Wood wrote: > > > On Wed, 2013-10-02 at 16:19 +0200, Alexander Graf wrote: > >> On 23.09.2013, at 07:23, Bharat Bhushan wrote: > >>> static inline long kvm_hypercall0_1(unsigned int nr, unsigned long *r2) > >>> @@ -65,7 +54,7 @@ static inline long kvm_hypercall0_1(unsigned int nr, unsigned long *r2) > >>> unsigned long out[8]; > >>> unsigned long r; > >>> > >>> - r = kvm_hypercall(in, out, KVM_HCALL_TOKEN(nr)); > >>> + r = epapr_hypercall(in, out, KVM_HCALL_TOKEN(nr)); > >> > >> Won't this break when CONFIG_EPAPR_PARAVIRT=n? We wouldn't have epapr_hcalls.S compiled into the code base then and the bl above would reference an unknown function. > > > > KVM_GUEST selects EPAPR_PARAVIRT. > > But you can not select KVM_GUEST and still call these inline functions, no? No. > Like kvm_arch_para_features(). Where does that get called without KVM_GUEST? How would that work currently, with the call to kvm_hypercall() in arch/powerpc/kernel/kvm.c (which calls epapr_hypercall, BTW)? -Scott From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Wed, 02 Oct 2013 17:04:52 +0000 Subject: Re: [PATCH 1/2] kvm/powerpc: rename kvm_hypercall() to epapr_hypercall() Message-Id: <1380733492.12932.17.camel@snotra.buserror.net> List-Id: References: <1379913839-11347-1-git-send-email-Bharat.Bhushan@freescale.com> <1379913839-11347-2-git-send-email-Bharat.Bhushan@freescale.com> <90F2E123-022D-4F4E-A350-44CA1051B484@suse.de> <1380732029.12932.3.camel@snotra.buserror.net> <684A050C-5885-4678-8C6A-7E57001DD341@suse.de> In-Reply-To: <684A050C-5885-4678-8C6A-7E57001DD341@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Alexander Graf Cc: Bharat Bhushan , kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, Bharat Bhushan On Wed, 2013-10-02 at 18:53 +0200, Alexander Graf wrote: > On 02.10.2013, at 18:40, Scott Wood wrote: > > > On Wed, 2013-10-02 at 16:19 +0200, Alexander Graf wrote: > >> On 23.09.2013, at 07:23, Bharat Bhushan wrote: > >>> static inline long kvm_hypercall0_1(unsigned int nr, unsigned long *r2) > >>> @@ -65,7 +54,7 @@ static inline long kvm_hypercall0_1(unsigned int nr, unsigned long *r2) > >>> unsigned long out[8]; > >>> unsigned long r; > >>> > >>> - r = kvm_hypercall(in, out, KVM_HCALL_TOKEN(nr)); > >>> + r = epapr_hypercall(in, out, KVM_HCALL_TOKEN(nr)); > >> > >> Won't this break when CONFIG_EPAPR_PARAVIRT=n? We wouldn't have epapr_hcalls.S compiled into the code base then and the bl above would reference an unknown function. > > > > KVM_GUEST selects EPAPR_PARAVIRT. > > But you can not select KVM_GUEST and still call these inline functions, no? No. > Like kvm_arch_para_features(). Where does that get called without KVM_GUEST? How would that work currently, with the call to kvm_hypercall() in arch/powerpc/kernel/kvm.c (which calls epapr_hypercall, BTW)? -Scott