qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] s390/kvm: fix diag318 propagation and reset functionality


From: Collin Walling
Subject: Re: [PATCH] s390/kvm: fix diag318 propagation and reset functionality
Date: Wed, 11 Nov 2020 22:50:40 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1

On 11/11/20 2:31 AM, Cornelia Huck wrote:
> On Tue, 10 Nov 2020 13:03:47 -0500
> Collin Walling <walling@linux.ibm.com> wrote:
> 
>> On 11/10/20 5:51 AM, Cornelia Huck wrote:
>>> On Wed,  4 Nov 2020 13:12:44 -0500
>>> Collin Walling <walling@linux.ibm.com> wrote:
> 
>>>> diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
>>>> index baa070fdf7..4b2aad009c 100644
>>>> --- a/target/s390x/kvm.c
>>>> +++ b/target/s390x/kvm.c
>>>> @@ -1615,6 +1615,7 @@ static void handle_diag_318(S390CPU *cpu, struct 
>>>> kvm_run *run)
>>>>  {
>>>>      uint64_t reg = (run->s390_sieic.ipa & 0x00f0) >> 4;
>>>>      uint64_t diag318_info = run->s.regs.gprs[reg];
>>>> +    CPUState *t;
>>>>  
>>>>      /*
>>>>       * DIAG 318 can only be enabled with KVM support. As such, let's
>>>> @@ -1622,13 +1623,14 @@ static void handle_diag_318(S390CPU *cpu, struct 
>>>> kvm_run *run)
>>>>       */
>>>>      if (!s390_has_feat(S390_FEAT_DIAG_318)) {
>>>>          kvm_s390_program_interrupt(cpu, PGM_SPECIFICATION);
>>>> +        return;  
>>>
>>> Seems like this return already fixes a bug on its own?  
>>
>> Yes. I can split this into a separate patch.
> 
> Not really needed, just a remark :)
> 
> Do you think you can get out a v2 soon enough so that it can be
> included in the next -rc?

Can do. I'll get the next version out ASAP.

> 
>>
>>>   
>>>>      }
>>>>  
>>>> -    cpu->env.diag318_info = diag318_info;
>>>> -
>>>>      if (can_sync_regs(CPU(cpu), KVM_SYNC_DIAG318)) {
>>>> -        run->s.regs.diag318 = diag318_info;
>>>> -        run->kvm_dirty_regs |= KVM_SYNC_DIAG318;
>>>> +        CPU_FOREACH(t) {
>>>> +            run_on_cpu(t, s390_do_cpu_set_diag318,
>>>> +                       RUN_ON_CPU_HOST_ULONG(diag318_info));
>>>> +        }
>>>>      }
>>>>  }
>>>>    
>>>
>>>   
>>
>>
> 


-- 
Regards,
Collin

Stay safe and stay healthy



reply via email to

[Prev in Thread] Current Thread [Next in Thread]