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: 302574 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.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_SANE_2 autolearn=unavailable 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 8D6E3C433E7 for ; Mon, 19 Oct 2020 15:03:55 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (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 A5C502231B for ; Mon, 19 Oct 2020 15:03:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Jnu2Wbah" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A5C502231B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:60988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUWhV-000645-DG for qemu-devel@archiver.kernel.org; Mon, 19 Oct 2020 11:03:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUWa2-0002Im-RE for qemu-devel@nongnu.org; Mon, 19 Oct 2020 10:56:12 -0400 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]:44634) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUWZv-0000Ps-0Y for qemu-devel@nongnu.org; Mon, 19 Oct 2020 10:56:09 -0400 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 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 Received-SPF: none client-ip=2001:8b0:10b:1231::1; envelope-from=BATV+65ffd12918cbad140a0b+6266+infradead.org+dwmw2@merlin.srs.infradead.org; helo=merlin.infradead.org X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: x86 , kvm Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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