kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/kvm: Remove unused virt to phys translation in kvm_guest_cpu_init()
@ 2022-10-21  2:01 Rafael Mendonca
  2022-10-21 11:32 ` Vitaly Kuznetsov
  2022-10-22  9:13 ` Paolo Bonzini
  0 siblings, 2 replies; 3+ messages in thread
From: Rafael Mendonca @ 2022-10-21  2:01 UTC (permalink / raw)
  To: Paolo Bonzini, Wanpeng Li, Vitaly Kuznetsov, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin
  Cc: Rafael Mendonca, kvm, linux-kernel

Presumably, this was introduced due to a conflict resolution with
commit ef68017eb570 ("x86/kvm: Handle async page faults directly through
do_page_fault()"), given that the last posted version [1] of the blamed
commit was not based on the aforementioned commit.

[1] https://lore.kernel.org/kvm/20200525144125.143875-9-vkuznets@redhat.com/

Fixes: b1d405751cd5 ("KVM: x86: Switch KVM guest to using interrupts for page ready APF delivery")
Signed-off-by: Rafael Mendonca <rafaelmendsr@gmail.com>
---
 arch/x86/kernel/kvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index d4e48b4a438b..cf886f86038a 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -349,7 +349,7 @@ static notrace void kvm_guest_apic_eoi_write(u32 reg, u32 val)
 static void kvm_guest_cpu_init(void)
 {
 	if (kvm_para_has_feature(KVM_FEATURE_ASYNC_PF_INT) && kvmapf) {
-		u64 pa = slow_virt_to_phys(this_cpu_ptr(&apf_reason));
+		u64 pa;
 
 		WARN_ON_ONCE(!static_branch_likely(&kvm_async_pf_enabled));
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86/kvm: Remove unused virt to phys translation in kvm_guest_cpu_init()
  2022-10-21  2:01 [PATCH] x86/kvm: Remove unused virt to phys translation in kvm_guest_cpu_init() Rafael Mendonca
@ 2022-10-21 11:32 ` Vitaly Kuznetsov
  2022-10-22  9:13 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Vitaly Kuznetsov @ 2022-10-21 11:32 UTC (permalink / raw)
  To: Rafael Mendonca, Paolo Bonzini, Sean Christopherson
  Cc: kvm, linux-kernel, Wanpeng Li, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
	Andy Lutomirski

Rafael Mendonca <rafaelmendsr@gmail.com> writes:

> Presumably, this was introduced due to a conflict resolution with
> commit ef68017eb570 ("x86/kvm: Handle async page faults directly through
> do_page_fault()"), given that the last posted version [1] of the blamed
> commit was not based on the aforementioned commit.
>
> [1] https://lore.kernel.org/kvm/20200525144125.143875-9-vkuznets@redhat.com/
>
> Fixes: b1d405751cd5 ("KVM: x86: Switch KVM guest to using interrupts for page ready APF delivery")

Indeed, this looks like a mid-air collision happened upon commit/merge.

> Signed-off-by: Rafael Mendonca <rafaelmendsr@gmail.com>
> ---
>  arch/x86/kernel/kvm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
> index d4e48b4a438b..cf886f86038a 100644
> --- a/arch/x86/kernel/kvm.c
> +++ b/arch/x86/kernel/kvm.c
> @@ -349,7 +349,7 @@ static notrace void kvm_guest_apic_eoi_write(u32 reg, u32 val)
>  static void kvm_guest_cpu_init(void)
>  {
>  	if (kvm_para_has_feature(KVM_FEATURE_ASYNC_PF_INT) && kvmapf) {
> -		u64 pa = slow_virt_to_phys(this_cpu_ptr(&apf_reason));
> +		u64 pa;
>  
>  		WARN_ON_ONCE(!static_branch_likely(&kvm_async_pf_enabled));

Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>

-- 
Vitaly


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86/kvm: Remove unused virt to phys translation in kvm_guest_cpu_init()
  2022-10-21  2:01 [PATCH] x86/kvm: Remove unused virt to phys translation in kvm_guest_cpu_init() Rafael Mendonca
  2022-10-21 11:32 ` Vitaly Kuznetsov
@ 2022-10-22  9:13 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2022-10-22  9:13 UTC (permalink / raw)
  To: Rafael Mendonca
  Cc: Wanpeng Li, Vitaly Kuznetsov, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, H . Peter Anvin, kvm,
	linux-kernel

Queued, thanks.

Paolo



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-22 10:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-21  2:01 [PATCH] x86/kvm: Remove unused virt to phys translation in kvm_guest_cpu_init() Rafael Mendonca
2022-10-21 11:32 ` Vitaly Kuznetsov
2022-10-22  9:13 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).