1. 31 10月, 2017 6 次提交
    • E
      nbd/server: Refactor zero-length option check · e68c35cf
      Eric Blake 提交于
      Consolidate the response for a non-zero-length option payload
      into a new function, nbd_reject_length().  This check will
      also be used when introducing support for structured replies.
      
      Note that STARTTLS response differs based on time: if the connection
      is still unencrypted, we set fatal to true (a client that can't
      request TLS correctly may still think that we are ready to start
      the TLS handshake, so we must disconnect); while if the connection
      is already encrypted, the client is sending a bogus request but
      is no longer at risk of being confused by continuing the connection.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20171027104037.8319-7-eblake@redhat.com>
      [eblake: correct return value on STARTTLS]
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      e68c35cf
    • E
      nbd/server: Simplify nbd_negotiate_options loop · 8cbee49e
      Eric Blake 提交于
      Instead of making each caller check whether a transmission error
      occurred, we can sink a common error check to the end of the loop.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <20171027104037.8319-6-eblake@redhat.com>
      [eblake: squash in compiler warning fix]
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      8cbee49e
    • E
      nbd/server: Report error for write to read-only export · 8fb48b8b
      Eric Blake 提交于
      When the server is read-only, we were already reporting an error
      message for NBD_CMD_WRITE_ZEROES, but failed to set errp for a
      similar NBD_CMD_WRITE.  This will matter more once structured
      replies allow the server to propagate the errp information back
      to the client.  While at it, use an error message that makes a
      bit more sense if viewed on the client side.
      
      Note that when using qemu-io to test qemu-nbd behavior, it is
      rather difficult to convince qemu-io to send protocol violations
      (such as a read beyond bounds), because we have a lot of active
      checking on the client side that a qemu-io request makes sense
      before it ever goes over the wire to the server.  The case of a
      client attempting a write when the server is started as
      'qemu-nbd -r' is one of the few places where we can easily test
      error path handling, without having to resort to hacking in known
      temporary bugs to either the server or client.  [Maybe we want a
      future patch to the client to do up-front checking on writes to a
      read-only export, the way it does up-front bounds checking; but I
      don't see anything in the NBD spec that points to a protocol
      violation in our current behavior.]
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-Id: <20171027104037.8319-5-eblake@redhat.com>
      8fb48b8b
    • E
      nbd: Expose constants and structs for structured read · bae245d1
      Eric Blake 提交于
      Upcoming patches will implement the NBD structured reply
      extension [1] for both client and server roles.  Declare the
      constants, structs, and lookup routines that will be valuable
      whether the server or client code is backported in isolation.
      
      This includes moving one constant from an internal header to
      the public header, as part of the structured read processing
      will be done in block/nbd-client.c rather than nbd/client.c.
      
      [1]https://github.com/NetworkBlockDevice/nbd/blob/extension-structured-reply/doc/proto.md
      
      Based on patches from Vladimir Sementsov-Ogievskiy.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-Id: <20171027104037.8319-4-eblake@redhat.com>
      bae245d1
    • E
      nbd: Move nbd_errno_to_system_errno() to public header · dd689440
      Eric Blake 提交于
      This is needed in preparation for structured reply handling,
      as we will be performing the translation from NBD error to
      system errno value higher in the stack at block/nbd-client.c.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-Id: <20171027104037.8319-3-eblake@redhat.com>
      dd689440
    • E
      nbd: Include error names in trace messages · e7a78d0e
      Eric Blake 提交于
      NBD errors were originally sent over the wire based on Linux errno
      values; but not all the world is Linux, and not all platforms share
      the same values.  Since a number isn't very easy to decipher on all
      platforms, update the trace messages to include the name of NBD
      errors being sent/received over the wire.  Tweak the trace messages
      to be at the point where we are using the NBD error, not the
      translation to the host errno values.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-Id: <20171027104037.8319-2-eblake@redhat.com>
      e7a78d0e
  2. 30 10月, 2017 7 次提交
    • P
      Merge remote-tracking branch 'remotes/borntraeger/tags/s390x-20171030' into staging · abf6e752
      Peter Maydell 提交于
      s390x: fixups for 2.11
      
      - missing \r in the BIOS console output
      - CPU type name is now "s390x-cpu"
      - fixup for the host-model on z14 and older machine versions
      
      # gpg: Signature made Mon 30 Oct 2017 08:34:15 GMT
      # gpg:                using RSA key 0x117BBC80B5A61C7C
      # gpg: Good signature from "Christian Borntraeger (IBM) <borntraeger@de.ibm.com>"
      # Primary key fingerprint: F922 9381 A334 08F9 DBAB  FBCA 117B BC80 B5A6 1C7C
      
      * remotes/borntraeger/tags/s390x-20171030:
        s390-*.img: update s390 bios with latest fixes
        s390-ccw: print carriage return with new lines
        s390x/kvm: use cpu model for gscb on compat machines
        target/s390x: change CPU type name to "s390x-cpu"
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      abf6e752
    • P
      Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20171029' into staging · 21dab18b
      Peter Maydell 提交于
      migration/next for 20171029
      
      # gpg: Signature made Sun 29 Oct 2017 13:07:43 GMT
      # gpg:                using RSA key 0xF487EF185872D723
      # gpg: Good signature from "Juan Quintela <quintela@redhat.com>"
      # gpg:                 aka "Juan Quintela <quintela@trasno.org>"
      # Primary key fingerprint: 1899 FF8E DEBF 58CC EE03  4B82 F487 EF18 5872 D723
      
      * remotes/juanquintela/tags/migration/20171029:
        tests: check that migration parameters are really assigned
        tests: Don't abuse global_qtest
        tests: Factorize out migrate_test_start/end
        tests: Refactor setting of parameters/capabilities
        tests: rename postcopy-test to migration-test
        migration: Make xbzrle_cache_size a migration parameter
        migration: No need to return the size of the cache
        migration: Don't play games with the requested cache size
        migration: Make sure that we pass the right cache size
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      21dab18b
    • P
      Merge remote-tracking branch 'remotes/ehabkost/tags/x86-and-machine-pull-request' into staging · ab752f23
      Peter Maydell 提交于
      x86/cpu/numa queue, 2017-10-27
      
      # gpg: Signature made Fri 27 Oct 2017 15:17:12 BST
      # gpg:                using RSA key 0x2807936F984DC5A6
      # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"
      # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6
      
      * remotes/ehabkost/tags/x86-and-machine-pull-request: (39 commits)
        x86: Skip check apic_id_limit for Xen
        numa: fixup parsed NumaNodeOptions earlier
        mips: r4k: replace cpu_model with cpu_type
        mips: mipssim: replace cpu_model with cpu_type
        mips: Magnum/Acer Pica 61: replace cpu_model with cpu_type
        mips: fulong2e: replace cpu_model with cpu_type
        mips: malta/boston: replace cpu_model with cpu_type
        mips: use object_new() instead of gnew()+object_initialize()
        sparc: leon3: use generic cpu_model parsing
        sparc: sparc: use generic cpu_model parsing
        sparc: sun4u/sun4v/niagara: use generic cpu_model parsing
        sparc: cleanup cpu type name composition
        tricore: use generic cpu_model parsing
        tricore: cleanup cpu type name composition
        unicore32: use generic cpu_model parsing
        unicore32: cleanup cpu type name composition
        xtensa: lx60/lx200/ml605/kc705: use generic cpu_model parsing
        xtensa: sim: use generic cpu_model parsing
        xtensa: cleanup cpu type name composition
        sh4: remove SuperHCPUClass::name field
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      ab752f23
    • C
      s390-*.img: update s390 bios with latest fixes · 7a4ec18d
      Christian Borntraeger 提交于
      includes
      7618c0ae ("s390-ccw: print carriage return with new lines")
      a8fbbf1d ("s390: set DHCP client architecure id for netboot")
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      7a4ec18d
    • C
      s390-ccw: print carriage return with new lines · 7618c0ae
      Collin L. Walling 提交于
      The sclp console in the s390 bios writes raw data,
      leading console emulators (such as virsh console) to
      treat a new line ('\n') as just a new line instead
      of as a Unix line feed. Because of this, output
      appears in a "stair case" pattern.
      
      Let's print \r\n on every occurrence of a new line
      in the string passed to write to amend this issue.
      
      This is in sync with the guest Linux code in
      drivers/s390/char/sclp_vt220.c which also does a line feed
      conversion in the console part of the driver.
      
      This fixes the s390-ccw and s390-netboot output like
      $ virsh start test --console
      Domain test started
      Connected to domain test
      Escape character is ^]
      Network boot starting...
                                Using MAC address: 02:01:02:03:04:05
                                                                      Requesting information via DHCP:  010
      Signed-off-by: NCollin L. Walling <walling@linux.vnet.ibm.com>
      Message-Id: <1509120893-28054-1-git-send-email-walling@linux.vnet.ibm.com>
      Reviewed-by: NHalil Pasic <pasic@linux.vnet.ibm.com>
      Acked-by: NCornelia Huck <cohuck@redhat.com>
      Reviewed-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      7618c0ae
    • C
      s390x/kvm: use cpu model for gscb on compat machines · 0280b3eb
      Christian Borntraeger 提交于
      Starting a guest with
         <os>
          <type arch='s390x' machine='s390-ccw-virtio-2.9'>hvm</type>
        </os>
        <cpu mode='host-model'/>
      
      on an IBM z14 results in
      
      "qemu-system-s390x: Some features requested in the CPU model are not
      available in the configuration: gs"
      
      This is because guarded storage is fenced for compat machines that did
      not have guarded storage support. While this prevents future migration
      abort (by not starting the guest at all), not being able to start a
      "host-model" guest is very much unexpected.  As it turns out, even if we
      would modify libvirt to not expand the cpu model to contain "gs" for
      compat machines, it cannot guarantee that a migration will succeed. For
      example if the kernel changes its features (or the user has nested=1 on
      one host but not on the other) the migration will fail nevertheless.  So
      instead of fencing "gs" for machines <= 2.9 lets allow it for all
      machine types that support the CPU model. This will make "host-model"
      runnable all the time, while relying on the CPU model to reject invalid
      migration attempts. We also need to change the migration for guarded
      storage.
      Additional discussions about host-model are still pending but are out
      of scope of this patch.
      Suggested-by: NDavid Hildenbrand <david@redhat.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Acked-by: NDavid Hildenbrand <david@redhat.com>
      Acked-by: NCornelia Huck &lt;Cornelia Huck <cohuck@redhat.com>
      Acked-by: NHalil Pasic <pasic@linux.vnet.ibm.com>
      0280b3eb
    • D
      target/s390x: change CPU type name to "s390x-cpu" · e555cbe7
      David Hildenbrand 提交于
      For now, e.g. host-s390-cpu wasn't exposed to the user. cpu-add, -cpu
      and the CPU model qmp interfaces didn't care about the actual type,
      as that information was hidden.
      
      This changed with CPU hotplug via device_add. Now the type is visible to
      the user. Before we get that supported in a stable version, this is our
      last chance to change it.
      
      So change it from "s390-cpu" to "s390x-cpu", to match the architecture
      name. Example names are then e.g. z14-s390x-cpu or qemu-s390x-cpu.
      Signed-off-by: NDavid Hildenbrand <david@redhat.com>
      Message-Id: <20171020115803.14093-1-david@redhat.com>
      Acked-by: NCornelia Huck <cohuck@redhat.com>
      Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      e555cbe7
  3. 29 10月, 2017 9 次提交
  4. 28 10月, 2017 1 次提交
    • P
      Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2017-10-26-tag' into staging · 953e35f6
      Peter Maydell 提交于
      qemu-ga patch queue for 2.11
      
      * support for network interface stats
      * w32: improvements for guest-set-time
      * w32: fix a hang with guest-fsfreeze-freeze when timeout occurs
        during heavy I/O
      * w32: fix faulty error-handling in VSS/fsfreeze COM registration
      
      # gpg: Signature made Fri 27 Oct 2017 02:11:53 BST
      # gpg:                using RSA key 0x3353C9CEF108B584
      # gpg: Good signature from "Michael Roth <flukshun@gmail.com>"
      # gpg:                 aka "Michael Roth <mdroth@utexas.edu>"
      # gpg:                 aka "Michael Roth <mdroth@linux.vnet.ibm.com>"
      # Primary key fingerprint: CEAC C9E1 5534 EBAB B82D  3FA0 3353 C9CE F108 B584
      
      * remotes/mdroth/tags/qga-pull-2017-10-26-tag:
        qga-win: fix error-handling in getNameByStringSID()
        qga: add network stats to guest-network-get-interfaces
        qga-win: Updating guest_set_time action
        qga-win: don't hang if vss hold writes timeout
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      953e35f6
  5. 27 10月, 2017 17 次提交