virtio-scsi: Pack struct virtio_scsi_{req_cmd,resp_cmd}

Device needs the exact size of these data structure. Prevent padding.

This fixes guest hang when booting seabios + tcm_vhost.

Signed-off-by: Asias He <asias@redhat.com>
(cherry picked from commit b44a7be17bdd270ea029a8e2ec0c2e80c6cd0444)
virtio-scsi: Set _DRIVER_OK flag before scsi target scanning

Before we start scsi target scanning, we need to set the
VIRTIO_CONFIG_S_DRIVER_OK flag so the device can do setup properly.

This fix a bug when booting tcm_vhost with seabios.

Signed-off-by: Asias He <asias@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 5a7730db57ab0715223421e65b54fb50d6fefe5c)
Cache boot-fail-wait to avoid romfile access after POST.

Memory allocated with malloc_tmp() can't be used after the POST phase.
So, access boot-fail-wait in post phase and store it for the boot
phase to use.  This fixes the regression introduced by commit
59d6ca52.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Signed-off-by: Amos Kong <akong@redhat.com>
(cherry picked from commit 11a7234491cb2a027b0fa5e82af38a3e78b44c80)