linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>, kvm@vger.kernel.org
Cc: "Radim Krčmář" <rkrcmar@redhat.com>,
	"Roman Kagan" <rkagan@virtuozzo.com>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	"Haiyang Zhang" <haiyangz@microsoft.com>,
	"Stephen Hemminger" <sthemmin@microsoft.com>,
	"Michael Kelley (EOSG)" <Michael.H.Kelley@microsoft.com>,
	"Mohammed Gamal" <mmorsy@redhat.com>,
	"Cathy Avery" <cavery@redhat.com>,
	linux-kernel@vger.kernel.org, "Jim Mattson" <jmattson@google.com>
Subject: Re: [PATCH RFC v2 3/5] KVM: nVMX: add enlightened VMCS state
Date: Mon, 14 May 2018 18:22:29 +0200	[thread overview]
Message-ID: <a4277986-1633-c39c-43a6-b056ae489230@redhat.com> (raw)
In-Reply-To: <20180511133751.13414-4-vkuznets@redhat.com>

On 11/05/2018 15:37, Vitaly Kuznetsov wrote:
> -	if (enable_shadow_vmcs)
> -		to_vmx(vcpu)->nested.sync_shadow_vmcs = true;
> +
> +	if (vmx->nested.hv_evmcs)
> +		vmx->nested.sync_enlightened_vmcs = true;
> +	else if (enable_shadow_vmcs)
> +		vmx->nested.sync_shadow_vmcs = true;
>  }

These four lines are a bit repeated.  Perhaps change them to

	if (enable_shadow_vmcs || vmx->nested.hv_evmcs)
		vmx->nested.need_vmcs12_sync = true;

and elsewhere

	if (vmx->nested.need_vmcs12_sync) {
	       if (vmx->nested.hv_evmcs) {
	               copy_vmcs12_to_enlightened(vmx);
	               /* All fields are clean */
	               vmx->nested.hv_evmcs->hv_clean_fields |=
				HV_VMX_ENLIGHTENED_CLEAN_FIELD_ALL;
			vmx->nested.sync_enlightened_vmcs = false;
		} else {
	                copy_vmcs12_to_shadow(vmx);
		}
		vmx->nested.need_vmcs12_sync = false;
	}

?

  reply	other threads:[~2018-05-14 16:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-11 13:37 [PATCH RFC v2 0/5] KVM: nVMX: Enlightened VMCS for Hyper-V on KVM Vitaly Kuznetsov
2018-05-11 13:37 ` [PATCH RFC v2 1/5] KVM: hyperv: define VP assist page helpers Vitaly Kuznetsov
2018-05-11 13:37 ` [PATCH RFC v2 2/5] KVM: nVMX: add KVM_CAP_HYPERV_ENLIGHTENED_VMCS capability Vitaly Kuznetsov
2018-05-11 13:37 ` [PATCH RFC v2 3/5] KVM: nVMX: add enlightened VMCS state Vitaly Kuznetsov
2018-05-14 16:22   ` Paolo Bonzini [this message]
2018-05-15 11:11     ` Vitaly Kuznetsov
2018-05-11 13:37 ` [PATCH RFC v2 4/5] KVM: nVMX: implement enlightened VMPTRLD and VMCLEAR Vitaly Kuznetsov
2018-05-11 13:37 ` [PATCH RFC v2 5/5] KVM: nVMX: optimize prepare_vmcs02{,_full} for Enlightened VMCS case Vitaly Kuznetsov

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=a4277986-1633-c39c-43a6-b056ae489230@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=Michael.H.Kelley@microsoft.com \
    --cc=cavery@redhat.com \
    --cc=haiyangz@microsoft.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmorsy@redhat.com \
    --cc=rkagan@virtuozzo.com \
    --cc=rkrcmar@redhat.com \
    --cc=sthemmin@microsoft.com \
    --cc=vkuznets@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).