Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1501485pxu; Thu, 8 Oct 2020 13:07:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygbaANlOnksu8epVxyd/xQ9wfC53eNT6y8fO9A/zZohmww+bUZjyGSmlLizseTxfnc187Q X-Received: by 2002:a17:906:bfe2:: with SMTP id vr2mr7725606ejb.248.1602187653495; Thu, 08 Oct 2020 13:07:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602187653; cv=none; d=google.com; s=arc-20160816; b=L85xb6fg6jq6k40CX8wr6rz2w7HyWfUxKdJy9qQxYygwf+8mScqDV4/RWmiTojpL1x 36qyebaD7XnZN9WHMNkxSnvWn8lHVKSqLNW6Pt2Y47DzQwXJSft32ri9UxV/8dYTXArl 5Zn3hiJsOnideKBC9IMrdSRHsbhRiKBPJhxcSrMmD4DfkV/ujiqkibA0rq7nmyozxVS0 zhZNbOe3nEHNZW9yy86MmcnN0HuPjAEVuLgNQZwSfyx7uLDER9EqzyMydY5clJ7Opnnx O1pwJgCd6AV9dc4Ste1I2u1lyzu70cA9ciuNeZJsmwykxah/RjEoqwkawMIUNgez1JU6 38Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=bluhR9KOTIbQ+QGpKz9Rzdswd9NDweuwQZuG8U5zmYk=; b=I/I7qGBBw4QWUvX66RhNVZ/xcraGTvIS6Y+gyuIMoVHDVt/geajpxj1xYCMNJnMkA/ ytSVZAXDYtIsSXh8LcgCaUd7a7G9brYtNciufzJ2sur33aRu/9kaDIPkMvKkqVys5UA7 0aReuXWZOxV4v0SkKJw4Cba7hvFmNu2KVDa3c3bBfBNWcpUrAEsDNydFNsZQhRGQYGaa 8fWip26lx7Ycs104mdshSpWivdIrDPvC0g81sWCoPYL4oDSBl3xjxqFLqfuBsFb5DUtl 4VwpS98bfL6xRmvufd6R1lmmdzD7MhT+q0JMQXSRjlomKpVv9F4i322TW/Vc4CvBSBEn HESw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d20si3240306ejz.615.2020.10.08.13.07.08; Thu, 08 Oct 2020 13:07:33 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729915AbgJHR7x (ORCPT + 99 others); Thu, 8 Oct 2020 13:59:53 -0400 Received: from mga01.intel.com ([192.55.52.88]:7530 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726012AbgJHR7x (ORCPT ); Thu, 8 Oct 2020 13:59:53 -0400 IronPort-SDR: Vz2D/nA2l2Erzz62s8YB7+8xt2KndIHt0EwXXnk7P2IPK+hDqOE667+ZzEhW4Iimy7cQnlTBxJ OeMsYYPhU1ng== X-IronPort-AV: E=McAfee;i="6000,8403,9768"; a="182812617" X-IronPort-AV: E=Sophos;i="5.77,351,1596524400"; d="scan'208";a="182812617" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2020 10:59:52 -0700 IronPort-SDR: apRGQIolZEqv+ssgLkRhSYdoCY6/uRdymbzZHfnYFBg4iX/xWquNT1iZARIcLmTtbYCuhEZQvh o4SZbACwZ3Ew== X-IronPort-AV: E=Sophos;i="5.77,351,1596524400"; d="scan'208";a="312283179" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.160]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2020 10:59:52 -0700 Date: Thu, 8 Oct 2020 10:59:51 -0700 From: Sean Christopherson To: stsp Cc: Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/6] KVM: x86: KVM_SET_SREGS.CR4 bug fixes and cleanup Message-ID: <20201008175951.GA9267@linux.intel.com> References: <20201007014417.29276-1-sean.j.christopherson@intel.com> <99334de1-ba3d-dfac-0730-e637d39b948f@yandex.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <99334de1-ba3d-dfac-0730-e637d39b948f@yandex.ru> User-Agent: Mutt/1.5.24 (2015-08-30) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 08, 2020 at 07:00:13PM +0300, stsp wrote: > 07.10.2020 04:44, Sean Christopherson пишет: > >Two bug fixes to handle KVM_SET_SREGS without a preceding KVM_SET_CPUID2. > Hi Sean & KVM devs. > > I tested the patches, and wherever I > set VMXE in CR4, I now get > KVM: KVM_SET_SREGS: Invalid argument > Before the patch I was able (with many > problems, but still) to set VMXE sometimes. > > So its a NAK so far, waiting for an update. :) IIRC, you said you were going to test on AMD? Assuming that's correct, -EINVAL is the expected behavior. KVM was essentially lying before; it never actually set CR4.VMXE in hardware, it just didn't properply detect the error and so VMXE was set in KVM's shadow of the guest's CR4.