1. 15 12月, 2014 1 次提交
    • E
      KVM_CAP_IRQFD and KVM_CAP_IRQFD_RESAMPLE checks · f41389ae
      Eric Auger 提交于
      Compute kvm_irqfds_allowed by checking the KVM_CAP_IRQFD extension.
      Remove direct settings in architecture specific files.
      
      Add a new kvm_resamplefds_allowed variable, initialized by
      checking the KVM_CAP_IRQFD_RESAMPLE extension. Add a corresponding
      kvm_resamplefds_enabled() function.
      
      A special notice for s390 where KVM_CAP_IRQFD was not immediatly
      advirtised when irqfd capability was introduced in the kernel.
      KVM_CAP_IRQ_ROUTING was advertised instead.
      
      This was fixed in "KVM: s390: announce irqfd capability",
      ebc3226202d5956a5963185222982d435378b899 whereas irqfd support
      was brought in 84223598778ba08041f4297fda485df83414d57e,
      "KVM: s390: irq routing for adapter interrupts".  Both commits
      first appear in 3.15 so there should not be any kernel
      version impacted by this QEMU modification.
      Signed-off-by: NEric Auger <eric.auger@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      f41389ae
  2. 23 11月, 2014 1 次提交
  3. 20 11月, 2014 1 次提交
    • A
      kvm: Fix memory slot page alignment logic · f2a64032
      Alexander Graf 提交于
      Memory slots have to be page aligned to get entered into KVM. There
      is existing logic that tries to ensure that we pad memory slots that
      are not page aligned to the biggest region that would still fit in the
      alignment requirements.
      
      Unfortunately, that logic is broken. It tries to calculate the start
      offset based on the region size.
      
      Fix up the logic to do the thing it was intended to do and document it
      properly in the comment above it.
      
      With this patch applied, I can successfully run an e500 guest with more
      than 3GB RAM (at which point RAM starts overlapping subpage memory regions).
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      f2a64032
  4. 10 10月, 2014 1 次提交
  5. 09 10月, 2014 2 次提交
  6. 04 10月, 2014 2 次提交
    • E
      accel: Rename 'init' method to 'init_machine' · 0d15da8e
      Eduardo Habkost 提交于
      Today, all accelerator init functions affect some global state:
      * tcg_init() calls tcg_exec_init() and affects globals such as tcg_tcx,
        page size globals, and possibly others;
      * kvm_init() changes the kvm_state global, cpu_interrupt_handler, and possibly
        others;
      * xen_init() changes the xen_xc global, and registers a change state handler.
      
      With the new accelerator QOM classes, initialization may now be split in two
      steps:
      * instance_init() will do basic initialization that doesn't affect any global
        state and don't need MachineState or MachineClass data. This will allow
        probing code to safely create multiple accelerator objects on the fly just
        for reporting host/accelerator capabilities, for example.
      * accel_init_machine()/init_machine() will save the accelerator object in
        MachineState, and do initialization steps which still affect global state,
        machine state, or that need data from MachineClass or MachineState.
      
      To clarify the difference between those two steps, rename init() to
      init_machine().
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0d15da8e
    • E
      accel: Move KVM accel registration to kvm-all.c · 782c3f29
      Eduardo Habkost 提交于
      Note that this has an user-visible side-effect: instead of reporting
      "KVM is not supported for this target", QEMU binaries not supporting KVM
      will report "kvm accelerator does not exist".
      
      As kvm_availble() always return 1 when CONFIG_KVM is enabled, we don't
      need to set AccelClass.available anymore. kvm_enabled() is not being
      completely removed yet only because qmp_query_kvm() still uses it.
      
      This also allows us to make kvm_init() static.
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      782c3f29
  7. 26 9月, 2014 1 次提交
  8. 16 9月, 2014 1 次提交
  9. 09 9月, 2014 1 次提交
  10. 08 9月, 2014 1 次提交
  11. 20 8月, 2014 1 次提交
  12. 22 7月, 2014 1 次提交
  13. 20 6月, 2014 1 次提交
  14. 19 6月, 2014 1 次提交
  15. 18 6月, 2014 2 次提交
    • J
      kvm: Allow arch to set sigmask length · aed6efb9
      James Hogan 提交于
      MIPS/Linux is unusual in having 128 signals rather than just 64 like
      most other architectures. This means its sigmask is 16 bytes instead of
      8, so allow arches to override the sigmask->len value passed to the
      KVM_SET_SIGNAL_MASK ioctl in kvm_set_signal_mask() by calling
      kvm_set_sigmask_len() from kvm_arch_init(). Otherwise default to 8
      bytes.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: Sanjay Lal <sanjayl@kymasys.com>
      Cc: Gleb Natapov <gleb@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      aed6efb9
    • A
      KVM: Fix GSI number space limit · 00008418
      Alexander Graf 提交于
      KVM tells us the number of GSIs it can handle inside the kernel. That value is
      basically KVM_MAX_IRQ_ROUTES. However when we try to set the GSI mapping table,
      it checks for
      
          r = -EINVAL;
          if (routing.nr >= KVM_MAX_IRQ_ROUTES)
              goto out;
      
      erroring out even when we're only using all of the GSIs. To make sure we never
      hit that limit, let's reduce the number of GSIs we get from KVM by one.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      00008418
  16. 31 5月, 2014 1 次提交
  17. 20 5月, 2014 1 次提交
  18. 13 5月, 2014 2 次提交
  19. 06 5月, 2014 1 次提交
  20. 14 4月, 2014 1 次提交
    • M
      Revert "fix return check for KVM_GET_DIRTY_LOG ioctl" · 50212d63
      Michael Tokarev 提交于
      This reverts commit b533f658.
      
      The original code was wrong, because effectively it ignored errors
      from kernel, because kernel does not return -1 on error case but
      returns -errno, and does not return -EPERM for this particular ioctl.
      But in some cases kernel actually returned unsuccessful result,
      namely, when the dirty bitmap in requested slot does not exist
      it returns -ENOENT.  With new code this condition becomes an
      error when it shouldn't be.
      
      Revert that patch instead of fixing it properly this late in the
      release process.  I disagree with this approach, but let's make
      things move _somewhere_, instead of arguing endlessly whch of
      the 2 proposed fixes is better.
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      Message-id: 1397477644-902-1-git-send-email-mjt@msgid.tls.msk.ru
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      50212d63
  21. 27 3月, 2014 1 次提交
  22. 05 3月, 2014 1 次提交
  23. 28 2月, 2014 1 次提交
  24. 27 2月, 2014 2 次提交
  25. 21 2月, 2014 1 次提交
  26. 04 2月, 2014 1 次提交
  27. 18 1月, 2014 1 次提交
  28. 15 1月, 2014 2 次提交
  29. 13 1月, 2014 3 次提交
  30. 25 11月, 2013 1 次提交
  31. 20 9月, 2013 2 次提交