1. 15 6月, 2016 8 次提交
  2. 24 5月, 2016 6 次提交
  3. 19 5月, 2016 2 次提交
  4. 18 5月, 2016 1 次提交
  5. 19 4月, 2016 1 次提交
    • E
      target-i386: Set AMD alias bits after filtering CPUID data · 9997cf7b
      Eduardo Habkost 提交于
      QEMU complains about -cpu host on an AMD machine:
        warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 0]
      For bits 0,1,3,4,5,6,7,8,9,12,13,14,15,16,17,23,24.
      
      KVM_GET_SUPPORTED_CPUID and and x86_cpu_get_migratable_flags()
      don't handle the AMD CPUID aliases bits, making
      x86_cpu_filter_features() print warnings and clear those CPUID
      bits incorrectly.
      
      To avoid hacking x86_cpu_get_migratable_flags() to handle
      CPUID_EXT2_AMD_ALIASES (just like the existing hack inside
      kvm_arch_get_supported_cpuid()), simply move the
      CPUID_EXT2_AMD_ALIASES code in x86_cpu_realizefn() after the
      x86_cpu_filter_features() call.
      
      This will probably make the CPUID_EXT2_AMD_ALIASES hack in
      kvm_arch_get_supported_cpuid() unnecessary, too. The hack will be
      removed in a follow-up patch after v2.6.0.
      Reported-by: NRadim Krčmář <rkrcmar@redhat.com>
      Tested-by: NRadim Krčmář <rkrcmar@redhat.com>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      9997cf7b
  6. 24 3月, 2016 1 次提交
  7. 23 3月, 2016 1 次提交
  8. 15 3月, 2016 1 次提交
  9. 25 2月, 2016 1 次提交
  10. 23 2月, 2016 1 次提交
  11. 15 2月, 2016 2 次提交
  12. 13 2月, 2016 3 次提交
  13. 09 2月, 2016 3 次提交
    • E
      qom: Swap 'name' next to visitor in ObjectPropertyAccessor · d7bce999
      Eric Blake 提交于
      Similar to the previous patch, it's nice to have all functions
      in the tree that involve a visitor and a name for conversion to
      or from QAPI to consistently stick the 'name' parameter next
      to the Visitor parameter.
      
      Done by manually changing include/qom/object.h and qom/object.c,
      then running this Coccinelle script and touching up the fallout
      (Coccinelle insisted on adding some trailing whitespace).
      
          @ rule1 @
          identifier fn;
          typedef Object, Visitor, Error;
          identifier obj, v, opaque, name, errp;
          @@
           void fn
          - (Object *obj, Visitor *v, void *opaque, const char *name,
          + (Object *obj, Visitor *v, const char *name, void *opaque,
             Error **errp) { ... }
      
          @@
          identifier rule1.fn;
          expression obj, v, opaque, name, errp;
          @@
           fn(obj, v,
          -   opaque, name,
          +   name, opaque,
              errp)
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <1454075341-13658-20-git-send-email-eblake@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      d7bce999
    • E
      qapi: Swap visit_* arguments for consistent 'name' placement · 51e72bc1
      Eric Blake 提交于
      JSON uses "name":value, but many of our visitor interfaces were
      called with visit_type_FOO(v, &value, name, errp).  This can be
      a bit confusing to have to mentally swap the parameter order to
      match JSON order.  It's particularly bad for visit_start_struct(),
      where the 'name' parameter is smack in the middle of the
      otherwise-related group of 'obj, kind, size' parameters! It's
      time to do a global swap of the parameter ordering, so that the
      'name' parameter is always immediately after the Visitor argument.
      
      Additional reason in favor of the swap: the existing include/qjson.h
      prefers listing 'name' first in json_prop_*(), and I have plans to
      unify that file with the qapi visitors; listing 'name' first in
      qapi will minimize churn to the (admittedly few) qjson.h clients.
      
      Later patches will then fix docs, object.h, visitor-impl.h, and
      those clients to match.
      
      Done by first patching scripts/qapi*.py by hand to make generated
      files do what I want, then by running the following Coccinelle
      script to affect the rest of the code base:
       $ spatch --sp-file script `git grep -l '\bvisit_' -- '**/*.[ch]'`
      I then had to apply some touchups (Coccinelle insisted on TAB
      indentation in visitor.h, and botched the signature of
      visit_type_enum() by rewriting 'const char *const strings[]' to
      the syntactically invalid 'const char*const[] strings').  The
      movement of parameters is sufficient to provoke compiler errors
      if any callers were missed.
      
          // Part 1: Swap declaration order
          @@
          type TV, TErr, TObj, T1, T2;
          identifier OBJ, ARG1, ARG2;
          @@
           void visit_start_struct
          -(TV v, TObj OBJ, T1 ARG1, const char *name, T2 ARG2, TErr errp)
          +(TV v, const char *name, TObj OBJ, T1 ARG1, T2 ARG2, TErr errp)
           { ... }
      
          @@
          type bool, TV, T1;
          identifier ARG1;
          @@
           bool visit_optional
          -(TV v, T1 ARG1, const char *name)
          +(TV v, const char *name, T1 ARG1)
           { ... }
      
          @@
          type TV, TErr, TObj, T1;
          identifier OBJ, ARG1;
          @@
           void visit_get_next_type
          -(TV v, TObj OBJ, T1 ARG1, const char *name, TErr errp)
          +(TV v, const char *name, TObj OBJ, T1 ARG1, TErr errp)
           { ... }
      
          @@
          type TV, TErr, TObj, T1, T2;
          identifier OBJ, ARG1, ARG2;
          @@
           void visit_type_enum
          -(TV v, TObj OBJ, T1 ARG1, T2 ARG2, const char *name, TErr errp)
          +(TV v, const char *name, TObj OBJ, T1 ARG1, T2 ARG2, TErr errp)
           { ... }
      
          @@
          type TV, TErr, TObj;
          identifier OBJ;
          identifier VISIT_TYPE =~ "^visit_type_";
          @@
           void VISIT_TYPE
          -(TV v, TObj OBJ, const char *name, TErr errp)
          +(TV v, const char *name, TObj OBJ, TErr errp)
           { ... }
      
          // Part 2: swap caller order
          @@
          expression V, NAME, OBJ, ARG1, ARG2, ERR;
          identifier VISIT_TYPE =~ "^visit_type_";
          @@
          (
          -visit_start_struct(V, OBJ, ARG1, NAME, ARG2, ERR)
          +visit_start_struct(V, NAME, OBJ, ARG1, ARG2, ERR)
          |
          -visit_optional(V, ARG1, NAME)
          +visit_optional(V, NAME, ARG1)
          |
          -visit_get_next_type(V, OBJ, ARG1, NAME, ERR)
          +visit_get_next_type(V, NAME, OBJ, ARG1, ERR)
          |
          -visit_type_enum(V, OBJ, ARG1, ARG2, NAME, ERR)
          +visit_type_enum(V, NAME, OBJ, ARG1, ARG2, ERR)
          |
          -VISIT_TYPE(V, OBJ, NAME, ERR)
          +VISIT_TYPE(V, NAME, OBJ, ERR)
          )
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <1454075341-13658-19-git-send-email-eblake@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      51e72bc1
    • E
      qom: Use typedef for Visitor · 4fa45492
      Eric Blake 提交于
      No need to repeat 'struct Visitor' when we already have it in
      typedefs.h.  Omitting the redundant 'struct' also makes a later
      patch easier to search for all object property callbacks that
      are associated with a Visitor.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <1454075341-13658-18-git-send-email-eblake@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      4fa45492
  14. 21 1月, 2016 5 次提交
  15. 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
  16. 17 12月, 2015 2 次提交
    • A
      target-i386/kvm: Hyper-V SynIC timers MSR's support · ff99aa64
      Andrey Smetanin 提交于
      Hyper-V SynIC timers are host timers that are configurable
      by guest through corresponding MSR's (HV_X64_MSR_STIMER*).
      Guest setup and use fired by host events(SynIC interrupt
      and appropriate timer expiration message) as guest clock
      events.
      
      The state of Hyper-V SynIC timers are stored in corresponding
      MSR's. This patch seria implements such MSR's support and migration.
      Signed-off-by: NAndrey Smetanin <asmetanin@virtuozzo.com>
      CC: Paolo Bonzini <pbonzini@redhat.com>
      CC: Richard Henderson <rth@twiddle.net>
      CC: Eduardo Habkost <ehabkost@redhat.com>
      CC: "Andreas Färber" <afaerber@suse.de>
      CC: Marcelo Tosatti <mtosatti@redhat.com>
      CC: Denis V. Lunev <den@openvz.org>
      CC: Roman Kagan <rkagan@virtuozzo.com>
      CC: kvm@vger.kernel.org
      
      Message-Id: <1448464885-8300-3-git-send-email-asmetanin@virtuozzo.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      ff99aa64
    • A
      target-i386/kvm: Hyper-V SynIC MSR's support · 866eea9a
      Andrey Smetanin 提交于
      This patch does Hyper-V Synthetic interrupt
      controller(Hyper-V SynIC) MSR's support and
      migration. Hyper-V SynIC is enabled by cpu's
      'hv-synic' option.
      
      This patch does not allow cpu creation if
      'hv-synic' option specified but kernel
      doesn't support Hyper-V SynIC.
      
      Changes v3:
      * removed 'msr_hv_synic_version' migration because
      it's value always the same
      * moved SynIC msr's initialization into kvm_arch_init_vcpu
      Signed-off-by: NAndrey Smetanin <asmetanin@virtuozzo.com>
      Reviewed-by: NRoman Kagan <rkagan@virtuozzo.com>
      Signed-off-by: NDenis V. Lunev <den@openvz.org>
      CC: Paolo Bonzini <pbonzini@redhat.com>
      CC: Richard Henderson <rth@twiddle.net>
      CC: Eduardo Habkost <ehabkost@redhat.com>
      CC: "Andreas Färber" <afaerber@suse.de>
      CC: Marcelo Tosatti <mtosatti@redhat.com>
      CC: Roman Kagan <rkagan@virtuozzo.com>
      CC: Denis V. Lunev <den@openvz.org>
      CC: kvm@vger.kernel.org
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      866eea9a
  17. 18 11月, 2015 1 次提交
    • E
      target-i386: Disable rdtscp on Opteron_G* CPU models · 33b5e8c0
      Eduardo Habkost 提交于
      KVM can't virtualize rdtscp on AMD CPUs yet, so there's no point
      in enabling it by default on AMD CPU models, as all we are
      getting are confused users because of the "host doesn't support
      requested feature" warnings.
      
      Disable rdtscp on Opteron_G* models, but keep compatibility on
      pc-*-2.4 and older (just in case there are people are doing funny
      stuff using AMD CPU models on Intel hosts).
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      33b5e8c0