qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: BALATON Zoltan <balaton@eik.bme.hu>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	Stefan Berger <stefanb@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH] Fix compile with --disable-tpm
Date: Mon, 23 Oct 2017 17:39:18 +0200 (CEST)	[thread overview]
Message-ID: <alpine.BSF.2.21.1710231733420.33277@zero.eik.bme.hu> (raw)
In-Reply-To: <99e54ab2-c5b4-cd67-428d-f012e62f8062@amsat.org>

On Mon, 23 Oct 2017, Philippe Mathieu-Daudé wrote:
> On 10/23/2017 08:09 AM, Philippe Mathieu-Daudé wrote:
>> On 10/23/2017 07:24 AM, BALATON Zoltan wrote:
> [...]
>>>          info = g_new0(TPMInfoList, 1);
>>> +#ifdef CONFIG_TPM
>>>          info->value = tpm_backend_query_tpm(drv);
>>> -
>>> +#endif
>>>          if (!cur_item) {
>>>              head = cur_item = info;
>>>          } else {
>>> diff --git a/vl.c b/vl.c
>>> index 0723835..dbfd06d 100644
>>> --- a/vl.c
>>> +++ b/vl.c
>>> @@ -4905,7 +4905,9 @@ int main(int argc, char **argv, char **envp)
>>>      res_free();
>>>
>>>      /* vhost-user must be cleaned up before chardevs.  */
>>> +#ifdef CONFIG_TPM
>>>      tpm_cleanup();
>>> +#endif
>>>      net_cleanup();
>>>      audio_cleanup();
>>>      monitor_cleanup();
>>
>> Can you instead add tpm_cleanup() in stubs/tpm.c?
>
> and tpm_backend_query_tpm() ;)

The v2 I've sent avoids #ifdefs outside tpm.c so isn't that acceptable? Do 
we still need stubs for these? I don't understand how stubs are compiled 
so if it's needed can you point me to an example what needs to be done to 
add stubs for these? (I'm not familiar with this, just tried to fix a 
compile problem I've met but I don't really know what's the correct way to 
fix this. I'd expect the author of the patch that broke it to fix it 
instead or at least review this to avoid breaking it more.)

Regards,
BALATON Zoltan

      reply	other threads:[~2017-10-23 15:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-23 10:24 [Qemu-devel] [PATCH] Fix compile with --disable-tpm BALATON Zoltan
2017-10-23 11:09 ` Philippe Mathieu-Daudé
2017-10-23 12:25   ` Philippe Mathieu-Daudé
2017-10-23 15:39     ` BALATON Zoltan [this message]

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=alpine.BSF.2.21.1710231733420.33277@zero.eik.bme.hu \
    --to=balaton@eik.bme.hu \
    --cc=f4bug@amsat.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanb@linux.vnet.ibm.com \
    /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).