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] [day] [month] [year] [list]
Message-ID: <e08c257d-b92f-c829-7091-de9de28ae47d@redhat.com>
Date:   Wed, 28 Jun 2017 13:40:02 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Wanpeng Li <kernellwp@...il.com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        kvm <kvm@...r.kernel.org>,
        Radim Krčmář <rkrcmar@...hat.com>,
        Wanpeng Li <wanpeng.li@...mail.com>
Subject: Re: [PATCH v4 3/4] KVM: async_pf: Force a nested vmexit if the
 injected #PF is async_pf



On 28/06/2017 00:33, Wanpeng Li wrote:
> I have already added the same logic in kvm_inject_page_fault in patch
> 3/4, in addition, there is a guarantee it is in guest mode when we set
> svm->vmcb->control.xxxx in nested_svm_check_exception, how about just
> as what we do in nested_vmx_check_exception?
> 
> + if (svm->vcpu.arch.exception.async_page_fault)
> +     svm->vmcb->control.exit_info_2 = svm->vcpu.arch.apf.nested_apf_token;
> + else
> +     svm->vmcb->control.exit_info_2 = svm->vcpu.arch.cr2;

Yes, see my reply to [PATCH v5 3/4].

What do you think of moving "is_guest_mode(vcpu) &&" from this "if":

> 
>  void kvm_inject_page_fault(struct kvm_vcpu *vcpu, struct x86_exception *fault)
>  {
>  	++vcpu->stat.pf_guest;
> -	vcpu->arch.cr2 = fault->address;
> +	vcpu->arch.exception.async_page_fault = fault->async_page_fault;
> +	if (is_guest_mode(vcpu) && vcpu->arch.exception.async_page_fault)
> +		vcpu->arch.apf.nested_apf_token = fault->address;


to the previous assignment of vcpu->arch.exception.async_page_fault (so
that it can be renamed to nested_apf)?

Thanks,

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ