All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Eric B Munson <emunson@mgebm.net>
Cc: mingo@redhat.com, hpa@zytor.com, ryanh@linux.vnet.ibm.com,
	aliguori@us.ibm.com, mtosatti@redhat.com, kvm@vger.kernel.org,
	linux-arch@vger.kernel.org, x86@kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4 V13] Add ioctl for KVM_KVMCLOCK_CTRL
Date: Sat, 18 Feb 2012 12:30:59 +0200	[thread overview]
Message-ID: <4F3F7DE3.9000009@redhat.com> (raw)
In-Reply-To: <1329423541-11677-4-git-send-email-emunson@mgebm.net>

On 02/16/2012 10:19 PM, Eric B Munson wrote:
> Now that we have a flag that will tell the guest it was suspended, create an
> interface for that communication using a KVM ioctl.
> +4.70 KVM_KVMCLOCK_CTRL
> +
> +Capability: KVM_CAP_KVMCLOCK_CTRL
> +Architectures: Any that implement pvclocks (currently x86 only)
> +Type: vcpu ioctl
> +Parameters: None
> +Returns: 0 on success, -1 on error
> +
> +This signals to the host kernel that the specified guest is being paused by
> +userspace.  The host will set a flag in the pvclock structure that is checked
> +from the soft lockup watchdog.  The flag is part of the pvclock structure that
> +is shared between guest and host, specifically the second bit of the flags
> +field of the pvclock_vcpu_time_info structure.  It will be set exclusively by
> +the host and read/cleared exclusively by the guest.  The guest operation of
> +checking and clearing the flag must an atomic operation so use of the function
> +check_and_clear_guest_paused() is encouraged, but it could also be done with
> +load-link/store-conditional.  There are two cases where the guest will clear
> +the flag: when the soft lockup watchdog timer resets itself or when a soft
> +lockup is detected.  This ioctl can be called any time after pausing
> +the vcpu, but before it is resumed.
> +
>

Sorry to see this go into v15, but this splits the pvclock abi
documentation into two pieces.  Please update the master in msr.txt.

Also don't use guest terms (like check_and_clear_guest_paused()) - this
documentation should be usable by other OS writers without resorting to
reading the Linux kernel source.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


  parent reply	other threads:[~2012-02-18 10:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-16 20:18 [PATCH 0/4 V14] Avoid soft lockup message when KVM is stopped by host Eric B Munson
2012-02-16 20:18 ` [PATCH 1/4 V14] Add flag to indicate that a vm was stopped by the host Eric B Munson
2012-02-16 20:18 ` [PATCH 2/4 V14] Add functions to check if the host has stopped the vm Eric B Munson
2012-02-16 20:19 ` [PATCH 3/4 V13] Add ioctl for KVM_KVMCLOCK_CTRL Eric B Munson
2012-02-16 20:22   ` Eric B Munson
2012-02-18 10:30   ` Avi Kivity [this message]
2012-02-16 20:19 ` [PATCH 4/4 V14] Add check for suspended vm in softlockup detector Eric B Munson
  -- strict thread matches above, loose matches on Subject: below --
2012-02-08 15:07 [PATCH 0/4 V13] Avoid soft lockup message when KVM is stopped by host Eric B Munson
2012-02-08 15:07 ` [PATCH 3/4 V13] Add ioctl for KVM_KVMCLOCK_CTRL Eric B Munson
2012-02-16 14:11   ` Avi Kivity

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=4F3F7DE3.9000009@redhat.com \
    --to=avi@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=emunson@mgebm.net \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=ryanh@linux.vnet.ibm.com \
    --cc=x86@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.