1. 24 8月, 2018 28 次提交
  2. 23 8月, 2018 6 次提交
    • T
      hw/timer/mc146818rtc: Fix introspection problem · 29551fdc
      Thomas Huth 提交于
      There is currently a funny problem with the "mc146818rtc" device:
      1) Start QEMU like this:
         qemu-system-ppc64 -M pseries -S
      2) At the HMP monitor, enter "info qom-tree". Note that there is an
         entry for "/rtc (spapr-rtc)".
      3) Introspect the mc146818rtc device like this:
         device_add mc146818rtc,help
      4) Run "info qom-tree" again. The "/rtc" entry is gone now!
      
      The rtc_finalize() function of the mc146818rtc device has two bugs: First,
      it tries to remove a "rtc" property, while the rtc_realizefn() added a
      "rtc-time" property instead. And second, it should have been done in an
      unrealize function, not in a finalize function, to avoid that this causes
      problems during introspection.
      
      But since adding aliases to the global machine state should not be done
      from a device's realize function anyway, let's rather fix this issue
      by moving the creation of the alias to the code that creates the device
      (and thus is run from the machine init functions instead), i.e. the
      mc146818_rtc_init() function for most machines. The prep machines are
      special, since the mc146818rtc device is created here in the realize
      function of the i82378 device. Since we certainly don't want to add the
      alias there, we add it to some code that is called from the ibm_40p_init()
      machine init function instead.
      Since the alias is now only created during the machine init, we can remove
      the object_property_del() completely.
      
      Fixes: 654a36d8Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Message-Id: <1534419358-10932-5-git-send-email-thuth@redhat.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      29551fdc
    • T
      hw/timer/mc146818rtc: White space clean-up · 7cd9681b
      Thomas Huth 提交于
      mc146818rtc.c still contains some TABs. Replace them with spaces.
      And while we're at it, also delete trailing whitespace in this file.
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Message-Id: <1534419358-10932-4-git-send-email-thuth@redhat.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7cd9681b
    • M
      megasas: fix sglist leak · 48285ba2
      Marc-André Lureau 提交于
      tests/cdrom-test -p /x86_64/cdrom/boot/megasas
      
      Produces the following ASAN leak.
      
      ==25700==ERROR: LeakSanitizer: detected memory leaks
      
      Direct leak of 16 byte(s) in 1 object(s) allocated from:
          #0 0x7f06f8faac48 in malloc (/lib64/libasan.so.5+0xeec48)
          #1 0x7f06f87a73c5 in g_malloc (/lib64/libglib-2.0.so.0+0x523c5)
          #2 0x55a729f17738 in pci_dma_sglist_init /home/elmarco/src/qq/include/hw/pci/pci.h:818
          #3 0x55a729f2a706 in megasas_map_dcmd /home/elmarco/src/qq/hw/scsi/megasas.c:698
          #4 0x55a729f39421 in megasas_handle_dcmd /home/elmarco/src/qq/hw/scsi/megasas.c:1574
          #5 0x55a729f3f70d in megasas_handle_frame /home/elmarco/src/qq/hw/scsi/megasas.c:1955
          #6 0x55a729f40939 in megasas_mmio_write /home/elmarco/src/qq/hw/scsi/megasas.c:2119
          #7 0x55a729f41102 in megasas_port_write /home/elmarco/src/qq/hw/scsi/megasas.c:2170
          #8 0x55a729220e60 in memory_region_write_accessor /home/elmarco/src/qq/memory.c:527
          #9 0x55a7292212b3 in access_with_adjusted_size /home/elmarco/src/qq/memory.c:594
          #10 0x55a72922cf70 in memory_region_dispatch_write /home/elmarco/src/qq/memory.c:1473
          #11 0x55a7290f5907 in flatview_write_continue /home/elmarco/src/qq/exec.c:3255
          #12 0x55a7290f5ceb in flatview_write /home/elmarco/src/qq/exec.c:3294
          #13 0x55a7290f6457 in address_space_write /home/elmarco/src/qq/exec.c:3384
          #14 0x55a7290f64a8 in address_space_rw /home/elmarco/src/qq/exec.c:3395
          #15 0x55a72929ecb0 in kvm_handle_io /home/elmarco/src/qq/accel/kvm/kvm-all.c:1729
          #16 0x55a7292a0db5 in kvm_cpu_exec /home/elmarco/src/qq/accel/kvm/kvm-all.c:1969
          #17 0x55a7291c4212 in qemu_kvm_cpu_thread_fn /home/elmarco/src/qq/cpus.c:1215
          #18 0x55a72a966a6c in qemu_thread_start /home/elmarco/src/qq/util/qemu-thread-posix.c:504
          #19 0x7f06ed486593 in start_thread (/lib64/libpthread.so.0+0x7593)
      
      Move the qemu_sglist_destroy() from megasas_complete_command() to
      megasas_unmap_frame(), so map/unmap are balanced.
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <20180814141247.32336-1-marcandre.lureau@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      48285ba2
    • P
      fix "Missing break in switch" coverity reports · edd7541b
      Paolo Bonzini 提交于
      Many of these are marked as "intentional/fix required" because they
      just need adding a fall through comment.  This is exactly what this
      patch does, except for target/mips/translate.c where it is easier to
      duplicate the code, and hw/audio/sb16.c where I consulted the DOSBox
      sources and decide to just remove the LOG_UNIMP before the fallthrough.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      edd7541b
    • P
      es1370: simplify MemoryRegionOps · 154c1d1f
      Paolo Bonzini 提交于
      Use the automatic subregister extraction from the memory API, and avoid
      that Coverity complains about missing fallthrough comments.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      154c1d1f
    • G
      scsi: mptsas: Mark as storage device · a736d719
      Guenter Roeck 提交于
      mptsas1068 is currently listed as uncategorized device.
      Mark it as storage device.
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Message-Id: <1533076133-22745-1-git-send-email-linux@roeck-us.net>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      a736d719
  3. 21 8月, 2018 6 次提交