Re: [PATCH V2 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

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

 



On Tue, 25 Aug 2015 15:47:14 +0800
Jason Wang <jasowang@xxxxxxxxxx> wrote:

> diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
> index 9ff4193..95f2901 100644
> --- a/virt/kvm/eventfd.c
> +++ b/virt/kvm/eventfd.c
> @@ -762,13 +762,15 @@ ioeventfd_check_collision(struct kvm *kvm, struct _ioeventfd *p)
>  	return false;
>  }
> 
> -static enum kvm_bus ioeventfd_bus_from_flags(__u32 flags)
> +static enum kvm_bus ioeventfd_bus_from_flags(struct kvm_ioeventfd *args)

ioeventfd_bus_from_args()? But _from_flags() is not wrong either :)

>  {
> -	if (flags & KVM_IOEVENTFD_FLAG_PIO)
> +	if (args->flags & KVM_IOEVENTFD_FLAG_PIO)
>  		return KVM_PIO_BUS;
> -	if (flags & KVM_IOEVENTFD_FLAG_VIRTIO_CCW_NOTIFY)
> +	if (args->flags & KVM_IOEVENTFD_FLAG_VIRTIO_CCW_NOTIFY)
>  		return KVM_VIRTIO_CCW_NOTIFY_BUS;
> -	return KVM_MMIO_BUS;
> +	if (args->len)
> +		return KVM_MMIO_BUS;
> +	return KVM_FAST_MMIO_BUS;

Hm...

/* When length is ignored, MMIO is put on a separate bus, for
 * faster lookups.
 */
return args->len ? KVM_MMIO_BUS : KVM_FAST_MMIO_BUS;

>  }
> 
>  static int

This version of the patch looks nice and compact. Regardless whether
you want to follow my (minor) style suggestions, consider this patch

Acked-by: Cornelia Huck <cornelia.huck@xxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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