1. 15 6月, 2015 16 次提交
  2. 12 6月, 2015 24 次提交
    • P
      Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into staging · 0a2df857
      Peter Maydell 提交于
      # gpg: Signature made Fri Jun 12 13:57:20 2015 BST using RSA key ID 81AB73C8
      # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
      # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
      
      * remotes/stefanha/tags/net-pull-request:
        qmp/hmp: add rocker device support
        rocker: bring link up/down on PHY enable/disable
        rocker: update tests using hw-derived interface names
        rocker: Add support for phys name
        iohandler: Change return type of qemu_set_fd_handler to "void"
        event-notifier: Always return 0 for posix implementation
        xen_backend: Remove unused error handling of qemu_set_fd_handler
        oss: Remove unused error handling of qemu_set_fd_handler
        alsaaudio: Remove unused error handling of qemu_set_fd_handler
        main-loop: Drop qemu_set_fd_handler2
        Change qemu_set_fd_handler2(..., NULL, ...) to qemu_set_fd_handler
        tap: Drop tap_can_send
        net/socket: Drop net_socket_can_send
        netmap: Drop netmap_can_send
        l2tpv3: Drop l2tpv3_can_send
        stubs: Add qemu_set_fd_handler
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      0a2df857
    • P
      Merge remote-tracking branch 'remotes/aurel/tags/pull-sh4-next-20150612' into staging · 9faffeb7
      Peter Maydell 提交于
      sh4 linux-user cpu and hwcap
      misc optimizations and cleanup
      convert r2d to new MMIO accessor style
      
      # gpg: Signature made Fri Jun 12 11:28:43 2015 BST using RSA key ID 1DDD8C9B
      # gpg: Good signature from "Aurelien Jarno <aurelien@aurel32.net>"
      # gpg:                 aka "Aurelien Jarno <aurelien@jarno.fr>"
      # gpg:                 aka "Aurelien Jarno <aurel32@debian.org>"
      # 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: 7746 2642 A9EF 94FD 0F77  196D BA9C 7806 1DDD 8C9B
      
      * remotes/aurel/tags/pull-sh4-next-20150612:
        target-sh4: remove dead code
        target-sh4: factorize fmov implementation
        target-sh4: split out Q and M from of SR and optimize div1
        target-sh4: optimize negc using add2 and sub2
        target-sh4: optimize subc using sub2
        target-sh4: optimize addc using add2
        target-sh4: Split out T from SR
        target-sh4: use bit number for SR constants
        sh4/r2d: convert to new MMIO accessor style
        linux-user: Add HWCAP for SH4
        linux-user: Default sh4 to sh7785
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      9faffeb7
    • S
      qmp/hmp: add rocker device support · fafa4d50
      Scott Feldman 提交于
      Add QMP/HMP support for rocker devices.  This is mostly for debugging purposes
      to see inside the device's tables and port configurations.  Some examples:
      
      (qemu) info rocker sw1
      name: sw1
      id: 0x0000013512005452
      ports: 4
      
      (qemu) info rocker-ports sw1
                  ena/    speed/ auto
            port  link    duplex neg?
           sw1.1  up     10G  FD  No
           sw1.2  up     10G  FD  No
           sw1.3  !ena   10G  FD  No
           sw1.4  !ena   10G  FD  No
      
      (qemu) info rocker-of-dpa-flows sw1
      prio tbl hits key(mask) --> actions
      2    60       pport 1 vlan 1 LLDP src 00:02:00:00:02:00 dst 01:80:c2:00:00:0e
      2    60       pport 1 vlan 1 ARP src 00:02:00:00:02:00 dst 00:02:00:00:03:00
      2    60       pport 2 vlan 2 IPv6 src 00:02:00:00:03:00 dst 33:33:ff:00:00:02 proto 58
      3    50       vlan 2 dst 33:33:ff:00:00:02 --> write group 0x32000001 goto tbl 60
      2    60       pport 2 vlan 2 IPv6 src 00:02:00:00:03:00 dst 33:33:ff:00:03:00 proto 58
      3    50  1    vlan 2 dst 33:33:ff:00:03:00 --> write group 0x32000001 goto tbl 60
      2    60       pport 2 vlan 2 ARP src 00:02:00:00:03:00 dst 00:02:00:00:02:00
      3    50  2    vlan 2 dst 00:02:00:00:02:00 --> write group 0x02000001 goto tbl 60
      2    60  1    pport 2 vlan 2 IP src 00:02:00:00:03:00 dst 00:02:00:00:02:00 proto 1
      3    50  2    vlan 1 dst 00:02:00:00:03:00 --> write group 0x01000002 goto tbl 60
      2    60  1    pport 1 vlan 1 IP src 00:02:00:00:02:00 dst 00:02:00:00:03:00 proto 1
      2    60       pport 1 vlan 1 IPv6 src 00:02:00:00:02:00 dst 33:33:ff:00:00:01 proto 58
      3    50       vlan 1 dst 33:33:ff:00:00:01 --> write group 0x31000000 goto tbl 60
      2    60       pport 1 vlan 1 IPv6 src 00:02:00:00:02:00 dst 33:33:ff:00:02:00 proto 58
      3    50  1    vlan 1 dst 33:33:ff:00:02:00 --> write group 0x31000000 goto tbl 60
      1    60  173  pport 2 vlan 2 LLDP src <any> dst 01:80:c2:00:00:0e --> write group 0x02000000
      1    60  6    pport 2 vlan 2 IPv6 src <any> dst <any> --> write group 0x02000000
      1    60  174  pport 1 vlan 1 LLDP src <any> dst 01:80:c2:00:00:0e --> write group 0x01000000
      1    60  174  pport 2 vlan 2 IP src <any> dst <any> --> write group 0x02000000
      1    60  6    pport 1 vlan 1 IPv6 src <any> dst <any> --> write group 0x01000000
      1    60  181  pport 2 vlan 2 ARP src <any> dst <any> --> write group 0x02000000
      1    10  715  pport 2 --> apply new vlan 2 goto tbl 20
      1    60  177  pport 1 vlan 1 ARP src <any> dst <any> --> write group 0x01000000
      1    60  174  pport 1 vlan 1 IP src <any> dst <any> --> write group 0x01000000
      1    10  717  pport 1 --> apply new vlan 1 goto tbl 20
      1    0   1432 pport 0(0xffff) --> goto tbl 10
      
      (qemu) info rocker-of-dpa-groups sw1
      id (decode) --> buckets
      0x32000001 (type L2 multicast vlan 2 index 1) --> groups [0x02000001,0x02000000]
      0x02000001 (type L2 interface vlan 2 pport 1) --> pop vlan out pport 1
      0x01000002 (type L2 interface vlan 1 pport 2) --> pop vlan out pport 2
      0x02000000 (type L2 interface vlan 2 pport 0) --> pop vlan out pport 0
      0x01000000 (type L2 interface vlan 1 pport 0) --> pop vlan out pport 0
      0x31000000 (type L2 multicast vlan 1 index 0) --> groups [0x01000002,0x01000000]
      
      [Added "query-" prefixes to rocker.json commands as suggested by Eric
      Blake <eblake@redhat.com>.
      --Stefan]
      Signed-off-by: NScott Feldman <sfeldma@gmail.com>
      Signed-off-by: NJiri Pirko <jiri@resnulli.us>
      Message-id: 1433985681-56138-5-git-send-email-sfeldma@gmail.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      fafa4d50
    • S
      rocker: bring link up/down on PHY enable/disable · 5ff1547b
      Scott Feldman 提交于
      When the OS driver enables/disables the port, go ahead and set the port's
      link status to up/down in response to the change.  This more closely
      emulates real hardware when the PHY for the port is brought up/down
      and the PHY negotiates carrier (link status) with link partner.  In
      the case of qemu, the virtual rocker device can't really do link
      negotiation with the link partner as that requires signally over a
      physical medium (the wire), so just pretend the negotiation was
      successful and bring the link up when the port is enabled.
      Signed-off-by: NScott Feldman <sfeldma@gmail.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 1433985681-56138-4-git-send-email-sfeldma@gmail.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      5ff1547b
    • S
      rocker: update tests using hw-derived interface names · 73da0232
      Scott Feldman 提交于
      With previous patch to support phy name attribute for each port, the OS
      can name port interfaces using the hw-derived name.  So update rocker
      tests to use the new hw-derived interface names.
      Signed-off-by: NScott Feldman <sfeldma@gmail.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 1433985681-56138-3-git-send-email-sfeldma@gmail.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      73da0232
    • D
      rocker: Add support for phys name · 77349536
      David Ahern 提交于
      Add ROCKER_TLV_CMD_PORT_SETTINGS_PHYS_NAME to port settings. This attribute
      exports the port name to the guest OS allowing it to name interfaces with
      sensible defaults.
      
      Mostly done by Scott for phys_id support; adapted to phys_name by David.
      Signed-off-by: NScott Feldman <sfeldma@gmail.com>
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Message-id: 1433985681-56138-2-git-send-email-sfeldma@gmail.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      77349536
    • F
      iohandler: Change return type of qemu_set_fd_handler to "void" · f4d248bd
      Fam Zheng 提交于
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1433400324-7358-14-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      f4d248bd
    • F
      event-notifier: Always return 0 for posix implementation · 1e354528
      Fam Zheng 提交于
      qemu_set_fd_handler cannot fail, let's always return 0.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1433400324-7358-13-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      1e354528
    • F
      xen_backend: Remove unused error handling of qemu_set_fd_handler · 6b5166f8
      Fam Zheng 提交于
      The function cannot fail, so the check is superfluous.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1433400324-7358-12-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      6b5166f8
    • F
      oss: Remove unused error handling of qemu_set_fd_handler · b027a538
      Fam Zheng 提交于
      The function cannot fail, so the check is superfluous.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1433400324-7358-11-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      b027a538
    • F
      alsaaudio: Remove unused error handling of qemu_set_fd_handler · be93f216
      Fam Zheng 提交于
      The function cannot fail, so the check is superfluous.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1433400324-7358-10-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      be93f216
    • F
      main-loop: Drop qemu_set_fd_handler2 · 6484e422
      Fam Zheng 提交于
      All users are converted to qemu_set_fd_handler now, drop
      qemu_set_fd_handler2 and IOHandlerRecord.fd_read_poll.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1433400324-7358-9-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      6484e422
    • F
      Change qemu_set_fd_handler2(..., NULL, ...) to qemu_set_fd_handler · 82e1cc4b
      Fam Zheng 提交于
      Done with following Coccinelle semantic patch, plus manual cosmetic changes in
      net/*.c.
      
          @@
          expression E1, E2, E3, E4;
          @@
          -   qemu_set_fd_handler2(E1, NULL, E2, E3, E4);
          +   qemu_set_fd_handler(E1, E2, E3, E4);
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1433400324-7358-8-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      82e1cc4b
    • F
      tap: Drop tap_can_send · a90a7425
      Fam Zheng 提交于
      This callback is called by main loop before polling s->fd, if it returns
      false, the fd will not be polled in this iteration.
      
      This is redundant with checks inside read callback. After this patch,
      the data will be sent to peer when it arrives. If the device can't
      receive, it will be queued to incoming_queue, and when the device status
      changes, this queue will be flushed.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1433400324-7358-7-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      a90a7425
    • F
      net/socket: Drop net_socket_can_send · 6e99c631
      Fam Zheng 提交于
      This callback is called by main loop before polling s->fd, if it returns
      false, the fd will not be polled in this iteration.
      
      This is redundant with checks inside read callback. After this patch,
      the data will be sent to peer when it arrives. If the device can't
      receive, it will be queued to incoming_queue, and when the device status
      changes, this queue will be flushed.
      
      If the peer is not ready, disable the read poll until send completes.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1433400324-7358-6-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      6e99c631
    • F
      netmap: Drop netmap_can_send · e8dd1d9c
      Fam Zheng 提交于
      This callback is called by main loop before polling s->fd, if it returns
      false, the fd will not be polled in this iteration.
      
      This is redundant with checks inside read callback. After this patch,
      the data will be copied from s->fd to s->iov when it arrives. If the
      device can't receive, it will be queued to incoming_queue, and when the
      device status changes, this queue will be flushed.
      
      Also remove the qemu_can_send_packet() check in netmap_send. If it's
      true, we are good; if it's false, the qemu_sendv_packet_async would
      return 0 and read poll will be disabled until netmap_send_completed is
      called.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1433400324-7358-5-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      e8dd1d9c
    • F
      l2tpv3: Drop l2tpv3_can_send · 95b1416a
      Fam Zheng 提交于
      This callback is called by main loop before polling s->fd, if it returns
      false, the fd will not be polled in this iteration.
      
      This is redundant with checks inside read callback. After this patch,
      the data will be copied from s->fd to s->msgvec when it arrives. If the
      device can't receive, it will be queued to incoming_queue, and when the
      device status changes, this queue will be flushed.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1433400324-7358-4-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      95b1416a
    • F
      stubs: Add qemu_set_fd_handler · 0bc12c4f
      Fam Zheng 提交于
      Some qemu_set_fd_handler2 stub callers will be converted to
      call qemu_set_fd_handler, add this stub for them before making the
      change.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 1433400324-7358-2-git-send-email-famz@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      0bc12c4f
    • P
      Merge remote-tracking branch 'remotes/lalrae/tags/mips-20150612' into staging · 4cb618ab
      Peter Maydell 提交于
      MIPS patches 2015-06-12
      
      Changes:
      * improve dp8393x network card and rc4030 chipset emulation
      * support misaligned R6 and MSA memory accesses
      * support MIPS eXtended and Large Physical Addressing
      * add Config5.FRE bit and ERETNC instruction (Config5.LLB)
      * support ememsize on MALTA
      
      # gpg: Signature made Fri Jun 12 09:38:11 2015 BST using RSA key ID 0B29DA6B
      # gpg: Good signature from "Leon Alrae <leon.alrae@imgtec.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: 8DD3 2F98 5495 9D66 35D4  4FC0 5211 8E3C 0B29 DA6B
      
      * remotes/lalrae/tags/mips-20150612: (29 commits)
        target-mips: enable XPA and LPA features
        target-mips: remove misleading comments in translate_init.c
        target-mips: add MTHC0 and MFHC0 instructions
        target-mips: add CP0.PageGrain.ELPA support
        target-mips: support Page Frame Number Extension field
        target-mips: extend selected CP0 registers to 64-bits in MIPS32
        target-mips: correct MFC0 for CP0.EntryLo in MIPS64
        net/dp8393x: fix hardware reset
        net/dp8393x: correctly reset in_use field
        net/dp8393x: add load/save support
        net/dp8393x: add PROM to store MAC address
        net/dp8393x: QOM'ify
        net/dp8393x: use dp8393x_ prefix for all functions
        net/dp8393x: do not use old_mmio accesses
        net/dp8393x: always calculate proper checksums
        dma/rc4030: convert to QOM
        dma/rc4030: use trace events instead of custom logging
        dma/rc4030: document register at offset 0x210
        dma/rc4030: do not use old_mmio accesses
        dma/rc4030: use AddressSpace and address_space_rw in users
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      4cb618ab
    • P
      Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20150612' into staging · a4ef02fd
      Peter Maydell 提交于
      migration/next for 20150612
      
      # gpg: Signature made Fri Jun 12 05:56:21 2015 BST using RSA key ID 5872D723
      # gpg: Good signature from "Juan Quintela <quintela@redhat.com>"
      # gpg:                 aka "Juan Quintela <quintela@trasno.org>"
      
      * remotes/juanquintela/tags/migration/20150612: (21 commits)
        Remove unneeded memset
        Rename RDMA structures to make destination clear
        Teach analyze-migration.py about section footers
        Add a protective section footer
        Disable section footers on older machine types
        Merge section header writing
        Move loadvm_handlers into MigrationIncomingState
        Move copy out of qemu_peek_buffer
        Create MigrationIncomingState
        qemu_ram_foreach_block: pass up error value, and down the ramblock name
        Split header writing out of qemu_savevm_state_begin
        Add qemu_get_counted_string to read a string prefixed by a count byte
        migration: Use normal VMStateDescriptions for Subsections
        migration: create savevm_state
        migration: Remove duplicated assignment of SETUP status
        rdma: Fix qemu crash when IPv6 address is used for migration
        arch_init: Clean up the duplicate variable 'len' defining in ram_load()
        migration: reduce include files
        migration: Add myself to the copyright list of both files
        migration: move savevm.c inside migration/
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      a4ef02fd
    • A
      target-sh4: remove dead code · d218b28d
      Aurelien Jarno 提交于
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      d218b28d
    • A
      91b4d29f
    • A
      target-sh4: split out Q and M from of SR and optimize div1 · 1d565b21
      Aurelien Jarno 提交于
      Splitting Q and M out of SR, it's possible to optimize div1 by using
      TCG code instead of an helper.
      
      At the same time removed the now unused gen_copy_bit_i32 function.
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
      1d565b21
    • A
      60eb27fe