1. 11 2月, 2017 12 次提交
  2. 10 2月, 2017 10 次提交
  3. 08 2月, 2017 18 次提交
    • D
      ui: refactor VncDisplay to allow multiple listening sockets · 4ee74fa7
      Daniel P. Berrange 提交于
      Currently there is only a single listener for plain VNC and
      a single listener for websockets VNC. This means that if
      getaddrinfo() returns multiple IP addresses, for a hostname,
      the VNC server can only listen on one of them. This is
      just bearable if listening on wildcard interface, or if
      the host only has a single network interface to listen on,
      but if there are multiple NICs and the VNC server needs
      to listen on 2 or more specific IP addresses, it can't be
      done.
      
      This refactors the VncDisplay state so that it holds an
      array of listening sockets, but still only listens on
      one socket.
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 20170203120649.15637-4-berrange@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      4ee74fa7
    • D
      ui: fix reporting of VNC auth in query-vnc-servers · 2a7e6857
      Daniel P. Berrange 提交于
      Currently the VNC authentication info is emitted at the
      top level of the query-vnc-servers data. This is wrong
      because the authentication scheme differs between plain
      and websockets when TLS is enabled. We should instead
      report auth against the individual servers. e.g.
      
      (QEMU) query-vnc-servers
      {
          "return": [
              {
                  "clients": [],
                  "id": "default",
                  "auth": "vencrypt",
                  "vencrypt": "x509-vnc",
                  "server": [
                      {
                          "host": "127.0.0.1"
                          "service": "5901",
                          "websocket": false,
                          "family": "ipv4",
                          "auth": "vencrypt",
                          "vencrypt": "x509-vnc"
                      },
                      {
                          "host": "127.0.0.1",
                          "service": "5902",
                          "websocket": true,
                          "family": "ipv4",
                          "auth": "vnc"
                      }
                  ]
              }
          ]
      }
      
      This also future proofs the QMP schema so that we can
      cope with multiple VNC server instances, listening on
      different interfaces or ports, with different auth
      setup.
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 20170203120649.15637-3-berrange@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      2a7e6857
    • D
      ui: fix regression handling bare 'websocket' option to -vnc · 1b1aeb58
      Daniel P. Berrange 提交于
      The -vnc argument is documented as accepting two syntaxes for
      the 'websocket' option, either a bare option name, or a port
      number. If using the bare option name, it is supposed to apply
      the display number as an offset to base port 5700. e.g.
      
        -vnc localhost:3,websocket
      
      should listen on port 5703, however, this was broken in 2.3.0 since
      
        commit 4db14629
        Author: Gerd Hoffmann <kraxel@redhat.com>
        Date:   Tue Sep 16 12:33:03 2014 +0200
      
          vnc: switch to QemuOpts, allow multiple servers
      
      instead qemu tries to listen on port "on" which gets looked up in
      /etc/services and fails.
      
      Fixes bug: #1455912
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 20170203120649.15637-2-berrange@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      1b1aeb58
    • M
      vnc: do not disconnect on EAGAIN · 537848ee
      Michael Tokarev 提交于
      When qemu vnc server is trying to send large update to clients,
      there might be a situation when system responds with something
      like EAGAIN, indicating that there's no system memory to send
      that much data (depending on the network speed, client and server
      and what is happening).  In this case, something like this happens
      on qemu side (from strace):
      
      sendmsg(16, {msg_name(0)=NULL,
              msg_iov(1)=[{"\244\"..., 729186}],
              msg_controllen=0, msg_flags=0}, 0) = 103950
      sendmsg(16, {msg_name(0)=NULL,
              msg_iov(1)=[{"lz\346"..., 1559618}],
              msg_controllen=0, msg_flags=0}, 0) = -1 EAGAIN
      sendmsg(-1, {msg_name(0)=NULL,
              msg_iov(1)=[{"lz\346"..., 1559618}],
              msg_controllen=0, msg_flags=0}, 0) = -1 EBADF
      
      qemu closes the socket before the retry, and obviously it gets EBADF
      when trying to send to -1.
      
      This is because there WAS a special handling for EAGAIN, but now it doesn't
      work anymore, after commit 04d2529d, because
      now in all error-like cases we initiate vnc disconnect.
      
      This change were introduced in qemu 2.6, and caused numerous grief for many
      people, resulting in their vnc clients reporting sporadic random disconnects
      from vnc server.
      
      Fix that by doing the disconnect only when necessary, i.e. omitting this
      very case of EAGAIN.
      
      Hopefully the existing condition (comparing with QIO_CHANNEL_ERR_BLOCK)
      is sufficient, as the original code (before the above commit) were
      checking for other errno values too.
      
      Apparently there's another (semi?)bug exist somewhere here, since the
      code tries to write to fd# -1, it probably should check if the connection
      is open before. But this isn't important.
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 1486115549-9398-1-git-send-email-mjt@msgid.tls.msk.ru
      Fixes: 04d2529d
      Cc: Daniel P. Berrange <berrange@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      537848ee
    • P
      ui/vnc: Drop unused vnc_has_job() and vnc_jobs_clear() · c3ff04b6
      Peter Maydell 提交于
      The functions vnc_has_job() and vnc_jobs_clear() are
      never used; remove them.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NGonglei <arei.gonglei@huawei.com>
      Message-id: 1486146260-8092-1-git-send-email-peter.maydell@linaro.org
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      c3ff04b6
    • P
      Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20170207-1' into staging · f073cd3a
      Peter Maydell 提交于
      target-arm:
       * new "unimplemented" device for stubbing out devices in a
         system model so accesses can be logged
       * stellaris: document the SoC memory map
       * arm: create instruction syndromes for AArch32 data aborts
       * arm: Correctly handle watchpoints for BE32 CPUs
       * Fix Thumb-1 BE32 execution and disassembly
       * arm: Add cfgend parameter for ARM CPU selection
       * sd: sdhci: check data length during dma_memory_read
       * aspeed: add a watchdog controller
       * integratorcp: adding vmstate for save/restore
      
      # gpg: Signature made Tue 07 Feb 2017 19:20:19 GMT
      # gpg:                using RSA key 0x3C2525ED14360CDE
      # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>"
      # gpg:                 aka "Peter Maydell <pmaydell@gmail.com>"
      # gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>"
      # Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE
      
      * remotes/pmaydell/tags/pull-target-arm-20170207-1:
        stellaris: Use the 'unimplemented' device for parts we don't implement
        hw/misc: New "unimplemented" sysbus device
        stellaris: Document memory map and which SoC devices are unimplemented
        target/arm: A32, T32: Create Instruction Syndromes for Data Aborts
        target/arm: Abstract out pbit/wbit tests in ARM ldr/str decode
        arm: Correctly handle watchpoints for BE32 CPUs
        Fix Thumb-1 BE32 execution and disassembly.
        target/arm: Add cfgend parameter for ARM CPU selection.
        hw/arm/integratorcp: Support specifying features via -cpu
        sd: sdhci: check data length during dma_memory_read
        aspeed: add a watchdog controller
        wdt: Add Aspeed watchdog device model
        integratorcp: adding vmstate for save/restore
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      f073cd3a
    • P
      stellaris: Use the 'unimplemented' device for parts we don't implement · aecfbbc9
      Peter Maydell 提交于
      Use the 'unimplemented' dummy device to cover regions of the
      SoC device memory map which we don't have proper device
      implementations for yet.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Message-id: 1484247815-15279-4-git-send-email-peter.maydell@linaro.org
      aecfbbc9
    • P
      hw/misc: New "unimplemented" sysbus device · f5095aa3
      Peter Maydell 提交于
      Create a new "unimplemented" sysbus device, which simply accepts
      all read and write accesses, and implements them as read-as-zero,
      write-ignored, with logging of the access as LOG_UNIMP.
      
      This is useful for stubbing out bits of an SoC or board model
      which haven't been written yet.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      Message-id: 1484247815-15279-3-git-send-email-peter.maydell@linaro.org
      f5095aa3
    • P
      stellaris: Document memory map and which SoC devices are unimplemented · 394c8bbf
      Peter Maydell 提交于
      Add a comment documenting the memory map of the SoC devices and which
      are not implemented.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1484247815-15279-2-git-send-email-peter.maydell@linaro.org
      394c8bbf
    • P
      target/arm: A32, T32: Create Instruction Syndromes for Data Aborts · 9bb6558a
      Peter Maydell 提交于
      Add support for generating the ISS (Instruction Specific Syndrome)
      for Data Abort exceptions taken from AArch32. These syndromes are
      used by hypervisors for example to trap and emulate memory accesses.
      
      This is the equivalent for AArch32 guests of the work done for AArch64
      guests in commit aaa1f954.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
      9bb6558a
    • P
      target/arm: Abstract out pbit/wbit tests in ARM ldr/str decode · 63f26fcf
      Peter Maydell 提交于
      In the ARM ldr/str decode path, rather than directly testing
      "insn & (1 << 21)" and "insn & (1 << 24)", abstract these
      bits out into wbit and pbit local flags. (We will want to
      do more tests against them to determine whether we need to
      provide syndrome information.)
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
      63f26fcf
    • J
      arm: Correctly handle watchpoints for BE32 CPUs · 40612000
      Julian Brown 提交于
      In BE32 mode, sub-word size watchpoints can fail to trigger because the
      address of the access is adjusted in the opcode helpers before being
      compared with the watchpoint registers.  This patch reverses the address
      adjustment before performing the comparison with the help of a new CPUClass
      hook.
      
      This version of the patch augments and tidies up comments a little.
      Signed-off-by: NJulian Brown <julian@codesourcery.com>
      Message-id: caaf64ffc72f6ae183015337b7afdbd4b8989cb6.1484929304.git.julian@codesourcery.com
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      40612000
    • J
      Fix Thumb-1 BE32 execution and disassembly. · f7478a92
      Julian Brown 提交于
      Thumb-1 code has some issues in BE32 mode (as currently implemented). In
      short, since bytes are swapped within words at load time for BE32
      executables, this also swaps pairs of adjacent Thumb-1 instructions.
      
      This patch un-swaps those pairs of instructions again, both for execution,
      and for disassembly. (The previous version of the patch always read four
      bytes in arm_read_memory_func and then extracted the proper two bytes,
      in a probably misguided attempt to match the behaviour of actual hardware
      as described by e.g. the ARM9TDMI TRM, section 3.3 "Endian effects for
      instruction fetches". It's less complicated to just read the correct
      two bytes though.)
      Signed-off-by: NJulian Brown <julian@codesourcery.com>
      Message-id: ca20462a044848000370318a8bd41dd0a4ed273f.1484929304.git.julian@codesourcery.com
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      f7478a92
    • J
      target/arm: Add cfgend parameter for ARM CPU selection. · 3a062d57
      Julian Brown 提交于
      Add a new "cfgend" property which selects whether the CPU resets into
      big-endian mode or not.  This setting affects whether we reset with
      SCTLR_B (ARMv6 and earlier) or SCTLR_EE (ARMv7 and later) set.
      Signed-off-by: NJulian Brown <julian@codesourcery.com>
      Message-id: 11420d1c49636c1790e60578ee996e51f0f0b835.1484929304.git.julian@codesourcery.com
      [PMM: use error_report_err() rather than error_report();
       move the integratorcp changes to their own patch;
       drop an unnecessary extra #include;
       rephrase commit message accordingly;
       move setting of reset_sctlr above registration of cpregs
       so it actually has an effect]
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      3a062d57
    • J
      hw/arm/integratorcp: Support specifying features via -cpu · 00909b58
      Julian Brown 提交于
      Since the integratorcp board creates the CPU object directly
      rather than via cpu_arm_init(), we have to call the CPU
      class parse_features() method ourselves if we want to
      support the user passing features via the -cpu command
      line argument as well as just the cpu name. Do so.
      Signed-off-by: NJulian Brown <julian@codesourcery.com>
      [PMM: split out into its own patch]
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      00909b58
    • P
      sd: sdhci: check data length during dma_memory_read · 42922105
      Prasad J Pandit 提交于
      While doing multi block SDMA transfer in routine
      'sdhci_sdma_transfer_multi_blocks', the 's->fifo_buffer' starting
      index 'begin' and data length 's->data_count' could end up to be same.
      This could lead to an OOB access issue. Correct transfer data length
      to avoid it.
      
      Cc: qemu-stable@nongnu.org
      Reported-by: NJiang Xin <jiangxin1@huawei.com>
      Signed-off-by: NPrasad J Pandit <pjp@fedoraproject.org>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 20170130064736.9236-1-ppandit@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      42922105
    • C
      aspeed: add a watchdog controller · 013befe1
      Cédric Le Goater 提交于
      This enables reboot of a guest from U-Boot and Linux.
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Reviewed-by: NJoel Stanley <joel@jms.id.au>
      Message-id: 1485452251-1593-3-git-send-email-clg@kaod.org
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      013befe1
    • C
      wdt: Add Aspeed watchdog device model · 854123bf
      Cédric Le Goater 提交于
      The Aspeed SoC includes a set of watchdog timers using 32-bit
      decrement counters, which can be based either on the APB clock or
      a 1 MHz clock.
      
      The watchdog timer is designed to prevent system deadlock and, in
      general, it should be restarted before timeout. When a timeout occurs,
      different types of signals can be generated, ARM reset, SOC reset,
      System reset, CPU Interrupt, external signal or boot from alternate
      block. The current model only performs the system reset function as
      this is used by U-Boot and Linux.
      Signed-off-by: NJoel Stanley <joel@jms.id.au>
      Message-id: 1485452251-1593-2-git-send-email-clg@kaod.org
      [clg: - fixed compile breakage
            - fixed io region size
            - added watchdog_perform_action() on timer expiry
            - wrote a commit log
            - merged fixes from Andrew Jeffery to scale the reload value ]
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      854123bf