Skip to contentSkip to conversation

fastpath_t? __no_kcsan? Both?

PATCH Paul E. McKenney 2 participants 3 messages Jun 15, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello!

I get the following conflict when rebasing 39a8c47635b0 ("kvm/svm:
Disable KCSAN for svm_vcpu_run()") onto v5.8-rc1:

<<<<<<< 6c410247efb2d3907b508a2448ab9ab1c86d938c static fastpath_t svm_vcpu_run(struct kvm_vcpu *vcpu)
=======
static __no_kcsan void svm_vcpu_run(struct kvm_vcpu *vcpu)

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

kvm/svm: Disable KCSAN for svm_vcpu_run()

The "natural" resolution would be this:

static fastpath_t __no_kcsan void svm_vcpu_run(struct kvm_vcpu *vcpu)

But does that make sense?

I have dropped this commit for the time being. Please either let me know the proper resolution or submit a fresh patch, your choice.

Thanx, Paul

------------------------------------------------------------------------

commit 39a8c47635b00ebf9a3c52d9ca357fff5a8b36e3

Author: Qian Cai <[email protected]>
Date:   Wed Apr 15 11:37:09 2020 -0400

kvm/svm: Disable KCSAN for svm_vcpu_run()

For some reasons, running a simple qemu-kvm command with KCSAN will reset AMD hosts. It turns out svm_vcpu_run() could not be instrumented. This commit therefore disables it for now.

# /usr/libexec/qemu-kvm -name ubuntu-18.04-server-cloudimg -cpu host
-smp 2 -m 2G -hda ubuntu-18.04-server-cloudimg.qcow2

=== console output ===
Kernel 5.6.0-next-20200408+ on an x86_64

hp-dl385g10-05 login:

<...host reset...>

HPE ProLiant System BIOS A40 v1.20 (03/09/2018)
(C) Copyright 1982-2018 Hewlett Packard Enterprise Development LP Early system initialization, please wait...

arch/x86/kvm/svm/svm.c +1 -1
index 38f6aee..c6f89e4 100644
@@ -3280,7 +3280,7 @@ static void svm_cancel_injection(struct kvm_vcpu *vcpu)
 
 void __svm_vcpu_run(unsigned long vmcb_pa, unsigned long *regs);
 
-static void svm_vcpu_run(struct kvm_vcpu *vcpu)
+static __no_kcsan void svm_vcpu_run(struct kvm_vcpu *vcpu)
 {
 	struct vcpu_svm *svm = to_svm(vcpu);
 
maintainer
#1 lore raw
Quoted 8 lines · Paul E. McKenney

I get the following conflict when rebasing 39a8c47635b0 ("kvm/svm:
Disable KCSAN for svm_vcpu_run()") onto v5.8-rc1:

<<<<<<< 6c410247efb2d3907b508a2448ab9ab1c86d938c static fastpath_t svm_vcpu_run(struct kvm_vcpu *vcpu)
=======
static __no_kcsan void svm_vcpu_run(struct kvm_vcpu *vcpu)

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

kvm/svm: Disable KCSAN for svm_vcpu_run()

The "natural" resolution would be this:

static fastpath_t __no_kcsan void svm_vcpu_run(struct kvm_vcpu *vcpu)

But does that make sense?

fastpath_t is just an enum, so

static __no_kcsan fastpath_t svm_vcpu_run(struct kvm_vcpu *vcpu)

Now that KCSAN has been merged however I can do this change myself.

Thanks!

Paolo

#2 lore raw
Quoted 14 lines · Paolo Bonzini
Quoted 13 lines · Paul E. McKenney

I get the following conflict when rebasing 39a8c47635b0 ("kvm/svm:
Disable KCSAN for svm_vcpu_run()") onto v5.8-rc1:

<<<<<<< 6c410247efb2d3907b508a2448ab9ab1c86d938c static fastpath_t svm_vcpu_run(struct kvm_vcpu *vcpu)
=======
static __no_kcsan void svm_vcpu_run(struct kvm_vcpu *vcpu)

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

kvm/svm: Disable KCSAN for svm_vcpu_run()

The "natural" resolution would be this:

static fastpath_t __no_kcsan void svm_vcpu_run(struct kvm_vcpu *vcpu)

Quoted 7 lines
Quoted 1 line

But does that make sense?

fastpath_t is just an enum, so

static __no_kcsan fastpath_t svm_vcpu_run(struct kvm_vcpu *vcpu)

Now that KCSAN has been merged however I can do this change myself.

Very good, over to you, and thank you!

Thanx, Paul