qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: David Hildenbrand <david@redhat.com>
Cc: qemu-devel@nongnu.org, borntraeger@de.ibm.com, agraf@suse.de,
	thuth@redhat.com, pmorel@linux.vnet.ibm.com,
	zyimin@linux.vnet.ibm.com, pasic@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH v3] s390x/ccw: create s390 phb for compat reasons as well
Date: Mon, 18 Sep 2017 14:11:27 +0200	[thread overview]
Message-ID: <20170918141127.17b669a7.cohuck@redhat.com> (raw)
In-Reply-To: <33493193-b9fc-e76f-f30e-c23d68e34289@redhat.com>

On Mon, 18 Sep 2017 14:03:20 +0200
David Hildenbrand <david@redhat.com> wrote:

> On 18.09.2017 10:55, Cornelia Huck wrote:
> > d32bd032d8 ("s390x/ccw: create s390 phb conditionally") made
> > registering the s390 pci host bridge conditional on presense
> > of the zpci facility bit. Sadly, that breaks migration from
> > machines that did not use the cpu model (2.7 and previous).
> > 
> > Create the s390 phb for pre-cpu model machines as well: We can
> > tweak s390_has_feat() to always indicate the zpci facility bit
> > when no cpu model is available (on 2.7 and previous compat machines).
> > 
> > Fixes: d32bd032d8 ("s390x/ccw: create s390 phb conditionally")
> > Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
> > Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> > ---
> > 
> > v2->v3:
> > - no longer RFC (I tested a bit more)
> > - removed unrelated hunk
> > - more verbose patch description
> > 
> > I'll wait a bit for more acks/reviews and will probably send a pull
> > request for s390x tomorrow or so before the amount of queued patches
> > gets out of hand...
> > 
> > ---
> >  target/s390x/cpu_models.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
> > index c295e641e6..5169379db5 100644
> > --- a/target/s390x/cpu_models.c
> > +++ b/target/s390x/cpu_models.c
> > @@ -196,6 +196,9 @@ bool s390_has_feat(S390Feat feat)
> >              }
> >          }
> >  #endif
> > +        if (feat == S390_FEAT_ZPCI) {
> > +            return true;
> > +        }
> >          return 0;
> >      }
> >      return test_bit(feat, cpu->model->features);
> >   
> 
> 1. cpu->model will always be set for QEMU, so you can move that into the
> ifdef, next do the other checks. You can even send a cleanup to remove
> the if (kvm_enabled()) check.

I prefer it the way it is now. There's nothing kvm specific about that
bit, and cpu->model always being set is not really obvious.

> 
> 2. "return pci_available" ?

I thought about that as well. I think, however, that a better way is
just to disable compat machines that rely on pci being available.

As you can turn off pci only manually, I'd like to defer this and first
get this out of the door, as it fixes an existing problem.

  reply	other threads:[~2017-09-18 12:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-18  8:55 [Qemu-devel] [PATCH v3] s390x/ccw: create s390 phb for compat reasons as well Cornelia Huck
2017-09-18  8:58 ` Christian Borntraeger
2017-09-18  9:06   ` Cornelia Huck
2017-09-18 12:03 ` David Hildenbrand
2017-09-18 12:11   ` Cornelia Huck [this message]
2017-09-18 12:13     ` David Hildenbrand
2017-09-18 12:16       ` 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=20170918141127.17b669a7.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=agraf@suse.de \
    --cc=borntraeger@de.ibm.com \
    --cc=david@redhat.com \
    --cc=pasic@linux.vnet.ibm.com \
    --cc=pmorel@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=zyimin@linux.vnet.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 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).