linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wanpeng Li <kernellwp@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Jim Mattson" <jmattson@google.com>,
	"Krish Sadhukhan" <krish.sadhukhan@oracle.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"kvm list" <kvm@vger.kernel.org>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	"Wanpeng Li" <wanpeng.li@hotmail.com>
Subject: Re: [PATCH v5 3/3] KVM: nVMX: Fix mmu context after VMLAUNCH/VMRESUME failure
Date: Thu, 9 Nov 2017 19:10:31 +0800	[thread overview]
Message-ID: <CANRm+CwQfQ=BOT__z0NkaJEhrwCjC+rpUk-PJgWLr8tLovXwnw@mail.gmail.com> (raw)
In-Reply-To: <b77093db-9c9b-7f94-7442-22441d2a513f@redhat.com>

2017-11-09 19:05 GMT+08:00 Paolo Bonzini <pbonzini@redhat.com>:
> On 09/11/2017 11:47, Wanpeng Li wrote:
>> 2017-11-09 18:40 GMT+08:00 Paolo Bonzini <pbonzini@redhat.com>:
>>> On 09/11/2017 01:37, Wanpeng Li wrote:
>>>> 2017-11-09 5:47 GMT+08:00 Jim Mattson <jmattson@google.com>:
>>>>> 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

  reply	other threads:[~2017-11-09 11:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-03  0:50 [PATCH v5 1/3] KVM: X86: Fix operand/address-size during instruction decoding Wanpeng Li
2017-11-03  0:50 ` [PATCH v5 2/3] KVM: nVMX: Validate the IA32_BNDCFGS on nested VM-entry Wanpeng Li
     [not found]   ` <0b1d82f7-2fc6-9fc0-15a4-3500413814bd@oracle.com>
2017-11-03  6:40     ` Wanpeng Li
2017-11-03 17:13       ` Krish Sadhukhan
2017-11-03 17:54         ` Jim Mattson
2017-11-03  0:50 ` [PATCH v5 3/3] KVM: nVMX: Fix mmu context after VMLAUNCH/VMRESUME failure Wanpeng Li
2017-11-03 16:01   ` Jim Mattson
2017-11-04  0:07   ` Krish Sadhukhan
2017-11-08 21:47     ` Jim Mattson
2017-11-09  0:37       ` Wanpeng Li
2017-11-09 10:40         ` Paolo Bonzini
2017-11-09 10:47           ` Wanpeng Li
2017-11-09 11:05             ` Paolo Bonzini
2017-11-09 11:10               ` Wanpeng Li [this message]
2017-11-09 16:19           ` Jim Mattson
2018-02-05 18:44       ` Jim Mattson
2018-05-07 22:56         ` Jim Mattson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANRm+CwQfQ=BOT__z0NkaJEhrwCjC+rpUk-PJgWLr8tLovXwnw@mail.gmail.com' \
    --to=kernellwp@gmail.com \
    --cc=jmattson@google.com \
    --cc=krish.sadhukhan@oracle.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=wanpeng.li@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).