From: Pierre Morel <pmorel@linux.ibm.com>
To: Thomas Huth <thuth@redhat.com>, qemu-s390x@nongnu.org
Cc: david@redhat.com, cohuck@redhat.com,
richard.henderson@linaro.org, qemu-devel@nongnu.org,
pasic@linux.ibm.com, borntraeger@de.ibm.com
Subject: Re: [PATCH v2 5/5] s390x: topology: implementating Store Topology System Information
Date: Tue, 7 Sep 2021 11:52:21 +0200 [thread overview]
Message-ID: <70fe96ef-89df-9321-c1d9-2496073aa3e5@linux.ibm.com> (raw)
In-Reply-To: <cd353458-d70e-b020-4195-2f8f9f9c6741@redhat.com>
On 9/7/21 10:00 AM, Thomas Huth wrote:
> On 22/07/2021 19.42, Pierre Morel wrote:
>> The handling of STSI is enhenced with the interception of the
>
> s/enhenced/enhanced/
yes, thanks
>
>> function code 15 for storing CPU topology.
...
>> +static void insert_stsi_15_1_x(S390CPU *cpu, int sel2, __u64 addr,
>> uint8_t ar)
>> +{
>> + const MachineState *machine = MACHINE(qdev_get_machine());
>> + void *p;
>> + int ret, cc;
>> +
>> + /*
>> + * Until the SCLP STSI Facility reporting the MNEST value is used,
>> + * a sel2 value of 2 is the only value allowed in STSI 15.1.x.
>> + */
>> + if (sel2 != 2) {
>> + setcc(cpu, 3);
>> + return;
>> + }
>> +
>> + p = g_malloc0(4096);
>
> Use TARGET_PAGE_SIZE instead of magic value 4096?
yes
>
>> + insert_stsi_15_1_2(machine, p);
>
> Wrong indentation (3 instead of 4 spaces).
oh, yes, thanks
>
>> + if (s390_is_pv()) {
>> + ret = s390_cpu_pv_mem_write(cpu, 0, p, 4096);
>> + } else {
>> + ret = s390_cpu_virt_mem_write(cpu, addr, ar, p, 4096);
>
> TARGET_PAGE_SIZE?
yes, of course.
>
>> + }
>> + cc = ret ? 3 : 0;
>> + setcc(cpu, cc);
>> + g_free(p);
>> +}
>> +
>> static int handle_stsi(S390CPU *cpu)
>> {
>> CPUState *cs = CPU(cpu);
>> @@ -1920,6 +2017,10 @@ static int handle_stsi(S390CPU *cpu)
>> /* Only sysib 3.2.2 needs post-handling for now. */
>> insert_stsi_3_2_2(cpu, run->s390_stsi.addr, run->s390_stsi.ar);
>> return 0;
>> + case 15:
>> + insert_stsi_15_1_x(cpu, run->s390_stsi.sel2,
>> run->s390_stsi.addr,
>> + run->s390_stsi.ar);
>> + return 0;
>> default:
>> return 0;
>> }
>>
>
> Thomas
>
Thanks for reviewing,
Pierre
--
Pierre Morel
IBM Lab Boeblingen
next prev parent reply other threads:[~2021-09-07 9:56 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-22 17:42 [PATCH v2 0/5] s390x: CPU Topology Pierre Morel
2021-07-22 17:42 ` [PATCH v2 1/5] s390x: kvm: topology: Linux header update Pierre Morel
2021-07-22 17:42 ` [PATCH v2 2/5] s390x: kvm: topology: interception of PTF instruction Pierre Morel
2021-08-03 8:10 ` Pierre Morel
2021-09-06 17:21 ` Thomas Huth
2021-09-07 8:40 ` Pierre Morel
2021-07-22 17:42 ` [PATCH v2 3/5] s390x: topology: CPU topology objects and structures Pierre Morel
2021-09-07 7:32 ` Thomas Huth
2021-09-07 9:18 ` Pierre Morel
2021-09-07 12:45 ` Pierre Morel
2021-09-29 8:12 ` Thomas Huth
2021-09-30 8:26 ` Pierre Morel
2021-07-22 17:42 ` [PATCH v2 4/5] s390x: topology: Topology list entries and SYSIB 15.x.x Pierre Morel
2021-09-07 7:46 ` Thomas Huth
2021-09-07 9:39 ` Pierre Morel
2021-09-07 7:54 ` Thomas Huth
2021-09-07 9:49 ` Pierre Morel
2021-07-22 17:42 ` [PATCH v2 5/5] s390x: topology: implementating Store Topology System Information Pierre Morel
2021-09-07 8:00 ` Thomas Huth
2021-09-07 9:52 ` Pierre Morel [this message]
2021-08-26 9:22 ` [PATCH v2 0/5] s390x: CPU Topology Pierre Morel
2021-08-30 9:54 ` Christian Borntraeger
2021-08-30 11:59 ` Pierre Morel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=70fe96ef-89df-9321-c1d9-2496073aa3e5@linux.ibm.com \
--to=pmorel@linux.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).