On Fri, Jul 21, 2023 at 03:32:27PM +0200, Roger Pau Monné wrote: > On Thu, Jul 20, 2023 at 12:32:33AM +0000, Volodymyr Babchuk wrote: > > From: Oleksandr Andrushchenko <[email protected]> > > + /* > > + * According to "PCI LOCAL BUS SPECIFICATION, REV. 3.0", section "6.2.2 > > + * Device Control" the reset state of the command register is > > + * typically all 0's, so this is used as initial value for the guests. > > + */ > > + ASSERT(header->guest_cmd == 0); > > Hm, while that would be the expectation, shouldn't the command register > reflect the current state of the hardware? > > I think you want to check 'cmd' so it's sane, and complain otherwise but > propagate the value to the guest view.
In fact asserting that header->guest_cmd == 0 is pointless, as the structure has just been allocated and zeroed. We do not assert that the other fields are also zeroed. Thanks, Roger.
