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: <20170613181924.GA1276@potion>
Date:   Tue, 13 Jun 2017 20:19:24 +0200
From:   Radim Krčmář <rkrcmar@...hat.com>
To:     Wanpeng Li <kernellwp@...il.com>
Cc:     linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
        Paolo Bonzini <pbonzini@...hat.com>,
        Wanpeng Li <wanpeng.li@...mail.com>
Subject: Re: [PATCH 4/4] KVM: async_pf: Let host know whether the guest
 support delivery async_pf as #PF vmexit

2017-06-12 23:08-0700, Wanpeng Li:
> From: Wanpeng Li <wanpeng.li@...mail.com>
> 
> Adds another flag bit (bit 2) to MSR_KVM_ASYNC_PF_EN. If bit 2 is 1, async 
> page faults are delivered to L1 as #PF vmexits; if bit 2 is 0, kvm_can_do_async_pf 
> returns 0 if in guest mode.
> 
> Cc: Paolo Bonzini <pbonzini@...hat.com>
> Cc: Radim Krčmář <rkrcmar@...hat.com>
> Signed-off-by: Wanpeng Li <wanpeng.li@...mail.com>
> ---

I think KVM (L1) should also do something like

  diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
  index dd274db9bf77..c15a9f178e60 100644
  --- a/arch/x86/kvm/vmx.c
  +++ b/arch/x86/kvm/vmx.c
  @@ -7991,7 +7991,7 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)
   		if (is_nmi(intr_info))
   			return false;
   		else if (is_page_fault(intr_info))
  -			return enable_ept;
  +			return !vmx->apf_reason && enable_ept;
   		else if (is_no_device(intr_info) &&
   			 !(vmcs12->guest_cr0 & X86_CR0_TS))
   			return false;

so it doesn't pass the APF directed towards it (L1) into L2 if there is
L3 at the moment.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ