From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Subject: Re: [PATCH v8 2/4] KVM: PPC: epapr: Add idle hcall support for host Date: Wed, 7 Mar 2012 16:37:17 -0600 Message-ID: <4F57E31D.9010908@freescale.com> References: <1331159500-15257-1-git-send-email-stuart.yoder@freescale.com> <1331159500-15257-3-git-send-email-stuart.yoder@freescale.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: , , To: Stuart Yoder Return-path: In-Reply-To: <1331159500-15257-3-git-send-email-stuart.yoder@freescale.com> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 03/07/2012 04:31 PM, Stuart Yoder wrote: > @@ -888,6 +891,10 @@ out: > > static int kvm_vm_ioctl_get_pvinfo(struct kvm_ppc_pvinfo *pvinfo) > { > +#ifdef CONFIG_KVM_BOOKE_HV > + u32 inst_sc1 = 0x44000022; > + pvinfo->hcall[0] = inst_sc1; > +#else > u32 inst_lis = 0x3c000000; > u32 inst_ori = 0x60000000; > u32 inst_nop = 0x60000000; > @@ -907,6 +914,9 @@ static int kvm_vm_ioctl_get_pvinfo(struct kvm_ppc_pvinfo *pvinfo) > pvinfo->hcall[1] = inst_ori | (KVM_SC_MAGIC_R0 & inst_imm_mask); > pvinfo->hcall[2] = inst_sc; > pvinfo->hcall[3] = inst_nop; > +#endif Need to pad the rest of the array with nops. -Scott