From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751820AbdJBU7L (ORCPT ); Mon, 2 Oct 2017 16:59:11 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:17018 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751477AbdJBU7K (ORCPT ); Mon, 2 Oct 2017 16:59:10 -0400 Subject: Re: [PATCH v5 3/4] x86/xen/time: setup vcpu 0 time info page To: Boris Ostrovsky References: <20171002183122.3961-1-joao.m.martins@oracle.com> <20171002183122.3961-4-joao.m.martins@oracle.com> <5eb802fb-c802-b501-9182-3e18af8b8651@oracle.com> Cc: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Juergen Gross , Andy Lutomirski From: Joao Martins Message-ID: <62e11cdf-5411-1692-1103-a436581411a6@oracle.com> Date: Mon, 2 Oct 2017 21:58:42 +0100 MIME-Version: 1.0 In-Reply-To: <5eb802fb-c802-b501-9182-3e18af8b8651@oracle.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/02/2017 07:44 PM, Boris Ostrovsky wrote: > >> + >> +static void xen_setup_vsyscall_time_info(void) >> +{ >> + struct vcpu_register_time_memory_area t; >> + struct pvclock_vsyscall_time_info *ti; >> + int ret; > > > In the previous version you'd return immediately if > PVCLOCK_TSC_STABLE_BIT was not set. Don't you still need to check this? > Especially give... > Yes, my mistake. When moving the primary info check I changed the comment below, but should have moved the call to xen_setup_vsyscall_time_info() into the newly added if () clause added in the previous patch. Let me move that inside the conditional and respin in v6. Joao > >> + >> + ti = (struct pvclock_vsyscall_time_info *)get_zeroed_page(GFP_KERNEL); >> + if (!ti) >> + return; >> + >> + t.addr.v = &ti->pvti; >> + >> + ret = HYPERVISOR_vcpu_op(VCPUOP_register_vcpu_time_memory_area, 0, &t); >> + if (ret) { >> + pr_notice("xen: VCLOCK_PVCLOCK not supported (err %d)\n", ret); >> + free_page((unsigned long)ti); >> + return; >> + } >> + >> + /* >> + * If primary time info had this bit set, secondary should too since > > ... this comment? > > -boris