Received: by 2002:a05:6a10:e2c5:0:0:0:0 with SMTP id j5csp3336546pxy; Tue, 15 Sep 2020 15:52:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxI9h2jy8m2U5AQZ3nEOpJuTVA4SOg7Sa10Lifv+ZEzLCnFEBc8DddjrNSdtlNlLy8Vq2/J X-Received: by 2002:a17:906:d045:: with SMTP id bo5mr21826113ejb.320.1600210324032; Tue, 15 Sep 2020 15:52:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600210324; cv=none; d=google.com; s=arc-20160816; b=vlwyqJHk3i/nkd9ZJOlj/xpE5NyjFLAfbkclHel23OTNZ0l0vQqmO4vdsvYtQSxy7v vgiWpCcjkCkxsdvNL9mWfP/u9bNIpfw3h8HbKPI9uP5xNBGzza6rghFYGeRc7hWD+9rJ /+v2ou35XEpRC97Aue/t9RLWQ3oJl5WHEPERIUyYMZi7zhB1SiDzxKZY5f1b5hyHxYmx 2vJojN8736rRzjpGOOIg3voHqiHlZKXbc31FrSgxDJidRtwF3zxpxT3vdPOciua6oHir rgdQjwC9IvZsQPdDTr18wkqW0R8mxjWsrAgOLtoFhHR3X1ASReu8LjGH+gGy2VPzGy/y hiPg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dBKCOd9+T+S8SI4cU/LsZo01CTeAPSMyTVRBmW7srME=; b=YGHMKZVKEsPtq+283VxjAvRbtRojMkfXCjYcbrTRhdGHRHntQN4W5gWKDda9PwBzaI H4ZKLr9CLimCimzPEp8nAOlXE7giT/E7iKIyIJ+DUpNT9K7uQmszYsN1vCwo8boCah8k fdalWc8zbEGByYb7gUzyYhEZGEa4o5Q7jGKqOe9m7zTHSQRPylTxlok8s8+B6pnMZEUF Qas4XLX+KeQ8X2/Gr0gUZuwn+/dsNPveYcn7LDiNz3rBxfANWk7vzK6wjJOBeoAxOhqq 55R3NPniGigl9+j/I1rreHMXKVUrQCGpmIsoeAlktdpj331xjAwXp1BjZs2K6kKp6gKX nSjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ibCMuWkT; 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 d1si10610441edr.490.2020.09.15.15.51.41; Tue, 15 Sep 2020 15:52:04 -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=ibCMuWkT; 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 S1727694AbgIOWtq (ORCPT + 99 others); Tue, 15 Sep 2020 18:49:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:23807 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727462AbgIOPnt (ORCPT ); Tue, 15 Sep 2020 11:43:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600184618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dBKCOd9+T+S8SI4cU/LsZo01CTeAPSMyTVRBmW7srME=; b=ibCMuWkT3WldBVmLlv6qJIngthgeuu0EKCPoNjaiBiBk+rK4uOkLz2NniEqY/Vp+/DaIXL Zd5CONAaGdLllaP9Y4r4xdrSOhY82TyeXFR8D6lxR+yFrh97WJNw/ncukp52qn7ScBOT/n LThLWbP+wlNFss8uPgE1+nwMZW8vM3w= 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-482-tQ_kHQi8NGqrYTJRShL3BQ-1; Tue, 15 Sep 2020 11:43:35 -0400 X-MC-Unique: tQ_kHQi8NGqrYTJRShL3BQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 152D71022E19; Tue, 15 Sep 2020 15:43:16 +0000 (UTC) Received: from vitty.brq.redhat.com (unknown [10.40.195.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id C543D19C4F; Tue, 15 Sep 2020 15:43:13 +0000 (UTC) From: Vitaly Kuznetsov To: kvm@vger.kernel.org, Paolo Bonzini Cc: Sean Christopherson , Wanpeng Li , Jim Mattson , "Dr . David Alan Gilbert" , Wei Huang , linux-kernel@vger.kernel.org Subject: [PATCH RFC 2/2] KVM: x86: bump KVM_MAX_CPUID_ENTRIES Date: Tue, 15 Sep 2020 17:43:06 +0200 Message-Id: <20200915154306.724953-3-vkuznets@redhat.com> In-Reply-To: <20200915154306.724953-1-vkuznets@redhat.com> References: <20200915154306.724953-1-vkuznets@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As vcpu->arch.cpuid_entries is now allocated dynamically, the only remaining use for KVM_MAX_CPUID_ENTRIES is to check KVM_SET_CPUID/ KVM_SET_CPUID2 input for sanity. Since it was reported that the current limit (80) is insufficient for some CPUs, bump KVM_MAX_CPUID_ENTRIES and use an arbitrary value '256' as the new limit. Signed-off-by: Vitaly Kuznetsov --- arch/x86/include/asm/kvm_host.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 0c5f2ca3e838..c1d942c9eb58 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -132,7 +132,7 @@ static inline gfn_t gfn_to_index(gfn_t gfn, gfn_t base_gfn, int level) #define KVM_NUM_MMU_PAGES (1 << KVM_MMU_HASH_SHIFT) #define KVM_MIN_FREE_MMU_PAGES 5 #define KVM_REFILL_PAGES 25 -#define KVM_MAX_CPUID_ENTRIES 80 +#define KVM_MAX_CPUID_ENTRIES 256 #define KVM_NR_FIXED_MTRR_REGION 88 #define KVM_NR_VAR_MTRR 8 -- 2.25.4