Hi, Roger!
On 13.01.22 13:07, Roger Pau Monné wrote: > On Thu, Nov 25, 2021 at 01:02:47PM +0200, Oleksandr Andrushchenko wrote: >> From: Oleksandr Andrushchenko <[email protected]> >> >> Reset the command register when passing through a PCI device: >> it is possible that when passing through a PCI device its memory >> decoding bits in the command register are already set. Thus, a >> guest OS may not write to the command register to update memory >> decoding, so guest mappings (guest's view of the BARs) are >> left not updated. >> >> Signed-off-by: Oleksandr Andrushchenko <[email protected]> >> --- >> Since v1: >> - do not write 0 to the command register, but respect host settings. > There's not much respect of host setting here, are you are basically > writing 0 except for the INTX_DISABLE which will be set if MSI(X) is > enabled. Yes, and this is because we only support INTX emulation at the moment > > I wonder whether you really need this anyway. I would expect that a > device that's being assigned to a guest has just been reset globally, > so there should be no need to reset the command register explicitly. From my experience it was a real case when the device was not reset making troubles. I'll remove this patch for now and see if I can still run without it relying on the device reset which must be in place while assigning a PCI device (here we rely on the toolstack, right?). > > Thanks, Roger. Thank you, Oleksandr
