Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3192118ybi; Mon, 29 Jul 2019 02:30:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqz1h/7a8yXeT097nOkc+3BB6rfyOgekFMJBLzNITdjpSd1auwmyapx9xnclFbB06ex6dmR7 X-Received: by 2002:a63:db45:: with SMTP id x5mr90698513pgi.293.1564392624381; Mon, 29 Jul 2019 02:30:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564392624; cv=none; d=google.com; s=arc-20160816; b=FJ/9/4cz3JsATj15GBQgxsXCXD/FXHB96x4xDpf21yPaGqBR3Ig1ZzRVLNNoI3m4pB pU3k/FKMUsGIirBIyEYX5zG/3WRyTMCUkq57kAXz3Vn6LuR/FlRdKZY8FDh54oiuozXT B0xSnxtAE7ESgFsByyf55Jyz1AmjV3ewiNr7NvFixNFjb7ykBftYngi2+Yli7Fq+xrwb aBjk5Syt1n36gxXG5fHAY3RswR++ZocWk7jKWJ1RUWx2zuYht+U7DM79pt3KhDmLGS/c 6d8NDZ4dxeS3kWyN38u3tS66l5kEU3OYst5fwua7NBwim+s9mCwog/JdRJhNI8LZvotg mGcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=EUZh/qN6trgEx5OPsgFHbmysYhr2RtqhZ92QIyN8AEU=; b=VJ884qHMlSiq+8rElW/l8RiDdfm7PnTXI4WCbEjfGZfej047LOaWcwzQ2bSXSk4Jyo ksyATbWZzKMD76XlIxTdT3grCIgxGZRmdpEP8GYZZ4K3N14EXiJmgJzdft0Wo4JJAQXD 882rZTLhmRJ8fyFWKCCNrexhbRTMnn1sPW1GCbHvBgZGsbGzMrGshqN6EqCyau+YZluY iXbULewke1i4g6kgJvlsa/ArW0vnT6mpW+KDlJR1peztdpX0HafVmgXFp0yXglfoNIrM vMIQTGcrrmLC+YX/6dfTsTWYSzpBJ/sXGGtgdFmHLzzsDykUf9RRRpzVhZ+6F7rM4CQ6 uSqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FYsVdZc3; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h4si6400247plb.71.2019.07.29.02.30.09; Mon, 29 Jul 2019 02:30:24 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FYsVdZc3; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727916AbfG2J33 (ORCPT + 99 others); Mon, 29 Jul 2019 05:29:29 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:42262 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726496AbfG2J33 (ORCPT ); Mon, 29 Jul 2019 05:29:29 -0400 Received: by mail-lj1-f193.google.com with SMTP id t28so57878460lje.9; Mon, 29 Jul 2019 02:29:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=EUZh/qN6trgEx5OPsgFHbmysYhr2RtqhZ92QIyN8AEU=; b=FYsVdZc3ErugKgik5hDEvCr15AinQhzBFMahAbFB5F9NIyb1PqtWUyHnntQT5Rt/wj MVY9p5JBtv1d1yiqwgLJ9wWpjnsaX12Z9SZtGFfwR6xkhyoXdINNFatlaHLVy5rLh5Hx 1ufVdL/r2xXzl66rawHYIEYaJd54mnZ2yYA7wsTp6z9xXap+Z732dMFkewF4MK2eD6Tb SZamUOimPY5chm+FG0aSbEGhcTXSMTVfkZKUYct4Nr9Gb7sHILdV1AkUXukIHxkdLpxm Uv4YgJKGexZLGIfddYlTFjViUe7V/p+0n6tDoJi+JWNZB6sR0S+YcJv/mtHazfFdvr1V kc2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=EUZh/qN6trgEx5OPsgFHbmysYhr2RtqhZ92QIyN8AEU=; b=hrergS5qDQyDLXMiLqMgE+hpP//wjuCnDkbral3WdwaoVXoJNoHdOFzmexUnj5WtWa dnSDpHVOqMIT9R43unZ5t2LRh8tBxe0bHA/4KMupvlFuPRxO3fJVEz3TjhQYp1EcRfMc jMrX8SaMOAP21Np3d1JXHCw01OnkrfOypaLQ225RBHsjI4W+MEJJDTmqHVXdtxe58qSs JHhI7LAue4Vpx8T6q6Q7FlDHjAr8dWWdpQQvjhb5NFM4vg1cvP7nhNrmA0Gpa9lw+Q6B bwXFYdeD5VLGLM+AD4EC55G4AHpBslNqBS3hUGRvkkYtH3toUWZQAW0syfdK/XmKsNCG R5oA== X-Gm-Message-State: APjAAAVBWAz6tEE84hazPIyy5VlRokhXltt2wwhxStkrGMkTJNV240Df 5NtGRnV4cXC17vtjMDUsVtqxczmIe1qP4J7dgWo= X-Received: by 2002:a2e:834e:: with SMTP id l14mr11299714ljh.158.1564392567034; Mon, 29 Jul 2019 02:29:27 -0700 (PDT) MIME-Version: 1.0 References: <20190725104645.30642-1-vkuznets@redhat.com> <20190725104645.30642-2-vkuznets@redhat.com> <2ea5d588-8573-6653-b848-0b06d1f98310@redhat.com> In-Reply-To: <2ea5d588-8573-6653-b848-0b06d1f98310@redhat.com> From: Jack Wang Date: Mon, 29 Jul 2019 11:29:16 +0200 Message-ID: Subject: Re: [PATCH stable-4.19 1/2] KVM: nVMX: do not use dangling shadow VMCS after guest reset To: Paolo Bonzini , Sasha Levin , Greg Kroah-Hartman Cc: Vitaly Kuznetsov , stable@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Paolo Bonzini =E4=BA=8E2019=E5=B9=B47=E6=9C=8829=E6= =97=A5=E5=91=A8=E4=B8=80 =E4=B8=8A=E5=8D=8811:10=E5=86=99=E9=81=93=EF=BC=9A > > On 29/07/19 10:58, Jack Wang wrote: > > Vitaly Kuznetsov =E4=BA=8E2019=E5=B9=B47=E6=9C=88= 25=E6=97=A5=E5=91=A8=E5=9B=9B =E4=B8=8B=E5=8D=883:29=E5=86=99=E9=81=93=EF= =BC=9A > >> > >> From: Paolo Bonzini > >> > >> [ Upstream commit 88dddc11a8d6b09201b4db9d255b3394d9bc9e57 ] > >> > >> If a KVM guest is reset while running a nested guest, free_nested will > >> disable the shadow VMCS execution control in the vmcs01. However, > >> on the next KVM_RUN vmx_vcpu_run would nevertheless try to sync > >> the VMCS12 to the shadow VMCS which has since been freed. > >> > >> This causes a vmptrld of a NULL pointer on my machime, but Jan reports > >> the host to hang altogether. Let's see how much this trivial patch fi= xes. > >> > >> Reported-by: Jan Kiszka > >> Cc: Liran Alon > >> Cc: stable@vger.kernel.org > >> Signed-off-by: Paolo Bonzini > > > > Hi all, > > > > Do we need to backport the fix also to stable 4.14? It applies > > cleanly and compiles fine. > > The reproducer required newer kernels that support KVM_GET_NESTED_STATE > and KVM_SET_NESTED_STATE, so it would be hard to test it. However, the > patch itself should be safe. > > Paolo Thanks Paolo for confirmation. I'm asking because we had one incident in our production with 4.14.129 kernel, System is Skylake Gold cpu, first kvm errors, host hung afterwards kernel: [1186161.091160] kvm: vmptrld (null)/6bfc00000000 failed kernel: [1186161.091537] kvm: vmclear fail: (null)/6bfc00000000 kernel: [1186186.490300] watchdog: BUG: soft lockup - CPU#54 stuck for 23s! [qemu:16639] Hi Sasha, hi Greg, Would be great if you can pick this patch also to 4.14 kernel. Best regards, Jack Wang