mirror of https://gitee.com/openkylin/qemu.git
some s390x fixes
-----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEEw9DWbcNiT/aowBjO3s9rk8bwL68FAl+WqRoSHGNvaHVja0By ZWRoYXQuY29tAAoJEN7Pa5PG8C+vHuYQAIVxcrNdOdO5f9df6KIEMMFSdvQvfCa9 CCwNQvQFktEVrva69aIVbe8sCyl8QOfk+LTl9b8QLD03AONAYj15siROcabnZoY4 Z8+Er3FCq114cArLScQCS/cmXUFJR9/dYUEVBc9dfx1TEG07Foy/nLbGGcqkiOnW 8yF5bLgHM7z4hSFwduMbuy6c6K9qdn8a/YWwA1qU5TEdBsiDaemiMLUiVT3FKCdY JahKEiYIB6IX1dadLMpmgENub8Uhg77Pc9vP5PFO54Gz33cDnUutIku4XrqHoyBW prI2EmbDjMfBn5KJ+oVfgNJ4qmFp5HhLeMwVu6xGXayaTYwkitM/1bPAFbfC311d 0kkzbEHBe1uMKtVBbkSuIwKRQ3p0PkhwGf71XdeZQjeDU+mfoIv60gMJnVwMrp3z LOOo45F1seE/2cunLCoNNIPpB27BVPj59vNZ/yYhI3gUnIuKsvEmu6R0jf1sZUbt htMbsAMzr8F93m1fqUKTaCQoQ0W7vTLHDju7f1UJUHO/4YL5d5FM0hBykYwvtfJS EUR9JzRrJFih68/6FFMFxvuUZWZZ5EmUsAG9eYrop9I+ula1DfEQ9D6qyUkb0F3H cQOtKWGaBS0KUsb16o0AKhnu+97tE1s2KhEvrKV/7A0zojZbeCOL5wqhJq6QqWrw XG7+SXM1OrMh =kXqU -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20201026' into staging some s390x fixes # gpg: Signature made Mon 26 Oct 2020 10:46:50 GMT # gpg: using RSA key C3D0D66DC3624FF6A8C018CEDECF6B93C6F02FAF # gpg: issuer "cohuck@redhat.com" # gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>" [unknown] # gpg: aka "Cornelia Huck <huckc@linux.vnet.ibm.com>" [full] # gpg: aka "Cornelia Huck <cornelia.huck@de.ibm.com>" [full] # gpg: aka "Cornelia Huck <cohuck@kernel.org>" [unknown] # gpg: aka "Cornelia Huck <cohuck@redhat.com>" [unknown] # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0 18CE DECF 6B93 C6F0 2FAF * remotes/cohuck/tags/s390x-20201026: s390x: pv: Fix diag318 PV fencing s390x: pv: Remove sclp boundary checks s390x/s390-virtio-ccw: Reset PCI devices during subsystem reset Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
a46e727105
|
@ -101,6 +101,7 @@ static const char *const reset_dev_types[] = {
|
|||
"s390-sclp-event-facility",
|
||||
"s390-flic",
|
||||
"diag288",
|
||||
TYPE_S390_PCI_HOST_BRIDGE,
|
||||
};
|
||||
|
||||
static void subsystem_reset(void)
|
||||
|
|
|
@ -285,11 +285,6 @@ int sclp_service_call_protected(CPUS390XState *env, uint64_t sccb,
|
|||
goto out_write;
|
||||
}
|
||||
|
||||
if (!sccb_verify_boundary(sccb, be16_to_cpu(work_sccb->h.length), code)) {
|
||||
work_sccb->h.response_code = cpu_to_be16(SCLP_RC_SCCB_BOUNDARY_VIOLATION);
|
||||
goto out_write;
|
||||
}
|
||||
|
||||
sclp_c->execute(sclp, work_sccb, code);
|
||||
out_write:
|
||||
s390_cpu_pv_mem_write(env_archcpu(env), 0, work_sccb,
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "qemu/osdep.h"
|
||||
#include "qemu/module.h"
|
||||
#include "cpu_features.h"
|
||||
#include "hw/s390x/pv.h"
|
||||
|
||||
#define DEF_FEAT(_FEAT, _NAME, _TYPE, _BIT, _DESC) \
|
||||
[S390_FEAT_##_FEAT] = { \
|
||||
|
@ -105,6 +106,10 @@ void s390_fill_feat_block(const S390FeatBitmap features, S390FeatType type,
|
|||
}
|
||||
feat = find_next_bit(features, S390_FEAT_MAX, feat + 1);
|
||||
}
|
||||
|
||||
if (type == S390_FEAT_TYPE_SCLP_FAC134 && s390_is_pv()) {
|
||||
clear_be_bit(s390_feat_def(S390_FEAT_DIAG_318)->bit, data);
|
||||
}
|
||||
}
|
||||
|
||||
void s390_add_from_feat_block(S390FeatBitmap features, S390FeatType type,
|
||||
|
|
|
@ -81,6 +81,10 @@ const S390FeatGroupDef *s390_feat_group_def(S390FeatGroup group);
|
|||
|
||||
#define BE_BIT_NR(BIT) (BIT ^ (BITS_PER_LONG - 1))
|
||||
|
||||
static inline void clear_be_bit(unsigned int bit_nr, uint8_t *array)
|
||||
{
|
||||
array[bit_nr / 8] &= ~(0x80 >> (bit_nr % 8));
|
||||
}
|
||||
static inline void set_be_bit(unsigned int bit_nr, uint8_t *array)
|
||||
{
|
||||
array[bit_nr / 8] |= 0x80 >> (bit_nr % 8);
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "hw/pci/pci.h"
|
||||
#endif
|
||||
#include "qapi/qapi-commands-machine-target.h"
|
||||
#include "hw/s390x/pv.h"
|
||||
|
||||
#define CPUDEF_INIT(_type, _gen, _ec_ga, _mha_pow, _hmfai, _name, _desc) \
|
||||
{ \
|
||||
|
@ -238,6 +239,9 @@ bool s390_has_feat(S390Feat feat)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
if (feat == S390_FEAT_DIAG_318 && s390_is_pv()) {
|
||||
return false;
|
||||
}
|
||||
return test_bit(feat, cpu->model->features);
|
||||
}
|
||||
|
||||
|
|
|
@ -2498,8 +2498,7 @@ void kvm_s390_get_host_cpu_model(S390CPUModel *model, Error **errp)
|
|||
*/
|
||||
set_bit(S390_FEAT_EXTENDED_LENGTH_SCCB, model->features);
|
||||
|
||||
/* DIAGNOSE 0x318 is not supported under protected virtualization */
|
||||
if (!s390_is_pv() && kvm_check_extension(kvm_state, KVM_CAP_S390_DIAG318)) {
|
||||
if (kvm_check_extension(kvm_state, KVM_CAP_S390_DIAG318)) {
|
||||
set_bit(S390_FEAT_DIAG_318, model->features);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue