Peer shared memory communication device (virtio-peer) GENERAL OVERVIEW Virtqueue View

Window View

The Virtio Peer shared memory emory communication device (virtio-peer) is a virtual device which allows high performance low latency guest to guest communication. It uses a new queue extension feature tentatively called VIRTIO_F_WINDOW which indicates that descriptor tables, available and used sed rings and Queue Data reside in physical memory ranges called Windows, each identified with an unique identifier identifi called WindowID. Each queue is configured to belong to a specific WindowID, and during queue identification and configuration, the Physical Guest Addresses in the queue configuration fields are to be considered as offsets in octets from the start of the corresponding Window. For example for PCI, in the virtio_pci_common_cfg structure these fields are affected: le64 queue_desc; le64 queue_avail; le64 queue_used; For MMIO this includes instead these MMIO Device layout layout fields are affected: QueueDescLow, QueueDescHigh QueueAvailLow, QueueAvailHigh QueueUsedLow, QueueUsedHigh For PCI a new virtio_pci_cap of cfg type VIRTIO_PCI_CAP_WINDOW_CFG is defined. It contains the following fields: struct virtio_pci_window_cap { struct virtio_pci_cap cap; }

This configuration structure is used to identify the existing Windows, their WindowIDs, ranges and flags. The WindowID is read from the cap.bar field. The Window starting physical guest address is calculated by starting from the contents of the PCI BAR register with index WindowID, plus the cap.offset. The Window size is read from the cap.length field.

XXX TODO XXX describe also the new MMIO registers here. Virtqueue discovery: We are faced with two main options with regards to virtqueue discovery in this model. OPTION1: The simplest option is to make the previous fields read-only when using Windows, and have the virtualization environment / hypervisor provide the starting addresses of the descriptor table, avail ring and used rings, possibly allowing more flexibility on the Queue Data. OPTION2: The other option is to have the guest completely in control of the allocation decisions inside its write Window, including the virtqueue data structures starting addresses inside the Window, and provide a simple virtqueue peer initialization mechanism.

The virtio-peer device is the simplest device implementation which makes use of the Window feature, containing only two virtqueues. In addition to the Desc Table and Rings, these virtqueues also contain Queue Data areas inside the respective Windows. It uses two Windows, one for data which is read-only for the driver (read Window), and a separate one for data which is read-write for the driver (write Window). In the Descriptor Table of each virtqueue, the field le64 addr; is added to the Queue Data address of the corresponding Window to obtain the physical guest address of a buffer. A value of length in a descriptor which exceeds the Queue Data area is invalid, and its use will cause undefined behavior. The driver must consider the Desc Table, Avail Ring and Queue Data area of the receiveq as read-only, and the Used Ring as read-write. The Desc Table, Avail Ring and Queue Data of the receiveq will be therefore allocated inside the read Window, while the Used ring will be allocated in the write Window. The driver must consider the Desc Table, Avail Ring and Queue Data area of the transmitq as read-write, and the Used Ring as read-only. The Desc Table, Avail Ring and Queue Data of the transmitq will be therefore allocated inside the write Window, while the Used Ring will be allocated in the read Window. Note that in OPTION1, this is done by the hypervisor, while in OPTION2, this is fully under control of the peers (with some hypervisor involvement during initialization).

5.7.1 Device ID 13 5.7.2 Virtqueues 0 receiveq (RX), 1 transmitq (TX) 5.7.3 Feature Bits Possibly VIRTIO_F_MULTICAST (NOT clear yet left out for now)

5.7.4 Device configuration layout struct virtio_peer_config { le64 queue_data_offset; le32 queue_data_size; u8 queue_flags; /* read-only flags*/ u8 queue_window_idr; /* read-only */ u8 queue_window_idw; /* read-only */ } The fields above are queue-specific, and are thus selected by writing to the queue selector field in the common configuration structure. queue_data_offset is the offset from the start of the Window of the Queue Data area, queue_data_size is the size of the Queue Data area. For the Read Window, the queue_data_offset and queue_data_size are read-only. For the Write Window, the queue_data_offset and queue_data_size are read-write. The queue_flags if a flag bitfield with the following bits already defined: (1) = FLAGS_REMOTE : this queue descr, avail, and data is read-only and initialized by the remote peer, while the used ring is initialized by the driver. If this flag is not set, this queue descr, avail, and data is read-write and initialized by the driver, while the used ring is initialized by the remote peer. queue_window_idr and queue_window_idw identify the read-window and write-window for this queue (Window IDs).

5.7.5 Device Initialization Initialization of the virtqueues follows the generic procedure for Virtqueue Initialization with the following modifications.

OPTION1: the driver needs to replace the step “Allocate and zero” of the data structures and the write to the queue configuration registers with a read from the queue configuration registers to obtain the addresses of the virtqueue data structures. OPTION 2: for each virtqueue, the driver allocates and zeroes the data structures as usual only for the read-write data structures, while skipping the read-only queue structures, which will be initialized by the peer. The queue_flags configuration field can be used to easily determine which fields are to be initialized, and the queue window id registers are used to identify the Windows to use for the data structures. This feature adds the requirement to enable all virtqueues before the DRIVER_OK (which is already practice in most drivers, this is done as usual by writing 1 to the queue_enable field). Driver attempts to read back from the queue_enable field for a queue which has not been also enabled by the remote peer will have the device return 0 (disabled) until the remote peer has also initialized its own share of the data structures for the virtqueue as it appears in the remote guest. All the queue configuration fields which still need remote initialization have a reset value of 0. When the FEATURE BIT is detected, the virtio driver will delay setting of the DRIVER_OK status for the device. When both peers have enabled the queues by writing 1 to the queue_enable fields, the driver will be notified via a configuration change interrupt (VIRTIO_PCI_ISR_CONFIG). This will allow the driver to read the necessary queue configuration fields as initialized by the remote peer, and proceed setting the DRIVER_OK status for the device to signal the completion of the initialization steps.

5.7.6 Device Operation Data is received from the peer on the receive virtqueue. Data is transmitted to the peer using the transmit virtqueue. 5.7.6.1 OMISSIS

5.7.6.2 Transmitting data Transmitting a chunk of data of arbitrary size is done by following the steps 3.2.1 to 3.2.1.4. The device will update the used field as described in 3.2.2. 5.7.6.2.1 Packet Transmission Interrupt OMISSIS 5.7.6.3 Receiving data Receiving data consists in the driver checking the receiveq available ring to be able to find the receive buffers. The procedure is the one usually performed by the device, involving update of the Used ring and a notification, as described in chapter 3.2.2 5.7.xxx: Additional notes and TODOS Just a note: the Indirect Descriptors feature (VIRTIO_RING_F_INDIRECT) may not compatible with this feature, and thus will not be negotiated by the device. Notification mechanisms need to be looked at in detail. Mostly we should be able to reuse the existing notification mechanisms, for OPTION2 configuration change we have identified the ISR_CONFIG notification method above. MMIO needs to be written down. PCI capabilities need to be checked again, and the fields in CFG_WINDOW in particular. An alternative could be to extend the pci common configuration structure for the queuespecific extensions, but seems not compatible with multiple features involving similar extensions. Need to consider MMIO, as it’s less extensible. MULTICAST is out of scope of these notes, but seems feasible with some hard work without involving copies by sharing at least the transmit buffer in the producer, but the use case with peers being added and removed dynamically requires a much more complex study. Can this be solved with multiple queues, one for each peer, and configuration change notification interrupts that can disable a queue in the producer when a peer leaves, without taking down the whole device? Would need much more study.

(virtio-peer) GENERAL OVERVIE - GitHub

sed rings and Queue Data reside in physical memory ranges calle ... The driver must consider the Desc Table, Avail Ring and Queue Data area of the receiveq ...

160KB Sizes 13 Downloads 244 Views

Recommend Documents

General and Specific Combining Abilities - GitHub
an unstructured random effect with one level for each observed mating. We illustrate the methods with the following simulated data. Note that in this example the ...

14.6 OVERALL MAX GENERAL DESCRIPTION 28.9 ... - GitHub
OLED EXPANSION. TITLE. DIMENSION IN MM. UNLESS NOTED. GO. TOLERANCES. USED ON. NEXT ASSY. SIZE. 2:1. 1 OF 4. 2016-03-31. DATE.

What System Issues? System Issues General Structure - GitHub
First we make a domain ob ect. here we ... in this case, we specify a regular 100x100 grid over the .... ...and generally making your code assumption-free. Hence ...

Reading Study Skills Overvie-1.pdf
9.4 applies only to high school students enrolled in career and technical education programs. Page 3 of 4. Reading Study Skills Overvie-1.pdf. Reading Study ...

UP General HS General HSS General
Nov 8, 2012 - Group. 10M. 7. HS General. 4. 683. Common. Single. 10M. 1. 5. 684 ... Group. 10M. 7. Newly Added Items and Code Numbers in Kerala School ...

General
Lipsey ,R.G – An Introduction to Positive Economics . Widenfeld and Nicholson , London. Ahuja , H.L – Advanced Economic Theory. ... between Average and Marginal Propensity to Consume - Multiplier. Theory . 8. 3. Investment: Concepts of Investment

GitHub
domain = meq.domain(10,20,0,10); cells = meq.cells(domain,num_freq=200, num_time=100); ...... This is now contaminator-free. – Observe the ghosts. Optional ...

GitHub
data can only be “corrected” for a single point on the sky. ... sufficient to predict it at the phase center (shifting ... errors (well this is actually good news, isn't it?)

General Studies & General Abilities_Key.pdf
earth's atmosphere in future? (a) Atomic warfares. (b) Dust clouds from volcanoes. (c) CO2 from fossile fuels. (d) Depletion of earth's ozone layer. 15. Ans: (c). 16.

general studies-general aptitude.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. general ...

Download General Journal: Accounting General ...
Online Books ... up to date and secure with the software on your computer InformationWeek com News analysis and research for business technology professionals plus peer to peer knowledge sharing Engage with our community 1 ... File nonostante i divie

general medicine and general surgery.pdf
Add a note on. management of rheumatic fever. Answer briefly: (10x4=40). 7. Classes of anti-retroviral drugs used in treatment of HIV/AIDS. 8. Achalasia cardia.

Physiotherapy in General Medicine & General Surgery.pdf ...
What is intermittent claudication and explain its pathophysiology. How would you. differentially diagnose. Explain the role of physiotherapy in managing.

General Cleaner General Information.pdf
Minimum 20 hours per week over 5 days including weekends and bank holidays. ... employees receive 25 days annual leave a year plus Public Holidays recognised by the Trust. ... National Trust and National Trust for Scotland properties.

Torsten - GitHub
Metrum Research Group has developed a prototype Pharmacokinetic/Pharmacodynamic (PKPD) model library for use in Stan 2.12. ... Torsten uses a development version of Stan, that follows the 2.12 release, in order to implement the matrix exponential fun

Untitled - GitHub
The next section reviews some approaches adopted for this problem, in astronomy and in computer vision gener- ... cussed below), we would question the sensitivity of a. Delaunay triangulation alone for capturing the .... computation to be improved fr

ECf000172411 - GitHub
Robert. Spec Sr Trading Supt. ENA West Power Fundamental Analysis. Timothy A Heizenrader. 1400 Smith St, Houston, Tx. Yes. Yes. Arnold. John. VP Trading.

Untitled - GitHub
Iwip a man in the middle implementation. TOR. Andrea Marcelli prof. Fulvio Risso. 1859. Page 3. from packets. PEX. CethernetDipo topo data. Private. Execution. Environment to the awareness of a connection. FROG develpment. Cethernet DipD tcpD data. P

BOOM - GitHub
Dec 4, 2016 - 3.2.3 Managing the Global History Register . ..... Put another way, instructions don't need to spend N cycles moving their way through the fetch ...

Supervisor - GitHub
When given an integer, the supervisor terminates the child process using. Process.exit(child, :shutdown) and waits for an exist signal within the time.

robtarr - GitHub
http://globalmoxie.com/blog/making-of-people-mobile.shtml. Saturday, October ... http://24ways.org/2011/conditional-loading-for-responsive-designs. Saturday ...

MY9221 - GitHub
The MY9221, 12-channels (R/G/B x 4) c o n s t a n t current APDM (Adaptive Pulse Density. Modulation) LED driver, operates over a 3V ~ 5.5V input voltage ...