On 18/04/2019 00.01, Stephen Checkoway wrote: > It's common for multiple narrow flash chips to be hooked up in parallel > to support wider buses. For example, four 8-bit wide flash chips (x8) > may be combined in parallel to produce a 32-bit wide device. Similarly, > two 16-bit wide chips (x16) may be combined. > > This commit introduces `device-width` and `max-device-width` properties, > similar to pflash_cfi01, with the following meanings: > - `width`: The width of the logical, qemu device (same as before); > - `device-width`: The width of an individual flash chip, defaulting to > `width`; and > - `max-device-width`: The maximum width of an individual flash chip, > defaulting to `device-width`. > > Nothing needs to change to support reading such interleaved devices but > commands (e.g., erase and programming) must be sent to all devices at > the same time or else the various chips will be in different states. > > For example, a 4-byte wide logical device can be composed of four x8/x16 > devices in x8 mode. That is, each device supports both x8 or x16 and > they're being used in the byte, rather than word, mode. This > configuration would have `width=4`, `device-width=1`, and > `max-device-width=2`. > > In addition to commands being sent to all devices, guest firmware > expects the status and CFI queries to be replicated for each device. > (The one exception to the response replication is that each device gets > to report its own status bit DQ7 while programming because its value > depends on the value being programmed which will usually differ for each > device.) > > Testing is limited to 16-bit wide devices due to the current inability > to override the properties set by `pflash_cfi02_register`, but multiple > configurations are tested. > > Stop using global_qtest. Instead, package the qtest variable inside the > FlashConfig structure.
Thanks for doing that change wrt global_qtest! Acked-by: Thomas Huth <th...@redhat.com>