Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2258507imm; Thu, 18 Oct 2018 11:32:31 -0700 (PDT) X-Google-Smtp-Source: ACcGV61Bthw6rDm1X9lZFdakQ8vrVUcJhEhypzrfKt884ZzqAOYFoBCf0z1thEqd8UUbx+ntsf0a X-Received: by 2002:a63:700e:: with SMTP id l14-v6mr28664442pgc.359.1539887551694; Thu, 18 Oct 2018 11:32:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539887551; cv=none; d=google.com; s=arc-20160816; b=JcAe5bwPtBuagvJTjKDmW9UdGV0sOPjEk13xFQj9++rOMzWfH/LOaPT0Qeg/6Y9HDv IHcbXqLoyrjssfnn4/ZTu2zTqW80wgoJ0BiEZhCS+/leiCYc/WJzw9hY4VTANLhjNKVE P/+ndT3gMgmobNplkRa/nwza/BiW0InisY7knmRv2jc81GcPVMFJI6JOmHtNMLPB5tJH FMtKH8irPhzWFG49mtD6fVaM3772xwPlImVDX+W86NQlv/7BLZ0j+HrJpHDVpSEO0Ta7 g37kOwLx0eR2n3W3G9ur1dHuV4j90ygrPInUTS4pFgfVA8ZlnR0JOEl8bisGvpu2RvMz btFg== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ufU3Q6dpIKcNe9WAdzGa/W5E6LWOhL02pRelNyby068=; b=eX7brPdN6JIeb0WyS8qXPRmM5InhNkeiJk0RhSQndi0pdKSaemZaK0Fr+K4yZlClCu ThzsHgXP2BeBn9eMyEPFq/uq65DZA9F/N7OYK/BMuJNi0CVrA9slHWfH7v6ehEfyGUvy q7LKl/H9chpZx7ued5sj8QenSW9Ogn5EWQfgEKtBLtOGyKcWST1QvvADkI3fhLCPfPL/ aQnXRpr/b9cLs9ozQcEn8rMBKxXg6dVGtp+rz1HliMemHUbetbLosRZ6rwQlNPFafUN/ BP42TvmeptN/741Ma1k7cd9tkumOnWuBUETxFtknhe/kRRelNbNQTjjfvPFwJYv2IdHb wjeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="MZpzF/+G"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z20-v6si20801266pfe.245.2018.10.18.11.32.16; Thu, 18 Oct 2018 11:32:31 -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; dkim=pass header.i=@kernel.org header.s=default header.b="MZpzF/+G"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730425AbeJSCIU (ORCPT + 99 others); Thu, 18 Oct 2018 22:08:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:57256 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726822AbeJSCIT (ORCPT ); Thu, 18 Oct 2018 22:08:19 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DD66E20658; Thu, 18 Oct 2018 18:06:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539885971; bh=5RHJNFKZfN0UQU1RS9b4zjV0iL1YfcU5hEtlzn9uvz8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MZpzF/+G8KgE/5qGJh7JC9756xv0GJOZe/I9FZecIUheDjkbHO7s17TiazC5Pys+X m27QS163vsoW5b9dhZo0Hroq6fazDFRtZObUKfPgULqwHThzzVruOuzRpMNDKQCBOF HB9WGa+P8kM6twiOKxqyuYaZ2H/12qTEDKywKpSE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paolo Bonzini , Daniel Sangorrin Subject: [PATCH 4.4 31/48] KVM: x86: remove eager_fpu field of struct kvm_vcpu_arch Date: Thu, 18 Oct 2018 19:55:06 +0200 Message-Id: <20181018175429.615288507@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181018175427.133690306@linuxfoundation.org> References: <20181018175427.133690306@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Paolo Bonzini commit 5a5fbdc0e3f1159a734f1890da60fce70e98271d upstream. It is now equal to use_eager_fpu(), which simply tests a cpufeature bit. Signed-off-by: Paolo Bonzini Signed-off-by: Daniel Sangorrin Signed-off-by: Greg Kroah-Hartman --- arch/x86/include/asm/kvm_host.h | 1 - arch/x86/kvm/cpuid.c | 3 +-- arch/x86/kvm/x86.c | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -439,7 +439,6 @@ struct kvm_vcpu_arch { struct kvm_mmu_memory_cache mmu_page_header_cache; struct fpu guest_fpu; - bool eager_fpu; u64 xcr0; u64 guest_supported_xcr0; u32 guest_xstate_size; --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c @@ -104,8 +104,7 @@ int kvm_update_cpuid(struct kvm_vcpu *vc if (best && (best->eax & (F(XSAVES) | F(XSAVEC)))) best->ebx = xstate_required_size(vcpu->arch.xcr0, true); - vcpu->arch.eager_fpu = use_eager_fpu(); - if (vcpu->arch.eager_fpu) + if (use_eager_fpu()) kvm_x86_ops->fpu_activate(vcpu); /* --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -7325,7 +7325,7 @@ void kvm_put_guest_fpu(struct kvm_vcpu * * Every 255 times fpu_counter rolls over to 0; a guest that uses * the FPU in bursts will revert to loading it on demand. */ - if (!vcpu->arch.eager_fpu) { + if (!use_eager_fpu()) { if (++vcpu->fpu_counter < 5) kvm_make_request(KVM_REQ_DEACTIVATE_FPU, vcpu); }