From: Jan Kiszka <jan.kiszka@siemens.com>
To: Eric B Munson <emunson@mgebm.net>
Cc: avi@redhat.com, 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 2/4 V16] Add functions to check if the host has stopped the vm
Date: Wed, 14 Mar 2012 11:12:35 +0100 [thread overview]
Message-ID: <4F606F13.1040704@siemens.com> (raw)
In-Reply-To: <1331408248-6781-3-git-send-email-emunson@mgebm.net>
On 2012-03-10 20:37, Eric B Munson wrote:
> When a host stops or suspends a VM it will set a flag to show this. The
> watchdog will use these functions to determine if a softlockup is real, or the
> result of a suspended VM.
>
...
> diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c
> index f8492da..4ba090c 100644
> --- a/arch/x86/kernel/kvmclock.c
> +++ b/arch/x86/kernel/kvmclock.c
> @@ -22,6 +22,7 @@
> #include <asm/msr.h>
> #include <asm/apic.h>
> #include <linux/percpu.h>
> +#include <linux/hardirq.h>
>
> #include <asm/x86_init.h>
> #include <asm/reboot.h>
> @@ -114,6 +115,26 @@ static void kvm_get_preset_lpj(void)
> preset_lpj = lpj;
> }
>
> +bool kvm_check_and_clear_guest_paused(void)
> +{
> + bool ret = false;
> + struct pvclock_vcpu_time_info *src;
> +
> + /*
> + * per_cpu() is safe here because this function is only called from
> + * timer functions where preemption is already disabled.
> + */
> + WARN_ON(!in_atomic());
> + src = &__get_cpu_var(hv_clock);
> + if ((src->flags & PVCLOCK_GUEST_STOPPED) != 0) {
> + __this_cpu_and(hv_clock.flags, ~PVCLOCK_GUEST_STOPPED);
> + ret = true;
> + }
> +
> + return ret;
> +}
> +EXPORT_SYMBOL_GPL(kvm_check_and_clear_guest_paused);
Which module is going to use this? I failed to find it, but I may have
missed something.
The actual reason for this reply: this patches causes a compiler warning
here, likely due to lacking include for EXPORT_SYMBOL_GPL:
CC arch/x86/kernel/kvmclock.o
/data/linux-kvm/arch/x86/kernel/kvmclock.c:136:1: warning: data
definition has no type or storage class
/data/linux-kvm/arch/x86/kernel/kvmclock.c:136:1: warning: type defaults
to ‘int’ in declaration of ‘EXPORT_SYMBOL_GPL’
/data/linux-kvm/arch/x86/kernel/kvmclock.c:136:1: warning: parameter
names (without types) in function declaration
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2012-03-14 10:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-10 19:37 [PATCH 0/4 V16] Avoid soft lockup message when KVM is stopped by host Eric B Munson
2012-03-10 19:37 ` [PATCH 1/4 V16] Add flag to indicate that a vm was stopped by the host Eric B Munson
2012-03-10 19:37 ` [PATCH 2/4 V16] Add functions to check if the host has stopped the vm Eric B Munson
2012-03-14 10:12 ` Jan Kiszka [this message]
2012-03-15 13:17 ` Eric B Munson
2012-03-15 22:14 ` Eric B Munson
2012-03-10 19:37 ` [PATCH 3/4 V16] Add ioctl for KVM_KVMCLOCK_CTRL Eric B Munson
2012-03-10 19:37 ` [PATCH 4/4 V16] Add check for suspended vm in softlockup detector Eric B Munson
2012-03-14 0:22 ` [PATCH 0/4 V16] Avoid soft lockup message when KVM is stopped by host Marcelo Tosatti
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=4F606F13.1040704@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=aliguori@us.ibm.com \
--cc=avi@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox