All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: David Hildenbrand <david@redhat.com>
Cc: Collin Walling <walling@linux.ibm.com>,
	mst@redhat.com, qemu-devel@nongnu.org, pasic@linux.ibm.com,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	qemu-s390x@nongnu.org, pbonzini@redhat.com, rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH v4] s390: diagnose 318 info reset and migration support
Date: Mon, 13 May 2019 13:46:37 +0200	[thread overview]
Message-ID: <20190513134637.3d8bb275.cohuck@redhat.com> (raw)
In-Reply-To: <c690c4a8-c277-e3c6-3697-3f0a1924559b@redhat.com>

On Mon, 13 May 2019 13:34:35 +0200
David Hildenbrand <david@redhat.com> wrote:

> On 13.05.19 12:55, Christian Borntraeger wrote:
> > 
> > 
> > On 13.05.19 11:57, David Hildenbrand wrote:  
> >> On 13.05.19 11:51, Christian Borntraeger wrote:  
> >>>
> >>>
> >>> On 13.05.19 11:40, David Hildenbrand wrote:  
> >>>> On 13.05.19 11:34, Christian Borntraeger wrote:  
> >>>>>
> >>>>>
> >>>>> On 13.05.19 10:03, David Hildenbrand wrote:  
> >>>>>>>> +    if ((SCCB_SIZE - sizeof(ReadInfo)) / sizeof(CPUEntry) < S390_MAX_CPUS)
> >>>>>>>> +        mc->max_cpus = S390_MAX_CPUS - 8;  
> >>>>>>>
> >>>>>>> This is too complicated, just set it always to 240.
> >>>>>>>
> >>>>>>> However, I am still not sure how to best handle this scenario. One
> >>>>>>> solution is
> >>>>>>>
> >>>>>>> 1. Set it statically to 240 for machine > 4.1
> >>>>>>> 2. Keep the old machines unmodifed
> >>>>>>> 3. Don't indicate the CPU feature for machines <= 4.0
> >>>>>>>
> >>>>>>> #3 is the problematic part, as it mixes host CPU features and machines.
> >>>>>>> Bad. The host CPU model should always look the same on all machines. I
> >>>>>>> don't like this.
> >>>>>>>  
> >>>>>>
> >>>>>> FWIW, #3 is only an issue when modeling it via the CPU model, like
> >>>>>> Christian suggested.
> >>>>>>
> >>>>>> I suggest the following
> >>>>>>
> >>>>>> 1. Set the max #cpus for 4.1 to 240 (already done)
> >>>>>> 2. Keep it for the other machines unmodified (as suggested by Thomas)
> >>>>>> 3. Create the layout of the SCCB depending on the machine type (to be done)
> >>>>>>
> >>>>>> If we want to model diag318 via a CPU feature (which makes sense for
> >>>>>> migration):
> >>>>>>
> >>>>>> 4. Disable diag318 with a warning if used with a machine < 4.1
> >>>>>>  
> >>>>>
> >>>>> I think there is a simpler solution. It is perfectly fine to fail the startup
> >>>>> if we cannot fulfil the cpu model. So lets just allow 248 and allow this feature 
> >>>>> also for older machines. And if somebody chooses both at the same time,
> >>>>> lets fails the startup.  
> >>>>
> >>>> To which knob do you want to glue the layout of the SCLP response? Like
> >>>> I described?  Do you mean instead of warning and masking the feature off
> >>>> as I suggested, simply failing?  
> >>>
> >>> The sclp response will depend on the dia318 cpu model flag. If its on, the sclp
> >>> response will have it, otherwise not.
> >>> - host-passthrough: not migration safe anyway
> >>> - host-model: if the target has diag318 good, otherwise we reject migration   
> >>>>
> >>>> In that case, -machine ..-4.0 -cpu host will not work on new HW with new
> >>>> KVM. Just noting.  
> >>>
> >>> Only if you have 248 CPUs (which is unlikely). My point was to do that for all
> >>> machine levels.
> >>>  
> >>
> >> The issue with this approach is that e.g. libvirt is not aware of this
> >> restriction. It could query "max_cpus" and expand the host-cpu model,
> >> but starting a guest with > 240 cpus would fail. Maybe this is acceptable.  
> > 
> > As of today we do the cpu model check in the same way. libvirt actually tries
> > to run QEMU and handles failures.
> > 
> > For a failure, the user still has still to use >240 CPUs in its XML. The only downside
> > is that libvirt will not reject this right away.
> > 
> > During startup we would then print an error message like
> > 
> > "The diag318 cpu feature is only supported for 240 and less CPUs."
> > 
> > This is of similar quality as
> > "Selected CPU GA level is too new. Maximum supported model in the configuration: \'%s\'",
> >   
> 
> But that can be tested using the runability information if I am not wrong.

You mean the cpu level information, right?

> 
> > and others that we have today.
> > 
> > So yes, I think this would be acceptable.  
> 
> I guess it is acceptable yes. I doubt anybody uses that many CPUs in
> production either way. But you never know.

I think that using that many cpus is a more uncommon setup, but I still
think that having to wait for actual failure is worse than being able
to find out beforehand. Any way to make this discoverable?


  reply	other threads:[~2019-05-13 11:56 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-01 22:31 [Qemu-devel] [PATCH v4] s390: diagnose 318 info reset and migration support Collin Walling
2019-05-09  9:58 ` Christian Borntraeger
2019-05-09 10:05   ` David Hildenbrand
2019-05-09 20:50   ` Collin Walling
2019-05-13  5:56     ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2019-05-13  7:46 ` [Qemu-devel] " David Hildenbrand
2019-05-13  8:03   ` David Hildenbrand
2019-05-13  9:34     ` Christian Borntraeger
2019-05-13  9:40       ` David Hildenbrand
2019-05-13  9:51         ` Christian Borntraeger
2019-05-13  9:57           ` David Hildenbrand
2019-05-13 10:55             ` Christian Borntraeger
2019-05-13 11:34               ` David Hildenbrand
2019-05-13 11:46                 ` Cornelia Huck [this message]
2019-05-14  7:09                   ` Christian Borntraeger
2019-05-14  7:28                     ` David Hildenbrand
2019-05-14  8:37                       ` Christian Borntraeger
2019-05-14  8:49                         ` Cornelia Huck
2019-05-14  8:53                           ` Christian Borntraeger
2019-05-14  8:59                           ` David Hildenbrand
2019-05-14  9:07                             ` Christian Borntraeger
2019-05-14  9:12                               ` Cornelia Huck
2019-05-14  9:10                             ` Christian Borntraeger
2019-05-14  9:20                               ` David Hildenbrand
2019-05-14  9:23                                 ` Christian Borntraeger
2019-05-14  9:25                                   ` [Qemu-devel] [qemu-s390x] " Christian Borntraeger
2019-05-14  9:27                                     ` David Hildenbrand
2019-05-14  9:30                                       ` Cornelia Huck
2019-05-16 13:35                                         ` Collin Walling
2019-05-16 14:10                                           ` Christian Borntraeger
2019-05-14  8:50                         ` [Qemu-devel] " David Hildenbrand
2019-05-14  8:56                           ` Christian Borntraeger
2019-05-14  9:00                             ` Cornelia Huck
2019-05-14  9:03                               ` David Hildenbrand
2019-05-14  9:05                                 ` David Hildenbrand
2019-05-14  9:00                             ` David Hildenbrand
2019-05-14  9:04                               ` Christian Borntraeger
2019-05-16 12:42                                 ` Collin Walling

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=20190513134637.3d8bb275.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=david@redhat.com \
    --cc=mst@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=walling@linux.ibm.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.