From: Jan Kiszka <jan.kiszka@siemens.com>
To: Eric B Munson <emunson@mgebm.net>
Cc: "ryanh@linux.vnet.ibm.com" <ryanh@linux.vnet.ibm.com>,
"aliguori@us.ibm.com" <aliguori@us.ibm.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"mtosatti@redhat.com" <mtosatti@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"avi@redhat.com" <avi@redhat.com>
Subject: Re: [PATCH] Guest stop notification
Date: Thu, 01 Dec 2011 18:35:17 +0100 [thread overview]
Message-ID: <4ED7BAD5.8020105@siemens.com> (raw)
In-Reply-To: <20111201171938.GA8803@mgebm.net>
On 2011-12-01 18:19, 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@mgebm.net> Cc:
>>> ryanh@linux.vnet.ibm.com Cc: aliguori@us.ibm.com Cc:
>>> mtosatti@redhat.com Cc: avi@redhat.com Cc: kvm@vger.kernel.org
>>> Cc: linux-kernel@vger.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.
>>
>
> The encapsulated function was from a previous idea, I will remove
> it for V2.
>
>>> + 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.
>
> Will change to spaces for V2.
>
>>
>> More general:
>>
>> Why is this x86-only? If the kernel interface is x86-only, what
>> prevents making it generic right from the beginning?
>>
>> Why do we need a new IOCTL for this? Was there no space left in
>> the kvm_run structure e.g. to pass this flag down on next vcpu
>> execution? No big deal, just wondering.
>
> Thanks for your review/feedback.
>
> When I started looking into this problem, the ioctl was the first
> suggestion I got for how to communicate from qemu to guest kernel.
> I don't see a technical reason that this could not be added to the
> kvm_run structure in one of the bytes currently used as padding. I
> would prefer to keep the ioctl because I have the corresponding
> kernel patches out to work with this, however, if there is a strong
> preference for using kvm_run, I can rework both sets.
My feeling is that a run field would be more elegant, but I might be
wrong on this as well. In any case: You need KVM_CAP in your kernel
interface to announce the new feature and you have to sync in the new
kernel header into QEMU to make it build.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
WARNING: multiple messages have this Message-ID (diff)
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Eric B Munson <emunson@mgebm.net>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"ryanh@linux.vnet.ibm.com" <ryanh@linux.vnet.ibm.com>,
"aliguori@us.ibm.com" <aliguori@us.ibm.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"mtosatti@redhat.com" <mtosatti@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"avi@redhat.com" <avi@redhat.com>
Subject: Re: [PATCH] Guest stop notification
Date: Thu, 01 Dec 2011 18:35:17 +0100 [thread overview]
Message-ID: <4ED7BAD5.8020105@siemens.com> (raw)
In-Reply-To: <20111201171938.GA8803@mgebm.net>
On 2011-12-01 18:19, 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@mgebm.net> Cc:
>>> ryanh@linux.vnet.ibm.com Cc: aliguori@us.ibm.com Cc:
>>> mtosatti@redhat.com Cc: avi@redhat.com Cc: kvm@vger.kernel.org
>>> Cc: linux-kernel@vger.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.
>>
>
> The encapsulated function was from a previous idea, I will remove
> it for V2.
>
>>> + 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.
>
> Will change to spaces for V2.
>
>>
>> More general:
>>
>> Why is this x86-only? If the kernel interface is x86-only, what
>> prevents making it generic right from the beginning?
>>
>> Why do we need a new IOCTL for this? Was there no space left in
>> the kvm_run structure e.g. to pass this flag down on next vcpu
>> execution? No big deal, just wondering.
>
> Thanks for your review/feedback.
>
> When I started looking into this problem, the ioctl was the first
> suggestion I got for how to communicate from qemu to guest kernel.
> I don't see a technical reason that this could not be added to the
> kvm_run structure in one of the bytes currently used as padding. I
> would prefer to keep the ioctl because I have the corresponding
> kernel patches out to work with this, however, if there is a strong
> preference for using kvm_run, I can rework both sets.
My feeling is that a run field would be more elegant, but I might be
wrong on this as well. In any case: You need KVM_CAP in your kernel
interface to announce the new feature and you have to sync in the new
kernel header into QEMU to make it build.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
WARNING: multiple messages have this Message-ID (diff)
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Eric B Munson <emunson@mgebm.net>
Cc: "ryanh@linux.vnet.ibm.com" <ryanh@linux.vnet.ibm.com>,
"aliguori@us.ibm.com" <aliguori@us.ibm.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"mtosatti@redhat.com" <mtosatti@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"avi@redhat.com" <avi@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] Guest stop notification
Date: Thu, 01 Dec 2011 18:35:17 +0100 [thread overview]
Message-ID: <4ED7BAD5.8020105@siemens.com> (raw)
In-Reply-To: <20111201171938.GA8803@mgebm.net>
On 2011-12-01 18:19, 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@mgebm.net> Cc:
>>> ryanh@linux.vnet.ibm.com Cc: aliguori@us.ibm.com Cc:
>>> mtosatti@redhat.com Cc: avi@redhat.com Cc: kvm@vger.kernel.org
>>> Cc: linux-kernel@vger.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.
>>
>
> The encapsulated function was from a previous idea, I will remove
> it for V2.
>
>>> + 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.
>
> Will change to spaces for V2.
>
>>
>> More general:
>>
>> Why is this x86-only? If the kernel interface is x86-only, what
>> prevents making it generic right from the beginning?
>>
>> Why do we need a new IOCTL for this? Was there no space left in
>> the kvm_run structure e.g. to pass this flag down on next vcpu
>> execution? No big deal, just wondering.
>
> Thanks for your review/feedback.
>
> When I started looking into this problem, the ioctl was the first
> suggestion I got for how to communicate from qemu to guest kernel.
> I don't see a technical reason that this could not be added to the
> kvm_run structure in one of the bytes currently used as padding. I
> would prefer to keep the ioctl because I have the corresponding
> kernel patches out to work with this, however, if there is a strong
> preference for using kvm_run, I can rework both sets.
My feeling is that a run field would be more elegant, but I might be
wrong on this as well. In any case: You need KVM_CAP in your kernel
interface to announce the new feature and you have to sync in the new
kernel header into QEMU to make it build.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2011-12-01 17:35 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-29 21:36 [PATCH] Guest stop notification Eric B Munson
2011-11-29 21:36 ` [Qemu-devel] " Eric B Munson
2011-11-29 21:36 ` Eric B Munson
2011-11-29 22:10 ` Anthony Liguori
2011-11-29 22:10 ` [Qemu-devel] " Anthony Liguori
2011-11-29 22:10 ` Anthony Liguori
2011-12-01 14:37 ` Jan Kiszka
2011-12-01 14:37 ` [Qemu-devel] " Jan Kiszka
2011-12-01 17:19 ` Eric B Munson
2011-12-01 17:19 ` [Qemu-devel] " Eric B Munson
2011-12-01 17:19 ` Eric B Munson
2011-12-01 17:31 ` Arend van Spriel
2011-12-01 17:31 ` [Qemu-devel] " Arend van Spriel
2011-12-01 17:35 ` Jan Kiszka
2011-12-01 17:35 ` [Qemu-devel] " Jan Kiszka
2011-12-01 17:35 ` Jan Kiszka
2011-12-01 17:35 ` Jan Kiszka [this message]
2011-12-01 17:35 ` [Qemu-devel] " Jan Kiszka
2011-12-01 17:35 ` Jan Kiszka
2011-12-01 21:22 ` Marcelo Tosatti
2011-12-01 21:22 ` [Qemu-devel] " Marcelo Tosatti
2011-12-01 21:22 ` Marcelo Tosatti
2011-12-01 17:22 ` Eric B Munson
2011-12-01 17:22 ` [Qemu-devel] " Eric B Munson
2011-12-01 17:36 ` Jan Kiszka
2011-12-01 17:36 ` [Qemu-devel] " Jan Kiszka
2011-12-01 17:36 ` Jan Kiszka
2011-12-01 21:25 ` Marcelo Tosatti
2011-12-01 21:25 ` [Qemu-devel] " Marcelo Tosatti
2011-12-01 21:25 ` Marcelo Tosatti
2011-12-01 21:32 ` Eric B Munson
2011-12-01 21:32 ` [Qemu-devel] " Eric B Munson
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=4ED7BAD5.8020105@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=aliguori@us.ibm.com \
--cc=avi@redhat.com \
--cc=emunson@mgebm.net \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=ryanh@linux.vnet.ibm.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 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.