[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] a0bcec: tpm_emulator: Avoid double initializa
From: |
Paolo Bonzini |
Subject: |
[Qemu-commits] [qemu/qemu] a0bcec: tpm_emulator: Avoid double initialization during m... |
Date: |
Sat, 17 Sep 2022 05:17:23 -0700 |
Branch: refs/heads/staging
Home: https://github.com/qemu/qemu
Commit: a0bcec03761477371ff7c2e80dc07fff14222d92
https://github.com/qemu/qemu/commit/a0bcec03761477371ff7c2e80dc07fff14222d92
Author: Ross Lagerwall <ross.lagerwall@citrix.com>
Date: 2022-09-09 (Fri, 09 Sep 2022)
Changed paths:
M backends/tpm/tpm_emulator.c
Log Message:
-----------
tpm_emulator: Avoid double initialization during migration
When resuming after a migration, the backend sends CMD_INIT to the
emulator from the startup callback, then it sends the migration state
from the vmstate to the emulator, then it sends CMD_INIT again. Skip the
first CMD_INIT during a migration to avoid initializing the TPM twice.
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Tested-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Commit: f0ccce6a95f6ff947040692ef941230918181562
https://github.com/qemu/qemu/commit/f0ccce6a95f6ff947040692ef941230918181562
Author: Ross Lagerwall <ross.lagerwall@citrix.com>
Date: 2022-09-09 (Fri, 09 Sep 2022)
Changed paths:
M hw/tpm/tpm_crb.c
Log Message:
-----------
tpm_crb: Avoid backend startup just before shutdown under Xen
When running under Xen and the guest reboots, it boots into a new domain
with a new QEMU process (and a new swtpm process if using the emulator
backend). The existing reset function is triggered just before the old
QEMU process exists which causes QEMU to startup the TPM backend and
then immediately shut it down. This is probably harmless but when using
the emulated backend, it wastes CPU and IO time reloading state, etc.
Fix this by calling the reset function directly from realize() when
running under Xen. During a reboot, this will be called by the QEMU
process for the new domain.
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Message-id: 20220826143841.1515326-1-ross.lagerwall@citrix.com
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Commit: b37d902a892761424bd43556c67cb024aaba37a8
https://github.com/qemu/qemu/commit/b37d902a892761424bd43556c67cb024aaba37a8
Author: Helge Deller <deller@gmx.de>
Date: 2022-09-11 (Sun, 11 Sep 2022)
Changed paths:
M linux-user/signal-common.h
M linux-user/signal.c
M linux-user/strace.c
Log Message:
-----------
linux-user: Add missing signals in strace output
Some of the guest signal numbers are currently not converted to
their representative names in the strace output, e.g. SIGVTALRM.
This patch introduces a smart way to generate and keep in sync the
host-to-guest and guest-to-host signal conversion tables for usage in
the qemu signal and strace code. This ensures that any signals
will now show up in both tables.
There is no functional change in this patch - with the exception that yet
missing signal names now show up in the strace code too.
Signed-off-by: Helge Deller <deller@gmx.de>
Commit: 4860698be7e53d4866da9e613281ef00158b3bcd
https://github.com/qemu/qemu/commit/4860698be7e53d4866da9e613281ef00158b3bcd
Author: Helge Deller <deller@gmx.de>
Date: 2022-09-11 (Sun, 11 Sep 2022)
Changed paths:
M linux-user/strace.c
M linux-user/strace.list
Log Message:
-----------
linux-user: Add missing clock_gettime64() syscall strace
Allow linux-user to strace the clock_gettime64() syscall.
This syscall is used a lot on 32-bit guest architectures which use newer
glibc versions.
Signed-off-by: Helge Deller <deller@gmx.de>
Commit: 8b518553780465a12e8f7b9df559b555559df6cd
https://github.com/qemu/qemu/commit/8b518553780465a12e8f7b9df559b555559df6cd
Author: Helge Deller <deller@gmx.de>
Date: 2022-09-11 (Sun, 11 Sep 2022)
Changed paths:
M linux-user/strace.c
M linux-user/strace.list
M linux-user/syscall.c
Log Message:
-----------
linux-user: Add pidfd_open(), pidfd_send_signal() and pidfd_getfd() syscalls
I noticed those were missing when running the glib2.0 testsuite.
Add the syscalls including the strace output.
Signed-off-by: Helge Deller <deller@gmx.de>
Commit: 67f08327d48a131b7d88e88db108f6cc5977d023
https://github.com/qemu/qemu/commit/67f08327d48a131b7d88e88db108f6cc5977d023
Author: Helge Deller <deller@gmx.de>
Date: 2022-09-11 (Sun, 11 Sep 2022)
Changed paths:
M linux-user/cpu_loop-common.h
Log Message:
-----------
linux-user: Log failing executable in EXCP_DUMP()
Enhance the EXCP_DUMP() macro to print out the failing program too.
During debugging it's sometimes hard to track down the actual failing
program if you are e.g. building a whole debian package.
Signed-off-by: Helge Deller <deller@gmx.de>
Commit: 92168c6d8266cfa2886d196b1f2bc23e99b69a10
https://github.com/qemu/qemu/commit/92168c6d8266cfa2886d196b1f2bc23e99b69a10
Author: Helge Deller <deller@gmx.de>
Date: 2022-09-11 (Sun, 11 Sep 2022)
Changed paths:
M linux-user/hppa/cpu_loop.c
Log Message:
-----------
linux-user/hppa: Use EXCP_DUMP() to show enhanced debug info
Enhance the hppa linux-user cpu_loop() to show more debugging info
on hard errors.
Signed-off-by: Helge Deller <deller@gmx.de>
Commit: c7d9ecfd04b26b48a1456dd56acd904320b40807
https://github.com/qemu/qemu/commit/c7d9ecfd04b26b48a1456dd56acd904320b40807
Author: Helge Deller <deller@gmx.de>
Date: 2022-09-11 (Sun, 11 Sep 2022)
Changed paths:
M target/hppa/helper.c
Log Message:
-----------
linux-user/hppa: Dump IIR on register dump
Include the IIR register (which holds the opcode of the failing
instruction) when dumping the hppa registers.
Signed-off-by: Helge Deller <deller@gmx.de>
Commit: 1f7a3f00b9203b3b4f2d82437164c68e25854da0
https://github.com/qemu/qemu/commit/1f7a3f00b9203b3b4f2d82437164c68e25854da0
Author: Helge Deller <deller@gmx.de>
Date: 2022-09-11 (Sun, 11 Sep 2022)
Changed paths:
M linux-user/strace.c
Log Message:
-----------
linux-user: Fix strace of chmod() if mode == 0
If the mode parameter of chmod() is zero, this value isn't shown
when stracing a program:
chmod("filename",)
This patch fixes it up to show the zero-value as well:
chmod("filename",000)
Signed-off-by: Helge Deller <deller@gmx.de>
Commit: 5e2d277130a05f7e64f8d91ada5ad164d222883d
https://github.com/qemu/qemu/commit/5e2d277130a05f7e64f8d91ada5ad164d222883d
Author: Helge Deller <deller@gmx.de>
Date: 2022-09-11 (Sun, 11 Sep 2022)
Changed paths:
M linux-user/mmap.c
Log Message:
-----------
linux-user/hppa: Set TASK_UNMAPPED_BASE to 0xfa000000 for hppa arch
On the parisc architecture the stack grows upwards.
Move the TASK_UNMAPPED_BASE to high memory area as it's done by the
kernel on physical machines.
Signed-off-by: Helge Deller <deller@gmx.de>
Commit: 7ab6734581dbcdcec7a917820142db4d71dec6fb
https://github.com/qemu/qemu/commit/7ab6734581dbcdcec7a917820142db4d71dec6fb
Author: Helge Deller <deller@gmx.de>
Date: 2022-09-11 (Sun, 11 Sep 2022)
Changed paths:
M linux-user/strace.c
M linux-user/strace.list
Log Message:
-----------
linux-user: Add strace for clock_nanosleep()
Signed-off-by: Helge Deller <deller@gmx.de>
Commit: eda422c21613f4e7fbd2a820c3175c0b89b1deb6
https://github.com/qemu/qemu/commit/eda422c21613f4e7fbd2a820c3175c0b89b1deb6
Author: Helge Deller <deller@gmx.de>
Date: 2022-09-11 (Sun, 11 Sep 2022)
Changed paths:
M linux-user/strace.c
Log Message:
-----------
linux-user: Show timespec on strace for futex()
Signed-off-by: Helge Deller <deller@gmx.de>
Commit: 2b98096d24b1a2dd62491cca79080b379363d20e
https://github.com/qemu/qemu/commit/2b98096d24b1a2dd62491cca79080b379363d20e
Author: Helge Deller <deller@gmx.de>
Date: 2022-09-11 (Sun, 11 Sep 2022)
Changed paths:
M linux-user/strace.list
M linux-user/syscall.c
Log Message:
-----------
linux-user: Add close_range() syscall
Signed-off-by: Helge Deller <deller@gmx.de>
Commit: 192cac33ab6449202d0b44c4d664020b09ce9266
https://github.com/qemu/qemu/commit/192cac33ab6449202d0b44c4d664020b09ce9266
Author: Helge Deller <deller@gmx.de>
Date: 2022-09-11 (Sun, 11 Sep 2022)
Changed paths:
M linux-user/strace.list
Log Message:
-----------
linux-user: Add parameters of getrandom() syscall for strace
Signed-off-by: Helge Deller <deller@gmx.de>
Commit: efef4756c7f66e51fd5bfa132680ee0fb585f7a5
https://github.com/qemu/qemu/commit/efef4756c7f66e51fd5bfa132680ee0fb585f7a5
Author: Stefan Berger <stefanb@linux.ibm.com>
Date: 2022-09-13 (Tue, 13 Sep 2022)
Changed paths:
M backends/tpm/tpm_ioctl.h
Log Message:
-----------
tpm_emulator: Use latest tpm_ioctl.h from swtpm project
Use the latest tpm_ioctl.h from upstream swtpm project.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20220912174741.1542330-2-stefanb@linux.ibm.com
Commit: 99bdcd2cc2d05833f5c11caca22193f8dd878ae9
https://github.com/qemu/qemu/commit/99bdcd2cc2d05833f5c11caca22193f8dd878ae9
Author: Stefan Berger <stefanb@linux.ibm.com>
Date: 2022-09-13 (Tue, 13 Sep 2022)
Changed paths:
M backends/tpm/tpm_emulator.c
M backends/tpm/trace-events
Log Message:
-----------
tpm_emulator: Have swtpm relock storage upon migration fall-back
Swtpm may release the lock once the last one of its state blobs has been
migrated out. In case of VM migration failure QEMU now needs to notify
swtpm that it should again take the lock, which it can otherwise only do
once it has received the first TPM command from the VM.
Only try to send the lock command if swtpm supports it. It will not have
released the lock (and support shared storage setups) if it doesn't
support the locking command since the functionality of releasing the lock
upon state blob reception and the lock command were added to swtpm
'together'.
If QEMU sends the lock command and the storage has already been locked
no error is reported.
If swtpm does not receive the lock command (from older version of QEMU),
it will lock the storage once the first TPM command has been received. So
sending the lock command is an optimization.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20220912174741.1542330-3-stefanb@linux.ibm.com
Commit: 92411fd91e914b95f9c6c512ddd0d3935bd60115
https://github.com/qemu/qemu/commit/92411fd91e914b95f9c6c512ddd0d3935bd60115
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date: 2022-09-17 (Sat, 17 Sep 2022)
Changed paths:
M backends/tpm/tpm_emulator.c
M backends/tpm/tpm_ioctl.h
M backends/tpm/trace-events
M hw/tpm/tpm_crb.c
Log Message:
-----------
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>
Commit: 2e4dd7aa8da2bd078646685435c91239409ad4f4
https://github.com/qemu/qemu/commit/2e4dd7aa8da2bd078646685435c91239409ad4f4
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date: 2022-09-17 (Sat, 17 Sep 2022)
Changed paths:
M linux-user/cpu_loop-common.h
M linux-user/hppa/cpu_loop.c
M linux-user/mmap.c
M linux-user/signal-common.h
M linux-user/signal.c
M linux-user/strace.c
M linux-user/strace.list
M linux-user/syscall.c
M target/hppa/helper.c
Log Message:
-----------
Merge tag 'publish1-pull-request' of https://github.com/hdeller/qemu-hppa
into staging
linux-user: Add more syscalls, enhance tracing & logging enhancements
- show missing signals in strace output
- add pidfd_open(), pidfd_send_signal(), pidfd_getfd() and close_range()
syscalls
- add and enhance strace output for clock_gettime64(), chmod(),
clock_nanosleep(), futex() and getrandom() syscalls
- show failing executable in EXCP_DUMP()
- increase TASK_UNMAPPED_BASE and dump IIR on register dump (on hppa
target)
# -----BEGIN PGP SIGNATURE-----
#
# iHUEABYKAB0WIQS86RI+GtKfB8BJu973ErUQojoPXwUCYyDV7wAKCRD3ErUQojoP
# XwCsAP9NhdIgLvjgZRYPVDo+V6XoogDVAm7Gfb1gRmo+j8f4rgD+KutH/UaSfXQH
# hn1RKn2c1bytmBf9xHvuhPff0dnilAk=
# =dVWZ
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 13 Sep 2022 15:11:43 EDT
# gpg: using EDDSA key BCE9123E1AD29F07C049BBDEF712B510A23A0F5F
# gpg: Good signature from "Helge Deller <deller@gmx.de>" [unknown]
# gpg: aka "Helge Deller <deller@kernel.org>" [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: 4544 8228 2CD9 10DB EF3D 25F8 3E5F 3D04 A7A2 4603
# Subkey fingerprint: BCE9 123E 1AD2 9F07 C049 BBDE F712 B510 A23A 0F5F
* tag 'publish1-pull-request' of https://github.com/hdeller/qemu-hppa:
linux-user: Add parameters of getrandom() syscall for strace
linux-user: Add close_range() syscall
linux-user: Show timespec on strace for futex()
linux-user: Add strace for clock_nanosleep()
linux-user/hppa: Set TASK_UNMAPPED_BASE to 0xfa000000 for hppa arch
linux-user: Fix strace of chmod() if mode == 0
linux-user/hppa: Dump IIR on register dump
linux-user/hppa: Use EXCP_DUMP() to show enhanced debug info
linux-user: Log failing executable in EXCP_DUMP()
linux-user: Add pidfd_open(), pidfd_send_signal() and pidfd_getfd() syscalls
linux-user: Add missing clock_gettime64() syscall strace
linux-user: Add missing signals in strace output
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Compare: https://github.com/qemu/qemu/compare/79dfa177ae34...2e4dd7aa8da2
- [Qemu-commits] [qemu/qemu] a0bcec: tpm_emulator: Avoid double initialization during m...,
Paolo Bonzini <=