qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 3c788e: s390x/css: reassign subchannel if sch


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 3c788e: s390x/css: reassign subchannel if schid is changed...
Date: Mon, 20 Mar 2017 04:30:11 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 3c788ebc6f6eef5ac6e9cb4a28c578abcf08247d
      
https://github.com/qemu/qemu/commit/3c788ebc6f6eef5ac6e9cb4a28c578abcf08247d
  Author: Dong Jia Shi <address@hidden>
  Date:   2017-03-20 (Mon, 20 Mar 2017)

  Changed paths:
    M hw/s390x/css.c

  Log Message:
  -----------
  s390x/css: reassign subchannel if schid is changed after migration

The subchannel is a means to access a device. While the device number is
assigned by the administrator, the subchannel number is assigned by
the channel subsystem in an ascending order on cold and hot plug.
When doing unplug and replug operations, the same device may end up on
a different subchannel; for example

- We start with a device fe.1.2222, which ends up at subchannel
  fe.1.0000.
- Now we detach the device, attach a device fe.1.3333 (which would get
  the now-free subchannel fe.1.0000), re-attach fe.1.2222 (which ends
  up at subchannel fe.1.0001) and detach fe.1.3333.
- We now have the same device (fe.1.2222) available to the guest; it
  just shows up on a different subchannel.

In such a case, the subchannel numbers are different from what a
QEMU would create during cold plug when parsing the command line.

As this would cause a guest visible change on migration, we do restore
the source system's value of the subchannel number on load.

So we are now fine from the guest perspective. From the host
perspective this will cause an inconsistent state in our internal data
structures, though.

For example, the subchannel 0 might not be at array position 0. This will
lead to problems when we continue doing hot (un/re) plug operations.

Let's fix this by cleaning up our internal data structures.

Reported-by: Cornelia Huck <address@hidden>
Signed-off-by: Dong Jia Shi <address@hidden>
Cc: address@hidden
Signed-off-by: Cornelia Huck <address@hidden>


  Commit: 00e7c07b06d004cf54b19724f82afde8a7a37f37
      
https://github.com/qemu/qemu/commit/00e7c07b06d004cf54b19724f82afde8a7a37f37
  Author: Peter Maydell <address@hidden>
  Date:   2017-03-20 (Mon, 20 Mar 2017)

  Changed paths:
    M hw/s390x/css.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20170320' into staging

One bugfix for device plug/unplug and migration in the
channel subsystem code.

# gpg: Signature made Mon 20 Mar 2017 08:45:59 GMT
# gpg:                using RSA key 0xDECF6B93C6F02FAF
# gpg: Good signature from "Cornelia Huck <address@hidden>"
# gpg:                 aka "Cornelia Huck <address@hidden>"
# Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF

* remotes/cohuck/tags/s390x-20170320:
  s390x/css: reassign subchannel if schid is changed after migration

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


Compare: https://github.com/qemu/qemu/compare/bedf13ecab38...00e7c07b06d0

reply via email to

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