qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Halil Pasic <pasic@linux.ibm.com>
Cc: Thomas Huth <thuth@redhat.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	Cornelia Huck <cohuck@redhat.com>,
	qemu-devel@nongnu.org,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	qemu-s390x@nongnu.org, Marc Hartmayer <mhartmay@linux.ibm.com>,
	Michael Mueller <mimu@linux.ibm.com>,
	Viktor Mihajlovski <mihajlov@linux.ibm.com>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH v2 1/1] s390/ipl: sync back loadparm
Date: Mon, 9 Mar 2020 15:48:14 +0100	[thread overview]
Message-ID: <e54b50fb-4d03-44be-0a83-7614955809e8@redhat.com> (raw)
In-Reply-To: <20200309152751.5f0cd2f8.pasic@linux.ibm.com>

On 09.03.20 15:27, Halil Pasic wrote:
> On Mon, 9 Mar 2020 14:44:20 +0100
> David Hildenbrand <david@redhat.com> wrote:
> 
>> On 09.03.20 14:32, Halil Pasic wrote:
>>> We expose loadparm as a r/w machine property, but if loadparm is set by
>>> the guest via DIAG 308, we don't update the property. Having a
>>> disconnect between the guest view and the QEMU property is not nice in
>>> itself, but things get even worse for SCSI, where under certain
>>> circumstances (see 789b5a401b "s390: Ensure IPL from SCSI works as
>>> expected" for details) we call s390_gen_initial_iplb() on resets
>>> effectively overwriting the guest/user supplied loadparm with the stale
>>> value.
>>>
>>> Signed-off-by: Halil Pasic <pasic@linux.ibm.com>
>>> Fixes: 7104bae9de ("hw/s390x: provide loadparm property for the machine")
>>> Reported-by: Marc Hartmayer <mhartmay@linux.ibm.com>
>>> Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
>>> Reviewed-by: Viktor Mihajlovski <mihajlov@linux.ibm.com>
>>> Tested-by: Marc Hartmayer <mhartmay@linux.ibm.com>
>>> ---
>>> v1 --> v2:
>>> * tweaked the Fixes tag (Connie)
>>> * s/mo/machine/ (David)
>>> * We decided to not abort if the setter fails. It is not clear where
>>>   do the validation logic come from in the first place. For now lets put
>>>   out a warning if things go wrong.
>>>   The warning we get looks something like:
>>>   qemu-system-s390x: warning: LOADPARM: invalid character '?' (ASCII 0x3f)
>>> * I keept the r-b's and the tested-by as the changes are minor. Please
>>>   shout at me if you object.
>>> ---
>>>  hw/s390x/ipl.c | 25 +++++++++++++++++++++++++
>>>  1 file changed, 25 insertions(+)
>>>
>>> diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
>>> index 9c1ecd423c..8bd50de44c 100644
>>> --- a/hw/s390x/ipl.c
>>> +++ b/hw/s390x/ipl.c
>>> @@ -538,6 +538,30 @@ static bool is_virtio_scsi_device(IplParameterBlock *iplb)
>>>      return is_virtio_ccw_device_of_type(iplb, VIRTIO_ID_SCSI);
>>>  }
>>>  
>>> +static void update_machine_ipl_properties(IplParameterBlock *iplb)
>>> +{
>>> +    Object *machine = qdev_get_machine();
>>> +    Error *err = NULL;
>>> +
>>> +    /* Sync loadparm */
>>> +    if (iplb->flags & DIAG308_FLAGS_LP_VALID) {
>>> +        char ascii_loadparm[8];
>>> +        int i;
>>> +        uint8_t *ebcdic_loadparm = iplb->loadparm;
>>
>> Nit: move this to the top
> 
> Do you mean (reverse xmass tree)

Yep :)


-- 
Thanks,

David / dhildenb



  reply	other threads:[~2020-03-09 14:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-09 13:32 [PATCH v2 1/1] s390/ipl: sync back loadparm Halil Pasic
2020-03-09 13:44 ` David Hildenbrand
2020-03-09 14:27   ` Halil Pasic
2020-03-09 14:48     ` David Hildenbrand [this message]
2020-03-10  8:42 ` Christian Borntraeger

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=e54b50fb-4d03-44be-0a83-7614955809e8@redhat.com \
    --to=david@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=mhartmay@linux.ibm.com \
    --cc=mihajlov@linux.ibm.com \
    --cc=mimu@linux.ibm.com \
    --cc=pasic@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=rth@twiddle.net \
    --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).