From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: [PATCH 2/2] KVM: Correct documentation of KVM_GET_SUPPORTED_CPUID Date: Thu, 17 Nov 2011 12:18:45 +0200 Message-ID: <1321525125-28966-2-git-send-email-levinsasha928@gmail.com> References: <1321525125-28966-1-git-send-email-levinsasha928@gmail.com> Cc: Sasha Levin , Avi Kivity , Marcelo Tosatti To: kvm@vger.kernel.org Return-path: Received: from mail-ww0-f44.google.com ([74.125.82.44]:56312 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756394Ab1KQKV1 (ORCPT ); Thu, 17 Nov 2011 05:21:27 -0500 Received: by wwe5 with SMTP id 5so2618867wwe.1 for ; Thu, 17 Nov 2011 02:21:26 -0800 (PST) In-Reply-To: <1321525125-28966-1-git-send-email-levinsasha928@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: If the amount of entries available passed to KVM_GET_SUPPORTED_CPUID is too big we don't fail, we just adjust it to the amount actually needed and fill the entries. Cc: Avi Kivity Cc: Marcelo Tosatti Signed-off-by: Sasha Levin --- Documentation/virtual/kvm/api.txt | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index 7945b0b..273be09 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt @@ -1074,10 +1074,9 @@ or for feature consistency across a cluster). Userspace invokes KVM_GET_SUPPORTED_CPUID by passing a kvm_cpuid2 structure with the 'nent' field indicating the number of entries in the variable-size array 'entries'. If the number of entries is too low to describe the cpu -capabilities, an error (E2BIG) is returned. If the number is too high, -the 'nent' field is adjusted and an error (ENOMEM) is returned. If the -number is just right, the 'nent' field is adjusted to the number of valid -entries in the 'entries' array, which is then filled. +capabilities, an error (E2BIG) is returned. If the number is above or just, +right, the 'nent' field is adjusted to the number of valid entries in the +'entries' array, which is then filled. The entries returned are the host cpuid as returned by the cpuid instruction, with unknown or unsupported features masked out. Some features (for example, -- 1.7.8.rc1