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, 23 May 2024 10:37:51 +1200
From: "Huang, Kai" <kai.huang@...el.com>
To: Sean Christopherson <seanjc@...gle.com>, Paolo Bonzini
	<pbonzini@...hat.com>
CC: <kvm@...r.kernel.org>, <linux-kernel@...r.kernel.org>, Chao Gao
	<chao.gao@...el.com>
Subject: Re: [PATCH v2 6/6] KVM: x86: Register "emergency disable" callbacks
 when virt is enabled



On 22/05/2024 2:28 pm, Sean Christopherson wrote:
> Register the "disable virtualization in an emergency" callback just
> before KVM enables virtualization in hardware, as there is no functional
> need to keep the callbacks registered while KVM happens to be loaded, but
> is inactive, i.e. if KVM hasn't enabled virtualization.
> 
> Note, unregistering the callback every time the last VM is destroyed could
> have measurable latency due to the synchronize_rcu() needed to ensure all
> references to the callback are dropped before KVM is unloaded.  But the
> latency should be a small fraction of the total latency of disabling
> virtualization across all CPUs, and userspace can set enable_virt_at_load
> to completely eliminate the runtime overhead.
> 
> Add a pointer in kvm_x86_ops to allow vendor code to provide its callback.
> There is no reason to force vendor code to do the registration, and either
> way KVM would need a new kvm_x86_ops hook.
> 
> Suggested-by: Kai Huang <kai.huang@...el.com>
> Signed-off-by: Sean Christopherson <seanjc@...gle.com>
> ---

Reviewed-by: Kai Huang <kai.huang@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ