Skip to contentSkip to conversation

KVM: HAVE_KVM_ARCH_DIRTY_LOG_PROTECT?

DISCUSSION Paul Bolle 4 participants 7 messages Jan 22, 2015 – Jan 23, 2015

Subsystems (2)
lore
Share & tools
lore

Paul Bolle

author
#0 lore raw

Mario,

Your commit ba0513b5b8ff ("KVM: Add generic support for dirty page logging") is included in today's linux-next (ie, next-20150122). I noticed because a script I use to check linux-next spotted a problem with it.

That commit added a Kconfig symbol HAVE_KVM_ARCH_DIRTY_LOG_PROTECT. But nothing in linux-next uses that symbol. Why was it added?

Thanks,

Paul Bolle

maintainer
#1 lore raw
Quoted 9 lines · Paul Bolle

Mario,

Your commit ba0513b5b8ff ("KVM: Add generic support for dirty page logging") is included in today's linux-next (ie, next-20150122). I noticed because a script I use to check linux-next spotted a problem with it.

That commit added a Kconfig symbol HAVE_KVM_ARCH_DIRTY_LOG_PROTECT. But nothing in linux-next uses that symbol. Why was it added?

That's a bug. I'll fix it when pulling from the kvm-arm tree.

Paolo

#2 lore raw
Quoted 10 lines · Paolo Bonzini
Quoted 7 lines · Paul Bolle

Mario,

Your commit ba0513b5b8ff ("KVM: Add generic support for dirty page logging") is included in today's linux-next (ie, next-20150122). I noticed because a script I use to check linux-next spotted a problem with it.

Quoted 7 lines
Quoted 2 lines

That commit added a Kconfig symbol HAVE_KVM_ARCH_DIRTY_LOG_PROTECT. But nothing in linux-next uses that symbol. Why was it added?

That's a bug. I'll fix it when pulling from the kvm-arm tree.

Paolo

Paolo,
thanks, left over from early iteration.

- Mario

maintainer
#3 lore raw
In reply to Paul Bolle
Quoted 7 lines · Paul Bolle

Your commit ba0513b5b8ff ("KVM: Add generic support for dirty page logging") is included in today's linux-next (ie, next-20150122). I noticed because a script I use to check linux-next spotted a problem with it.

That commit added a Kconfig symbol HAVE_KVM_ARCH_DIRTY_LOG_PROTECT. But nothing in linux-next uses that symbol. Why was it added?

Ah, there are two Kconfig symbols added by mistake.

+config HAVE_KVM_ARCH_DIRTY_LOG_PROTECT
+ bool
+
+config KVM_GENERIC_DIRTYLOG_READ_PROTECT
+ bool

Christoffer, can you fix that in kvm-arm and also the other mistake that Paul reported?

Paolo

author
#4 lore raw
Quoted 11 lines · Paolo Bonzini
Quoted 7 lines · Paul Bolle

Your commit ba0513b5b8ff ("KVM: Add generic support for dirty page logging") is included in today's linux-next (ie, next-20150122). I noticed because a script I use to check linux-next spotted a problem with it.

That commit added a Kconfig symbol HAVE_KVM_ARCH_DIRTY_LOG_PROTECT. But nothing in linux-next uses that symbol. Why was it added?

Ah, there are two Kconfig symbols added by mistake.

Review

Quoted 5 lines
(quoted diff) +5 -0
+config HAVE_KVM_ARCH_DIRTY_LOG_PROTECT
+ bool
+
+config KVM_GENERIC_DIRTYLOG_READ_PROTECT
+ bool

This one is actually used (so my 800 line perl monster didn't bark):

    $ git grep -n KVM_GENERIC_DIRTYLOG_READ_PROTECT next-20150122
    next-20150122:arch/arm/kvm/Kconfig:27:  select KVM_GENERIC_DIRTYLOG_READ_PROTECT
    next-20150122:arch/arm64/kvm/Kconfig:30:        select KVM_GENERIC_DIRTYLOG_READ_PROTECT
    next-20150122:arch/x86/kvm/Kconfig:42:  select KVM_GENERIC_DIRTYLOG_READ_PROTECT
    next-20150122:virt/kvm/Kconfig:47:config KVM_GENERIC_DIRTYLOG_READ_PROTECT
    next-20150122:virt/kvm/kvm_main.c:998:#ifdef CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT
Quoted 2 lines

Christoffer, can you fix that in kvm-arm and also the other mistake that Paul reported?

Thanks,

Paul Bolle

maintainer
#5 lore raw
Quoted 8 lines · Paul Bolle
Quoted 7 lines

Review

Quoted 7 lines

Ah, there are two Kconfig symbols added by mistake.

(quoted diff) +5 -0
+config HAVE_KVM_ARCH_DIRTY_LOG_PROTECT
+ bool
+
+config KVM_GENERIC_DIRTYLOG_READ_PROTECT
+ bool

This one is actually used (so my 800 line perl monster didn't bark):

Quoted 7 lines
    $ git grep -n KVM_GENERIC_DIRTYLOG_READ_PROTECT next-20150122
    next-20150122:arch/arm/kvm/Kconfig:27:  select KVM_GENERIC_DIRTYLOG_READ_PROTECT
    next-20150122:arch/arm64/kvm/Kconfig:30:        select KVM_GENERIC_DIRTYLOG_READ_PROTECT
    next-20150122:arch/x86/kvm/Kconfig:42:  select KVM_GENERIC_DIRTYLOG_READ_PROTECT
    next-20150122:virt/kvm/Kconfig:47:config KVM_GENERIC_DIRTYLOG_READ_PROTECT
    next-20150122:virt/kvm/kvm_main.c:998:#ifdef CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT

Yes, the mistake is adding two symbols instead of one. :)

Paolo

#6 lore raw
Quoted 19 lines · Paolo Bonzini
Quoted 8 lines · Paul Bolle
Quoted 7 lines

Review

Quoted 7 lines

Ah, there are two Kconfig symbols added by mistake.

(quoted diff) +5 -0
+config HAVE_KVM_ARCH_DIRTY_LOG_PROTECT
+ bool
+
+config KVM_GENERIC_DIRTYLOG_READ_PROTECT
+ bool

This one is actually used (so my 800 line perl monster didn't bark):

Quoted 7 lines
    $ git grep -n KVM_GENERIC_DIRTYLOG_READ_PROTECT next-20150122
    next-20150122:arch/arm/kvm/Kconfig:27:  select KVM_GENERIC_DIRTYLOG_READ_PROTECT
    next-20150122:arch/arm64/kvm/Kconfig:30:        select KVM_GENERIC_DIRTYLOG_READ_PROTECT
    next-20150122:arch/x86/kvm/Kconfig:42:  select KVM_GENERIC_DIRTYLOG_READ_PROTECT
    next-20150122:virt/kvm/Kconfig:47:config KVM_GENERIC_DIRTYLOG_READ_PROTECT
    next-20150122:virt/kvm/kvm_main.c:998:#ifdef CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT
Quoted 2 lines

Yes, the mistake is adding two symbols instead of one. :)

Yes, I'm fixing it up with this patch:

arch/arm/kvm/mmu.c +2 -2
index eb94597..74aeaba 100644
@@ -1042,8 +1042,8 @@ static void stage2_wp_range(struct kvm *kvm, phys_addr_t addr, phys_addr_t end)
 		/*
 		 * Release kvm_mmu_lock periodically if the memory region is
 		 * large. Otherwise, we may see kernel panics with
-		 * CONFIG_DETECT_HUNG_TASK, CONFIG_LOCK_DETECTOR,
-		 * CONFIG_LOCK_DEP. Additionally, holding the lock too long
+		 * CONFIG_DETECT_HUNG_TASK, CONFIG_LOCKUP_DETECTOR,
+		 * CONFIG_LOCKDEP. Additionally, holding the lock too long
 		 * will also starve other vCPUs.
 		 */
 		if (need_resched() || spin_needbreak(&kvm->mmu_lock))
virt/kvm/Kconfig +0 -3
index 314950c..50d1106 100644
@@ -41,8 +41,5 @@ config KVM_VFIO
 config HAVE_KVM_ARCH_TLB_FLUSH_ALL
        bool
 
-config HAVE_KVM_ARCH_DIRTY_LOG_PROTECT
-       bool
-
 config KVM_GENERIC_DIRTYLOG_READ_PROTECT
        bool

Thanks,
-Christoffer