From patchwork Mon Sep 18 11:21:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Durrant X-Patchwork-Id: 141615 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp3016544vqi; Mon, 18 Sep 2023 16:24:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFrerKgC9qxmNKGksJx/5xZ5PegaVLhtTS3dPf6/8LMBMInyNLIRbxVejoJpOMjU6fe2y0l X-Received: by 2002:a17:903:2284:b0:1c4:202d:8747 with SMTP id b4-20020a170903228400b001c4202d8747mr10844839plh.50.1695079448243; Mon, 18 Sep 2023 16:24:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695079448; cv=none; d=google.com; s=arc-20160816; b=LYaYUFRsnT6Dohp4ah1P92S1L++anYJmohpJUnZw3FrA4UfyGn/kSjCc722azPvkCa yR62amyy0RFFYITVRxGj4YbreFIQrjlam0mKCbAvbq6MjGkPuPp4vs2ZMq8A0yLo/0re Yxv1dBl5EevMyEtMY+ZBHxaypWpZG3+Oc0QJSLUfxUJa+pDvPv1CXay9y/O8HPZRUoMz IvCD786MiWcI6KtS7lnZGOfHYBW6nyAeEWRXPHQM+E037UyOFy0oBi27PuYvShtF1llL iE/LV5BpooplCCclfuHuhl1tNNVspEVbweE39r7uMjkPrRtAoKXyyJOjNwYuT1EhjTC9 7CjA== 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=obHkKlWolKcmhKlSo8Jk0b2FNUVF9nDqgJwemksFUzs=; fh=Pw8ME2ioat+0rO24kCOjPSzdtMZ7IXXfoe/kHVOMV8g=; b=fLgJo0MmvgzzixdlYOoSdHze5+TTAEkw6xxWBqcxxO8blR9MFivmq6t8QScSsRqdKz GPuasSS1gH2jFH38Ibf9y9hk+mJXEsl5srBit2el30nFEzzhIS4sgGDi9S8EGuO2mQ+Q QnlgH4dKidwf7d0LVHhQLmcDH5EZqPleUO/HSimKctQYXuUb8FaOYq1aPQ/mfAWVsP0O DAnr8UfaFJeXDeiZLlewsdGkOg6hTBbNdldd2Nq4tg2tKQXKfxVns0MSa+L/6Ef/zUHC KH+Q8DxEbLHvDT33DjAurnaWUQJbU3yfAfjoZC2R8YTcNKJsawC2oblPNif+BJeKedNg +T0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xen.org header.s=20200302mail header.b=mrJEW9R3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id w1-20020a170902e88100b001bb8df95094si9153213plg.509.2023.09.18.16.24.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 16:24:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@xen.org header.s=20200302mail header.b=mrJEW9R3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 17C6E82E7B38; Mon, 18 Sep 2023 04:44:04 -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 S241776AbjIRLnf (ORCPT + 27 others); Mon, 18 Sep 2023 07:43:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241733AbjIRLnE (ORCPT ); Mon, 18 Sep 2023 07:43:04 -0400 Received: from mail.xenproject.org (mail.xenproject.org [104.130.215.37]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA311C3; Mon, 18 Sep 2023 04:42:57 -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=obHkKlWolKcmhKlSo8Jk0b2FNUVF9nDqgJwemksFUzs=; b=mrJEW9R3FUj54SgbyLxYh/mePd XQwjnu6EdZbTCUYy2LVHC9ihqFNm+93fRUZH08GkyCr5fa31MfuddQzftDhRjnpy1sLIOknjrTzNJ dwF5cKd6oesA2YgNXpGwjeDqpNHEOelW9DtVby9GbLA1r2DuKqKQNJ2IzEAmGcFTaNAA=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qiCeV-0007d7-C7; Mon, 18 Sep 2023 11:42:55 +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 1qiCKb-0005f3-2B; Mon, 18 Sep 2023 11:22:21 +0000 From: Paul Durrant To: kvm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Paul Durrant , Sean Christopherson , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , David Woodhouse , x86@kernel.org Subject: [PATCH v2 12/12] KVM: xen: advertize the KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA capability Date: Mon, 18 Sep 2023 11:21:48 +0000 Message-Id: <20230918112148.28855-13-paul@xen.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230918112148.28855-1-paul@xen.org> References: <20230918112148.28855-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 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]); Mon, 18 Sep 2023 04:44:04 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777394061119844605 X-GMAIL-MSGID: 1777419627739859454 From: Paul Durrant Now that all relevant kernel changes and selftests are in place, enable the new capability. Signed-off-by: Paul Durrant --- 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;