All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: David Hildenbrand <david@redhat.com>
Cc: qemu-s390x@nongnu.org, qemu-devel@nongnu.org,
	"Richard Henderson" <rth@twiddle.net>,
	"Alexander Graf" <agraf@suse.de>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"Christian Borntraeger" <borntraeger@de.ibm.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Chris Venteicher" <cventeic@redhat.com>,
	"Collin Walling" <walling@linux.ibm.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v1] s390x/cpu_models: Add "-cpu max" support
Date: Wed, 25 Jul 2018 17:14:38 -0300	[thread overview]
Message-ID: <20180725201438.GG12380@localhost.localdomain> (raw)
In-Reply-To: <a33a67eb-2fb6-31fd-f4ca-1d883a5a7b75@redhat.com>

On Wed, Jul 25, 2018 at 07:50:21PM +0200, David Hildenbrand wrote:
> On 25.07.2018 19:09, Eduardo Habkost wrote:
[...]
> >> +    if (local_err) {
> >> +        g_assert(kvm_enabled());
> >> +        error_report_err(local_err);
> >> +        /* fallback to unsupported CPU models */
> >> +        return;
> > 
> > What about moving this outside instance_init?
> 
> To which place for example? We at least have to copy the CPU model
> for each and every CPU instance (so we can modify it without side
> effects using properties).

To any code that will look at cpu->model.

You are wrapping an interface that needs to report errors
(kvm_s390_get_host_cpu_model()) behind an interface that is not
able to report errors (object_new()).  There's nothing that
requires you to do that, does it?  You are free to provide an API
that is actually able to report errors, instead of relying on
object_new() only.

But I understand that the QOM/qdev API doesn't make that job
easy.  On x86 we have X86CPU::max_features and
X86CPU::user_features because of that.

-- 
Eduardo

  reply	other threads:[~2018-07-25 20:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-25  9:12 [Qemu-devel] [PATCH v1] s390x/cpu_models: Add "-cpu max" support David Hildenbrand
2018-07-25 11:36 ` Cornelia Huck
2018-07-25 11:58   ` David Hildenbrand
2018-07-25 12:06     ` Cornelia Huck
2018-07-25 12:49       ` David Hildenbrand
2018-07-25 13:16         ` Cornelia Huck
2018-07-25 17:09 ` Eduardo Habkost
2018-07-25 17:50   ` David Hildenbrand
2018-07-25 20:14     ` Eduardo Habkost [this message]
2018-07-26  7:29       ` David Hildenbrand
2018-07-26 15:07         ` Eduardo Habkost
2018-07-27 14:57           ` [Qemu-devel] [qemu-s390x] " David Hildenbrand
2018-07-27 12:55 ` [Qemu-devel] " Cornelia Huck
2018-07-30  9:16   ` [Qemu-devel] [qemu-s390x] " David Hildenbrand
2018-07-30 20:13     ` Eduardo Habkost
2018-08-02 15:13 ` [Qemu-devel] " 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=20180725201438.GG12380@localhost.localdomain \
    --to=ehabkost@redhat.com \
    --cc=agraf@suse.de \
    --cc=berrange@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=cventeic@redhat.com \
    --cc=david@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=thuth@redhat.com \
    --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.