1. 12 9月, 2012 1 次提交
  2. 10 9月, 2012 2 次提交
  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. 09 8月, 2012 7 次提交
  5. 12 7月, 2012 2 次提交
  6. 11 7月, 2012 1 次提交
  7. 30 6月, 2012 1 次提交
  8. 15 6月, 2012 1 次提交
  9. 06 6月, 2012 1 次提交
  10. 22 5月, 2012 5 次提交
  11. 17 5月, 2012 4 次提交
  12. 10 5月, 2012 1 次提交
  13. 13 4月, 2012 3 次提交
  14. 15 3月, 2012 2 次提交
    • D
      kvm: Comparison with ioctl number macros needs to be unsigned · 92e4b519
      David Gibson 提交于
      In kvm-all.c we store an ioctl cmd number in the irqchip_inject_ioctl field
      of KVMState, which has type 'int'.  This seems to make sense since the
      ioctl() man page says that the cmd parameter has type int.
      
      However, the kernel treats ioctl numbers as unsigned - sys_ioctl() takes an
      unsigned int, and the macros which generate ioctl numbers expand to
      unsigned expressions.  Furthermore, some ioctls (IOC_READ ioctls on x86
      and IOC_WRITE ioctls on powerpc) have bit 31 set, and so would be negative
      if interpreted as an int. This has the surprising and compile-breaking
      consequence that in kvm_irqchip_set_irq() where we do:
          return (s->irqchip_inject_ioctl == KVM_IRQ_LINE) ? 1 : event.status;
      We will get a "comparison is always false due to limited range of data
      type" warning from gcc if KVM_IRQ_LINE is one of the bit-31-set ioctls,
      which it is on powerpc.
      
      So, despite the fact that the man page and posix say ioctl numbers are
      signed, they're actually unsigned.  The kernel uses unsigned, the glibc
      header uses unsigned long, and FreeBSD, NetBSD and OSX also use unsigned
      long ioctl numbers in the code.
      
      Therefore, this patch changes the variable to be unsigned, fixing the
      compile.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      92e4b519
    • A
      Rename CPUState -> CPUArchState · 9349b4f9
      Andreas Färber 提交于
      Scripted conversion:
        for file in *.[hc] hw/*.[hc] hw/kvm/*.[hc] linux-user/*.[hc] linux-user/m68k/*.[hc] bsd-user/*.[hc] darwin-user/*.[hc] tcg/*/*.[hc] target-*/cpu.h; do
          sed -i "s/CPUState/CPUArchState/g" $file
        done
      
      All occurrences of CPUArchState are expected to be replaced by QOM CPUState,
      once all targets are QOM'ified and common fields have been extracted.
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com>
      9349b4f9
  15. 08 3月, 2012 1 次提交
  16. 07 3月, 2012 2 次提交
  17. 01 3月, 2012 1 次提交
    • A
      kvm: fix unaligned slots · 8f6f962b
      Avi Kivity 提交于
      kvm_set_phys_mem() may be passed sections that are not aligned to a page
      boundary.  The current code simply brute-forces the alignment which leads
      to an inconsistency and an abort().
      
      Fix by aligning the start and the end of the section correctly, discarding
      and unaligned head or tail.
      
      This was triggered by a guest sizing a 64-bit BAR that is smaller than a page
      with PCI_COMMAND_MEMORY enabled and the upper dword clear.
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      8f6f962b
  18. 29 2月, 2012 3 次提交