Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: "Xu, Dongxiao" <dongxiao.xu@intel.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Alexander Graf <agraf@suse.de>
Subject: Re: [PATCH 4/4 v3] KVM: VMX: VMXON/VMXOFF usage changes.
Date: Tue, 11 May 2010 12:05:51 +0300	[thread overview]
Message-ID: <4BE91DEF.3080903@redhat.com> (raw)
In-Reply-To: <D5AB6E638E5A3E4B8F4406B113A5A19A1E55CFB1@shsmsx501.ccr.corp.intel.com>

On 05/07/2010 05:43 AM, Xu, Dongxiao wrote:
> From: Dongxiao Xu<dongxiao.xu@intel.com>
>
> SDM suggests VMXON should be called before VMPTRLD, and VMXOFF
> should be called after doing VMCLEAR.
>
> Therefore in vmm coexistence case, we should firstly call VMXON
> before any VMCS operation, and then call VMXOFF after the
> operation is done.
>
>
> @@ -4118,7 +4143,10 @@ static void vmx_cpuid_update(struct kvm_vcpu *vcpu)
>   	struct kvm_cpuid_entry2 *best;
>   	struct vcpu_vmx *vmx = to_vmx(vcpu);
>   	u32 exec_control;
> +	int cpu;
>
> +	cpu = get_cpu();
> +	vmx_vcpu_load(&vmx->vcpu, cpu);
>   	vmx->rdtscp_enabled = false;
>   	if (vmx_rdtscp_supported()) {
>   		exec_control = vmcs_read32(SECONDARY_VM_EXEC_CONTROL);
> @@ -4133,6 +4161,9 @@ static void vmx_cpuid_update(struct kvm_vcpu *vcpu)
>   			}
>   		}
>   	}
> +	vmx_vcpu_put(&vmx->vcpu);
> +	put_cpu();
> +
>   }
>
>   static void vmx_set_supported_cpuid(u32 func, struct kvm_cpuid_entry2 *entry)
>    

I'm not sure why this is needed.  vmx_cpuid_update() is called from a 
vcpu ioctl which should have called vcpu_load() before.

Apart from that, everything looks good for merging.

-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2010-05-11  9:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-07  2:43 [PATCH 4/4 v3] KVM: VMX: VMXON/VMXOFF usage changes Xu, Dongxiao
2010-05-11  9:05 ` Avi Kivity [this message]
2010-05-11  9:38   ` Xu, Dongxiao
2010-05-11  9:50     ` Avi Kivity
2010-05-11  9:54       ` Xu, Dongxiao

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=4BE91DEF.3080903@redhat.com \
    --to=avi@redhat.com \
    --cc=agraf@suse.de \
    --cc=dongxiao.xu@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@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