Received: by 10.223.164.202 with SMTP id h10csp86993wrb; Thu, 9 Nov 2017 03:12:21 -0800 (PST) X-Google-Smtp-Source: ABhQp+Qi25TVmk+5jkwsjeS4cUR/i8mG4CT7Icx0T+4q77s6t99eWR+9reYmXsyZEy4EBya9nUSx X-Received: by 10.99.142.73 with SMTP id k70mr113966pge.426.1510225941107; Thu, 09 Nov 2017 03:12:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510225941; cv=none; d=google.com; s=arc-20160816; b=FbZ7EPr8/TPPDB3gxiNlnU+BzUqbeAmgZEUXGHTx9b78OdxV7WEYvUVrbs+NDPkjJH cr5RrD2kVxy1HSzKtKCpF0I/pYGBBodTLJRbZSHUxeseWp2r1+aOm3glOlD8vouIMquR vGQu9bp+l2jNKXma7iMl64dkrQgaFIrGqGKnEoYMTja76OKqJOjXzSp4uko8GoJB8jCi aqBfFviSrPeylQm76wr/hkdV/G/nUP+1nifTa/TTbbMGh/bhol1XU0pvOW/rRhUriLcD wdE2WbgZe1Ag6Re/gK0kHveIhK7GY1lTEhf82PL9gvWrcImYiuzG4JvPNeBRjU4QpYMF Jc0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=QKuEVkS4KEwS0KA6mp+faIwoPPfnfSY5Buez7MGzrcc=; b=Erl+llqDrQJrf54sr3PjfomtnEIe5MwAtb0O8XtZ+splg1f8E3MXo504jqzPLBNpot 9cJAjAk6WVIUxkQQsR5+gtyJ9/zKwVz0ZA1me2bwwRxbzC8ClekN9k6S6/mc05ZNoj8F kgsYVcpeqHJueEBNz5SKblXBG52jHK+f9CZ1G2A4V5Kr2HSEHseM3Amb0yeM7rKo2ukC yqAUuuSOGdeouMzz7MPTBZ1aNIyzJ2Da4yoPSZk/A0V8YPFkB1B92XX5jdKwRqvDzuDb yMwAEMFr60egtRVUdiQLaqUNrQ2BBmO+UxPsi1PI70Ud1W9HQi8O/h7AFkGHwrLG0eLA wwTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vCom9ITt; 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=NONE 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 h128si6439399pfb.121.2017.11.09.03.12.09; Thu, 09 Nov 2017 03:12:21 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vCom9ITt; 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=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753775AbdKILKe (ORCPT + 81 others); Thu, 9 Nov 2017 06:10:34 -0500 Received: from mail-ot0-f193.google.com ([74.125.82.193]:47735 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753644AbdKILKc (ORCPT ); Thu, 9 Nov 2017 06:10:32 -0500 Received: by mail-ot0-f193.google.com with SMTP id s88so4961828ota.4; Thu, 09 Nov 2017 03:10:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=QKuEVkS4KEwS0KA6mp+faIwoPPfnfSY5Buez7MGzrcc=; b=vCom9ITtXRgc7/WwDd3o3uA8sSzqkbt1LsyGzMllJx524INmiH3TOtqpBbyblmij3q ygpx0WxDXir+NBQb2TmBwLfe0a2AYGvmv9exGKz0NERkFKLNgH29LiqYiZMeToOsQ5oc 8Ie22M52Kype32gtJaij87NsSiYhyM+/v9GTVlM/jvBrk/dwFzFTo3rq9VV0L6QS/vKb lDeRDtv9IadZoKLrj6sWUpM5w0Wn2NP4mp/hvsu3Vrd9GUUPsCwSO2tiLQow+ZIF4+Gi 4ppfyor3COP0lwUGk2lHRn8/q6+Mqn7q7GffYwg98uDgfQ/HSckgZYCCkTPOY9gcBBOS CJEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=QKuEVkS4KEwS0KA6mp+faIwoPPfnfSY5Buez7MGzrcc=; b=cx1RPMWOwupj+LNsCMqq06EIwMReOi4oeeD/ZbdxpVieDh/EkhWAlQHBDw9mfRWOTG NeVvZj6bTp9pEJpYhu8ge9tnaWC10h+D8K4Xd+CK7XyvWlDD7UCBglvhfOdwfK1HlXYB F5S/VKZN82tkeyIDe3pFJMDR2mP61kiiCIWKzIXO+EY6k6mkTfct//Bm3dCxt6fnWhRn bxlmW58p/TYAErMqBojq7QR1C9EsO6lRhAjcEtdHzcqhtwP/ULBvOgmYCxpfdOmpQ3mV gYkST1A1Qr7s4UHe2aGOcvd3+33VwIZdph+xr/7pKaJr6Q9n6dbf2qXKkA81F9ipXorz FzVg== X-Gm-Message-State: AJaThX58mx6oX5u/H7Jb6fUKRWVf6KqcGGzY+nx2RGYNfCak7N+Bh/VF tfv/2FjrAoUwRsm/yMuEFJbeyMlai8KGwPj4AVE= X-Received: by 10.157.83.141 with SMTP id w13mr44676otg.347.1510225831734; Thu, 09 Nov 2017 03:10:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.74.53.27 with HTTP; Thu, 9 Nov 2017 03:10:31 -0800 (PST) In-Reply-To: References: <1509670249-4907-1-git-send-email-wanpeng.li@hotmail.com> <1509670249-4907-3-git-send-email-wanpeng.li@hotmail.com> <50b82c53-1e57-88a9-25bd-76697bf2d048@oracle.com> <3201561c-55c4-8edb-41bc-d4247520f61c@redhat.com> From: Wanpeng Li Date: Thu, 9 Nov 2017 19:10:31 +0800 Message-ID: Subject: Re: [PATCH v5 3/3] KVM: nVMX: Fix mmu context after VMLAUNCH/VMRESUME failure To: Paolo Bonzini Cc: Jim Mattson , Krish Sadhukhan , LKML , kvm list , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Wanpeng Li Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2017-11-09 19:05 GMT+08:00 Paolo Bonzini : > On 09/11/2017 11:47, Wanpeng Li wrote: >> 2017-11-09 18:40 GMT+08:00 Paolo Bonzini : >>> On 09/11/2017 01:37, Wanpeng Li wrote: >>>> 2017-11-09 5:47 GMT+08:00 Jim Mattson : >>>>> I realize now that there are actually many other problems with >>>>> deferring some control field checks to the hardware VM-entry of >>>>> vmcs02. When there is an invalid control field, the vCPU should just >>>>> fall through to the next instruction, without any state modifiation >>>>> other than the ALU flags and the VM-instruction error field of the >>>>> current VMCS. However, in preparation for the hardware VM-entry of >>>>> vmcs02, we have already changed quite a bit of the vCPU state: the >>>>> MSRs on the VM-entry MSR-load list, DR7, IA32_DEBUGCTL, the entire >>>>> FLAGS register, etc. All of these changes should be undone, and we're >>>>> not prepared to do that. (For instance, what was the old DR7 value >>>>> that needs to be restored?) >>>> I didn't observe real issue currently, and I hope this patchset can >>>> catch the upcoming merge window. Then we can dig more into your >>>> concern. >>> >>> Can any of you write a simple testcase for just one bug (e.g. DR7)? >> >> Jim you can have a try for your concern, I have already tried tons of >> stress testing and didn't observe any issue. > > You need to craft a testcase for kvm-unit-tests. No stress testing will > find an issue. > > Your patch is fine, but Jim is saying that we cannot really skip the > check for invalid control fields. It's a more general issue that can be > fixed by adding explicit checks in KVM. Fair enough. I will find time to do this recently. I guess Radim can apply the whole patchset today. :) Regards, Wanpeng Li From 1583586326731700220@xxx Thu Nov 09 11:06:47 +0000 2017 X-GM-THRID: 1583003100143951555 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread