1. 29 6月, 2016 4 次提交
  2. 24 6月, 2016 1 次提交
  3. 07 6月, 2016 3 次提交
  4. 19 5月, 2016 1 次提交
  5. 23 3月, 2016 1 次提交
  6. 11 3月, 2016 1 次提交
  7. 25 2月, 2016 1 次提交
  8. 09 2月, 2016 2 次提交
    • 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
  9. 29 1月, 2016 1 次提交
    • P
      x86: Clean up includes · b6a0aa05
      Peter Maydell 提交于
      Clean up includes so that osdep.h is included first and headers
      which it implies are not included manually.
      
      This commit was created with scripts/clean-includes.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1453832250-766-11-git-send-email-peter.maydell@linaro.org
      b6a0aa05
  10. 13 1月, 2016 2 次提交
    • M
      isa: Clean up error handling around isa_bus_new() · d10e5432
      Markus Armbruster 提交于
      We can have at most one ISA bus.  If you try to create another one,
      isa_bus_new() complains to stderr and returns null.
      
      isa_bus_new() is called in two contexts, machine's init() and device's
      realize() methods.  Since complaining to stderr is not proper in the
      latter context, convert isa_bus_new() to Error.
      
      Machine's init():
      
      * mips_jazz_init(), called from the init() methods of machines
        "magnum" and "pica"
      
      * mips_r4k_init(), the init() method of machine "mips"
      
      * pc_init1() called from the init() methods of non-q35 PC machines
      
      * typhoon_init(), called from clipper_init(), the init() method of
        machine "clipper"
      
      These callers always create the first ISA bus, hence isa_bus_new()
      can't fail.  Simply pass &error_abort.
      
      Device's realize():
      
      * i82378_realize(), of PCI device "i82378"
      
      * ich9_lpc_realize(), of PCI device "ICH9-LPC"
      
      * pci_ebus_realize(), of PCI device "ebus"
      
      * piix3_realize(), of PCI device "pci-piix3", abstract parent of
        "PIIX3" and "PIIX3-xen"
      
      * piix4_realize(), of PCI device "PIIX4"
      
      * vt82c686b_realize(), of PCI device "VT82C686B"
      
      Propagate the error.  Note that these devices are typically created
      only by machine init() methods with qdev_init_nofail() or similar.  If
      we screwed up and created an ISA bus before that call, we now give up
      right away.  Before, we'd hobble on, and typically die in
      isa_bus_irqs().  Similar if someone finds a way to hot-plug one of
      these critters.
      
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: "Hervé Poussineau" <hpoussin@reactos.org>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Signed-off-by: NMarkus Armbruster <armbru@pond.sub.org>
      Reviewed-by: NMarcel Apfelbaum <marcel@redhat.com>
      Reviewed-by: NHervé Poussineau <hpoussin@reactos.org>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Message-Id: <1450370121-5768-11-git-send-email-armbru@redhat.com>
      d10e5432
    • M
      isa: Trivially convert remaining PCI-ISA bridges to realize() · 3a80cead
      Markus Armbruster 提交于
      These are "ICH9-LPC" and "ebus".
      
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Signed-off-by: NMarkus Armbruster <armbru@pond.sub.org>
      Reviewed-by: NMarcel Apfelbaum <marcel@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Message-Id: <1450370121-5768-10-git-send-email-armbru@redhat.com>
      3a80cead
  11. 22 10月, 2015 1 次提交
    • L
      hw/isa/lpc_ich9: inject the SMI on the VCPU that is writing to APM_CNT · 3c23402d
      Laszlo Ersek 提交于
      Commit 4d00636e ("ich9: Add the lpc chip", Nov 14 2012) added the
      ich9_apm_ctrl_changed() ioport write callback function such that it would
      inject the SMI, in response to a write to the APM_CNT register, on the
      first CPU, invariably.
      
      Since this register is used by guest code to trigger an SMI synchronously,
      the interrupt should be injected on the VCPU that is performing the write.
      
      apm_ioport_writeb() is the .write callback of the "apm_ops"
      MemoryRegionOps [hw/isa/apm.c]; it is parametrized to call
      ich9_apm_ctrl_changed() by ich9_lpc_init() [hw/isa/lpc_ich9.c], via
      apm_init(). Therefore this change affects no other board.
      
      ich9_generate_smi() is an unrelated function that is called by the TCO
      watchdog; a watchdog is likely in its right to (asynchronously) inject
      interrupts on the first CPU only.
      
      This patch allows the combined edk2/OVMF SMM driver stack to work with
      multiple VCPUs on TCG, using both qemu-system-i386 and qemu-system-x86_64.
      
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Jordan Justen <jordan.l.justen@intel.com>
      Cc: Michael Kinney <michael.d.kinney@intel.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      3c23402d
  12. 08 7月, 2015 1 次提交
    • P
      ich9: implement strap SPKR pin logic · 5add35be
      Paulo Alcantara 提交于
      If the signal is sampled high, this indicates that the system is
      strapped to the "No Reboot" mode (ICH9 will disable the TCO Timer system
      reboot feature). The status of this strap is readable via the NO_REBOOT
      bit (CC: offset 0x3410:bit 5).
      
      The NO_REBOOT bit is set when SPKR pin on ICH9 is sampled high. This bit
      may be set or cleared by software if the strap is sampled low but may
      not override the strap when it indicates "No Reboot".
      
      This patch implements the logic where hardware has ability to set SPKR
      pin through a property named "noreboot" and it's sampled high by
      default.
      Signed-off-by: NPaulo Alcantara <pcacjr@zytor.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      5add35be
  13. 07 7月, 2015 1 次提交
    • P
      ich9: add TCO interface emulation · 92055797
      Paulo Alcantara 提交于
      This interface provides some registers within a 32-byte range and can be
      acessed through PCI-to-LPC bridge interface (PMBASE + 0x60).
      
      It's commonly used as a watchdog timer to detect system lockups through
      SMIs that are generated -- if TCO_EN bit is set -- on every timeout. If
      NO_REBOOT bit is not set in GCS (General Control and Status register),
      the system will be resetted upon second timeout if TCO_RLD register
      wasn't previously written to prevent timeout.
      
      This patch adds support to TCO watchdog logic and few other features
      like mapping NMIs to SMIs (NMI2SMI_EN bit), system intruder detection,
      etc. are not implemented yet.
      Signed-off-by: NPaulo Alcantara <pcacjr@zytor.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      92055797
  14. 06 7月, 2015 2 次提交
  15. 12 6月, 2015 1 次提交
    • J
      migration: Use normal VMStateDescriptions for Subsections · 5cd8cada
      Juan Quintela 提交于
      We create optional sections with this patch.  But we already have
      optional subsections.  Instead of having two mechanism that do the
      same, we can just generalize it.
      
      For subsections we just change:
      
      - Add a needed function to VMStateDescription
      - Remove VMStateSubsection (after removal of the needed function
        it is just a VMStateDescription)
      - Adjust the whole tree, moving the needed function to the corresponding
        VMStateDescription
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      5cd8cada
  16. 06 6月, 2015 1 次提交
  17. 04 6月, 2015 1 次提交
  18. 03 6月, 2015 1 次提交
  19. 26 2月, 2015 2 次提交
  20. 13 2月, 2015 1 次提交
  21. 15 10月, 2014 1 次提交
  22. 15 8月, 2014 1 次提交
  23. 19 6月, 2014 4 次提交
  24. 16 6月, 2014 1 次提交
  25. 23 12月, 2013 2 次提交
    • M
      ich9: Document why cannot_instantiate_with_device_add_yet · bfa6dfd0
      Markus Armbruster 提交于
      An ICH9 southbridge contains several PCI devices, some of them with
      multiple functions.  We model each function as a separate qdev.  Two
      of them need some special wiring set up in pc_q35_init() to work: the
      LPC controller at 00:1f.0, and the SMBus controller at 00:1f.3.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      bfa6dfd0
    • M
      qdev: Replace no_user by cannot_instantiate_with_device_add_yet · efec3dd6
      Markus Armbruster 提交于
      In an ideal world, machines can be built by wiring devices together
      with configuration, not code.  Unfortunately, that's not the world we
      live in right now.  We still have quite a few devices that need to be
      wired up by code.  If you try to device_add such a device, it'll fail
      in sometimes mysterious ways.  If you're lucky, you get an
      unmysterious immediate crash.
      
      To protect users from such badness, DeviceClass member no_user used to
      make device models unavailable with -device / device_add, but that
      regressed in commit 18b6dade.  The device model is still omitted from
      help, but is available anyway.
      
      Attempts to fix the regression have been rejected with the argument
      that the purpose of no_user isn't clear, and it's prone to misuse.
      
      This commit clarifies no_user's purpose.  Anthony suggested to rename
      it cannot_instantiate_with_device_add_yet_due_to_internal_bugs, which
      I shorten somewhat to keep checkpatch happy.  While there, make it
      bool.
      
      Every use of cannot_instantiate_with_device_add_yet gets a FIXME
      comment asking for rationale.  The next few commits will clean them
      all up, either by providing a rationale, or by getting rid of the use.
      
      With that done, the regression fix is hopefully acceptable.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NMarcel Apfelbaum <marcel.a@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      efec3dd6
  26. 14 10月, 2013 1 次提交
  27. 29 7月, 2013 1 次提交