Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp697222ybb; Wed, 8 Apr 2020 08:14:48 -0700 (PDT) X-Google-Smtp-Source: APiQypJ/NRwqlulnBUL88W7lO6u8HZyKdWPGC1Jf3e7Y/NfT8zQm0rmZqfA1sE0ucQ7zWTuwpbZO X-Received: by 2002:a05:6830:1f5a:: with SMTP id u26mr6060012oth.208.1586358888095; Wed, 08 Apr 2020 08:14:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586358888; cv=none; d=google.com; s=arc-20160816; b=guriNSP9jLTOJcIaet8Sw6lNqEh7vsVJhW+Zh0ESuR5Hdc0EQppGjtMXW0X9u4Nzod AQN7Mj2iHhsmOs5wUSyYeHkPK+oFjOzz/9ajCCktl6a2CZ0DTUT2jJ4OSoPcYO8aSmvr E5abCbuzE4c21qTwvA9JwC5eJ3L+42ByNlN5RKLZSq9v8cd2GG3fHKXzrw4kRrBH9Upy m2ySqZd76zbrnArhx3xrJ3BshjLZ3dIKOMvLlBPLlpP9XBJwNqMnY/BiZOk5/X0M0MpK cYatn0PZv2lp1BLgqNz9jzTiBXIHpTDXdrTicc4/y7pD3uJ2LTz40xn2FX82bUO7UyVD iAmw== 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:cc:to:from; bh=Xe4Qe7mV/7S23fgyLUjsxCjtHyXHqlgFc6uaPdPRjHY=; b=MHHAO/6LwG2NjdwjuazRmA2dTxMcgrrxrlygcCS016mPff6Xidbgtk6Rb1OYSToJT2 lqsWUZtvFRpObywC/KWkjjRxjRR7Gejprwg+saY+AghsfPlrIhi1JJMNtNIrvw6UVZeo CHXOxkDtEnWzjTceAjAEaLqFOAt5WmNeLxVElcprp0MVoLmd75kUz7bFcoe0Q4WvwQhu aKD9AyNkg0UdHCEnUbOvUwMmTjC9V9n0Fg6znnBO7ylhD2X6LqVEa/22MXFfR6OG+8cP 4W9nUVMLesSaz/qvX8VAagzbwSNYjhXKXOI84Bo7othZDdWMFk0emtlGWktDHXSMH2PJ gMHA== 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 o5si2607863otp.191.2020.04.08.08.14.30; Wed, 08 Apr 2020 08:14:48 -0700 (PDT) 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 S1728159AbgDHONT (ORCPT + 99 others); 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