Re: [Qemu-devel] [PATCH v6 15/17] target-s390x: Extend arch specific QMP command query-cpu-definitions

2015-05-11 Thread Eduardo Habkost
On Wed, May 06, 2015 at 04:48:57PM +0200, Michael Mueller wrote: On Wed, 6 May 2015 09:37:41 -0300 Eduardo Habkost ehabk...@redhat.com wrote: [...] -info = g_malloc0(sizeof(*info)); -info-name = g_strdup(host); +memset(mach, 0, sizeof(mach)); +if (has_accel) {

Re: [Qemu-devel] [PATCH v6 15/17] target-s390x: Extend arch specific QMP command query-cpu-definitions

2015-05-06 Thread Eduardo Habkost
On Mon, Apr 27, 2015 at 04:53:29PM +0200, Michael Mueller wrote: [...] #ifndef CONFIG_USER_ONLY +static CpuDefinitionInfoList *qmp_query_cpu_definition_host(void) +{ +CpuDefinitionInfoList *host = NULL; +CpuDefinitionInfo *info; + +info = g_try_new0(CpuDefinitionInfo, 1); +

Re: [Qemu-devel] [PATCH v6 15/17] target-s390x: Extend arch specific QMP command query-cpu-definitions

2015-05-06 Thread Michael Mueller
On Wed, 6 May 2015 09:37:41 -0300 Eduardo Habkost ehabk...@redhat.com wrote: On Mon, Apr 27, 2015 at 04:53:29PM +0200, Michael Mueller wrote: [...] #ifndef CONFIG_USER_ONLY +static CpuDefinitionInfoList *qmp_query_cpu_definition_host(void) +{ +CpuDefinitionInfoList *host = NULL;

Re: [Qemu-devel] [PATCH v6 15/17] target-s390x: Extend arch specific QMP command query-cpu-definitions

2015-05-06 Thread Michael Mueller
On Wed, 6 May 2015 13:00:32 -0300 Eduardo Habkost ehabk...@redhat.com wrote: On Wed, May 06, 2015 at 05:31:06PM +0200, Michael Mueller wrote: On Tue, 5 May 2015 15:40:34 -0300 Eduardo Habkost ehabk...@redhat.com wrote: [...] Second, you shouldn't even need to duplicate code in

Re: [Qemu-devel] [PATCH v6 15/17] target-s390x: Extend arch specific QMP command query-cpu-definitions

2015-05-06 Thread Michael Mueller
On Tue, 5 May 2015 15:40:34 -0300 Eduardo Habkost ehabk...@redhat.com wrote: On Mon, Apr 27, 2015 at 04:53:29PM +0200, Michael Mueller wrote: [...] diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index 4d75ff0..94fede5 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@

Re: [Qemu-devel] [PATCH v6 15/17] target-s390x: Extend arch specific QMP command query-cpu-definitions

2015-05-06 Thread Eduardo Habkost
On Wed, May 06, 2015 at 05:31:06PM +0200, Michael Mueller wrote: On Tue, 5 May 2015 15:40:34 -0300 Eduardo Habkost ehabk...@redhat.com wrote: [...] Second, you shouldn't even need to duplicate code in get_machine_props_fallback() if you are able to create an accel object and do just basic

Re: [Qemu-devel] [PATCH v6 15/17] target-s390x: Extend arch specific QMP command query-cpu-definitions

2015-05-05 Thread Eduardo Habkost
On Mon, Apr 27, 2015 at 04:53:29PM +0200, Michael Mueller wrote: [...] diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index 4d75ff0..94fede5 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -276,12 +276,59 @@ static int cpu_model_set(KVMState *s, uint64_t attr, void *addr)

[Qemu-devel] [PATCH v6 15/17] target-s390x: Extend arch specific QMP command query-cpu-definitions

2015-04-27 Thread Michael Mueller
This patch implements the QMP command 'query-cpu-definitions' in the S390 context. The command returns a list of cpu definitions in the current host context. A runnable and migratable cpu model has the related attributes set to true. The order attribute is used to bring the listed cpu definitions