<feed xmlns='http://www.w3.org/2005/Atom'>
<title>netbsd/sys/dev/pci/virtio_pci.c, branch trunk</title>
<subtitle>NetBSD fork for lockdoc analysis</subtitle>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/'/>
<entry>
<title>virtio(4): Fix byte order of DMA data for armeb in the same manner as</title>
<updated>2023-07-07T07:19:36+00:00</updated>
<author>
<name>rin</name>
<email>rin@NetBSD.org</email>
</author>
<published>2023-07-07T07:19:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=03b4d9a3e8cdbb1b0efa1f475bf2130c6f4f1cd1'/>
<id>03b4d9a3e8cdbb1b0efa1f475bf2130c6f4f1cd1</id>
<content type='text'>
aarch64eb.

Fix comments to explain what is going on for {arm,aarch64}eb on QEMU.
This is not due to QEMU bugs; it correctly configures everything for
little-endian environment, and we forcibly change byte order only for
CPU cores during kernel bootstrap.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
aarch64eb.

Fix comments to explain what is going on for {arm,aarch64}eb on QEMU.
This is not due to QEMU bugs; it correctly configures everything for
little-endian environment, and we forcibly change byte order only for
CPU cores during kernel bootstrap.</pre>
</div>
</content>
</entry>
<entry>
<title>Use enumeration for state of a child driver instead of flags</title>
<updated>2023-04-19T00:23:45+00:00</updated>
<author>
<name>yamaguchi</name>
<email>yamaguchi@NetBSD.org</email>
</author>
<published>2023-04-19T00:23:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=c78e0dcf5a0bea9808fb0588cb115d34e5b862e3'/>
<id>c78e0dcf5a0bea9808fb0588cb115d34e5b862e3</id>
<content type='text'>
and check its detaching by using sc-&gt;sc_child in virtio_softc

pointed out by riastradh, thanks.
fixes PR/57357</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
and check its detaching by using sc-&gt;sc_child in virtio_softc

pointed out by riastradh, thanks.
fixes PR/57357</pre>
</div>
</content>
</entry>
<entry>
<title>virtio@pci: Fix assertion on detach.</title>
<updated>2023-04-16T17:57:08+00:00</updated>
<author>
<name>riastradh</name>
<email>riastradh@NetBSD.org</email>
</author>
<published>2023-04-16T17:57:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=bd790685b11c55c499b206ac6e78984b099a893b'/>
<id>bd790685b11c55c499b206ac6e78984b099a893b</id>
<content type='text'>
If the child never attached in the first place, it's OK for it to not
have detached.

XXX This should not be a set of flags; this should be a state
enumeration, because some flags make no sense, like FINISHED|FAILED.

XXX This should not be asserted separately in each bus; there should
be a single place in virtio.c to assert this, uniformly in all buses.

PR kern/57357

XXX pullup-10</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the child never attached in the first place, it's OK for it to not
have detached.

XXX This should not be a set of flags; this should be a state
enumeration, because some flags make no sense, like FINISHED|FAILED.

XXX This should not be asserted separately in each bus; there should
be a single place in virtio.c to assert this, uniformly in all buses.

PR kern/57357

XXX pullup-10</pre>
</div>
</content>
</entry>
<entry>
<title>Added flags to store status of attaching a virtio device</title>
<updated>2023-03-31T07:34:26+00:00</updated>
<author>
<name>yamaguchi</name>
<email>yamaguchi@NetBSD.org</email>
</author>
<published>2023-03-31T07:34:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=ebfd8cf58ac547103948c4c4babf4b24f434f0dd'/>
<id>ebfd8cf58ac547103948c4c4babf4b24f434f0dd</id>
<content type='text'>
This prevents a panic on reboot after a virtio device had called
virtio_child_attach_failed().</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This prevents a panic on reboot after a virtio device had called
virtio_child_attach_failed().</pre>
</div>
</content>
</entry>
<entry>
<title>Set virtqueues in virtio_child_attach_finish</title>
<updated>2023-03-23T03:27:48+00:00</updated>
<author>
<name>yamaguchi</name>
<email>yamaguchi@NetBSD.org</email>
</author>
<published>2023-03-23T03:27:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=cd64efe29b3e5a2d52122476e460534dbf1f819f'/>
<id>cd64efe29b3e5a2d52122476e460534dbf1f819f</id>
<content type='text'>
The number of virtqueue maybe change in a part of VirtIO devices
(e.g. vioif(4)). And it is fixed after negotiation of features.
So the configuration is moved into the function.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The number of virtqueue maybe change in a part of VirtIO devices
(e.g. vioif(4)). And it is fixed after negotiation of features.
So the configuration is moved into the function.</pre>
</div>
</content>
</entry>
<entry>
<title>virtio at pci: Provide attribution in debug message.</title>
<updated>2022-05-30T20:28:18+00:00</updated>
<author>
<name>riastradh</name>
<email>riastradh@NetBSD.org</email>
</author>
<published>2022-05-30T20:28:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=bc9a3d53307310f8239cb82872e068b82d9808a3'/>
<id>bc9a3d53307310f8239cb82872e068b82d9808a3</id>
<content type='text'>
Also make it only happen in the error case so success doesn't clutter
up the console output.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also make it only happen in the error case so success doesn't clutter
up the console output.</pre>
</div>
</content>
</entry>
<entry>
<title>virtio_pci: Don't use a cast for upcasting.</title>
<updated>2022-04-13T22:41:17+00:00</updated>
<author>
<name>uwe</name>
<email>uwe@NetBSD.org</email>
</author>
<published>2022-04-13T22:41:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=893805f6d090aeb49e449f61b321c24e706d29ea'/>
<id>893805f6d090aeb49e449f61b321c24e706d29ea</id>
<content type='text'>
Same object code is generated.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Same object code is generated.</pre>
</div>
</content>
</entry>
<entry>
<title>virtio_pci_bus_space_write_8: don't use bus_space_write_8.</title>
<updated>2022-03-17T23:05:01+00:00</updated>
<author>
<name>uwe</name>
<email>uwe@NetBSD.org</email>
</author>
<published>2022-03-17T23:05:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=8044878026e31114ed91f4419e84331ebcdda7bd'/>
<id>8044878026e31114ed91f4419e84331ebcdda7bd</id>
<content type='text'>
The standard says:

  4.1.3.1 Driver Requirements: PCI Device Layout

  For device configuration access, the driver MUST use ... 32-bit
  wide and aligned accesses for ... 64-bit wide fields.  For 64-bit
  fields, the driver MAY access each of the high and low 32-bit parts
  of the field independently.

NB: "MAY" in this text refers to "independently" (i.e. the order of
accesses) not "32-bit" (which is restricted by the earlier "MUST").

Note also that virtio_{read,write}_device_config_8 in virtio.c already
uses two 32-bit accesses.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The standard says:

  4.1.3.1 Driver Requirements: PCI Device Layout

  For device configuration access, the driver MUST use ... 32-bit
  wide and aligned accesses for ... 64-bit wide fields.  For 64-bit
  fields, the driver MAY access each of the high and low 32-bit parts
  of the field independently.

NB: "MAY" in this text refers to "independently" (i.e. the order of
accesses) not "32-bit" (which is restricted by the earlier "MUST").

Note also that virtio_{read,write}_device_config_8 in virtio.c already
uses two 32-bit accesses.</pre>
</div>
</content>
</entry>
<entry>
<title>virtio_pci.c: use PCI_BAR macro instead of open-coding it.</title>
<updated>2022-03-17T22:53:13+00:00</updated>
<author>
<name>uwe</name>
<email>uwe@NetBSD.org</email>
</author>
<published>2022-03-17T22:53:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=687f794943c36621f8ee905561ba8b83bd8294d1'/>
<id>687f794943c36621f8ee905561ba8b83bd8294d1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>virtio_pci_match: add TODO about PCI Revision ID.</title>
<updated>2022-03-14T12:22:02+00:00</updated>
<author>
<name>uwe</name>
<email>uwe@NetBSD.org</email>
</author>
<published>2022-03-14T12:22:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.infra.scholz.ruhr/netbsd/commit/?id=46029e27e7c63f06206b826810701b42b60aad04'/>
<id>46029e27e7c63f06206b826810701b42b60aad04</id>
<content type='text'>
The standard says:

  Transitional devices MUST have a PCI Revision ID of 0.

  Non-transitional devices SHOULD have a PCI Revision ID of 1 or higher.
  Drivers MUST match any PCI Revision ID value.

so we must not check the revision id for non-transitional devices.
The code in attach relies on the revision being specifically(NB!) 1 so
this calls for a revision, but I can't test this properly at the
moment, so just leave a reminder.  Comment change only.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The standard says:

  Transitional devices MUST have a PCI Revision ID of 0.

  Non-transitional devices SHOULD have a PCI Revision ID of 1 or higher.
  Drivers MUST match any PCI Revision ID value.

so we must not check the revision id for non-transitional devices.
The code in attach relies on the revision being specifically(NB!) 1 so
this calls for a revision, but I can't test this properly at the
moment, so just leave a reminder.  Comment change only.</pre>
</div>
</content>
</entry>
</feed>
