From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: [PATCH 2/2] KVM: Correct documentation of KVM_GET_SUPPORTED_CPUID Date: Sun, 04 Dec 2011 19:37:50 +0200 Message-ID: <1323020270.3256.4.camel@lappy> References: <1321525125-28966-1-git-send-email-levinsasha928@gmail.com> <1321525125-28966-2-git-send-email-levinsasha928@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Marcelo Tosatti To: kvm@vger.kernel.org Return-path: Received: from mail-ww0-f44.google.com ([74.125.82.44]:45881 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754965Ab1LDRiH (ORCPT ); Sun, 4 Dec 2011 12:38:07 -0500 Received: by wgbdr13 with SMTP id dr13so5577033wgb.1 for ; Sun, 04 Dec 2011 09:38:06 -0800 (PST) In-Reply-To: <1321525125-28966-2-git-send-email-levinsasha928@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: Avi, This is the other part of the get_supported_cpuid change. We discussed it over IRC and you said it looks right. On Thu, 2011-11-17 at 12:18 +0200, Sasha Levin wrote: > 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, -- Sasha.