qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Berger <stefanb@linux.ibm.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [PATCH for-5.1 1/2] Revert "tpm: Clean up error reporting in tpm_init_tpmdev()"
Date: Thu, 23 Jul 2020 10:20:06 -0400	[thread overview]
Message-ID: <618e09cd-5c07-ee7f-3088-e179815c87e8@linux.ibm.com> (raw)
In-Reply-To: <9b3d805f-6cb2-35ff-4f5d-879d3bbc00ab@redhat.com>

On 7/23/20 8:50 AM, Philippe Mathieu-Daudé wrote:
> On 7/23/20 1:58 PM, Markus Armbruster wrote:
>> This reverts commit d10e05f15d5c3dd5e5cc59c5dfff460d89d48580.
>>
>> 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>




  reply	other threads:[~2020-07-23 14:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23 11:58 [PATCH for-5.1 0/2] tpm: Fix error reporting, improve help Markus Armbruster
2020-07-23 11:58 ` [PATCH for-5.1 1/2] Revert "tpm: Clean up error reporting in tpm_init_tpmdev()" Markus Armbruster
2020-07-23 12:50   ` Philippe Mathieu-Daudé
2020-07-23 14:20     ` Stefan Berger [this message]
2020-07-23 11:58 ` [PATCH for-5.1 2/2] tpm: Improve help on TPM types when none are available Markus Armbruster
2020-07-23 12:49   ` Philippe Mathieu-Daudé
2020-07-23 14:22     ` Stefan Berger
2020-07-24  0:56   ` Stefan Berger
2020-07-24  6:42     ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=618e09cd-5c07-ee7f-3088-e179815c87e8@linux.ibm.com \
    --to=stefanb@linux.ibm.com \
    --cc=armbru@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).