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

2012-10-25 Thread Sasha Levin
On Thu, Oct 25, 2012 at 5:15 AM, William Dauchy  wrote:
> On Oct25 10:01, Pekka Enberg wrote:
>> 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.
>
> no but I thought it was worth not keeping a system call unchecked;
> particularly when you are debugging something (ballooning in my case),
> just wanted to make sure the call was indeed ok.

I wonder if we should revert to using good old IRQ injection in case
this one fails.


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


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

2012-10-25 Thread William Dauchy
On Oct25 10:01, Pekka Enberg wrote:
> 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.

no but I thought it was worth not keeping a system call unchecked;
particularly when you are debugging something (ballooning in my case),
just wanted to make sure the call was indeed ok.
-- 
William


signature.asc
Description: Digital signature


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

2012-10-25 Thread Pekka Enberg
On Wed, 24 Oct 2012, William Dauchy wrote:
> Signed-off-by: William Dauchy 
> ---
>  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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html