Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1671194ybi; Thu, 20 Jun 2019 01:38:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqzRDBDGAFnAkvUZYD4fcgIBer5d40aF1PZmMJOUPYJmfTQEIZA4GZGSghhCsj6CIW5/Wzkb X-Received: by 2002:a63:d205:: with SMTP id a5mr11504318pgg.279.1561019921564; Thu, 20 Jun 2019 01:38:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561019921; cv=none; d=google.com; s=arc-20160816; b=wrHiRjcCNSkWuHP0ODNRa31onV3nMvDNIAKr3EQpmObjo3Ly5PWTPeFc/OsRP2klt3 tRMbKkbLTwjw+mycO6/aep/BqD6rwWY+Nr80jkX6/pGmfS4aHb/x2ebhUfGE0Xt0uBRD kGKUYCk3E1Ew7Fppvh1BQ9H6YssSkD2/XAgBRYM/xWE6DSkbanIBv7cW5Moci1vyeK2T V4JpIK8GEnqxtzQz4nE1b8HsnW2EksLORDP8j6zTe0Ot6TLNjNYHGBStgq1nG1FQf230 gq1P3AwSAfkik3gkOmbQSdrAG5R+lq9mogTTWv9wFmvbw6FTFUmBujlQWZoqgOc9eqMy 0JEg== 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; bh=78XTCBJ6IQe9uXplpuD9BRY7lz4VHH50PsExpp8KaFU=; b=YeWfLt72LhgTMi17gO2LgQhqfkSTxWrzhURuTuj09CclsceRLWifXS7nvydCjyfw9S 8S+FnjwdGvoeYpyj8rpI3QUWaBx+nVC6o293aMJZW+KE+k9imvbPi1Z1vfu0OW0TG683 GJZlkVQ8fgD0mf2imzGV0Ww56K4tr+Ow+XZUF67z7HqwXVsEwGMkk1LfJwng5B2px3rv 1zs2AzyxE04GSz1YgWCJdlO9PB6fd2aHadwk83qfBBDJFUj+xaJIN8Axk8PL2S8juSwT NAE3MqefhEYFb7plymF0vm7JSvnLC45xyplhJWxVjHTCDG9bSDVTSHiPchB/EO/bmdEj UhjA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (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 b19si5868590pfi.175.2019.06.20.01.38.25; Thu, 20 Jun 2019 01:38:41 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730611AbfFTIgw (ORCPT + 99 others); Thu, 20 Jun 2019 04:36:52 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:46257 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726081AbfFTIgw (ORCPT ); Thu, 20 Jun 2019 04:36:52 -0400 Received: by mail-wr1-f65.google.com with SMTP id n4so2036835wrw.13 for ; Thu, 20 Jun 2019 01:36:50 -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=78XTCBJ6IQe9uXplpuD9BRY7lz4VHH50PsExpp8KaFU=; b=abtrABWm6fr7WDwGhAMd//8J9WJpXcZOExbuxj4z+krCjqWJJ8dx6Y7ImK28uoAFL4 9qlqv2wdIiEOPzh7w4Ndhr3fv1A0o9xj4hOaE/ERnjh2kuBZeTtG75u1NUVmGUnEDoIG 7HXQkdL1OzNTC5JqgxXqO09RBN5TdAk1wew/RcmihNyqq437syFmOav5Vj0ADc7LN+yW 5WFeoKDP/Fi/xBo8i5JKzG0lGPlW4rjXa3KZ54lXSOfu0TNyuM1iunVzCT2k2JFeV+vU hwZWpelegz0BSlqzkUpPCDwtp/H0nO7+waCcsOz87Ud16L77z1W+3yudDqeLCcPimkB1 wOEQ== X-Gm-Message-State: APjAAAXpmj+MUDRHj4U6/90W/92KoSfqcZPR277K0NDpaLi9pyo++u+k 8Sx1t/ea2aY8Xy3TnenVYH0SF/XXQBk= X-Received: by 2002:adf:ce03:: with SMTP id p3mr67060669wrn.94.1561019809656; Thu, 20 Jun 2019 01:36:49 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:7822:aa18:a9d8:39ab? ([2001:b07:6468:f312:7822:aa18:a9d8:39ab]) by smtp.gmail.com with ESMTPSA id v67sm5067971wme.24.2019.06.20.01.36.48 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 20 Jun 2019 01:36:49 -0700 (PDT) Subject: Re: [PATCH] KVM: vmx: Fix the broken usage of vmx_xsaves_supported To: Wanpeng Li Cc: Xiaoyao Li , Tao Xu , Radim Krcmar , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , kvm , LKML References: <20190620050301.1149-1-tao3.xu@intel.com> From: Paolo Bonzini Message-ID: <165af492-027d-c640-9dea-c4c2d76fa1aa@redhat.com> Date: Thu, 20 Jun 2019 10:36:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 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 20/06/19 10:27, Wanpeng Li wrote: > Agreed, in addition, guest can enable/disable cpuid bits by grub > parameter Through what path? Guest can disable X86_FEATURE_* but that's purely a Linux feature, the few CPUID bits that can change at runtime already call kvm_x86_ops->cpuid_update(). Paolo > , should we call kvm_x86_ops->cpuid_update() in > kvm_vcpu_reset() path to reflect the new guest cpuid influence to > exec_control? e.g. the first boot guest disable xsaves in grub, kvm > disables xsaves in exec_control; then guest reboot w/ xsaves enabled, > it still get an #UD when executing.