hw/ppc/spapr: Fix virtio-scsi bootindex handling for LUNs >= 256
commitbac658d1a4dc9dd637b2eb5006abda137071f17f
authorThomas Huth <thuth@redhat.com>
Mon, 20 Nov 2017 07:44:38 +0000 (20 08:44 +0100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 22 Nov 2017 04:28:37 +0000 (22 15:28 +1100)
treeeb5e1642ca72b10affc4b3c45c67f25d5bf05b68
parenta15d835f00dce270fd3194e83d9910f4b5b44ac0
hw/ppc/spapr: Fix virtio-scsi bootindex handling for LUNs >= 256

LUNs >= 256 have to be encoded with the so-called "flat space
addressing method" for virtio-scsi, where an additional bit has to
be set. SLOF already took care of this with the following commit:

 https://git.qemu.org/?p=SLOF.git;a=commitdiff;h=f72a37713fea47da
 (see https://bugzilla.redhat.com/show_bug.cgi?id=1431584 for details)

But QEMU does not use this encoding yet for device tree paths
that have to be handed over to SLOF to deal with the "bootindex"
property, so SLOF currently fails to boot from virtio-scsi devices
with LUNs >= 256 in the right boot order. Fix it by using the bit
to indicate the "flat space addressing method" for LUNs >= 256.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr.c