Re: [Qemu-devel] Re: [PATCH 07/11] kvm, x86: unify sigbus handling, prep

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

 



(2010/10/15 9:36), Marcelo Tosatti wrote:
> On Thu, Oct 14, 2010 at 05:49:43PM +0900, Jin Dongming wrote:
>> There are 2 similar functions to handle SIGBUS:
>>   sigbus_handler(int n, struct qemu_signalfd_siginfo *siginfo,
>>                  void *ctx)
>>   kvm_on_sigbus(CPUState *env, siginfo_t *siginfo)
>>
>> The former is used when main thread receives SIGBUS via signalfd,
>> while latter is used when vcpu thread receives SIGBUS.
>> These 2 take different siginfo, but in both case required parameters
>> are common, the code and the addr in the info.
>>
>> Restruct functions to take the code and the addr explicitly.
>>
>> Signed-off-by: Hidetoshi Seto <seto.hidetoshi@xxxxxxxxxxxxxx>
>> Tested-by: Jin Dongming <jin.dongming@xxxxxxxxxxxxxxxxxx>
>> ---
>>  qemu-kvm.c |   41 ++++++++++++++++++++---------------------
>>  1 files changed, 20 insertions(+), 21 deletions(-)
> 
> Don't see the benefit, separate functions are cleaner.

I think this is good for maintainability.
If you want to fix a bug in this area, you might have to change
2 separate functions in completely same way.
See 6c85786 and a05684e for examples.

Thanks,
H.Seto

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux