From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [Qemu-devel] [PATCH 2/2] Expose tsc deadline timer cpuid to guest Date: Fri, 20 Apr 2012 17:19:17 +0200 Message-ID: <4F917E75.2080003@siemens.com> References: <4F55E39F.6020608@siemens.com> <4F67B4C9.3010502@redhat.com> <20120320133314.GV9375@otherpad.lan.raisama.net> <20120323134607.GF9375@otherpad.lan.raisama.net> <20120419200331.GB19463@otherpad.lan.raisama.net> <4F913696.20301@siemens.com> <20120420150005.GW3169@otherpad.lan.raisama.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "Liu, Jinsong" , "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" , Avi Kivity To: Eduardo Habkost Return-path: Received: from thoth.sbs.de ([192.35.17.2]:18459 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753824Ab2DTPT2 (ORCPT ); Fri, 20 Apr 2012 11:19:28 -0400 In-Reply-To: <20120420150005.GW3169@otherpad.lan.raisama.net> Sender: kvm-owner@vger.kernel.org List-ID: On 2012-04-20 17:00, Eduardo Habkost wrote: > On Fri, Apr 20, 2012 at 12:12:38PM +0200, Jan Kiszka wrote: >> On 2012-04-19 22:03, Eduardo Habkost wrote: >>> Jan/Avi: ping? >>> >>> I would like to get this ABI detail clarified so it can be implemented >>> the right way on Qemu and KVM. >>> >>> My proposal is to simply add tsc-deadline to the data returned by >>> GET_SUPPORTED_CPUID, making KVM_CAP_TSC_DEADLINE_TIMER unnecessary. >>> >> >> IIRC, there were problems with this model to exclude that the feature >> gets reported this way without ensuring that in-kernel irqchip is >> actually activated. Please browse the discussions, it should be >> documented there. > > The flag was never added to GET_SUPPORTED_CPUID on any of the git > repositories I have checked, and I don't see that being done anywhere on > my KVM mailing list archives, either. So I don't see how we could have > had issues with GET_SUPPORTED_CPUID, if it was never present on the > code. > > What was present on the code before the fix, was coded that > unconditinally enabled the flag even if Qemu never asked for it, and > that really was wrong. > > GET_SUPPORTED_CPUID doesn't enable any flag: it just tells userspace > that the hardware and KVM supports the feature (and, surprise, this is > exactly what KVM_CAP_TSC_DEADLINE_TIMER means too, isn't it?). It's up > to userspace to enable the CPUID bits according to user requirements and > userspace capabilities (in other words: only when userspace knows it is > safe because the in-kernel irqchip is enabled). > > If the above is not what GET_SUPPORTED_CPUID means, I would like to get > that clarified, so I can submit an updated to KVM API documentation. Does old userspace filter out flags from GET_SUPPORTED_CPUID that it does not understand? Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux