Skip to content
Snippets Groups Projects
  1. Mar 01, 2016
  2. Feb 29, 2016
  3. Feb 28, 2016
    • Greg Kurz's avatar
      xics: report errors with the QEMU Error API · a005b3ef
      Greg Kurz authored
      
      Using the return value to report errors is error prone:
      - xics_alloc() returns -1 on error but spapr_vio_busdev_realize() errors
        on 0
      - xics_alloc_block() returns the unclear value of ics->offset - 1 on error
        but both rtas_ibm_change_msi() and spapr_phb_realize() error on 0
      
      This patch adds an errp argument to xics_alloc() and xics_alloc_block() to
      report errors. The return value of these functions is a valid IRQ number
      if errp is NULL. It is undefined otherwise.
      
      The corresponding error traces get promotted to error messages. Note that
      the "can't allocate IRQ" error message in spapr_vio_busdev_realize() also
      moves to xics_alloc(). Similar error message consolidation isn't really
      applicable to xics_alloc_block() because callers have extra context (device
      config address, MSI or MSIX).
      
      This fixes the issues mentioned above.
      
      Based on previous work from Brian W. Hart.
      
      Signed-off-by: default avatarGreg Kurz <gkurz@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      a005b3ef
    • Greg Kurz's avatar
      migration: allow machine to enforce configuration section migration · 902c053d
      Greg Kurz authored
      
      Migration of pseries-2.3 doesn't have configuration section. Unfortunately,
      QEMU 2.4/2.4.1/2.5 are buggy and always stream and expect the configuration
      section, and break migration both ways.
      
      This patch introduces a property which allows to enforce a configuration
      section for machines who don't have one.
      
      It can be set at startup:
      
      -machine enforce-config-section=on
      
      or later from the QEMU monitor:
      
      qom-set /machine enforce-config-section on
      
      It is up to the tooling to set or unset this property according to the
      version of the QEMU at the other end of the pipe.
      
      Signed-off-by: default avatarGreg Kurz <gkurz@linux.vnet.ibm.com>
      Reviewed-by: default avatarLaurent Vivier <lvivier@redhat.com>
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      902c053d
Loading