1. 30 7月, 2018 3 次提交
  2. 23 7月, 2018 2 次提交
  3. 18 7月, 2018 1 次提交
    • D
      s390x/cpumodel: fix segmentation fault when baselining models · 677ff32d
      David Hildenbrand 提交于
      Usually, when baselining two CPU models, whereby one of them has base
      CPU features disabled (e.g. z14-base,msa=off), we fallback to an older
      model that did not have these features in the base model. We always try to
      create a "sane" CPU model (as far as possible), and one part of it is that
      removing base features is no good and to be avoided.
      
      Now, if we disable base features that were part of a z900, we're out of
      luck. We won't find a CPU model and QEMU will segfault. This is a
      scenario that should never happen in real life, but it can be used to
      crash QEMU.
      
      So let's properly report an error if we baseline e.g.:
      
      { "execute": "query-cpu-model-baseline",
        "arguments" : { "modela": { "name": "z14-base", "props": {"esan3" : false}},
                        "modelb": { "name": "z14"}} }
      
      Instead of segfaulting.
      Signed-off-by: NDavid Hildenbrand <david@redhat.com>
      Message-Id: <20180718092330.19465-1-david@redhat.com>
      Acked-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NCornelia Huck <cohuck@redhat.com>
      677ff32d
  4. 17 7月, 2018 1 次提交
  5. 16 7月, 2018 3 次提交
    • R
      hyperv: ensure VP index equal to QEMU cpu_index · e9688fab
      Roman Kagan 提交于
      Hyper-V identifies vCPUs by Virtual Processor (VP) index which can be
      queried by the guest via HV_X64_MSR_VP_INDEX msr.  It is defined by the
      spec as a sequential number which can't exceed the maximum number of
      vCPUs per VM.
      
      It has to be owned by QEMU in order to preserve it across migration.
      
      However, the initial implementation in KVM didn't allow to set this
      msr, and KVM used its own notion of VP index.  Fortunately, the way
      vCPUs are created in QEMU/KVM makes it likely that the KVM value is
      equal to QEMU cpu_index.
      
      So choose cpu_index as the value for vp_index, and push that to KVM on
      kernels that support setting the msr.  On older ones that don't, query
      the kernel value and assert that it's in sync with QEMU.
      
      Besides, since handling errors from vCPU init at hotplug time is
      impossible, disable vCPU hotplug.
      
      This patch also introduces accessor functions to encapsulate the mapping
      between a vCPU and its vp_index.
      Signed-off-by: NRoman Kagan <rkagan@virtuozzo.com>
      Message-Id: <20180702134156.13404-3-rkagan@virtuozzo.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      e9688fab
    • R
      hyperv: rename vcpu_id to vp_index · 1b2013ea
      Roman Kagan 提交于
      In Hyper-V-related code, vCPUs are identified by their VP (virtual
      processor) index.  Since it's customary for "vcpu_id" in QEMU to mean
      APIC id, rename the respective variables to "vp_index" to make the
      distinction clear.
      Signed-off-by: NRoman Kagan <rkagan@virtuozzo.com>
      Message-Id: <20180702134156.13404-2-rkagan@virtuozzo.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      1b2013ea
    • V
      dump: add kernel_gs_base to QEMU CPU state · 46fac17d
      Viktor Prutyanov 提交于
      This patch adds field with content of KERNEL_GS_BASE MSR to QEMU note in
      ELF dump.
      
      On Windows, if all vCPUs are running usermode tasks at the time the dump is
      created, this can be helpful in the discovery of guest system structures
      during conversion ELF dump to MEMORY.DMP dump.
      Signed-off-by: NViktor Prutyanov <viktor.prutyanov@virtuozzo.com>
      Message-Id: <20180714123000.11326-1-viktor.prutyanov@virtuozzo.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      46fac17d
  6. 10 7月, 2018 2 次提交
  7. 09 7月, 2018 2 次提交
  8. 07 7月, 2018 2 次提交
    • L
      target/ppc: fix build on ppc64 host · 4fff7218
      Laurent Vivier 提交于
      When I try to build a ppc64 target on a ppc64 host (gcc 8.1.1), I have:
      
      .../target/ppc/int_helper.c: In function 'helper_vinsertb':
      .../target/ppc/int_helper.c:1954:32: error: array subscript 18446744073709551608 is above array bounds of 'uint8_t[16]' {aka 'unsigned char[16]'} [-Werror=array-bounds]
               memmove(&r->u8[index], &b->u8[8 - sizeof(r->element)],              \
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      .../target/ppc/int_helper.c:1965:1: note: in expansion of macro 'VINSERT'
      
      If we compare with the macro for ppc64le, we can see
      sizeof(r->element[0]) should be used instead of sizeof(r->element).
      
      And VINSERT uses only u8, u16, u32 and u64, so the maximum value
      of sizeof(r->element[0]) is 8
      Suggested-by: NDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
      Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      4fff7218
    • G
      i386: fix '-cpu ?' output for host cpu type · 02693cc4
      Greg Kurz 提交于
      Since commit d6dcc558, '-cpu ?' shows the description of the
      X86_CPU_TYPE_NAME("max") for the host CPU model:
      
      Enables all features supported by the accelerator in the current host
      
      instead of the expected:
      
      KVM processor with all supported host features
      
      or
      
      HVF processor with all supported host features
      
      This is caused by the early use of kvm_enabled() and hvf_enabled() in
      a class_init function. Since the accelerator isn't configured yet, both
      helpers return false unconditionally.
      
      A QEMU binary will only be compiled with one of these accelerators, not
      both. The appropriate description can thus be decided at build time.
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Message-Id: <153055056654.212317.4697363278304826913.stgit@bahia.lan>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      02693cc4
  9. 03 7月, 2018 22 次提交
  10. 02 7月, 2018 2 次提交