Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2661722ybc; Wed, 20 Nov 2019 18:30:53 -0800 (PST) X-Google-Smtp-Source: APXvYqw82IPqONEF22OLm98N/kt9SQVH4e2ROpHLiBqcWTM/cr+dUPVSMXWVQCU9tgyGgD8PclJQ X-Received: by 2002:a17:906:351b:: with SMTP id r27mr10300834eja.120.1574303453598; Wed, 20 Nov 2019 18:30:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574303453; cv=none; d=google.com; s=arc-20160816; b=LfeYOvBsOLUvDe0/RAyemgf3WdrbogDnf4Tr03Z+DbXTeT8FiBF6gCVZD+pSYH4OSC wzacac1SYfsj75QKl732cO2KMnhXkkX2LpxrbInD2fxaqTZy77NOAF3npoZ/4SgfMMGI L+vH2wX6Xb++LVfBvgBVjqhao6MorLztvZ+5ohMF6igRn4rwbLh/uF7InVfVHhjytwsz k+io0Ih7CjW+xTyWlGUxlAC9UA90Y+mrQA9pLa/Pjdh9wIzH9Mdxa4jpai5IFFK68U1c QGcH5vOLxfgAhYf7TZb7tPhCSg3Ui8mWqOnKZEDq+JuTAm83AIFQs5q9fMyl3gj5qmVf 5xaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:in-reply-to:mime-version:references :message-id:subject:cc:to:from:date:dkim-signature; bh=by/zQ+3yLUz+ix0dbdVmiFHSoojhC/RF88zhiK7/yXo=; b=XhP5fNENI1b4E2T6Iqcmb4TEMd3LkI1vk4NUmOKQEgnoKYl8MFH6TctZw7k06lK4wu RKjjxrWTdfUCeDkbQHi/I5hhFNDJma+OMOYR5Q+6fXVig8ex87cHktOLr+S/KyXhGiRK qryAYCGBIolfgPKYcr4qQpTqTbi+7rXrie+CC1PLQqIYQGSLjTErJHNpjVrIvXi5UY/s MBPi0sGuE7jw/HWkO/9LNo/ONreQ/EKyXNu8ELw3zsLqpMkMVaWMqJ2O2Z2EJnSAE9zi LRcqeV8gS+dUwqkVWp0oK1YZKAKZe7pCrgaLuIK4qDDmXZolA+AzvPuZ2Vifqr4JicnX 73rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hCpDNV+r; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w15si730991ejb.226.2019.11.20.18.30.29; Wed, 20 Nov 2019 18:30:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hCpDNV+r; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726568AbfKUC3D (ORCPT + 99 others); Wed, 20 Nov 2019 21:29:03 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:43100 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725904AbfKUC3C (ORCPT ); Wed, 20 Nov 2019 21:29:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574303341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=by/zQ+3yLUz+ix0dbdVmiFHSoojhC/RF88zhiK7/yXo=; b=hCpDNV+rk6pJAVht5CARvxS8xQIiB0sCIdEREQaBgiqzoB9MVGRdb0tScGZLc8xf2MSTji UVWkVtOJ3WRjWFaxRyE1EkVY56k8X7v5XRUBveLymxlKoTDSesSiBat0eGRKEKu269iaTH 6zx814V+8jEgFoSG272JJ9cI5qJLBRA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-382-GfRTqIQkMFKGzDPUqseiFQ-1; Wed, 20 Nov 2019 21:22:55 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1555E107ACC4; Thu, 21 Nov 2019 02:22:54 +0000 (UTC) Received: from localhost (ovpn-116-6.gru2.redhat.com [10.97.116.6]) by smtp.corp.redhat.com (Postfix) with ESMTP id 905A95E268; Thu, 21 Nov 2019 02:22:53 +0000 (UTC) Date: Wed, 20 Nov 2019 23:22:52 -0300 From: Eduardo Habkost To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, jmattson@google.com, Sean Christopherson Subject: Re: [PATCH 5/5] KVM: vmx: use MSR_IA32_TSX_CTRL to hard-disable TSX on guest that lack it Message-ID: <20191121022252.GX3812@habkost.net> References: <1574101067-5638-1-git-send-email-pbonzini@redhat.com> <1574101067-5638-6-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 In-Reply-To: <1574101067-5638-6-git-send-email-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: GfRTqIQkMFKGzDPUqseiFQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 18, 2019 at 07:17:47PM +0100, Paolo Bonzini wrote: > If X86_FEATURE_RTM is disabled, the guest should not be able to access > MSR_IA32_TSX_CTRL. We can therefore use it in KVM to force all > transactions from the guest to abort. >=20 > Signed-off-by: Paolo Bonzini So, without this patch guest OSes will incorrectly report "Not affected" at /sys/devices/system/cpu/vulnerabilities/tsx_async_abort if RTM is disabled in the VM configuration. Is there anything host userspace can do to detect this situation and issue a warning on that case? Is there anything the guest kernel can do to detect this and not report a false negative at /sys/.../tsx_async_abort? --=20 Eduardo