Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1681646ybt; Mon, 15 Jun 2020 06:51:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKcCWSAvL9HTwYY2uOSzeRP6J2WqL8CJy+HFLidwMVkFZUZw3Tkh1BBhkUn7Ho7iOr/Tph X-Received: by 2002:a17:906:1947:: with SMTP id b7mr24824262eje.320.1592229091588; Mon, 15 Jun 2020 06:51:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592229091; cv=none; d=google.com; s=arc-20160816; b=LGwGX9rrCHtn47EIX910rAKd+MXhACF/TmVcTR3V4sFeFSoCpWDLv1fuq1hlEisf57 qIMvNqKiJfpHRZvwY9C3d9V57Tjw6CssktSaACVWcIVq622kEdzt6pYBsy88MVsa7K9l yx0YQ5QFAprHjjVrRlOqHoPQ7xmtirKiHEFUfAihLDCpzKubeb3RdBKNUFNWVX6yVl3Z M6YfU7Jlde1Vt2QXQzF9WKpqrrkE0aqc/pOa55s4JAgKmV0dx5mFYGb0T279O95DRtfN cxbL0VmqEaJjZEwYFQGYG7y/x94TArDTwp6IN/6xAEI4wBA4B+eUa0Aoy+ypwCsrA/RU KZ1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=weheyMNu1Wo9nH5YiVxVjdHICGi6lkG7Hb/LLVN60N8=; b=c3Hj8A5IAc5JHSzgsalVZ2fnzFk3CrB1leZRoM/4qUdGJRM67jQSlQuqcBQ4opbUaN cC8I7Wh9Fm89War/cNVM6eYh4PyAX+UPU4MCG2LHCPoLeFuoyMMw5iGY4iB44P5Lod0R bcXwV0ph0fh7FWFryzpZRAaAVMCQlAk8Nl9MY3XZx3OyHo1FQC3CdP/UEEgcRs06aEp7 hrJGowb8yCCmQgdToJfDP1FUU+g/XdV/E3RHknDTj0qseHpw8ltqWccT+jR1mQ4Is0RF oLPd3t0qw4ZnDD5uByD5ww/R7Sd+dxe2hGg++uoZEhpTePJ3H+apAlLIXNZ1vXbwfZL6 fzbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Zw0j7ZxW; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u3si9301896ejz.197.2020.06.15.06.51.09; Mon, 15 Jun 2020 06:51:31 -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=@redhat.com header.s=mimecast20190719 header.b=Zw0j7ZxW; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730097AbgFONrE (ORCPT + 99 others); Mon, 15 Jun 2020 09:47:04 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:59011 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728326AbgFONrC (ORCPT ); Mon, 15 Jun 2020 09:47:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592228819; 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=weheyMNu1Wo9nH5YiVxVjdHICGi6lkG7Hb/LLVN60N8=; b=Zw0j7ZxWNF5lSzy/gI1kz1S3IJ/u/tbSx0SFBt7vS4p7LVgA8nx8W84udzj5l2uvmYNTMm eRQdy03rUrUjfWe64M34CFwMxpMcjieqshHzUIcZ0/cjbcdx9lR0KmAjkn7+Q7QR1uCpH1 t2j76xX+k7y2PYn8rDW2TuagxWVQdMA= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-119-hek48vVTNTK0XxJq1sFTWg-1; Mon, 15 Jun 2020 09:46:56 -0400 X-MC-Unique: hek48vVTNTK0XxJq1sFTWg-1 Received: by mail-wm1-f72.google.com with SMTP id 11so4955126wmj.6 for ; Mon, 15 Jun 2020 06:46:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=weheyMNu1Wo9nH5YiVxVjdHICGi6lkG7Hb/LLVN60N8=; b=NciSR44f/MKNeu9u9gIlyiHda54AlTLIcIAhd62tLbwp9f29ZnR9MnBlO8CWFe33hO fOJCs92GIzN0v9wcXwfx8bQmzAfrGTtjHRZmAjOuaO/q6bv1+HON0o0MpXW1Kf92QJJC V32OEtwsFSltarfT0lJTSHVqeOEXq65+wh7i+O/GxhOTq5S06NJqjTSRMojQtNCm5y5K 2/sI3g3/1MK1bpZ0qlxQkCcHS12aFAhi1FcRG4Y4+WZyHafNYttn01uyUr3HUPvZpaf3 82R79QL8qRUJ/nTpJUXCIdNSAHAW/swhK4m413njCqFn81KyF2rfsL2P5AGyXvH/qyP8 shfQ== X-Gm-Message-State: AOAM531eyJiJXp7CrWEr6bXGjKG96w5x8BSy4/TumAMSh58JVx0czU+v GcdXuUcZ5W1JTcVqGACKfelZiXW3GjiHqsBC0d2gyKYYgg4o7u1A6BzoDEASfnps4tPLeOoN1+1 VSezMBSxoBhduFg+ehCpAyZBm X-Received: by 2002:a5d:4488:: with SMTP id j8mr28281428wrq.242.1592228815044; Mon, 15 Jun 2020 06:46:55 -0700 (PDT) X-Received: by 2002:a5d:4488:: with SMTP id j8mr28281411wrq.242.1592228814812; Mon, 15 Jun 2020 06:46:54 -0700 (PDT) Received: from [192.168.178.58] ([151.48.99.33]) by smtp.gmail.com with ESMTPSA id w3sm24300473wmg.44.2020.06.15.06.46.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Jun 2020 06:46:54 -0700 (PDT) Subject: Re: [PATCH 3/3] KVM:SVM: Enable INVPCID feature on AMD To: Jim Mattson , Babu Moger Cc: Wanpeng Li , Joerg Roedel , the arch/x86 maintainers , Sean Christopherson , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , Vitaly Kuznetsov , Thomas Gleixner , LKML , kvm list References: <159191202523.31436.11959784252237488867.stgit@bmoger-ubuntu> <159191213022.31436.11150808867377936241.stgit@bmoger-ubuntu> From: Paolo Bonzini Message-ID: <4f5a7fca-02b3-4cd9-159c-59fcda3debd0@redhat.com> Date: Mon, 15 Jun 2020 15:46:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/06/20 02:04, Jim Mattson wrote: >> I think I have misunderstood this part. I was not inteding to change the >> #GP behaviour. I will remove this part. My intension of these series is to >> handle invpcid in shadow page mode. I have verified that part. Hope I did >> not miss anything else. > You don't really have to intercept INVPCID when tdp is in use, right? > There are certainly plenty of operations for which kvm does not > properly raise #UD when they aren't enumerated in the guest CPUID. > Indeed; for RDRAND and RDSEED it makes sense to do so because the instructions may introduce undesirable nondeterminism (or block all the packages in your core as they have been doing for a few weeks). Therefore on Intel we trap them and raise #UD; on AMD this is not possible because RDRAND has no intercept. In general however we do not try to hard to raise #UD and that is usually not even possible. Paolo