Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp522820rwd; Wed, 14 Jun 2023 20:53:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7pJOAM25hHT8rTXMOgIH2ltfJFvRQPkvInGX4Fkzf6YJf5ZZGQQ4yr6uVajyCKZ7iQ4JDl X-Received: by 2002:a05:620a:893:b0:75d:4ce5:5f49 with SMTP id b19-20020a05620a089300b0075d4ce55f49mr15859303qka.70.1686801191608; Wed, 14 Jun 2023 20:53:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686801191; cv=none; d=google.com; s=arc-20160816; b=nTElsemQibI/9YuMd7OFfDxW9YBRFR3DP/pnC+pyoF+g6GsjEpid+DZX9HqgpeB1Ja +LyqJoeGuI2pIWAJHiKAUy/NQoHiDoacx769AG4aCW7Wfz1WlaeEsFSG8XnV3lsRRwuD Q2/c9KE5WE6ZI9ATzVafTGblVAqRpJ0ZWsdhvWGsxkFyZOMTBKVW3P0n2mXnQYhzrrce Pibc19A7scp2Lm0yKuGG6VmBu2N1UC4OeTELhSx3LlhhWijfR/bpbKg3I1t8zHs292cm NgiEl/kiHuf8raYFqMIcFiJvUof08+9VEyectzSIAXvSEjORyeloBCO2QYxBGsjAYqlU +sew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=O3Nn8Xh+c9qsZ7K3m6q6+78dSP1PlveI8k991knHxzY=; b=uY5IiRltluHKFVL8GTjIlpc/A/4LFFLPB3EiG6XeY2/kTEriCsOpNx1jL0hMWOZmpw BUFYxMgn675anTNbhP+UySMkyvR5ZciuEFu8ZN7xmhLHyR5zheLtNb9ow0S1gFs8i1Jr F+4X+lFP7heOhs1ehZECP/Zg1hVdFkprBfN8bExJzJrrlYGRlgotNreHW5At6Xl8m/89 nx2j6NqYKLDkhgfuiyoVVs5vpXJbXkLugfAq5rfRQ44RcAV0tB8pL+V8MDAUZJWuhHxC xDRKenA5buDTYHWJ6ZrlAg1MUaJF85f9iKYc8Ulan8O523c13LwB/u7hW9hfsrKy02vM 2XKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=rngbIqFZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v9-20020a63b649000000b0053b52fed717si12256512pgt.864.2023.06.14.20.52.59; Wed, 14 Jun 2023 20:53:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=rngbIqFZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237549AbjFODss (ORCPT + 99 others); Wed, 14 Jun 2023 23:48:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229567AbjFODsq (ORCPT ); Wed, 14 Jun 2023 23:48:46 -0400 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E01C9211D; Wed, 14 Jun 2023 20:48:44 -0700 (PDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4QhSvH41JTz4wgC; Thu, 15 Jun 2023 13:48:43 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1686800923; bh=O3Nn8Xh+c9qsZ7K3m6q6+78dSP1PlveI8k991knHxzY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=rngbIqFZyQUlXkDaUO52vlPUCfjrvwv6pqSZLgeTIz+Fk06/lHWN20ro0sa5vpg9n FBjQ/1nhp+VtqgKDe5vmnbl676jFkLWoJygwBk9bIgtjzpo4nScFZ0UEugRgwYdp9B LOrQp2x6r/kXwYObUJg0+9IzGrYnr+ZPUcKxMb7ShUapPFKS0uWK4wlX3T0lNAFnzs 5w640BoEfKN6TnQySLYcKrH7WGCx0OGu9XGZ95GTzDCHyxeNCGroys716R5ScTF5qH 6pf9f9f4gKfi5VEtX7JNPfPgVHEKHEtTGG7ZE6dqQGmEIz/hPkPh0CwvOVk4wPkPaA jSkMSqrsp8BQw== From: Michael Ellerman To: Wei Wang , seanjc@google.com, pbonzini@redhat.com Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Wei Wang Subject: Re: [PATCH RESEND v2] KVM: move KVM_CAP_DEVICE_CTRL to the generic check In-Reply-To: <20230315101606.10636-1-wei.w.wang@intel.com> References: <20230315101606.10636-1-wei.w.wang@intel.com> Date: Thu, 15 Jun 2023 13:48:42 +1000 Message-ID: <87cz1xfkrp.fsf@mail.lhotse> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Wei Wang writes: > KVM_CAP_DEVICE_CTRL allows userspace to check if the kvm_device > framework (e.g. KVM_CREATE_DEVICE) is supported by KVM. Move > KVM_CAP_DEVICE_CTRL to the generic check for the two reasons: > 1) it already supports arch agnostic usages (i.e. KVM_DEV_TYPE_VFIO). > For example, userspace VFIO implementation may needs to create > KVM_DEV_TYPE_VFIO on x86, riscv, or arm etc. It is simpler to have it > checked at the generic code than at each arch's code. > 2) KVM_CREATE_DEVICE has been added to the generic code. > > Link: https://lore.kernel.org/all/20221215115207.14784-1-wei.w.wang@intel.com > Signed-off-by: Wei Wang > Reviewed-by: Sean Christopherson > --- > arch/arm64/kvm/arm.c | 1 - > arch/powerpc/kvm/powerpc.c | 1 - Acked-by: Michael Ellerman (powerpc) cheers