[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20111201213256.GC8803@mgebm.net>
Date: Thu, 1 Dec 2011 16:32:56 -0500
From: Eric B Munson <emunson@...bm.net>
To: Marcelo Tosatti <mtosatti@...hat.com>
Cc: Jan Kiszka <jan.kiszka@...mens.com>,
"qemu-devel@...gnu.org" <qemu-devel@...gnu.org>,
"ryanh@...ux.vnet.ibm.com" <ryanh@...ux.vnet.ibm.com>,
"aliguori@...ibm.com" <aliguori@...ibm.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"avi@...hat.com" <avi@...hat.com>
Subject: Re: [PATCH] Guest stop notification
On Thu, 01 Dec 2011, Marcelo Tosatti wrote:
> On Thu, Dec 01, 2011 at 06:36:17PM +0100, Jan Kiszka wrote:
> > On 2011-12-01 18:22, Eric B Munson wrote:
> > > On Thu, 01 Dec 2011, Jan Kiszka wrote:
> > >
> > >> On 2011-11-29 22:36, Eric B Munson wrote:
> > >>> Often when a guest is stopped from the qemu console, it will report spurious
> > >>> soft lockup warnings on resume. There are kernel patches being discussed that
> > >>> will give the host the ability to tell the guest that it is being stopped and
> > >>> should ignore the soft lockup warning that generates.
> > >>>
> > >>> Signed-off-by: Eric B Munson <emunson@...bm.net>
> > >>> Cc: ryanh@...ux.vnet.ibm.com
> > >>> Cc: aliguori@...ibm.com
> > >>> Cc: mtosatti@...hat.com
> > >>> Cc: avi@...hat.com
> > >>> Cc: kvm@...r.kernel.org
> > >>> Cc: linux-kernel@...r.kernel.org
> > >>> ---
> > >>> target-i386/kvm.c | 6 ++++++
> > >>> 1 files changed, 6 insertions(+), 0 deletions(-)
> > >>>
> > >>> diff --git a/target-i386/kvm.c b/target-i386/kvm.c
> > >>> index 5bfc21f..defd364 100644
> > >>> --- a/target-i386/kvm.c
> > >>> +++ b/target-i386/kvm.c
> > >>> @@ -336,12 +336,18 @@ static int kvm_inject_mce_oldstyle(CPUState *env)
> > >>> return 0;
> > >>> }
> > >>>
> > >>> +static void kvm_put_guest_paused(CPUState *penv)
> > >>> +{
> > >>> + kvm_vcpu_ioctl(penv, KVM_GUEST_PAUSED, 0);
> > >>> +}
> > >>
> > >> I see no need in encapsulating this in a separate function.
> > >>
> > >>> +
> > >>> static void cpu_update_state(void *opaque, int running, RunState state)
> > >>> {
> > >>> CPUState *env = opaque;
> > >>>
> > >>> if (running) {
> > >>> env->tsc_valid = false;
> > >>> + kvm_put_guest_paused(env);
> > >>
> > >> checkpatch.pl would have asked you to remove this tab.
> > >>
> > >> More general:
> > >>
> > >> Why is this x86-only? If the kernel interface is x86-only, what prevents
> > >> making it generic right from the beginning?
> > >
> > > Sorry, missed this question on the first pass, this is x86 only because the
> > > flag used lives in the pvclock structure. AFAICT, there aren't any other
> > > architectures out there that implement paravirtualized clocks yet.
> >
> > That's an implementation "detail" of the kernel. The interface (IOCTL or
> > kvm_run field) is generic, no?
> >
> > I would just fire this notification from generic code, evaluate the
> > error (that was lacking so far), and only report it if it's something
> > else than "not supported".
>
> Yes, it should live in hw/kvmclock.c preferably.
>
Okay, I get a V3 with this moved around out tomorrow.
Thanks for the feedback,
Eric
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists