Re: [PATCH 15/24] kvm: mmu: Wrap mmu_lock cond_resched and needbreak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27/01/21 21:08, Ben Gardon wrote:
I'm not entirely sure I understand this suggestion. Are you suggesting
we'd have the spinlock and rwlock in a union in struct kvm but then
use a static define to choose which one is used by other functions? It
seems like if we're using static defines the union doesn't add value.

Of course you're right. You'd just place the #ifdef in the struct kvm definition.

You can place static inline functions for lock/unlock in virt/kvm/mmu_lock.h, in order to avoid a proliferation of #ifdefs.

Paolo




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux