1. 05 2月, 2016 1 次提交
  2. 03 2月, 2016 1 次提交
  3. 18 12月, 2015 1 次提交
    • P
      kvm: x86: add support for KVM_CAP_SPLIT_IRQCHIP · 15eafc2e
      Paolo Bonzini 提交于
      This patch adds support for split IRQ chip mode. When
      KVM_CAP_SPLIT_IRQCHIP is enabled:
      
          1.) The PIC, PIT, and IOAPIC are implemented in userspace while
          the LAPIC is implemented by KVM.
      
          2.) The software IOAPIC delivers interrupts to the KVM LAPIC via
          kvm_set_irq. Interrupt delivery is configured via the MSI routing
          table, for which routes are reserved in target-i386/kvm.c then
          configured in hw/intc/ioapic.c
      
          3.) KVM delivers IOAPIC EOIs via a new exit KVM_EXIT_IOAPIC_EOI,
          which is handled in target-i386/kvm.c and relayed to the software
          IOAPIC via ioapic_eoi_broadcast.
      Signed-off-by: NMatt Gingell <gingell@google.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      15eafc2e
  4. 02 12月, 2015 1 次提交
  5. 12 11月, 2015 1 次提交
    • A
      monitor/target-ppc: Define target_get_monitor_def · 0a9516c2
      Alexey Kardashevskiy 提交于
      At the moment get_monitor_def() returns only registers from statically
      defined monitor_defs array. However there is a lot of BOOK3S SPRs
      which are not in the list and cannot be printed from the monitor.
      
      This adds a new target platform hook - target_get_monitor_def().
      The hook is called if a register was not found in the static
      array returned by the target_monitor_defs() hook.
      
      The hook is only defined for POWERPC, it returns registered
      SPRs and fails on unregistered ones providing the user with information
      on what is actually supported on the running CPU. The register value is
      saved as uint64_t as it is the biggest supported register size;
      target_ulong cannot be used because of the stub - it is in a "common"
      code and cannot include "cpu.h", etc; this is also why the hook prototype
      is redefined in the stub instead of being included from some header.
      
      This replaces static descriptors for GPRs, FPRs, SRs with a helper which
      looks for a value in a corresponding array in the CPUPPCState.
      The immediate effect is that all 32 SRs can be printed now (instead of 16);
      later this can be reused for VSX or TM registers.
      
      This replaces callbacks for MSR and XER with static descriptors in
      monitor_defs as they are stored in CPUPPCState.
      
      While we are here, this adds "cr" as a synonym of "ccr".
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      0a9516c2
  6. 06 11月, 2015 4 次提交
  7. 05 11月, 2015 1 次提交
  8. 22 10月, 2015 1 次提交
  9. 19 10月, 2015 5 次提交
  10. 16 9月, 2015 1 次提交
  11. 01 7月, 2015 1 次提交
    • P
      main-loop: introduce qemu_mutex_iothread_locked · afbe7053
      Paolo Bonzini 提交于
      This function will be used to avoid recursive locking of the iothread lock
      whenever address_space_rw/ld*/st* are called with the BQL held, which is
      almost always the case.
      
      Tracking whether the iothread is owned is very cheap (just use a TLS
      variable) but requires some care because now the lock must always be
      taken with qemu_mutex_lock_iothread().  Previously this wasn't the case.
      Outside TCG mode this is not a problem.  In TCG mode, we need to be
      careful and avoid the "prod out of compiled code" step if already
      in a VCPU thread.  This is easily done with a check on current_cpu,
      i.e. qemu_in_vcpu_thread().
      
      Hopefully, multithreaded TCG will get rid of the whole logic to kick
      VCPUs whenever an I/O event occurs!
      
      Cc: Frederic Konrad <fred.konrad@greensocs.com>
      Message-Id: <1434646046-27150-3-git-send-email-pbonzini@redhat.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      afbe7053
  12. 23 6月, 2015 3 次提交
  13. 12 6月, 2015 3 次提交
  14. 02 6月, 2015 1 次提交
  15. 05 3月, 2015 1 次提交
  16. 01 3月, 2015 1 次提交
  17. 10 2月, 2015 1 次提交
  18. 20 10月, 2014 1 次提交
  19. 25 9月, 2014 1 次提交
    • M
      block: Keep DriveInfo alive until BlockDriverState dies · 3ae59580
      Markus Armbruster 提交于
      If the BDS's refcnt > 0, drive_del() destroys the DriveInfo, but not
      the BDS.  This can happen in three places:
      
      * Device model destruction during unplug: blockdev_auto_del()
      
      * Xen IDE unplug: pci_piix3_xen_ide_unplug()
      
      * drive_del command when no device model is attached: do_drive_del()
      
      The other callers of drive_del are on error paths where refcnt == 1.
      
      If the user somehow manages to plug in a device model using a BDS that
      has gone through drive_del(), the legacy configuration passed in
      DriveInfo doesn't reach the device model, and automatic deletion on
      unplug doesn't work.  Worse, some device models such as scsi-disk
      crash when DriveInfo doesn't exist.
      
      This is theoretical; I didn't research an actual reproducer. The problem
      was introduced when we replaced DriveInfo reference counting by BDS
      reference counting in commit a94a3fac..fa510ebf.
      
      Fix by keeping DriveInfo alive until its BDS dies.
      
      This affects qemu_drive_opts: now you can't reuse the same ID for new
      drive options until the BDS dies.  Before, you could, but since the
      code always attempts to create a BDS with the same ID next, the
      enclosing operation "create a new drive" failed anyway.  Different
      error path, same result.
      
      Unfortunately, the fix involves use of blockdev.c stuff from block.c,
      which is a layering violation.  Fortunately, my forthcoming
      BlockBackend work will get rid of it again.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NBenoît Canet <benoit.canet@nodalink.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      3ae59580
  20. 19 8月, 2014 1 次提交
  21. 06 8月, 2014 1 次提交
    • P
      backends: Introduce chr-testdev · 5692399f
      Paolo Bonzini 提交于
      From: Paolo Bonzini <pbonzini@redhat.com>
      
      chr-testdev enables a virtio serial channel to be used for guest
      initiated qemu exits. hw/misc/debugexit already enables guest
      initiated qemu exits, but only for PC targets. chr-testdev supports
      any virtio-capable target. kvm-unit-tests/arm is already making use
      of this backend.
      
      Currently there is a single command implemented, "q".  It takes a
      (prefix) argument for the exit code, thus an exit is implemented by
      writing, e.g. "1q", to the virtio-serial port.
      
      It can be used as:
         $QEMU ... \
           -device virtio-serial-device \
           -device virtserialport,chardev=ctd -chardev testdev,id=ctd
      
      or, use:
         $QEMU ... \
           -device virtio-serial-device \
           -device virtconsole,chardev=ctd -chardev testdev,id=ctd
      
      to bind it to virtio-serial port0.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAndrew Jones <drjones@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      5692399f
  22. 23 6月, 2014 4 次提交
  23. 19 6月, 2014 3 次提交
  24. 16 6月, 2014 1 次提交