1. 14 12月, 2017 1 次提交
  2. 10 10月, 2017 1 次提交
    • S
      vl: exit if maxcpus is negative · c0dd1099
      Seeteena Thoufeek 提交于
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      
      ---Steps to Reproduce---
      
      When passed a negative number to 'maxcpus' parameter, Qemu aborts
      with a core dump.
      
      Run the following command with maxcpus argument as negative number
      
      ppc64-softmmu/qemu-system-ppc64 --nographic -vga none -machine
      pseries,accel=kvm,kvm-type=HV -m size=200g -device virtio-blk-pci,
      drive=rootdisk -drive file=/home/images/pegas-1.0-ppc64le.qcow2,
      if=none,cache=none,id=rootdisk,format=qcow2 -monitor telnet
      :127.0.0.1:1234,server,nowait -net nic,model=virtio -net
      user -redir tcp:2000::22 -device nec-usb-xhci -smp 8,cores=1,
      threads=1,maxcpus=-12
      
      (process:12149): GLib-ERROR **: gmem.c:130: failed to allocate
       18446744073709550568 bytes
      
      Trace/breakpoint trap
      Reported-by: NR.Nageswara Sastry <rnsastry@linux.vnet.ibm.com>
      Signed-off-by: NSeeteena Thoufeek <s1seetee@linux.vnet.ibm.com>
      Message-Id: <1504511031-26834-1-git-send-email-s1seetee@linux.vnet.ibm.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      c0dd1099
  3. 28 6月, 2017 1 次提交
  4. 02 6月, 2017 1 次提交
  5. 31 5月, 2017 1 次提交
  6. 23 5月, 2017 3 次提交
    • E
      shutdown: Expose bool cause in SHUTDOWN and RESET events · 08fba7ac
      Eric Blake 提交于
      Libvirt would like to be able to distinguish between a SHUTDOWN
      event triggered solely by guest request and one triggered by a
      SIGTERM or other action on the host.  While qemu_kill_report() was
      already able to give different output to stderr based on whether a
      shutdown was triggered by a host signal (but NOT by a host UI event,
      such as clicking the X on the window), that information was then
      lost to management.  The previous patches improved things to use an
      enum throughout all callsites, so now we have something ready to
      expose through QMP.
      
      Note that for now, the decision was to expose ONLY a boolean,
      rather than promoting ShutdownCause to a QAPI enum; this is because
      libvirt has not expressed an interest in anything finer-grained.
      We can still add additional details, in a backwards-compatible
      manner, if a need later arises (if the addition happens before 2.10,
      we can replace the bool with an enum; otherwise, the enum will have
      to be in addition to the bool); this patch merely adds a helper
      shutdown_caused_by_guest() to map the internal enum into the
      external boolean.
      
      Update expected iotest outputs to match the new data (complete
      coverage of the affected tests is obtained by -raw, -qcow2, and -nbd).
      
      Here is output from 'virsh qemu-monitor-event --loop' with the
      patch installed:
      
      event SHUTDOWN at 1492639680.731251 for domain fedora_13: {"guest":true}
      event STOP at 1492639680.732116 for domain fedora_13: <null>
      event SHUTDOWN at 1492639680.732830 for domain fedora_13: {"guest":false}
      
      Note that libvirt runs qemu with -no-shutdown: the first SHUTDOWN event
      was triggered by an action I took directly in the guest (shutdown -h),
      at which point qemu stops the vcpus and waits for libvirt to do any
      final cleanups; the second SHUTDOWN event is the result of libvirt
      sending SIGTERM now that it has completed cleanup.  Libvirt is already
      smart enough to only feed the first qemu SHUTDOWN event to the end user
      (remember, virsh qemu-monitor-event is a low-level debugging interface
      that is explicitly unsupported by libvirt, so it sees things that normal
      end users do not); changing qemu to emit SHUTDOWN only once is outside
      the scope of this series.
      
      See also https://bugzilla.redhat.com/1384007Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20170515214114.15442-6-eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      08fba7ac
    • E
      shutdown: Add source information to SHUTDOWN and RESET · cf83f140
      Eric Blake 提交于
      Time to wire up all the call sites that request a shutdown or
      reset to use the enum added in the previous patch.
      
      It would have been less churn to keep the common case with no
      arguments as meaning guest-triggered, and only modified the
      host-triggered code paths, via a wrapper function, but then we'd
      still have to audit that I didn't miss any host-triggered spots;
      changing the signature forces us to double-check that I correctly
      categorized all callers.
      
      Since command line options can change whether a guest reset request
      causes an actual reset vs. a shutdown, it's easy to also add the
      information to reset requests.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Acked-by: David Gibson <david@gibson.dropbear.id.au> [ppc parts]
      Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> [SPARC part]
      Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> [s390x parts]
      Message-Id: <20170515214114.15442-5-eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      cf83f140
    • E
      shutdown: Prepare for use of an enum in reset/shutdown_request · aedbe192
      Eric Blake 提交于
      We want to track why a guest was shutdown; in particular, being able
      to tell the difference between a guest request (such as ACPI request)
      and host request (such as SIGINT) will prove useful to libvirt.
      Since all requests eventually end up changing shutdown_requested in
      vl.c, the logical change is to make that value track the reason,
      rather than its current 0/1 contents.
      
      Since command-line options control whether a reset request is turned
      into a shutdown request instead, the same treatment is given to
      reset_requested.
      
      This patch adds an internal enum ShutdownCause that describes reasons
      that a shutdown can be requested, and changes qemu_system_reset() to
      pass the reason through, although for now nothing is actually changed
      with regards to what gets reported.  The enum could be exported via
      QAPI at a later date, if deemed necessary, but for now, there has not
      been a request to expose that much detail to end clients.
      
      For the most part, we turn 0 into SHUTDOWN_CAUSE_NONE, and 1 into
      SHUTDOWN_CAUSE_HOST_ERROR; the only specific case where we have enough
      information right now to use a different value is when we are reacting
      to a host signal.  It will take a further patch to edit all call-sites
      that can trigger a reset or shutdown request to properly pass in any
      other reasons; this patch includes TODOs to point such places out.
      
      qemu_system_reset() trades its 'bool report' parameter for a
      'ShutdownCause reason', with all non-zero values having the same
      effect; this lets us get rid of the weird #defines for VMRESET_*
      as synonyms for bools.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20170515214114.15442-3-eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      aedbe192
  7. 19 5月, 2017 2 次提交
  8. 17 5月, 2017 2 次提交
  9. 12 5月, 2017 1 次提交
    • H
      numa: Allow setting NUMA distance for different NUMA nodes · 0f203430
      He Chen 提交于
      This patch is going to add SLIT table support in QEMU, and provides
      additional option `dist` for command `-numa` to allow user set vNUMA
      distance by QEMU command.
      
      With this patch, when a user wants to create a guest that contains
      several vNUMA nodes and also wants to set distance among those nodes,
      the QEMU command would like:
      
      ```
      -numa node,nodeid=0,cpus=0 \
      -numa node,nodeid=1,cpus=1 \
      -numa node,nodeid=2,cpus=2 \
      -numa node,nodeid=3,cpus=3 \
      -numa dist,src=0,dst=1,val=21 \
      -numa dist,src=0,dst=2,val=31 \
      -numa dist,src=0,dst=3,val=41 \
      -numa dist,src=1,dst=2,val=21 \
      -numa dist,src=1,dst=3,val=31 \
      -numa dist,src=2,dst=3,val=21 \
      ```
      Signed-off-by: NHe Chen <he.chen@linux.intel.com>
      Message-Id: <1493260558-20728-1-git-send-email-he.chen@linux.intel.com>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NAndrew Jones <drjones@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      0f203430
  10. 04 5月, 2017 4 次提交
  11. 21 4月, 2017 1 次提交
  12. 16 2月, 2017 2 次提交
  13. 28 1月, 2017 2 次提交
  14. 17 1月, 2017 1 次提交
  15. 13 1月, 2017 1 次提交
  16. 25 10月, 2016 1 次提交
  17. 07 10月, 2016 1 次提交
  18. 23 9月, 2016 2 次提交
    • F
      vl: Switch qemu_uuid to QemuUUID · 9c5ce8db
      Fam Zheng 提交于
      Update all qemu_uuid users as well, especially get rid of the duplicated
      low level g_strdup_printf, sscanf and snprintf calls with QEMU UUID API.
      
      Since qemu_uuid_parse is quite tangled with qemu_uuid, its switching to
      QemuUUID is done here too to keep everything in sync and avoid code
      churn.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJeff Cody <jcody@redhat.com>
      Message-Id: <1474432046-325-10-git-send-email-famz@redhat.com>
      9c5ce8db
    • F
      util: Add UUID API · cea25275
      Fam Zheng 提交于
      A number of different places across the code base use CONFIG_UUID. Some
      of them are soft dependency, some are not built if libuuid is not
      available, some come with dummy fallback, some throws runtime error.
      
      It is hard to maintain, and hard to reason for users.
      
      Since UUID is a simple standard with only a small number of operations,
      it is cleaner to have a central support in libqemuutil. This patch adds
      qemu_uuid_* functions that all uuid users in the code base can
      rely on. Except for qemu_uuid_generate which is new code, all other
      functions are just copy from existing fallbacks from other files.
      
      Note that qemu_uuid_parse is moved without updating the function
      signature to use QemuUUID, to keep this patch simple.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJeff Cody <jcody@redhat.com>
      Message-Id: <1474432046-325-2-git-send-email-famz@redhat.com>
      cea25275
  19. 04 7月, 2016 1 次提交
  20. 13 6月, 2016 1 次提交
  21. 26 5月, 2016 1 次提交
  22. 21 5月, 2016 5 次提交
  23. 23 3月, 2016 1 次提交
  24. 13 11月, 2015 1 次提交
  25. 10 11月, 2015 2 次提交