On Thu, 21 Jul 2022 15:26:47 +0200 Nico Boehr <nrb@xxxxxxxxxxxxx> wrote: > To decrypt the dump of a PV guest, the comm-key (CCK) is required. Until > now, no comm-key was provided to genprotimg, therefore decrypting the > dump of a kvm-unit-test under PV was not possible. > > This patch makes sure that we create a random CCK if there's no > $(TEST_DIR)/comm.key file. > > Also allow dumping of PV tests by passing the appropriate PCF to > genprotimg (bit 34). --x-pcf is used to be compatible with older > genprotimg versions, which don't support --enable-dump. 0xe0 is the > default PCF value and only bit 34 is added. > > Unfortunately, recent versions of genprotimg removed the --x-comm-key > argument which was used by older versions to specify the CCK. To support > these versions, we need to parse the genprotimg help output and decide > which argument to use. I wonder if we can simply support only the newest version? would make the code cleaner, and updating genprotimg is not too complicated [...]