1. 08 3月, 2019 1 次提交
  2. 05 2月, 2019 1 次提交
  3. 11 1月, 2019 1 次提交
    • P
      avoid TABs in files that only contain a few · 7d37435b
      Paolo Bonzini 提交于
      Most files that have TABs only contain a handful of them.  Change
      them to spaces so that we don't confuse people.
      
      disas, standard-headers, linux-headers and libdecnumber are imported
      from other projects and probably should be exempted from the check.
      Outside those, after this patch the following files still contain both
      8-space and TAB sequences at the beginning of the line.  Many of them
      have a majority of TABs, or were initially committed with all tabs.
      
          bsd-user/i386/target_syscall.h
          bsd-user/x86_64/target_syscall.h
          crypto/aes.c
          hw/audio/fmopl.c
          hw/audio/fmopl.h
          hw/block/tc58128.c
          hw/display/cirrus_vga.c
          hw/display/xenfb.c
          hw/dma/etraxfs_dma.c
          hw/intc/sh_intc.c
          hw/misc/mst_fpga.c
          hw/net/pcnet.c
          hw/sh4/sh7750.c
          hw/timer/m48t59.c
          hw/timer/sh_timer.c
          include/crypto/aes.h
          include/disas/bfd.h
          include/hw/sh4/sh.h
          libdecnumber/decNumber.c
          linux-headers/asm-generic/unistd.h
          linux-headers/linux/kvm.h
          linux-user/alpha/target_syscall.h
          linux-user/arm/nwfpe/double_cpdo.c
          linux-user/arm/nwfpe/fpa11_cpdt.c
          linux-user/arm/nwfpe/fpa11_cprt.c
          linux-user/arm/nwfpe/fpa11.h
          linux-user/flat.h
          linux-user/flatload.c
          linux-user/i386/target_syscall.h
          linux-user/ppc/target_syscall.h
          linux-user/sparc/target_syscall.h
          linux-user/syscall.c
          linux-user/syscall_defs.h
          linux-user/x86_64/target_syscall.h
          slirp/cksum.c
          slirp/if.c
          slirp/ip.h
          slirp/ip_icmp.c
          slirp/ip_icmp.h
          slirp/ip_input.c
          slirp/ip_output.c
          slirp/mbuf.c
          slirp/misc.c
          slirp/sbuf.c
          slirp/socket.c
          slirp/socket.h
          slirp/tcp_input.c
          slirp/tcpip.h
          slirp/tcp_output.c
          slirp/tcp_subr.c
          slirp/tcp_timer.c
          slirp/tftp.c
          slirp/udp.c
          slirp/udp.h
          target/cris/cpu.h
          target/cris/mmu.c
          target/cris/op_helper.c
          target/sh4/helper.c
          target/sh4/op_helper.c
          target/sh4/translate.c
          tcg/sparc/tcg-target.inc.c
          tests/tcg/cris/check_addo.c
          tests/tcg/cris/check_moveq.c
          tests/tcg/cris/check_swap.c
          tests/tcg/multiarch/test-mmap.c
          ui/vnc-enc-hextile-template.h
          ui/vnc-enc-zywrle.h
          util/envlist.c
          util/readline.c
      
      The following have only TABs:
      
          bsd-user/i386/target_signal.h
          bsd-user/sparc64/target_signal.h
          bsd-user/sparc64/target_syscall.h
          bsd-user/sparc/target_signal.h
          bsd-user/sparc/target_syscall.h
          bsd-user/x86_64/target_signal.h
          crypto/desrfb.c
          hw/audio/intel-hda-defs.h
          hw/core/uboot_image.h
          hw/sh4/sh7750_regnames.c
          hw/sh4/sh7750_regs.h
          include/hw/cris/etraxfs_dma.h
          linux-user/alpha/termbits.h
          linux-user/arm/nwfpe/fpopcode.h
          linux-user/arm/nwfpe/fpsr.h
          linux-user/arm/syscall_nr.h
          linux-user/arm/target_signal.h
          linux-user/cris/target_signal.h
          linux-user/i386/target_signal.h
          linux-user/linux_loop.h
          linux-user/m68k/target_signal.h
          linux-user/microblaze/target_signal.h
          linux-user/mips64/target_signal.h
          linux-user/mips/target_signal.h
          linux-user/mips/target_syscall.h
          linux-user/mips/termbits.h
          linux-user/ppc/target_signal.h
          linux-user/sh4/target_signal.h
          linux-user/sh4/termbits.h
          linux-user/sparc64/target_syscall.h
          linux-user/sparc/target_signal.h
          linux-user/x86_64/target_signal.h
          linux-user/x86_64/termbits.h
          pc-bios/optionrom/optionrom.h
          slirp/mbuf.h
          slirp/misc.h
          slirp/sbuf.h
          slirp/tcp.h
          slirp/tcp_timer.h
          slirp/tcp_var.h
          target/i386/svm.h
          target/sparc/asi.h
          target/xtensa/core-dc232b/xtensa-modules.inc.c
          target/xtensa/core-dc233c/xtensa-modules.inc.c
          target/xtensa/core-de212/core-isa.h
          target/xtensa/core-de212/xtensa-modules.inc.c
          target/xtensa/core-fsf/xtensa-modules.inc.c
          target/xtensa/core-sample_controller/core-isa.h
          target/xtensa/core-sample_controller/xtensa-modules.inc.c
          target/xtensa/core-test_kc705_be/core-isa.h
          target/xtensa/core-test_kc705_be/xtensa-modules.inc.c
          tests/tcg/cris/check_abs.c
          tests/tcg/cris/check_addc.c
          tests/tcg/cris/check_addcm.c
          tests/tcg/cris/check_addoq.c
          tests/tcg/cris/check_bound.c
          tests/tcg/cris/check_ftag.c
          tests/tcg/cris/check_int64.c
          tests/tcg/cris/check_lz.c
          tests/tcg/cris/check_openpf5.c
          tests/tcg/cris/check_sigalrm.c
          tests/tcg/cris/crisutils.h
          tests/tcg/cris/sys.c
          tests/tcg/i386/test-i386-ssse3.c
          ui/vgafont.h
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Message-Id: <20181213223737.11793-3-pbonzini@redhat.com>
      Reviewed-by: NAleksandar Markovic <amarkovic@wavecomp.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NWainer dos Santos Moschetta <wainersm@redhat.com>
      Acked-by: NRichard Henderson <richard.henderson@linaro.org>
      Acked-by: NEric Blake <eblake@redhat.com>
      Acked-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NStefan Markovic <smarkovic@wavecomp.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7d37435b
  4. 02 7月, 2018 1 次提交
  5. 01 6月, 2018 1 次提交
  6. 26 4月, 2018 1 次提交
  7. 27 10月, 2017 1 次提交
  8. 19 9月, 2017 1 次提交
  9. 01 9月, 2017 1 次提交
  10. 15 7月, 2017 2 次提交
  11. 23 5月, 2017 1 次提交
    • 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
  12. 24 4月, 2017 1 次提交
  13. 21 2月, 2017 1 次提交
    • M
      hw: Default -drive to if=ide explicitly where it works · 2059839b
      Markus Armbruster 提交于
      Block backends defined with -drive if=ide are meant to be picked up by
      machine initialization code: a suitable frontend gets created and
      wired up automatically.
      
      if=ide drives not picked up that way can still be used with -device as
      if they had if=none, but that's unclean and best avoided.  Unused ones
      produce an "Orphaned drive without device" warning.
      
      -drive parameter "if" is optional, and the default depends on the
      machine type.  If a machine type doesn't specify a default, the
      default is "ide".
      
      Many machine types default to if=ide, even though they don't actually
      have an IDE controller.  A future patch will change these defaults to
      something more sensible.  To prepare for it, this patch makes default
      "ide" explicit for the machines that actually pick up if=ide drives:
      
      * alpha: clipper
      * arm/aarch64: spitz borzoi terrier tosa
      * i386/x86_64: generic-pc-machine (with concrete subtypes pc-q35-*
        pc-i440fx-* pc-* isapc xenfv)
      * mips64el: fulong2e
      * mips/mipsel/mips64el: malta mips
      * ppc/ppc64: mac99 g3beige prep
      * sh4/sh4eb: r2d
      * sparc64: sun4u sun4v
      
      Note that ppc64 machine powernv already sets an "ide" default
      explicitly.  Its IDE controller isn't implemented, yet.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Message-Id: <1487153147-11530-2-git-send-email-armbru@redhat.com>
      2059839b
  14. 23 3月, 2016 2 次提交
    • P
      hw: explicitly include qemu-common.h and cpu.h · 4771d756
      Paolo Bonzini 提交于
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      4771d756
    • M
      include/qemu/osdep.h: Don't include qapi/error.h · da34e65c
      Markus Armbruster 提交于
      Commit 57cb38b3 included qapi/error.h into qemu/osdep.h to get the
      Error typedef.  Since then, we've moved to include qemu/osdep.h
      everywhere.  Its file comment explains: "To avoid getting into
      possible circular include dependencies, this file should not include
      any other QEMU headers, with the exceptions of config-host.h,
      compiler.h, os-posix.h and os-win32.h, all of which are doing a
      similar job to this file and are under similar constraints."
      qapi/error.h doesn't do a similar job, and it doesn't adhere to
      similar constraints: it includes qapi-types.h.  That's in excess of
      100KiB of crap most .c files don't actually need.
      
      Add the typedef to qemu/typedefs.h, and include that instead of
      qapi/error.h.  Include qapi/error.h in .c files that need it and don't
      get it now.  Include qapi-types.h in qom/object.h for uint16List.
      
      Update scripts/clean-includes accordingly.  Update it further to match
      reality: replace config.h by config-target.h, add sysemu/os-posix.h,
      sysemu/os-win32.h.  Update the list of includes in the qemu/osdep.h
      comment quoted above similarly.
      
      This reduces the number of objects depending on qapi/error.h from "all
      of them" to less than a third.  Unfortunately, the number depending on
      qapi-types.h shrinks only a little.  More work is needed for that one.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      [Fix compilation without the spice devel packages. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      da34e65c
  15. 29 1月, 2016 1 次提交
    • P
      sh4: Clean up includes · 9d4c9946
      Peter Maydell 提交于
      Clean up includes so that osdep.h is included first and headers
      which it implies are not included manually.
      
      This commit was created with scripts/clean-includes.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1453832250-766-28-git-send-email-peter.maydell@linaro.org
      9d4c9946
  16. 19 9月, 2015 1 次提交
  17. 18 9月, 2015 1 次提交
    • M
      Fix bad error handling after memory_region_init_ram() · f8ed85ac
      Markus Armbruster 提交于
      Symptom:
      
          $ qemu-system-x86_64 -m 10000000
          Unexpected error in ram_block_add() at /work/armbru/qemu/exec.c:1456:
          upstream-qemu: cannot set up guest memory 'pc.ram': Cannot allocate memory
          Aborted (core dumped)
      
      Root cause: commit ef701d7b screwed up handling of out-of-memory
      conditions.  Before the commit, we report the error and exit(1), in
      one place, ram_block_add().  The commit lifts the error handling up
      the call chain some, to three places.  Fine.  Except it uses
      &error_abort in these places, changing the behavior from exit(1) to
      abort(), and thus undoing the work of commit 39228250 "exec: Don't
      abort when we can't allocate guest memory".
      
      The three places are:
      
      * memory_region_init_ram()
      
        Commit 49946538 (right after commit ef701d7b) lifted the error
        handling further, through memory_region_init_ram(), multiplying the
        incorrect use of &error_abort.  Later on, imitation of existing
        (bad) code may have created more.
      
      * memory_region_init_ram_ptr()
      
        The &error_abort is still there.
      
      * memory_region_init_rom_device()
      
        Doesn't need fixing, because commit 33e0eb52 (soon after commit
        ef701d7b) lifted the error handling further, and in the process
        changed it from &error_abort to passing it up the call chain.
        Correct, because the callers are realize() methods.
      
      Fix the error handling after memory_region_init_ram() with a
      Coccinelle semantic patch:
      
          @r@
          expression mr, owner, name, size, err;
          position p;
          @@
                  memory_region_init_ram(mr, owner, name, size,
          (
          -                              &error_abort
          +                              &error_fatal
          |
                                         err@p
          )
                                        );
          @script:python@
              p << r.p;
          @@
          print "%s:%s:%s" % (p[0].file, p[0].line, p[0].column)
      
      When the last argument is &error_abort, it gets replaced by
      &error_fatal.  This is the fix.
      
      If the last argument is anything else, its position is reported.  This
      lets us check the fix is complete.  Four positions get reported:
      
      * ram_backend_memory_alloc()
      
        Error is passed up the call chain, ultimately through
        user_creatable_complete().  As far as I can tell, it's callers all
        handle the error sanely.
      
      * fsl_imx25_realize(), fsl_imx31_realize(), dp8393x_realize()
      
        DeviceClass.realize() methods, errors handled sanely further up the
        call chain.
      
      We're good.  Test case again behaves:
      
          $ qemu-system-x86_64 -m 10000000
          qemu-system-x86_64: cannot set up guest memory 'pc.ram': Cannot allocate memory
          [Exit 1 ]
      
      The next commits will repair the rest of commit ef701d7b's damage.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1441983105-26376-3-git-send-email-armbru@redhat.com>
      Reviewed-by: NPeter Crosthwaite <crosthwaite.peter@gmail.com>
      f8ed85ac
  18. 14 9月, 2015 1 次提交
  19. 12 6月, 2015 1 次提交
  20. 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
  21. 18 2月, 2015 1 次提交
  22. 20 10月, 2014 2 次提交
  23. 09 9月, 2014 1 次提交
  24. 28 5月, 2014 1 次提交
  25. 11 2月, 2014 2 次提交
  26. 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
  27. 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
  28. 04 7月, 2013 1 次提交
  29. 15 4月, 2013 1 次提交
  30. 13 4月, 2013 1 次提交
  31. 09 4月, 2013 2 次提交
  32. 01 3月, 2013 2 次提交
  33. 01 2月, 2013 1 次提交
  34. 22 1月, 2013 1 次提交