<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/virtio_config.h, branch v4.4.159</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.159</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.159'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2015-06-01T13:48:54Z</updated>
<entry>
<title>virtio: add explicit big-endian support to memory accessors</title>
<updated>2015-06-01T13:48:54Z</updated>
<author>
<name>Greg Kurz</name>
<email>gkurz@linux.vnet.ibm.com</email>
</author>
<published>2015-04-24T12:26:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7d82410950aa74adccf035c332e409af2bb93e92'/>
<id>urn:sha1:7d82410950aa74adccf035c332e409af2bb93e92</id>
<content type='text'>
The current memory accessors logic is:
- little endian if little_endian
- native endian (i.e. no byteswap) if !little_endian

If we want to fully support cross-endian vhost, we also need to be
able to convert to big endian.

Instead of changing the little_endian argument to some 3-value enum, this
patch changes the logic to:
- little endian if little_endian
- big endian if !little_endian

The native endian case is handled by all users with a trivial helper. This
patch doesn't change any functionality, nor it does add overhead.

Signed-off-by: Greg Kurz &lt;gkurz@linux.vnet.ibm.com&gt;

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Reviewed-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</content>
</entry>
<entry>
<title>virtio: introduce virtio_is_little_endian() helper</title>
<updated>2015-06-01T13:48:49Z</updated>
<author>
<name>Greg Kurz</name>
<email>gkurz@linux.vnet.ibm.com</email>
</author>
<published>2015-04-24T12:24:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cf561f0d2eb74574ad9985a2feab134267a9d298'/>
<id>urn:sha1:cf561f0d2eb74574ad9985a2feab134267a9d298</id>
<content type='text'>
Signed-off-by: Greg Kurz &lt;gkurz@linux.vnet.ibm.com&gt;

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
</content>
</entry>
<entry>
<title>virtio: drop a useless config read</title>
<updated>2015-04-01T04:07:14Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2015-04-01T03:01:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=012665391dfe12bf8a88d1000e627be012c39dbf'/>
<id>urn:sha1:012665391dfe12bf8a88d1000e627be012c39dbf</id>
<content type='text'>
    "virtio: core support for config generation"
fixed reading up 64 bit values, adding generation
checks for such reads.

By mistake, it left an explicit get call in place
as well. the result is that the value is read twice,
the first result is discarded.

Not a big deal since this only happens with virtio
blk and only on boot ATM, so performance isn't
affected, but let's clean it up.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Reviewed-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>virtio_config: reorder functions</title>
<updated>2015-04-01T04:07:13Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2015-03-31T21:51:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=caa0e2d0e331a04cbc1cb9bca3169c1d94b80838'/>
<id>urn:sha1:caa0e2d0e331a04cbc1cb9bca3169c1d94b80838</id>
<content type='text'>
This simply reorders functions in virtio_config
so width access wrapper helpers are all together.
Drops an extra empty line while we are at it.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>virtio: core support for config generation</title>
<updated>2014-12-14T16:21:31Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2014-12-14T14:55:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d71de9ec6ba806104439d3a669befda84757b5af'/>
<id>urn:sha1:d71de9ec6ba806104439d3a669befda84757b5af</id>
<content type='text'>
virtio 1.0 spec says:

Drivers MUST NOT assume reads from fields greater than 32 bits wide are
atomic, nor are reads from multiple fields: drivers SHOULD read device
configuration space fields like so:
	u32 before, after;
	do {
		before = get_config_generation(device);
		// read config entry/entries.
		after = get_config_generation(device);
	} while (after != before);

Do exactly this, for transports that support it.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>virtio_config: fix virtio_cread_bytes</title>
<updated>2014-12-11T18:04:38Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2014-12-11T13:54:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3d2667826cbb5e2eb8d8c7ee92f74bcb00b36a2f'/>
<id>urn:sha1:3d2667826cbb5e2eb8d8c7ee92f74bcb00b36a2f</id>
<content type='text'>
virtio_cread_bytes is implemented incorrectly in case length happens to
be 2,4 or 8 bytes: transports and devices will assume it's an integer
value that has to be converted to LE format.

Let's just do multiple 1-byte reads: this also makes life easier
for transports who only need to implement 1,2,4 and 8 byte reads.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>virtio: allow finalize_features to fail</title>
<updated>2014-12-09T14:32:32Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2014-12-04T18:20:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5c609a5ef05d98e26778824ba84581fe5e400db6'/>
<id>urn:sha1:5c609a5ef05d98e26778824ba84581fe5e400db6</id>
<content type='text'>
This will make it easy for transports to validate features and return
failure.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>virtio_config: endian conversion for v1.0</title>
<updated>2014-12-09T10:05:25Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2014-10-22T13:59:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=92e6d7438ee631aac85258ee3d4de8c860d8c32f'/>
<id>urn:sha1:92e6d7438ee631aac85258ee3d4de8c860d8c32f</id>
<content type='text'>
We (ab)use virtio conversion functions for device-specific
config space accesses.

Based on original patches by Cornelia and Rusty.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Reviewed-by: David Hildenbrand &lt;dahi@linux.vnet.com&gt;




</content>
</entry>
<entry>
<title>virtio: memory access APIs</title>
<updated>2014-12-09T10:05:24Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2014-10-22T12:35:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=eef960a04354d13426c43a4e3750a5e2b383040c'/>
<id>urn:sha1:eef960a04354d13426c43a4e3750a5e2b383040c</id>
<content type='text'>
virtio 1.0 makes all memory structures LE, so
we need APIs to conditionally do a byteswap on BE
architectures.

To make it easier to check code statically,
add virtio specific types for multi-byte integers
in memory.

Add low level wrappers that do a byteswap conditionally, these will be
useful e.g. for vhost.  Add high level wrappers that
query device endian-ness and act accordingly.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Reviewed-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;




</content>
</entry>
<entry>
<title>virtio: add support for 64 bit features.</title>
<updated>2014-12-09T10:05:24Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2014-10-07T14:39:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d025477368792b272802146a86e41f81a54d8a19'/>
<id>urn:sha1:d025477368792b272802146a86e41f81a54d8a19</id>
<content type='text'>
Change u32 to u64, and use BIT_ULL and 1ULL everywhere.

Note: transports are unchanged, and only set low 32 bit.
This guarantees that no transport sets e.g. VERSION_1
by mistake without proper support.

Based on patch by Rusty.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Reviewed-by: David Hildenbrand &lt;dahi@linux.vnet.ibm.com&gt;
Reviewed-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;




</content>
</entry>
</feed>
