From patchwork Thu Jul 13 09:27:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nikunj A Dadhania X-Patchwork-Id: 787634 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x7Vs24d91z9ryk for ; Thu, 13 Jul 2017 19:29:42 +1000 (AEST) Received: from localhost ([::1]:58348 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVaRI-0005nT-JY for incoming@patchwork.ozlabs.org; Thu, 13 Jul 2017 05:29:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVaQv-0005n6-HU for qemu-devel@nongnu.org; Thu, 13 Jul 2017 05:29:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVaQs-00041Z-DN for qemu-devel@nongnu.org; Thu, 13 Jul 2017 05:29:17 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:41858) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dVaQs-00041E-3x for qemu-devel@nongnu.org; Thu, 13 Jul 2017 05:29:14 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v6D9Ntej046184 for ; Thu, 13 Jul 2017 05:29:12 -0400 Received: from e23smtp08.au.ibm.com (e23smtp08.au.ibm.com [202.81.31.141]) by mx0a-001b2d01.pphosted.com with ESMTP id 2bnt3rquec-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 13 Jul 2017 05:29:11 -0400 Received: from localhost by e23smtp08.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 13 Jul 2017 19:29:09 +1000 Received: from d23relay07.au.ibm.com (202.81.31.226) by e23smtp08.au.ibm.com (202.81.31.205) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 13 Jul 2017 19:29:07 +1000 Received: from d23av05.au.ibm.com (d23av05.au.ibm.com [9.190.234.119]) by d23relay07.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v6D9Sw6V25624768; Thu, 13 Jul 2017 19:29:06 +1000 Received: from d23av05.au.ibm.com (localhost [127.0.0.1]) by d23av05.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v6D9SX0Y013341; Thu, 13 Jul 2017 19:28:34 +1000 Received: from abhimanyu.vnet.linux.ibm.com ([9.102.0.111]) by d23av05.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v6D9SC8o012195 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 13 Jul 2017 19:28:28 +1000 From: Nikunj A Dadhania To: =?utf-8?Q?C=C3=A9dric?= Le Goater , David Gibson In-Reply-To: <8760ewbt38.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me> References: <20170608063608.17855-1-nikunj@linux.vnet.ibm.com> <20170609020141.GB26521@umbus.fritz.box> <87mv9heota.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me> <20170609102714.GK26521@umbus.fritz.box> <87eftlar4a.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me> <1ec762f9-d8b2-5195-1ffe-f4cde35571fd@kaod.org> <878tjsbwj4.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me> <5fa5cb00-ee28-0ba4-2084-b0a43b8429f1@kaod.org> <8760ewbt38.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me> Date: Thu, 13 Jul 2017 14:57:55 +0530 MIME-Version: 1.0 X-TM-AS-MML: disable x-cbid: 17071309-0048-0000-0000-000002557E0D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17071309-0049-0000-0000-0000480711BF Message-Id: <871spkbs9w.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-07-13_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000 definitions=main-1707130146 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH RFC] spapr: ignore interrupts during reset state X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, rth@twiddle.net, alex.bennee@linaro.org, qemu-devel@nongnu.org, bharata@linux.vnet.ibm.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Nikunj A Dadhania writes: > Cédric Le Goater writes: > >> On 07/13/2017 09:55 AM, Nikunj A Dadhania wrote: >>> Cédric Le Goater writes: >>> >>>>>> How about the following, we do not report work until MSR_EE is disabled: >>>>> >>>>> With this fix, I could test the XIVE<->XICS transitions at reboot >>>>> under TCG. However, the second boot is very slow for some reason. >>>> >>>> hmm, I am not sure this is related but I just got : >>> >>> Havent seen in my setup after around 10 reboot cycles, I was using 2 >>> cores pseries setup. Lets give it some more testing. When did this >>> happen, during boot ? >> >> yes. >> >> I could not reproduce either :/ but I am keeping the patch. qemu runs >> with : >> >> -m 2G -M pseries -accel tcg,thread=multi -cpu POWER9 -smp cores=4,maxcpus=8 -realtime mlock=off -kernel ./vmlinux-4.12.0+ -initrd ./initrd.img-4.12.0+ -append 'console=hvc0 dyndbg="file arch/powerpc/sysdev/xive/* +p"' -nographic -nodefaults -serial mon:stdio -snapshot -d guest_errors,unimp -no-shutdown >> > > With 4 cores I am seeing hangs occasionally, although I havent seen a > crash. But seems to be similar problem that you had seen. Can you try this one, localized patch, only taking care of DECR interrupt. I am not seeing the hangs with this one. diff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c index 783bf98..07e405f 100644 --- a/target/ppc/translate_init.c +++ b/target/ppc/translate_init.c @@ -8536,7 +8536,7 @@ static bool cpu_has_work_POWER7(CPUState *cs) } if ((env->pending_interrupts & (1u << PPC_INTERRUPT_DECR)) && (env->spr[SPR_LPCR] & LPCR_P7_PECE1)) { - return true; + return msr_ee ? true : false; } if ((env->pending_interrupts & (1u << PPC_INTERRUPT_MCK)) && (env->spr[SPR_LPCR] & LPCR_P7_PECE2)) { @@ -8693,7 +8693,7 @@ static bool cpu_has_work_POWER8(CPUState *cs) } if ((env->pending_interrupts & (1u << PPC_INTERRUPT_DECR)) && (env->spr[SPR_LPCR] & LPCR_P8_PECE3)) { - return true; + return msr_ee ? true : false; } if ((env->pending_interrupts & (1u << PPC_INTERRUPT_MCK)) && (env->spr[SPR_LPCR] & LPCR_P8_PECE4)) { @@ -8876,7 +8876,7 @@ static bool cpu_has_work_POWER9(CPUState *cs) /* Decrementer Exception */ if ((env->pending_interrupts & (1u << PPC_INTERRUPT_DECR)) && (env->spr[SPR_LPCR] & LPCR_DEE)) { - return true; + return msr_ee ? true : false; } /* Machine Check or Hypervisor Maintenance Exception */ if ((env->pending_interrupts & (1u << PPC_INTERRUPT_MCK |