From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/4] KVM: Fix wrong usage of _IOR in assigned device interface Date: Wed, 18 Feb 2009 14:44:15 +0000 Message-ID: <499C1EBF.60200@redhat.com> References: <1234967203-6031-1-git-send-email-sheng@linux.intel.com> <1234967203-6031-2-git-send-email-sheng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Sheng Yang Return-path: Received: from mx2.redhat.com ([66.187.237.31]:54200 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752125AbZBROnr (ORCPT ); Wed, 18 Feb 2009 09:43:47 -0500 In-Reply-To: <1234967203-6031-2-git-send-email-sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Sheng Yang wrote: > _IOR for copy_to_user and _IOW for copy_from_user... > > Noticed by Avi. > > Signed-off-by: Sheng Yang > --- > include/linux/kvm.h | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/linux/kvm.h b/include/linux/kvm.h > index 2163b3d..d742cbf 100644 > --- a/include/linux/kvm.h > +++ b/include/linux/kvm.h > @@ -469,10 +469,10 @@ struct kvm_irq_routing { > _IOW(KVMIO, 0x67, struct kvm_coalesced_mmio_zone) > #define KVM_UNREGISTER_COALESCED_MMIO \ > _IOW(KVMIO, 0x68, struct kvm_coalesced_mmio_zone) > -#define KVM_ASSIGN_PCI_DEVICE _IOR(KVMIO, 0x69, \ > +#define KVM_ASSIGN_PCI_DEVICE _IOW(KVMIO, 0x69, \ > struct kvm_assigned_pci_dev) > #define KVM_SET_GSI_ROUTING _IOW(KVMIO, 0x6a, struct kvm_irq_routing) > -#define KVM_ASSIGN_IRQ _IOR(KVMIO, 0x70, \ > +#define KVM_ASSIGN_IRQ _IOW(KVMIO, 0x70, \ > struct kvm_assigned_irq) > #define KVM_REINJECT_CONTROL _IO(KVMIO, 0x71) > > KVM_ASSIGN_PCI_DEVICE was introduced in 2.6.28. We can't fix it since it's part of the ABI. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.