Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp532671imp; Wed, 20 Feb 2019 04:41:59 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia48dCBq4VpwpjZUVne2PERqVuvtkOply4qsBZr24iMMo6cJIFpzuE5Xoy7MPDIs5c1A/Rp X-Received: by 2002:a17:902:b097:: with SMTP id p23mr35131959plr.36.1550666519207; Wed, 20 Feb 2019 04:41:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550666519; cv=none; d=google.com; s=arc-20160816; b=pZm5z6ZhR2Wtdbuyap+iVIrYdcutPe1phsVd7tD/nmmfRMcE80cXrwrM2vLJ4b+5mx 5MzidrPLNPnx7ovG3XVdBC7Ziv3Wqh5vNmJJmFe6DCq9/YjMsOBJXP4XW5y/OTo5PcTc bkJ1jb8TNw8JiyHlO6hHvetUSxUL/dAuIqohdMmezWzp65qLaszVNGQ5z6W6kFnq4W8i VYCt4TkM+BRs6ij04H0/KiRsR/XJKpOtjVP5shG5qJpaalsS/Cr3NUSZ8UVjouxFa5Lz SnKWUW9iO8EkQNhCH/LSoBYqHc5QG4kq4cD35OYxDwbAA3G7Tkr/RWmCA3K/dkxz3L/d qmgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:to:from; bh=n6Z6KkRmG/WM3Ww6/QiLD/HlQBhvaBgWPjakMuMMq1w=; b=awo0ZUllwACljViUgn4oKVfJp3khy+WKAOSn3PJF7K3IAcT07zKbJzcOEIDyQoABSm jcHoi0osrcutQcZRdYBTYpmO1yDyhFbes69zL9uV0E8LTMQv7hxdB+xigzp+oFSslkZU elwTGSHEPs336eTy+J4Vp/9Yk9vjHkcVB1U/XTXXe8bY4OgpRcd2szB0w0m/cxwLlVzm 6LrcZnnhpvKHQM/nDFOWVbLBRbYD3eRRKDOP36CAFhCbrYh5cBtiPXeryb2cBuqfHYGz w+FIYeLnzbVbyM/iptK6wySDpKdZMte73KXnDX0zfzqZMwmKAH1yIGfCqRfhbhCvTPyS x1/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i11si10514559plt.280.2019.02.20.04.41.43; Wed, 20 Feb 2019 04:41:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727613AbfBTMlV (ORCPT + 99 others); Wed, 20 Feb 2019 07:41:21 -0500 Received: from ozlabs.org ([203.11.71.1]:44571 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726370AbfBTMlU (ORCPT ); Wed, 20 Feb 2019 07:41:20 -0500 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 444HK94H47z9s70; Wed, 20 Feb 2019 23:41:17 +1100 (AEDT) From: Michael Ellerman To: Mark Cave-Ayland , Christophe Leroy , benh@kernel.crashing.org, paulus@samba.org, npiggin@gmail.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org Subject: Re: [PATCH] powerpc: fix 32-bit KVM-PR lockup and panic with MacOS guest In-Reply-To: <6839dfd8-f316-d98a-2ae9-279de956ce28@ilande.co.uk> References: <20190208143319.11980-1-mark.cave-ayland@ilande.co.uk> <41b02fb0-cdc6-6de0-d8fc-44d3d0a8ad70@c-s.fr> <2ed8efb9-5cd4-31bf-6c7b-501b9d1925e6@ilande.co.uk> <87pnrobe9m.fsf@concordia.ellerman.id.au> <6839dfd8-f316-d98a-2ae9-279de956ce28@ilande.co.uk> Date: Wed, 20 Feb 2019 23:41:17 +1100 Message-ID: <87pnrm7hua.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mark Cave-Ayland writes: > On 19/02/2019 04:20, Michael Ellerman wrote: >> Mark Cave-Ayland writes: >>>>> 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. >> >> Which kernel is panicking? The guest or the host? > > It's the host kernel. As long as you occasionally tap a few keys to keep the screen > blanking disabled then you can see the panic on the physical console. Ah crap I assumed you meant the guest kernel. > I've uploaded a photo I took during the bisection containing the panic when booting > MacOS X 10.2 under qemu-system-ppc to > https://www.ilande.co.uk/tmp/qemu/macmini-kvm.jpg in case you find it useful. OK. That's a host crash, but only because init died (systemd). Though the reason it died is because we didn't clear FE0/1 properly, so still a kernel bug. > Given that it's really easy to recreate, let me know if you want me to do a git > pull/rebuild and/or if you need any debugging information as it's easy for me to > reproduce. I think that's OK. It's reasonably clear what's going on. >>> 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. >> >> That's slightly worrying. It's hard to say without more detail on why >> the guest is crashing. >> >> I think your patch looks OK based just on the fact that it restores the >> previous behaviour, so I'll pick it up and pass it through my usual >> testing. If nothing breaks I'll merge it. > > That would be great! Does it need a CC to stable too? It would be great if this would > get picked up in the next set of Debian ports kernels, for example. I'll add Cc stable. cheers