hw/s390x/css: Have css_do_sic() take S390CPU instead of CPUS390XState
"hw/s390x/css.h" is a header used by target-agnostic objects (such hw/s390x/virtio-ccw-gpu.c), thus can not use target-specific types, such CPUS390XState. Have css_do_sic() take S390CPU a pointer, which is target-agnostic. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20231106114500.5269-2-philmd@linaro.org>
This commit is contained in:
parent
2bb53fa2f3
commit
6233759ae1
@ -644,8 +644,9 @@ void css_conditional_io_interrupt(SubchDev *sch)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int css_do_sic(CPUS390XState *env, uint8_t isc, uint16_t mode)
|
int css_do_sic(S390CPU *cpu, uint8_t isc, uint16_t mode)
|
||||||
{
|
{
|
||||||
|
CPUS390XState *env = &cpu->env;
|
||||||
S390FLICState *fs = s390_get_flic();
|
S390FLICState *fs = s390_get_flic();
|
||||||
S390FLICStateClass *fsc = s390_get_flic_class(fs);
|
S390FLICStateClass *fsc = s390_get_flic_class(fs);
|
||||||
int r;
|
int r;
|
||||||
|
@ -233,7 +233,7 @@ typedef enum {
|
|||||||
} CssIoAdapterType;
|
} CssIoAdapterType;
|
||||||
|
|
||||||
void css_adapter_interrupt(CssIoAdapterType type, uint8_t isc);
|
void css_adapter_interrupt(CssIoAdapterType type, uint8_t isc);
|
||||||
int css_do_sic(CPUS390XState *env, uint8_t isc, uint16_t mode);
|
int css_do_sic(S390CPU *cpu, uint8_t isc, uint16_t mode);
|
||||||
uint32_t css_get_adapter_id(CssIoAdapterType type, uint8_t isc);
|
uint32_t css_get_adapter_id(CssIoAdapterType type, uint8_t isc);
|
||||||
void css_register_io_adapters(CssIoAdapterType type, bool swap, bool maskable,
|
void css_register_io_adapters(CssIoAdapterType type, bool swap, bool maskable,
|
||||||
uint8_t flags, Error **errp);
|
uint8_t flags, Error **errp);
|
||||||
|
@ -1358,7 +1358,7 @@ static int kvm_sic_service_call(S390CPU *cpu, struct kvm_run *run)
|
|||||||
|
|
||||||
mode = env->regs[r1] & 0xffff;
|
mode = env->regs[r1] & 0xffff;
|
||||||
isc = (env->regs[r3] >> 27) & 0x7;
|
isc = (env->regs[r3] >> 27) & 0x7;
|
||||||
r = css_do_sic(env, isc, mode);
|
r = css_do_sic(cpu, isc, mode);
|
||||||
if (r) {
|
if (r) {
|
||||||
kvm_s390_program_interrupt(cpu, -r);
|
kvm_s390_program_interrupt(cpu, -r);
|
||||||
}
|
}
|
||||||
|
@ -761,10 +761,11 @@ void HELPER(stpcifc)(CPUS390XState *env, uint32_t r1, uint64_t fiba,
|
|||||||
|
|
||||||
void HELPER(sic)(CPUS390XState *env, uint64_t r1, uint64_t r3)
|
void HELPER(sic)(CPUS390XState *env, uint64_t r1, uint64_t r3)
|
||||||
{
|
{
|
||||||
|
S390CPU *cpu = env_archcpu(env);
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
qemu_mutex_lock_iothread();
|
qemu_mutex_lock_iothread();
|
||||||
r = css_do_sic(env, (r3 >> 27) & 0x7, r1 & 0xffff);
|
r = css_do_sic(cpu, (r3 >> 27) & 0x7, r1 & 0xffff);
|
||||||
qemu_mutex_unlock_iothread();
|
qemu_mutex_unlock_iothread();
|
||||||
/* css_do_sic() may actually return a PGM_xxx value to inject */
|
/* css_do_sic() may actually return a PGM_xxx value to inject */
|
||||||
if (r) {
|
if (r) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user