lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a4277986-1633-c39c-43a6-b056ae489230@redhat.com>
Date:   Mon, 14 May 2018 18:22:29 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Vitaly Kuznetsov <vkuznets@...hat.com>, kvm@...r.kernel.org
Cc:     Radim Krčmář <rkrcmar@...hat.com>,
        Roman Kagan <rkagan@...tuozzo.com>,
        "K. Y. Srinivasan" <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        "Michael Kelley (EOSG)" <Michael.H.Kelley@...rosoft.com>,
        Mohammed Gamal <mmorsy@...hat.com>,
        Cathy Avery <cavery@...hat.com>, linux-kernel@...r.kernel.org,
        Jim Mattson <jmattson@...gle.com>
Subject: Re: [PATCH RFC v2 3/5] KVM: nVMX: add enlightened VMCS state

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;
	}

?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ