1. 13 1月, 2016 1 次提交
  2. 19 9月, 2015 1 次提交
  3. 03 6月, 2015 1 次提交
    • S
      hw/alpha/dp264.c: Fix memory leak spotted by valgrind · c18f8556
      Shannon Zhao 提交于
      valgrind complains about:
      ==7055== 58 bytes in 1 blocks are definitely lost in loss record 1,471 of 2,192
      ==7055==    at 0x4C2845D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==7055==    by 0x24410F: malloc_and_trace (vl.c:2556)
      ==7055==    by 0x64C770E: g_malloc (in /usr/lib64/libglib-2.0.so.0.3600.3)
      ==7055==    by 0x64DEFD7: g_strndup (in /usr/lib64/libglib-2.0.so.0.3600.3)
      ==7055==    by 0x650181A: g_vasprintf (in /usr/lib64/libglib-2.0.so.0.3600.3)
      ==7055==    by 0x64DF0CC: g_strdup_vprintf (in /usr/lib64/libglib-2.0.so.0.3600.3)
      ==7055==    by 0x64DF188: g_strdup_printf (in /usr/lib64/libglib-2.0.so.0.3600.3)
      ==7055==    by 0x242F81: qemu_find_file (vl.c:2121)
      ==7055==    by 0x217A32: clipper_init (dp264.c:105)
      ==7055==    by 0x2484DA: main (vl.c:4249)
      Signed-off-by: NShannon Zhao <zhaoshenglong@huawei.com>
      Signed-off-by: NShannon Zhao <shannon.zhao@linaro.org>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      c18f8556
  4. 26 4月, 2015 1 次提交
    • P
      Switch non-CPU callers from ld/st*_phys to address_space_ld/st* · 42874d3a
      Peter Maydell 提交于
      Switch all the uses of ld/st*_phys to address_space_ld/st*,
      except for those cases where the address space is the CPU's
      (ie cs->as). This was done with the following script which
      generates a Coccinelle patch.
      
      A few over-80-columns lines in the result were rewrapped by
      hand where Coccinelle failed to do the wrapping automatically,
      as well as one location where it didn't put a line-continuation
      '\' when wrapping lines on a change made to a match inside
      a macro definition.
      
      ===begin===
      #!/bin/sh -e
      # Usage:
      # ./ldst-phys.spatch.sh > ldst-phys.spatch
      # spatch -sp_file ldst-phys.spatch -dir . | sed -e '/^+/s/\t/        /g' > out.patch
      # patch -p1 < out.patch
      
      for FN in ub uw_le uw_be l_le l_be q_le q_be uw l q; do
      cat <<EOF
      @ cpu_matches_ld_${FN} @
      expression E1,E2;
      identifier as;
      @@
      
      ld${FN}_phys(E1->as,E2)
      
      @ other_matches_ld_${FN} depends on !cpu_matches_ld_${FN} @
      expression E1,E2;
      @@
      
      -ld${FN}_phys(E1,E2)
      +address_space_ld${FN}(E1,E2, MEMTXATTRS_UNSPECIFIED, NULL)
      
      EOF
      
      done
      
      for FN in b w_le w_be l_le l_be q_le q_be w l q; do
      cat <<EOF
      @ cpu_matches_st_${FN} @
      expression E1,E2,E3;
      identifier as;
      @@
      
      st${FN}_phys(E1->as,E2,E3)
      
      @ other_matches_st_${FN} depends on !cpu_matches_st_${FN} @
      expression E1,E2,E3;
      @@
      
      -st${FN}_phys(E1,E2,E3)
      +address_space_st${FN}(E1,E2,E3, MEMTXATTRS_UNSPECIFIED, NULL)
      
      EOF
      
      done
      ===endit===
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      42874d3a
  5. 24 2月, 2015 1 次提交
    • M
      serial: Factor out common serial_hds_isa_init() · b6607a1a
      Markus Armbruster 提交于
      It's the same old loop copied five times, plus another instance where
      it's clipped to two iterations and unrolled.
      
      No external users of serial_isa_init() are left, so give it internal
      linkage.
      
      Maintainers of affected machines cc'ed.
      
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Anthony Liguori <aliguori@amazon.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: Leon Alrae <leon.alrae@imgtec.com>
      Cc: Blue Swirl <blauwirbel@gmail.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      b6607a1a
  6. 03 10月, 2014 1 次提交
    • J
      ide: Update ide_drive_get to be HBA agnostic · d8f94e1b
      John Snow 提交于
      Instead of duplicating the logic for the if_ide
      (bus,unit) mappings, rely on the blockdev layer
      for managing those mappings for us, and use the
      drive_get_by_index call instead.
      
      This allows ide_drive_get to work for AHCI HBAs
      as well, and can be used in the Q35 initialization.
      
      Lastly, change the nature of the argument to
      ide_drive_get so that represents the number of
      total drives we can support, and not the total
      number of buses. This will prevent array overflows
      if the units-per-default-bus property ever needs
      to be adjusted for compatibility reasons.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Message-id: 1412187569-23452-5-git-send-email-jsnow@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      d8f94e1b
  7. 28 5月, 2014 1 次提交
  8. 11 2月, 2014 1 次提交
  9. 28 8月, 2013 1 次提交
    • M
      hw: Clean up bogus default boot order · c1654732
      Markus Armbruster 提交于
      We set default boot order "cad" in every single machine definition
      except "pseries" and "moxiesim", even though very few boards actually
      care for boot order, and "cad" makes sense for even fewer.
      
      Machines that care:
      
      * pc and its variants
      
        Accept up to three letters 'a', 'b' (undocumented alias for 'a'),
        'c', 'd' and 'n'.  Reject all others (fatal with -boot).
      
      * nseries (n800, n810)
      
        Check whether order starts with 'n'.  Silently ignored otherwise.
      
      * prep, g3beige, mac99
      
        Extract the first character the machine understands (subset of
        'a'..'f').  Silently ignored otherwise.
      
      * spapr
      
        Accept an arbitrary string (vl.c restricts it to contain only
        'a'..'p', no duplicates).
      
      * sun4[mdc]
      
        Use the first character.  Silently ignored otherwise.
      
      Strip characters these machines ignore from their default boot order.
      
      For all other machines, remove the unused default boot order
      alltogether.
      
      Note that my rename of QEMUMachine member boot_order to
      default_boot_order and QEMUMachineInitArgs member boot_device to
      boot_order has a welcome side effect: it makes every use of boot
      orders visible in this patch, for easy review.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      c1654732
  10. 15 7月, 2013 1 次提交
  11. 08 7月, 2013 1 次提交
    • D
      pci: Add root bus parameter to pci_nic_init() · 29b358f9
      David Gibson 提交于
      At present, pci_nic_init() and pci_nic_init_nofail() assume that they will
      only create a NIC under the primary PCI root.  As we add support for
      multiple PCI roots, that may no longer be the case.  This patch adds a root
      bus parameter to pci_nic_init() (and updates callers accordingly) to allow
      the machine init code using it to specify the right PCI root for NICs
      created by old-style -net nic parameters.  NICs created new-style, with
      -device can of course be put anywhere.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      29b358f9
  12. 09 4月, 2013 2 次提交
  13. 01 3月, 2013 2 次提交
  14. 16 1月, 2013 1 次提交
  15. 19 12月, 2012 2 次提交
  16. 23 10月, 2012 1 次提交
  17. 20 10月, 2012 1 次提交
    • E
      create struct for machine initialization arguments · 5f072e1f
      Eduardo Habkost 提交于
      This should help us to:
      - More easily add or remove machine initialization arguments without
        having to change every single machine init function;
      - More easily make mechanical changes involving the machine init
        functions in the future;
      - Let machine initialization forward the init arguments to other
        functions more easily.
      
      This change was half-mechanical process: first the struct was added with
      the local ram_size, boot_device, kernel_*, initrd_*, and cpu_model local
      variable initialization to all functions. Then the compiler helped me
      locate the local variables that are unused, so they could be removed.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      5f072e1f
  18. 07 10月, 2012 1 次提交
  19. 15 3月, 2012 1 次提交
  20. 17 2月, 2012 2 次提交
  21. 21 12月, 2011 2 次提交
  22. 06 12月, 2011 1 次提交
  23. 09 10月, 2011 1 次提交
    • S
      target-alpha: Fix compilation errors for 32 bit hosts · 02d6516c
      Stefan Weil 提交于
      On i386, these errors were reported:
      
      qemu/hw/alpha_dp264.c: In function ‘clipper_init’:
      qemu/hw/alpha_dp264.c:158: error: integer constant is too large for ‘unsigned long’ type
      
      qemu/hw/alpha_typhoon.c: In function ‘typhoon_init’:
      qemu/hw/alpha_typhoon.c:737: error: integer constant is too large for ‘long’ type
      qemu/hw/alpha_typhoon.c:741: error: integer constant is too large for ‘long’ type
      qemu/hw/alpha_typhoon.c:745: error: integer constant is too large for ‘long’ type
      qemu/hw/alpha_typhoon.c:749: error: integer constant is too large for ‘long’ type
      qemu/hw/alpha_typhoon.c:757: error: integer constant is too large for ‘long’ type
      qemu/hw/alpha_typhoon.c:767: error: integer constant is too large for ‘long’ type
      qemu/hw/alpha_typhoon.c:772: error: integer constant is too large for ‘long’ type
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      02d6516c
  24. 08 10月, 2011 1 次提交