From: Paolo Bonzini <pbonzini@redhat.com>
To: Bandan Das <bsd@redhat.com>, kvm@vger.kernel.org
Cc: rkrcmar@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] nvmx: use warn_on for buggy cases when emulating invept/invvpid
Date: Thu, 21 Jul 2016 11:13:37 +0200 [thread overview]
Message-ID: <dc645c45-1e27-9965-c691-738c85868dc0@redhat.com> (raw)
In-Reply-To: <1469053536-11130-2-git-send-email-bsd@redhat.com>
On 21/07/2016 00:25, Bandan Das wrote:
> If L1 hypervisor decides to try out something weird, alert the
> host but only less aggressively. Also, remove the comment
> regarding nested vpid support since it is no longer valid.
>
> Signed-off-by: Bandan Das <bsd@redhat.com>
> ---
> arch/x86/kvm/vmx.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 64a79f2..9fd0681 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -2854,7 +2854,6 @@ static int vmx_get_vmx_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 *pdata)
> vmx->nested.nested_vmx_secondary_ctls_high);
> break;
> case MSR_IA32_VMX_EPT_VPID_CAP:
> - /* Currently, no nested vpid support */
This is okay.
> *pdata = vmx->nested.nested_vmx_ept_caps |
> ((u64)vmx->nested.nested_vmx_vpid_caps << 32);
> break;
> @@ -7462,7 +7461,7 @@ static int handle_invept(struct kvm_vcpu *vcpu)
> break;
> default:
> /* Trap single context invalidation invept calls */
> - BUG_ON(1);
> + WARN_ON(1);
> break;
> }
>
> @@ -7525,7 +7524,7 @@ static int handle_invvpid(struct kvm_vcpu *vcpu)
> break;
> default:
> /* Trap individual address invalidation invvpid calls */
> - BUG_ON(1);
> + WARN_ON(1);
> break;
> }
>
>
These are BUGs because they are checked above:
if (!(types & (1UL << type))) {
nested_vmx_failValid(vcpu,
VMXERR_INVALID_OPERAND_TO_INVEPT_INVVPID);
skip_emulated_instruction(vcpu);
return 1;
}
Guest-triggerable WARNs are only just a little better than
guest-triggerable BUGs. Guest-triggerable messages should be
rate-limited printk.
I don't object to the change, but the commit message should be
modified (or the change dropped).
Paolo
next prev parent reply other threads:[~2016-07-21 9:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-20 22:25 [PATCH 0/4] vmx: miscellaneous cleanups Bandan Das
2016-07-20 22:25 ` [PATCH 1/4] nvmx: use warn_on for buggy cases when emulating invept/invvpid Bandan Das
2016-07-21 9:13 ` Paolo Bonzini [this message]
2016-07-21 19:18 ` Bandan Das
2016-07-20 22:25 ` [PATCH 2/4] nvmx: mark ept single context invalidation as supported Bandan Das
2016-07-20 22:25 ` [PATCH 3/4] mmu: don't pass *kvm to spte_write_protect Bandan Das
2016-07-21 9:15 ` Paolo Bonzini
2016-07-21 19:21 ` Bandan Das
2016-07-20 22:25 ` [PATCH 4/4] nvmx: check for shadow vmcs check on entry Bandan Das
2016-07-21 9:16 ` Paolo Bonzini
2016-07-21 19:20 ` Bandan Das
2016-07-22 8:40 ` Paolo Bonzini
2016-07-22 15:51 ` Bandan Das
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=dc645c45-1e27-9965-c691-738c85868dc0@redhat.com \
--to=pbonzini@redhat.com \
--cc=bsd@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rkrcmar@redhat.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).