Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5434655ybp; Mon, 14 Oct 2019 22:41:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwbG9nfKAAj3atFa2XbslLgF0EooSfWqDVhfQ4M2xP5dp3JLKpS6ClBF5iNNKVHsRNMVE39 X-Received: by 2002:a17:906:1c87:: with SMTP id g7mr33369421ejh.189.1571118064189; Mon, 14 Oct 2019 22:41:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571118064; cv=none; d=google.com; s=arc-20160816; b=UV2baXr0hHNJ091xfsPyQu4dd4jVHA9OH+yuy3xAbtNFryR4RY8rWN/eMu9JBYtrSn XElOHwyJDDk5FM+6gXBNrxHfWs9cACgKBvO+4DBNV0siD8XsgFW73xKxBNdTCQ5ahnqU YSQzeawLfOqn6yYdvo3GupC2+yyXy3lt0W8Um1CM0843idKmYVc5lhXo+5iV6rk1cI1z 3dA6DHNyr0mGcyDAlWXPjVkesmdjCaTAsNTeOjfRmvRj7ahIQ3qrkFjOTqSsUXZ1CtS3 rG2qEE7tipL2sgju4p8N4Ii/E3I4Dt9Pmuy05FQ/J8OxwZ2vbL8+lcxV2P/zc44raXtm Q+FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=i6t9RMGHc/zO7LCeOmHD7XR3AZ36qNLpZlad/3/Z52E=; b=YS7vDWo0hP0a4TF73+UNym8z70PXQ46MiujD3lGXF47+Bjd8POFBiCZ1SSTH/IPt68 gtU8Krg0IDurFP+WyVzlcGiLrcL3bpNCHBCD7PslQx+zlnf0xwHunqJngTUV5VoJlQSo IRAY7kQsdZpuGQtE5Iy2teNVw1Hl5RQ5fFfQtJ8n7QXudyYT7CZYT1GIHKfMsMiPOWgr BVn3Vbkz4SOxp3swkLAk85PjrLI+hbKdwWl82IXomR+VCn4knV586Ea6CX8u2L2iO5a9 Jc9TmmZ1TslB9kcqiOtPGxs1pzM1S6mtOeWR26lTHIper5g/dsYg75SxC+79tozYBisY +8Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gImz5ixe; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e7si12258378edn.267.2019.10.14.22.40.40; Mon, 14 Oct 2019 22:41:04 -0700 (PDT) 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; dkim=pass header.i=@google.com header.s=20161025 header.b=gImz5ixe; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728169AbfJOFI7 (ORCPT + 99 others); Tue, 15 Oct 2019 01:08:59 -0400 Received: from mail-yw1-f67.google.com ([209.85.161.67]:43460 "EHLO mail-yw1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728156AbfJOFI7 (ORCPT ); Tue, 15 Oct 2019 01:08:59 -0400 Received: by mail-yw1-f67.google.com with SMTP id q7so6889057ywe.10 for ; Mon, 14 Oct 2019 22:08:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=i6t9RMGHc/zO7LCeOmHD7XR3AZ36qNLpZlad/3/Z52E=; b=gImz5ixetP5a1/XCuyRvVC57azoCau3LhWfW90lMeWH+kidkAgUDL7Q/Bj1LJMHQAm KwL78FnQ4MgNvuTxWLeG5AEueSM7pVPnrMXV3vNok3qgWGzxkYwSbf7HT5qkT0ovJ999 6XgCpq5zOoTMOTzhA8lWz5N8QwSfo0WXsf9ZIlkcZgNW3hgg72eHWRXW9ql4u9Frms6c ZzGJK8KeKlkRGTfkcxGzwmmaKooEEFZj6Njm+1qI1oHiV3hCvZ9F4+URj2yBVlaJJl3o yWfbVh7INl9P+x5Qt/K/KbF8Qp38VYiC1BMcqMy6IrC8ySDcKJnhartsscPR8uzKO24t BxEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=i6t9RMGHc/zO7LCeOmHD7XR3AZ36qNLpZlad/3/Z52E=; b=BPld4q2vN+WWoM69KS93KSb+fyDBEmvugCqPlmaCAUKTz8AKpoOcsVVSNR7/dts5c+ 3ttf+WgrV3BvfEm+UEUwtipnwwdP0NbTpqHiXLtF3UyqMvHzYnmyFJrYTqA5JJCa+i/8 EpBa+VCMLv9lXIqSOrrQt43BhKmh1Pr7dTrFwMkTIw3zZC7BD3UqmtzLxmRH08xOj7lt joR9gmfP9nG+S3s8GjxzOEO4cSWtM0H/C+vPQ6nWTYTyupvaFOVaJdBgkrhH4Xs9wWxW FQLRXLaAlAc4it6y0APbgLGK0szrdotOYijyjspxuKmwT878FLrR8O3xUZfO6jBN+V4B rQMQ== X-Gm-Message-State: APjAAAXAK1XjqReJeKbqgnksSzxvYayfC/W38Sc+wYZ1YI0hUyHnpRLx /iTnphyY7WLDr9opjb2q7z6t6gdipdFzZgUURh/FgA== X-Received: by 2002:a81:996:: with SMTP id 144mr16039071ywj.57.1571116137749; Mon, 14 Oct 2019 22:08:57 -0700 (PDT) MIME-Version: 1.0 References: <20191010073055.183635-1-suleiman@google.com> <20191010103939.GA12088@rkaganb.sw.ru> In-Reply-To: <20191010103939.GA12088@rkaganb.sw.ru> From: Suleiman Souhlal Date: Tue, 15 Oct 2019 14:08:46 +0900 Message-ID: Subject: Re: [RFC v2 0/2] kvm: Use host timekeeping in guest. To: Roman Kagan Cc: "pbonzini@redhat.com" , "rkrcmar@redhat.com" , "tglx@linutronix.de" , "john.stultz@linaro.org" , "sboyd@kernel.org" , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "ssouhlal@freebsd.org" , "tfiga@chromium.org" , "vkuznets@redhat.com" , konrad.wilk@oracle.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 10, 2019 at 7:39 PM Roman Kagan wrote: > > I wonder how feasible it is to map the host's vdso into the guest and > thus make the guest use the *same* (as opposed to "synchronized") clock > as the host's userspace? Another benefit is that it's essentially an > ABI so is not changed as liberally as internal structures like > timekeeper, etc. There is probably certain complication in handling the > syscall fallback in the vdso when used in the guest kernel, though. > > You'll also need to ensure neither tsc scaling and nor offsetting is > applied to the VM once this clock is enabled. That is what I initially wanted to do, but I couldn't find an easy way to map a host page into the guest, outside of the regular userspace (ioctl) KVM way of adding memory to a VM. -- Suleiman