From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B22464446EE for ; Fri, 25 Sep 2026 06:40:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790318448; cv=none; b=FgQWpkkTRaoV+W89buwvmQ7Sgwr6v0jHMEQiJ/d0OaYStENdBid3TEbSnQVx0XLcOwH17ncNPuih+AfMhKks+FuX506MZpO1y8Esy/SP2iE26A4KoG+H3pSAH/p9BuccD/w0rFdWL6q7unmuixwaA2NOn0Tpn4JpgGwCZ7CrdbM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790318448; c=relaxed/simple; bh=ckQ9KanAjMLzAPDQHlFBq/hjOvaVYVYnXTebeF4h2H4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=VSJ8iB/VD5veMK7barg6crsHWWvcO7ZTVif3WZYAI6IKZ1w40Out9HXgAiYXr+YlgdgvV9HYdORuGcWmYbqrUz8U1yVob+GZgyGxv0xDOLDSx+OCZxtY7uj9ZMH35p5aQJjFykQ9EmoJzSObAWDJ4H0yRhXIFbwbqIWja2odqvM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=mHonUXyb; arc=none smtp.client-ip=148.163.158.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="mHonUXyb" Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 68P4aJh63083932; Fri, 25 Sep 2026 06:40:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pp1; bh=bXJhjP /badUh1fe4vovhZmycxRzu6/HJOEha3ZwNSLM=; b=mHonUXybmPKx3EcnkVpr4o CqOyMQU9LPDtMP08eNpTJLfmVrJkJhUw/7D803DpfhDY2TbQijLBLE7yQRBDpoBK v3gCOJdFdqaeiPJt0aeEVIDg9l+UaV6OaG1l+hh5OJILH1HYMAOmlcql8JCPxAzw 2C2QdfaaqNUOzi0thGou3bjjKwK0wTxOhAB6vAa3snOeOMe24YMkYAOkZ+1WMuWW 9t2owWEEY/ZtgeMMOj2eCJ6uLEuiky1lt6/27QDhzpobzmRiVryQhRzvlCSaZgWA TgvbcnDa4AZhhmmBHMr9ABXCiNnBor51s6D5IaSxMMzyJBDP4W/jez5i7KgjCuuA == Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4gskgqvmht-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 25 Sep 2026 06:40:24 +0000 (GMT) Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.18.1.11/8.18.1.11) with ESMTP id 68P4lZIW3244944; Fri, 25 Sep 2026 06:40:24 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4gvbu9194v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 25 Sep 2026 06:40:24 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 68P6eJgl17039792 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 25 Sep 2026 06:40:19 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8B6E320040; Fri, 25 Sep 2026 06:40:19 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 701812004E; Fri, 25 Sep 2026 06:40:15 +0000 (GMT) Received: from [9.39.19.239] (unknown [9.39.19.239]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Fri, 25 Sep 2026 06:40:15 +0000 (GMT) Message-ID: Date: Fri, 25 Sep 2026 12:10:14 +0530 Precedence: bulk X-Mailing-List: kvm-ppc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [Linux PPC] Disable PREEMPT To: Christian Zigotzky , =?UTF-8?Q?Michal_Such=C3=A1nek?= Cc: "Christophe Leroy (CS GROUP)" , Michael Ellerman , harshpb@linux.ibm.com, Gautam Menghani , amachhiw@linux.ibm.com, linuxppc-dev , "kvm-ppc@vger.kernel.org" , Madhavan Srinivasan , Peter Zijlstra , "R.T.Dickinson" , hypexed@yahoo.com.au, mad skateman , Christian Zigotzky , Samir M , Venkat Rao Bagalkote , Narayana Murty N , Hari Bathini References: <25cf64ab-2a32-4d4c-a0c7-2e9007c276d4@linux.ibm.com> <9b58bd58-d0e4-463e-bff9-e33b153b2987@linux.ibm.com> <7ad57b61-4567-42c8-a9f6-faaabe7766a7@linux.ibm.com> <7e06fb84-ca2e-dbb4-47bd-e95ee11113c9@xenosoft.de> <79f9d4e3-ce55-d238-e4a9-b11e9ce27c5f@xenosoft.de> <33342fbf-eb7b-bde6-2c8c-254fe8bfb993@xenosoft.de> <7fb5baa6-9d06-2c61-2b43-6835e8fb0d1a@xenosoft.de> <9c1d7cf0-40f5-4a93-81ee-f5a4c5adcb9d@linux.ibm.com> <0fbc2522-791a-482b-a756-f3e6e61d2e29@linux.ibm.com> Content-Language: en-US From: Shrikanth Hegde In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Reinject: loops=2 maxloops=12 X-Authority-Analysis: v=2.4 cv=G+OJgNk5 c=1 sm=1 tr=0 ts=6ab61759 cx=c_pps a=5BHTudwdYE3Te8bg5FgnPg==:117 a=5BHTudwdYE3Te8bg5FgnPg==:17 a=IkcTkHD0fZMA:10 a=VdqzKS8jKosA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=V8glGbnc2Ofi9Qvn3v5h:22 a=oxC9TbpiAAAA:20 a=NEAV23lmAAAA:8 a=Ct5YdCZI347Wp1tEtF0A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bA3UWDv6hWIuX7UZL3qL:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTI1MDAyNiBTYWx0ZWRfX2R7lKGVWHvDD FohfBkE+/oGGZwbT7mQKXkDpUWCLf58oT+C2bpjgKJdgifEb4u9LyOE3Yn+utLlNVWZD39vciRw yyqFLF9tmCNgAvKXLIyVPgGt9QaNZGmPq1fEKqs59eqle8txsUkr+J7nmQPS5BIR2Vx1NDBSmc4 AKPCMt34y7vkOVPAdg3Hxg68weCOmadQZHmyXSbgqyHwZPfQQev4u/bSeLOCJ+3lq103zKfXb8f Mq5eWe0vVgeTuTpmpu1FLyf5ZDGeBRil0DFVyaKB7/8fWOCnd9j2teVJ1YciUeh6QzCWTmqEg3N InfPORVWCKoIBGvc5kIAl9GtYYGq18MUGlk/5rzhI7QAGfTy4mZsEn2PBYtbZVJG8eXAfvSdUdw 1vthYaUf4owafIzzPXvCIe4KdtJ5SNpN+havcba1rsT+8YmEVtdIlC614hYxoaJVjBYxgT9qywN HByWmDytIonF1a/C6HQ== X-Proofpoint-ORIG-GUID: D15D7tFvq63lVNaxLrkYvar6ImF4-dAG X-Proofpoint-GUID: p6gzJ7jOt9P5Mwy7D_0Vuh4VpHZO8C1e X-Proofpoint-Spam-Info: AW1haW4tMjYwOTI1MDAyNiBTYWx0ZWRfX7WFmKf26GFyK nV97/IR5CaB3ugfKKRi5OkkjYASuKt/hx8+ZdpYZvT0i42lw3fJdqb6rrC1jICyw9F7Y8ZqN8ZI J5tStr1KbaIu9Ic+z344ZJOl5RMqmQ8= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-25_02,2026-09-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 bulkscore=0 priorityscore=1501 clxscore=1015 spamscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2609040000 definitions=main-2609250026 Hi Christian, Michal, >>>>>> >>>>>> I see it is mostly busy with printing >>>>>> WARNING: at .enable_kernel_fp+0x30/0x78, CPU#3: qemu-system-ppc/4884 >>>>>> >>>>>> The path seems to be same also. >>>>>> >>>>>> [c000000085ca7700] [c00000000005de84] .kvmppc_load_guest_fp+0x30/0x80 >>>>>> [c000000085ca7780] [c00000000005f2a0] .kvmppc_handle_exit+0x5bc/0x5cc >>>>>> [c000000085ca7830] [c00000000006204c] .kvmppc_resume_host+0xb8/0x10c >>>>>> >>>>>> >>>>>> Does below help to boot or make it stable? >>>>>> --- >>>>>>  arch/powerpc/kvm/booke.c | 9 ++++++++- >>>>>>  1 file changed, 8 insertions(+), 1 deletion(-) >>>>>> >>>>>> diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c >>>>>> index 13ad4cf5fa71..d4be7a306bfc 100644 >>>>>> --- a/arch/powerpc/kvm/booke.c >>>>>> +++ b/arch/powerpc/kvm/booke.c >>>>>> @@ -1404,10 +1404,17 @@ int kvmppc_handle_exit(struct kvm_vcpu *vcpu, unsigned int exit_nr) >>>>>>          if (s <= 0) >>>>>>              r = (s << 2) | RESUME_HOST | (r & RESUME_FLAG_NV); >>>>>>          else { >>>>>> -            /* interrupts now hard-disabled */ >>>>>> +            /* >>>>>> +             * interrupts now hard-disabled. i.e EE=0 >>>>>> +             * But irqs_disabled relies on PACA entries >>>>>> +             * and fixup below enables it. >>>>>> +             * So irqs_disabled == false >>>>>> +             */ >>>>>>              kvmppc_fix_ee_before_entry(); >>>>>> +            preempt_disable(); >>>>>>              kvmppc_load_guest_fp(vcpu); >>>>>>              kvmppc_load_guest_altivec(vcpu); >>>>>> +            preempt_enable_no_resched(); >>>>>>          } >>>>>>      } >>>>>> >>>>>> >>>>> Hi, >>>>> >>>>> Thanks a lot for your patch! >>>>> >>>>> I patched the 7.3-rc4 kernel sources with your new patch and compiled the kernel again yesterday. [1] >>>>> >>>> >>>> Thanks for trying. >>>> >>>>> Unfortunately, the issue still exists. >>>>> >>>> >>>> Can you share the console log of the kernel with the patch applied? >>>> We need to see where it is stuck now. Has it made forward progress? >>>> >>>>> I tested it with a guest kernel with and without preempt support. >>>>> >>>>> Cheers, >>>>> Christian >>>>> >>>>> [1] https://github.com/chzigotzky/kernels/releases/tag/v7.3.0-rc4-2-preempt >>>>> >>>> >>> Here is a new serial log from the patched kernel: https://github.com/user-attachments/files/32570808/e5500_preempt_pcie_ports_compat_patched_putty.log >>> >> >> That paca mismatch is independent of preemption modes. >> >> It shows a few warnings and even after that a console message has come through. >> Do warning continue forever? >> >> To fix those warnings, can you try this diff on the top of the earlier ones? >> (Igonore whitespace mangling if any, Also patch is UNTESTED. It is more of my >> speculation.). >> >> Sorry, I don't have any way to test it out locally. >> >> --- >> >> diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c >> index 9194cf492d1c..0a014fa45b20 100644 >> --- a/arch/powerpc/kvm/powerpc.c >> +++ b/arch/powerpc/kvm/powerpc.c >> @@ -147,6 +147,19 @@ int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu) >>                         continue; >>                 } >> >> +#ifdef CONFIG_PPC64 >> +               if (unlikely(local_paca->irq_happened != PACA_IRQ_HARD_DIS)) { >> +               /* >> +                * An interrupt arrived between the soft and hard >> +                * disable. Replay it and retry guest entry. >> +                */ >> +                       local_irq_enable(); >> +                       local_irq_disable(); >> +                       hard_irq_disable(); >> +                       continue; >> +               } >> +#endif >> + >>                 guest_enter_irqoff(); >>                 return 1; >>         } >> > > Hi, > > I patched the RC4 of kernel 7.3 with the two patches and compiled it again today. > > I'm happy to report that the patched PREEMPT kernel with KVM HV works on the X5000/40. (e5500) > That's very nice to hear. I will write changelog for both and send it across soon. Give me sometime. > Serial log: https://github.com/user-attachments/files/32619259/e5500_preempt_pcie_ports_compat_patched-2_putty.log > > I also successfully tested it with KVM PR on the X1000 today. (PA6T) > Nice. > Further information: https://github.com/chzigotzky/kernels/issues/19#issuecomment-5818925408 > > Many thanks for your help, > Happy to help. Thanks for reporting and testing. We can finally close this thread :) Thanks to michal for helping in getting the logs. > Christian > Also, Michal, can you report that kvm specific issue you are seeing with the ftrace fix applied in separate thread. This thread has become long already.