1. 07 2月, 2018 9 次提交
    • A
      hw/pci*: Replace fprintf(stderr, "*\n" with error_report() · 0151abe4
      Alistair Francis 提交于
      Replace a large number of the fprintf(stderr, "*\n" calls with
      error_report(). The functions were renamed with these commands and then
      compiler issues where manually fixed.
      
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      
      Some lines where then manually tweaked to pass checkpatch.
      
      A trailing '.' was removed in hw/pci/pci.c
      Signed-off-by: NAlistair Francis <alistair.francis@xilinx.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      
      Conversions that aren't followed by exit() dropped, because they might
      be inappropriate.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <20180203084315.20497-9-armbru@redhat.com>
      0151abe4
    • A
      hw/openrisc: Replace fprintf(stderr, "*\n" with error_report() · fe2d93c8
      Alistair Francis 提交于
      Replace a large number of the fprintf(stderr, "*\n" calls with
      error_report(). The functions were renamed with these commands and then
      compiler issues where manually fixed.
      
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      
      Some lines where then manually tweaked to pass checkpatch.
      Signed-off-by: NAlistair Francis <alistair.francis@xilinx.com>
      Cc: Jia Liu <proljc@gmail.com>
      Cc: Stafford Horne <shorne@gmail.com>
      Acked-by: NStafford Horne <shorne@gmail.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <20180203084315.20497-8-armbru@redhat.com>
      fe2d93c8
    • A
      hw/moxie: Replace fprintf(stderr, "*\n" with error_report() · 2ecdc2c3
      Alistair Francis 提交于
      Replace a large number of the fprintf(stderr, "*\n" calls with
      error_report(). The functions were renamed with these commands and then
      compiler issues where manually fixed.
      
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      
      Some lines where then manually tweaked to pass checkpatch.
      Signed-off-by: NAlistair Francis <alistair.francis@xilinx.com>
      Cc: Anthony Green <green@moxielogic.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <20180203084315.20497-7-armbru@redhat.com>
      2ecdc2c3
    • A
      hw/mips: Replace fprintf(stderr, "*\n" with error_report() · bd6e1d81
      Alistair Francis 提交于
      Replace a large number of the fprintf(stderr, "*\n" calls with
      error_report(). The functions were renamed with these commands and then
      compiler issues where manually fixed.
      
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      
      Some lines where then manually tweaked to pass checkpatch.
      Signed-off-by: NAlistair Francis <alistair.francis@xilinx.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: Yongbok Kim <yongbok.kim@imgtec.com>
      Cc: "Hervé Poussineau" <hpoussin@reactos.org>
      
      Conversions that aren't followed by exit() dropped, because they might
      be inappropriate.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <20180203084315.20497-6-armbru@redhat.com>
      bd6e1d81
    • A
      hw/lm32: Replace fprintf(stderr, "*\n" with error_report() · 0a094a54
      Alistair Francis 提交于
      Replace a large number of the fprintf(stderr, "*\n" calls with
      error_report(). The functions were renamed with these commands and then
      compiler issues where manually fixed.
      
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      
      Some lines where then manually tweaked to pass checkpatch.
      Signed-off-by: NAlistair Francis <alistair.francis@xilinx.com>
      Cc: Michael Walle <michael@walle.cc>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Acked-by: NMichael Walle <michael@walle.cc>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <20180203084315.20497-5-armbru@redhat.com>
      0a094a54
    • A
      hw/dma: Replace fprintf(stderr, "*\n" with error_report() · 7f69a433
      Alistair Francis 提交于
      Replace a large number of the fprintf(stderr, "*\n" calls with
      error_report(). The functions were renamed with these commands and then
      compiler issues where manually fixed.
      
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      
      Some lines where then manually tweaked to pass checkpatch.
      Signed-off-by: NAlistair Francis <alistair.francis@xilinx.com>
      
      Conversions that aren't followed by exit() dropped, because they might
      be inappropriate.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <20180203084315.20497-4-armbru@redhat.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      7f69a433
    • A
      hw/arm: Replace fprintf(stderr, "*\n" with error_report() · c0dbca36
      Alistair Francis 提交于
      Replace a large number of the fprintf(stderr, "*\n" calls with
      error_report(). The functions were renamed with these commands and then
      compiler issues where manually fixed.
      
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      
      Some lines where then manually tweaked to pass checkpatch.
      
      The 'qemu: ' prefix was manually removed from the hw/arm/boot.c file.
      Signed-off-by: NAlistair Francis <alistair.francis@xilinx.com>
      Cc: qemu-arm@nongnu.org
      
      Conversions that aren't followed by exit() dropped, because they might
      be inappropriate.
      
      Also trim trailing punctuation from error messages.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <20180203084315.20497-3-armbru@redhat.com>
      c0dbca36
    • A
      audio: Replace AUDIO_FUNC with __func__ · 470bcabd
      Alistair Francis 提交于
      Apparently we don't use __MSC_VER as a compiler anymore and we always
      require a C99 compiler (which means we always have __func__) so we don't
      need a special AUDIO_FUNC macro. We can just replace AUDIO_FUNC with
      __func__ instead.
      
      Checkpatch failures were manually fixed.
      Signed-off-by: NAlistair Francis <alistair.francis@xilinx.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: NThomas Huth <thuth@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <20180203084315.20497-2-armbru@redhat.com>
      470bcabd
    • M
      error: Improve documentation of error_append_hint() · 508de478
      Markus Armbruster 提交于
      Suggested-by: NHalil Pasic <pasic@linux.vnet.ibm.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1502359588-29451-1-git-send-email-armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NHalil Pasic <pasic@linux.vnet.ibm.com>
      508de478
  2. 06 2月, 2018 1 次提交
  3. 05 2月, 2018 4 次提交
  4. 03 2月, 2018 7 次提交
  5. 02 2月, 2018 19 次提交
    • P
      Merge remote-tracking branch 'remotes/kraxel/tags/audio-20180202-pull-request' into staging · fabbd691
      Peter Maydell 提交于
      audio: two small fixes.
      
      # gpg: Signature made Fri 02 Feb 2018 07:49:20 GMT
      # gpg:                using RSA key 4CB6D8EED3E87138
      # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
      # gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
      # gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
      # Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138
      
      * remotes/kraxel/tags/audio-20180202-pull-request:
        hw/audio/sb16.c: change dolog() to qemu_log_mask()
        hw/audio/wm8750: move WM8750 declarations from i2c/i2c.h to audio/wm8750.h
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      fabbd691
    • P
      Merge remote-tracking branch 'remotes/cminyard/tags/for-release-20180201' into staging · 6a95e258
      Peter Maydell 提交于
      Lots of litte miscellaneous fixes for the IPMI code, plus
      add me as the IPMI maintainer.
      
      # gpg: Signature made Thu 01 Feb 2018 18:44:55 GMT
      # gpg:                using RSA key 61F38C90919BFF81
      # gpg: Good signature from "Corey Minyard <cminyard@mvista.com>"
      # gpg:                 aka "Corey Minyard <minyard@acm.org>"
      # gpg:                 aka "Corey Minyard <corey@minyard.net>"
      # gpg:                 aka "Corey Minyard <minyard@mvista.com>"
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: FD0D 5CE6 7CE0 F59A 6688  2686 61F3 8C90 919B FF81
      
      * remotes/cminyard/tags/for-release-20180201:
        ipmi: Allow BMC device properties to be set
        ipmi: disable IRQ and ATN on an external disconnect
        ipmi: Fix macro issues
        ipmi: Add the platform event message command
        ipmi: Don't set the timestamp on add events that don't have it
        ipmi: Fix SEL get/set time commands
        Add maintainer for the IPMI code
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      6a95e258
    • P
      Merge remote-tracking branch 'remotes/elmarco/tags/dump-pull-request' into staging · e486b528
      Peter Maydell 提交于
      # gpg: Signature made Thu 01 Feb 2018 11:15:42 GMT
      # gpg:                using RSA key DAE8E10975969CE5
      # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>"
      # gpg:                 aka "Marc-André Lureau <marcandre.lureau@gmail.com>"
      # Primary key fingerprint: 87A9 BD93 3F87 C606 D276  F62D DAE8 E109 7596 9CE5
      
      * remotes/elmarco/tags/dump-pull-request:
        dump-guest-memory.py: skip vmcoreinfo section if not available
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      e486b528
    • G
    • G
      tests: virtio-9p: add FLUSH operation test · 357e2f7f
      Greg Kurz 提交于
      The idea is to send a victim request that will possibly block in the
      server and to send a flush request to cancel the victim request.
      
      This patch adds two test to verifiy that:
      - the server does not reply to a victim request that was actually
        cancelled
      - the server replies to the flush request after replying to the
        victim request if it could not cancel it
      
      9p request cancellation reference:
      
      http://man.cat-v.org/plan_9/5/flushSigned-off-by: NGreg Kurz <groug@kaod.org>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      (groug, change the test to only write a single byte to avoid
              any alignment or endianess consideration)
      357e2f7f
    • G
      libqos/virtio: return length written into used descriptor · be3a6781
      Greg Kurz 提交于
      When a 9p request is flushed (ie, cancelled) by the guest, the device
      is expected to simply mark the request as used, without sending a 9p
      reply (ie, without writing anything into the used buffer).
      
      To be able to test this, we need access to the length written by the
      device into the used descriptor. This patch adds a uint32_t * argument
      to qvirtqueue_get_buf() and qvirtio_wait_used_elem() for this purpose.
      
      All existing users are updated accordingly.
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      be3a6781
    • P
      Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging · 707eafb8
      Peter Maydell 提交于
      # gpg: Signature made Thu 01 Feb 2018 04:05:22 GMT
      # gpg:                using RSA key BDBE7B27C0DE3057
      # gpg: Good signature from "Jeffrey Cody <jcody@redhat.com>"
      # gpg:                 aka "Jeffrey Cody <jeff@codyprime.org>"
      # gpg:                 aka "Jeffrey Cody <codyprime@gmail.com>"
      # Primary key fingerprint: 9957 4B4D 3474 90E7 9D98  D624 BDBE 7B27 C0DE 3057
      
      * remotes/cody/tags/block-pull-request:
        iotests: Make 200 run on tmpfs
        block/ssh: fix possible segmentation fault when .desc is not null-terminated
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      707eafb8
    • P
      virtio-gpu: disallow vIOMMU · 34e304e9
      Peter Xu 提交于
      virtio-gpu has special code path that bypassed vIOMMU protection.  So
      for now let's disable iommu_platform for the device until we fully
      support that (if needed).
      
      After the patch, both virtio-vga and virtio-gpu won't allow to boot with
      iommu_platform parameter set.
      
      CC: Gerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NPeter Xu <peterx@redhat.com>
      Message-id: 20180131040401.3550-1-peterx@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      34e304e9
    • J
      hw/audio/sb16.c: change dolog() to qemu_log_mask() · 8ec660b8
      John Arbuckle 提交于
      Changes all the occurrances of dolog() to qemu_log_mask().
      Signed-off-by: NJohn Arbuckle <programmingkidx@gmail.com>
      Message-id: 20180201172744.7504-1-programmingkidx@gmail.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      8ec660b8
    • P
      hw/audio/wm8750: move WM8750 declarations from i2c/i2c.h to audio/wm8750.h · 7ab14c5a
      Philippe Mathieu-Daudé 提交于
      while here use TYPE_WM8750 and declare a data_req_cb() typedef.
      Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 20170919123053.32675-1-f4bug@amsat.org
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      7ab14c5a
    • D
      ui: correctly advance output buffer when writing SASL data · 627ebec2
      Daniel P. Berrangé 提交于
      In this previous commit:
      
        commit 8f61f1c5
        Author: Daniel P. Berrange <berrange@redhat.com>
        Date:   Mon Dec 18 19:12:20 2017 +0000
      
          ui: track how much decoded data we consumed when doing SASL encoding
      
      I attempted to fix a flaw with tracking how much data had actually been
      processed when encoding with SASL. With that flaw, the VNC server could
      mistakenly discard queued data that had not been sent.
      
      The fix was not quite right though, because it merely decremented the
      vs->output.offset value. This is effectively discarding data from the
      end of the pending output buffer. We actually need to discard data from
      the start of the pending output buffer. We also want to free memory that
      is no longer required. The correct way to handle this is to use the
      buffer_advance() helper method instead of directly manipulating the
      offset value.
      Reported-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Message-id: 20180201155841.27509-1-berrange@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      627ebec2
    • D
      ui: convert VNC server to QIONetListener · 13e1d0e7
      Daniel P. Berrange 提交于
      The VNC server already has the ability to listen on multiple sockets.
      Converting it to use the QIONetListener APIs though, will reduce the
      amount of code in the VNC server and improve the clarity of what is
      left.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 20180201164514.10330-1-berrange@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      13e1d0e7
    • D
      ui: fix mixup between qnum and qcode in SDL1 key handling · 8ea9c80a
      Daniel P. Berrangé 提交于
      The previous commit:
      
        commit 2ec78706
        Author: Daniel P. Berrange <berrange@redhat.com>
        Date:   Wed Jan 17 16:47:15 2018 +0000
      
          ui: convert GTK and SDL1 frontends to keycodemapdb
      
      changed the x_keymap.c keymap so that its target was qcodes instead of
      qnums. It updated the GTK frontend to take account of this change, but
      forgot to update the SDL1 frontend. Thus the SDL frontend was getting
      qcodes but dispatching them as if they were qnums. IOW, keyboard input
      was completely hosed with SDL1. Since the keyboard layout tables are
      still all based on qnums, it is easier to just keep SDL1 using qnums as
      it will be deleted in a few releases time.
      Reported-by: NBALATON Zoltan <balaton@eik.bme.hu>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      Tested-by: NBALATON Zoltan <balaton@eik.bme.hu>
      Message-id: 20180201180033.14255-1-berrange@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      8ea9c80a
    • G
      tests: virtio-9p: add WRITE operation test · 354b86f8
      Greg Kurz 提交于
      Trivial test of a successful write.
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      (groug, handle potential overflow when computing request size,
              add missing g_free(buf),
              backend handles one written byte at a time to validate
              the server doesn't do short-reads)
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      354b86f8
    • G
      tests: virtio-9p: add LOPEN operation test · 82469aae
      Greg Kurz 提交于
      Trivial test of a successful open.
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      82469aae
    • G
      tests: virtio-9p: use the synth backend · 2893ddd5
      Greg Kurz 提交于
      The purpose of virtio-9p-test is to test the virtio-9p device, especially
      the 9p server state machine. We don't really care what fsdev backend we're
      using. Moreover, if we want to be able to test the flush request or a
      device reset with in-flights I/O, it is close to impossible to achieve
      with a physical backend because we cannot ask it reliably to put an I/O
      on hold at a specific point in time.
      
      Fortunately, we can do that with the synthetic backend, which allows to
      register callbacks on read/write accesses to a specific file. This will
      be used by a later patch to test the 9P flush request.
      
      The walk request test is converted to using the synth backend.
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      2893ddd5
    • G
      tests: virtio-9p: wait for completion in the test code · 60b1fa9d
      Greg Kurz 提交于
      In order to test request cancellation, we will need to send multiple
      requests and wait for the associated replies. Since we poll the ISR
      to know if a request completed, we may have several replies to parse
      when we detect ISR was set to 1.
      
      This patch moves the waiting out of the reply parsing path, up into
      the functional tests.
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      60b1fa9d
    • G
      tests: virtio-9p: move request tag to the test functions · 693b21d2
      Greg Kurz 提交于
      It doesn't really makes sense to hide the request tag from the test
      functions. It prevents to test the 9p server behavior when passed
      a wrong tag (ie, still in use or different from P9_NOTAG for a
      version request). Also the spec says that a tag is reusable as soon
      as the corresponding request was replied or flushed: no need to
      always increment tags like we do now. And finaly, an upcoming test
      of the flush command will need to manipulate tags explicitely.
      
      This simply changes all request functions to have a tag argument.
      Except for the version request which needs P9_NOTAG, all other
      tests can pass 0 since they wait for the reply before sending
      another request.
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      693b21d2
    • K
      9pfs: Correctly handle cancelled requests · fc78d5ee
      Keno Fischer 提交于
      # Background
      
      I was investigating spurious non-deterministic EINTR returns from
      various 9p file system operations in a Linux guest served from the
      qemu 9p server.
      
       ## EINTR, ERESTARTSYS and the linux kernel
      
      When a signal arrives that the Linux kernel needs to deliver to user-space
      while a given thread is blocked (in the 9p case waiting for a reply to its
      request in 9p_client_rpc -> wait_event_interruptible), it asks whatever
      driver is currently running to abort its current operation (in the 9p case
      causing the submission of a TFLUSH message) and return to user space.
      In these situations, the error message reported is generally ERESTARTSYS.
      If the userspace processes specified SA_RESTART, this means that the
      system call will get restarted upon completion of the signal handler
      delivery (assuming the signal handler doesn't modify the process state
      in complicated ways not relevant here). If SA_RESTART is not specified,
      ERESTARTSYS gets translated to EINTR and user space is expected to handle
      the restart itself.
      
       ## The 9p TFLUSH command
      
      The 9p TFLUSH commands requests that the server abort an ongoing operation.
      The man page [1] specifies:
      
      ```
      If it recognizes oldtag as the tag of a pending transaction, it should
      abort any pending response and discard that tag.
      [...]
      When the client sends a Tflush, it must wait to receive the corresponding
      Rflush before reusing oldtag for subsequent messages. If a response to the
      flushed request is received before the Rflush, the client must honor the
      response as if it had not been flushed, since the completed request may
      signify a state change in the server
      ```
      
      In particular, this means that the server must not send a reply with the
      orignal tag in response to the cancellation request, because the client is
      obligated to interpret such a reply as a coincidental reply to the original
      request.
      
       # The bug
      
      When qemu receives a TFlush request, it sets the `cancelled` flag on the
      relevant pdu. This flag is periodically checked, e.g. in
      `v9fs_co_name_to_path`, and if set, the operation is aborted and the error
      is set to EINTR. However, the server then violates the spec, by returning
      to the client an Rerror response, rather than discarding the message
      entirely. As a result, the client is required to assume that said Rerror
      response is a result of the original request, not a result of the
      cancellation and thus passes the EINTR error back to user space.
      This is not the worst thing it could do, however as discussed above, the
      correct error code would have been ERESTARTSYS, such that user space
      programs with SA_RESTART set get correctly restarted upon completion of
      the signal handler.
      Instead, such programs get spurious EINTR results that they were not
      expecting to handle.
      
      It should be noted that there are plenty of user space programs that do not
      set SA_RESTART and do not correctly handle EINTR either. However, that is
      then a userspace bug. It should also be noted that this bug has been
      mitigated by a recent commit to the Linux kernel [2], which essentially
      prevents the kernel from sending Tflush requests unless the process is about
      to die (in which case the process likely doesn't care about the response).
      Nevertheless, for older kernels and to comply with the spec, I believe this
      change is beneficial.
      
       # Implementation
      
      The fix is fairly simple, just skipping notification of a reply if
      the pdu was previously cancelled. We do however, also notify the transport
      layer that we're doing this, so it can clean up any resources it may be
      holding. I also added a new trace event to distinguish
      operations that caused an error reply from those that were cancelled.
      
      One complication is that we only omit sending the message on EINTR errors in
      order to avoid confusing the rest of the code (which may assume that a
      client knows about a fid if it sucessfully passed it off to pud_complete
      without checking for cancellation status). This does mean that if the server
      acts upon the cancellation flag, it always needs to set err to EINTR. I
      believe this is true of the current code.
      
      [1] https://9fans.github.io/plan9port/man/man9/flush.html
      [2] https://github.com/torvalds/linux/commit/9523feac272ccad2ad8186ba4fcc891Signed-off-by: NKeno Fischer <keno@juliacomputing.com>
      Reviewed-by: NGreg Kurz <groug@kaod.org>
      [groug, send a zero-sized reply instead of detaching the buffer]
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NStefano Stabellini <sstabellini@kernel.org>
      fc78d5ee