From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F86EC433EF for ; Fri, 1 Oct 2021 15:40:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2D49961A7B for ; Fri, 1 Oct 2021 15:40:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231986AbhJAPmD (ORCPT ); Fri, 1 Oct 2021 11:42:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231958AbhJAPlz (ORCPT ); Fri, 1 Oct 2021 11:41:55 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85D53C061775 for ; Fri, 1 Oct 2021 08:40:10 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id i25so40300601lfg.6 for ; Fri, 01 Oct 2021 08:40:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iOLU+PCShJG7mENHHZDmXfBtA4qSABTxjGLw2vfUX2M=; b=FTPMXgWBWfgF0X587P8+s1ivBN5zQ86AEsMZsPqUhkAqpZfSYc01006geCHMsZrYSS /BlxSbkGJ2vpnZ+l+ytY+WRa6dTr09YIVuzOENTgTGtsDXx+3BrNnUV1if8FkhPXh1CX Epao7cmUnjwYPTQLUyKy2S7Dfg+J7Fsb6JY7sEuAP6soByMYDsDn4c/n31GS6u+/40/X SPmXvA4hFk37oLYnJI/xMnWxUdgKOQYPVH6zASRx+HECat6x0G8GV2JrS4PdBqBwiB1/ Qralg04VhqUHVAMGM+7ur0MoRrKfP5OB3J6LpSrEgQDkfc/jQrFwocXgzQjTOUj0tGRM PAJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iOLU+PCShJG7mENHHZDmXfBtA4qSABTxjGLw2vfUX2M=; b=eo3a0iyJOvdj3WULuD1HXv8dXaP71isgtXYphgJ4mqBxwiRe+tqNORYwyuwNCUc6cP ewb77vVQ9nxqA/3iKisJ/C91cZUbydKYQPwRxnIgRD0U13Fy6hV3a5CIt4V6NyQqQIKZ fEtiUWk8+IvFKD64QAKcED74N7U2y53Scv1RlAy4BnOnCAXZ/wQG5vXgfwkxdxKmrBdr uXpRVc0hYxe8R/0mjJLbNgxEFID3fi5Qk2YC/YOVbI/M594aTFr8fb3Yk9A5g7X/ZDNk +KpTvuEEBT8m+8+O3eWE65y7wEGu24F0DKZD9StPfGh6//Itk1JU9oHvLn2Sy1sN75DM ARQg== X-Gm-Message-State: AOAM533MIn7E0wafHTp4zJ6HgR8lQEgykx/H7/bDI6pppCW2RqjYNQGK 0xO4iKjPbrPgFlQFLIUwuQAxhw+cAWlQHz5CqvEDvQ== X-Google-Smtp-Source: ABdhPJyIyzUImniAS1WPH/aukNvZr9uNqVUOpo4zsi5GOyk1J8bsugXgDuozoLPp9qcCmCzvYTBMvavb9Z+NJVInTA4= X-Received: by 2002:a2e:95cc:: with SMTP id y12mr12643770ljh.337.1633102808495; Fri, 01 Oct 2021 08:40:08 -0700 (PDT) MIME-Version: 1.0 References: <20210916181538.968978-1-oupton@google.com> <20210916181538.968978-5-oupton@google.com> <746cfc82-ee7c-eba2-4443-7faf53baf083@redhat.com> In-Reply-To: <746cfc82-ee7c-eba2-4443-7faf53baf083@redhat.com> From: Oliver Upton Date: Fri, 1 Oct 2021 08:39:57 -0700 Message-ID: Subject: Re: [PATCH v8 4/7] KVM: x86: Report host tsc and realtime values in KVM_GET_CLOCK To: Paolo Bonzini Cc: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, Sean Christopherson , Marc Zyngier , Peter Shier , Jim Mattson , David Matlack , Ricardo Koller , Jing Zhang , Raghavendra Rao Anata , James Morse , Alexandru Elisei , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, Andrew Jones , Will Deacon , Catalin Marinas Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Fri, Oct 1, 2021 at 7:41 AM Paolo Bonzini wrote: > > On 01/10/21 16:39, Paolo Bonzini wrote: > > On 16/09/21 20:15, Oliver Upton wrote: > >> + if (data.flags & ~KVM_CLOCK_REALTIME) > >> return -EINVAL; > > > > Let's accept KVM_CLOCK_HOST_TSC here even though it's not used; there > > may be programs that expect to send back to KVM_SET_CLOCK whatever they > > got from KVM_GET_CLOCK. > > Nevermind, KVM_SET_CLOCK is already rejecting KVM_CLOCK_TSC_STABLE so no > need to do that! Yeah, I don't know the story on the interface but it is really odd that userspace needs to blow away flags to successfully write the clock structure. -- Thanks, Oliver From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1121DC433EF for ; Fri, 1 Oct 2021 15:40:15 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 6D25A61268 for ; Fri, 1 Oct 2021 15:40:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6D25A61268 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id D0BBB407E7; Fri, 1 Oct 2021 11:40:13 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@google.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9ZnLAuvwoBQN; Fri, 1 Oct 2021 11:40:12 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id ACFAD4083E; Fri, 1 Oct 2021 11:40:12 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 2E537406E7 for ; Fri, 1 Oct 2021 11:40:11 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id q6WgkHrNTsac for ; Fri, 1 Oct 2021 11:40:10 -0400 (EDT) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 2399F405EE for ; Fri, 1 Oct 2021 11:40:10 -0400 (EDT) Received: by mail-lf1-f45.google.com with SMTP id z24so40430278lfu.13 for ; Fri, 01 Oct 2021 08:40:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iOLU+PCShJG7mENHHZDmXfBtA4qSABTxjGLw2vfUX2M=; b=FTPMXgWBWfgF0X587P8+s1ivBN5zQ86AEsMZsPqUhkAqpZfSYc01006geCHMsZrYSS /BlxSbkGJ2vpnZ+l+ytY+WRa6dTr09YIVuzOENTgTGtsDXx+3BrNnUV1if8FkhPXh1CX Epao7cmUnjwYPTQLUyKy2S7Dfg+J7Fsb6JY7sEuAP6soByMYDsDn4c/n31GS6u+/40/X SPmXvA4hFk37oLYnJI/xMnWxUdgKOQYPVH6zASRx+HECat6x0G8GV2JrS4PdBqBwiB1/ Qralg04VhqUHVAMGM+7ur0MoRrKfP5OB3J6LpSrEgQDkfc/jQrFwocXgzQjTOUj0tGRM PAJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iOLU+PCShJG7mENHHZDmXfBtA4qSABTxjGLw2vfUX2M=; b=Ztntwxrxe6zS3Jmw1vZzblvYRt65G70CrqJI225jYbywBX5fHTEGLVlG0ACN8x3OtC aB98YrF3MxUixwwaiM3DVIIIXaMQPQQHx2MnAJTTDOCFwIdPR3VxEHEA4MfEBrUngkFq QR0YwRYDe6tvBBgJMqaNSkISvs7VzJJ8qJqAOYoxiaojFyoCUVNsy2m3QA0E4u78lFLW wNTHyK1PGaGEYKKEf2vnsc0ldKphlitKdc9HFVBS4AhS5kNPA1+IxgT8kNOryWU1SjPv QQXJqdRIzqV4SlzP14+GAQh859lH/bYYf4TsTWYSOq7qwcca7cOqWg0zGJnCyXNwawpu F5Ow== X-Gm-Message-State: AOAM5325XR+QGhkkqgqaaDlwiVjSqc86L/3npWVMC8onWD4KeIRY5RPV i4VLLjEmsJrH59iRTUrutgriGNT3tRp/qmGWxVX4Iw== X-Google-Smtp-Source: ABdhPJyIyzUImniAS1WPH/aukNvZr9uNqVUOpo4zsi5GOyk1J8bsugXgDuozoLPp9qcCmCzvYTBMvavb9Z+NJVInTA4= X-Received: by 2002:a2e:95cc:: with SMTP id y12mr12643770ljh.337.1633102808495; Fri, 01 Oct 2021 08:40:08 -0700 (PDT) MIME-Version: 1.0 References: <20210916181538.968978-1-oupton@google.com> <20210916181538.968978-5-oupton@google.com> <746cfc82-ee7c-eba2-4443-7faf53baf083@redhat.com> In-Reply-To: <746cfc82-ee7c-eba2-4443-7faf53baf083@redhat.com> From: Oliver Upton Date: Fri, 1 Oct 2021 08:39:57 -0700 Message-ID: Subject: Re: [PATCH v8 4/7] KVM: x86: Report host tsc and realtime values in KVM_GET_CLOCK To: Paolo Bonzini Cc: Catalin Marinas , kvm@vger.kernel.org, Will Deacon , Peter Shier , Marc Zyngier , David Matlack , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, Jim Mattson X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Fri, Oct 1, 2021 at 7:41 AM Paolo Bonzini wrote: > > On 01/10/21 16:39, Paolo Bonzini wrote: > > On 16/09/21 20:15, Oliver Upton wrote: > >> + if (data.flags & ~KVM_CLOCK_REALTIME) > >> return -EINVAL; > > > > Let's accept KVM_CLOCK_HOST_TSC here even though it's not used; there > > may be programs that expect to send back to KVM_SET_CLOCK whatever they > > got from KVM_GET_CLOCK. > > Nevermind, KVM_SET_CLOCK is already rejecting KVM_CLOCK_TSC_STABLE so no > need to do that! Yeah, I don't know the story on the interface but it is really odd that userspace needs to blow away flags to successfully write the clock structure. -- Thanks, Oliver _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A69B9C433EF for ; Fri, 1 Oct 2021 15:42:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6753161263 for ; Fri, 1 Oct 2021 15:42:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6753161263 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/LH8QI5tEdcYsuqDfhrG2B96KcNJqIG5mj5LR7zPGp8=; b=Hc4zAVqkmcLnPF JRoWjM3vcuVzxDZjsuUU3PLbj9ysp9bRH3Qb1AO8sTB6Tp7G4eSmj5MmD67hPXXX1fRyq36oFp+qb Y99gTOet7y0h0K4kPkJHrZ38I1qwTZjGr0O1ru7vAog7LzKyLcACBz7UV4HPluBXq1NtAYCyUmfkv uMCf3PuAM+7wCeOyJx1jBPqYurAzXSbU7YwhhKHWDzJdudt6ZJunqPCRurHSy1Cy4CKtEiqewnG5m hyel1+jnVZsWCTX53WICUBUsJdFph2LcpLRKfr9rQTEob1a3cB4qi5NsHUS3Cw3/YOqSL0wjasilC Zi3xJuANGJ16KImSId5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mWKe0-000krD-3w; Fri, 01 Oct 2021 15:40:16 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mWKdv-000kqO-Ku for linux-arm-kernel@lists.infradead.org; Fri, 01 Oct 2021 15:40:13 +0000 Received: by mail-lf1-x130.google.com with SMTP id y23so1059498lfb.0 for ; Fri, 01 Oct 2021 08:40:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iOLU+PCShJG7mENHHZDmXfBtA4qSABTxjGLw2vfUX2M=; b=FTPMXgWBWfgF0X587P8+s1ivBN5zQ86AEsMZsPqUhkAqpZfSYc01006geCHMsZrYSS /BlxSbkGJ2vpnZ+l+ytY+WRa6dTr09YIVuzOENTgTGtsDXx+3BrNnUV1if8FkhPXh1CX Epao7cmUnjwYPTQLUyKy2S7Dfg+J7Fsb6JY7sEuAP6soByMYDsDn4c/n31GS6u+/40/X SPmXvA4hFk37oLYnJI/xMnWxUdgKOQYPVH6zASRx+HECat6x0G8GV2JrS4PdBqBwiB1/ Qralg04VhqUHVAMGM+7ur0MoRrKfP5OB3J6LpSrEgQDkfc/jQrFwocXgzQjTOUj0tGRM PAJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iOLU+PCShJG7mENHHZDmXfBtA4qSABTxjGLw2vfUX2M=; b=3VE9SsRKDGAewyzwZdDmkSUh6BLVUSrYTyMAlF8YRfyWf14wEtJI3gbDEHeqD/jZbK x9LBlHDhIl0GULbIqFW8jKn/JxODynnXtCYXii3Bw26iTrrCbayVdlNLhzBgRvtOjpQJ Wc4+1/ROtI9iRfwZUgXG2Ti3nmIAGcgY3H9oloJW1hwO7Kpzp/C520P9ok5YrZ9jAnnx zfPNlyRIq1HWB+2bXzBPtEOJAAwBQAW5R1fskPSGkKKWG4uaXsAyVrBO5l5nZTXuC1Nn MqdjnwNJJdqfS4z9Hr6UTall+1rmCSHj0dWO93fwhjGbr/lTgXEQnzfDmjPAOcgdOOGb mVLw== X-Gm-Message-State: AOAM530sP02yE14+PV978GKcNg3A7O2i3fdlgRn9DKMWeBi0mrTcX30k zF1wK9WRKxV4H1U17kvm0hS9K9w1qwHe7jIAxfzpPg== X-Google-Smtp-Source: ABdhPJyIyzUImniAS1WPH/aukNvZr9uNqVUOpo4zsi5GOyk1J8bsugXgDuozoLPp9qcCmCzvYTBMvavb9Z+NJVInTA4= X-Received: by 2002:a2e:95cc:: with SMTP id y12mr12643770ljh.337.1633102808495; Fri, 01 Oct 2021 08:40:08 -0700 (PDT) MIME-Version: 1.0 References: <20210916181538.968978-1-oupton@google.com> <20210916181538.968978-5-oupton@google.com> <746cfc82-ee7c-eba2-4443-7faf53baf083@redhat.com> In-Reply-To: <746cfc82-ee7c-eba2-4443-7faf53baf083@redhat.com> From: Oliver Upton Date: Fri, 1 Oct 2021 08:39:57 -0700 Message-ID: Subject: Re: [PATCH v8 4/7] KVM: x86: Report host tsc and realtime values in KVM_GET_CLOCK To: Paolo Bonzini Cc: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, Sean Christopherson , Marc Zyngier , Peter Shier , Jim Mattson , David Matlack , Ricardo Koller , Jing Zhang , Raghavendra Rao Anata , James Morse , Alexandru Elisei , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, Andrew Jones , Will Deacon , Catalin Marinas X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211001_084011_702600_B1DA3A2D X-CRM114-Status: GOOD ( 13.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Oct 1, 2021 at 7:41 AM Paolo Bonzini wrote: > > On 01/10/21 16:39, Paolo Bonzini wrote: > > On 16/09/21 20:15, Oliver Upton wrote: > >> + if (data.flags & ~KVM_CLOCK_REALTIME) > >> return -EINVAL; > > > > Let's accept KVM_CLOCK_HOST_TSC here even though it's not used; there > > may be programs that expect to send back to KVM_SET_CLOCK whatever they > > got from KVM_GET_CLOCK. > > Nevermind, KVM_SET_CLOCK is already rejecting KVM_CLOCK_TSC_STABLE so no > need to do that! Yeah, I don't know the story on the interface but it is really odd that userspace needs to blow away flags to successfully write the clock structure. -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel