qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/4] Enable sigbus_reraise for Solaris


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 2/4] Enable sigbus_reraise for Solaris
Date: Tue, 27 Mar 2012 13:41:18 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120215 Thunderbird/10.0.2

Am 24.03.2012 17:26, schrieb Lee Essen:
> sigbus_reraise is used by the kvm_wait_io_event function and is
> needed on both Linux and Solaris. This patch adds CONFIG_SOLARIS
> to the current CONFIG_LINUX only ifdef.
> 
> Signed-off-by: Lee Essen <address@hidden>
> ---
>  cpus.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/cpus.c b/cpus.c
> index 25ba621..6550f22 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -455,7 +455,7 @@ static void cpu_signal(int sig)
>      exit_request = 1;
>  }
>  
> -#ifdef CONFIG_LINUX
> +#if defined(CONFIG_LINUX) || defined(CONFIG_SOLARIS)

As asked elsewhere: Linux was the only KVM platform so far. If
sigbus_reraise() is only used in some KVM function like you said, can't
this we guarded with #if defined(CONFIG_KVM) or similar so that we don't
have to expand this once FreeBSD etc. merge KVM support, i.e. feature-based?

Andreas

>  static void sigbus_reraise(void)
>  {
>      sigset_t set;
> @@ -491,7 +491,9 @@ static void qemu_init_sigbus(void)
>      action.sa_sigaction = (void (*)(int, siginfo_t*, void*))sigbus_handler;
>      sigaction(SIGBUS, &action, NULL);
>  
> +#if defined(CONFIG_LINUX)
>      prctl(PR_MCE_KILL, PR_MCE_KILL_SET, PR_MCE_KILL_EARLY, 0, 0);
> +#endif
>  }
>  
>  static void qemu_kvm_eat_signals(CPUArchState *env)

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]