From patchwork Tue Sep 19 13:41:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Durrant X-Patchwork-Id: 142099 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp3702746vqi; Tue, 19 Sep 2023 14:55:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHGpeIAr1exRRkWTo/CPWNOA9hJpjllbKASU0M7+yEquaQvGBH+fc9hocyNsf5vIAFS2Jsl X-Received: by 2002:a05:6870:169d:b0:1d1:425b:8029 with SMTP id j29-20020a056870169d00b001d1425b8029mr788663oae.13.1695160514921; Tue, 19 Sep 2023 14:55:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695160514; cv=none; d=google.com; s=arc-20160816; b=uCfZF/KtRdUlDFRjN6fxihAHb10aFE5LTFXMqOPHFUD6LDfij1WSuc6NNykwvQDjIP yX4bB8+87TUTcgLNZg+hkcmqZfx3u7Tg/4Kp/hG3e/DlCRKAqDKz/2maHCIp2Su6zr9r oTMkF7nStFZC9xwwHi42SGcR4NUH1d4ueLY/NCr9Z+Gx3hTxFkqI12p74eSCicmklimb agfz7RDGTSm/5Woh3NieTRNNvSRgpIjiV835NHKhINo7iRoxZekIjRl1IQjV1PGpMEu9 +OdMLC6PcepgACTM7fAziYeqnkLhkQlbOFTT9onluUx4SqSznhhgIxvkkxPO/IqaN1oL 8O6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=AwPzUZ/Z6+s02+eLaJ3LQ0RcvLB4vo4D1x3Qrf158Cc=; fh=jcKAuV9sx5P88dpWYyXihS1UO5TLmUGd/2Iq3QREE4o=; b=n40de20jLJuXz0tsoXwWChyUyr92EkRy4Z6B3W8r+lIOrRp542lBLnFxHi0Lav5vJu QWG9UX49R7VlmlpMUmS55SDmT90crskdsYYjIKRiO66i/EuJ11LO6hu1QHH/QQlJRzu+ m62XPm+88ad4yDxTtLoD3JXNj7HnXHb7gajyiRB8wXt9Hpm4t35chvfQ+OzqrRdQA2+F 8DorUILBCZUp8oDctoeMOX4yY9FZb2pzu1TVxbaHfuIh87VzOO5sAsDZEuV/Fb/rYO8f 8DnGpqNO5TTMY8CRE9/tS/25n2mQrvQzhYpm7wBUwaQ5x59AnodeXNoy0VAtZjO+m5nC zzzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xen.org header.s=20200302mail header.b=RzfAF42M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id l37-20020a635725000000b005694492c259si10285988pgb.282.2023.09.19.14.55.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 14:55:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@xen.org header.s=20200302mail header.b=RzfAF42M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 4E22C802D3D8; Tue, 19 Sep 2023 07:00:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232630AbjISOAc (ORCPT + 26 others); Tue, 19 Sep 2023 10:00:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232516AbjISOAY (ORCPT ); Tue, 19 Sep 2023 10:00:24 -0400 Received: from mail.xenproject.org (mail.xenproject.org [104.130.215.37]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79928F3; Tue, 19 Sep 2023 07:00:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=AwPzUZ/Z6+s02+eLaJ3LQ0RcvLB4vo4D1x3Qrf158Cc=; b=RzfAF42M4L7UC/GPKdClS6g2YO fqxpCiTGd670PZjhTr5JpiD0Zs3xwnZxelWRBgiQTMKCieAudpV3uVuw8TAFuCMFzFSf4OFtp1cOH VXJKfPrnk1zKOz3dmkn6ed1L9Qw8xVYXj3I2D7coRxa7e46boOWcnndVtZlQTzIWx560=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qibGy-0004Yw-EP; Tue, 19 Sep 2023 14:00:16 +0000 Received: from ec2-63-33-11-17.eu-west-1.compute.amazonaws.com ([63.33.11.17] helo=REM-PW02S00X.ant.amazon.com) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qiazV-0005jy-Ih; Tue, 19 Sep 2023 13:42:13 +0000 From: Paul Durrant To: kvm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Paul Durrant , David Woodhouse , Sean Christopherson , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , David Woodhouse , x86@kernel.org Subject: [PATCH v4 13/13] KVM: xen: advertize the KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA capability Date: Tue, 19 Sep 2023 13:41:49 +0000 Message-Id: <20230919134149.6091-14-paul@xen.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230919134149.6091-1-paul@xen.org> References: <20230919134149.6091-1-paul@xen.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 19 Sep 2023 07:00:50 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777504631872246152 X-GMAIL-MSGID: 1777504631872246152 From: Paul Durrant Now that all relevant kernel changes and selftests are in place, enable the new capability. Signed-off-by: Paul Durrant Reviewed-by: David Woodhouse --- Cc: Sean Christopherson Cc: Paolo Bonzini Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: David Woodhouse Cc: x86@kernel.org v2: - New in this version. --- arch/x86/kvm/x86.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 2d7d0ae18820..4cd577d01bc4 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4527,7 +4527,8 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) KVM_XEN_HVM_CONFIG_INTERCEPT_HCALL | KVM_XEN_HVM_CONFIG_SHARED_INFO | KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL | - KVM_XEN_HVM_CONFIG_EVTCHN_SEND; + KVM_XEN_HVM_CONFIG_EVTCHN_SEND | + KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA; if (sched_info_on()) r |= KVM_XEN_HVM_CONFIG_RUNSTATE | KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG;