qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 96994f: migration/xen: Check return value of


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 96994f: migration/xen: Check return value of qemu_fclose
Date: Fri, 16 Feb 2018 06:25:41 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 96994fd1e4e0da2a3b5d585a58621722199c67c9
      
https://github.com/qemu/qemu/commit/96994fd1e4e0da2a3b5d585a58621722199c67c9
  Author: Ross Lagerwall <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration/xen: Check return value of qemu_fclose

QEMUFile uses buffered IO so when writing small amounts (such as the Xen
device state file), the actual write call and any errors that may occur
only happen as part of qemu_fclose(). Therefore, report IO errors when
saving the device state under Xen by checking the return value of
qemu_fclose().

Signed-off-by: Ross Lagerwall <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>


  Commit: c2eb7f213a15b870f7a35ec961e4f1e0f7e2df91
      
https://github.com/qemu/qemu/commit/c2eb7f213a15b870f7a35ec961e4f1e0f7e2df91
  Author: Greg Kurz <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M docs/devel/migration.rst
    M hmp-commands.hx
    M qapi/migration.json

  Log Message:
  -----------
  migration: improve documentation of postcopy-ram

This capability must have the same value on both source and destination,
otherwise migration fails (commit 875fcd013ab6 "migration: incoming
postcopy advise sanity checks").

Let's write it down in various places where postcopy-ram is documented.

Signed-off-by: Greg Kurz <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 17ca7746d7fcb11e524fd70341506e7e5c5cb8c9
      
https://github.com/qemu/qemu/commit/17ca7746d7fcb11e524fd70341506e7e5c5cb8c9
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M tests/migration-test.c
    A tests/migration/rebuild-x86-bootblock.sh
    A tests/migration/x86-a-b-bootblock.h
    A tests/migration/x86-a-b-bootblock.s

  Log Message:
  -----------
  tests/migration: Add source to PC boot block

The boot block used in the migration test is currently only
shipped as a hex (with the source in the git commit message of ea0c6d62),
change this to actually include the source.

A script is added to rebuild the header but the expectation is that
the generated hex is shipped as well as the .s, so that
there's no requirement to have just the right assembler etc.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
  Removed blank line at end of script


  Commit: b9ccaf6d74a2c2b055a843bc8c8aa3f8fcda7920
      
https://github.com/qemu/qemu/commit/b9ccaf6d74a2c2b055a843bc8c8aa3f8fcda7920
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: Fix early failure cleanup

Avoid crash in cleanup after a very early migration failure
(possibly due to my 688a3dcba980bf01344a  'Route errors down ...')

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Peter Xu <address@hidden>


  Commit: 2c9bb29703caa8fd31078cc38b3b53762557c27c
      
https://github.com/qemu/qemu/commit/2c9bb29703caa8fd31078cc38b3b53762557c27c
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M tests/migration-test.c

  Log Message:
  -----------
  tests/migration: Add test for migration to bad destination

Check the source survives.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Peter Xu <address@hidden>


  Commit: 7a9ddfbfae4aaf8a7e4dafb57ac9fecad807a6b7
      
https://github.com/qemu/qemu/commit/7a9ddfbfae4aaf8a7e4dafb57ac9fecad807a6b7
  Author: Peter Xu <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M migration/migration.c
    M migration/ram.c
    M migration/savevm.c

  Log Message:
  -----------
  migration: better error handling with QEMUFile

If the postcopy down due to some reason, we can always see this on dst:

  qemu-system-x86_64: RP: Received invalid message 0x0000 length 0x0000

However in most cases that's not the real issue. The problem is that
qemu_get_be16() has no way to show whether the returned data is valid or
not, and we are _always_ assuming it is valid. That's possibly not wise.

The best approach to solve this would be: refactoring QEMUFile interface
to allow the APIs to return error if there is. However it needs quite a
bit of work and testing. For now, let's explicitly check the validity
first before using the data in all places for qemu_get_*().

This patch tries to fix most of the cases I can see. Only if we are with
this, can we make sure we are processing the valid data, and also can we
make sure we can capture the channel down events correctly.

Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 64f615fe34b4d9e2487fbe61ecb7b4041fc6beb9
      
https://github.com/qemu/qemu/commit/64f615fe34b4d9e2487fbe61ecb7b4041fc6beb9
  Author: Peter Xu <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M migration/migration.h
    M migration/postcopy-ram.c

  Log Message:
  -----------
  migration: reuse mis->userfault_quit_fd

It was only used for quitting the page fault thread before. Let it be
something more useful - now we can use it to notify a "wake" for the
page fault thread (for any reason), and it only means "quit" if the
fault_thread_quit is set.

Since we changed what it does, renaming it to userfault_event_fd.

Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 9ab7ef9b66661819086db9d2ca04e22408e5ca16
      
https://github.com/qemu/qemu/commit/9ab7ef9b66661819086db9d2ca04e22408e5ca16
  Author: Peter Xu <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M migration/postcopy-ram.c
    M migration/postcopy-ram.h

  Log Message:
  -----------
  migration: provide postcopy_fault_thread_notify()

A general helper to notify the fault thread.

Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: d6208e35e4a228fb07bac60095c5fac706c3fde7
      
https://github.com/qemu/qemu/commit/d6208e35e4a228fb07bac60095c5fac706c3fde7
  Author: Peter Xu <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M migration/migration.c
    M migration/migration.h

  Log Message:
  -----------
  migration: allow send_rq to fail

We will not allow failures to happen when sending data from destination
to source via the return path. However it is possible that there can be
errors along the way.  This patch allows the migrate_send_rp_message()
to return error when it happens, and further extended it to
migrate_send_rp_req_pages().

Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 3e0c8050ebba3f55dc2d92b3790a3cfb80786d07
      
https://github.com/qemu/qemu/commit/3e0c8050ebba3f55dc2d92b3790a3cfb80786d07
  Author: Peter Xu <address@hidden>
  Date:   2018-02-14 (Wed, 14 Feb 2018)

  Changed paths:
    M migration/migration.c
    M migration/migration.h
    M migration/savevm.c

  Log Message:
  -----------
  migration: pass MigrationState to migrate_init()

Let the callers take the object, then pass it to migrate_init().

Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>


  Commit: 648ba915961664ecb4cff0ee847a929c65e4b4b4
      
https://github.com/qemu/qemu/commit/648ba915961664ecb4cff0ee847a929c65e4b4b4
  Author: Peter Maydell <address@hidden>
  Date:   2018-02-16 (Fri, 16 Feb 2018)

  Changed paths:
    M docs/devel/migration.rst
    M hmp-commands.hx
    M migration/migration.c
    M migration/migration.h
    M migration/postcopy-ram.c
    M migration/postcopy-ram.h
    M migration/ram.c
    M migration/savevm.c
    M qapi/migration.json
    M tests/migration-test.c
    A tests/migration/rebuild-x86-bootblock.sh
    A tests/migration/x86-a-b-bootblock.h
    A tests/migration/x86-a-b-bootblock.s

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20180214a' 
into staging

Migration pull 20180214

Note that the 'Add test for migration to bad destination' displays
a 'Connection refused' during running, but still gives the correct exit
code and OK (It's checking that the source doesn't fail when
it can't connect, so that's the right error).
If it's particularly disliked that patch can be skipped individually.

# gpg: Signature made Wed 14 Feb 2018 15:33:04 GMT
# gpg:                using RSA key 0516331EBC5BFDE7
# gpg: Good signature from "Dr. David Alan Gilbert (RH2) <address@hidden>"
# Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A  9FA9 0516 331E BC5B FDE7

* remotes/dgilbert/tags/pull-migration-20180214a:
  migration: pass MigrationState to migrate_init()
  migration: allow send_rq to fail
  migration: provide postcopy_fault_thread_notify()
  migration: reuse mis->userfault_quit_fd
  migration: better error handling with QEMUFile
  tests/migration: Add test for migration to bad destination
  migration: Fix early failure cleanup
  tests/migration: Add source to PC boot block
  migration: improve documentation of postcopy-ram
  migration/xen: Check return value of qemu_fclose

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/0402ca3c7035...648ba9159616

reply via email to

[Prev in Thread] Current Thread [Next in Thread]