Received: by 10.223.164.202 with SMTP id h10csp2364838wrb; Sat, 18 Nov 2017 20:20:47 -0800 (PST) X-Google-Smtp-Source: AGs4zMZKoBAXkYwQidXMqrvqJWoNJIAcBd6bkrgwUrWQ7ywzyl9Qqr8mM91a/ninDpqpTjUdbYmn X-Received: by 10.101.69.141 with SMTP id o13mr3068134pgq.125.1511065247581; Sat, 18 Nov 2017 20:20:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511065247; cv=none; d=google.com; s=arc-20160816; b=XuA5F6i+Unf1YsCtrApJdqvVTIbNVuAbe2VsRwYKhJ2NsO3srf5cQvYGwmewYKEiwL CYKK8XlsjZr5z7uB7qosV6S1GWrTENj4dTTcn2JPL74St+whS+d4T6jdp1MFYVxlLI3m vbS+9I38GnrKGmoAptjxVMjojFlRH5Sj9FR9Um4gZ1R+DPTaztqXFGQTJGmG6MD7Vhj/ msKWpHsa8qGnmCENOw8Gm2f4pX4pFDNFxWC1v2qNUqsR0UEg3JX/FrjJYlCseeghs3e2 bNGLdMtikkh9sNxr02OWI6m5IIf4sBs6xKCC0tPqLUY9IaLtItgt7EY0hJ67JBLVnlNd 61Bw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=4MgbefZgJq5slJPYJus2WLrTVa4BAq37qe3tvIr/fm0=; b=qD+Avy093VORkoOJAbuX8S42iI1a3++bwl43A0SerX4L+MzDZRjd8CJev3nT3wnOkT zKxMhbV7g+7kXwlhEVXrS6miKlQ5Tlj1uD5iZBIwt+cT3+sN/GdFt+lytvSCfHfZFQ48 s8YCmY1rokzCKE3PJ9+uwA3nkhXY65dlnhs+Dg7DjnJfNC9EIRAANu7BCNqCA7yGZ5Cq QsJINRV159PlIX8osF0laGGaEnUWnjBUJl8PjwGOwhM0XvZ6L0WeaY3DrnrqbI1zso1/ vd6N7R0QKBpHf9QDhLoXQot/8odk9LgQZJRe3K//QDRPKCrDQWBcFv1fxLm2ZiFv4c5R gesQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b80si4329620pfe.323.2017.11.18.20.20.35; Sat, 18 Nov 2017 20:20:47 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1163810AbdKRTY0 (ORCPT + 92 others); Sat, 18 Nov 2017 14:24:26 -0500 Received: from mout.web.de ([212.227.15.14]:55660 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163799AbdKRTYT (ORCPT ); Sat, 18 Nov 2017 14:24:19 -0500 Received: from md1f2u6c.ww002.siemens.net ([95.157.57.47]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Lrb4v-1fJGwf2j5J-013RI6; Sat, 18 Nov 2017 20:23:12 +0100 Subject: Re: [PATCH 05/10] x86: jailhouse: Set up timekeeping To: Thomas Gleixner Cc: Ingo Molnar , "H . Peter Anvin" , x86@kernel.org, Linux Kernel Mailing List , jailhouse-dev@googlegroups.com References: <62f3fde8db44e5aedf934b5a753d448979f50082.1510817211.git.jan.kiszka@siemens.com> From: Jan Kiszka Message-ID: <12f18935-51a5-08a1-bf72-42e3367a2f87@web.de> Date: Sat, 18 Nov 2017 20:23:10 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:0gh6NyrA0nMoHjFvYY2UXkONinEmGUGW9qrOS7u8SkDgZn+KK8V dxuFIA2slMCYbEfHVxb545v+9/i0dQWJyGuPPiibB9sW13J76eWl35xWfTIjtHb0JWlaW2S /ISnjFo3ANecwUiH2RY0+2Anq8Ep6/XiprYHEEi/a+b+delSeoYK4yYat1/J7BkFNHV5SR+ VAREVneWim68Ji5kyximw== X-UI-Out-Filterresults: notjunk:1;V01:K0:ltWY+QYmwXU=:qISBrnUqOAExU+nWhfXQPs xpF8oL6/PR2j1voL1NYHWuSEgD+d9OCN8Qp9dN22kUFlX/1HeAnekUsp8j3wiErEWWoQ9W5nl UF9cE/PtFWs8b3UC7KKsOOUcsC1brLxuWip2JqAhnbdonyR4NY5D8gdRVNW4N/GoxIGiebDD5 KryzJV3s8PKx645VJxgNJLiCxK2SKGfpaOwPjtDok/pNZAGVSeI64vuCnOFVARV+hW0BMXzdN NChu+qk2c8ejFZEE1Kjaky84vrU+p2ojitI+qjQdDpUf2JIVuZj9hlGf85CVCDhzu2Dz5FcEt q8YcK6foF47P6btgu5emUfWFuNxzmyKui170r8BjakrLGIEUTTIcm9MI4K9PoSDTwJv0Y2hw1 5mIUA5CE3aHrwDYKbeYsyXq3oATRA2TlgmmBZpJDnd4DbSDFOhLtysh2Sotm1j4dJGF4roFk/ qIr2vIgChDte69Hkj32aaNxCcNx4QrS/G4BB7xxPnRQoCUVA000lPKTcdhQ9S4tr9Hlrbgzis iQhEeubsb+Rx3g1oensUlf+zfYEsLy7xFw7ocKPeQmEHRdda9/Z3AQrIipSknHeFSE0xeMr7c OgEZs+GtWpQKNdr1QytNOflCOgJSKeLB4NMtVsd+pCHHie2Q8ShLXFIrXAwu96ufLM2WvruVO inqW9dy36kN037c6l/ebF/vVZWToH6k0cy0UeN/nuFk917VS78iqoapYttX1GBJ5wXipPjG8/ bqSo032eRv2Dnc3/JuPdNsOwvPsLs2HtoPTSQ+aS2UPoodM2ixXzXHKHuMz3o0fgK0ut/dfSf 6awms9Ne40Wbmjl7zCQHPTFXZyRdVx8YxdKrKeF8z58LWFd0JY= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017-11-17 23:49, Thomas Gleixner wrote: > On Thu, 16 Nov 2017, Jan Kiszka wrote: >> Calibrate the TSC and, where necessary, the APIC timer against the >> TMTIMER. We need our own implementation as neither the PIC nor the HPET >> are available, and the standard calibration routines try to make use of >> them. > > Why is this needed at all? > > The host the frequency already. So this can be done w/o pmtimer and extra > calibration routine. The hypervisor does not have the frequencies. It will never use the APIC timer (it's owned by the guests), and it has no use case for the TSC so far. Only the root cell (the Linux that booted the system) has that data. Now we could - trust the root cell to provide the right values and export them during startup to the hypervisor and from there to the non-root cells. - calculate the frequencies once and store them in the hyperivsor config, just like other system-specific information, for re-export to the cells. But I don't think option 1 will be ok for all use cases. Maybe a combination of both, falling back to the root cell data if nothing is defined in the config. Let me think about this. Jan From 1584427906613232651@xxx Sat Nov 18 18:03:20 +0000 2017 X-GM-THRID: 1584208245671673621 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread