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]
Date:   Thu, 11 Feb 2021 10:04:48 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Makarand Sonare <makarandsonare@...gle.com>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org, seanjc@...gle.com, pshier@...gle.com,
        jmattson@...gle.com
Cc:     Ben Gardon <bgardon@...gle.com>
Subject: Re: [RESEND PATCH ] KVM: VMX: Enable/disable PML when dirty logging
 gets enabled/disabled

On 10/02/21 22:23, Makarand Sonare wrote:
> +void vmx_update_pml_in_vmcs(struct kvm_vcpu *vcpu)
> +{
> +	if (cpu_has_secondary_exec_ctrls()) {
> +		if (is_guest_mode(vcpu)) {
> +			to_vmx(vcpu)->nested.deferred_update_pml_vmcs = true;
> +			return;
> +		}
> +
> +		if (vcpu->kvm->arch.pml_enabled)
> +			vmcs_set_bits(SECONDARY_VM_EXEC_CONTROL,
> +				SECONDARY_EXEC_ENABLE_PML);
> +		else
> +			vmcs_clear_bits(SECONDARY_VM_EXEC_CONTROL,
> +				SECONDARY_EXEC_ENABLE_PML);
> +	}
> +}


Since the execution controls are shadowed, they can be read quite 
efficiently.  This means that there's no need for 
vcpu->kvm->arch.pml_enabled, and also that the copy can be done 
unconditionally in prepare_vmcs02 and nested_vmx_vmexit.

If the above is not true, we should at least combine 
change_vmcs01_virtual_apic_mode, reload_vmcs01_apic_access_page and the 
new field in a single bit field, for example 
vmx->nested.dirty_vmcs01_fields or vmx->nested.vmexit_requests.

In any case I expect Sean to take care of submitting this patch and I 
have to do nothing more about it, right?

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ