lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <96fe20ac-bea0-7eee-cfb5-198a906e5399@linux.ibm.com>
Date:   Fri, 18 Feb 2022 18:08:32 +0100
From:   Pierre Morel <pmorel@...ux.ibm.com>
To:     Heiko Carstens <hca@...ux.ibm.com>
Cc:     Nico Boehr <nrb@...ux.ibm.com>, kvm@...r.kernel.org,
        linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org,
        borntraeger@...ibm.com, frankja@...ux.ibm.com, cohuck@...hat.com,
        david@...hat.com, thuth@...hat.com, imbrenda@...ux.ibm.com,
        gor@...ux.ibm.com, wintera@...ux.ibm.com, seiden@...ux.ibm.com
Subject: Re: [PATCH v7 1/1] s390x: KVM: guest support for topology function



On 2/18/22 16:10, Heiko Carstens wrote:
>>>> +       /* The real CPU backing up the vCPU moved to another socket
>>>> */
>>>> +       if (topology_physical_package_id(vcpu->cpu) !=
>>>> +           topology_physical_package_id(vcpu->arch.prev_cpu))
>>>> +               return true;
>>>
>>> Why is it OK to look just at the physical package ID here? What if the
>>> vcpu for example moves to a different book, which has a core with the
>>> same physical package ID?
>>>
>>
>> You are right, we should look at the drawer and book id too.
>> Something like that I think:
>>
>>          if ((topology_physical_package_id(vcpu->cpu) !=
>>               topology_physical_package_id(vcpu->arch.prev_cpu)) ||
>>              (topology_book_id(vcpu->cpu) !=
>>               topology_book_id(vcpu->arch.prev_cpu)) ||
>>              (topology_drawer_id(vcpu->cpu) !=
>>               topology_drawer_id(vcpu->arch.prev_cpu)))
>>                  return true;
> 
> You only need to check if prev_cpu is present in topology_core_cpumask(cpu).
> 

Yes, thanks.

Regards,
Pierre

-- 
Pierre Morel
IBM Lab Boeblingen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ