[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] testing qemu svn r6082 on FreeBSD - virtio-net, hpet, v
From: |
Juergen Lock |
Subject: |
Re: [Qemu-devel] testing qemu svn r6082 on FreeBSD - virtio-net, hpet, vmmouse/vga, got bsd-user to build, and an updated version of the FreeBSD -clock dynticks patch |
Date: |
Sun, 21 Dec 2008 00:45:12 +0100 (CET) |
In article <address@hidden> you write:
>On 12/19/08, Juergen Lock <address@hidden> wrote:
>> +#elif defined(__FreeBSD__)
>> +# include <sys/ucontext.h>
>> +
>> +# define RIP_sig(context) (*((unsigned
>> long*)&(context)->uc_mcontext.mc_rip))
>> +# define TRAP_sig(context) ((context)->uc_mcontext.mc_trapno)
>> +# define ERROR_sig(context) ((context)->uc_mcontext.mc_err)
>> #else
>> #define QEMU_UC_MCONTEXT_GREGS(uc, reg)
>> (uc)->uc_mcontext.gregs[(reg)]
>> #define QEMU_UC_MACHINE_PC(uc) QEMU_UC_MCONTEXT_GREGS(uc, REG_RIP)
>
>> +#ifdef __FreeBSD__
>> + pc = RIP_sig(uc);
>> + return handle_cpu_signal(pc, (unsigned long)info->si_addr,
>> + TRAP_sig(uc) == 0xe ?
>> + (ERROR_sig(uc) >> 1) & 1 : 0,
>> + &uc->uc_sigmask, puc);
>> +#else
>> pc = QEMU_UC_MACHINE_PC(uc);
>> return handle_cpu_signal(pc, (unsigned long)info->si_addr,
>> QEMU_UC_MCONTEXT_GREGS(uc, REG_TRAPNO) == 0xe ?
>> (QEMU_UC_MCONTEXT_GREGS(uc, REG_ERR) >> 1) & 1
>> : 0,
>> &uc->uc_sigmask, puc);
>> +#endif
>
>The idea here was that all OS define macros with same names so that
>the code below does not get any more complex. Maybe the GREGS macro
>was too generic, and should be replaced with one that only returns the
>trap and error values.
>
Yeah I was too lazy to figure out the preprocessor magic needed
to get the GREGS way working so I simply reused the macros from the
i386 case. :)
>> And finally the updated dynticks patch:
>
>This looks OK, please submit separately.
OK will do.
Thanx,
Juergen
- [Qemu-devel] testing qemu svn r6082 on FreeBSD - virtio-net, hpet, vmmouse/vga, got bsd-user to build, and an updated version of the FreeBSD -clock dynticks patch, Juergen Lock, 2008/12/18
- Re: [Qemu-devel] testing qemu svn r6082 on FreeBSD - virtio-net, hpet, vmmouse/vga, got bsd-user to build, and an updated version of the FreeBSD -clock dynticks patch, Blue Swirl, 2008/12/20
- Re: [Qemu-devel] testing qemu svn r6082 on FreeBSD - virtio-net, hpet, vmmouse/vga, got bsd-user to build, and an updated version of the FreeBSD -clock dynticks patch,
Juergen Lock <=