From patchwork Wed Nov 22 12:18:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Durrant X-Patchwork-Id: 168340 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp1286819vqb; Wed, 22 Nov 2023 04:33:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFu4GlTY58v1CPXNJ4vBH5TWU8GFXcxp9bTZWPTeDlZbkU4x/xBu+IuaysatGWByGYsaTIA X-Received: by 2002:a17:902:9044:b0:1ca:86b:7ed9 with SMTP id w4-20020a170902904400b001ca086b7ed9mr2045986plz.40.1700656408531; Wed, 22 Nov 2023 04:33:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700656408; cv=none; d=google.com; s=arc-20160816; b=t6bh1J+H1/QD8HOxdme7venKYpjG4hDo+tVuQI8pSoFDZdVW+mEMnwW/lIiqbCkgVW 9ccamfh5ABQD3uWdAdQJvta2xR1z9Xm5zzDI88IhQB0nxmbiQdh1wRM5y2vm2dGMvMil EeCtohjGkxA73rCANCnJxgj10lqUzSzDzFcoUOy98Piza605fmz10RJd4HUqKo/o3LCL wjRuRaVdnWnXr4De6MNb4unbWjnZA8dc+ENzqAEPYXTA8yRu88a03HIa6QJ2oX2u8g20 HVNjFO8tHynzrXu4gDqDKeYkrhG8zc/U1LBxuEispaI92jOY5yXI7O8heshthXLM9Oym Rc0w== 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:to:from :dkim-signature; bh=sy3Iq8ck++uRsQC+BbzwlVq1Fqi2MFGRPa2yPUfB5uM=; fh=Cum1qOF0YrAzH/5yQjcCBfU63B+V0l01YtzsDBRUOAc=; b=x/F79xs7D7SXvK93xtjqtKS80xby443cD93Muk34fNdO28ObuDz42h6Z/1lxe51Bbz uo+Yj2+JOzGrC2aDoKuadjs/Ofw0AKRfLUKjlESTkGATHUoOHYrBzqIjdFDkp2ov/h/4 Tt6wMMduVUTonhkey8I3LqSzkEaXLUpREKJWTKWP5rvXub8Djbyqg5clDzYp7NTMYWBk Ci6H/tEck1x8khl4mGi7sYpF5HR/CykWhELYED1bFjNOZGpQIlNAuYeCYA1O+dwrqmMf 6a2ePE3Z666PwFDGURtjZsOOAnXRLt/w80DMdrWi4tnWWKdN6fYaTZs3SBkOzwZlEALd J6ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xen.org header.s=20200302mail header.b=NOru7noq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id e13-20020a17090301cd00b001cf67432a7csi401569plh.527.2023.11.22.04.33.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 04:33:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@xen.org header.s=20200302mail header.b=NOru7noq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 1500A806501E; Wed, 22 Nov 2023 04:30:58 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344161AbjKVMak (ORCPT + 99 others); Wed, 22 Nov 2023 07:30:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344090AbjKVMab (ORCPT ); Wed, 22 Nov 2023 07:30:31 -0500 Received: from mail.xenproject.org (mail.xenproject.org [104.130.215.37]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35E62CB; Wed, 22 Nov 2023 04:30:28 -0800 (PST) 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=sy3Iq8ck++uRsQC+BbzwlVq1Fqi2MFGRPa2yPUfB5uM=; b=NOru7noquDUijS56Slgb+QdmJt IXXJfnfBNaUlpW+XWu7ArVgNNnfjCZorHspaF9aWpjjqv4/2zfKdoJr6U60DvY+feUbVY/Ytese+O NLaXI6gSkeq0mxIxr5I9R2Gi74/x3P3BrjpAmEfdzn8/EkOM2QFyen8SeNGPjadluZKc=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1r5mN0-0005E4-0b; Wed, 22 Nov 2023 12:30:18 +0000 Received: from 54-240-197-231.amazon.com ([54.240.197.231] 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 1r5mCl-0004y9-NA; Wed, 22 Nov 2023 12:19:43 +0000 From: Paul Durrant To: David Woodhouse , Paul Durrant , Sean Christopherson , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v9 13/15] KVM: xen: advertize the KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA capability Date: Wed, 22 Nov 2023 12:18:20 +0000 Message-Id: <20231122121822.1042-14-paul@xen.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231122121822.1042-1-paul@xen.org> References: <20231122121822.1042-1-paul@xen.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 22 Nov 2023 04:30:58 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783267494116679331 X-GMAIL-MSGID: 1783267494116679331 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 4afe9e447ba4..270018cf9ce0 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4638,7 +4638,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;