From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Mackerras Subject: [PATCH 5/8] KVM: PPC: Book3S HV: Return ENODEV error rather than EIO Date: Tue, 25 Mar 2014 10:47:05 +1100 Message-ID: <1395704828-20180-6-git-send-email-paulus@samba.org> References: <1395704828-20180-1-git-send-email-paulus@samba.org> Cc: Alexander Graf , Paul Mackerras To: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Return-path: Received: from ozlabs.org ([203.10.76.45]:33687 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751132AbaCXXrm (ORCPT ); Mon, 24 Mar 2014 19:47:42 -0400 In-Reply-To: <1395704828-20180-1-git-send-email-paulus@samba.org> Sender: kvm-owner@vger.kernel.org List-ID: If an attempt is made to load the kvm-hv module on a machine which doesn't have hypervisor mode available, return an ENODEV error, which is the conventional thing to return to indicate that this module is not applicable to the hardware of the current machine, rather than EIO, which causes a warning to be printed. Signed-off-by: Paul Mackerras (cherry picked from commit a41cf3b2d791478f239c434917dffe9d1fe362c3) --- arch/powerpc/kvm/book3s_hv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index a6d8f01..8227dba 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -2467,7 +2467,7 @@ static int kvmppc_book3s_init_hv(void) */ r = kvmppc_core_check_processor_compat_hv(); if (r < 0) - return r; + return -ENODEV; kvm_ops_hv.owner = THIS_MODULE; kvmppc_hv_ops = &kvm_ops_hv; -- 1.9.rc1 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Mackerras Date: Mon, 24 Mar 2014 23:47:05 +0000 Subject: [PATCH 5/8] KVM: PPC: Book3S HV: Return ENODEV error rather than EIO Message-Id: <1395704828-20180-6-git-send-email-paulus@samba.org> List-Id: References: <1395704828-20180-1-git-send-email-paulus@samba.org> In-Reply-To: <1395704828-20180-1-git-send-email-paulus@samba.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Cc: Alexander Graf , Paul Mackerras If an attempt is made to load the kvm-hv module on a machine which doesn't have hypervisor mode available, return an ENODEV error, which is the conventional thing to return to indicate that this module is not applicable to the hardware of the current machine, rather than EIO, which causes a warning to be printed. Signed-off-by: Paul Mackerras (cherry picked from commit a41cf3b2d791478f239c434917dffe9d1fe362c3) --- arch/powerpc/kvm/book3s_hv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index a6d8f01..8227dba 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -2467,7 +2467,7 @@ static int kvmppc_book3s_init_hv(void) */ r = kvmppc_core_check_processor_compat_hv(); if (r < 0) - return r; + return -ENODEV; kvm_ops_hv.owner = THIS_MODULE; kvmppc_hv_ops = &kvm_ops_hv; -- 1.9.rc1