linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joshua Abraham <j.abraham1776@gmail.com>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: pbonzini@redhat.com, corbet@lwn.net, kvm@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] docs: kvm: Fix KVM_KVMCLOCK_CTRL API doc
Date: Fri, 1 May 2020 16:32:34 -0400	[thread overview]
Message-ID: <20200501203234.GA20693@josh-ZenBook> (raw)
In-Reply-To: <20200501201836.GB4760@linux.intel.com>

On Fri, May 01, 2020 at 01:18:36PM -0700, Sean Christopherson wrote:
> No, the current documentation is correct.  It's probably not as clear as
> it could be, but it's accurate as written.  More below.
> 
> The ioctl() signals to the host kernel that host userspace has paused the
> vCPU.
> 
> >  The host will set a flag in the pvclock structure that is checked
> 
> The host kernel, i.e. KVM, then takes that information and forwards it to
> the guest kernel via the aforementioned pvclock flag.
> 
> The proposed change would imply the ioctl() is somehow getting routed
> directly to the guest, which is wrong.

The rationale is that the guest is what consumes the pvclock flag, the
host kernel does nothing interesting (from the API caller perspective) 
besides setting up the kvmclock update. The ioctl calls kvm_set_guest_paused() 
which even has a comment saying "[it] indicates to the guest kernel that it has 
been stopped by the hypervisor." I think that the docs first sentence should 
clearly reflect that the API tells the guest that it has been paused. 

-Josh

  reply	other threads:[~2020-05-01 20:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-01 19:34 [PATCH] docs: kvm: Fix KVM_KVMCLOCK_CTRL API doc Joshua Abraham
2020-05-01 20:18 ` Sean Christopherson
2020-05-01 20:32   ` Joshua Abraham [this message]
2020-05-01 20:51     ` Sean Christopherson
2020-05-01 21:10       ` Joshua Abraham
2020-05-01 21:38         ` Sean Christopherson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200501203234.GA20693@josh-ZenBook \
    --to=j.abraham1776@gmail.com \
    --cc=corbet@lwn.net \
    --cc=kvm@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).