Skip to content

Commit 0859836

Browse files
committed
doc: update release branch with new docs
Signed-off-by: David B. Kinder <[email protected]>
1 parent d57a213 commit 0859836

38 files changed

+1098
-284
lines changed

doc/.known-issues/doc/dupdecl.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,9 @@
66
# Sphinx 2.0
77
^(?P<filename>[-._/\w]+/hld/[-._/\w]+.rst):(?P<lineno>[0-9]+): WARNING: Duplicate declaration, .*
88
#
9+
^(?P<filename>[-._/\w]+/api/[-._/\w]+.rst):(?P<lineno>[0-9]+): WARNING: duplicate C object description.*
10+
#
11+
^(?P<filename>[-._/\w]+/hld/[-._/\w]+.rst):(?P<lineno>[0-9]+): WARNING: duplicate C object description.*
12+
#
913
^(?P<filename>[-._/\w]+/hld/[-._/\w]+.rst):(?P<lineno>[0-9]+): WARNING: Duplicate C\+\+ declaration, .*
1014
^Declaration is .*

doc/asa.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
1-
.. _asa:
1+
.. _asa:
22

33
Security Advisory
44
#################
55

6+
Addressed in ACRN v2.3
7+
************************
8+
9+
We recommend that all developers upgrade to this v2.3 release (or later), which
10+
addresses the following security issue that was discovered in previous releases:
11+
12+
------
13+
14+
- NULL Pointer Dereference in ``devicemodel\hw\pci\virtio\virtio_mei.c``
15+
``vmei_proc_tx()`` function tries to find the ``iov_base`` by calling
16+
function ``paddr_guest2host()``, which may return NULL (the ``vd``
17+
struct control by the User VM OS). There is a use of ``iov_base``
18+
afterward that can cause a NULL pointer dereference (CVE-2020-28346).
19+
20+
**Affected Release:** v2.2 and earlier.
21+
622
Addressed in ACRN v2.1
723
************************
824

doc/conf.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
sys.path.insert(0, os.path.join(os.path.abspath('.'), 'extensions'))
3838
extensions = [
3939
'breathe', 'sphinx.ext.graphviz', 'sphinx.ext.extlinks',
40-
'kerneldoc', 'eager_only', 'html_redirects',
40+
'kerneldoc', 'eager_only', 'html_redirects', 'link_roles',
4141
'sphinx_tabs.tabs'
4242
]
4343

@@ -166,7 +166,7 @@
166166
'analytics_id': '',
167167
'logo_only': False,
168168
'display_version': True,
169-
'prev_next_buttons_location': 'None',
169+
#'prev_next_buttons_location': 'None',
170170
# Toc options
171171
'collapse_navigation': False,
172172
'sticky_navigation': True,
@@ -318,7 +318,21 @@ def setup(app):
318318
"Project ACRN" : "doxygen/xml",
319319
}
320320
breathe_default_project = "Project ACRN"
321-
breathe_default_members = ('members', 'undoc-members', 'content-only')
321+
# breathe_default_members = ('members', 'undoc-members', 'content-only')
322+
breathe_domain_by_extension = {
323+
"h": "c",
324+
"c": "c",
325+
}
326+
327+
cpp_id_attributes = [
328+
'__syscall', '__deprecated', '__may_alias',
329+
'__used', '__unused', '__weak',
330+
'__DEPRECATED_MACRO', 'FUNC_NORETURN',
331+
'__subsystem',
332+
]
333+
c_id_attributes = cpp_id_attributes
334+
335+
322336

323337

324338
# Custom added feature to allow redirecting old URLs (caused by

doc/develop.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ Enable ACRN Features
7272
tutorials/setup_openstack_libvirt
7373
tutorials/acrn_on_qemu
7474
tutorials/using_grub
75+
tutorials/acrn-secure-boot-with-grub
7576
tutorials/pre-launched-rt
7677
tutorials/enable_ivshmem
7778

doc/developer-guides/contribute_guidelines.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ software continues to be available under the terms that the author
2020
desired.
2121

2222
Project ACRN uses a BSD-3-Clause license, as found in the
23-
`LICENSE <https://github.com/projectacrn/acrn-hypervisor/blob/master/LICENSE>`__
23+
:acrn_file:`LICENSE <LICENSE>`
2424
in the project's GitHub repo.
2525

2626
A license tells you what rights you have as a developer, as provided by
@@ -221,14 +221,12 @@ following exceptions:
221221
8-column wide.
222222

223223
You can use *checkpatch* from Linux kernel to check the compliance. ACRN
224-
maintains a `checkpatch conf`_ which customizes the script to stop warning on
224+
maintains a :acrn_file:`.checkpatch.conf <.checkpatch.conf>` file
225+
that customizes the script to stop warnings on
225226
the exceptions above. Invoke *checkpatch* with the root of ``acrn-hypervisor``
226227
repository as the current working directory to make the configurations
227228
effective.
228229

229-
.. _checkpatch conf:
230-
https://github.com/projectacrn/acrn-hypervisor/blob/master/.checkpatch.conf
231-
232230
.. _Contribution workflow:
233231

234232
Contribution Workflow

doc/developer-guides/doc_guidelines.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,17 @@ markup (double backticks) to indicate a ``filename``.
297297

298298
Don't use items within a single backtick, for example ```word```.
299299

300+
For references to files that are in the ACRN Hypervisor GitHub tree, a special
301+
role can be used that creates a hyperlink to that file. For example a
302+
GitHub link to the reST file used to create this document can be generated
303+
using ``:acrn_file:`doc/developer-guides/doc_guidelines.rst``` that will show
304+
up as :acrn_file:`doc/developer-guides/doc_guidelines.rst`, a link to
305+
the “blob” file in the GitHub repo as displayed by GitHub. There’s also an
306+
``:acrn_raw:`doc/developer-guides/doc_guidelines.rst``` role that will link
307+
to the “raw” uninterpreted file,
308+
:acrn_raw:`doc/developer-guides/doc_guidelines.rst` file. (Click
309+
on these links to see the difference.)
310+
300311
.. _internal-linking:
301312

302313
Internal Cross-Reference Linking

doc/developer-guides/hld/ivshmem-hld.rst

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,40 @@ may only be done between VMs using the same solution.
3737
ivshmem hv:
3838
The **ivshmem hv** implements register virtualization
3939
and shared memory mapping in the ACRN hypervisor.
40-
It will support notification/interrupt mechanism in the future.
40+
Notification/interrupt mechanism is supported.
4141

4242
ivshmem dm:
4343
The **ivshmem dm** implements register virtualization
4444
and shared memory mapping in the ACRN Device Model (``acrn-dm``).
4545
It will support notification/interrupt mechanism in the future.
4646

4747
ivshmem server:
48-
A daemon for inter-VM notification capability that will work with **ivshmem
49-
dm**. This is currently **not implemented**, so the inter-VM communication
50-
doesn't support a notification mechanism.
48+
With **ivshmem server** support, VMs with ivshmem devices enabled can send
49+
notification (interrupt) to each other by writing the target peer ID (VM ID)
50+
and vector index to the doorbell register of ivshmem device, **ivshmem server**
51+
forwards this notification event to target VM.
52+
53+
Two types of **ivshmem server** are defined in ACRN:
54+
55+
User land **ivshmem server** is a daemon in user space to forward notifications
56+
for **dm-land** ivshmem devices only, by co-working with **ivshmem dm**.
57+
User land **ivshmem server** is not implemented.
58+
59+
HV-land **ivshmem server** plays similar role with user land **ivshmem server**,
60+
but it is a hypervisor module and forwards notification (virtual interrupt) to
61+
target VM with **hv-land** ivshmem devices enabled.
5162

5263
Ivshmem Device Introduction
5364
***************************
5465

55-
The ``ivshmem`` device is a virtual standard PCI device consisting of
56-
two Base Address Registers (BARs): BAR0 is used for emulating interrupt
57-
related registers, and BAR2 is used for exposing shared memory region. The ``ivshmem`` device doesn't support any extra capabilities.
66+
The ``ivshmem`` device is a virtual standard PCI device consisting of
67+
three Base Address Registers (BARs):
68+
69+
* BAR0 is used for emulating interrupt related registers,
70+
* BAR1 is used for emulating MSIX entry table, and
71+
* BAR2 is used for exposing a shared memory region.
72+
73+
The ``ivshmem`` device supports no extra capabilities.
5874

5975
Configuration Space Definition
6076

doc/developer-guides/hld/virtio-net.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,10 +426,11 @@ our case, we use systemd to automatically create the network by default.
426426
You can check the files with prefix 50- in the Service VM
427427
``/usr/lib/systemd/network/``:
428428

429-
- `50-acrn.netdev <https://raw.githubusercontent.com/projectacrn/acrn-hypervisor/master/misc/acrnbridge/acrn.netdev>`__
430-
- `50-acrn.network <https://raw.githubusercontent.com/projectacrn/acrn-hypervisor/master/misc/acrnbridge/acrn.network>`__
431-
- `50-tap0.netdev <https://raw.githubusercontent.com/projectacrn/acrn-hypervisor/master/misc/acrnbridge/tap0.netdev>`__
432-
- `50-eth.network <https://raw.githubusercontent.com/projectacrn/acrn-hypervisor/master/misc/acrnbridge/eth.network>`__
429+
- :acrn_raw:`50-acrn.netdev <misc/acrnbridge/acrn.netdev>`
430+
- :acrn_raw:`50-acrn.netdev <misc/acrnbridge/acrn.netdev>`
431+
- :acrn_raw:`50-acrn.network <misc/acrnbridge/acrn.network>`
432+
- :acrn_raw:`50-tap0.netdev <misc/acrnbridge/tap0.netdev>`
433+
- :acrn_raw:`50-eth.network <misc/acrnbridge/eth.network>`
433434

434435
When the Service VM is started, run ``ifconfig`` to show the devices created by
435436
this systemd configuration:

doc/extensions/eager_only.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def run(self, *args):
3030
# Evaluate the condition eagerly, and if false return no nodes right away
3131
env = self.state.document.settings.env
3232
env.app.builder.tags.add('TRUE')
33-
#print(repr(self.arguments[0]))
33+
3434
if not env.app.builder.tags.eval_condition(self.arguments[0]):
3535
return []
3636

@@ -43,3 +43,13 @@ def run(self, *args):
4343

4444
def setup(app):
4545
directives.register_directive('only', EagerOnly)
46+
47+
# The tags.add call above is setting tags.tags['TRUE'] = True.
48+
# The operation is idempotent and will have taken effect before
49+
# the next eval_condition() which may rely on it so this is thread
50+
# safe both for read and writes (all other operations are local to
51+
# the local nodes variable).
52+
return {
53+
'parallel_read_safe': True,
54+
'parallel_write_safe': True,
55+
}

doc/extensions/link_roles.py

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Copyright (c) 2019 Intel Corporation
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# based on http://protips.readthedocs.io/link-roles.html
6+
7+
from __future__ import print_function
8+
from __future__ import unicode_literals
9+
import re
10+
import os
11+
import os.path
12+
from os import path
13+
import subprocess
14+
from docutils import nodes
15+
16+
17+
def run_cmd_get_output(cmd):
18+
try:
19+
with open(os.devnull, 'w') as devnull:
20+
output = subprocess.check_output(cmd, stderr=devnull, shell=True).strip()
21+
except subprocess.CalledProcessError as e:
22+
output = e.output.decode('ascii')
23+
24+
return output
25+
26+
def get_github_rev():
27+
tag = run_cmd_get_output('git describe --exact-match')
28+
if tag:
29+
return tag.decode("utf-8")
30+
else:
31+
return 'master'
32+
33+
34+
def setup(app):
35+
rev = get_github_rev()
36+
37+
baseurl = 'https://github.com/projectacrn/acrn-hypervisor'
38+
39+
app.add_role('acrn_file', autolink('{}/blob/{}/%s'.format(baseurl, rev)))
40+
app.add_role('acrn_raw', autolink('{}/raw/{}/%s'.format(baseurl, rev)))
41+
42+
# The role just creates new nodes based on information in the
43+
# arguments; its behavior doesn't depend on any other documents.
44+
return {
45+
'parallel_read_safe': True,
46+
'parallel_write_safe': True,
47+
}
48+
49+
50+
def autolink(pattern):
51+
def role(name, rawtext, text, lineno, inliner, options={}, content=[]):
52+
m = re.search(r'(.*)\s*<(.*)>', text)
53+
if m:
54+
link_text = m.group(1)
55+
link = m.group(2)
56+
else:
57+
link_text = text
58+
link = text
59+
url = pattern % (link,)
60+
node = nodes.reference(rawtext, link_text, refuri=url, **options)
61+
return [node], []
62+
return role

0 commit comments

Comments
 (0)