summaryrefslogtreecommitdiffstats
path: root/arch/ia64/kvm
diff options
context:
space:
mode:
authorWei Yongjun <yjwei@cn.fujitsu.com>2010-03-12 10:11:15 +0800
committerAvi Kivity <avi@redhat.com>2010-05-17 12:15:33 +0300
commit600f1ec3761671307935a583c46f17fff0fa9b72 (patch)
tree7a723ff9233098b9636aac57dbdf44176bc81ba9 /arch/ia64/kvm
parent160d2f6c0c90713aa3bb93dd344fe0d527342e26 (diff)
downloadop-kernel-dev-600f1ec3761671307935a583c46f17fff0fa9b72.zip
op-kernel-dev-600f1ec3761671307935a583c46f17fff0fa9b72.tar.gz
KVM: ia64: fix the error of ioctl KVM_IRQ_LINE if no irq chip
If no irq chip in kernel, ioctl KVM_IRQ_LINE will return -EFAULT. But I see in other place such as KVM_[GET|SET]IRQCHIP, -ENXIO is return. So this patch used -ENXIO instead of -EFAULT. Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/ia64/kvm')
-rw-r--r--arch/ia64/kvm/kvm-ia64.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
index 38d5130..d7bac1f 100644
--- a/arch/ia64/kvm/kvm-ia64.c
+++ b/arch/ia64/kvm/kvm-ia64.c
@@ -979,11 +979,13 @@ long kvm_arch_vm_ioctl(struct file *filp,
r = -EFAULT;
if (copy_from_user(&irq_event, argp, sizeof irq_event))
goto out;
+ r = -ENXIO;
if (irqchip_in_kernel(kvm)) {
__s32 status;
status = kvm_set_irq(kvm, KVM_USERSPACE_IRQ_SOURCE_ID,
irq_event.irq, irq_event.level);
if (ioctl == KVM_IRQ_LINE_STATUS) {
+ r = -EFAULT;
irq_event.status = status;
if (copy_to_user(argp, &irq_event,
sizeof irq_event))
OpenPOWER on IntegriCloud