public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bandan Das <bsd@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Wanpeng Li <wanpeng.li@hotmail.com>,
	Jan Kiszka <jan.kiszka@siemens.com>,
	Wincy Van <fanwenyi0529@gmail.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: nVMX: emulate the INVVPID instruction
Date: Thu, 24 Sep 2015 11:45:31 -0400	[thread overview]
Message-ID: <jpgoagrlt2c.fsf@linux.bootlegged.copy> (raw)
In-Reply-To: <56026541.7030000@redhat.com> (Paolo Bonzini's message of "Wed, 23 Sep 2015 10:39:29 +0200")

Paolo Bonzini <pbonzini@redhat.com> writes:
...
>> @@ -7189,7 +7189,28 @@ static int handle_invept(struct kvm_vcpu *vcpu)
>>  
>>  static int handle_invvpid(struct kvm_vcpu *vcpu)
>>  {
>> -	kvm_queue_exception(vcpu, UD_VECTOR);
>> +	u32 vmx_instruction_info;
>> +	unsigned long type;
>> +
>> +	if (!nested_vmx_check_permission(vcpu))
>> +		return 1;
>> +
>> +	vmx_instruction_info = vmcs_read32(VMX_INSTRUCTION_INFO);
>> +	type = kvm_register_readl(vcpu, (vmx_instruction_info >> 28) & 0xf);
>> +
>> +	switch (type) {
>> +	case VMX_VPID_EXTENT_INDIVIDUAL_ADDR:
>> +	case VMX_VPID_EXTENT_SINGLE_CONTEXT:
>> +	case VMX_VPID_EXTENT_ALL_CONTEXT:
>> +		vmx_flush_tlb(vcpu);
>> +		nested_vmx_succeed(vcpu);
>> +		break;
>> +	default:
>> +		nested_vmx_failInvalid(vcpu);
>> +		break;
>> +	}
>> +
>> +	skip_emulated_instruction(vcpu);
>>  	return 1;
>>  }
>>  
>> 
>
> This is not enough.  You need to add a VPID argument to
> vpid_sync_vcpu_single, and inline vmx_flush_tlb in handle_invvpid so
> that it can use the new VPID argument of vpid_sync_vcpu_single.
>
> Note that the "all context" variant can be mapped to
> vpid_sync_vcpu_single with vpid02 as the argument (a nice side effect of
> your vpid02 design).
>
> However, I have applied the patch to kvm/queue.  Please send the changes
> separately, and I will squash them in the existing VPID patch.

Please don't do this. It's making it really difficult to review these
patches individually :( Why not let them get some review time before
applying them all together ?


> Paolo
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-09-24 15:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-23  7:59 [PATCH] KVM: nVMX: emulate the INVVPID instruction Wanpeng Li
2015-09-23  8:39 ` Paolo Bonzini
2015-09-23 10:30   ` Wanpeng Li
2015-09-24 15:45   ` Bandan Das [this message]
2015-09-25  7:53     ` Paolo Bonzini
2015-09-25 14:54       ` 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=jpgoagrlt2c.fsf@linux.bootlegged.copy \
    --to=bsd@redhat.com \
    --cc=fanwenyi0529@gmail.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@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