Re: [PATCH 1/5] kvm tools: check ioctl return value for msi signal

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

 



On Wed, 24 Oct 2012, William Dauchy wrote:
> Signed-off-by: William Dauchy <william@xxxxxxxxx>
> ---
>  tools/kvm/virtio/pci.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/kvm/virtio/pci.c b/tools/kvm/virtio/pci.c
> index b6ac571..ab1119a 100644
> --- a/tools/kvm/virtio/pci.c
> +++ b/tools/kvm/virtio/pci.c
> @@ -245,7 +245,9 @@ static void virtio_pci__signal_msi(struct kvm *kvm, struct virtio_pci *vpci, int
>  		.data = vpci->msix_table[vec].msg.data,
>  	};
>  
> -	ioctl(kvm->vm_fd, KVM_SIGNAL_MSI, &msi);
> +	if (ioctl(kvm->vm_fd, KVM_SIGNAL_MSI, &msi) < 0) {
> +		pr_warning("Config pci device error: %s", strerror(errno));
> +	}
>  }

Is this something that happens on your machine? I wonder if it makes more 
sense to return the error from virtio_pci__signal_vq() and 
virtio_pci__signal_config() and make the callers deal with it.

			Pekka
--
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