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 X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3EF32C169C4 for ; Fri, 8 Feb 2019 14:52:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 146ED2075C for ; Fri, 8 Feb 2019 14:52:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727918AbfBHOwC (ORCPT ); Fri, 8 Feb 2019 09:52:02 -0500 Received: from chuckie.co.uk ([82.165.15.123]:59655 "EHLO s16892447.onlinehome-server.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726887AbfBHOwC (ORCPT ); Fri, 8 Feb 2019 09:52:02 -0500 X-Greylist: delayed 1092 seconds by postgrey-1.27 at vger.kernel.org; Fri, 08 Feb 2019 09:52:01 EST Received: from host86-138-240-60.range86-138.btcentralplus.com ([86.138.240.60] helo=[192.168.1.65]) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1gs7Vh-0000XE-WE; Fri, 08 Feb 2019 14:52:11 +0000 To: Christophe Leroy , benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, npiggin@gmail.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org References: <20190208143319.11980-1-mark.cave-ayland@ilande.co.uk> <41b02fb0-cdc6-6de0-d8fc-44d3d0a8ad70@c-s.fr> From: Mark Cave-Ayland Openpgp: preference=signencrypt Autocrypt: addr=mark.cave-ayland@ilande.co.uk; keydata= mQENBFQJuzwBCADAYvxrwUh1p/PvUlNFwKosVtVHHplgWi5p29t58QlOUkceZG0DBYSNqk93 3JzBTbtd4JfFcSupo6MNNOrCzdCbCjZ64ik8ycaUOSzK2tKbeQLEXzXoaDL1Y7vuVO7nL9bG E5Ru3wkhCFc7SkoypIoAUqz8EtiB6T89/D9TDEyjdXUacc53R5gu8wEWiMg5MQQuGwzbQy9n PFI+mXC7AaEUqBVc2lBQVpAYXkN0EyqNNT12UfDLdxaxaFpUAE2pCa2LTyo5vn5hEW+i3VdN PkmjyPvL6DdY03fvC01PyY8zaw+UI94QqjlrDisHpUH40IUPpC/NB0LwzL2aQOMkzT2NABEB AAG0ME1hcmsgQ2F2ZS1BeWxhbmQgPG1hcmsuY2F2ZS1heWxhbmRAaWxhbmRlLmNvLnVrPokB OAQTAQIAIgUCVAm7PAIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQW8LFb64PMh9f NAgAuc3ObOEY8NbZko72AGrg2tWKdybcMVITxmcor4hb9155o/OWcA4IDbeATR6cfiDL/oxU mcmtXVgPqOwtW3NYAKr5g/FrZZ3uluQ2mtNYAyTFeALy8YF7N3yhs7LOcpbFP7tEbkSzoXNG z8iYMiYtKwttt40WaheWuRs0ZOLbs6yoczZBDhna3Nj0LA3GpeJKlaV03O4umjKJgACP1c/q T2Pkg+FCBHHFP454+waqojHp4OCBo6HyK+8I4wJRa9Z0EFqXIu8lTDYoggeX0Xd6bWeCFHK3 DhD0/Xi/kegSW33unsp8oVcM4kcFxTkpBgj39dB4KwAUznhTJR0zUHf63LkBDQRUCbs8AQgA y7kyevA4bpetM/EjtuqQX4U05MBhEz/2SFkX6IaGtTG2NNw5wbcAfhOIuNNBYbw6ExuaJ3um 2uLseHnudmvN4VSJ5Hfbd8rhqoMmmO71szgT/ZD9MEe2KHzBdmhmhxJdp+zQNivy215j6H27 14mbC2dia7ktwP1rxPIX1OOfQwPuqlkmYPuVwZP19S4EYnCELOrnJ0m56tZLn5Zj+1jZX9Co YbNLMa28qsktYJ4oU4jtn6V79H+/zpERZAHmH40IRXdR3hA+Ye7iC/ZpWzT2VSDlPbGY9Yja Sp7w2347L5G+LLbAfaVoejHlfy/msPeehUcuKjAdBLoEhSPYzzdvEQARAQABiQEfBBgBAgAJ BQJUCbs8AhsMAAoJEFvCxW+uDzIfabYIAJXmBepHJpvCPiMNEQJNJ2ZSzSjhic84LTMWMbJ+ opQgr5cb8SPQyyb508fc8b4uD8ejlF/cdbbBNktp3BXsHlO5BrmcABgxSP8HYYNsX0n9kERv NMToU0oiBuAaX7O/0K9+BW+3+PGMwiu5ml0cwDqljxfVN0dUBZnQ8kZpLsY+WDrIHmQWjtH+ Ir6VauZs5Gp25XLrL6bh/SL8aK0BX6y79m5nhfKI1/6qtzHAjtMAjqy8ChPvOqVVVqmGUzFg KPsrrIoklWcYHXPyMLj9afispPVR8e0tMKvxzFBWzrWX1mzljbBlnV2n8BIwVXWNbgwpHSsj imgcU9TTGC5qd9g= Message-ID: <2ed8efb9-5cd4-31bf-6c7b-501b9d1925e6@ilande.co.uk> Date: Fri, 8 Feb 2019 14:51:43 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <41b02fb0-cdc6-6de0-d8fc-44d3d0a8ad70@c-s.fr> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 86.138.240.60 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk Subject: Re: [PATCH] powerpc: fix 32-bit KVM-PR lockup and panic with MacOS guest X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/02/2019 14:45, Christophe Leroy wrote: > Le 08/02/2019 à 15:33, Mark Cave-Ayland a écrit : >> Commit 8792468da5e1 "powerpc: Add the ability to save FPU without giving it up" > > Expected format for the above is: > > Commit 123456789abc ("text") Hi Christophe, Apologies - I'm fairly new at submitting kernel patches, but I can re-send it in the correct format later if required. >> unexpectedly removed the MSR_FE0 and MSR_FE1 bits from the bitmask used to >> update the MSR of the previous thread in __giveup_fpu() causing a KVM-PR MacOS >> guest to lockup and panic the kernel. >> >> Reinstate these bits to the MSR bitmask to enable MacOS guests to run under >> 32-bit KVM-PR once again without issue. >> >> Signed-off-by: Mark Cave-Ayland > > Should include a Fixes: and a Cc to stable ? > > Fixes: 8792468da5e1 ("powerpc: Add the ability to save FPU without giving it up") > Cc: stable@vger.kernel.org Indeed, but there are still some questions to be asked here: 1) Why were these bits removed from the original bitmask in the first place without it being documented in the commit message? 2) Is this the right fix? I'm told that MacOS guests already run without this patch on a G5 under 64-bit KVM-PR which may suggest that this is a workaround for another bug elsewhere in the 32-bit powerpc code. If you think that these points don't matter, then I'm happy to resubmit the patch as-is based upon your comments above. ATB, Mark. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Cave-Ayland Date: Fri, 08 Feb 2019 14:51:43 +0000 Subject: Re: [PATCH] powerpc: fix 32-bit KVM-PR lockup and panic with MacOS guest Message-Id: <2ed8efb9-5cd4-31bf-6c7b-501b9d1925e6@ilande.co.uk> List-Id: References: <20190208143319.11980-1-mark.cave-ayland@ilande.co.uk> <41b02fb0-cdc6-6de0-d8fc-44d3d0a8ad70@c-s.fr> In-Reply-To: <41b02fb0-cdc6-6de0-d8fc-44d3d0a8ad70@c-s.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: Christophe Leroy , benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, npiggin@gmail.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org On 08/02/2019 14:45, Christophe Leroy wrote: > Le 08/02/2019 à 15:33, Mark Cave-Ayland a écrit : >> Commit 8792468da5e1 "powerpc: Add the ability to save FPU without giving it up" > > Expected format for the above is: > > Commit 123456789abc ("text") Hi Christophe, Apologies - I'm fairly new at submitting kernel patches, but I can re-send it in the correct format later if required. >> unexpectedly removed the MSR_FE0 and MSR_FE1 bits from the bitmask used to >> update the MSR of the previous thread in __giveup_fpu() causing a KVM-PR MacOS >> guest to lockup and panic the kernel. >> >> Reinstate these bits to the MSR bitmask to enable MacOS guests to run under >> 32-bit KVM-PR once again without issue. >> >> Signed-off-by: Mark Cave-Ayland > > Should include a Fixes: and a Cc to stable ? > > Fixes: 8792468da5e1 ("powerpc: Add the ability to save FPU without giving it up") > Cc: stable@vger.kernel.org Indeed, but there are still some questions to be asked here: 1) Why were these bits removed from the original bitmask in the first place without it being documented in the commit message? 2) Is this the right fix? I'm told that MacOS guests already run without this patch on a G5 under 64-bit KVM-PR which may suggest that this is a workaround for another bug elsewhere in the 32-bit powerpc code. If you think that these points don't matter, then I'm happy to resubmit the patch as-is based upon your comments above. ATB, Mark.