[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: [PATCH 08/10] MCE: Relay UCR MCE to guest
From: |
Marcelo Tosatti |
Subject: |
Re: [Qemu-devel] Re: [PATCH 08/10] MCE: Relay UCR MCE to guest |
Date: |
Wed, 20 Oct 2010 19:28:47 -0200 |
User-agent: |
Mutt/1.5.20 (2009-08-17) |
On Wed, Oct 20, 2010 at 02:51:56PM -0500, Anthony Liguori wrote:
> >+ e = errno;
> >+
> >+ qemu_mutex_lock(&qemu_global_mutex);
> >+
> >+ if (r == -1&& !(e == EAGAIN || e == EINTR)) {
> >+ fprintf(stderr, "sigtimedwait: %s\n", strerror(e));
> >+ exit(1);
> >+ }
> >+
> >+ switch (r) {
> >+ case SIGBUS:
> >+#ifdef TARGET_I386
> >+ if (kvm_on_sigbus_vcpu(env, siginfo.si_code, siginfo.si_addr))
> >+#endif
> >+ sigbus_reraise();
> >+ break;
> >+ default:
> >+ break;
> >+ }
> >+
> >+ r = sigpending(&chkset);
> >+ if (r == -1) {
> >+ fprintf(stderr, "sigpending: %s\n", strerror(e));
> >+ exit(1);
> >+ }
> >+ } while (sigismember(&chkset, SIG_IPI) || sigismember(&chkset, SIGBUS));
> > }
>
> I don't understand why this loop is needed but we specifically wait
> for a signal to get delivered that's either SIG_IPI or SIGBUS. We
> then check whether a SIG_IPI or SIGBUS is pending and loop waiting
> for signals again.
>
> Shouldn't we be looping on just sigismember(SIGBUS)?
Think of SIG_IPI and SIGBUS pending. SIGBUS must be processed
immediately.
Yes, sigismember(SIGBUS) would be fine. But the current code too.
> BTW, we're no longer respecting timeout because we're not adjusting
> ts after each iteration.
Right, timeout not used at the moment.
- [Qemu-devel] [PATCH 03/10] signalfd compatibility, (continued)
- [Qemu-devel] [PATCH 03/10] signalfd compatibility, Marcelo Tosatti, 2010/10/20
- [Qemu-devel] [PATCH 07/10] Add RAM -> physical addr mapping in MCE simulation, Marcelo Tosatti, 2010/10/20
- [Qemu-devel] [PATCH 05/10] kvm: x86: add mce support, Marcelo Tosatti, 2010/10/20
- [Qemu-devel] [PATCH 02/10] Add svm cpuid features, Marcelo Tosatti, 2010/10/20
- [Qemu-devel] [PATCH 08/10] MCE: Relay UCR MCE to guest, Marcelo Tosatti, 2010/10/20
- Re: [Qemu-devel] Re: [PATCH 08/10] MCE: Relay UCR MCE to guest,
Marcelo Tosatti <=
- [Qemu-devel] Re: [PATCH 08/10] MCE: Relay UCR MCE to guest, Paolo Bonzini, 2010/10/20
- [Qemu-devel] Re: [PATCH 08/10] MCE: Relay UCR MCE to guest, Anthony Liguori, 2010/10/20
- [Qemu-devel] Re: [PATCH 08/10] MCE: Relay UCR MCE to guest, Paolo Bonzini, 2010/10/21
[Qemu-devel] [PATCH 09/10] Add savevm/loadvm support for MCE, Marcelo Tosatti, 2010/10/20
[Qemu-devel] Re: [PATCH 00/10] [PULL] qemu-kvm.git uq/master queue, Anthony Liguori, 2010/10/20
[Qemu-devel] Re: [PATCH 00/10] [PULL] qemu-kvm.git uq/master queue, Anthony Liguori, 2010/10/20
[Qemu-devel] Re: [PATCH 00/10] [PULL] qemu-kvm.git uq/master queue, Anthony Liguori, 2010/10/20