From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 90B7DE68143 for ; Tue, 17 Feb 2026 08:55:36 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4fFYPz0KZ3z2xjP; Tue, 17 Feb 2026 19:55:35 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=pass smtp.remote-ip=81.169.146.162 arc.chain=strato.com ARC-Seal: i=2; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1771318534; cv=pass; b=SD2j95pKiMeXJbrascO9nHxdTHce634Z2ZhfkNeXJEnpODxozfyb4m4Znl4s2fGD/+qvTfXKH+FFwQs1DXk6QoOS/ZqaHg7eyXpeYTlr5M2XKRpg4lkO9UnBWkiTJbqH+M0OliU/smxykP8T2snfZjqQfh9CAgXIRb+fJfW6i1devPBVyhGvZ/WsWwJvAX5lhoNHySIAIig93bOTvsLIGqons63/ZjURR10C3e9q3uvOXjr/OixMBegeV1YaUsDJfJgmVb9Md9lq7KrVSc0pmhXrzz/8YBr/fYv5CIn3vURwqQw+lZdhHkAQY97K8akVHkPi6fTvIOzrjtG/0HEV5g== ARC-Message-Signature: i=2; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1771318534; c=relaxed/relaxed; bh=48vBFzOGGOEeE99Nc41Bo5BNddAb3r8A2Ni0fWDc2Mw=; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=XddvejCjRaJeqVzUAB19qGTJfOun6mIdZfwVdEr63foCpkatC5hwPGLEBEwFl51R30PiNiBTxzgwAVZrWVrJCggFOV1zpE4EfB9onFYAMjw8Vnt2LViSn2iuxEdQdAzqU/fumv60lruvbMhsYS9GC8k7eKmX0BeQICyKfi5h6IbTbU4X73lVJxNuZ50F9FJhnv0kHexMqVDrPh6HDaNJOlx72UzREXJ42Kkyl81XaUCc6kPL60Mgl6366uJFi2hbo5ecMixES8FP4DlVNwVYhReHO/bkZycLNZaPs0VmYmWuM0Apbqgj6PuypA9bkuPgGYaS3GoJtWWgeYBT46/83A== ARC-Authentication-Results: i=2; lists.ozlabs.org; dmarc=pass (p=reject dis=none) header.from=xenosoft.de; dkim=pass (2048-bit key; unprotected) header.d=xenosoft.de header.i=@xenosoft.de header.a=rsa-sha256 header.s=strato-dkim-0002 header.b=n60x/vpn; dkim=pass header.d=xenosoft.de header.i=@xenosoft.de header.a=ed25519-sha256 header.s=strato-dkim-0003 header.b=9PVUnvk9; dkim-atps=neutral; spf=pass (client-ip=81.169.146.162; helo=mo4-p00-ob.smtp.rzone.de; envelope-from=chzigotzky@xenosoft.de; receiver=lists.ozlabs.org) smtp.helo=mo4-p00-ob.smtp.rzone.de Authentication-Results: lists.ozlabs.org; dmarc=pass (p=reject dis=none) header.from=xenosoft.de Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=xenosoft.de header.i=@xenosoft.de header.a=rsa-sha256 header.s=strato-dkim-0002 header.b=n60x/vpn; dkim=pass header.d=xenosoft.de header.i=@xenosoft.de header.a=ed25519-sha256 header.s=strato-dkim-0003 header.b=9PVUnvk9; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.helo=mo4-p00-ob.smtp.rzone.de (client-ip=81.169.146.162; helo=mo4-p00-ob.smtp.rzone.de; envelope-from=chzigotzky@xenosoft.de; receiver=lists.ozlabs.org) Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4fFYPt5Hq4z2xN5 for ; Tue, 17 Feb 2026 19:55:29 +1100 (AEDT) ARC-Seal: i=1; a=rsa-sha256; t=1771318345; cv=none; d=strato.com; s=strato-dkim-0002; b=N4YYXogl63smYxUHVcVvvbnqCr1Z8HTyOyZ+z/7bec+6rw4AUqUIfvjRhHsYGRx3WT 1hj9JAwJ2Z0FsxdyvigpfZkkkYyu+dHSdmivx6X9bUlMrnbcOqhQvLn5Kqkm4sdrcmVE 37LQSPUxPByhMwtxx2Z9+ksqu5JQLtoqsgal5iTxfD9l+XRIcPGpOSLGDsmtNtHR/yb7 5kaqv47L0Io5+rsHzL1ydIrH7iSGodocXffkQeB6ZdWzmJgJ5bxcPEux1OnWHbi9OXqo IuqIKWwywc768YXTngOok3q3c4Vz4iFJ4h9qzCsiRGjH3vK4789TPrPmg3yi/bayUy/K UMQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1771318345; s=strato-dkim-0002; d=strato.com; h=In-Reply-To:Date:Message-ID:From:References:Cc:To:Subject:Cc:Date: From:Subject:Sender; bh=48vBFzOGGOEeE99Nc41Bo5BNddAb3r8A2Ni0fWDc2Mw=; b=pckflT7AM89p6G2vYzJvRVPIdAwH5g3Rl8ZaVruRoZhPWDZRRSlAA/2iarR3SORkPh Fm/0zc2W8IWdxo/Q7HY3xDT4Euy86uoo/BwWUZM7kTxncaX17YcFizR0vMuB1vDpUOlz 1sbdPF8jTeuo/PJ67EffWRrI1ErTuWyquVRc0H1AWr60UfwrirKri1Mxf7UUede4JvRA AkF9z1WkNdxWuMRfQCir+keo9CPEDJKq3l20kUJNYSEKaT9Hh8iD8HmqYuZzy8SI3OoV uOrtqptOteCSTDkC0vZ08jAQnmLzseKhpLPF5q50AeOmK6ESZK39V22pRtQa5IVbMLrd UXIw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1771318345; s=strato-dkim-0002; d=xenosoft.de; h=In-Reply-To:Date:Message-ID:From:References:Cc:To:Subject:Cc:Date: From:Subject:Sender; bh=48vBFzOGGOEeE99Nc41Bo5BNddAb3r8A2Ni0fWDc2Mw=; b=n60x/vpnu4FYaaNqLCJFbJVuVftOQLgRzpKHBAxYWcUhd56S3HDOjnk8pwY7RIvljd sC4/dw0ZI7cY+wbEGNO596XN4+F21PMfdwJVHBsT0RXrUL8e7DaWVHOBoPHg/XHPo7F+ 0uC6FUSmM14PtQjcqcJXov0W2cPOZWBtrZgwMnZf9Kc4/+h8jlnzPpbkibDO/NBaic8K NNR4VFDsKKYIS+DBWYesCFilApKk2ko933a1Y2jziKl2mLGSrm/PCfjpxKuZ2bEiT6nZ wtyTPKCHqFE8DFoqJZCH3eIPBEV+JEA1d8Dwvh5brUvSVNfbll6BxRWi0DEb6IhwEqbW RouQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1771318345; s=strato-dkim-0003; d=xenosoft.de; h=In-Reply-To:Date:Message-ID:From:References:Cc:To:Subject:Cc:Date: From:Subject:Sender; bh=48vBFzOGGOEeE99Nc41Bo5BNddAb3r8A2Ni0fWDc2Mw=; b=9PVUnvk9KjZ6PDDZdP77vGSoHY3FlQHV9LiiivP+KHRSY9fuW0k39F4rpx+Mk67vIH XfOoa0qTcqEa5Dpg0XAg== X-RZG-AUTH: ":L2QefEenb+UdBJSdRCXu93KJ1bmSGnhMdmOod1DhGN0rBVhd9dFr4thIFiqT9BURIC+l7h/g" Received: from void-ppc.a-eon.tld by smtp.strato.de (RZmta 55.0.1 DYNA|AUTH) with ESMTPSA id e9337f21H8qOz5U (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 17 Feb 2026 09:52:24 +0100 (CET) Subject: [Linux PPC] KVM PR and KVM HV do not work if the kernel was compiled with PREEMPT To: Shrikanth Hegde , linuxppc-dev , "kvm-ppc@vger.kernel.org" Cc: "R.T.Dickinson" , hypexed@yahoo.com.au, mad skateman , Christian Zigotzky References: <185d7a42-f7b4-44e1-a129-f5989d211c74@linux.ibm.com> From: Christian Zigotzky Organization: A-EON Open Source Message-ID: <40154f6a-39da-959d-e039-5ab9ff62db3c@xenosoft.de> Date: Tue, 17 Feb 2026 09:52:24 +0100 X-Mailer: BrassMonkey/33.9.1 X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 In-Reply-To: <185d7a42-f7b4-44e1-a129-f5989d211c74@linux.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi, Thank you for your patch. I tested the latest git kernel with your patch today. Unfortunately the system freezes while booting the VM with KVM HV. Cheers, Christian On 17/02/26 06:02, Shrikanth Hegde wrote: > > > On 2/14/26 7:32 PM, Christian Zigotzky wrote: >> Hello, >> >> KVM PR and KVM HV do not work if the kernel was compiled with PREEMPT. >> >> The entire FSL Cyrus+ board freezes when using KVM HV with PREEMPT. >> >> The guest kernel doesn't boot if we use KVM PR with a PREEMPT kernel >> on the PA Semi Nemo board. >> >> We were previously able to disable PREEMPT in the kernel >> configuration, but the latest git kernels now enable it by default >> and it is no longer possible to disable it. >> >> I created a patch for disabling PREEMPT today. [1] >> >> Is it possible to let us decide whether to activate PREEMPT or not? >> >> Thanks in advance, >> >> Christian >> >> [1] https://raw.githubusercontent.com/chzigotzky/kernels/ >> a74fa6179eaeafcea7ad89f0e61c30ace038daf2/patches/X1000/ >> Kconfig.preempt.patch >> [2] Bug report: https://github.com/chzigotzky/kernels/issues/19 > > > Hi. > > Do you have any trace why it is stuck? That would be useful. > > > > My initial take is cond_resched is a nop. So we might be stuck there. > Eventually it should have come out though. > > Could you please give the below patch a try and let me know? > Note: This likely still needs lazy bit handling. So keep in preempt=full. > (Not tested) > > > diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c > index 7667563fb9ff..fe215d1177fe 100644 > --- a/arch/powerpc/kvm/book3s_hv.c > +++ b/arch/powerpc/kvm/book3s_hv.c > @@ -4901,7 +4901,7 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu, > u64 time_limit, >         } > >         if (need_resched()) > -               cond_resched(); > +               schedule(); > >         kvmppc_update_vpas(vcpu); > > diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c > index 9a89a6d98f97..54963c1d8b58 100644 > --- a/arch/powerpc/kvm/powerpc.c > +++ b/arch/powerpc/kvm/powerpc.c > @@ -86,7 +86,7 @@ int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu) >         while (true) { >                 if (need_resched()) { >                         local_irq_enable(); > -                       cond_resched(); > +                       schedule(); >                         hard_irq_disable(); >                         continue; >                 } -- Sent with BrassMonkey 33.9.1 (https://github.com/chzigotzky/Web-Browsers-and-Suites-for-Linux-PPC/releases/tag/BrassMonkey_33.9.1)