On 10.07.20 10:32, David Hildenbrand wrote: >>> --- a/target/s390x/misc_helper.c >>> +++ b/target/s390x/misc_helper.c >>> @@ -116,6 +116,12 @@ void HELPER(diag)(CPUS390XState *env, uint32_t r1, >>> uint32_t r3, uint32_t num) >>> uint64_t r; >>> >>> switch (num) { >>> + case 0x260: >>> + qemu_mutex_lock_iothread(); >>> + handle_diag_260(env, r1, r3, GETPC()); >>> + qemu_mutex_unlock_iothread(); >>> + r = 0; >>> + break; >>> case 0x500: >>> /* KVM hypercall */ >>> qemu_mutex_lock_iothread(); >> >> Looking at the doc referenced above, it seems that we treat every diag >> call as privileged under tcg; but it seems that 0x44 isn't? (Unrelated >> to your patch; maybe I'm misreading.) > > That's also a BUG in kvm then? > > int kvm_s390_handle_diag(struct kvm_vcpu *vcpu) > { > ... > if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) > return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); > ... > } diag 44 gives a PRIVOP on LPAR, so I think this is fine.
- Re: [PATCH RFC 4/5] s390x: implement virtio... David Hildenbrand
- [PATCH RFC 3/5] s390x: prepare device memory address... David Hildenbrand
- Re: [PATCH RFC 3/5] s390x: prepare device memor... Cornelia Huck
- Re: [PATCH RFC 3/5] s390x: prepare device m... David Hildenbrand
- [PATCH RFC 2/5] s390x: implement diag260 David Hildenbrand
- Re: [PATCH RFC 2/5] s390x: implement diag260 Cornelia Huck
- Re: [PATCH RFC 2/5] s390x: implement diag26... David Hildenbrand
- Re: [PATCH RFC 2/5] s390x: implement diag26... David Hildenbrand
- Re: [PATCH RFC 2/5] s390x: implement di... David Hildenbrand
- Re: [PATCH RFC 2/5] s390x: implemen... Cornelia Huck
- Re: [PATCH RFC 2/5] s390x: implement di... Christian Borntraeger
- Re: [PATCH RFC 2/5] s390x: implemen... Cornelia Huck
- Re: [PATCH RFC 2/5] s390x: imp... Christian Borntraeger
- Re: [PATCH RFC 2/5] s390x: implement diag260 Christian Borntraeger
- Re: [PATCH RFC 2/5] s390x: implement diag26... David Hildenbrand
- Re: [PATCH RFC 2/5] s390x: implement di... David Hildenbrand
- Re: [PATCH RFC 2/5] s390x: implemen... David Hildenbrand
- Re: [PATCH RFC 2/5] s390x: imp... Heiko Carstens
- Re: [PATCH RFC 2/5] s390x:... David Hildenbrand
- Re: [PATCH RFC 2/5] s390x:... Heiko Carstens
- Re: [PATCH RFC 2/5] s390x:... David Hildenbrand