Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp920365pxf; Wed, 7 Apr 2021 15:05:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyk9OZRvdxZdQLopuAO0A79ilDbhoSvqo+cLFhXRm8aJBqG7kqFsqE2BQ2+bFskGowgagWx X-Received: by 2002:a17:90a:e016:: with SMTP id u22mr5075110pjy.134.1617833146410; Wed, 07 Apr 2021 15:05:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617833146; cv=none; d=google.com; s=arc-20160816; b=hzKOvobFMW6YwYnPSvVLoF0XYupfMKJJOoXp7Ht4OaHLHdj75ZSBMnYE1xBPkg+1i2 K1ydoIHlqwW2cmBBRcRYectaapfhm9XFGAg2DQ39ouhChJePjqZnxwZO0RQ0PtcrcEes eFs3Kx7PJOwrvDAVP5dsPQtevXvT2X3yv5o4iH9rLzzXqcLbCDBxWgkYyQ7SqSKWsPr/ 0A6LNdpGp8yqApWYDDnJ29USqKzQfudW/bfOvZ/ZjlM8W9Dg3Njkw8WUnElyYvKb2vrg QdmCHOybCAEQvoWvDgOhwGnLOWaidlw2ZKkRNQTVbSiArIsIBzr0a3Mritv5ENEQeVRG jVlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=xsTGeKDuyWT9psfm+ie62W9vUXSX2beUptv0qY6iZkc=; b=TurazvvTVxuzkzhEuMpF6LJR9/z/F7SwXRi5br2K9A/HJ2meBuo3twpe7V3DHA6zI9 v8Mku8/7IRKBe6Q1Bx/fbxVNnQlRaHpWJPTuIkCPjGcae8OPHWqAHHo+E5x4nCrvu/QJ 2OVnKSPcg+BfJtC1oqbWBuW7TX9mitaXXjOlbWXldeRYzU3cDlGJS/5/GODuh81XaKj7 QEbWoGiEbv59/oqO8IjDTBUNd2sLZnLDVXfP6R/uW7SLCAckWiS97ij4qDParurvOk9u RwrjagDPpaoQsIdv3KBxQnvkzmVTz2EYQf09OQviTkM4wSLQvaBAfh/qlQbTW68SHdY3 lMtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.de header.s=amazon201209 header.b=CGHXM+1D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w17si2383045plb.431.2021.04.07.15.05.28; Wed, 07 Apr 2021 15:05:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.de header.s=amazon201209 header.b=CGHXM+1D; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232514AbhDGVVc (ORCPT + 99 others); Wed, 7 Apr 2021 17:21:32 -0400 Received: from smtp-fw-6002.amazon.com ([52.95.49.90]:9952 "EHLO smtp-fw-6002.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232468AbhDGVV1 (ORCPT ); Wed, 7 Apr 2021 17:21:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1617830477; x=1649366477; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=xsTGeKDuyWT9psfm+ie62W9vUXSX2beUptv0qY6iZkc=; b=CGHXM+1D8qhfLUzL6i8sM3caqKVvh7r9yx2/Av1pjPHnvztKAxFlcl/R BpH9+uRdP/tB4puGH/1Dze8vWs8M/VAMTRDKjkff7kHZkqE/yTby4fpdr TcqttnK9XGmRGgRAYn7NnI7FcgssdBcvN3st/UjPHbUupvmV7forsLWHZ E=; X-IronPort-AV: E=Sophos;i="5.82,204,1613433600"; d="scan'208";a="104599060" Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-2c-87a10be6.us-west-2.amazon.com) ([10.43.8.2]) by smtp-border-fw-out-6002.iad6.amazon.com with ESMTP; 07 Apr 2021 21:21:09 +0000 Received: from EX13D28EUC003.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-2c-87a10be6.us-west-2.amazon.com (Postfix) with ESMTPS id 9B8A9A2124; Wed, 7 Apr 2021 21:21:07 +0000 (UTC) Received: from uc8bbc9586ea454.ant.amazon.com (10.43.161.41) by EX13D28EUC003.ant.amazon.com (10.43.164.43) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 7 Apr 2021 21:20:59 +0000 From: Siddharth Chandrasekaran To: "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Thomas Gleixner , Ingo Molnar , Borislav Petkov , , "H. Peter Anvin" , Paolo Bonzini , "Sean Christopherson" , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , "Joerg Roedel" CC: Siddharth Chandrasekaran , Alexander Graf , Evgeny Iakovlev , , , Subject: [PATCH 4/4] KVM: hyper-v: Advertise support for fast XMM hypercalls Date: Wed, 7 Apr 2021 23:19:54 +0200 Message-ID: <20210407211954.32755-5-sidcha@amazon.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210407211954.32755-1-sidcha@amazon.de> References: <20210407211954.32755-1-sidcha@amazon.de> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.161.41] X-ClientProxiedBy: EX13D06UWA003.ant.amazon.com (10.43.160.13) To EX13D28EUC003.ant.amazon.com (10.43.164.43) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that all extant hypercalls that can use XMM registers (based on spec) for input/outputs are patched to support them, we can start advertising this feature to guests. Cc: Alexander Graf Cc: Evgeny Iakovlev Signed-off-by: Siddharth Chandrasekaran --- arch/x86/include/asm/hyperv-tlfs.h | 4 ++-- arch/x86/kvm/hyperv.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/hyperv-tlfs.h b/arch/x86/include/asm/hyperv-tlfs.h index e6cd3fee562b..1f160ef60509 100644 --- a/arch/x86/include/asm/hyperv-tlfs.h +++ b/arch/x86/include/asm/hyperv-tlfs.h @@ -49,10 +49,10 @@ /* Support for physical CPU dynamic partitioning events is available*/ #define HV_X64_CPU_DYNAMIC_PARTITIONING_AVAILABLE BIT(3) /* - * Support for passing hypercall input parameter block via XMM + * Support for passing hypercall input and output parameter block via XMM * registers is available */ -#define HV_X64_HYPERCALL_PARAMS_XMM_AVAILABLE BIT(4) +#define HV_X64_HYPERCALL_PARAMS_XMM_AVAILABLE BIT(4) | BIT(15) /* Support for a virtual guest idle state is available */ #define HV_X64_GUEST_IDLE_STATE_AVAILABLE BIT(5) /* Frequency MSRs available */ diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index bf2f86f263f1..dd462c1d641d 100644 --- a/arch/x86/kvm/hyperv.c +++ b/arch/x86/kvm/hyperv.c @@ -2254,6 +2254,7 @@ int kvm_get_hv_cpuid(struct kvm_vcpu *vcpu, struct kvm_cpuid2 *cpuid, ent->ebx |= HV_POST_MESSAGES; ent->ebx |= HV_SIGNAL_EVENTS; + ent->edx |= HV_X64_HYPERCALL_PARAMS_XMM_AVAILABLE; ent->edx |= HV_FEATURE_FREQUENCY_MSRS_AVAILABLE; ent->edx |= HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE; -- 2.17.1 Amazon Development Center Germany GmbH Krausenstr. 38 10117 Berlin Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B Sitz: Berlin Ust-ID: DE 289 237 879