[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 15/15] s390x: protvirt: Handle SIGP store status correctly
From: |
Thomas Huth |
Subject: |
Re: [PATCH 15/15] s390x: protvirt: Handle SIGP store status correctly |
Date: |
Thu, 28 Nov 2019 16:30:06 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
On 20/11/2019 12.43, Janosch Frank wrote:
> Status storing is obviously not done by qemu anymore.
>
> Signed-off-by: Janosch Frank <address@hidden>
> ---
> target/s390x/sigp.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/target/s390x/sigp.c b/target/s390x/sigp.c
> index 2ce22d4dc1..68634d694a 100644
> --- a/target/s390x/sigp.c
> +++ b/target/s390x/sigp.c
> @@ -144,7 +144,9 @@ static void sigp_stop_and_store_status(CPUState *cs,
> run_on_cpu_data arg)
> case S390_CPU_STATE_STOPPED:
> /* already stopped, just store the status */
> cpu_synchronize_state(cs);
> - s390_store_status(cpu, S390_STORE_STATUS_DEF_ADDR, true);
> + if (!cpu->env.pv) {
> + s390_store_status(cpu, S390_STORE_STATUS_DEF_ADDR, true);
> + }
> break;
> }
> si->cc = SIGP_CC_ORDER_CODE_ACCEPTED;
> @@ -497,7 +499,8 @@ void do_stop_interrupt(CPUS390XState *env)
> if (s390_cpu_set_state(S390_CPU_STATE_STOPPED, cpu) == 0) {
> qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
> }
> - if (cpu->env.sigp_order == SIGP_STOP_STORE_STATUS) {
> + /* Storing will occur on next SIE entry for fmt 4 */
> + if (cpu->env.sigp_order == SIGP_STOP_STORE_STATUS && !env->pv) {
> s390_store_status(cpu, S390_STORE_STATUS_DEF_ADDR, true);
> }
> env->sigp_order = 0;
>
Maybe move the check into the s390_store_status() function instead?
Anyway,
Reviewed-by: Thomas Huth <address@hidden>
- [PATCH 14/15] s390x: protvirt: Disable address checks for PV guest IO emulation, (continued)
[PATCH 15/15] s390x: protvirt: Handle SIGP store status correctly, Janosch Frank, 2019/11/20
Re: [PATCH 00/15] s390x: Protected Virtualization support, Cornelia Huck, 2019/11/20
Re: [PATCH 00/15] s390x: Protected Virtualization support, Daniel P . Berrangé, 2019/11/29