mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
hw/s390x/pv: Restrict Protected Virtualization to sysemu
Protected Virtualization is irrelevant in user emulation. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20221217152454.96388-4-philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
94e273dbb5
commit
3ea7e31267
2 changed files with 7 additions and 1 deletions
|
@ -14,7 +14,9 @@
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "qemu/module.h"
|
#include "qemu/module.h"
|
||||||
#include "cpu_features.h"
|
#include "cpu_features.h"
|
||||||
|
#ifndef CONFIG_USER_ONLY
|
||||||
#include "hw/s390x/pv.h"
|
#include "hw/s390x/pv.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DEF_FEAT(_FEAT, _NAME, _TYPE, _BIT, _DESC) \
|
#define DEF_FEAT(_FEAT, _NAME, _TYPE, _BIT, _DESC) \
|
||||||
[S390_FEAT_##_FEAT] = { \
|
[S390_FEAT_##_FEAT] = { \
|
||||||
|
@ -107,6 +109,7 @@ void s390_fill_feat_block(const S390FeatBitmap features, S390FeatType type,
|
||||||
feat = find_next_bit(features, S390_FEAT_MAX, feat + 1);
|
feat = find_next_bit(features, S390_FEAT_MAX, feat + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CONFIG_USER_ONLY
|
||||||
if (!s390_is_pv()) {
|
if (!s390_is_pv()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -147,6 +150,7 @@ void s390_fill_feat_block(const S390FeatBitmap features, S390FeatType type,
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void s390_add_from_feat_block(S390FeatBitmap features, S390FeatType type,
|
void s390_add_from_feat_block(S390FeatBitmap features, S390FeatType type,
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
#include "qemu/qemu-print.h"
|
#include "qemu/qemu-print.h"
|
||||||
#ifndef CONFIG_USER_ONLY
|
#ifndef CONFIG_USER_ONLY
|
||||||
#include "sysemu/sysemu.h"
|
#include "sysemu/sysemu.h"
|
||||||
#endif
|
|
||||||
#include "hw/s390x/pv.h"
|
#include "hw/s390x/pv.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define CPUDEF_INIT(_type, _gen, _ec_ga, _mha_pow, _hmfai, _name, _desc) \
|
#define CPUDEF_INIT(_type, _gen, _ec_ga, _mha_pow, _hmfai, _name, _desc) \
|
||||||
{ \
|
{ \
|
||||||
|
@ -236,6 +236,7 @@ bool s390_has_feat(S390Feat feat)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CONFIG_USER_ONLY
|
||||||
if (s390_is_pv()) {
|
if (s390_is_pv()) {
|
||||||
switch (feat) {
|
switch (feat) {
|
||||||
case S390_FEAT_DIAG_318:
|
case S390_FEAT_DIAG_318:
|
||||||
|
@ -259,6 +260,7 @@ bool s390_has_feat(S390Feat feat)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return test_bit(feat, cpu->model->features);
|
return test_bit(feat, cpu->model->features);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue