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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 149B7C2D0EA for ; Wed, 8 Apr 2020 14:13:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C77532082F for ; Wed, 8 Apr 2020 14:13:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728250AbgDHONT (ORCPT ); Wed, 8 Apr 2020 10:13:19 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:49924 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726550AbgDHONT (ORCPT ); Wed, 8 Apr 2020 10:13:19 -0400 Received: from p5de0bf0b.dip0.t-ipconnect.de ([93.224.191.11] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jMBRr-0007Ob-HA; Wed, 08 Apr 2020 16:12:59 +0200 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id A83CE10069D; Wed, 8 Apr 2020 16:12:58 +0200 (CEST) From: Thomas Gleixner To: Ankur Arora , linux-kernel@vger.kernel.org, x86@kernel.org Cc: peterz@infradead.org, hpa@zytor.com, jpoimboe@redhat.com, namit@vmware.com, mhiramat@kernel.org, jgross@suse.com, bp@alien8.de, vkuznets@redhat.com, pbonzini@redhat.com, boris.ostrovsky@oracle.com, mihai.carabas@oracle.com, kvm@vger.kernel.org, xen-devel@lists.xenproject.org, virtualization@lists.linux-foundation.org, Ankur Arora Subject: Re: [RFC PATCH 00/26] Runtime paravirt patching In-Reply-To: <20200408050323.4237-1-ankur.a.arora@oracle.com> References: <20200408050323.4237-1-ankur.a.arora@oracle.com> Date: Wed, 08 Apr 2020 16:12:58 +0200 Message-ID: <87k12qawwl.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ankur Arora writes: > A KVM host (or another hypervisor) might advertise paravirtualized > features and optimization hints (ex KVM_HINTS_REALTIME) which might > become stale over the lifetime of the guest. For instance, the > host might go from being undersubscribed to being oversubscribed > (or the other way round) and it would make sense for the guest > switch pv-ops based on that. If your host changes his advertised behaviour then you want to fix the host setup or find a competent admin. > This lockorture splat that I saw on the guest while testing this is > indicative of the problem: > > [ 1136.461522] watchdog: BUG: soft lockup - CPU#8 stuck for 22s! [lock_torture_wr:12865] > [ 1136.461542] CPU: 8 PID: 12865 Comm: lock_torture_wr Tainted: G W L 5.4.0-rc7+ #77 > [ 1136.461546] RIP: 0010:native_queued_spin_lock_slowpath+0x15/0x220 > > (Caused by an oversubscribed host but using mismatched native pv_lock_ops > on the gues.) And this illustrates what? The fact that you used a misconfigured setup. > This series addresses the problem by doing paravirt switching at > runtime. You're not addressing the problem. Your fixing the symptom, which is wrong to begin with. > The alternative use-case is a runtime version of apply_alternatives() > (not posted with this patch-set) that can be used for some safe subset > of X86_FEATUREs. This could be useful in conjunction with the ongoing > late microcode loading work that Mihai Carabas and others have been > working on. This has been discussed to death before and there is no safe subset as long as this hasn't been resolved: https://lore.kernel.org/lkml/alpine.DEB.2.21.1909062237580.1902@nanos.tec.linutronix.de/ Thanks, tglx From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: [RFC PATCH 00/26] Runtime paravirt patching Date: Wed, 08 Apr 2020 16:12:58 +0200 Message-ID: <87k12qawwl.fsf@nanos.tec.linutronix.de> References: <20200408050323.4237-1-ankur.a.arora@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20200408050323.4237-1-ankur.a.arora@oracle.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: jgross@suse.com, xen-devel@lists.xenproject.org, kvm@vger.kernel.org, peterz@infradead.org, hpa@zytor.com, Ankur Arora , virtualization@lists.linux-foundation.org, pbonzini@redhat.com, namit@vmware.com, mhiramat@kernel.org, jpoimboe@redhat.com, mihai.carabas@oracle.com, bp@alien8.de, boris.ostrovsky@oracle.com List-Id: virtualization@lists.linuxfoundation.org Ankur Arora writes: > A KVM host (or another hypervisor) might advertise paravirtualized > features and optimization hints (ex KVM_HINTS_REALTIME) which might > become stale over the lifetime of the guest. For instance, the > host might go from being undersubscribed to being oversubscribed > (or the other way round) and it would make sense for the guest > switch pv-ops based on that. If your host changes his advertised behaviour then you want to fix the host setup or find a competent admin. > This lockorture splat that I saw on the guest while testing this is > indicative of the problem: > > [ 1136.461522] watchdog: BUG: soft lockup - CPU#8 stuck for 22s! [lock_torture_wr:12865] > [ 1136.461542] CPU: 8 PID: 12865 Comm: lock_torture_wr Tainted: G W L 5.4.0-rc7+ #77 > [ 1136.461546] RIP: 0010:native_queued_spin_lock_slowpath+0x15/0x220 > > (Caused by an oversubscribed host but using mismatched native pv_lock_ops > on the gues.) And this illustrates what? The fact that you used a misconfigured setup. > This series addresses the problem by doing paravirt switching at > runtime. You're not addressing the problem. Your fixing the symptom, which is wrong to begin with. > The alternative use-case is a runtime version of apply_alternatives() > (not posted with this patch-set) that can be used for some safe subset > of X86_FEATUREs. This could be useful in conjunction with the ongoing > late microcode loading work that Mihai Carabas and others have been > working on. This has been discussed to death before and there is no safe subset as long as this hasn't been resolved: https://lore.kernel.org/lkml/alpine.DEB.2.21.1909062237580.1902@nanos.tec.linutronix.de/ Thanks, tglx 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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 6ADA9C2BA1A for ; Wed, 8 Apr 2020 14:13:31 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4388F2087E for ; Wed, 8 Apr 2020 14:13:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4388F2087E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jMBS4-00036Y-As; Wed, 08 Apr 2020 14:13:12 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jMBS2-00036T-Ll for xen-devel@lists.xenproject.org; Wed, 08 Apr 2020 14:13:10 +0000 X-Inumbo-ID: 120e48c0-79a3-11ea-b4f4-bc764e2007e4 Received: from Galois.linutronix.de (unknown [2a0a:51c0:0:12e:550::1]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 120e48c0-79a3-11ea-b4f4-bc764e2007e4; Wed, 08 Apr 2020 14:13:08 +0000 (UTC) Received: from p5de0bf0b.dip0.t-ipconnect.de ([93.224.191.11] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jMBRr-0007Ob-HA; Wed, 08 Apr 2020 16:12:59 +0200 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id A83CE10069D; Wed, 8 Apr 2020 16:12:58 +0200 (CEST) From: Thomas Gleixner To: Ankur Arora , linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [RFC PATCH 00/26] Runtime paravirt patching In-Reply-To: <20200408050323.4237-1-ankur.a.arora@oracle.com> References: <20200408050323.4237-1-ankur.a.arora@oracle.com> Date: Wed, 08 Apr 2020 16:12:58 +0200 Message-ID: <87k12qawwl.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1, SHORTCIRCUIT=-0.0001 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: jgross@suse.com, xen-devel@lists.xenproject.org, kvm@vger.kernel.org, peterz@infradead.org, hpa@zytor.com, Ankur Arora , virtualization@lists.linux-foundation.org, pbonzini@redhat.com, namit@vmware.com, mhiramat@kernel.org, jpoimboe@redhat.com, mihai.carabas@oracle.com, bp@alien8.de, vkuznets@redhat.com, boris.ostrovsky@oracle.com Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Ankur Arora writes: > A KVM host (or another hypervisor) might advertise paravirtualized > features and optimization hints (ex KVM_HINTS_REALTIME) which might > become stale over the lifetime of the guest. For instance, the > host might go from being undersubscribed to being oversubscribed > (or the other way round) and it would make sense for the guest > switch pv-ops based on that. If your host changes his advertised behaviour then you want to fix the host setup or find a competent admin. > This lockorture splat that I saw on the guest while testing this is > indicative of the problem: > > [ 1136.461522] watchdog: BUG: soft lockup - CPU#8 stuck for 22s! [lock_torture_wr:12865] > [ 1136.461542] CPU: 8 PID: 12865 Comm: lock_torture_wr Tainted: G W L 5.4.0-rc7+ #77 > [ 1136.461546] RIP: 0010:native_queued_spin_lock_slowpath+0x15/0x220 > > (Caused by an oversubscribed host but using mismatched native pv_lock_ops > on the gues.) And this illustrates what? The fact that you used a misconfigured setup. > This series addresses the problem by doing paravirt switching at > runtime. You're not addressing the problem. Your fixing the symptom, which is wrong to begin with. > The alternative use-case is a runtime version of apply_alternatives() > (not posted with this patch-set) that can be used for some safe subset > of X86_FEATUREs. This could be useful in conjunction with the ongoing > late microcode loading work that Mihai Carabas and others have been > working on. This has been discussed to death before and there is no safe subset as long as this hasn't been resolved: https://lore.kernel.org/lkml/alpine.DEB.2.21.1909062237580.1902@nanos.tec.linutronix.de/ Thanks, tglx