1. 11 9月, 2012 2 次提交
    • A
      Merge remote-tracking branch 'qemu-kvm/uq/master' into staging · 6a38e0dc
      Anthony Liguori 提交于
      * qemu-kvm/uq/master:
        kvm: i386: Add classic PCI device assignment
        kvm: i386: Add services required for PCI device assignment
        kvm: Introduce kvm_has_intx_set_mask
        kvm: Introduce kvm_irqchip_update_msi_route
        kvm: Clean up irqfd API
        qemu: Use valgrind annotations to mark kvm guest memory as defined
      6a38e0dc
    • A
      Merge remote-tracking branch 'mst/tags/for_anthony' into staging · 14df77a6
      Anthony Liguori 提交于
      * mst/tags/for_anthony:
        vhost: Pass device path to vhost_dev_init()
        monitor: Rename+move net_handle_fd_param -> monitor_handle_fd_param
        pcie_aer: clear cmask for Advanced Error Interrupt Message Number
        pcie: drop version_id field for live migration
        qemu: add .exrc
      14df77a6
  2. 10 9月, 2012 23 次提交
  3. 09 9月, 2012 2 次提交
    • J
      kvm: Clean up irqfd API · b131c74a
      Jan Kiszka 提交于
      No need to expose the fd-based interface, everyone will already be fine
      with the more handy EventNotifier variant. Rename the latter to clarify
      that we are still talking about irqfds here.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Acked-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      b131c74a
    • C
      qemu: Use valgrind annotations to mark kvm guest memory as defined · 62fe8331
      Christian Borntraeger 提交于
      valgrind with kvm produces a big amount of false positives regarding
      "Conditional jump or move depends on uninitialised value(s)". This
      happens because the guest memory is allocated with qemu_vmalloc which
      boils down posix_memalign etc. This function is (correctly) considered
      by valgrind as returning undefined memory.
      
      Since valgrind is based on jitting code, it will not be able to see
      changes made by the guest to guest memory if this is done by KVM_RUN,
      thus keeping most of the guest memory undefined.
      
      Now lots of places in qemu will then use guest memory to change behaviour.
      To avoid the flood of these messages, lets declare the whole guest
      memory as defined. This will reduce the noise and allows us to see real
      problems.
      
      In the future we might want to make this conditional, since there
      is actually something that we can use those false positives for:
      These messages will point to code that depends on guest memory, so
      we can use these backtraces to actually make an audit that is focussed
      only at those code places. For normal development we dont want to
      see those messages, though.
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      62fe8331
  4. 08 9月, 2012 6 次提交
    • J
      musicpal: Fix flash mapping · 0c267217
      Jan Kiszka 提交于
      The old arithmetic assumed 32 physical address bits which is no longer
      true for ARM since 3cc0cd61.
      Signed-off-by: NJan Kiszka <jan.kiszka@web.de>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      0c267217
    • F
      Add MAINTAINERS entry for leon3 · ce6c760c
      Fabien Chouteau 提交于
      Signed-off-by: NFabien Chouteau <chouteau@adacore.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      ce6c760c
    • A
      target-sparc: fix fcmp{s,d,q} instructions wrt exception · 5acfc832
      Aurelien Jarno 提交于
      fcmp{s,d,q} instructions are supposed to ignore quiet NaN (contrary to
      the fcmpe{s,d,q} instructions), but the current code is wrongly setting
      the NV exception in that case. Moreover the current code is duplicated:
      first the arguments are checked for NaN to generate an exception, and
      later in case the comparison is unordered (which can only happens if one
      of the argument is a NaN), the same check is done to generate an
      exception.
      
      Fix that by calling clear_float_exceptions() followed by
      check_ieee_exceptions() as for the other floating point instructions.
      Use the _compare_quiet functions for fcmp{s,d,q} and the _compare ones
      for fcmpe{s,d,q}. Simplify the flag setting by not clearing a flag that
      is set the line just below.
      
      This fix allows the math glibc testsuite to pass.
      
      Cc: Blue Swirl <blauwirbel@gmail.com>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      5acfc832
    • M
      target-xtensa: fix missing errno codes for mingw32 · c29b1bee
      Max Filippov 提交于
      Put the following errno value mappings under #ifdef:
      
      xtensa-semi.c: In function 'errno_h2g':
      xtensa-semi.c:113: error: 'ENOTBLK' undeclared (first use in this function)
      xtensa-semi.c:113: error: (Each undeclared identifier is reported only once
      xtensa-semi.c:113: error: for each function it appears in.)
      xtensa-semi.c:113: error: array index in initializer not of integer type
      xtensa-semi.c:113: error: (near initialization for 'guest_errno')
      xtensa-semi.c:124: error: 'ETXTBSY' undeclared (first use in this function)
      xtensa-semi.c:124: error: array index in initializer not of integer type
      xtensa-semi.c:124: error: (near initialization for 'guest_errno')
      xtensa-semi.c:134: error: 'ELOOP' undeclared (first use in this function)
      xtensa-semi.c:134: error: array index in initializer not of integer type
      xtensa-semi.c:134: error: (near initialization for 'guest_errno')
      Signed-off-by: NMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      c29b1bee
    • S
      target-cris: Fix buffer overflow · c001ed15
      Stefan Weil 提交于
      Report from smatch:
      
      target-cris/translate.c:3464 cpu_dump_state(32) error:
       buffer overflow 'env->sregs' 4 <= 255
      
      sregs is declared 'uint32_t sregs[4][16]', so the first index must be
      less than 4 or ARRAY_SIZE(env->sregs).
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      c001ed15
    • M
      MIPS/user: Fix reset CPU state initialization · 03e6e501
      Maciej W. Rozycki 提交于
       This change updates the CPU reset sequence to use a common piece of code
      that figures out CPU state flags, fixing the problem with MIPS_HFLAG_COP1X
      not being set where applicable that causes floating-point MADD family
      instructions (and other instructions from the MIPS IV FP subset) to trap.
      
       As compute_hflags is now shared between op_helper.c and translate.c, the
      function is now moved to a common header.  There are no changes to this
      function.
      
       The problem was seen with the 24Kf MIPS32r2 processor in user emulation.
      The new approach prevents system and user emulation from diverging -- all
      the hflags state is initialized in one place now.
      Signed-off-by: NMaciej W. Rozycki <macro@codesourcery.com>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      03e6e501
  5. 07 9月, 2012 7 次提交
    • A
      lan9118: fix multicast filtering · 449bc90e
      Aurelien Jarno 提交于
      The lan9118 emulation tries to compute the multicast index by calling
      directly the crc32() function from zlib, but fails to get the correct
      result.
      
      Use the common compute_mcast_idx() function instead, which gives the
      correct result. This fixes IPv6 support.
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      449bc90e
    • H
      fix entry pointer for ELF kernels loaded with -kernel option · 7e9c7ffe
      Henning Schild 提交于
       Find a hopefully proper patch attached. Take it or leave it.
      Reviewed-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NHenning Schild <henning@hennsch.de>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      7e9c7ffe
    • S
      vhost: Pass device path to vhost_dev_init() · 1241ed94
      Stefan Hajnoczi 提交于
      The path to /dev/vhost-net is currently hardcoded in vhost_dev_init().
      This needs to be changed so that /dev/vhost-scsi can be used.  Pass in
      the device path instead of hardcoding it.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      1241ed94
    • N
      monitor: Rename+move net_handle_fd_param -> monitor_handle_fd_param · a96ed02f
      Nicholas Bellinger 提交于
      This patch renames+moves the net_handle_fd_param() caller used to
      obtain a file descriptor from either qemu_parse_fd() (the normal case)
      or from monitor_get_fd() (migration case) into a generically prefixed
      monitor_handle_fd_param() to be used by vhost-scsi code.
      
      Also update net/[socket,tap].c consumers to use the new prefix.
      Reported-by: NMichael S. Tsirkin <mst@redhat.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Anthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      a96ed02f
    • J
      pcie_aer: clear cmask for Advanced Error Interrupt Message Number · 0e180d9c
      Jason Baron 提交于
      The Advanced Error Interrupt Message Number (bits 31:27 of the Root
      Error Status Register) is updated when the number of msi messages assigned to a
      device changes. Migration of windows 7 on q35 chipset failed because the check
      in get_pci_config_device() fails due to cmask being set on these bits. Its valid
      to update these bits and we must restore this state across migration.
      Signed-off-by: NJason Baron <jbaron@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      0e180d9c
    • J
      pcie: drop version_id field for live migration · 1de53459
      Jason Baron 提交于
      While testing q35 live migration, I found that the migration would abort with
      the following error: "Unknown savevm section type 76".
      
      The error is due to this check failing in 'vmstate_load_state()':
      
          while(field->name) {
              if ((field->field_exists &&
                   field->field_exists(opaque, version_id)) ||
                  (!field->field_exists &&
                   field->version_id <= version_id)) {
      
      The VMSTATE_PCIE_DEVICE() currently has a 'version_id' set to 2. However,
      'version_id' in the above check is 1. And thus we fail to load the pcie device
      field. Further the code returns to 'qemu_loadvm_state()' which produces the
      error that I saw.
      
      I'm proposing to fix this by simply dropping the 'version_id' field from
      VMSTATE_PCIE_DEVICE(). VMSTATE_PCI_DEVICE() defines no such field and further
      the vmstate_pcie_device that VMSTATE_PCI_DEVICE() refers to is already
      versioned. Thus, any versioning issues could be detected at the vmsd level.
      
      Taking a step back, I think that the 'field->version_id' should be compared
      against a saved version number for the field not the 'version_id'. Futhermore,
      once vmstate_load_state() is called recursively on another vmsd, the check of:
      
          if (version_id > vmsd->version_id) {
              return -EINVAL;
          }
      
      Will never fail since version_id is always equal to vmsd->version_id. So I'm
      wondering why we aren't storing the vmsd version id of the source in the
      migration stream?
      
      This patch also renames the 'name' field of vmstate_pcie_device from:
      PCIDevice -> PCIEDevice to differentiate it from vmstate_pci_device.
      Signed-off-by: NJason Baron <jbaron@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      1de53459
    • M
      qemu: add .exrc · 692e587f
      Michael S. Tsirkin 提交于
      I've been using this to get correct indenting with vim
      in qemu for a while, but it's a bit easier if we
      put the settings in the central place.
      Note that
      1. you still need to enable 'exrc' and 'secure'
         options in your vimrc for these settings to take effect.
      2. you can create a .vimrc file if 'exrc' is on but there's
         need to bypass this configuration.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      692e587f