From patchwork Wed Apr 18 19:19:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souptick Joarder X-Patchwork-Id: 10348823 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C0D2260244 for ; Wed, 18 Apr 2018 19:18:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE04D28825 for ; Wed, 18 Apr 2018 19:18:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A27B728827; Wed, 18 Apr 2018 19:18:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3644B28825 for ; Wed, 18 Apr 2018 19:18:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From :Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=LDhFvwcSoIvQ7bRBDekb4zFUrRC37r8ef+gJwmo7hLw=; b=GQ/pdbYLxaqhVh XzbRa/XwaKVLhyL1H0TgMYFJZMLVZqxGOVcakhvlqWxsoEcd9+CXtBgPvhon+N0q4AWEsdKz1tDdJ 9s1UPXLrh7g3uLA01SlzdeQF0oQ0CaaetXhgHQK0qT2K5wwhWb9ENfYdkrgJQl3YbsyR2/X5hxakJ ZtiP6tArG1WUTAcnJ0DECIbef+dUVKmQNHt1FPPSKJQau9KINpL/5h9LUPHosyac7RDem6WeemDt2 wH0aTTYccbMld86n86nEb7YugxVPiPVLQgm6o1+knQj2C1Ts52XywVJNmyf/KMs0MvkBgO+kkyuY/ Qvld0xzLQumgvrjD7udg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f8sb0-000140-BV; Wed, 18 Apr 2018 19:18:22 +0000 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f8sau-00011f-94 for linux-arm-kernel@lists.infradead.org; Wed, 18 Apr 2018 19:18:17 +0000 Received: by mail-pg0-x242.google.com with SMTP id b5so1310876pgv.5 for ; Wed, 18 Apr 2018 12:18:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=qPtHleo46erNMBaBUgS9OFeBPEQXjyhU5n1oXAAF5ts=; b=ZpEBJfzF1idN+Yin1ff8cicuuq/APHUPCpm/da3gtl5huoLm7WnvJlGOamNNZwroqG 4VuUO6TdYwc7mK+TzzYw+h2efZ5Ce3QtdSYnqKRkQbg4VPndpj7KMFwGjIhdUGH/doaZ karjepdNWzIvw146Vt9UIW39h8ASQLhGPRW2Kw3NtYW8hilpb1pOEsrAN5U3fDOcWgeJ hon947d64JeMhh2BNr940N+vLY5+Nl5jtUEr+SP107pmfaqLiUCbgfB357yo+YNgHjAM OLEJWBU1EgOgeQZxpayhYVTAvBzcm9aJ/BqlU30cMMQC10I8DNTJYFYDEdoEzEc+bJzJ NNTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=qPtHleo46erNMBaBUgS9OFeBPEQXjyhU5n1oXAAF5ts=; b=PBM0jtbuAO11RHtR53c+DFNNCGMpZpa1FYsa8D2a1gGye6jjQyCNdsWRKDsfLlNF+a FzW9B1QVcIKzmq4XVcVDKnOdGvBO3A/EomPoVjbmUnv35b0QM2ZTd3X4JzNkgUahf2dm 1U2gq/vvid5PkdKXellucyvnjyCnDyRcN3z5hLF1I6W9PT8bZS7fTup3B+ErpIaI3o7n p5Nrt5bYKBAdvWCHzF0f1P1kl8n5TErAWM4xSVd0RT5/+3KZqN0geAk2vwEChW3K1uW3 MlZB5E2728SUNfKG1xE93Ow2HVKB6GCcuXuGEOy04O57CuJwpfQQSEa5e/ImrW9RGMXv nZyw== X-Gm-Message-State: ALQs6tBGCod+owpFMUwS+vvLnVchA05X7KTJX6UwXfV6JkuODQDYlIGW K9lZLCBrwpPlUG88WlnUnx8= X-Google-Smtp-Source: AIpwx48dX2ZRzHspdQAU2kuOSg1uldhsK0KzPFdqDl3zBQ/GavQwU8frhi+DKsv62gIIrwEgNbZc6A== X-Received: by 10.99.175.68 with SMTP id s4mr2605197pgo.295.1524079084750; Wed, 18 Apr 2018 12:18:04 -0700 (PDT) Received: from jordon-HP-15-Notebook-PC ([183.82.19.82]) by smtp.gmail.com with ESMTPSA id y6sm2998256pgr.44.2018.04.18.12.18.02 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Apr 2018 12:18:03 -0700 (PDT) Date: Thu, 19 Apr 2018 00:49:58 +0530 From: Souptick Joarder To: jhogan@kernel.org, ralf@linux-mips.org, paulus@ozlabs.org, benh@kernel.crashing.org, mpe@ellerman.id.au, borntraeger@de.ibm.com, frankja@linux.vnet.ibm.com, david@redhat.com, cohuck@redhat.com, schwidefsky@de.ibm.com, pbonzini@redhat.com, tglx@linutronix.de, mingo@redhat.com, christoffer.dall@linaro.org, marc.zyngier@arm.com Subject: [PATCH] kvm: Change return type to vm_fault_t Message-ID: <20180418191958.GA25806@jordon-HP-15-Notebook-PC> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180418_121816_371425_91653E71 X-CRM114-Status: GOOD ( 11.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-mips@linux-mips.org, kvm@vger.kernel.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org, willy@infradead.org, linuxppc-dev@lists.ozlabs.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use new return type vm_fault_t for fault handler. For now, this is just documenting that the function returns a VM_FAULT value rather than an errno. Once all instances are converted, vm_fault_t will become a distinct type. commit 1c8f422059ae ("mm: change return type to vm_fault_t") Signed-off-by: Souptick Joarder Reviewed-by: Matthew Wilcox Reviewed-by: Cornelia Huck --- arch/mips/kvm/mips.c | 2 +- arch/powerpc/kvm/powerpc.c | 2 +- arch/s390/kvm/kvm-s390.c | 2 +- arch/x86/kvm/x86.c | 2 +- include/linux/kvm_host.h | 2 +- virt/kvm/arm/arm.c | 2 +- virt/kvm/kvm_main.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) -- 1.9.1 diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c index 2549fdd..03e0e0f 100644 --- a/arch/mips/kvm/mips.c +++ b/arch/mips/kvm/mips.c @@ -1076,7 +1076,7 @@ int kvm_arch_vcpu_ioctl_set_fpu(struct kvm_vcpu *vcpu, struct kvm_fpu *fpu) return -ENOIOCTLCMD; } -int kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf) +vm_fault_t kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf) { return VM_FAULT_SIGBUS; } diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 403e642..3099dee 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -1825,7 +1825,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp, return r; } -int kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf) +vm_fault_t kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf) { return VM_FAULT_SIGBUS; } diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index ba4c709..24af487 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -3941,7 +3941,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp, return r; } -int kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf) +vm_fault_t kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf) { #ifdef CONFIG_KVM_S390_UCONTROL if ((vmf->pgoff == KVM_S390_SIE_PAGE_OFFSET) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index c8a0b54..95d8102 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -3827,7 +3827,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp, return r; } -int kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf) +vm_fault_t kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf) { return VM_FAULT_SIGBUS; } diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index ac0062b..8eeb062 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -736,7 +736,7 @@ long kvm_arch_dev_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg); long kvm_arch_vcpu_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg); -int kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf); +vm_fault_t kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf); int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext); diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c index 86941f6..6c8cc31 100644 --- a/virt/kvm/arm/arm.c +++ b/virt/kvm/arm/arm.c @@ -163,7 +163,7 @@ int kvm_arch_create_vcpu_debugfs(struct kvm_vcpu *vcpu) return 0; } -int kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf) +vm_fault_t kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf) { return VM_FAULT_SIGBUS; } diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 4501e65..45eb54b 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -2341,7 +2341,7 @@ void kvm_vcpu_on_spin(struct kvm_vcpu *me, bool yield_to_kernel_mode) } EXPORT_SYMBOL_GPL(kvm_vcpu_on_spin); -static int kvm_vcpu_fault(struct vm_fault *vmf) +static vm_fault_t kvm_vcpu_fault(struct vm_fault *vmf) { struct kvm_vcpu *vcpu = vmf->vma->vm_file->private_data; struct page *page;