From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14D61C4727E for ; Wed, 23 Sep 2020 00:18:54 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 197782085B for ; Wed, 23 Sep 2020 00:18:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ozlabs.org header.i=@ozlabs.org header.b="ft7brIP1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 197782085B Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=ozlabs.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4BwzLK5KbgzDqZL for ; Wed, 23 Sep 2020 10:18:49 +1000 (AEST) Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Bwz9n07l1zDqQd for ; Wed, 23 Sep 2020 10:11:24 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.a=rsa-sha256 header.s=201707 header.b=ft7brIP1; dkim-atps=neutral Received: by ozlabs.org (Postfix, from userid 1003) id 4Bwz9m5k2Rz9sTg; Wed, 23 Sep 2020 10:11:24 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1600819884; bh=zpg+PBUfeJ7GI3Gz66qYPvlYKR/QNsHAQJk+f2ycHTM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ft7brIP1rvFIR4NTmNsJKzMfXV/89YfNorLxZNlXAM6KmlKaM7W9wyGGSrRejyent hGPBgJ5wgrV4+1+ZsGf0ATuFH+qbWk2KJo8wQ55trRHmqUIJddBrWmVXaRvr8rswaB 5Qu1qoSeMzNasAuEtpDGgAChHH29TUCLVDNrohxWvpZPtMMHQMavzYDT3jHlykaCti +8wYSgtTZRf6rcGOCmVOAzlWxkK1pNjcgR5KCKSIBZFQ0UWtyisEQDajmfFkDk36AL W7phA3GAObn8S/xZcWn2ZFUt6nxQXC5k3PDqYNWPVD4zh93d11bCnv3QiGtPTBJyyj YA+e/ut9cgDeA== Date: Wed, 23 Sep 2020 10:10:20 +1000 From: Paul Mackerras To: Greg Kurz Subject: Re: [PATCH] KVM: PPC: Don't return -ENOTSUPP to userspace in ioctls Message-ID: <20200923001020.GF531519@thinks.paulus.ozlabs.org> References: <159982162511.459323.13495475646618845164.stgit@bahia.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <159982162511.459323.13495475646618845164.stgit@bahia.lan> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: trivial@kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri, Sep 11, 2020 at 12:53:45PM +0200, Greg Kurz wrote: > ENOTSUPP is a linux only thingy, the value of which is unknown to > userspace, not to be confused with ENOTSUP which linux maps to > EOPNOTSUPP, as permitted by POSIX [1]: > > [EOPNOTSUPP] > Operation not supported on socket. The type of socket (address family > or protocol) does not support the requested operation. A conforming > implementation may assign the same values for [EOPNOTSUPP] and [ENOTSUP]. > > Return -EOPNOTSUPP instead of -ENOTSUPP for the following ioctls: > - KVM_GET_FPU for Book3s and BookE > - KVM_SET_FPU for Book3s and BookE > - KVM_GET_DIRTY_LOG for BookE > > This doesn't affect QEMU which doesn't call the KVM_GET_FPU and > KVM_SET_FPU ioctls on POWER anyway since they are not supported, > and _buggily_ ignores anything but -EPERM for KVM_GET_DIRTY_LOG. > > [1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html > > Signed-off-by: Greg Kurz Thanks, applied. Paul.