* [Qemu-devel] [PATCH v2] Fix signal handling when io-thread is disabled
@ 2011-06-14 14:05 Alexandre Raymond
2011-06-14 16:47 ` Jan Kiszka
0 siblings, 1 reply; 4+ messages in thread
From: Alexandre Raymond @ 2011-06-14 14:05 UTC (permalink / raw)
To: qemu-devel
Cc: Alexandre Raymond, pbonzini, andreas.faerber, agraf, jan.kiszka
Changes since v1:
- take pthread_sigmask() out of the ifdef as it is now common
to both parts.
This fix effectively blocks, in the main thread, the signals handled
by signalfd or the compatibility signal thread.
This way, such signals are received synchronously in the main thread
through sigfd_handler() instead of triggering the signal handler
directly, asynchronously.
Signed-off-by: Alexandre Raymond <cerbere@gmail.com>
---
cpus.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cpus.c b/cpus.c
index 4ab76f0..18a1522 100644
--- a/cpus.c
+++ b/cpus.c
@@ -399,7 +399,6 @@ static int qemu_signal_init(void)
sigaddset(&set, SIGALRM);
sigaddset(&set, SIG_IPI);
sigaddset(&set, SIGBUS);
- pthread_sigmask(SIG_BLOCK, &set, NULL);
#else
sigemptyset(&set);
sigaddset(&set, SIGBUS);
@@ -412,6 +411,7 @@ static int qemu_signal_init(void)
sigaddset(&set, SIGALRM);
}
#endif
+ pthread_sigmask(SIG_BLOCK, &set, NULL);
sigfd = qemu_signalfd(&set);
if (sigfd == -1) {
--
1.7.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v2] Fix signal handling when io-thread is disabled
2011-06-14 14:05 [Qemu-devel] [PATCH v2] Fix signal handling when io-thread is disabled Alexandre Raymond
@ 2011-06-14 16:47 ` Jan Kiszka
2011-07-09 2:30 ` Alexandre Raymond
0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2011-06-14 16:47 UTC (permalink / raw)
To: Alexandre Raymond
Cc: pbonzini@redhat.com, andreas.faerber@web.de,
qemu-devel@nongnu.org, agraf@suse.de
On 2011-06-14 16:05, Alexandre Raymond wrote:
> Changes since v1:
> - take pthread_sigmask() out of the ifdef as it is now common
> to both parts.
>
> This fix effectively blocks, in the main thread, the signals handled
> by signalfd or the compatibility signal thread.
>
> This way, such signals are received synchronously in the main thread
> through sigfd_handler() instead of triggering the signal handler
> directly, asynchronously.
>
> Signed-off-by: Alexandre Raymond <cerbere@gmail.com>
> ---
> cpus.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/cpus.c b/cpus.c
> index 4ab76f0..18a1522 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -399,7 +399,6 @@ static int qemu_signal_init(void)
> sigaddset(&set, SIGALRM);
> sigaddset(&set, SIG_IPI);
> sigaddset(&set, SIGBUS);
> - pthread_sigmask(SIG_BLOCK, &set, NULL);
> #else
> sigemptyset(&set);
> sigaddset(&set, SIGBUS);
> @@ -412,6 +411,7 @@ static int qemu_signal_init(void)
> sigaddset(&set, SIGALRM);
> }
> #endif
> + pthread_sigmask(SIG_BLOCK, &set, NULL);
>
> sigfd = qemu_signalfd(&set);
> if (sigfd == -1) {
Acked-by: Jan Kiszka <jan.kiszka@siemens.com>
Thanks,
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v2] Fix signal handling when io-thread is disabled
2011-06-14 16:47 ` Jan Kiszka
@ 2011-07-09 2:30 ` Alexandre Raymond
2011-07-16 19:45 ` Blue Swirl
0 siblings, 1 reply; 4+ messages in thread
From: Alexandre Raymond @ 2011-07-09 2:30 UTC (permalink / raw)
To: qemu-devel@nongnu.org
ping?
On Tue, Jun 14, 2011 at 12:47 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> On 2011-06-14 16:05, Alexandre Raymond wrote:
>> Changes since v1:
>> - take pthread_sigmask() out of the ifdef as it is now common
>> to both parts.
>>
>> This fix effectively blocks, in the main thread, the signals handled
>> by signalfd or the compatibility signal thread.
>>
>> This way, such signals are received synchronously in the main thread
>> through sigfd_handler() instead of triggering the signal handler
>> directly, asynchronously.
>>
>> Signed-off-by: Alexandre Raymond <cerbere@gmail.com>
>> ---
>> cpus.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/cpus.c b/cpus.c
>> index 4ab76f0..18a1522 100644
>> --- a/cpus.c
>> +++ b/cpus.c
>> @@ -399,7 +399,6 @@ static int qemu_signal_init(void)
>> sigaddset(&set, SIGALRM);
>> sigaddset(&set, SIG_IPI);
>> sigaddset(&set, SIGBUS);
>> - pthread_sigmask(SIG_BLOCK, &set, NULL);
>> #else
>> sigemptyset(&set);
>> sigaddset(&set, SIGBUS);
>> @@ -412,6 +411,7 @@ static int qemu_signal_init(void)
>> sigaddset(&set, SIGALRM);
>> }
>> #endif
>> + pthread_sigmask(SIG_BLOCK, &set, NULL);
>>
>> sigfd = qemu_signalfd(&set);
>> if (sigfd == -1) {
>
> Acked-by: Jan Kiszka <jan.kiszka@siemens.com>
>
> Thanks,
> Jan
>
> --
> Siemens AG, Corporate Technology, CT T DE IT 1
> Corporate Competence Center Embedded Linux
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH v2] Fix signal handling when io-thread is disabled
2011-07-09 2:30 ` Alexandre Raymond
@ 2011-07-16 19:45 ` Blue Swirl
0 siblings, 0 replies; 4+ messages in thread
From: Blue Swirl @ 2011-07-16 19:45 UTC (permalink / raw)
To: Alexandre Raymond; +Cc: qemu-devel@nongnu.org
Thanks, applied.
On Sat, Jul 9, 2011 at 5:30 AM, Alexandre Raymond <cerbere@gmail.com> wrote:
> ping?
>
> On Tue, Jun 14, 2011 at 12:47 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>> On 2011-06-14 16:05, Alexandre Raymond wrote:
>>> Changes since v1:
>>> - take pthread_sigmask() out of the ifdef as it is now common
>>> to both parts.
>>>
>>> This fix effectively blocks, in the main thread, the signals handled
>>> by signalfd or the compatibility signal thread.
>>>
>>> This way, such signals are received synchronously in the main thread
>>> through sigfd_handler() instead of triggering the signal handler
>>> directly, asynchronously.
>>>
>>> Signed-off-by: Alexandre Raymond <cerbere@gmail.com>
>>> ---
>>> cpus.c | 2 +-
>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/cpus.c b/cpus.c
>>> index 4ab76f0..18a1522 100644
>>> --- a/cpus.c
>>> +++ b/cpus.c
>>> @@ -399,7 +399,6 @@ static int qemu_signal_init(void)
>>> sigaddset(&set, SIGALRM);
>>> sigaddset(&set, SIG_IPI);
>>> sigaddset(&set, SIGBUS);
>>> - pthread_sigmask(SIG_BLOCK, &set, NULL);
>>> #else
>>> sigemptyset(&set);
>>> sigaddset(&set, SIGBUS);
>>> @@ -412,6 +411,7 @@ static int qemu_signal_init(void)
>>> sigaddset(&set, SIGALRM);
>>> }
>>> #endif
>>> + pthread_sigmask(SIG_BLOCK, &set, NULL);
>>>
>>> sigfd = qemu_signalfd(&set);
>>> if (sigfd == -1) {
>>
>> Acked-by: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> Thanks,
>> Jan
>>
>> --
>> Siemens AG, Corporate Technology, CT T DE IT 1
>> Corporate Competence Center Embedded Linux
>>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-07-16 19:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-14 14:05 [Qemu-devel] [PATCH v2] Fix signal handling when io-thread is disabled Alexandre Raymond
2011-06-14 16:47 ` Jan Kiszka
2011-07-09 2:30 ` Alexandre Raymond
2011-07-16 19:45 ` Blue Swirl
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.