From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48576) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRFAO-00038E-Fq for qemu-devel@nongnu.org; Tue, 19 Dec 2017 05:30:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRFAN-0005ns-Ko for qemu-devel@nongnu.org; Tue, 19 Dec 2017 05:30:32 -0500 References: <20171219082807.84494-1-borntraeger@de.ibm.com> From: David Hildenbrand Message-ID: Date: Tue, 19 Dec 2017 11:30:25 +0100 MIME-Version: 1.0 In-Reply-To: <20171219082807.84494-1-borntraeger@de.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] s390x/sclp: fixup highest CPU address List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christian Borntraeger , Cornelia Huck Cc: qemu-devel , qemu-s390x , Halil Pasic , Alexander Graf , Thomas Huth , Richard Henderson , "Jason J . Herne" On 19.12.2017 09:28, Christian Borntraeger wrote: > the highest cpu address is not the same as max_cpus. max_cpus > counts from 1 while the cpu address starts at 0. > > Signed-off-by: Christian Borntraeger > Reviewed-by: Jason J. Herne > --- > hw/s390x/sclp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c > index 9be0cb80ad..21351ffffc 100644 > --- a/hw/s390x/sclp.c > +++ b/hw/s390x/sclp.c > @@ -67,7 +67,7 @@ static void read_SCP_info(SCLPDevice *sclp, SCCB *sccb) > prepare_cpu_entries(sclp, read_info->entries, &cpu_count); > read_info->entries_cpu = cpu_to_be16(cpu_count); > read_info->offset_cpu = cpu_to_be16(offsetof(ReadInfo, entries)); > - read_info->highest_cpu = cpu_to_be16(max_cpus); > + read_info->highest_cpu = cpu_to_be16(max_cpus - 1); > > read_info->ibc_val = cpu_to_be32(s390_get_ibc_val()); > > Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb