From patchwork Fri Sep 22 15:00:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Durrant X-Patchwork-Id: 143512 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp5671437vqi; Fri, 22 Sep 2023 08:37:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH2vxKXbqIh1T3EqD8dp4qHHfnysw8ax3gHzHHHn+GqdEwDBELzkjidtn4pxJu7/nX+Th49 X-Received: by 2002:a17:90a:4507:b0:276:fd4c:c20b with SMTP id u7-20020a17090a450700b00276fd4cc20bmr57856pjg.5.1695397019835; Fri, 22 Sep 2023 08:36:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695397019; cv=none; d=google.com; s=arc-20160816; b=FTwYXHutWGwnVouQ4W7KWrBE4+wb69wyaVIt2aRja2hi3wKnJTmMwetwFMI2peCl/r ZoujDyIxIJSg2Gj40PZjncN0atKbD4wuNiWx3kg3sVL7TZp7hKnWW7A+pCWaF0NH3hk/ lSTu+yy3N+GISSQo7OLqTduHxlCmKaNT2qoj5XzJGQFPWKCKZqu/yIRuKT3it06/gfLF IX9enxsg3/2QdN2E7J4BwuBZXkI6HSAHi5hr9pMJzlQtcuHINNuatR6XsEN7i9y6okeB +/0WTXIKMepJkknhL7sfrjjg3J5nDSVviffmvW6O9qYBrKQW6E6fCM1OB9UVkH9kQa5V xVcg== 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=OnZ8zSAkss2pUJLPO3TlCjqbELhF/Q5FJAtYDHD/8T0=; fh=jcKAuV9sx5P88dpWYyXihS1UO5TLmUGd/2Iq3QREE4o=; b=pYhCAOeInm2+BKjSlV0fChFf4+V1H7SCN9CaOs3NVK5SS/ME/qOqLdyu07qnD5/WG/ P2955wRkSswefk60ADj9QYxiwYoXO0ze35oif4crFZBQXeqXVUofwQ3d3F+j+rhKxDP7 T+BVpROSOXohUkei5yIETwXJ/auRw89AhKZD6D5JD3e6rmh15zKSfbEs+fJnDDnnZtW5 1VbwGHQYcEqTGnuhYniKXozyeUhQuQLg9O2Od6KNrJRTK3ZsrWRM/fzqsqTtCZjKrOt1 y2hbFLD9Xu2QlEzPoBwfDjX6lPHzpJjIzXBno7j89jcOdVYxCJkS6MslOvYjeaC69M0W 6LVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xen.org header.s=20200302mail header.b=e9jnP1XK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id d19-20020a637353000000b00578aedd8e8bsi3714267pgn.716.2023.09.22.08.36.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 08:36:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@xen.org header.s=20200302mail header.b=e9jnP1XK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 813228076173; Fri, 22 Sep 2023 08:30:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231594AbjIVPa1 (ORCPT + 29 others); Fri, 22 Sep 2023 11:30:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229849AbjIVPa0 (ORCPT ); Fri, 22 Sep 2023 11:30:26 -0400 Received: from mail.xenproject.org (mail.xenproject.org [104.130.215.37]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F0A6A3; Fri, 22 Sep 2023 08:30:19 -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=OnZ8zSAkss2pUJLPO3TlCjqbELhF/Q5FJAtYDHD/8T0=; b=e9jnP1XKXGk6uTnl1Y8k/Il6Ys yNWAouT1UGbBCyEHFe2xRl6m16hNHh8P19R+cdCpYalGS69cvda395sVUg3iwji6Q1iJxuwXw8Zjo TY4E3ivA95PVIxbQCjdjkqnkceIvRpNYobjLltWfuZ/3PsUVh4K5t9YAzrZ1gNylabcs=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qji6i-0004nj-CD; Fri, 22 Sep 2023 15:30: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 1qjhdy-0005y2-Oi; Fri, 22 Sep 2023 15:00:34 +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 v5 10/10] KVM: xen: advertize the KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA capability Date: Fri, 22 Sep 2023 15:00:09 +0000 Message-Id: <20230922150009.3319-11-paul@xen.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230922150009.3319-1-paul@xen.org> References: <20230922150009.3319-1-paul@xen.org> MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Fri, 22 Sep 2023 08:30:41 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777752625483654325 X-GMAIL-MSGID: 1777752625483654325 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 d669a8801265..0df06f47801c 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4531,7 +4531,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;