From patchwork Wed Feb 28 02:31:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Guo X-Patchwork-Id: 878906 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zrfmv49ZVz9s3Y for ; Wed, 28 Feb 2018 13:35:27 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="u8Wzbsge"; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3zrfmv0sjnzF0mR for ; Wed, 28 Feb 2018 13:35:27 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="u8Wzbsge"; dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:400e:c05::242; helo=mail-pg0-x242.google.com; envelope-from=wei.guo.simon@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="u8Wzbsge"; dkim-atps=neutral Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zrfhv5kwHzF1Jy for ; Wed, 28 Feb 2018 13:31:58 +1100 (AEDT) Received: by mail-pg0-x242.google.com with SMTP id q27so395188pgn.8 for ; Tue, 27 Feb 2018 18:31:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=jDE8pTQJYsrUdQq7HROFA8qzn0moT581Sssze1gd7ng=; b=u8WzbsgeiZaXKTTJD/UDDJNKr4GYmoxrY+HvftK+39yuKpdWJ3srRqFw92ASZl/lp0 L1EclgGkZ1JJLvcsd+3r1Kr+7krcAUWplE+x16raz5WWawlTuYP0DF4HDi3kvu/Ej4n1 rHaPrecqLTayBzmR5UCkDyusKvwX/sI26YxOejtzMOaXLeLI2uZ84dLk0+3VBeFrsJXO nSXhe0/YDBBwAv51XuniTIb/t+wh7Ph4noFOuOgWkc3N9+FXIj2I5XeaHHZvP2cprOGi /hbbMfBtCwkW24s/+VhgtmloIYwCriPsgfxNycSs0+2kpCrgNoorSyVvdfj14aWc9/41 WKsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=jDE8pTQJYsrUdQq7HROFA8qzn0moT581Sssze1gd7ng=; b=ITlfgE+qVMiaHcQEL6rxHTkqmVyWSkr0MqS37dlEyf8I+qwr3J3+p3yHng2ApXTRLy p8tqd8QYYrRRQPxFl+O/0FfsUN2PTJDF7vBDFI4pB6TOO5pwRV0cgxhY81B6RHXAm34H 40dgOsXRPXEPkpQGEPvn6B9EIZq1BY4GWalRdlQ+s4UDlmkK383xF/Jtg7CltubaQeqs LDHvngcrX+rgcuS+Txsql0MDTArthnogek/YbiAIF5vI3VKPdHSVNuSZkYUcmKYZ6eKI xEv+GYJpFr8/A6e4VDCfZmqkgzKgqopiDYgfuGS6sy3zhlEIKYw9URFmsdCvTBvpB/zO yuDg== X-Gm-Message-State: APf1xPAuhuTsbxWSXL97uKqEN1+2/dpx1JVpfGGumqb/5hY3BLku+zNS 8yq7xT2XFZiim+11DTbDKvI= X-Google-Smtp-Source: AH8x226iFus/miQUgX+4R4SHgqs2O8wUqrc7sWPuBdTgvjKKuBauGggKbbxzS0JX/N44iPihnUX8UQ== X-Received: by 10.98.210.70 with SMTP id c67mr16032822pfg.164.1519785116882; Tue, 27 Feb 2018 18:31:56 -0800 (PST) Received: from simonLocalRHEL7.cn.ibm.com ([112.73.0.86]) by smtp.gmail.com with ESMTPSA id i1sm714154pfi.116.2018.02.27.18.31.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Feb 2018 18:31:56 -0800 (PST) From: wei.guo.simon@gmail.com To: kvm@vger.kernel.org Subject: [PATCH] KVM: surround kvm_arch_vcpu_async_ioctl() with #ifdef Date: Wed, 28 Feb 2018 10:31:39 +0800 Message-Id: <1519785099-13808-1-git-send-email-wei.guo.simon@gmail.com> X-Mailer: git-send-email 1.8.3.1 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-s390@vger.kernel.org, Paolo Bonzini , linuxppc-dev@lists.ozlabs.org, Simon Guo , linux-mips@linux-mips.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" From: Simon Guo Although CONFIG_HAVE_KVM_VCPU_ASYNC_IOCTL is usually on, logically kvm_arch_vcpu_async_ioctl() definition should be wrapped with CONFIG_HAVE_KVM_VCPU_ASYNC_IOCTL #ifdef. This patch adds the #ifdef surround. Signed-off-by: Simon Guo --- arch/mips/kvm/mips.c | 2 ++ arch/powerpc/kvm/powerpc.c | 2 ++ arch/s390/kvm/kvm-s390.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c index 2549fdd..4d593e5 100644 --- a/arch/mips/kvm/mips.c +++ b/arch/mips/kvm/mips.c @@ -903,6 +903,7 @@ static int kvm_vcpu_ioctl_enable_cap(struct kvm_vcpu *vcpu, return r; } +#ifdef CONFIG_HAVE_KVM_VCPU_ASYNC_IOCTL long kvm_arch_vcpu_async_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) { @@ -922,6 +923,7 @@ long kvm_arch_vcpu_async_ioctl(struct file *filp, unsigned int ioctl, return -ENOIOCTLCMD; } +#endif long kvm_arch_vcpu_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 403e642..2adca3c 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -1757,6 +1757,7 @@ int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu, return -EINVAL; } +#ifdef CONFIG_HAVE_KVM_VCPU_ASYNC_IOCTL long kvm_arch_vcpu_async_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) { @@ -1771,6 +1772,7 @@ long kvm_arch_vcpu_async_ioctl(struct file *filp, } return -ENOIOCTLCMD; } +#endif long kvm_arch_vcpu_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 77d7818..c499396 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -3784,6 +3784,7 @@ static long kvm_s390_guest_mem_op(struct kvm_vcpu *vcpu, return r; } +#ifdef CONFIG_HAVE_KVM_VCPU_ASYNC_IOCTL long kvm_arch_vcpu_async_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) { @@ -3811,6 +3812,7 @@ long kvm_arch_vcpu_async_ioctl(struct file *filp, } return -ENOIOCTLCMD; } +#endif long kvm_arch_vcpu_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg)