All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too
@ 2017-01-16 19:54 Eduardo Habkost
  2017-01-17 13:39 ` Richard W.M. Jones
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Eduardo Habkost @ 2017-01-16 19:54 UTC (permalink / raw)
  To: qemu-devel
  Cc: Jiri Denemark, David Hildenbrand, Richard Henderson, Igor Mammedov

Change the meaning of "-cpu host" to "enable all features
supported by the accelerator in the current host", so that it can
be used to enable/query all features supported by TCG.

To make sure "host" is still at the end of the list in "-cpu
help", add a "ordering" field that will be used when sorting the
CPU model list.

Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 target/i386/cpu-qom.h |  4 ++--
 target/i386/cpu.c     | 26 +++++---------------------
 2 files changed, 7 insertions(+), 23 deletions(-)

diff --git a/target/i386/cpu-qom.h b/target/i386/cpu-qom.h
index 8cd607e9a2..75618919e3 100644
--- a/target/i386/cpu-qom.h
+++ b/target/i386/cpu-qom.h
@@ -47,7 +47,7 @@ typedef struct X86CPUDefinition X86CPUDefinition;
 /**
  * X86CPUClass:
  * @cpu_def: CPU model definition
- * @kvm_required: Whether CPU model requires KVM to be enabled.
+ * @ordering: Ordering on the "-cpu help" CPU model list.
  * @migration_safe: See CpuDefinitionInfo::migration_safe
  * @parent_realize: The parent class' realize handler.
  * @parent_reset: The parent class' reset handler.
@@ -62,7 +62,7 @@ typedef struct X86CPUClass {
     /* Should be eventually replaced by subclass-specific property defaults. */
     X86CPUDefinition *cpu_def;
 
-    bool kvm_required;
+    int ordering;
     bool migration_safe;
 
     /* Optional description of CPU model.
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index ec6eaf215c..e0ca8c0288 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -1549,7 +1549,7 @@ static void host_x86_cpu_class_init(ObjectClass *oc, void *data)
     X86CPUClass *xcc = X86_CPU_CLASS(oc);
     uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0;
 
-    xcc->kvm_required = true;
+    xcc->ordering = 9; /* Show it last on "-cpu help" */
 
     host_cpuid(0x0, 0, &eax, &ebx, &ecx, &edx);
     x86_cpu_vendor_words2str(host_cpudef.vendor, ebx, edx, ecx);
@@ -1563,8 +1563,7 @@ static void host_x86_cpu_class_init(ObjectClass *oc, void *data)
 
     xcc->cpu_def = &host_cpudef;
     xcc->model_description =
-        "KVM processor with all supported host features "
-        "(only available in KVM mode)";
+        "Enables all features supported by the accelerator in the current host";
 
     /* level, xlevel, xlevel2, and the feature words are initialized on
      * instance_init, because they require KVM to be initialized.
@@ -2075,13 +2074,6 @@ static void x86_cpu_class_check_missing_features(X86CPUClass *xcc,
     Error *err = NULL;
     strList **next = missing_feats;
 
-    if (xcc->kvm_required && !kvm_enabled()) {
-        strList *new = g_new0(strList, 1);
-        new->value = g_strdup("kvm");;
-        *missing_feats = new;
-        return;
-    }
-
     xc = X86_CPU(object_new(object_class_get_name(OBJECT_CLASS(xcc))));
 
     x86_cpu_load_features(xc, &err);
@@ -2129,7 +2121,7 @@ static void listflags(FILE *f, fprintf_function print, const char **featureset)
     }
 }
 
-/* Sort alphabetically by type name, listing kvm_required models last. */
+/* Sort alphabetically by type name, respecting X86CPUClass::ordering. */
 static gint x86_cpu_list_compare(gconstpointer a, gconstpointer b)
 {
     ObjectClass *class_a = (ObjectClass *)a;
@@ -2138,9 +2130,8 @@ static gint x86_cpu_list_compare(gconstpointer a, gconstpointer b)
     X86CPUClass *cc_b = X86_CPU_CLASS(class_b);
     const char *name_a, *name_b;
 
-    if (cc_a->kvm_required != cc_b->kvm_required) {
-        /* kvm_required items go last */
-        return cc_a->kvm_required ? 1 : -1;
+    if (cc_a->ordering != cc_b->ordering) {
+        return cc_a->ordering - cc_b->ordering;
     } else {
         name_a = object_class_get_name(class_a);
         name_b = object_class_get_name(class_b);
@@ -3191,13 +3182,6 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp)
     Error *local_err = NULL;
     static bool ht_warned;
 
-    if (xcc->kvm_required && !kvm_enabled()) {
-        char *name = x86_cpu_class_get_model_name(xcc);
-        error_setg(&local_err, "CPU model '%s' requires KVM", name);
-        g_free(name);
-        goto out;
-    }
-
     if (cpu->apic_id == UNASSIGNED_APIC_ID) {
         error_setg(errp, "apic-id property was not initialized properly");
         return;
-- 
2.11.0.259.g40922b1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too
  2017-01-16 19:54 [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too Eduardo Habkost
@ 2017-01-17 13:39 ` Richard W.M. Jones
  2017-01-17 14:03   ` Eduardo Habkost
  2017-01-17 13:42 ` Richard W.M. Jones
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 17+ messages in thread
From: Richard W.M. Jones @ 2017-01-17 13:39 UTC (permalink / raw)
  To: Eduardo Habkost
  Cc: qemu-devel, Igor Mammedov, Jiri Denemark, Richard Henderson,
	David Hildenbrand

On Mon, Jan 16, 2017 at 05:54:52PM -0200, Eduardo Habkost wrote:
> Change the meaning of "-cpu host" to "enable all features
> supported by the accelerator in the current host", so that it can
> be used to enable/query all features supported by TCG.
> 
> To make sure "host" is still at the end of the list in "-cpu
> help", add a "ordering" field that will be used when sorting the
> CPU model list.
> 
> Cc: Richard Henderson <rth@twiddle.net>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
>  target/i386/cpu-qom.h |  4 ++--
>  target/i386/cpu.c     | 26 +++++---------------------
>  2 files changed, 7 insertions(+), 23 deletions(-)
> 
> diff --git a/target/i386/cpu-qom.h b/target/i386/cpu-qom.h
> index 8cd607e9a2..75618919e3 100644
> --- a/target/i386/cpu-qom.h
> +++ b/target/i386/cpu-qom.h
> @@ -47,7 +47,7 @@ typedef struct X86CPUDefinition X86CPUDefinition;
>  /**
>   * X86CPUClass:
>   * @cpu_def: CPU model definition
> - * @kvm_required: Whether CPU model requires KVM to be enabled.
> + * @ordering: Ordering on the "-cpu help" CPU model list.
>   * @migration_safe: See CpuDefinitionInfo::migration_safe
>   * @parent_realize: The parent class' realize handler.
>   * @parent_reset: The parent class' reset handler.
> @@ -62,7 +62,7 @@ typedef struct X86CPUClass {
>      /* Should be eventually replaced by subclass-specific property defaults. */
>      X86CPUDefinition *cpu_def;
>  
> -    bool kvm_required;
> +    int ordering;
>      bool migration_safe;
>  
>      /* Optional description of CPU model.
> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> index ec6eaf215c..e0ca8c0288 100644
> --- a/target/i386/cpu.c
> +++ b/target/i386/cpu.c
> @@ -1549,7 +1549,7 @@ static void host_x86_cpu_class_init(ObjectClass *oc, void *data)
>      X86CPUClass *xcc = X86_CPU_CLASS(oc);
>      uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0;
>  
> -    xcc->kvm_required = true;
> +    xcc->ordering = 9; /* Show it last on "-cpu help" */
>  
>      host_cpuid(0x0, 0, &eax, &ebx, &ecx, &edx);
>      x86_cpu_vendor_words2str(host_cpudef.vendor, ebx, edx, ecx);
> @@ -1563,8 +1563,7 @@ static void host_x86_cpu_class_init(ObjectClass *oc, void *data)
>  
>      xcc->cpu_def = &host_cpudef;
>      xcc->model_description =
> -        "KVM processor with all supported host features "
> -        "(only available in KVM mode)";
> +        "Enables all features supported by the accelerator in the current host";
>  
>      /* level, xlevel, xlevel2, and the feature words are initialized on
>       * instance_init, because they require KVM to be initialized.
> @@ -2075,13 +2074,6 @@ static void x86_cpu_class_check_missing_features(X86CPUClass *xcc,
>      Error *err = NULL;
>      strList **next = missing_feats;
>  
> -    if (xcc->kvm_required && !kvm_enabled()) {
> -        strList *new = g_new0(strList, 1);
> -        new->value = g_strdup("kvm");;
> -        *missing_feats = new;
> -        return;
> -    }
> -
>      xc = X86_CPU(object_new(object_class_get_name(OBJECT_CLASS(xcc))));
>  
>      x86_cpu_load_features(xc, &err);
> @@ -2129,7 +2121,7 @@ static void listflags(FILE *f, fprintf_function print, const char **featureset)
>      }
>  }
>  
> -/* Sort alphabetically by type name, listing kvm_required models last. */
> +/* Sort alphabetically by type name, respecting X86CPUClass::ordering. */
>  static gint x86_cpu_list_compare(gconstpointer a, gconstpointer b)
>  {
>      ObjectClass *class_a = (ObjectClass *)a;
> @@ -2138,9 +2130,8 @@ static gint x86_cpu_list_compare(gconstpointer a, gconstpointer b)
>      X86CPUClass *cc_b = X86_CPU_CLASS(class_b);
>      const char *name_a, *name_b;
>  
> -    if (cc_a->kvm_required != cc_b->kvm_required) {
> -        /* kvm_required items go last */
> -        return cc_a->kvm_required ? 1 : -1;
> +    if (cc_a->ordering != cc_b->ordering) {
> +        return cc_a->ordering - cc_b->ordering;
>      } else {
>          name_a = object_class_get_name(class_a);
>          name_b = object_class_get_name(class_b);
> @@ -3191,13 +3182,6 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp)
>      Error *local_err = NULL;
>      static bool ht_warned;
>  
> -    if (xcc->kvm_required && !kvm_enabled()) {
> -        char *name = x86_cpu_class_get_model_name(xcc);
> -        error_setg(&local_err, "CPU model '%s' requires KVM", name);
> -        g_free(name);
> -        goto out;
> -    }
> -
>      if (cpu->apic_id == UNASSIGNED_APIC_ID) {
>          error_setg(errp, "apic-id property was not initialized properly");
>          return;

FYI libvirt will also need changing.  Currently it reports:

  Original error from libvirt: unsupported configuration: CPU mode 'host-passthrough' for x86_64 qemu domain on x86_64 host is not supported by hypervisor [code=67 int1=-1]

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too
  2017-01-16 19:54 [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too Eduardo Habkost
  2017-01-17 13:39 ` Richard W.M. Jones
@ 2017-01-17 13:42 ` Richard W.M. Jones
  2017-01-17 13:44   ` Richard W.M. Jones
  2017-01-17 17:43 ` David Hildenbrand
  2017-01-19 17:50 ` Daniel P. Berrange
  3 siblings, 1 reply; 17+ messages in thread
From: Richard W.M. Jones @ 2017-01-17 13:42 UTC (permalink / raw)
  To: Eduardo Habkost
  Cc: qemu-devel, Igor Mammedov, Jiri Denemark, Richard Henderson,
	David Hildenbrand

[-- Attachment #1: Type: text/plain, Size: 956 bytes --]

On Mon, Jan 16, 2017 at 05:54:52PM -0200, Eduardo Habkost wrote:
> Change the meaning of "-cpu host" to "enable all features
> supported by the accelerator in the current host", so that it can
> be used to enable/query all features supported by TCG.
> 
> To make sure "host" is still at the end of the list in "-cpu
> help", add a "ordering" field that will be used when sorting the
> CPU model list.

As far as I can tell from light testing, the patch itself works
as advertized.

However a current Fedora debug kernel seems to have a lot of problems
booting on the TCG + -cpu host machine.  See the attached debug
messages.

I'll try it with a non-debug kernel shortly.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org

[-- Attachment #2: log --]
[-- Type: text/plain, Size: 36038 bytes --]

./run test-tool/libguestfs-test-tool 
     ************************************************************
     *                    IMPORTANT NOTICE
     *
     * When reporting bugs, include the COMPLETE, UNEDITED
     * output below in your bug report.
     *
     ************************************************************
LIBGUESTFS_PATH=/home/rjones/d/libguestfs/appliance
LIBGUESTFS_CACHEDIR=/home/rjones/d/libguestfs/tmp
LD_LIBRARY_PATH=/home/rjones/d/libguestfs/ruby/ext/guestfs:/home/rjones/d/libguestfs/src/.libs:/home/rjones/d/libguestfs/java/.libs:/home/rjones/d/libguestfs/gobject/.libs
LIBGUESTFS_TMPDIR=/home/rjones/d/libguestfs/tmp
LIBGUESTFS_BACKEND_SETTINGS=force_tcg
LIBGUESTFS_HV=/home/rjones/d/qemu/x86_64-softmmu/qemu-system-x86_64
LIBGUESTFS_BACKEND=direct
PATH=/home/rjones/d/libguestfs/v2v:/home/rjones/d/libguestfs/tools:/home/rjones/d/libguestfs/test-tool:/home/rjones/d/libguestfs/sysprep:/home/rjones/d/libguestfs/sparsify:/home/rjones/d/libguestfs/resize:/home/rjones/d/libguestfs/rescue:/home/rjones/d/libguestfs/p2v:/home/rjones/d/libguestfs/make-fs:/home/rjones/d/libguestfs/inspector:/home/rjones/d/libguestfs/get-kernel:/home/rjones/d/libguestfs/fuse:/home/rjones/d/libguestfs/format:/home/rjones/d/libguestfs/fish:/home/rjones/d/libguestfs/erlang:/home/rjones/d/libguestfs/edit:/home/rjones/d/libguestfs/diff:/home/rjones/d/libguestfs/dib:/home/rjones/d/libguestfs/df:/home/rjones/d/libguestfs/customize:/home/rjones/d/libguestfs/cat:/home/rjones/d/libguestfs/builder:/home/rjones/d/libguestfs/align:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/rjones/.local/bin:/home/rjones/bin
XDG_RUNTIME_DIR=/run/user/1000
SELinux: Enforcing
guestfs_get_append: (null)
guestfs_get_autosync: 1
guestfs_get_backend: direct
guestfs_get_backend_settings: [force_tcg]
guestfs_get_cachedir: /home/rjones/d/libguestfs/tmp
guestfs_get_direct: 0
guestfs_get_hv: /home/rjones/d/qemu/x86_64-softmmu/qemu-system-x86_64
guestfs_get_memsize: 500
guestfs_get_network: 0
guestfs_get_path: /home/rjones/d/libguestfs/appliance
guestfs_get_pgroup: 0
guestfs_get_program: libguestfs-test-tool
guestfs_get_recovery_proc: 1
guestfs_get_smp: 1
guestfs_get_sockdir: /run/user/1000
guestfs_get_tmpdir: /home/rjones/d/libguestfs/tmp
guestfs_get_trace: 0
guestfs_get_verbose: 1
host_cpu: x86_64
Launching appliance, timeout set to 600 seconds.
libguestfs: launch: program=libguestfs-test-tool
libguestfs: launch: version=1.35.19local,libvirt
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=direct
libguestfs: launch: tmpdir=/home/rjones/d/libguestfs/tmp/libguestfswYMKuY
libguestfs: launch: umask=0002
libguestfs: launch: euid=1000
libguestfs: begin building supermin appliance
libguestfs: run supermin
libguestfs: command: run: /home/rjones/d/supermin/src/supermin
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /home/rjones/d/libguestfs/tmp/.guestfs-1000/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /home/rjones/d/libguestfs/appliance/supermin.d
libguestfs: command: run: \ -o /home/rjones/d/libguestfs/tmp/.guestfs-1000/appliance.d
supermin: version: 5.1.17
supermin: rpm: detected RPM version 4.13
supermin: package handler: fedora/rpm
supermin: acquiring lock on /home/rjones/d/libguestfs/tmp/.guestfs-1000/lock
supermin: if-newer: output does not need rebuilding
libguestfs: finished building supermin appliance
libguestfs: begin testing qemu features
libguestfs: checking for previously cached test results of /home/rjones/d/qemu/x86_64-softmmu/qemu-system-x86_64, in /home/rjones/d/libguestfs/tmp/.guestfs-1000
libguestfs: loading previously cached test results
libguestfs: qemu version 2.8
libguestfs: finished testing qemu features
libguestfs: command: run: dmesg | grep -Eoh 'lpj=[[:digit:]]+'
libguestfs: read_lpj_from_dmesg: calculated lpj=2594043
[00126ms] /home/rjones/d/qemu/x86_64-softmmu/qemu-system-x86_64 \
    -global virtio-blk-pci.scsi=off \
    -nodefconfig \
    -enable-fips \
    -nodefaults \
    -display none \
    -machine accel=tcg \
    -cpu host \
    -m 500 \
    -no-reboot \
    -rtc driftfix=slew \
    -no-hpet \
    -global kvm-pit.lost_tick_policy=discard \
    -kernel /home/rjones/d/libguestfs/tmp/.guestfs-1000/appliance.d/kernel \
    -initrd /home/rjones/d/libguestfs/tmp/.guestfs-1000/appliance.d/initrd \
    -object rng-random,filename=/dev/urandom,id=rng0 \
    -device virtio-rng-pci,rng=rng0 \
    -device virtio-scsi-pci,id=scsi \
    -drive file=/home/rjones/d/libguestfs/tmp/libguestfswYMKuY/scratch.1,cache=unsafe,format=raw,id=hd0,if=none \
    -device scsi-hd,drive=hd0 \
    -drive file=/home/rjones/d/libguestfs/tmp/.guestfs-1000/appliance.d/root,snapshot=on,id=appliance,cache=unsafe,if=none,format=raw \
    -device scsi-hd,drive=appliance \
    -device virtio-serial-pci \
    -serial stdio \
    -device sga \
    -chardev socket,path=/run/user/1000/libguestfsgqWsAE/guestfsd.sock,id=channel0 \
    -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \
    -append 'panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check lpj=2594043 printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1 TERM=xterm-256color'
libguestfs: responding to serial console Device Status Report
\x1b[1;256r\x1b[256;256H\x1b[6n
Google, Inc.
Serial Graphics Adapter 11/03/11
SGABIOS $Id$ (pbonzini@yakj.usersys.redhat.com) Thu Nov  3 13:33:51 UTC 2011
Term: 80x24
4 0
\x1b[2J
SeaBIOS (version rel-1.10.1-0-g8891697-prebuilt.qemu-project.org)

Booting from ROM...
\x1b[2J[    0.000000] Linux version 4.8.16-300.fc25.x86_64+debug (mockbuild@bkernel02.phx2.fedoraproject.org) (gcc version 6.3.1 20161221 (Red Hat 6.3.1-1) (GCC) ) #1 SMP Fri Jan 6 17:49:44 UTC 2017
[    0.000000] Command line: panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.eventtimeout=6000 no_timer_check lpj=2594043 printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1 TERM=xterm-256color
[    0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point re00000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x200: 'Protectiors'
[    0.000000] x86/fpu: xstate_offset[3]:  960, xstate_sizes[3]:   64
[    0.000000] x86/fpu: xstate_offset[4]: 1024, xstate_sizes[4]:   64
[    0.000000] x86/fpu: xstate_offset[9]: 2688, xstate_sizes[9]:    8
[    0.000000] x86/fpu: Enabled xstate features 0x21b, contees, using 'standard' format.
[    0.000000] x86/fpu: Using 'eager' FPU context switches.
[    0.000000] e820: BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009f7ff] usable
[    0.000000] BIOS-e820: [mem 0x000000000009f800-0x000ved
[    0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000001f3ddfff] usable
[    0.000000] BIOS-e820: [mem 0x000000001f3de000-0x000000001f3fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000ffffffff] reserved
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] SMBIOS 2.8 present.
[    0.000000] e820: last_pfn = 0x1f3de max_arch_pfn = 0x400000000
[    0.000000] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WC  UC- WT  
[    0.000000] at [mem 0x000f6aa0-0x000f6aaf] mapped at [ffff8887c00f6aa0]
[    0.000000] Scanning 1 areas for low memory corruption
[    0.000000] Using GB pages for direct mapping
[    0.000000] RAMDISK: [mem 0x1f28d000-0x1f3cffff]
[    0.000000] ACPI: Early table checksum verification00000] ACPI: RSDP 0x00000000000F68B0 000014 (v00 BOCHS )
[    0.000000] ACPI: RSDT 0x000000001F3E14EF 00002C (v01 BOCHS  BXPCRSDT 00000001 BXPC 00000001)
[    0.000000] ACPI: FACP 0x000000001F3E1403 000074 (v01 BOCHS  BXPCFACP 00000001 BXPC 00000001)
[    0.000000] ACPI: DSD0 0013C3 (v01 BOCHS  BXPCDSDT 00000001 BXPC 00000001)
[    0.000000] ACPI: FACS 0x000000001F3E0000 000040
[    0.000000] ACPI: APIC 0x000000001F3E1477 000078 (v01 BOCHS  BXPCAPIC 00000001 BXPC 00000001)
[    0.000000] No NUMA configuration found
[    0.000000] Faking a node0000000-0x000000001f3ddfff]
[    0.000000] NODE_DATA(0) allocated [mem 0x1f276000-0x1f28cfff]
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000001000-0x0000000000ffffff]
[    0.000000]   DMA32    [mem 0x0000000001000000-0x000000001f3ddfff]
[    0.0000y
[    0.000000]   Device   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000001000-0x000000000009efff]
[    0.000000]   node   0: [mem 0x0000000000100000-0x000000001f3ddfff]
[    0.0 node 0 [mem 0x0000000000001000-0x000000001f3ddfff]
[    0.000000] ACPI: PM-Timer IO Port: 0x608
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
[    0.000000] IOAPIC[0]: apic_id 0, version 32, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: INT_SRC_OVR (bal_irq 2 dfl dfl)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
[    0.000000] ACPI: INT_SRC11 global_irq 11 high level)
[    0.000000] Using ACPI (MADT) for SMP configuration information
[    0.000000] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[    0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
[    0.000000] PM: Registered nosave memory: [memff]
[    0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000effff]
[    0.000000] PM: Registered nosave memory: [mem 0x000f0000-0x000fffff]
[    0.000000] e820: [mem 0x1f400000-0xfffbffff] available for PCI devices
[    0.000000] Booting paravirtualized kernel on   0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns
[    0.000000] setup_percpu: NR_CPUS:1024 nr_cpumask_bits:1 nr_cpu_ids:1 nr_node_ids:1
[    0.000000] percpu: Embedded 485 pages/cpu @ffff8887dee00000 s1948120 52
[    0.000000] Built 1 zonelists in Node order, mobility grouping on.  Total pages: 125847
[    0.000000] Policy zone: DMA32
[    0.000000] Kernel command line: panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check lpj=2594043 printk.time=1ry usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1 TERM=xterm-256color
[    0.000000] PID hash table entries: 2048 (order: 2, 16384 bytes)
[    0.000000] Memory: 462948K/511472K available (9206K kernel code, 1607K rwdata, init, 16516K bss, 48524K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Running RCU self tests
[    0.000000] Hierarchical RCU implementation.
[    0.000000] \tRCU lockdep checking is enabled.
[    0.0000ustment of leaf fanout to 64.
[    0.000000] \tRCU restricting CPUs from NR_CPUS=1024 to nr_cpu_ids=1.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=1
[    0.000000] kmemleak: Kernel memory leak detector disabled
[    0.000000] NR_IRQS:65792 nr_ir00000] \tOffload RCU callbacks from all CPUs
[    0.000000] \tOffload RCU callbacks from CPUs: 0.
[    0.000000] Console: colour *CGA 80x25
[    0.000000] console [ttyS0] enabled
[    0.000000] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.0DEP_SUBCLASSES:  8
[    0.000000] ... MAX_LOCK_DEPTH:          48
[    0.000000] ... MAX_LOCKDEP_KEYS:        8191
[    0.000000] ... CLASSHASH_SIZE:          4096
[    0.000000] ... MAX_LOCKDEP_ENTRIES:     32768
[    0.000000] ... MAX_LOCKDEP_CHAINS:      65536
[    0.0H_SIZE:          32768
[    0.000000]  memory used by lock dependency info: 8671 kB
[    0.000000]  per task-struct memory footprint: 2688 bytes
[    0.000000] BUG: unable to handle kernel paging request at ffffffffffffffff
[    0.000000] IP: [<ffffffffffffffff>] 0xffffffffffffffff
[    0.000000] PGD fe09067 PUD fe0b067 PMD 0 
[    0.000000] Oops: 0010 [#1] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64+debug #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffff8fe0d580 task.stack: ffffffff8fe00000
[    0.000000] RIP: 0010:[<ffffffffffffffff>]  [<ffffffffffffffff>] 0xffffffffffffffff
[    0.000000] RSP: 0000:ffff8887dee03ef0  EFLAGS: 00000282
[    0.000000] RAX: 0000000000000000 RBX: 0000000000000012 RCX: ffffffff8ff85cc0
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000010 RDI: ffffffff8fe051d0
[    0.000000] RBP: ffff8887dee03f58 R08: ffffffffffffffff R09: 0000000000000102
[    0.000000] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000011
[    0.000000] R13: 0000000000000012 R14: ffffffff8fe051d0 R15: 0000000000000012
[    0.000000] FS:  0000000000000000(0000) GS:ffff8887dee00000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: ffffffffffffffff CR3: 000000000fe06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#2] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64+debug #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffff8fe0d580 task.stack: ffffffff8fe00000
[    0.000000] RIP: 0010:[<ffffffff8f02c3b4>]  [<ffffffff8f02c3b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff8887dee03bf8  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff8887dee03c58 R08: 0000000000000000 R09: 0000000000000001
[    0.000000] R10: ffffffff8fe0d580 R11: 0000000000000096 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff8887dee00000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: ffffffffffffffff CR3: 000000000fe06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#3] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64+debug #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffff8fe0d580 task.stack: ffffffff8fe00000
[    0.000000] RIP: 0010:[<ffffffff8f02c3b4>]  [<ffffffff8f02c3b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff8887dee03908  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff8887dee03968 R08: 0000000000000000 R09: 0000000000000001
[    0.000000] R10: ffffffff8fe0d580 R11: 00000000000000a5 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff8887dee00000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: ffffffffffffffff CR3: 000000000fe06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#4] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64+debug #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffff8fe0d580 task.stack: ffffffff8fe00000
[    0.000000] RIP: 0010:[<ffffffff8f02c3b4>]  [<ffffffff8f02c3b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff8887dee03618  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff8887dee03678 R08: 0000000000000000 R09: 0000000000000001
[    0.000000] R10: ffffffff8fe0d580 R11: 00000000000000b4 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff8887dee00000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: ffffffffffffffff CR3: 000000000fe06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#5] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64+debug #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffff8fe0d580 task.stack: ffffffff8fe00000
[    0.000000] RIP: 0010:[<ffffffff8f02c3b4>]  [<ffffffff8f02c3b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff8887dee03328  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff8887dee03388 R08: 0000000000000000 R09: 0000000000000001
[    0.000000] R10: ffffffff8fe0d580 R11: 00000000000000c3 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff8887dee00000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: ffffffffffffffff CR3: 000000000fe06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#6] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64+debug #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffff8fe0d580 task.stack: ffffffff8fe00000
[    0.000000] RIP: 0010:[<ffffffff8f02c3b4>]  [<ffffffff8f02c3b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff8887dee03038  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff8887dee03098 R08: 0000000000000000 R09: 0000000000000001
[    0.000000] R10: ffffffff8fe0d580 R11: 00000000000000d2 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff8887dee00000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: ffffffffffffffff CR3: 000000000fe06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#7] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64+debug #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffff8fe0d580 task.stack: ffffffff8fe00000
[    0.000000] RIP: 0010:[<ffffffff8f02c3b4>]  [<ffffffff8f02c3b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff8887dee02d48  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff8887dee02da8 R08: 0000000000000000 R09: 0000000000000001
[    0.000000] R10: ffffffff8fe0d580 R11: 00000000000000e1 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff8887dee00000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: ffffffffffffffff CR3: 000000000fe06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#8] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64+debug #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffff8fe0d580 task.stack: ffffffff8fe00000
[    0.000000] RIP: 0010:[<ffffffff8f02c3b4>]  [<ffffffff8f02c3b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff8887dee02a58  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff8887dee02ab8 R08: 0000000000000000 R09: 0000000000000001
[    0.000000] R10: ffffffff8fe0d580 R11: 00000000000000f0 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff8887dee00000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: ffffffffffffffff CR3: 000000000fe06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#9] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64+debug #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffff8fe0d580 task.stack: ffffffff8fe00000
[    0.000000] RIP: 0010:[<ffffffff8f02c3b4>]  [<ffffffff8f02c3b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff8887dee02768  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff8887dee027c8 R08: 0000000000000000 R09: 0000000000000001
[    0.000000] R10: ffffffff8fe0d580 R11: 00000000000000ff R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff8887dee00000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: ffffffffffffffff CR3: 000000000fe06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#10] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64+debug #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffff8fe0d580 task.stack: ffffffff8fe00000
[    0.000000] RIP: 0010:[<ffffffff8f02c3b4>]  [<ffffffff8f02c3b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff8887dee02478  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff8887dee024d8 R08: 0000000000000000 R09: 0000000000000001
[    0.000000] R10: ffffffff8fe0d580 R11: 000000000000010e R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff8887dee00000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: ffffffffffffffff CR3: 000000000fe06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#11] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64+debug #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffff8fe0d580 task.stack: ffffffff8fe00000
[    0.000000] RIP: 0010:[<ffffffff8f02c3b4>]  [<ffffffff8f02c3b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff8887dee02188  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff8887dee021e8 R08: 0000000000000000 R09: 0000000000000001
[    0.000000] R10: ffffffff8fe0d580 R11: 000000000000011d R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff8887dee00000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: ffffffffffffffff CR3: 000000000fe06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#12] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64+debug #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffff8fe0d580 task.stack: ffffffff8fe00000
[    0.000000] RIP: 0010:[<ffffffff8f02c3b4>]  [<ffffffff8f02c3b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff8887dee01e98  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff8887dee01ef8 R08: 0000000000000000 R09: 0000000000000001
[    0.000000] R10: ffffffff8fe0d580 R11: 000000000000012c R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff8887dee00000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: ffffffffffffffff CR3: 000000000fe06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#13] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64+debug #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffff8fe0d580 task.stack: ffffffff8fe00000
[    0.000000] RIP: 0010:[<ffffffff8f02c3b4>]  [<ffffffff8f02c3b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff8887dee01ba8  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff8887dee01c08 R08: 0000000000000000 R09: 0000000000000001
[    0.000000] R10: ffffffff8fe0d580 R11: 000000000000013b R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff8887dee00000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: ffffffffffffffff CR3: 000000000fe06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#14] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64+debug #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffff8fe0d580 task.stack: ffffffff8fe00000
[    0.000000] RIP: 0010:[<ffffffff8f02c3b4>]  [<ffffffff8f02c3b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff8887dee018b8  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff8887dee01918 R08: 0000000000000000 R09: 0000000000000001
[    0.000000] R10: ffffffff8fe0d580 R11: 000000000000014a R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff8887dee00000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: ffffffffffffffff CR3: 000000000fe06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#15] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64+debug #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffff8fe0d580 task.stack: ffffffff8fe00000
[    0.000000] RIP: 0010:[<ffffffff8f02c3b4>]  [<ffffffff8f02c3b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff8887dee015c8  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff8887dee01628 R08: 0000000000000000 R09: 0000000000000001
[    0.000000] R10: ffffffff8fe0d580 R11: 0000000000000159 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff8887dee00000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: ffffffffffffffff CR3: 000000000fe06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#16] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64+debug #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffff8fe0d580 task.stack: ffffffff8fe00000
[    0.000000] RIP: 0010:[<ffffffff8f02c3b4>]  [<ffffffff8f02c3b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff8887dee012d8  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff8887dee01338 R08: 0000000000000000 R09: 0000000000000001
[    0.000000] R10: ffffffff8fe0d580 R11: 0000000000000168 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff8887dee00000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: ffffffffffffffff CR3: 000000000fe06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#17] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64+debug #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffff8fe0d580 task.stack: ffffffff8fe00000
[    0.000000] RIP: 0010:[<ffffffff8f02c3b4>]  [<ffffffff8f02c3b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff8887dee00fe8  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff8887dee01048 R08: 0000000000000000 R09: 0000000000000001
[    0.000000] R10: ffffffff8fe0d580 R11: 0000000000000177 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff8887dee00000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: ffffffffffffffff CR3: 000000000fe06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#18] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64+debug #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffff8fe0d580 task.stack: ffffffff8fe00000
[    0.000000] RIP: 0010:[<ffffffff8f02c3b4>]  [<ffffffff8f02c3b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff8887dee00cf8  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff8887dee00d58 R08: 0000000000000000 R09: 0000000000000001
[    0.000000] R10: ffffffff8fe0d580 R11: 0000000000000186 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff8887dee00000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: ffffffffffffffff CR3: 000000000fe06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#19] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64+debug #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffff8fe0d580 task.stack: ffffffff8fe00000
[    0.000000] RIP: 0010:[<ffffffff8f02c3b4>]  [<ffffffff8f02c3b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff8887dee00a08  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff8887dee00a68 R08: 0000000000000000 R09: 0000000000000001
[    0.000000] R10: ffffffff8fe0d580 R11: 0000000000000195 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff8887dee00000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: ffffffffffffffff CR3: 000000000fe06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#20] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64+debug #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffff8fe0d580 task.stack: ffffffff8fe00000
[    0.000000] RIP: 0010:[<ffffffff8f02c3b4>] 
[    0.000000] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffff8f473aad
[    0.000000] 
[    0.000000] Rebooting in 1 seconds..libguestfs: error: error reading console messages from the appliance: Connection reset by peer
libguestfs: error: appliance closed the connection unexpectedly, see earlier error messages
libguestfs: child_cleanup: 0x55733b084990: child process died
libguestfs: sending SIGTERM to process 18528
libguestfs: qemu maxrss 203360K
libguestfs: error: guestfs_launch failed, see earlier error messages
libguestfs: closing guestfs handle 0x55733b084990 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /home/rjones/d/libguestfs/tmp/libguestfswYMKuY
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /run/user/1000/libguestfsgqWsAE
Makefile:2414: recipe for target 'quickcheck' failed
make: *** [quickcheck] Error 1

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too
  2017-01-17 13:42 ` Richard W.M. Jones
@ 2017-01-17 13:44   ` Richard W.M. Jones
  2017-01-17 13:57     ` Richard W.M. Jones
  0 siblings, 1 reply; 17+ messages in thread
From: Richard W.M. Jones @ 2017-01-17 13:44 UTC (permalink / raw)
  To: Eduardo Habkost
  Cc: Igor Mammedov, Jiri Denemark, David Hildenbrand, qemu-devel,
	Richard Henderson

[-- Attachment #1: Type: text/plain, Size: 1287 bytes --]

On Tue, Jan 17, 2017 at 01:42:08PM +0000, Richard W.M. Jones wrote:
> On Mon, Jan 16, 2017 at 05:54:52PM -0200, Eduardo Habkost wrote:
> > Change the meaning of "-cpu host" to "enable all features
> > supported by the accelerator in the current host", so that it can
> > be used to enable/query all features supported by TCG.
> > 
> > To make sure "host" is still at the end of the list in "-cpu
> > help", add a "ordering" field that will be used when sorting the
> > CPU model list.
> 
> As far as I can tell from light testing, the patch itself works
> as advertized.
> 
> However a current Fedora debug kernel seems to have a lot of problems
> booting on the TCG + -cpu host machine.  See the attached debug
> messages.
> 
> I'll try it with a non-debug kernel shortly.

With the non-debug kernel, the error is (probably?) the same one.
At least, the crash appears in roughly the same place.

Are you planning to extend this work to other architectures than x86?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW

[-- Attachment #2: log --]
[-- Type: text/plain, Size: 35215 bytes --]

./run test-tool/libguestfs-test-tool 
     ************************************************************
     *                    IMPORTANT NOTICE
     *
     * When reporting bugs, include the COMPLETE, UNEDITED
     * output below in your bug report.
     *
     ************************************************************
LIBGUESTFS_PATH=/home/rjones/d/libguestfs/appliance
LIBGUESTFS_CACHEDIR=/home/rjones/d/libguestfs/tmp
LD_LIBRARY_PATH=/home/rjones/d/libguestfs/ruby/ext/guestfs:/home/rjones/d/libguestfs/src/.libs:/home/rjones/d/libguestfs/java/.libs:/home/rjones/d/libguestfs/gobject/.libs
LIBGUESTFS_TMPDIR=/home/rjones/d/libguestfs/tmp
LIBGUESTFS_BACKEND_SETTINGS=force_tcg
LIBGUESTFS_HV=/home/rjones/d/qemu/x86_64-softmmu/qemu-system-x86_64
LIBGUESTFS_BACKEND=direct
PATH=/home/rjones/d/libguestfs/v2v:/home/rjones/d/libguestfs/tools:/home/rjones/d/libguestfs/test-tool:/home/rjones/d/libguestfs/sysprep:/home/rjones/d/libguestfs/sparsify:/home/rjones/d/libguestfs/resize:/home/rjones/d/libguestfs/rescue:/home/rjones/d/libguestfs/p2v:/home/rjones/d/libguestfs/make-fs:/home/rjones/d/libguestfs/inspector:/home/rjones/d/libguestfs/get-kernel:/home/rjones/d/libguestfs/fuse:/home/rjones/d/libguestfs/format:/home/rjones/d/libguestfs/fish:/home/rjones/d/libguestfs/erlang:/home/rjones/d/libguestfs/edit:/home/rjones/d/libguestfs/diff:/home/rjones/d/libguestfs/dib:/home/rjones/d/libguestfs/df:/home/rjones/d/libguestfs/customize:/home/rjones/d/libguestfs/cat:/home/rjones/d/libguestfs/builder:/home/rjones/d/libguestfs/align:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/rjones/.local/bin:/home/rjones/bin
XDG_RUNTIME_DIR=/run/user/1000
SELinux: Enforcing
guestfs_get_append: (null)
guestfs_get_autosync: 1
guestfs_get_backend: direct
guestfs_get_backend_settings: [force_tcg]
guestfs_get_cachedir: /home/rjones/d/libguestfs/tmp
guestfs_get_direct: 0
guestfs_get_hv: /home/rjones/d/qemu/x86_64-softmmu/qemu-system-x86_64
guestfs_get_memsize: 500
guestfs_get_network: 0
guestfs_get_path: /home/rjones/d/libguestfs/appliance
guestfs_get_pgroup: 0
guestfs_get_program: libguestfs-test-tool
guestfs_get_recovery_proc: 1
guestfs_get_smp: 1
guestfs_get_sockdir: /run/user/1000
guestfs_get_tmpdir: /home/rjones/d/libguestfs/tmp
guestfs_get_trace: 0
guestfs_get_verbose: 1
host_cpu: x86_64
Launching appliance, timeout set to 600 seconds.
libguestfs: launch: program=libguestfs-test-tool
libguestfs: launch: version=1.35.19local,libvirt
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=direct
libguestfs: launch: tmpdir=/home/rjones/d/libguestfs/tmp/libguestfsyPm0AO
libguestfs: launch: umask=0002
libguestfs: launch: euid=1000
libguestfs: begin building supermin appliance
libguestfs: run supermin
libguestfs: command: run: /home/rjones/d/supermin/src/supermin
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /home/rjones/d/libguestfs/tmp/.guestfs-1000/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /home/rjones/d/libguestfs/appliance/supermin.d
libguestfs: command: run: \ -o /home/rjones/d/libguestfs/tmp/.guestfs-1000/appliance.d
supermin: version: 5.1.17
supermin: rpm: detected RPM version 4.13
supermin: package handler: fedora/rpm
supermin: acquiring lock on /home/rjones/d/libguestfs/tmp/.guestfs-1000/lock
supermin: if-newer: output does not need rebuilding
libguestfs: finished building supermin appliance
libguestfs: begin testing qemu features
libguestfs: checking for previously cached test results of /home/rjones/d/qemu/x86_64-softmmu/qemu-system-x86_64, in /home/rjones/d/libguestfs/tmp/.guestfs-1000
libguestfs: loading previously cached test results
libguestfs: qemu version 2.8
libguestfs: finished testing qemu features
libguestfs: command: run: dmesg | grep -Eoh 'lpj=[[:digit:]]+'
libguestfs: read_lpj_from_dmesg: calculated lpj=2594043
[00135ms] /home/rjones/d/qemu/x86_64-softmmu/qemu-system-x86_64 \
    -global virtio-blk-pci.scsi=off \
    -nodefconfig \
    -enable-fips \
    -nodefaults \
    -display none \
    -machine accel=tcg \
    -cpu host \
    -m 500 \
    -no-reboot \
    -rtc driftfix=slew \
    -no-hpet \
    -global kvm-pit.lost_tick_policy=discard \
    -kernel /home/rjones/d/libguestfs/tmp/.guestfs-1000/appliance.d/kernel \
    -initrd /home/rjones/d/libguestfs/tmp/.guestfs-1000/appliance.d/initrd \
    -object rng-random,filename=/dev/urandom,id=rng0 \
    -device virtio-rng-pci,rng=rng0 \
    -device virtio-scsi-pci,id=scsi \
    -drive file=/home/rjones/d/libguestfs/tmp/libguestfsyPm0AO/scratch.1,cache=unsafe,format=raw,id=hd0,if=none \
    -device scsi-hd,drive=hd0 \
    -drive file=/home/rjones/d/libguestfs/tmp/.guestfs-1000/appliance.d/root,snapshot=on,id=appliance,cache=unsafe,if=none,format=raw \
    -device scsi-hd,drive=appliance \
    -device virtio-serial-pci \
    -serial stdio \
    -device sga \
    -chardev socket,path=/run/user/1000/libguestfsbwrk7m/guestfsd.sock,id=channel0 \
    -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \
    -append 'panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check lpj=2594043 printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1 TERM=xterm-256color'
libguestfs: responding to serial console Device Status Report
\x1b[1;256r\x1b[256;256H\x1b[6n
Google, Inc.
Serial Graphics Adapter 11/03/11
SGABIOS $Id$ (pbonzini@yakj.usersys.redhat.com) Thu Nov  3 13:33:51 UTC 2011
Term: 80x24
4 0
\x1b[2J
SeaBIOS (version rel-1.10.1-0-g8891697-prebuilt.qemu-project.org)

Booting from ROM...
\x1b[2J[    0.000000] Linux version 4.8.16-300.fc25.x86_64 (mockbuild@bkernel02.phx2.fedoraproject.org) (gcc version 6.3.1 20161221 (Red Hat 6.3.1-1) (GCC) ) #1 SMP Fri Jan 6 18:11:49 UTC 2017
[    0.000000] Command line: panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeo000 no_timer_check lpj=2594043 printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1 TERM=xterm-256color
[    0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
6/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x200: 'Protection Keys Us  0.000000] x86/fpu: xstate_offset[3]:  960, xstate_sizes[3]:   64
[    0.000000] x86/fpu: xstate_offset[4]: 1024, xstate_sizes[4]:   64
[    0.000000] x86/fpu: xstate_offset[9]: 2688, xstate_sizes[9]:    8
[    0.000000] x86/fpu: Enabled xstate features 0x21b, context size ng 'standard' format.
[    0.000000] x86/fpu: Using 'eager' FPU context switches.
[    0.000000] e820: BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009f7ff] usable
[    0.000000] BIOS-e820: [mem 0x000000000009f800-0x0000000000
[    0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000001f3ddfff] usable
[    0.000000] BIOS-e820: [mem 0x000000001f3de000-0x000000001f3fffff] reserved
[    0.000000] BIOS-e820: [mem 0x000000000ffffffff] reserved
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] SMBIOS 2.8 present.
[    0.000000] e820: last_pfn = 0x1f3de max_arch_pfn = 0x400000000
[    0.000000] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WC  UC- WT  
[    0.000000] ft [mem 0x000f6aa0-0x000f6aaf] mapped at [ffff9628400f6aa0]
[    0.000000] Using GB pages for direct mapping
[    0.000000] RAMDISK: [mem 0x1f291000-0x1f3cffff]
[    0.000000] ACPI: Early table checksum verification disabled
[    0.000000] ACPI: RSDP 0x00000000000F68B0 00001HS )
[    0.000000] ACPI: RSDT 0x000000001F3E14EF 00002C (v01 BOCHS  BXPCRSDT 00000001 BXPC 00000001)
[    0.000000] ACPI: FACP 0x000000001F3E1403 000074 (v01 BOCHS  BXPCFACP 00000001 BXPC 00000001)
[    0.000000] ACPI: DSDT 0x000000001F3E0040 0013C3 (v01 BOCHS  BXPCDSDT 000C 00000001)
[    0.000000] ACPI: FACS 0x000000001F3E0000 000040
[    0.000000] ACPI: APIC 0x000000001F3E1477 000078 (v01 BOCHS  BXPCAPIC 00000001 BXPC 00000001)
[    0.000000] No NUMA configuration found
[    0.000000] Faking a node at [mem 0x0000000000000000-0x000000001f3d00] NODE_DATA(0) allocated [mem 0x1f27a000-0x1f290fff]
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000001000-0x0000000000ffffff]
[    0.000000]   DMA32    [mem 0x0000000001000000-0x000000001f3ddfff]
[    0.000000]   Normal   empty
[    0.000000]   D    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000001000-0x000000000009efff]
[    0.000000]   node   0: [mem 0x0000000000100000-0x000000001f3ddfff]
[    0.000000] Initmem setup node 0 [mem 0x000000001f3ddfff]
[    0.000000] ACPI: PM-Timer IO Port: 0x608
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
[    0.000000] IOAPIC[0]: apic_id 0, version 32, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dflCPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 0.000000] Using ACPI (MADT) for SMP configuration information
[    0.000000] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[    0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
[    0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
[    0.00d nosave memory: [mem 0x000a0000-0x000effff]
[    0.000000] PM: Registered nosave memory: [mem 0x000f0000-0x000fffff]
[    0.000000] e820: [mem 0x1f400000-0xfffbffff] available for PCI devices
[    0.000000] Booting paravirtualized kernel on bare hardware
[    0.000000] cloiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns
[    0.000000] setup_percpu: NR_CPUS:1024 nr_cpumask_bits:1 nr_cpu_ids:1 nr_node_ids:1
[    0.000000] percpu: Embedded 36 pages/cpu @ffff96285f000000 s108760 r8192 d30504 u2097152
[    0.000000 in Node order, mobility grouping on.  Total pages: 125847
[    0.000000] Policy zone: DMA32
[    0.000000] Kernel command line: panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check lpj=2594043 printk.time=1 cgroup_disable=memory usbcore.nousbsc=reliable 8250.nr_uarts=1 root=/dev/sdb selinux=0 guestfs_verbose=1 TERM=xterm-256color
[    0.000000] PID hash table entries: 2048 (order: 2, 16384 bytes)
[    0.000000] Memory: 482480K/511472K available (8227K kernel code, 1416K rwdata, 3340K rodata, 1608K init, 1520K bss0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] \tBuild-time adjustment of leaf fanout to 64.
[    0.000000] \tRCU restricting CPUs from NR_CPUS=1024 to nr_cpu_ids=1.
[ justing geometry for rcu_fanout_leaf=64, nr_cpu_ids=1
[    0.000000] NR_IRQS:65792 nr_irqs:256 16
[    0.000000] \tOffload RCU callbacks from all CPUs
[    0.000000] \tOffload RCU callbacks from CPUs: 0.
[    0.000000] Console: colour *CGA 80x25
[    0.000000] console [ttyS0
[    0.000000] BUG: unable to handle kernel NULL pointer dereference at           (null)
[    0.000000] IP: [<          (null)>]           (null)
[    0.000000] PGD 0 
[    0.000000] Oops: 0010 [#1] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64 #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffffbbe0d500 task.stack: ffffffffbbe00000
[    0.000000] RIP: 0010:[<0000000000000000>]  [<          (null)>]           (null)
[    0.000000] RSP: 0000:ffff96285f003ef0  EFLAGS: 00000202
[    0.000000] RAX: 0000000000000100 RBX: 000000000000002a RCX: 0000000000000000
[    0.000000] RDX: 00000000fffb6c22 RSI: ffffffffbbe050d0 RDI: ffffffffbbe05210
[    0.000000] RBP: ffff96285f003f58 R08: 0000000000000000 R09: 0000000000000100
[    0.000000] R10: ffff96285f010170 R11: 0000000000000000 R12: 000000000000002a
[    0.000000] R13: 0000000000000029 R14: ffffffffbbe05210 R15: 000000000000002a
[    0.000000] FS:  0000000000000000(0000) GS:ffff96285f000000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: 0000000000000000 CR3: 000000000ee06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#2] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64 #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffffbbe0d500 task.stack: ffffffffbbe00000
[    0.000000] RIP: 0010:[<ffffffffbb0253b4>]  [<ffffffffbb0253b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff96285f003bf8  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff96285f003c58 R08: 303030303030203a R09: 3352432030303030
[    0.000000] R10: ffff96285f010170 R11: 0000000000000088 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff96285f000000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: 0000000000000000 CR3: 000000000ee06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#3] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64 #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffffbbe0d500 task.stack: ffffffffbbe00000
[    0.000000] RIP: 0010:[<ffffffffbb0253b4>]  [<ffffffffbb0253b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff96285f003908  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff96285f003968 R08: 303030303030203a R09: 3352432030303030
[    0.000000] R10: ffffffffbbc2e23c R11: 0000000000000097 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff96285f000000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: 0000000000000000 CR3: 000000000ee06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#4] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64 #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffffbbe0d500 task.stack: ffffffffbbe00000
[    0.000000] RIP: 0010:[<ffffffffbb0253b4>]  [<ffffffffbb0253b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff96285f003618  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff96285f003678 R08: 303030303030203a R09: 3352432030303030
[    0.000000] R10: ffffffffbbc2e23c R11: 00000000000000a6 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff96285f000000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: 0000000000000000 CR3: 000000000ee06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#5] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64 #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffffbbe0d500 task.stack: ffffffffbbe00000
[    0.000000] RIP: 0010:[<ffffffffbb0253b4>]  [<ffffffffbb0253b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff96285f003328  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff96285f003388 R08: 303030303030203a R09: 3352432030303030
[    0.000000] R10: ffffffffbbc2e23c R11: 00000000000000b5 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff96285f000000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: 0000000000000000 CR3: 000000000ee06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#6] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64 #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffffbbe0d500 task.stack: ffffffffbbe00000
[    0.000000] RIP: 0010:[<ffffffffbb0253b4>]  [<ffffffffbb0253b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff96285f003038  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff96285f003098 R08: 303030303030203a R09: 3352432030303030
[    0.000000] R10: ffffffffbbc2e23c R11: 00000000000000c4 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff96285f000000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: 0000000000000000 CR3: 000000000ee06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#7] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64 #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffffbbe0d500 task.stack: ffffffffbbe00000
[    0.000000] RIP: 0010:[<ffffffffbb0253b4>]  [<ffffffffbb0253b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff96285f002d48  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff96285f002da8 R08: 303030303030203a R09: 3352432030303030
[    0.000000] R10: ffffffffbbc2e23c R11: 00000000000000d3 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff96285f000000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: 0000000000000000 CR3: 000000000ee06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#8] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64 #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffffbbe0d500 task.stack: ffffffffbbe00000
[    0.000000] RIP: 0010:[<ffffffffbb0253b4>]  [<ffffffffbb0253b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff96285f002a58  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff96285f002ab8 R08: 3630656530303030 R09: 3a34524320303030
[    0.000000] R10: ffffffffbbc2e23c R11: 00000000000000e2 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff96285f000000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: 0000000000000000 CR3: 000000000ee06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#9] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64 #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffffbbe0d500 task.stack: ffffffffbbe00000
[    0.000000] RIP: 0010:[<ffffffffbb0253b4>]  [<ffffffffbb0253b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff96285f002768  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff96285f0027c8 R08: 303030303030203a R09: 3352432030303030
[    0.000000] R10: ffffffffbbc2e23c R11: 00000000000000f1 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff96285f000000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: 0000000000000000 CR3: 000000000ee06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#10] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64 #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffffbbe0d500 task.stack: ffffffffbbe00000
[    0.000000] RIP: 0010:[<ffffffffbb0253b4>]  [<ffffffffbb0253b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff96285f002478  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff96285f0024d8 R08: 303030303030203a R09: 3352432030303030
[    0.000000] R10: ffffffffbbc2e23c R11: 0000000000000100 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff96285f000000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: 0000000000000000 CR3: 000000000ee06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#11] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64 #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffffbbe0d500 task.stack: ffffffffbbe00000
[    0.000000] RIP: 0010:[<ffffffffbb0253b4>]  [<ffffffffbb0253b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff96285f002188  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff96285f0021e8 R08: 3630656530303030 R09: 3a34524320303030
[    0.000000] R10: ffffffffbbc2e23c R11: 000000000000010f R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff96285f000000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: 0000000000000000 CR3: 000000000ee06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#12] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64 #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffffbbe0d500 task.stack: ffffffffbbe00000
[    0.000000] RIP: 0010:[<ffffffffbb0253b4>]  [<ffffffffbb0253b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff96285f001e98  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff96285f001ef8 R08: 303030303030203a R09: 3352432030303030
[    0.000000] R10: ffffffffbbc2e23c R11: 000000000000011e R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff96285f000000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: 0000000000000000 CR3: 000000000ee06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#13] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64 #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffffbbe0d500 task.stack: ffffffffbbe00000
[    0.000000] RIP: 0010:[<ffffffffbb0253b4>]  [<ffffffffbb0253b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff96285f001ba8  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff96285f001c08 R08: 303030303030203a R09: 3352432030303030
[    0.000000] R10: ffffffffbbc2e23c R11: 000000000000012d R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff96285f000000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: 0000000000000000 CR3: 000000000ee06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#14] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64 #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffffbbe0d500 task.stack: ffffffffbbe00000
[    0.000000] RIP: 0010:[<ffffffffbb0253b4>]  [<ffffffffbb0253b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff96285f0018b8  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff96285f001918 R08: 3630656530303030 R09: 3a34524320303030
[    0.000000] R10: ffffffffbbc2e23c R11: 000000000000013c R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff96285f000000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: 0000000000000000 CR3: 000000000ee06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#15] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64 #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffffbbe0d500 task.stack: ffffffffbbe00000
[    0.000000] RIP: 0010:[<ffffffffbb0253b4>]  [<ffffffffbb0253b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff96285f0015c8  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff96285f001628 R08: 303030303030203a R09: 3352432030303030
[    0.000000] R10: ffffffffbbc2e23c R11: 000000000000014b R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff96285f000000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: 0000000000000000 CR3: 000000000ee06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#16] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64 #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffffbbe0d500 task.stack: ffffffffbbe00000
[    0.000000] RIP: 0010:[<ffffffffbb0253b4>]  [<ffffffffbb0253b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff96285f0012d8  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff96285f001338 R08: 303030303030203a R09: 3352432030303030
[    0.000000] R10: ffffffffbbc2e23c R11: 000000000000015a R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff96285f000000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: 0000000000000000 CR3: 000000000ee06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#17] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64 #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffffbbe0d500 task.stack: ffffffffbbe00000
[    0.000000] RIP: 0010:[<ffffffffbb0253b4>]  [<ffffffffbb0253b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff96285f000fe8  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff96285f001048 R08: 303030303030203a R09: 3352432030303030
[    0.000000] R10: ffffffffbbc2e23c R11: 0000000000000169 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff96285f000000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: 0000000000000000 CR3: 000000000ee06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#18] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64 #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffffbbe0d500 task.stack: ffffffffbbe00000
[    0.000000] RIP: 0010:[<ffffffffbb0253b4>]  [<ffffffffbb0253b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff96285f000cf8  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff96285f000d58 R08: 303030303030203a R09: 3352432030303030
[    0.000000] R10: ffffffffbbc2e23c R11: 0000000000000178 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff96285f000000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: 0000000000000000 CR3: 000000000ee06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#19] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64 #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffffbbe0d500 task.stack: ffffffffbbe00000
[    0.000000] RIP: 0010:[<ffffffffbb0253b4>]  [<ffffffffbb0253b4>] __show_regs+0x254/0x2a0
[    0.000000] RSP: 0000:ffff96285f000a08  EFLAGS: 00000002
[    0.000000] RAX: 0000000000010018 RBX: 0000000000000000 RCX: 0000000000000000
[    0.000000] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000007
[    0.000000] RBP: ffff96285f000a68 R08: 303030303030203a R09: 3352432030303030
[    0.000000] R10: ffffffffbbc2e23c R11: 0000000000000187 R12: 0000000000000000
[    0.000000] R13: 0000000000000000 R14: 0000000000000400 R15: 00000000ffff0ff0
[    0.000000] FS:  0000000000000000(0000) GS:ffff96285f000000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: 0000000000000000 CR3: 000000000ee06000 CR4: 00000000000406b0
[    0.000000] invalid opcode: 0000 [#20] SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.8.16-300.fc25.x86_64 #1
[    0.000000] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.10.1-0-g8891697-prebuilt.qemu-project.org 04/01/2014
[    0.000000] task: ffffffffbbe0d500 task.stack: ffffffffbbe00000
[    0.000000] RIP: 0010:[<ffffffffbb0253b4>] 
[    0.000000] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: ffffffffbb3f300d
[    0.000000] 
[    0.000000] Rebooting in 1 seconds..libguestfs: error: error reading console messages from the appliance: Connection reset by peer
libguestfs: error: appliance closed the connection unexpectedly, see earlier error messages
libguestfs: child_cleanup: 0x55e062531990: child process died
libguestfs: sending SIGTERM to process 21989
libguestfs: qemu maxrss 183496K
libguestfs: error: guestfs_launch failed, see earlier error messages
libguestfs: closing guestfs handle 0x55e062531990 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /home/rjones/d/libguestfs/tmp/libguestfsyPm0AO
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /run/user/1000/libguestfsbwrk7m
Makefile:2414: recipe for target 'quickcheck' failed
make: *** [quickcheck] Error 1

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too
  2017-01-17 13:44   ` Richard W.M. Jones
@ 2017-01-17 13:57     ` Richard W.M. Jones
  2017-01-17 14:05       ` Eduardo Habkost
  0 siblings, 1 reply; 17+ messages in thread
From: Richard W.M. Jones @ 2017-01-17 13:57 UTC (permalink / raw)
  To: Eduardo Habkost
  Cc: Igor Mammedov, Jiri Denemark, Richard Henderson, qemu-devel,
	David Hildenbrand


Oh no wait, these errors are just because of the new version of qemu
that I am using to test your patch, so nothing to do with this patch.

/me fires up git bisect ...

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too
  2017-01-17 13:39 ` Richard W.M. Jones
@ 2017-01-17 14:03   ` Eduardo Habkost
  0 siblings, 0 replies; 17+ messages in thread
From: Eduardo Habkost @ 2017-01-17 14:03 UTC (permalink / raw)
  To: Richard W.M. Jones
  Cc: qemu-devel, Igor Mammedov, Jiri Denemark, Richard Henderson,
	David Hildenbrand

On Tue, Jan 17, 2017 at 01:39:14PM +0000, Richard W.M. Jones wrote:
> On Mon, Jan 16, 2017 at 05:54:52PM -0200, Eduardo Habkost wrote:
> > Change the meaning of "-cpu host" to "enable all features
> > supported by the accelerator in the current host", so that it can
> > be used to enable/query all features supported by TCG.
> > 
> > To make sure "host" is still at the end of the list in "-cpu
> > help", add a "ordering" field that will be used when sorting the
> > CPU model list.
> > 
> > Cc: Richard Henderson <rth@twiddle.net>
> > Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> > ---
> >  target/i386/cpu-qom.h |  4 ++--
> >  target/i386/cpu.c     | 26 +++++---------------------
> >  2 files changed, 7 insertions(+), 23 deletions(-)
> > 
> > diff --git a/target/i386/cpu-qom.h b/target/i386/cpu-qom.h
> > index 8cd607e9a2..75618919e3 100644
> > --- a/target/i386/cpu-qom.h
> > +++ b/target/i386/cpu-qom.h
> > @@ -47,7 +47,7 @@ typedef struct X86CPUDefinition X86CPUDefinition;
> >  /**
> >   * X86CPUClass:
> >   * @cpu_def: CPU model definition
> > - * @kvm_required: Whether CPU model requires KVM to be enabled.
> > + * @ordering: Ordering on the "-cpu help" CPU model list.
> >   * @migration_safe: See CpuDefinitionInfo::migration_safe
> >   * @parent_realize: The parent class' realize handler.
> >   * @parent_reset: The parent class' reset handler.
> > @@ -62,7 +62,7 @@ typedef struct X86CPUClass {
> >      /* Should be eventually replaced by subclass-specific property defaults. */
> >      X86CPUDefinition *cpu_def;
> >  
> > -    bool kvm_required;
> > +    int ordering;
> >      bool migration_safe;
> >  
> >      /* Optional description of CPU model.
> > diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> > index ec6eaf215c..e0ca8c0288 100644
> > --- a/target/i386/cpu.c
> > +++ b/target/i386/cpu.c
> > @@ -1549,7 +1549,7 @@ static void host_x86_cpu_class_init(ObjectClass *oc, void *data)
> >      X86CPUClass *xcc = X86_CPU_CLASS(oc);
> >      uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0;
> >  
> > -    xcc->kvm_required = true;
> > +    xcc->ordering = 9; /* Show it last on "-cpu help" */
> >  
> >      host_cpuid(0x0, 0, &eax, &ebx, &ecx, &edx);
> >      x86_cpu_vendor_words2str(host_cpudef.vendor, ebx, edx, ecx);
> > @@ -1563,8 +1563,7 @@ static void host_x86_cpu_class_init(ObjectClass *oc, void *data)
> >  
> >      xcc->cpu_def = &host_cpudef;
> >      xcc->model_description =
> > -        "KVM processor with all supported host features "
> > -        "(only available in KVM mode)";
> > +        "Enables all features supported by the accelerator in the current host";
> >  
> >      /* level, xlevel, xlevel2, and the feature words are initialized on
> >       * instance_init, because they require KVM to be initialized.
> > @@ -2075,13 +2074,6 @@ static void x86_cpu_class_check_missing_features(X86CPUClass *xcc,
> >      Error *err = NULL;
> >      strList **next = missing_feats;
> >  
> > -    if (xcc->kvm_required && !kvm_enabled()) {
> > -        strList *new = g_new0(strList, 1);
> > -        new->value = g_strdup("kvm");;
> > -        *missing_feats = new;
> > -        return;
> > -    }
> > -
> >      xc = X86_CPU(object_new(object_class_get_name(OBJECT_CLASS(xcc))));
> >  
> >      x86_cpu_load_features(xc, &err);
> > @@ -2129,7 +2121,7 @@ static void listflags(FILE *f, fprintf_function print, const char **featureset)
> >      }
> >  }
> >  
> > -/* Sort alphabetically by type name, listing kvm_required models last. */
> > +/* Sort alphabetically by type name, respecting X86CPUClass::ordering. */
> >  static gint x86_cpu_list_compare(gconstpointer a, gconstpointer b)
> >  {
> >      ObjectClass *class_a = (ObjectClass *)a;
> > @@ -2138,9 +2130,8 @@ static gint x86_cpu_list_compare(gconstpointer a, gconstpointer b)
> >      X86CPUClass *cc_b = X86_CPU_CLASS(class_b);
> >      const char *name_a, *name_b;
> >  
> > -    if (cc_a->kvm_required != cc_b->kvm_required) {
> > -        /* kvm_required items go last */
> > -        return cc_a->kvm_required ? 1 : -1;
> > +    if (cc_a->ordering != cc_b->ordering) {
> > +        return cc_a->ordering - cc_b->ordering;
> >      } else {
> >          name_a = object_class_get_name(class_a);
> >          name_b = object_class_get_name(class_b);
> > @@ -3191,13 +3182,6 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp)
> >      Error *local_err = NULL;
> >      static bool ht_warned;
> >  
> > -    if (xcc->kvm_required && !kvm_enabled()) {
> > -        char *name = x86_cpu_class_get_model_name(xcc);
> > -        error_setg(&local_err, "CPU model '%s' requires KVM", name);
> > -        g_free(name);
> > -        goto out;
> > -    }
> > -
> >      if (cpu->apic_id == UNASSIGNED_APIC_ID) {
> >          error_setg(errp, "apic-id property was not initialized properly");
> >          return;
> 
> FYI libvirt will also need changing.  Currently it reports:
> 
>   Original error from libvirt: unsupported configuration: CPU mode 'host-passthrough' for x86_64 qemu domain on x86_64 host is not supported by hypervisor [code=67 int1=-1]
> 

I'm not sure libvirt should translate "host-passthrough" to "-cpu
host" with TCG. The documented semantics of "host-passthrough"
are probably more specific, and may not make sense for TCG.

-- 
Eduardo

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too
  2017-01-17 13:57     ` Richard W.M. Jones
@ 2017-01-17 14:05       ` Eduardo Habkost
  2017-01-17 14:19         ` Richard W.M. Jones
  0 siblings, 1 reply; 17+ messages in thread
From: Eduardo Habkost @ 2017-01-17 14:05 UTC (permalink / raw)
  To: Richard W.M. Jones
  Cc: Igor Mammedov, Jiri Denemark, Richard Henderson, qemu-devel,
	David Hildenbrand

On Tue, Jan 17, 2017 at 01:57:34PM +0000, Richard W.M. Jones wrote:
> 
> Oh no wait, these errors are just because of the new version of qemu
> that I am using to test your patch, so nothing to do with this patch.
> 
> /me fires up git bisect ...

Probably it's the bug I have bisected and reported yesterday.
See:

  Subject: [Qemu-devel] [PATCH 49/65] tcg/i386: Rely on undefined/undocumented behaviour of BSF/BSR

-- 
Eduardo

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too
  2017-01-17 14:05       ` Eduardo Habkost
@ 2017-01-17 14:19         ` Richard W.M. Jones
  0 siblings, 0 replies; 17+ messages in thread
From: Richard W.M. Jones @ 2017-01-17 14:19 UTC (permalink / raw)
  To: Eduardo Habkost
  Cc: Igor Mammedov, Jiri Denemark, David Hildenbrand, qemu-devel,
	Richard Henderson

On Tue, Jan 17, 2017 at 12:05:41PM -0200, Eduardo Habkost wrote:
> On Tue, Jan 17, 2017 at 01:57:34PM +0000, Richard W.M. Jones wrote:
> > 
> > Oh no wait, these errors are just because of the new version of qemu
> > that I am using to test your patch, so nothing to do with this patch.
> > 
> > /me fires up git bisect ...
> 
> Probably it's the bug I have bisected and reported yesterday.
> See:
> 
>   Subject: [Qemu-devel] [PATCH 49/65] tcg/i386: Rely on undefined/undocumented behaviour of BSF/BSR

Yup, you're way ahead of me.  Reverting that commit (4ac76910734209)
does indeed fix Fedora kernel + TCG.

Please add:

  Tested-by: Richard W.M. Jones <rjones@redhat.com>

to the current patch (``i386: Support "-cpu host" on TCG too'') if you
wish, and CC me on any future versions so I can test those as well.

Thanks,

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too
  2017-01-16 19:54 [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too Eduardo Habkost
  2017-01-17 13:39 ` Richard W.M. Jones
  2017-01-17 13:42 ` Richard W.M. Jones
@ 2017-01-17 17:43 ` David Hildenbrand
  2017-01-19 14:52   ` Cornelia Huck
  2017-02-16 14:43   ` Christian Borntraeger
  2017-01-19 17:50 ` Daniel P. Berrange
  3 siblings, 2 replies; 17+ messages in thread
From: David Hildenbrand @ 2017-01-17 17:43 UTC (permalink / raw)
  To: Eduardo Habkost, qemu-devel
  Cc: Jiri Denemark, Richard Henderson, Igor Mammedov, Jason J. Herne,
	Christian Borntraeger, Cornelia Huck

Am 16.01.2017 um 20:54 schrieb Eduardo Habkost:
> Change the meaning of "-cpu host" to "enable all features
> supported by the accelerator in the current host", so that it can
> be used to enable/query all features supported by TCG.
>
> To make sure "host" is still at the end of the list in "-cpu
> help", add a "ordering" field that will be used when sorting the
> CPU model list.
>
> Cc: Richard Henderson <rth@twiddle.net>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

I also had the same thing in mind when working on s390x models but
decided to do it like x86. Now that x86 changes ...

Something like that should work for s390x (and I don't think it will 
break any concept). Most probably cleaner to handle this the same
way on all architectures and to not disable tests for s390x.

Uncompiled and untested.

@Conny and Christian, feel free to pick up and modify if this makes
sense

 From 4a2af1ca47421b68eb7677cd91af350dd9be4e0e Mon Sep 17 00:00:00 2001
From: David Hildenbrand <david@redhat.com>
Date: Tue, 17 Jan 2017 18:34:45 +0100
Subject: [PATCH] s390x/cpumodel: allow the "host" model also for tcg

Let's also allow the host model for tcg, therefore meaning
"enable all features supported by the selected accelerator in the current
host".

Signed-off-by: David Hildenbrand <david@redhat.com>
---
  qapi-schema.json          |  4 ++--
  target/s390x/cpu-qom.h    |  1 -
  target/s390x/cpu_models.c | 34 ++++++++--------------------------
  3 files changed, 10 insertions(+), 29 deletions(-)

diff --git a/qapi-schema.json b/qapi-schema.json
index ddc8783..f14d343 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -4334,8 +4334,8 @@
  # CPU model has to be created by baselining.
  #
  # Usually, a CPU model is compared against the maximum possible CPU model
-# of a certain configuration (e.g. the "host" model for KVM). If that CPU
-# model is identical or a subset, it will run in that configuration.
+# of a certain configuration (the "host" model). If that CPU model is
+# identical or a subset, it will run in that configuration.
  #
  # The result returned by this command may be affected by:
  #
diff --git a/target/s390x/cpu-qom.h b/target/s390x/cpu-qom.h
index 4e936e7..71322a5 100644
--- a/target/s390x/cpu-qom.h
+++ b/target/s390x/cpu-qom.h
@@ -47,7 +47,6 @@ typedef struct S390CPUClass {
      CPUClass parent_class;
      /*< public >*/
      const S390CPUDef *cpu_def;
-    bool kvm_required;
      bool is_static;
      bool is_migration_safe;
      const char *desc;
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
index 5b66d33..2994a7b 100644
--- a/target/s390x/cpu_models.c
+++ b/target/s390x/cpu_models.c
@@ -331,10 +331,6 @@ static void cpu_model_from_info(S390CPUModel 
*model, const CpuModelInfo *info,
          error_setg(errp, "The CPU definition \'%s\' is unknown.", 
info->name);
          return;
      }
-    if (S390_CPU_CLASS(oc)->kvm_required && !kvm_enabled()) {
-        error_setg(errp, "The CPU definition '%s' requires KVM", 
info->name);
-        return;
-    }
      obj = object_new(object_class_get_name(oc));
      cpu = S390_CPU(obj);

@@ -718,15 +714,9 @@ static inline void apply_cpu_model(const 
S390CPUModel *model, Error **errp)

  void s390_realize_cpu_model(CPUState *cs, Error **errp)
  {
-    S390CPUClass *xcc = S390_CPU_GET_CLASS(cs);
      S390CPU *cpu = S390_CPU(cs);
      const S390CPUModel *max_model;

-    if (xcc->kvm_required && !kvm_enabled()) {
-        error_setg(errp, "CPU definition requires KVM");
-        return;
-    }
-
      if (!cpu->model) {
          /* no host model support -> perform compatibility stuff */
          apply_cpu_model(NULL, errp);
@@ -904,26 +894,25 @@ static void s390_cpu_model_initfn(Object *obj)
      }
  }

-#ifdef CONFIG_KVM
  static void s390_host_cpu_model_initfn(Object *obj)
  {
+    S390CPUModel *max_model;
      S390CPU *cpu = S390_CPU(obj);
      Error *err = NULL;

-    if (!kvm_enabled() || !kvm_s390_cpu_models_supported()) {
+    if (kvm_enabled() && !kvm_s390_cpu_models_supported()) {
          return;
      }

-    cpu->model = g_malloc0(sizeof(*cpu->model));
-    kvm_s390_get_host_cpu_model(cpu->model, &err);
-    if (err) {
+    max_model = get_max_cpu_model(&err);
+    if (err || !max_model) {
          error_report_err(err);
-        g_free(cpu->model);
          /* fallback to unsupported cpu models */
-        cpu->model = NULL;
+        return;
      }
+    /* copy the host model so it can be modified */
+    cpu->model = g_memdup(max_model, sizeof(*cpu->model));
  }
-#endif

  static void s390_qemu_cpu_model_initfn(Object *obj)
  {
@@ -969,15 +958,12 @@ void 
s390_cpu_model_class_register_props(ObjectClass *oc)
                                    NULL);
  }

-#ifdef CONFIG_KVM
  static void s390_host_cpu_model_class_init(ObjectClass *oc, void *data)
  {
      S390CPUClass *xcc = S390_CPU_CLASS(oc);

-    xcc->kvm_required = true;
-    xcc->desc = "KVM only: All recognized features";
+    xcc->desc = "All supported and available features";
  }
-#endif

  static void s390_base_cpu_model_class_init(ObjectClass *oc, void *data)
  {
@@ -1042,7 +1028,6 @@ static const TypeInfo qemu_s390_cpu_type_info = {
      .class_init = s390_qemu_cpu_model_class_init,
  };

-#ifdef CONFIG_KVM
  static const TypeInfo host_s390_cpu_type_info = {
      .name = S390_CPU_TYPE_NAME("host"),
      .parent = TYPE_S390_CPU,
@@ -1050,7 +1035,6 @@ static const TypeInfo host_s390_cpu_type_info = {
      .instance_finalize = s390_cpu_model_finalize,
      .class_init = s390_host_cpu_model_class_init,
  };
-#endif

  static void register_types(void)
  {
@@ -1093,9 +1077,7 @@ static void register_types(void)
      }

      type_register_static(&qemu_s390_cpu_type_info);
-#ifdef CONFIG_KVM
      type_register_static(&host_s390_cpu_type_info);
-#endif
  }

  type_init(register_types)
-- 
2.9.3


-- 

David

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too
  2017-01-17 17:43 ` David Hildenbrand
@ 2017-01-19 14:52   ` Cornelia Huck
  2017-02-16 14:43   ` Christian Borntraeger
  1 sibling, 0 replies; 17+ messages in thread
From: Cornelia Huck @ 2017-01-19 14:52 UTC (permalink / raw)
  To: David Hildenbrand, Jason J. Herne
  Cc: Eduardo Habkost, qemu-devel, Jiri Denemark, Richard Henderson,
	Igor Mammedov, Christian Borntraeger

On Tue, 17 Jan 2017 18:43:40 +0100
David Hildenbrand <david@redhat.com> wrote:

> Uncompiled and untested.

@Jason: have you given this a try?

> @Conny and Christian, feel free to pick up and modify if this makes
> sense
> 
>  From 4a2af1ca47421b68eb7677cd91af350dd9be4e0e Mon Sep 17 00:00:00 2001
> From: David Hildenbrand <david@redhat.com>
> Date: Tue, 17 Jan 2017 18:34:45 +0100
> Subject: [PATCH] s390x/cpumodel: allow the "host" model also for tcg
> 
> Let's also allow the host model for tcg, therefore meaning
> "enable all features supported by the selected accelerator in the current
> host".
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>   qapi-schema.json          |  4 ++--
>   target/s390x/cpu-qom.h    |  1 -
>   target/s390x/cpu_models.c | 34 ++++++++--------------------------
>   3 files changed, 10 insertions(+), 29 deletions(-)

(...)

> -#ifdef CONFIG_KVM
>   static void s390_host_cpu_model_initfn(Object *obj)
>   {
> +    S390CPUModel *max_model;
>       S390CPU *cpu = S390_CPU(obj);
>       Error *err = NULL;
> 
> -    if (!kvm_enabled() || !kvm_s390_cpu_models_supported()) {
> +    if (kvm_enabled() && !kvm_s390_cpu_models_supported()) {
>           return;
>       }
> 
> -    cpu->model = g_malloc0(sizeof(*cpu->model));
> -    kvm_s390_get_host_cpu_model(cpu->model, &err);
> -    if (err) {
> +    max_model = get_max_cpu_model(&err);
> +    if (err || !max_model) {

I think checking for !max_model is enough.

>           error_report_err(err);
> -        g_free(cpu->model);
>           /* fallback to unsupported cpu models */
> -        cpu->model = NULL;
> +        return;
>       }
> +    /* copy the host model so it can be modified */
> +    cpu->model = g_memdup(max_model, sizeof(*cpu->model));
>   }
> -#endif

(...)

This gives us the same as before on kvm and z900 for tcg, so this seems
reasonable to me.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too
  2017-01-16 19:54 [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too Eduardo Habkost
                   ` (2 preceding siblings ...)
  2017-01-17 17:43 ` David Hildenbrand
@ 2017-01-19 17:50 ` Daniel P. Berrange
  2017-01-19 18:22   ` Peter Maydell
  3 siblings, 1 reply; 17+ messages in thread
From: Daniel P. Berrange @ 2017-01-19 17:50 UTC (permalink / raw)
  To: Eduardo Habkost
  Cc: qemu-devel, Igor Mammedov, Jiri Denemark, Richard Henderson,
	David Hildenbrand

On Mon, Jan 16, 2017 at 05:54:52PM -0200, Eduardo Habkost wrote:
> Change the meaning of "-cpu host" to "enable all features
> supported by the accelerator in the current host", so that it can
> be used to enable/query all features supported by TCG.
> 
> To make sure "host" is still at the end of the list in "-cpu
> help", add a "ordering" field that will be used when sorting the
> CPU model list.

To be clear, "-cpu host" for TCG is not talking about the actual
host OS feature support, right ? x86_64 TCG can be run on a ppc host,
so presumably "-cpu host" just means "all features that this TCG binary
is able to emulate" ?

This feels like it is introducing scope for confusion vs KVM -cpu host,
so I wonder if different naming is better for this.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too
  2017-01-19 17:50 ` Daniel P. Berrange
@ 2017-01-19 18:22   ` Peter Maydell
  2017-01-19 18:31     ` Eduardo Habkost
  0 siblings, 1 reply; 17+ messages in thread
From: Peter Maydell @ 2017-01-19 18:22 UTC (permalink / raw)
  To: Daniel P. Berrange
  Cc: Eduardo Habkost, Igor Mammedov, Jiri Denemark, David Hildenbrand,
	QEMU Developers, Richard Henderson

On 19 January 2017 at 17:50, Daniel P. Berrange <berrange@redhat.com> wrote:
> On Mon, Jan 16, 2017 at 05:54:52PM -0200, Eduardo Habkost wrote:
>> Change the meaning of "-cpu host" to "enable all features
>> supported by the accelerator in the current host", so that it can
>> be used to enable/query all features supported by TCG.
>>
>> To make sure "host" is still at the end of the list in "-cpu
>> help", add a "ordering" field that will be used when sorting the
>> CPU model list.
>
> To be clear, "-cpu host" for TCG is not talking about the actual
> host OS feature support, right ? x86_64 TCG can be run on a ppc host,
> so presumably "-cpu host" just means "all features that this TCG binary
> is able to emulate" ?
>
> This feels like it is introducing scope for confusion vs KVM -cpu host,
> so I wonder if different naming is better for this.

The idea is that you do want an option that works whatever the
accelerator is, though, so as a user you don't need to worry
about messing with the command line for KVM vs TCG vs "try
KVM and fall back to TCG". (I think "-cpu best" has been thrown about
as a suggestion for this before.)

thanks
-- PMM

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too
  2017-01-19 18:22   ` Peter Maydell
@ 2017-01-19 18:31     ` Eduardo Habkost
  2017-01-19 18:38       ` Daniel P. Berrange
  0 siblings, 1 reply; 17+ messages in thread
From: Eduardo Habkost @ 2017-01-19 18:31 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Daniel P. Berrange, Igor Mammedov, Jiri Denemark,
	David Hildenbrand, QEMU Developers, Richard Henderson

On Thu, Jan 19, 2017 at 06:22:40PM +0000, Peter Maydell wrote:
> On 19 January 2017 at 17:50, Daniel P. Berrange <berrange@redhat.com> wrote:
> > On Mon, Jan 16, 2017 at 05:54:52PM -0200, Eduardo Habkost wrote:
> >> Change the meaning of "-cpu host" to "enable all features
> >> supported by the accelerator in the current host", so that it can
> >> be used to enable/query all features supported by TCG.
> >>
> >> To make sure "host" is still at the end of the list in "-cpu
> >> help", add a "ordering" field that will be used when sorting the
> >> CPU model list.
> >
> > To be clear, "-cpu host" for TCG is not talking about the actual
> > host OS feature support, right ? x86_64 TCG can be run on a ppc host,
> > so presumably "-cpu host" just means "all features that this TCG binary
> > is able to emulate" ?
> >
> > This feels like it is introducing scope for confusion vs KVM -cpu host,
> > so I wonder if different naming is better for this.
> 
> The idea is that you do want an option that works whatever the
> accelerator is, though, so as a user you don't need to worry
> about messing with the command line for KVM vs TCG vs "try
> KVM and fall back to TCG". (I think "-cpu best" has been thrown about
> as a suggestion for this before.)

"-cpu best" has been proposed with different semantics before:
one meant "select the the best CPU model from the builtin table",
and another that's equivalent to the meaning of "host" in this
patch.

s390x uses "max CPU model" internally to represent a CPU model
that has all supported features enabled.

If "-cpu host" is not a good name, I suggest "-cpu max".

-- 
Eduardo

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too
  2017-01-19 18:31     ` Eduardo Habkost
@ 2017-01-19 18:38       ` Daniel P. Berrange
  2017-01-19 19:02         ` Eduardo Habkost
  0 siblings, 1 reply; 17+ messages in thread
From: Daniel P. Berrange @ 2017-01-19 18:38 UTC (permalink / raw)
  To: Eduardo Habkost
  Cc: Peter Maydell, Igor Mammedov, Jiri Denemark, David Hildenbrand,
	QEMU Developers, Richard Henderson

On Thu, Jan 19, 2017 at 04:31:45PM -0200, Eduardo Habkost wrote:
> On Thu, Jan 19, 2017 at 06:22:40PM +0000, Peter Maydell wrote:
> > On 19 January 2017 at 17:50, Daniel P. Berrange <berrange@redhat.com> wrote:
> > > On Mon, Jan 16, 2017 at 05:54:52PM -0200, Eduardo Habkost wrote:
> > >> Change the meaning of "-cpu host" to "enable all features
> > >> supported by the accelerator in the current host", so that it can
> > >> be used to enable/query all features supported by TCG.
> > >>
> > >> To make sure "host" is still at the end of the list in "-cpu
> > >> help", add a "ordering" field that will be used when sorting the
> > >> CPU model list.
> > >
> > > To be clear, "-cpu host" for TCG is not talking about the actual
> > > host OS feature support, right ? x86_64 TCG can be run on a ppc host,
> > > so presumably "-cpu host" just means "all features that this TCG binary
> > > is able to emulate" ?
> > >
> > > This feels like it is introducing scope for confusion vs KVM -cpu host,
> > > so I wonder if different naming is better for this.
> > 
> > The idea is that you do want an option that works whatever the
> > accelerator is, though, so as a user you don't need to worry
> > about messing with the command line for KVM vs TCG vs "try
> > KVM and fall back to TCG". (I think "-cpu best" has been thrown about
> > as a suggestion for this before.)
> 
> "-cpu best" has been proposed with different semantics before:
> one meant "select the the best CPU model from the builtin table",
> and another that's equivalent to the meaning of "host" in this
> patch.
> 
> s390x uses "max CPU model" internally to represent a CPU model
> that has all supported features enabled.
> 
> If "-cpu host" is not a good name, I suggest "-cpu max".

Yeah, I think "-cpu max" better describes the intended semantics for this
with TCG. I guess for KVM  -cpu host & -cpu max would be equivalent.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too
  2017-01-19 18:38       ` Daniel P. Berrange
@ 2017-01-19 19:02         ` Eduardo Habkost
  0 siblings, 0 replies; 17+ messages in thread
From: Eduardo Habkost @ 2017-01-19 19:02 UTC (permalink / raw)
  To: Daniel P. Berrange
  Cc: Peter Maydell, Igor Mammedov, Jiri Denemark, David Hildenbrand,
	QEMU Developers, Richard Henderson

On Thu, Jan 19, 2017 at 06:38:36PM +0000, Daniel P. Berrange wrote:
> On Thu, Jan 19, 2017 at 04:31:45PM -0200, Eduardo Habkost wrote:
> > On Thu, Jan 19, 2017 at 06:22:40PM +0000, Peter Maydell wrote:
> > > On 19 January 2017 at 17:50, Daniel P. Berrange <berrange@redhat.com> wrote:
> > > > On Mon, Jan 16, 2017 at 05:54:52PM -0200, Eduardo Habkost wrote:
> > > >> Change the meaning of "-cpu host" to "enable all features
> > > >> supported by the accelerator in the current host", so that it can
> > > >> be used to enable/query all features supported by TCG.
> > > >>
> > > >> To make sure "host" is still at the end of the list in "-cpu
> > > >> help", add a "ordering" field that will be used when sorting the
> > > >> CPU model list.
> > > >
> > > > To be clear, "-cpu host" for TCG is not talking about the actual
> > > > host OS feature support, right ? x86_64 TCG can be run on a ppc host,
> > > > so presumably "-cpu host" just means "all features that this TCG binary
> > > > is able to emulate" ?
> > > >
> > > > This feels like it is introducing scope for confusion vs KVM -cpu host,
> > > > so I wonder if different naming is better for this.
> > > 
> > > The idea is that you do want an option that works whatever the
> > > accelerator is, though, so as a user you don't need to worry
> > > about messing with the command line for KVM vs TCG vs "try
> > > KVM and fall back to TCG". (I think "-cpu best" has been thrown about
> > > as a suggestion for this before.)
> > 
> > "-cpu best" has been proposed with different semantics before:
> > one meant "select the the best CPU model from the builtin table",
> > and another that's equivalent to the meaning of "host" in this
> > patch.
> > 
> > s390x uses "max CPU model" internally to represent a CPU model
> > that has all supported features enabled.
> > 
> > If "-cpu host" is not a good name, I suggest "-cpu max".
> 
> Yeah, I think "-cpu max" better describes the intended semantics for this
> with TCG. I guess for KVM  -cpu host & -cpu max would be equivalent.

Agreed. I will send v2 with "-cpu max".

-- 
Eduardo

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too
  2017-01-17 17:43 ` David Hildenbrand
  2017-01-19 14:52   ` Cornelia Huck
@ 2017-02-16 14:43   ` Christian Borntraeger
  2017-02-16 14:44     ` Christian Borntraeger
  1 sibling, 1 reply; 17+ messages in thread
From: Christian Borntraeger @ 2017-02-16 14:43 UTC (permalink / raw)
  To: David Hildenbrand, Eduardo Habkost, qemu-devel
  Cc: Jiri Denemark, Richard Henderson, Igor Mammedov, Jason J. Herne,
	Cornelia Huck

On 01/17/2017 06:43 PM, David Hildenbrand wrote:
> Am 16.01.2017 um 20:54 schrieb Eduardo Habkost:
>> Change the meaning of "-cpu host" to "enable all features
>> supported by the accelerator in the current host", so that it can
>> be used to enable/query all features supported by TCG.
>>
>> To make sure "host" is still at the end of the list in "-cpu
>> help", add a "ordering" field that will be used when sorting the
>> CPU model list.
>>
>> Cc: Richard Henderson <rth@twiddle.net>
>> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> 
> I also had the same thing in mind when working on s390x models but
> decided to do it like x86. Now that x86 changes ...
> 
> Something like that should work for s390x (and I don't think it will break any concept). Most probably cleaner to handle this the same
> way on all architectures and to not disable tests for s390x.
> 
> Uncompiled and untested.
> 
> @Conny and Christian, feel free to pick up and modify if this makes
> sense
> 
Looks sane to me. Can you resend properly, it looks like whitespace
got damaged all over the place.

Thanks


> From 4a2af1ca47421b68eb7677cd91af350dd9be4e0e Mon Sep 17 00:00:00 2001
> From: David Hildenbrand <david@redhat.com>
> Date: Tue, 17 Jan 2017 18:34:45 +0100
> Subject: [PATCH] s390x/cpumodel: allow the "host" model also for tcg
> 
> Let's also allow the host model for tcg, therefore meaning
> "enable all features supported by the selected accelerator in the current
> host".
> 
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  qapi-schema.json          |  4 ++--
>  target/s390x/cpu-qom.h    |  1 -
>  target/s390x/cpu_models.c | 34 ++++++++--------------------------
>  3 files changed, 10 insertions(+), 29 deletions(-)
> 
> diff --git a/qapi-schema.json b/qapi-schema.json
> index ddc8783..f14d343 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -4334,8 +4334,8 @@
>  # CPU model has to be created by baselining.
>  #
>  # Usually, a CPU model is compared against the maximum possible CPU model
> -# of a certain configuration (e.g. the "host" model for KVM). If that CPU
> -# model is identical or a subset, it will run in that configuration.
> +# of a certain configuration (the "host" model). If that CPU model is
> +# identical or a subset, it will run in that configuration.
>  #
>  # The result returned by this command may be affected by:
>  #
> diff --git a/target/s390x/cpu-qom.h b/target/s390x/cpu-qom.h
> index 4e936e7..71322a5 100644
> --- a/target/s390x/cpu-qom.h
> +++ b/target/s390x/cpu-qom.h
> @@ -47,7 +47,6 @@ typedef struct S390CPUClass {
>      CPUClass parent_class;
>      /*< public >*/
>      const S390CPUDef *cpu_def;
> -    bool kvm_required;
>      bool is_static;
>      bool is_migration_safe;
>      const char *desc;
> diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
> index 5b66d33..2994a7b 100644
> --- a/target/s390x/cpu_models.c
> +++ b/target/s390x/cpu_models.c
> @@ -331,10 +331,6 @@ static void cpu_model_from_info(S390CPUModel *model, const CpuModelInfo *info,
>          error_setg(errp, "The CPU definition \'%s\' is unknown.", info->name);
>          return;
>      }
> -    if (S390_CPU_CLASS(oc)->kvm_required && !kvm_enabled()) {
> -        error_setg(errp, "The CPU definition '%s' requires KVM", info->name);
> -        return;
> -    }
>      obj = object_new(object_class_get_name(oc));
>      cpu = S390_CPU(obj);
> 
> @@ -718,15 +714,9 @@ static inline void apply_cpu_model(const S390CPUModel *model, Error **errp)
> 
>  void s390_realize_cpu_model(CPUState *cs, Error **errp)
>  {
> -    S390CPUClass *xcc = S390_CPU_GET_CLASS(cs);
>      S390CPU *cpu = S390_CPU(cs);
>      const S390CPUModel *max_model;
> 
> -    if (xcc->kvm_required && !kvm_enabled()) {
> -        error_setg(errp, "CPU definition requires KVM");
> -        return;
> -    }
> -
>      if (!cpu->model) {
>          /* no host model support -> perform compatibility stuff */
>          apply_cpu_model(NULL, errp);
> @@ -904,26 +894,25 @@ static void s390_cpu_model_initfn(Object *obj)
>      }
>  }
> 
> -#ifdef CONFIG_KVM
>  static void s390_host_cpu_model_initfn(Object *obj)
>  {
> +    S390CPUModel *max_model;
>      S390CPU *cpu = S390_CPU(obj);
>      Error *err = NULL;
> 
> -    if (!kvm_enabled() || !kvm_s390_cpu_models_supported()) {
> +    if (kvm_enabled() && !kvm_s390_cpu_models_supported()) {
>          return;
>      }
> 
> -    cpu->model = g_malloc0(sizeof(*cpu->model));
> -    kvm_s390_get_host_cpu_model(cpu->model, &err);
> -    if (err) {
> +    max_model = get_max_cpu_model(&err);
> +    if (err || !max_model) {
>          error_report_err(err);
> -        g_free(cpu->model);
>          /* fallback to unsupported cpu models */
> -        cpu->model = NULL;
> +        return;
>      }
> +    /* copy the host model so it can be modified */
> +    cpu->model = g_memdup(max_model, sizeof(*cpu->model));
>  }
> -#endif
> 
>  static void s390_qemu_cpu_model_initfn(Object *obj)
>  {
> @@ -969,15 +958,12 @@ void s390_cpu_model_class_register_props(ObjectClass *oc)
>                                    NULL);
>  }
> 
> -#ifdef CONFIG_KVM
>  static void s390_host_cpu_model_class_init(ObjectClass *oc, void *data)
>  {
>      S390CPUClass *xcc = S390_CPU_CLASS(oc);
> 
> -    xcc->kvm_required = true;
> -    xcc->desc = "KVM only: All recognized features";
> +    xcc->desc = "All supported and available features";
>  }
> -#endif
> 
>  static void s390_base_cpu_model_class_init(ObjectClass *oc, void *data)
>  {
> @@ -1042,7 +1028,6 @@ static const TypeInfo qemu_s390_cpu_type_info = {
>      .class_init = s390_qemu_cpu_model_class_init,
>  };
> 
> -#ifdef CONFIG_KVM
>  static const TypeInfo host_s390_cpu_type_info = {
>      .name = S390_CPU_TYPE_NAME("host"),
>      .parent = TYPE_S390_CPU,
> @@ -1050,7 +1035,6 @@ static const TypeInfo host_s390_cpu_type_info = {
>      .instance_finalize = s390_cpu_model_finalize,
>      .class_init = s390_host_cpu_model_class_init,
>  };
> -#endif
> 
>  static void register_types(void)
>  {
> @@ -1093,9 +1077,7 @@ static void register_types(void)
>      }
> 
>      type_register_static(&qemu_s390_cpu_type_info);
> -#ifdef CONFIG_KVM
>      type_register_static(&host_s390_cpu_type_info);
> -#endif
>  }
> 
>  type_init(register_types)

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too
  2017-02-16 14:43   ` Christian Borntraeger
@ 2017-02-16 14:44     ` Christian Borntraeger
  0 siblings, 0 replies; 17+ messages in thread
From: Christian Borntraeger @ 2017-02-16 14:44 UTC (permalink / raw)
  To: David Hildenbrand, Eduardo Habkost, qemu-devel
  Cc: Jiri Denemark, Richard Henderson, Igor Mammedov, Jason J. Herne,
	Cornelia Huck

On 02/16/2017 03:43 PM, Christian Borntraeger wrote:
> On 01/17/2017 06:43 PM, David Hildenbrand wrote:
>> Am 16.01.2017 um 20:54 schrieb Eduardo Habkost:
>>> Change the meaning of "-cpu host" to "enable all features
>>> supported by the accelerator in the current host", so that it can
>>> be used to enable/query all features supported by TCG.
>>>
>>> To make sure "host" is still at the end of the list in "-cpu
>>> help", add a "ordering" field that will be used when sorting the
>>> CPU model list.
>>>
>>> Cc: Richard Henderson <rth@twiddle.net>
>>> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
>>
>> I also had the same thing in mind when working on s390x models but
>> decided to do it like x86. Now that x86 changes ...
>>
>> Something like that should work for s390x (and I don't think it will break any concept). Most probably cleaner to handle this the same
>> way on all architectures and to not disable tests for s390x.
>>
>> Uncompiled and untested.
>>
>> @Conny and Christian, feel free to pick up and modify if this makes
>> sense
>>
> Looks sane to me. Can you resend properly, it looks like whitespace
> got damaged all over the place.
> 
> Thanks

Forget that. For some reason, the "max" cpu patch series did not reach my inbox :-/
Will look into that.

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2017-02-16 14:45 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-16 19:54 [Qemu-devel] [PATCH] i386: Support "-cpu host" on TCG too Eduardo Habkost
2017-01-17 13:39 ` Richard W.M. Jones
2017-01-17 14:03   ` Eduardo Habkost
2017-01-17 13:42 ` Richard W.M. Jones
2017-01-17 13:44   ` Richard W.M. Jones
2017-01-17 13:57     ` Richard W.M. Jones
2017-01-17 14:05       ` Eduardo Habkost
2017-01-17 14:19         ` Richard W.M. Jones
2017-01-17 17:43 ` David Hildenbrand
2017-01-19 14:52   ` Cornelia Huck
2017-02-16 14:43   ` Christian Borntraeger
2017-02-16 14:44     ` Christian Borntraeger
2017-01-19 17:50 ` Daniel P. Berrange
2017-01-19 18:22   ` Peter Maydell
2017-01-19 18:31     ` Eduardo Habkost
2017-01-19 18:38       ` Daniel P. Berrange
2017-01-19 19:02         ` Eduardo Habkost

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.