From patchwork Tue Dec 19 16:11:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Durrant X-Patchwork-Id: 181098 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp2074077dyi; Tue, 19 Dec 2023 08:55:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IGS/KNy2uI05+UuwyzLOVG/y2v9wSnjWQV5LUx2UE9K9LvUZoOLJ52F8w+k89vwr+gSwxfm X-Received: by 2002:a17:902:8608:b0:1d0:b095:9acc with SMTP id f8-20020a170902860800b001d0b0959accmr9626958plo.22.1703004929260; Tue, 19 Dec 2023 08:55:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703004929; cv=none; d=google.com; s=arc-20160816; b=YSv+VYD2MpVUohuPWYfvu97ni5rhOmHQThY5EK0E3AoA5pkAzMGiBRlre7movx3pEu mj/XOJUVeeFoZtooJJOnfMBjiXcsk2ckpVsUjzMHMQ0jsV/SQJs9lFPISZ/fxy+2fucD QSBjcbDukefAHy4M0+yQVKEMLzQ/37PXSVcxJwjyL3YbBAcRHgZZ/vH7reqeL+34du0u aN0DRARnZyhsqCHYYubIgtqT1Twp2S9CBmsHoOTvMJf56NGfNNF44FAjZ7RPJf9Yt8yH 8eP+RDkIJ5WWpcz2NR4f0v6RjwLtY6Nn3IMEiPa7yQPfk12HlSpZZLHe0SKohaFSk1+C Ok1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=9nVZwpn0XPaPE+ciJu4eP0/Qex+j8YZICActwz6UTno=; fh=aAPqvXm40pY9772UiBOljEePwtz/3Q0zIOpw238tj3M=; b=bdIe8vZwCN5A0t2x5OtX/SzCwZt1SK1li/wbBLIzdwEhuPCVC+sb5iq4S/4bNjFZtp nOeSbjpDSLZvLMwZCAm2fJbeu+3uExYP0DmhQZVlCr0JZumdBx7okSo8mGUL4kIFhKm1 LPSVFP6g3pf6CuB6GjNHcKqY8ydOeEGYcqSg61uLRuR62jTX4h+Qtnk+ujcmH340XS4R HO6/272SM1rAb1YGyDHJdJjkql4jsRwF1tA+5TozuKr+6AvfsfCPXG0gf+i+E7rWbkmq 3UgkvywlWZqNIIry2HSSx1J6wImatFgEHNrxk6wV+WJf5knBNPNM1MU4K+0eu8j+XJp9 EZ8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xen.org header.s=20200302mail header.b=bElC4J1N; spf=pass (google.com: domain of linux-kernel+bounces-5583-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5583-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id j12-20020a170903028c00b001d37632b6a4si9286428plr.518.2023.12.19.08.55.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 08:55:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5583-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@xen.org header.s=20200302mail header.b=bElC4J1N; spf=pass (google.com: domain of linux-kernel+bounces-5583-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5583-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 25F4B28BB90 for ; Tue, 19 Dec 2023 16:45:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 69AB139ACE; Tue, 19 Dec 2023 16:41:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xen.org header.i=@xen.org header.b="bElC4J1N" X-Original-To: linux-kernel@vger.kernel.org Received: from mail.xenproject.org (mail.xenproject.org [104.130.215.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89E0D374CD; Tue, 19 Dec 2023 16:41:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xen.org 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:To:From; bh=9nVZwpn0XPaPE+ciJu4eP0/Qex+j8YZICActwz6UTno=; b=bElC4J1NOX63rTHNm1/TlNhe7m pzytTPFTkyuRx1zWqmK5ywAe2GyLiqib4A3hvI9n0uKtvkKzgDUp8Zf8lnLMH0M4jxCUwSvEoKKqj gKP6llCF27EpbKRaiXEKRXI71mvg3UOrRyI5UnJKoU2SE6B8fCrIOTj+JRxlD/ccTCJ8=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rFd9y-000655-9S; Tue, 19 Dec 2023 16:41:34 +0000 Received: from 54-240-197-226.amazon.com ([54.240.197.226] 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 1rFckL-0005h9-4E; Tue, 19 Dec 2023 16:15:05 +0000 From: Paul Durrant To: Paolo Bonzini , Jonathan Corbet , Sean Christopherson , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , David Woodhouse , Paul Durrant , Shuah Khan , kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v11 15/19] KVM: xen: advertize the KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA capability Date: Tue, 19 Dec 2023 16:11:05 +0000 Message-Id: <20231219161109.1318-16-paul@xen.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231219161109.1318-1-paul@xen.org> References: <20231219161109.1318-1-paul@xen.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785730096492237394 X-GMAIL-MSGID: 1785730096492237394 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 19e6cc1dadfe..4864251dca41 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4678,7 +4678,8 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) KVM_XEN_HVM_CONFIG_SHARED_INFO | KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL | KVM_XEN_HVM_CONFIG_EVTCHN_SEND | - KVM_XEN_HVM_CONFIG_PVCLOCK_TSC_UNSTABLE; + KVM_XEN_HVM_CONFIG_PVCLOCK_TSC_UNSTABLE | + KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA; if (sched_info_on()) r |= KVM_XEN_HVM_CONFIG_RUNSTATE | KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG;