s390x/cpu_model: disallow unpack for --only-migratable
PATCH 1/1 s390x/cpu_model: disallow unpack for --only-migratable
secure execution (aka protected virtualization) guests cannot be migrated at the moment. Disallow the unpack facility if the user specifies --only-migratable.
--- target/s390x/cpu_models.c | 6 ++++++ 1 file changed, 6 insertions(+)
target/s390x/cpu_models.c +6 -0
@@ -26,6 +26,7 @@#include "qapi/qmp/qdict.h" #ifndef CONFIG_USER_ONLY #include "sysemu/arch_init.h" +#include "sysemu/sysemu.h" #include "hw/pci/pci.h" #endif #include "qapi/qapi-commands-machine-target.h"
@@ -878,6 +879,11 @@ static void check_compatibility(const S390CPUModel *max_model,return ; } +if (only_migratable &&test_bit (S390_FEAT_UNPACK , model->features)) { +error_setg (errp,"The unpack facility is not compatible with " +"the --only-migratable option" ); + } +/* detect the missing features to properly report them */ bitmap_andnot (missing, model->features, max_model->features,S390_FEAT_MAX );if (bitmap_empty (missing,S390_FEAT_MAX )) {
Signature · 1 line
2.28.0
Quoted 22 lines · Christian Borntraeger
secure execution (aka protected virtualization) guests cannot be migrated at the moment. Disallow the unpack facility if the user specifies --only-migratable.
Signed-off-by Christian Borntraeger <[email protected]>--- target/s390x/cpu_models.c | 6 ++++++ 1 file changed, 6 insertions(+)target/s390x/cpu_models.c +1
-0@@ -26,6 +26,7 @@#include "qapi/qmp/qdict.h" #ifndef CONFIG_USER_ONLY #include "sysemu/arch_init.h" +#include "sysemu/sysemu.h" #include "hw/pci/pci.h" #endif #include "qapi/qapi-commands-machine-target.h"
target/s390x/cpu_models.c static void check_compatibility(const S390CPUModel *max_model, · line 884
Quoted 6 lines
target/s390x/cpu_models.c +3
-0@@ -878,6 +879,11 @@ static void check_compatibility(const S390CPUModel *max_model,return ; } +if (only_migratable &&test_bit (S390_FEAT_UNPACK , model->features)) { +error_setg (errp,"The unpack facility is not compatible with " +"the --only-migratable option" );
return; ?
This implies that a VM with "-cpu host" might not start anymore, right?
Signature · 3 lines
Thanks, David / dhildenb
Quoted 26 lines · David Hildenbrand
Quoted 25 lines · Christian Borntraeger
secure execution (aka protected virtualization) guests cannot be migrated at the moment. Disallow the unpack facility if the user specifies --only-migratable.
Signed-off-by Christian Borntraeger <[email protected]>--- target/s390x/cpu_models.c | 6 ++++++ 1 file changed, 6 insertions(+)target/s390x/cpu_models.c +1
-0@@ -26,6 +26,7 @@#include "qapi/qmp/qdict.h" #ifndef CONFIG_USER_ONLY #include "sysemu/arch_init.h" +#include "sysemu/sysemu.h" #include "hw/pci/pci.h" #endif #include "qapi/qapi-commands-machine-target.h" @@ -878,6 +879,11 @@ static void check_compatibility(const S390CPUModel *max_model,return ; }
Quoted 5 lines
target/s390x/cpu_models.c static void check_compatibility(const S390CPUModel *max_model, · line 884
Quoted 3 lines
target/s390x/cpu_models.c +3
-0+if (only_migratable &&test_bit (S390_FEAT_UNPACK , model->features)) { +error_setg (errp,"The unpack facility is not compatible with " +"the --only-migratable option" );return; ?
of course.
Quoted 3 lines
This implies that a VM with "-cpu host" might not start anymore, right?
Only if --only-migratable is set.
David Hildenbrand
Reviewed-byQuoted 35 lines · Christian Borntraeger
Quoted 26 lines · David Hildenbrand
Quoted 25 lines · Christian Borntraeger
secure execution (aka protected virtualization) guests cannot be migrated at the moment. Disallow the unpack facility if the user specifies --only-migratable.
Signed-off-by Christian Borntraeger <[email protected]>--- target/s390x/cpu_models.c | 6 ++++++ 1 file changed, 6 insertions(+)target/s390x/cpu_models.c +1
-0@@ -26,6 +26,7 @@#include "qapi/qmp/qdict.h" #ifndef CONFIG_USER_ONLY #include "sysemu/arch_init.h" +#include "sysemu/sysemu.h" #include "hw/pci/pci.h" #endif #include "qapi/qapi-commands-machine-target.h" @@ -878,6 +879,11 @@ static void check_compatibility(const S390CPUModel *max_model,return ; }Quoted 5 lines
target/s390x/cpu_models.c static void check_compatibility(const S390CPUModel *max_model, · line 884
Quoted 3 lines
target/s390x/cpu_models.c +3
-0+if (only_migratable &&test_bit (S390_FEAT_UNPACK , model->features)) { +error_setg (errp,"The unpack facility is not compatible with " +"the --only-migratable option" );return; ?
Quoted 8 lines
of course.
Quoted 3 lines
This implies that a VM with "-cpu host" might not start anymore, right?
Only if --only-migratable is set.
Right, that's what I meant
Signature · 3 lines
Thanks, David / dhildenb