qemu/softmmu
Markus Armbruster d64072c0ac Revert "tpm: Clean up error reporting in tpm_init_tpmdev()"
This reverts commit d10e05f15d.

We report some -tpmdev failures, but then continue as if all was fine.
Reproducer:

    $ qemu-system-x86_64 -nodefaults -S -display none -monitor stdio -chardev null,id=tpm0 -tpmdev emulator,id=tpm0,chardev=chrtpm -device tpm-tis,tpmdev=tpm0
    qemu-system-x86_64: -tpmdev emulator,id=tpm0,chardev=chrtpm: tpm-emulator: tpm chardev 'chrtpm' not found.
    qemu-system-x86_64: -tpmdev emulator,id=tpm0,chardev=chrtpm: tpm-emulator: Could not cleanly shutdown the TPM: No such file or directory
    QEMU 5.0.90 monitor - type 'help' for more information
    (qemu) qemu-system-x86_64: -device tpm-tis,tpmdev=tpm0: Property 'tpm-tis.tpmdev' can't find value 'tpm0'
    $ echo $?
    1

This is a regression caused by commit d10e05f15d "tpm: Clean up error
reporting in tpm_init_tpmdev()".  It's incomplete: be->create(opts)
continues to use error_report(), and we don't set an error when it
fails.

I figure converting the create() methods to Error would make some
sense, but I'm not sure it's worth the effort right now.  Revert the
broken commit instead, and add a comment to tpm_init_tpmdev().

Straightforward conflict in tpm.c resolved.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2020-07-24 12:44:13 -04:00
..
arch_init.c 8bit AVR port from Michael Rolnik. 2020-07-11 19:27:59 +01:00
balloon.c softmmu: move softmmu only files from root 2020-07-10 18:02:24 -04:00
cpu-throttle.c cpu-throttle: new module, extracted from cpus.c 2020-07-10 18:04:49 -04:00
cpus.c cpu-throttle: new module, extracted from cpus.c 2020-07-10 18:04:49 -04:00
ioport.c softmmu: move softmmu only files from root 2020-07-10 18:02:24 -04:00
main.c softmmu: split off vl.c:main() into main.c 2020-02-22 08:26:47 +00:00
Makefile.objs cpu-throttle: new module, extracted from cpus.c 2020-07-10 18:04:49 -04:00
memory_mapping.c softmmu: move softmmu only files from root 2020-07-10 18:02:24 -04:00
memory.c qom: Change object_get_canonical_path_component() not to malloc 2020-07-21 16:23:43 +02:00
qtest.c softmmu: move softmmu only files from root 2020-07-10 18:02:24 -04:00
vl.c Revert "tpm: Clean up error reporting in tpm_init_tpmdev()" 2020-07-24 12:44:13 -04:00