From patchwork Mon Oct 19 14:55:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Woodhouse X-Patchwork-Id: 11844583 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=-11.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham 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 3844AC433E7 for ; Mon, 19 Oct 2020 14:56:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8A550222EB for ; Mon, 19 Oct 2020 14:56:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Jnu2Wbah" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729644AbgJSO4H (ORCPT ); Mon, 19 Oct 2020 10:56:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728311AbgJSO4H (ORCPT ); Mon, 19 Oct 2020 10:56:07 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27F5BC0613CE for ; Mon, 19 Oct 2020 07:56:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Mime-Version:Content-Type:References: In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=lHQLuEgjod4cyXYlZj/yJTiArJ/+9ZerdGqKAnA8VYo=; b=Jnu2WbahNop0HfV1fdMqGviLJ6 Spb3PDqo4g0N3UcA7JieoCpn10FwR6YTy31mZa+MctEtvhWLHNpja5cnGCFVu+64mi/8xdaJxWUAB mVCnRiIWL+fIByyj1NGRJ00rn79dYGUUtw/qfX95B/v7ukZnFCSNi6UdRkIiOTVtM5C94f046i3XA NF0ENe+WlmvtgjQemwSWqnaMIOCTiEQn2upirW8y+OPyxBFxfFh8pCd4+hrfC2N7dGAXnzX6Qt073 jQVez8AOrnIDUWTG/o4qdTEh4ZImLqIu+9W+umlh5p7uiJeVIkI+H7NnhoPPVaXSgg0fzN8K6tOfM BMT4Vufg==; Received: from 54-240-197-236.amazon.com ([54.240.197.236] helo=freeip.amazon.com) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUWZq-0007g0-2z; Mon, 19 Oct 2020 14:55:58 +0000 Message-ID: <4cd59bed05f4b7410d3d1ffd1e997ab53683874d.camel@infradead.org> Subject: [PATCH] x86/kvm: Reserve KVM_FEATURE_MSI_EXT_DEST_ID From: David Woodhouse To: Paolo Bonzini , qemu-devel Cc: x86 , kvm Date: Mon, 19 Oct 2020 15:55:56 +0100 In-Reply-To: <4d820db0-be0d-d47d-7a8a-874fb481a2ce@redhat.com> References: <78097f9218300e63e751e077a0a5ca029b56ba46.camel@infradead.org> <6f8704bf-f832-9fcc-5d98-d8e8b562fe2f@redhat.com> <698c8ab6783a3113d90d8435d07a2dce6a2e2ec9.camel@infradead.org> <7b9c8ca4-e89e-e140-d591-76dcb2cad485@redhat.com> <4d820db0-be0d-d47d-7a8a-874fb481a2ce@redhat.com> X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by merlin.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: David Woodhouse No functional change; just reserve the feature bit for now so that VMMs can start to implement it. This will allow the host to indicate that MSI emulation supports 15-bit destination IDs, allowing up to 32768 CPUs without interrupt remapping. cf. https://patchwork.kernel.org/patch/11816693/ for qemu Signed-off-by: David Woodhouse Acked-by: Paolo Bonzini --- Documentation/virt/kvm/cpuid.rst | 4 ++++ arch/x86/include/uapi/asm/kvm_para.h | 1 + 2 files changed, 5 insertions(+) diff --git a/Documentation/virt/kvm/cpuid.rst b/Documentation/virt/kvm/cpuid.rst index 9150e9d1c39b..f70b655821d5 100644 --- a/Documentation/virt/kvm/cpuid.rst +++ b/Documentation/virt/kvm/cpuid.rst @@ -92,6 +92,10 @@ KVM_FEATURE_ASYNC_PF_INT 14 guest checks this feature bit async pf acknowledgment msr 0x4b564d07. +KVM_FEATURE_MSI_EXT_DEST_ID 15 guest checks this feature bit + before using extended destination + ID bits in MSI address bits 11-5. + KVM_FEATURE_CLOCSOURCE_STABLE_BIT 24 host will warn if no guest-side per-cpu warps are expeced in kvmclock diff --git a/arch/x86/include/uapi/asm/kvm_para.h b/arch/x86/include/uapi/asm/kvm_para.h index 812e9b4c1114..950afebfba88 100644 --- a/arch/x86/include/uapi/asm/kvm_para.h +++ b/arch/x86/include/uapi/asm/kvm_para.h @@ -32,6 +32,7 @@ #define KVM_FEATURE_POLL_CONTROL 12 #define KVM_FEATURE_PV_SCHED_YIELD 13 #define KVM_FEATURE_ASYNC_PF_INT 14 +#define KVM_FEATURE_MSI_EXT_DEST_ID 15 #define KVM_HINTS_REALTIME 0