[PATCH v3 1/2] qemu: Move code to add encryption options for swtpm_setup into function