1. 05 6月, 2015 4 次提交
    • P
      kvm: accept non-mapped memory in kvm_dirty_pages_log_change · ea8cb1a8
      Paolo Bonzini 提交于
      It is okay if memory is not mapped into the guest but has dirty logging
      enabled.  When this happens, KVM will not do anything and only accesses
      from the host will be logged.
      
      This can be triggered by iofuzz.
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      ea8cb1a8
    • P
      memory: prepare for multiple bits in the dirty log mask · b2dfd71c
      Paolo Bonzini 提交于
      When the dirty log mask will also cover other bits than DIRTY_MEMORY_VGA,
      some listeners may be interested in the overall zero/non-zero value of
      the dirty log mask; others may be interested in the value of single bits.
      
      For this reason, always call log_start/log_stop if bits have respectively
      appeared or disappeared, and pass the old and new values of the dirty log
      mask so that listeners can distinguish the kinds of change.
      
      For example, KVM checks if dirty logging used to be completely disabled
      (in log_start) or is now completely disabled (in log_stop).  On the
      other hand, Xen has to check manually if DIRTY_MEMORY_VGA changed,
      since that is the only bit it cares about.
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      b2dfd71c
    • P
      memory: differentiate memory_region_is_logging and memory_region_get_dirty_log_mask · 2d1a35be
      Paolo Bonzini 提交于
      For now memory regions only track DIRTY_MEMORY_VGA individually, but
      this will change soon.  To support this, split memory_region_is_logging
      in two functions: one that returns a given bit from dirty_log_mask,
      and one that returns the entire mask.  memory_region_is_logging gets an
      extra parameter so that the compiler flags misuse.
      
      While VGA-specific users (including the Xen listener!) will want to keep
      checking that bit, KVM and vhost check for "any bit except migration"
      (because migration is handled via the global start/stop listener
      callbacks).
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      2d1a35be
    • L
      ppc: add helpful message when KVM fails to start VCPU · dae02ba5
      Laurent Vivier 提交于
      On POWER8 systems, KVM checks if VCPU is running on primary threads,
      and that secondary threads are offline. If this is not the case,
      ioctl() fails with errno set to EBUSY.
      
      QEMU aborts with a non explicit error message:
      $ ./qemu-system-ppc64 --nographic -machine pseries,accel=kvm
      error: kvm run failed Device or resource busy
      
      To help user to diagnose the problem, this patch adds an informative
      error message.
      
      There is no easy way to check if SMT is enabled before starting the VCPU,
      and as this case is the only one setting errno to EBUSY, we just check
      the errno value to display a message.
      Signed-off-by: NLaurent Vivier <lvivier@redhat.com>
      Message-Id: <1431976007-20503-1-git-send-email-lvivier@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      dae02ba5
  2. 02 6月, 2015 1 次提交
  3. 30 4月, 2015 4 次提交
  4. 28 4月, 2015 1 次提交
  5. 26 4月, 2015 1 次提交
  6. 02 4月, 2015 1 次提交
  7. 18 3月, 2015 1 次提交
  8. 16 3月, 2015 1 次提交
  9. 12 3月, 2015 2 次提交
  10. 10 3月, 2015 1 次提交
    • R
      fix GCC 5.0.0 logical-not-parentheses warnings · 8c1ac475
      Radim Krčmář 提交于
      man gcc:
        Warn about logical not used on the left hand side operand of a
        comparison.  This option does not warn if the RHS operand is of a
        boolean type.
      
      By preferring bool over int where sensible, but without modifying any
      depending code, make GCC happy in cases like this,
        qemu-img.c: In function ‘compare_sectors’:
        qemu-img.c:992:39: error: logical not is only applied to the left hand
        side of comparison [-Werror=logical-not-parentheses]
                 if (!!memcmp(buf1, buf2, 512) != res) {
      
      hw/ide/core.c:1836 doesn't throw an error,
        assert(!!s->error == !!(s->status & ERR_STAT));
      even thought the second operand is int (and first hunk of this patch has
      a very similar case), maybe GCC developers still have a little faith in
      C programmers.
      Signed-off-by: NRadim Krčmář <rkrcmar@redhat.com>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      8c1ac475
  11. 10 2月, 2015 1 次提交
  12. 12 1月, 2015 1 次提交
  13. 15 12月, 2014 3 次提交
  14. 23 11月, 2014 1 次提交
  15. 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
  16. 10 10月, 2014 1 次提交
  17. 09 10月, 2014 2 次提交
  18. 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
  19. 26 9月, 2014 1 次提交
  20. 16 9月, 2014 1 次提交
  21. 09 9月, 2014 1 次提交
  22. 08 9月, 2014 1 次提交
  23. 20 8月, 2014 1 次提交
  24. 22 7月, 2014 1 次提交
  25. 20 6月, 2014 1 次提交
  26. 19 6月, 2014 1 次提交
  27. 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
  28. 31 5月, 2014 1 次提交