ide: introduce ide_transfer_start_norecurse
commitc173723f247c69974a83af1395020d0f01a0d334
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 6 Jun 2018 19:09:55 +0000 (6 15:09 -0400)
committerJohn Snow <jsnow@redhat.com>
Fri, 8 Jun 2018 17:36:31 +0000 (8 13:36 -0400)
tree6951a90343b7720974921c64b48dc157f24dd98b
parentd02cea6437b420150915b03aef3691010c7d40df
ide: introduce ide_transfer_start_norecurse

For the case where the end_transfer_func is also the caller of
ide_transfer_start, the mutual recursion can lead to unlimited
stack usage.  Introduce a new version that can be used to change
tail recursion into a loop, and use it in trace_ide_atapi_cmd_reply_end.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20180606190955.20845-8-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
hw/ide/atapi.c
hw/ide/core.c
include/hw/ide/internal.h