Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp171148imu; Mon, 26 Nov 2018 09:20:52 -0800 (PST) X-Google-Smtp-Source: AFSGD/UlPkR9dpUPWEXAtr/UDc7IOWhxpYgawSYDmtDQBGUk1pSx14acahji+rMDuP4YeCiMzW0a X-Received: by 2002:a65:530c:: with SMTP id m12mr24967421pgq.224.1543252852219; Mon, 26 Nov 2018 09:20:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543252852; cv=none; d=google.com; s=arc-20160816; b=GTPpge0HfusJmWZRtHnWCcb/gWlMEkacExo7C03XlmJjannA3Yki89MCrIrlf2fYhS MMcQOtB6raf9tkmU5DRLCCtpoZvKe0LFw3nIXmFXAEVf1b22Pkvux5JiGeGLtfjirXun tyuVZ3vKGC464T0H9fIdc6HYJqddoVcFSSTdpZcoN6jlgm/C7pNwLiYediIpckP6rREk S8NY1rMy0Yt6vqyDB11FLWqty1D5ppL5cSbD4o0zS95aQdLjooDeuTMyCP33APWGk4A2 qAcQgL/VmS70jABli9CCZRVM28/hk/dM/iiPyA2GV9MaOEKMand7uFzjiN/xVZIgOZkS ZXQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=nTbeBikQKh9A4t+N50wOOsAcLgtBzPeOEDWIkF+cf80=; b=AwYi0YnpO/dw/WjowfSZtgsDNxDnKSls+B34HmIKW8XUIKG6kqeurR2xlZRaK1jdNm DwhcEif7nXlhtTZ4IhWxkMl71u5cTXhVRDYHMKMBjyjXPTuFdCzKW9W6nzi7lPYGmfB2 pzBiurKRyUbyQUVW6AhbSDrM3ArtJ4X1i/Zi2OF2hIqZE44p8dhwrsDOYYEqr87e4/FB pcX8G4/9bI2bkVUc0dSh439BzIKMj8Ge1Ti06YAtml2ng3gPwBB/ySNIRDUK1dgUm/gG eB0gspkuc0MfTiQag026+xwVLljxnJjSRK1dwZ3hZVsJypv0poIfSnlq80nSNeh7leib xbvw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3si790643pgi.370.2018.11.26.09.19.45; Mon, 26 Nov 2018 09:20:52 -0800 (PST) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726870AbeK0EJh (ORCPT + 99 others); Mon, 26 Nov 2018 23:09:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49596 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726206AbeK0EJh (ORCPT ); Mon, 26 Nov 2018 23:09:37 -0500 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 mx1.redhat.com (Postfix) with ESMTPS id 0DF428E3CB; Mon, 26 Nov 2018 17:14:53 +0000 (UTC) Received: from vitty.brq.redhat.com.redhat.com (unknown [10.43.2.155]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 08C3E19C7F; Mon, 26 Nov 2018 17:14:50 +0000 (UTC) From: Vitaly Kuznetsov To: Paolo Bonzini , kvm@vger.kernel.org Cc: Radim =?utf-8?B?S3LEjW3DocWZ?= , linux-kernel@vger.kernel.org, Roman Kagan , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , x86@kernel.org, "Michael Kelley \(EOSG\)" Subject: Re: [PATCH v2 3/4] x86/kvm/hyper-v: direct mode for synthetic timers In-Reply-To: References: <20181126154732.23025-1-vkuznets@redhat.com> <20181126154732.23025-4-vkuznets@redhat.com> Date: Mon, 26 Nov 2018 18:14:49 +0100 Message-ID: <8736rnlq0m.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 26 Nov 2018 17:14:53 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Paolo Bonzini writes: >> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h >> index 2b7a652c9fa4..b8da14cee8e5 100644 >> --- a/include/uapi/linux/kvm.h >> +++ b/include/uapi/linux/kvm.h >> @@ -975,6 +975,7 @@ struct kvm_ppc_resize_hpt { >> #define KVM_CAP_HYPERV_ENLIGHTENED_VMCS 163 >> #define KVM_CAP_EXCEPTION_PAYLOAD 164 >> #define KVM_CAP_ARM_VM_IPA_SIZE 165 >> +#define KVM_CAP_HYPERV_STIMER_DIRECT 166 > > I wonder if all these capabilities shouldn't be replaced by a single > KVM_GET_HYPERV_SUPPORTED_CPUID ioctl, or something like that. If you > can do it for 4.21, before this one cap is crystallized into userspace > API, that would be great. :) Oh, so the suggestion is to get all these features in CPUID format (leafs 0x40000001-0x4000000A at this moment - as Hyper-V encodes them) and let userspace parse them. Could work. Will take a look. Alternatively, we can go with 'something like that' and add a generalized KVM_GET_HYPERV_SUPPORTED_CAPS ioctl (returning somehthing like u64 feature, u64 parameter pair). Doing that, however, wouldn't relieve us from adding a new KVM_CAP_HYPERV_* constant for every new feature. -- Vitaly