aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2022-09-17 08:09:50 -0400
committerStefan Hajnoczi <stefanha@redhat.com>2022-09-17 08:09:50 -0400
commit92411fd91e914b95f9c6c512ddd0d3935bd60115 (patch)
treeb6177085be861c359f9804dace5d06c6da2c2be2 /hw
parent79dfa177ae348bb5ab5f97c0915359b13d6186e2 (diff)
parent99bdcd2cc2d05833f5c11caca22193f8dd878ae9 (diff)
downloadqemu-92411fd91e914b95f9c6c512ddd0d3935bd60115.zip
qemu-92411fd91e914b95f9c6c512ddd0d3935bd60115.tar.gz
qemu-92411fd91e914b95f9c6c512ddd0d3935bd60115.tar.bz2
Merge tag 'tpm-pull-2022-09-13-1' of https://github.com/stefanberger/qemu-tpm into staging
Merge tpm 2022/09/13 v1 # -----BEGIN PGP SIGNATURE----- # # iQEzBAABCAAdFiEEuBi5yt+QicLVzsZrda1lgCoLQhEFAmMgtKIACgkQda1lgCoL # QhG/Zgf9Gs35w+hPwGQdsrwcDmCHiH6s4Eb7i4SgzPP4/EVR9kwYriKja4HoNvK2 # GHQSXgYX5hazwgkRlNKNJSf2zckbZlr3OhPReZMab6YTVSi79xZRl4rWqKbMxk4K # 82ueaUkLKm/RrCw69sM6ToSUQjbitseMVKorZ9NXVt9SVj+hwQv28o5U/+h8Q76T # P3t1VraFV2vaiLhAyp4BY52djZ0AMrUox/27EdAYIPPi7om+fGeWcTQP4GsyWUv1 # h8i+ZSU1QMJ5hF1szzP7bENwSzG7mSIiqMbrqtpysu/ET6r9WblLTSkRtojvms1S # qb7NzQ3S4NwdCWGz0owEbF5kLmMniw== # =XMPF # -----END PGP SIGNATURE----- # gpg: Signature made Tue 13 Sep 2022 12:49:38 EDT # gpg: using RSA key B818B9CADF9089C2D5CEC66B75AD65802A0B4211 # gpg: Good signature from "Stefan Berger <stefanb@linux.vnet.ibm.com>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: B818 B9CA DF90 89C2 D5CE C66B 75AD 6580 2A0B 4211 * tag 'tpm-pull-2022-09-13-1' of https://github.com/stefanberger/qemu-tpm: tpm_emulator: Have swtpm relock storage upon migration fall-back tpm_emulator: Use latest tpm_ioctl.h from swtpm project tpm_crb: Avoid backend startup just before shutdown under Xen tpm_emulator: Avoid double initialization during migration Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/tpm/tpm_crb.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c
index 67db594..ea930da 100644
--- a/hw/tpm/tpm_crb.c
+++ b/hw/tpm/tpm_crb.c
@@ -26,6 +26,7 @@
#include "sysemu/tpm_backend.h"
#include "sysemu/tpm_util.h"
#include "sysemu/reset.h"
+#include "sysemu/xen.h"
#include "tpm_prop.h"
#include "tpm_ppi.h"
#include "trace.h"
@@ -308,7 +309,11 @@ static void tpm_crb_realize(DeviceState *dev, Error **errp)
TPM_PPI_ADDR_BASE, OBJECT(s));
}
- qemu_register_reset(tpm_crb_reset, dev);
+ if (xen_enabled()) {
+ tpm_crb_reset(dev);
+ } else {
+ qemu_register_reset(tpm_crb_reset, dev);
+ }
}
static void tpm_crb_class_init(ObjectClass *klass, void *data)