All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Farman <farman@linux.ibm.com>
To: Janosch Frank <frankja@linux.ibm.com>,
	Thomas Huth <thuth@redhat.com>, Cornelia Huck <cohuck@redhat.com>
Cc: Jason Herne <jjherne@linux.ibm.com>,
	Matthew Rosato <mjrosato@linux.ibm.com>,
	qemu-devel@nongnu.org,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	qemu-s390x@nongnu.org, Jared Rossi <jrossi@linux.ibm.com>
Subject: Re: [PATCH 1/2] pc-bios: s390x: Ensure Read IPL memory is clean
Date: Fri, 20 Nov 2020 09:39:57 -0500	[thread overview]
Message-ID: <70ad0d92-eca4-f5ca-65b1-d275cb8fa281@linux.ibm.com> (raw)
In-Reply-To: <a2b38d34-97ce-595a-bf41-094dcadd6776@linux.ibm.com>



On 11/20/20 3:26 AM, Janosch Frank wrote:
> On 11/19/20 5:57 PM, Eric Farman wrote:
>> If, for example, we boot off a virtio device and chreipl to a vfio-ccw
>> device, the space at lowcore will be non-zero. We build a Read IPL CCW
>> at address zero, but it will have leftover PSW data that will conflict
>> with the Format-0 CCW being generated:
>>
>> 0x0: 00080000 80010000
>>         ------ Ccw0.cda
>>                -- Ccw0.chainData
>>                  -- Reserved bits
>>
>> The data address will be overwritten with the correct value (0x0), but
>> the apparent data chain bit will cause subsequent memory to be used as
>> the target of the data store, which may not be where we expect (0x0).
>>
>> Clear out this space when we boot from DASD, so that we know it exists
>> exactly as we expect.
>>
>> Signed-off-by: Eric Farman <farman@linux.ibm.com>
>> Reviewed-by: Jason J. Herne <jjherne@linux.ibm.com>
>> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
> 
> Seems like I should have been more specific with my LGTM:
> Reviewed-by: Janosch Frank <frankja@de.ibm.com>

Thanks, Janosch. I didn't want to put words in your acronym. :)

> 
>> ---
>>   pc-bios/s390-ccw/dasd-ipl.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/pc-bios/s390-ccw/dasd-ipl.c b/pc-bios/s390-ccw/dasd-ipl.c
>> index 0fc879bb8e..71cbae2f16 100644
>> --- a/pc-bios/s390-ccw/dasd-ipl.c
>> +++ b/pc-bios/s390-ccw/dasd-ipl.c
>> @@ -100,6 +100,9 @@ static void make_readipl(void)
>>   {
>>       Ccw0 *ccwIplRead = (Ccw0 *)0x00;
>>   
>> +    /* Clear out any existing data */
>> +    memset(ccwIplRead, 0, sizeof(Ccw0));
>> +
>>       /* Create Read IPL ccw at address 0 */
>>       ccwIplRead->cmd_code = CCW_CMD_READ_IPL;
>>       ccwIplRead->cda = 0x00; /* Read into address 0x00 in main memory */
>>
> 


  reply	other threads:[~2020-11-20 14:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 16:57 [PATCH 0/2] pc-bios/s390 fixes for reboot-to-vfio-ccw Eric Farman
2020-11-19 16:57 ` [PATCH 1/2] pc-bios: s390x: Ensure Read IPL memory is clean Eric Farman
2020-11-19 20:06   ` Thomas Huth
2020-11-20  8:26   ` Janosch Frank
2020-11-20 14:39     ` Eric Farman [this message]
2020-11-20  9:26   ` Cornelia Huck
2020-11-19 16:57 ` [PATCH 2/2] pc-bios: s390x: Give precedence to reset PSW Eric Farman
2020-11-19 20:20   ` Thomas Huth
2020-11-19 21:11     ` Eric Farman
2020-11-20  6:02       ` Thomas Huth
2020-11-20 14:38         ` Eric Farman
2020-11-19 17:52 ` [PATCH 0/2] pc-bios/s390 fixes for reboot-to-vfio-ccw Cornelia Huck

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=70ad0d92-eca4-f5ca-65b1-d275cb8fa281@linux.ibm.com \
    --to=farman@linux.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=jjherne@linux.ibm.com \
    --cc=jrossi@linux.ibm.com \
    --cc=mjrosato@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.