Dual SPI master control
A 4-way unidirectional digital multiplexer would do the trick. You can use a 74244 to produce this function (74HCT244 for 5 V logic, 74LVC244 for 3.3 V). It contains two tristate 4-bit buffers (see below).



(Sorry, unable to draw a schematic at present.)

Each master can have a 4-bit channel. Each master's SCK, MOSI and /CS drive the 1A or 2A buffer inputs with MISO taken a 1Y or 2Y buffer output. The other side of the channel buffers are connected to your SPI slave. Don't forget to put a 10 K pull-up on the slave's /CS. The slave's SCK also needs a 10 K pull-up or pull-down to pull it to its idle state, depending on your SPI mode used.

Connect /1OE to a select signal and /2OE to the inverse of the select signal. You can then switch between the two masters using select.