Age | Commit message (Collapse) | Author |
|
The virtio-gpu protocol is based on opaque host resources backed by
guest-allocated memory. This requires transferring data from guest
framebuffers to host display device buffers.
When the host supports VIRGL, the GPU is used for both 2D and 3D
rendering, in which case the memory transfer can take the form of a DMA
operation without incurring significant costs. However, when VIRGL
support isn't available, 2D transfers require a CPU memory copy for
every page flip. Display is slowed down to an unusable state.
To solve this problem, extend the virtio-gpu protocol with the ability
for the host to allocate resource backing storage and map it to the
guest. The allocated memory can then be used directly by the host-side
display device, removing the need for memory copy operations.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Resuming the effort to get the gpu device specs merged.
Support for 2d mode (3d/virgl mode is not covered by this patch) has
been added to the linux kernel version 4.2 and to qemu version 2.4.
git branch:
https://www.kraxel.org/cgit/virtio-spec/commit/?h=virtio-gpu
Rendered versions are available here:
https://www.kraxel.org/virtio/virtio-v1.0-cs03-virtio-gpu.pdf
https://www.kraxel.org/virtio/virtio-v1.0-cs03-virtio-gpu.html#x1-2800007
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
Allocate a feature bit for virtio devices which support SR-IOV.
Note: at proposer's request, driver requirements have been
omitted - a reworked version is now being discussed.
Suggested-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/11
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
|
|
There will be hardware virtio devices in the future, which
require drivers to use the barriers suitable for I/O devices,
compared with software virtio devices which just require
drivers to use the barriers suitable for CPU cores.
To fix the ordering issue for hardware virtio devices, add
a new feature: VIRTIO_F_IO_BARRIER. When negotiated, driver
will use the barriers suitable for I/O devices.
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/10
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
The Linux kernel exports the number of successful and failed
hugetlb page allocations via the virtio balloon driver. These
two counts need to be documented in this specification.
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/8
Signed-off-by: Jonathan Helman <jonathan.helman@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
authoritative source is the tagged version.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Only the device updates the used ring.
This looks like a typo as a result of copy-paste from the description of
the Available Ring.
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/12
Signed-off-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
This reverts commit 396b1957817e0bd14697e28d9fe61bfc80f1350f.
Was pushed by mistake.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Unfortunately some systems (e.g. RHEL7.5 and derivatives) lack
the ellipsis package. As it's function is merely cosmetic,
support these systems by loading the package conditionally.
Tested-by: Mihai Carabas <mihai.carabas@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
We don't really use todonotes, this dependency can be dropped. We do
need to import xcolor which was previously pulled in by todonotes.
Tested-by: Mihai Carabas <mihai.carabas@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Some devices benefit from ability to find out the number of available
descriptors in the ring: for efficiency or as a debugging aid.
To help with these optimizations, add a new feature:
VIRTIO_F_NOTIFICATION_DATA. When negotiated, driver notifications to the
device include this extra information.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Either "an example of driver code" or "a driver code example" would
work.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/7
Approved-by: https://www.oasis-open.org/committees/ballot.php?id=3184
|
|
Either it needs to be "the descriptors flags are update" (since "flags"
is plural) or "the descriptor flags field is updated". Since "flags" is
a name of a specific field, I chose the latter solution.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/7
Approved-by: https://www.oasis-open.org/committees/ballot.php?id=3184
|
|
There are two instances where plural needs to be used instead of
singular:
1. "descriptor(s)" is used later in the text, so use it consistently
instead of starting with "descriptor" and switching later.
2. "What follows is the requirements" ->
"What follows are the requirements"
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/7
Approved-by: https://www.oasis-open.org/committees/ballot.php?id=3184
|
|
Names are capitalized, like the Element Length field. General terms
like descriptor are not capitalized.
This patch fixes two instances where this is inconsistent.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/7
Approved-by: https://www.oasis-open.org/committees/ballot.php?id=3184
|
|
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/7
Approved-by: https://www.oasis-open.org/committees/ballot.php?id=3184
|
|
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/7
Approved-by: https://www.oasis-open.org/committees/ballot.php?id=3184
|
|
There are several sentence structures used throughout the text where an
article is missing. For example:
... allocated by driver.
or
Driver then notifies the device.
Standards documents normally use complete sentences so this patch adds
the missing articles required before the noun ("driver"):
... allocated by the driver.
or
The driver then notifies the device.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/7
Approved-by: https://www.oasis-open.org/committees/ballot.php?id=3184
|
|
The flag VIRTIO_NET_HDR_F_DATA_VALID is aleady mentioned in the virtio-net
spec however it is not defined in the struct. This flag is already defined
and used in virtio-net device in Qemu as well as some of it's drivers.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/6
Approved-by: https://www.oasis-open.org/apps/org/workgroup/virtio/ballot.php?id=3182
|
|
Linux kernel provides some balloon memory statistics that were not
included in the specs. Include them to avoid any ID clashes in the
future.
Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/4
Approved-by: https://www.oasis-open.org/apps/org/workgroup/virtio/ballot.php?id=3180
|
|
Existing virtio-blk protocol doesn't have DISCARD/WRITE ZEROES support,
this will impact the performance when using SSD backend over file systems.
Here is the proposal to extend existing virtio-blk protocol to support
DISCARD/WRITE ZEROES commands.
Basic idea here is using 16 Bytes payload to support 1 descriptor, users
can put several segments together with 1 DISCARD/WRITE ZEROES command.
struct virtio_blk_discard_write_zeroes {
le64 sector;
le32 num_sectors;
struct {
le32 unmap:1;
le32 reserved:31;
} flags;
};
For the purpose to support such feature, we need to introduce 2 new feature
flags: VIRTIO_BLK_F_DISCARD/VIRTIO_BLK_F_WRITE_ZEROES, and 2 new command
types: VIRTIO_BLK_T_DISCARD/VIRTIO_BLK_T_WRITE_ZEROES. Also we introduce
several new parameters in the configuration space of virtio-blk:
max_discard_sectors/max_discard_seg/max_write_zeroes_sectors.
These parameters will tell the OS what's the granularity when
issuing such commands.
If both DISCARD and WRITE ZEROES are supported, unmap flag bit maybe used
for WRITE ZEROES command with DISCARD bit enabled.
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Approved-by: https://www.oasis-open.org/apps/org/workgroup/virtio/ballot.php?id=3181
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/5
|
|
For a split ring, require that drivers use descriptors in order too.
This allows devices to skip reading the available ring.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Approved-by: https://www.oasis-open.org/apps/org/workgroup/virtio/ballot.php?id=3177
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/3
|
|
Support in-order requests for packed rings.
This allows selective write-out of used descriptors.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Approved-by: https://www.oasis-open.org/apps/org/workgroup/virtio/ballot.php?id=3177
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/3
|
|
Using descriptors in-order is sometimes beneficial. Add an option for
that - per-format detail allowing more optimizations will be added by
follow-up patches.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Approved-by: https://www.oasis-open.org/apps/org/workgroup/virtio/ballot.php?id=3177
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/3
|
|
Performance analysis of this is in my kvm forum 2016 presentation. The
idea is to have a r/w descriptor in a ring structure, replacing the used
and available ring, index and descriptor buffer.
This is also easier for devices to implement than the 1.0 layout.
Several more enhancements will be necessary to actually make this
efficient for devices to use.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Approved-by: https://www.oasis-open.org/apps/org/workgroup/virtio/ballot.php?id=3177
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/3
|
|
Approved-by: https://www.oasis-open.org/apps/org/workgroup/virtio/ballot.php?id=3177
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/3
|
|
Update generic text to talk about available/used buffers, not rings.
Move some split-ring specific text to the correct section.
Update conformance section with link to the new conformance clause.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Approved-by: https://www.oasis-open.org/apps/org/workgroup/virtio/ballot.php?id=3177
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/3
|
|
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Approved-by: https://www.oasis-open.org/apps/org/workgroup/virtio/ballot.php?id=3177
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/3
|
|
Replace descriptor table/available ring/used ring
with descriptor area/driver area/device area
in all transports.
Document what's in which area.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Approved-by: https://www.oasis-open.org/apps/org/workgroup/virtio/ballot.php?id=3177
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/3
|
|
Document buffer used len and use that terminology everywhere in the
generic section.
Further, drop the 'used ring' terminology and just say virtqueue.
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Approved-by: https://www.oasis-open.org/apps/org/workgroup/virtio/ballot.php?id=3177
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/3
|
|
virtqueue operation description is specific to the virtqueue
format. Move it out to split-ring.tex and update all
references.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Approved-by: https://www.oasis-open.org/apps/org/workgroup/virtio/ballot.php?id=3177
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/3
|
|
Will be easier to manage this way.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Approved-by: https://www.oasis-open.org/apps/org/workgroup/virtio/ballot.php?id=3177
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/3
|
|
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Approved-by: https://www.oasis-open.org/apps/org/workgroup/virtio/ballot.php?id=3177
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/3
|
|
Bitfields are a useful and familiar way to specify sub-byte structure
layout. The only issue is that bitfield order isn't portable across
architectures. Document that we list bitfields from least to
most significant one, and warn about portability issues.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Approved-by: https://www.oasis-open.org/apps/org/workgroup/virtio/ballot.php?id=3177
Fixes: https://github.com/oasis-tcs/virtio-spec/issues/3
|
|
Document that we don't accept pull requests at this point.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Fixes: VIRTIO-155
Approved-by: https://www.oasis-open.org/apps/org/workgroup/virtio/ballot.php?id=3118
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Add links to admin repo and mailing lists.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Reserve device ID 23 for virtio-iommu devices.
Resolved VIRTIO-162
Approved https://www.oasis-open.org/apps/org/workgroup/virtio/ballot.php?id=3155
Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
VIRTIO-84 added a requirement that each buffer is > header size but
there's no reason to require that for merge-able buffers since data can
be placed in follow-up buffers.
The current wording seems confusing enough that it seems likely
no one relies on this.
VIRTIO-159
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <1490654778-11857-1-git-send-email-mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
|
|
The idea behind mergeable buffers was to simply use them in a way
similar to a chain of descriptors. Unfortunately the current text does
not say so - apparently nothing says device can't spread a packet over
as many buffers as it likes - but this didn't prevent drivers from
relying on buffers being used as a chain of descriptors, completely -
and blindly accessing it without checking the length at least for the
packet header.
Let's just make the spec match this reality - if devices ever want more
flexibility, we can add a feature bit.
Further, correct all misuses of a "descriptor" to "buffer" as that
is the entity that is being merged.
VIRTIO-160
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <1490655576-12173-1-git-send-email-mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
|
|
receiveq(n) is at position 2(n-1), not 2n. Same error for transmitq(n)
and controlq.
VIRTIO-161
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Halil Pasic <pasic@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
|
|
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
|
|
This merges in the OASIS boilerplate files in preparation to
moving virtio spec development to git, as approved at:
https://www.oasis-open.org/apps/org/workgroup/virtio/ballot.php?id=3120
Files added:
CONTRIBUTING.md
LICENSE.md
README.md
TODO: tweak boilerplate files as appropriate/needed.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
On most virtio systems, physical addresses are provided from the driver
to the device and subsequently used to access memory directly. However,
some systems feature an IOMMU that complicates things slightly:
- The IOMMU might require configuration for DMA to work at all. Once
configured, the driver must pass bus addresses to the device, which
are then translated by the IOMMU into physical addresses in memory.
- The IOMMU might be bypassed by virtio DMA. In this case, physical
addresses must still be provided to the device by the driver, even
though an IOMMU appears to be present.
This has been solved by the addition of a new reserved feature bit,
VIRTIO_F_IOMMU_PLATFORM, to describe the two cases above. Legacy systems
will not negotiate the feature, and therefore continue to operate
directly on physical addresses.
VIRTIO-154
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio/trunk@587 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652
|