1. 15 12月, 2017 9 次提交
  2. 19 10月, 2017 9 次提交
  3. 13 10月, 2017 6 次提交
  4. 04 9月, 2017 2 次提交
    • M
      tpm: Clean up model registration & lookup · 00bbf50a
      Markus Armbruster 提交于
      We have a strict separation between enum TpmModel and tpm_models[]:
      
      * TpmModel may have any number of members.  It just happens to have one.
      
      * tpm_register_model() uses the first empty slot in tpm_models[].
      
        If you register more than tpm_models[] has space,
        tpn_register_model() fails.  Its caller silently ignores the
        failure.
      
        Register the same TpmModel more than once has no effect other than
        wasting tpm_models[] slots: tpm_model_is_registered() is happy with
        the first one it finds.
      
      Since we only ever register one model, and tpm_models[] has space for
      just that one, this contraption even works.
      
      Turn tpm_models[] into a straight map from enum TpmType to bool.  Much
      simpler.
      
      Cc: Stefan Berger <stefanb@us.ibm.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1503564371-26090-5-git-send-email-armbru@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      [Commit message typo fixed]
      00bbf50a
    • M
      tpm: Clean up driver registration & lookup · a9a72aee
      Marc-André Lureau 提交于
      We have a strict separation between enum TpmType and be_drivers[]:
      
      * TpmType may have any number of members.  It just happens to have one.
      
      * tpm_register_driver() uses the first empty slot in be_drivers[].
      
        If you register more than tpm_models[] has space,
        tpm_register_driver() fails.  Its caller silently ignores the
        failure.
      
        If you register more than one with a given TpmType,
        tpm_display_backend_drivers() will shows all of them, but
        tpm_driver_find_by_type() and tpm_get_backend_driver() will find
        only the one one that registered first.
      
      Since we only ever register one driver, and be_drivers[] has space for
      just that one, this contraption even works.
      
      Turn be_drivers[] into a straight map from enum TpmType to driver.
      Much simpler, and has a decent chance to actually work should we ever
      acquire additional drivers.
      
      While there, use qapi_enum_parse() in tpm_get_backend_driver().
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <20170822132255.23945-8-marcandre.lureau@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      [Rebased, superfluous initializer dropped, commit message rewritten]
      Cc: Stefan Berger <stefanb@us.ibm.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1503564371-26090-4-git-send-email-armbru@redhat.com>
      a9a72aee
  5. 12 7月, 2016 1 次提交
  6. 23 2月, 2016 1 次提交
    • P
      include: Clean up includes · 90ce6e26
      Peter Maydell 提交于
      Clean up includes so that osdep.h is included first and headers
      which it implies are not included manually.
      
      This commit was created with scripts/clean-includes.
      
      NB: If this commit breaks compilation for your out-of-tree
      patchseries or fork, then you need to make sure you add
      #include "qemu/osdep.h" to any new .c files that you have.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      90ce6e26
  7. 01 6月, 2015 1 次提交
    • S
      Extend TPM TIS interface to support TPM 2 · 116694c3
      Stefan Berger 提交于
      Following the recent upgrade to version 1.3, extend the TPM TIS
      interface with capabilities introduced for support of a TPM 2.
      
      TPM TIS for TPM 2 introduced the following extensions beyond the
      TPM TIS 1.3 (used for TPM 1.2):
      
      - A new 32bit interface Id register was introduced.
      - New flags for the status (STS) register were defined.
      - New flags for the capability flags were defined.
      
      Support the above if a TPM TIS 1.3 for TPM 2 is used with a TPM 2
      on the backend side. Support the old TPM TIS 1.3 configuration if a
      TPM 1.2 is being used. A subsequent patch will then determine which
      TPM version is being used in the backend.
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      116694c3
  8. 01 3月, 2015 1 次提交
  9. 23 4月, 2013 1 次提交
  10. 16 4月, 2013 2 次提交
  11. 02 4月, 2013 1 次提交