Commit Graph

7831 Commits

Author SHA1 Message Date
David B. Kinder a9bf1afc08 doc: fix order of steps in GSG setup
Edits preparing for using a requirements.txt introduced an error in the
step order (using a directory before it was created).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-15 20:25:40 -07:00
Sun Peng 65f479c73b dm: vdisplay: multi-vdisplay support.
Allow one VM have more than 1 virtual display for output. Till now, the
max virtual display number is 2. So guest VM can use dual display for
mirror and extend desktop mode. To specify multi-vdisplay, need use
acrn-dm parameters like this:
For fullscreen mode:

virtio-gpu,geometry=fullscreen:monitor_id1,geometry=fullscreen:monitor_id2

For window mode:

virtio-gpu,geometry=<width>x<height>+<x_off>+<y_off>,geometry=<width>x<height>+<x_off>+<y_off>

v1->v2: add pscreen_id outputs for easier debugging.

Tracked-On: #7988
Signed-off-by: Sun Peng <peng.p.sun@linux.intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
2022-08-15 14:44:47 +08:00
Sun Peng ac294c59dd dm: vdisplay: refine vdisplay core concept abstractions
Add new concept "vscreen" to abstract all specs about screen in a
display server. This can provide convenience to add more screens
for one VM.

v1->v2: remove vscr NULL checks.
v2->v3: restore vscreen geometry calibaration to previous version.
        wrap geometry calibaration and create window/render to
        functions.

Tracked-On: #7988
Signed-off-by: Sun Peng <peng.p.sun@linux.intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
2022-08-15 14:44:47 +08:00
Sun Peng 6f22afd9e9 dm: vdisplay: Add physical monitor id check.
vdisplay use physical monitor id(pscreen index) to locate the monitor.
The max index value always is the physical monitor number - 1. For
example, there are 4 physical monitors connected. The monitor id should
be 0, 1, 2 and 3. We need check monitor id that user inputs and make
sure it is in a correct range.

Tracked-On: #7988
Signed-off-by: Sun Peng <peng.p.sun@linux.intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
2022-08-15 14:44:47 +08:00
Sun Peng ddf35fb016 dm: vdisplay: multi-local-mornitor support.
To support full screen mode on one of multi-local-mornitor which
connected to service vm by monitor ID that customer specify. The
monitor ID is specified in acrn-dm's parameter like this:

virtio-gpu,geometry=fullscreen:monitor_id

For window mode, the vdisplay window always be shown on monitor 0,
because the customer can drag the window to anyone monitor. Besides, the
customer can set the monitor by x_off and y_off parameter like this:

virtio-gpu,geometry=<width>x<height>+<x_off>+<y_off>

v1->v2: Add note about zoom to pscreen width & height in fullscreen.
v2->v3: vdpy.width/height for window, used in host, vdpy.guest_width/
guest_height for guest framebuffer, used in guest.

Tracked-On: #7988
Signed-off-by: Sun Peng <peng.p.sun@linux.intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
2022-08-15 14:44:47 +08:00
Zhao Yakui 770ecb399b ACRN:DM:VGPU: Return the parsed scanout_num to virtio_gpu in Guest_VM
Return the parsed scanout_num to guest_vm so that the guest_vm can configure multi-display.

Tracked-On: #7988
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Peng Sun <peng.p.sun@linux.intel.com>
2022-08-15 14:44:47 +08:00
Zhao Yakui 0606247b02 ACRN:DM:VGPU: Calibrate the offset in dmabuf/pixman_image to display the scanout_window
Sometimes the virtio_gpu in guest_vm doesn't pass the zero coord_x/y for the
displayed framebuffer. In such case the offset should be calibrated for pixman_image/dmabuf
so that it can display the image from the correct image.

Tracked-On: #7988
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Peng Sun <peng.p.sun@linux.intel.com>
2022-08-15 14:44:47 +08:00
Zhao Yakui 8b55026f9d ACRN:DM:VGPU: virtio-gpu-flush cmds check whether one scanout_win needs to be displayed
The virtio-gpu display will be handled by the below cmd sequence:
1. Virtio_GPU_CMD_CREATE_RESOURCE
2. VIRTIO_GPU_CMD_SET_SCANOUT/SET_SCANOUT_BLOB
3. VIRTIO_GPU_CMD_FLUSH

And the VIRTIO_GPU_CMD_FLUSH will notify the vdisplay module to display the
framebuffer related with the scanout_id. But the virtio_gpu_cmd_flush doesn't
pass the scanout info.Instead it only passes the flushed_region and the
resource_id. So it needs to check whether the scanout_region is covered by the
flushed_region and then decide whether the scanout_win needs to be displayed.

v1->v2: Use the bpp instead of hardcode 4 for offset_calculation

Tracked-On: #7988
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Peng Sun <peng.p.sun@linux.intel.com>
2022-08-15 14:44:47 +08:00
Zhao Yakui 6d83cd17f8 ACRN:DM:VGPU: Handle the scanout_id for cursor virtio-gpu-cmd
The virtio-gpu in guest_vm also passes the scanout_id for cursor operation.
So this scanout_id should be used in course of handling cursor operation.

Tracked-On: #7988
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Peng Sun <peng.p.sun@linux.intel.com>
2022-08-15 14:44:47 +08:00
Zhao Yakui 43626d1803 ACRN:DM:VGPU: Handle the virtio-gpu-cmds based on scanout_id in cmd_request
The scanout_id is included in the below virtio-gpu cmd request.
VIRTIO_GPU_GET_EDID
VIRTIO_GPU_SET_SCANOUT
VIRTIO_GPU_SET_SCANOUT_BLOB
VIRTIO_GPU_GET_DISPLAY_INFO

So the scanout_id and scanout_rect should be handled correctly. And it will
use the scanout_rect instead of resource width/height in course of handling
VIRTIO_GPU_SET_SCANOUT/SCANOUT_BLOB cmd.

v1->v2: change the position to zero when returning response for GET_DISPLAY_INFO

Tracked-On: #7988
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Peng Sun <peng.p.sun@linux.intel.com>
2022-08-15 14:44:47 +08:00
Zhao Yakui 516e8ef4b1 ACRN:DM:VGPU: Add virtio_gpu_scanout structure to handle virtio-gpu-cmds correctly
Now it only supports one scanout for virtio-gpu. So the scanout_id is ignored in
course of handling virtio-gpu cmd. In order to handle the virtio-gpu cmd correctly,
it adds the virtio_gpu_scanout structure so that it can record the scanout info.

v1->v2: Refine the field in virtio_gpu_scanout and error message for scanout_id

Tracked-On: #7988
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Peng Sun <peng.p.sun@linux.intel.com>
2022-08-15 14:44:47 +08:00
Zhao Yakui 6407de302c ACRN:DM:VDisplay: vdpy_init connection returns the supported number of vScreen
Vdisplay module will create the gui_window (vScreen) based on the virtio-gpu
parameter. When virtio-gpu device tries to establish the connection with
vdisplay module, it will return the supported number of vScreen.
Then the virtio-gpu device can initialize the correct info for the guest_vm.

BTW: The number is fixed to 1.

Tracked-On: #7988
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Peng Sun <peng.p.sun@linux.intel.com>
2022-08-15 14:44:47 +08:00
Zhao Yakui ad67215d4b ACRN:DM:VDISPLAY: Refine display API to support multi scanout_window
Currenly it can support only one display_win. When virtio-gpu wants to display
the framebuffer from Guest_vm, it will render it into the default win. In order
to support multi-window, the scanout_id is added for display API.
After display API is refined, the vdisplay and virtio-gpu can support the multi-win
independently.

BTW: Now the scanout_id is not implemented in vdisplay module and the virtio-gpu always
passes the zero. It will be implemeneted in the later patches.

Tracked-On: #7988
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Peng Sun <peng.p.sun@linux.intel.com>
2022-08-15 14:44:47 +08:00
Kunhui-Li e906270dd3 config_tools: highlight success or fail status in save window
changing the green or yellow icon to highlight success or fail status
in save window.

Tracked-On: #7958
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-08-15 14:15:25 +08:00
Liu Long 237d07b9bd ACRN:SampleApplication: Copy RT kernel scripts
Add the copy RT kernel for the create image scripts.

Tracked-On: #7820
Signed-off-by: Liu Long <long.liu@linux.intel.com>
2022-08-15 11:17:51 +08:00
Liu Long c59dcc0042 ACRN:SampleApplication: Update the image build scripts
1. Add the generic extra kernel modules for HMI VM, in case the
uio_pci_generic modules is missed.
2. Add ssh server for HMI VM.
3. Add specific version for python numy modules.

Tracked-On: #7820
Signed-off-by: Liu Long <long.liu@linux.intel.com>
2022-08-15 09:19:15 +08:00
Liu Long a4094b9eeb ACRN: Scripts: Modify the create images scripts
1. Create a build directory for store images so that the git will not trace the
images.
2. Disable more systemd server in RT-VM in case the error output in
console.
3. Add the make sampleapplication command in the scripts.

Tracked-On: #7820
Signed-off-by: Liu Long <long.liu@linux.intel.com>
2022-08-15 09:19:15 +08:00
David B. Kinder 0d36e754e9 doc: add libelf-dev dependency to GSG
The new acrn-kernel for v3.1 expects gelf.h that's installed with the libelf-dev
package that's not listed as a dependency in the GSG.  Without this
package, building acrn-kernel fails.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-13 11:28:40 -07:00
David B. Kinder 4ef991effb doc: add MCE check avoidance explanation
Add a reference to the intel.com white paper on MCE avoidance to the
Disable MCE Workaround configuration option

Tracked-On: #7978

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-12 16:48:49 +08:00
zihengL1 22184ac99a config-tools: solve hv and vm memory address conflict
Fixed the problem that acrn can still build normally
when the memory addresses of HV and VM conflict, which
causes the hypervisor to hang.

At the same time, defined a class to process memory to
obtain and check the available memory range.
Memory range obtain and check related functions are
defined as class methods.

Tracked-On: #7913
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-08-12 16:26:50 +08:00
David B. Kinder 5bc94cf08a doc: clarify and improve GSG
Update Getting Started Guide to clarify and improve descriptions of
steps, including adding example commands instead of just describing
them, adding more information about system requirements, making certain
steps explicit, squash the long list of packages to install into fewer
lines, and more.

Move cloning ACRN hypervisor and kernel earlier in the instructions
(anticipating use of a requirements.txt coming from the repo).

[External_System_ID] ACRN-9285

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-11 17:11:52 -07:00
Chenli Wei a7397dedf0 misc: add assert to check the vBDF conflict
The current ACRN-Configurator just check the conflict of user setting.
have not check the conflict with native PCI device's bdf.

This patch add an assert to check the above conflict.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-11 15:34:21 +08:00
Minggui Cao 0c47f4d04d doc: update hypervisor shell usage
ACRN hypervisor shell has been improved to be bash-like shell, so update
its usage

Tracked-On: #7931
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-10 13:51:12 -07:00
David B. Kinder 364295e0d8 doc: update GSG version for xmlschema
While we're waiting for a more complete list of specific package version
requirements, let's fix the xmlschema and elementpath version mismatch
now.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-10 13:39:34 -07:00
Conghui 3dab043344 dm: bugfix for iothread
As the type of pthread_t is unsigned long, so the init value for it
should not be '-1'. When the tid is '-1', it will continue to call
pthread_kill/pthread_join. This is incorrect.

Tracked-On: #7960
Signed-off-by: Conghui <conghui.chen@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2022-08-10 22:33:34 +08:00
Liu Long a72a2e1795 SampleApplication: Add the proxy setting for HMI
Add the proxy config file for the HMI VM images, in case install
the packages failed.

Tracked-On: #7820
Signed-off-by: Liu Long <long.liu@linux.intel.com>
2022-08-10 16:21:37 +08:00
David B. Kinder b8c85135d9 doc: update Security VM Features config option
Updated the description of Security VM Features per review comments, and
made the option visible (again) in the configurator as an advanced
hypervisor option.

Created a new glossary entry for "Security VM", referenced by this new
description and tooltip.

Tweak wording of virtio console and input device descriptions.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>

Tracked-On: #7968
2022-08-10 10:09:58 +08:00
David B. Kinder cb91722dd5 doc: update rdt config tutorial
Add some clarification and updates for 3.1

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-09 14:26:25 -07:00
David B. Kinder 785ce3346c doc: add proxy note to GSG
Remind readers that internet access from a corporate network typically
requires configuring proxy information.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-09 09:22:29 -07:00
zihengL1 82d4f633ed doc: fix Build EFI-Stub fail problem
In the "Enable ACRN Secure Boot With EFI-Stub" guide, to build EFI-Stub
smoothly, the installation of "gnu-efi" package is added to GSG.

Tracked-On: #7935
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-08-09 09:20:16 -07:00
Chuang Ke 481173bf50 v2-config_tool-Instruction-missing-for-L2-only-users
v1-->v2:
1. instruction displayed regardless of if L3 or L2 cache were available, now it displayed instructions accordingly no matter how many caches
2. let instructions displayed only once above the topmost CAT configuration table

Tracked-On: #7921
Signed-off-by: Chuang-Ke <chuangx.ke@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-09 22:15:27 +08:00
Kunhui-Li b5097ee3e3 config_tools: fix vBDF schema pattern issue
add escape charater to fix vBDF pattern match any character issue
for vUART and ivshmem.

Tracked-On: #7925
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-09 21:45:47 +08:00
Junjie Mao 3f0eb96d85 sample_app: Add scripts to create RT and HMI VM images
Creating VM images is always a pain to users, and it is especially the case
for those who want to set up the ACRN sample application which needs two
different VM images, one with graphical desktop and the other optimized for
real-time.

This patch introduces the so-called "image builder" utility which is a set
of scripts that can automate the creation of those VM images. The scripts
will take care of:

  - Forking image files based on Ubuntu cloud images and enlarge the root
    file system per needs.

  - Setting up users and passwords.

  - Installing necessary packages to run either the graphical desktop or
    real-time applications.

  - Specific to the RT VM image, disabling services and tweaking kernel
    command line for optimized real-time performance.

  - Copying the sample applications into the images so that users can
    start them directly, after they launch the VMs.

Tracked-On: #7820
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-08-08 08:26:43 +08:00
Chuang Ke 88ed588711 vUART and IVSHMEM widgets don't generate address
[config_tool] vUART and IVSHMEM widgets don't generate address

Tracked-On: #7942
Signed-off-by: Chuang-Ke <chuangx.ke@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-05 16:43:32 +08:00
David B. Kinder c1a4b77a93 doc: update 3.0.1 release notes
Clarify description of CVE fix (only impacts ACRN implementation on
Alder Lake platforms), and improve description of the ACRN shell's new
vmexit command.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-04 22:00:05 -07:00
weizhang ddefbfa6b9 SampleApplication: Change the unit of result
Correct the unit of sample-application result, which should be us(microseconds).

Tracked-On #7820
Signed-off-by: Zhang Wei <wei6.zhang@linux.intel.com>
2022-08-05 10:35:10 +08:00
Junjie Mao 2a8b80d0c1 config_tools: board_inspector: guess L3 CAT parameters if not reported via CPUID
On some platforms the L3 CAT capabilities are not reported via CPUID even
though they are present. The public real-time tuning guide suggests to try
accessing the MSRs directly to detect if L3 CAT is available or not.

This patch implements such guessing logic in the board inspector in order
to enable CAT for users with those kinds of platforms.

Tracked-On: #7948
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-08-05 07:36:40 +08:00
Junjie Mao 67d7b8f4c8 config_tools: board_inspector: fix MSR reads and writes
The MSR reading and writing routines today has the following issues:

  1. The missing of /dev/cpu/*/msr is not properly captured as it is
     reported via FileNotFoundError rather than IOError.

  2. The wrmsr logic is not updated to use the tmpdevfs msr file.

This patch fixes the issues above which is a prerequisite of adding
additional MSR parsing classes.

Tracked-On: #7948
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-08-05 07:36:40 +08:00
Junjie Mao a6614e7e2f config_tools: board_inspector: refactors MSR utilities
In v3.0 the msrfield class has its initializer changed in a way that is
incompatible with the parameter names or the getter/setter. When introduced
from the BITS project, that class allows specifying an MSR field of
arbitrary length by being given the index of the most and least significant
bits.

This patch restores the original behavior of that msrfield class and moves
the use-case specific methods, namely is_vmx_cap_supported and
is_ctrl_setting_allowed, to a helper class.

Parsing of the VMX capability reporting MSRs in msr.py are updated
accordingly, and brief documentation of the MSR fields are added as well.

Tracked-On: #7948
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-08-05 07:36:40 +08:00
Junjie Mao 4369896549 config_tools: acpi_gen: generate vRTCT instead of copying a physical one
As the last step to simplify the steps to enable software SRAM passthrough
to a pre-launched RT VM, this patch generates a virtual RTCT which only
contains a compatibility entry (to indicate that the format of the RTCT is
v2) and a couple of SSRAM or SSRAM waymask entries to report the software
SRAM blocks that pre-launched VM has access. That follows the practice how
ACRN device model generates virtual RTCT for post-launched VMs today.

In case RTCT v1 is used physically, this patch still generates a v2 RTCT
for the pre-launched VM but does not add an SSRAM waymask entry there
due to lack of information.

Tracked-On: #7947
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-08-05 07:36:40 +08:00
Junjie Mao eff353700e config_tools: acpi_gen: refactor ACPI table generation logic
While functionally correct, the ACPI table (mostly DSDT) generation logic
in asl_gen.py contains multiple occurrences that share the same code
structure as follows:

    cls = <class of the table>
    length = ctypes.sizeof(cls)
    data = bytearray(length)
    res = cls.from_buffer(data)
    <setting multiple fields in res>

To minimize code duplication, this patch refactors the logic by abstracting
the creation of an ACPI table into a method which returns a newly created
object of the given class after setting the specified fields.

Tracked-On: #7947
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-08-05 07:36:40 +08:00
Junjie Mao 89d54aa5d1 config_tools: board_inspector: record all details from RTCT in board XML
Today users still need to manually copy the RTCT binary file when they want
to passthrough software SRAM to a pre-launched RTVM, which is far from
being user friendly.

To get rid of that step, this patch extracts all information from the RTCT
table and format them in the board XML which is the only file users need to
copy from their target platform to build the hypervisor. The patch that
immediately follows will then use such information to generate vRTCT for
the pre-launched VM.

A side effect of this change is that more ranges, which represents those
reported by RTCT such as the CRL binary or the error log area, will be
added to the `memory` section of the board XML. The `id` attributes of
those range will be used to identify what that range is for. As a result,
getting RAM of the physical platform from the board XML requires additional
conditions on the `id` attributes to avoid counting non-RAM regions
unintendedly.

Tracked-On: #7947
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-08-05 07:36:40 +08:00
Junjie Mao d7bac88e5e config_tools: board_inspector: refactor ACPI RTCT parser
This patch refactors and fixes the following in the ACPI RTCT parser of the
board inspector.

  1. Refactor to expose the RTCTSubtableSoftwareSRAM_v2 class directly as
     it is a fixed-size entry. There is no need to create a dynamic class
     which is mostly for variable-length entries.

  2. Rename the "format" field in RTCT entry header to "format_or_version",
     as that field actually means "version" in RTCT v2.

  3. Properly parse the RTCT compatibility entry which is currently parsed
     as an unknown entry with raw data.

Tracked-On: #7947
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-08-05 07:36:40 +08:00
Conghui 51e6dc5864 hv: sched: fix bug when reboot vm
BVT schedule rule:
When a new thread is wakeup and added to runqueue, it will get the
smallest avt (svt) from runqueue to initiate its avt. If the svt is
smaller than it's avt, it will keep the original avt. With the svt, it
can prevent a thread from claiming an excessive share of CPU after
sleepting for a long time.

For the reboot issue, when the VM is reboot, it means a new vcpu thread
is wakeup, but at this time, the Service VM's vcpu thread is blocked,
and removed from the runqueue, and the runqueue is empty, so the svt is
0. The new vcpu thread will get avt=0. avt=0 means very high priority,
and can run for a very long time until it catch up with other thread's
avt in runqueue.
At this time, when Service VM's vcpu thread wakeup, it will check the
svt, but the svt is very small, so will not update it's avt according to
the rule, thus has a very low priority and cannot be scheduled.

To fix it, update svt in pick_next handler to make sure svt is align
with the avt of the first obj in runqueue.

Tracked-On: #7944
Signed-off-by: Conghui <conghui.chen@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
2022-08-05 02:39:54 +08:00
Liu Long b7d70385d9 SampleApplication: Add Makefile for the entire SampleApplication
Add the Makefile in the SampleApplication root directory. User
don't need to separate build the userapp and rtapp, just need make
once at the SampleApplication root directory.

Tracked-On #7820
Signed-off-by: Liu Long <long.liu@linux.intel.com>
2022-08-04 14:22:39 +08:00
Chenli Wei 6ac196d982 misc: add assert to check the duplicate devices
The current ACRN-Configurator allow user add duplicate PCI devices to
passthrough which it is not correct.

This patch add an assert to check the duplicate of PCI devices.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-03 15:34:06 +08:00
Chenli Wei 030b2f804c dm: fix the secure coding style violations
There was some secure coding style violations of virtio net and tmp,
this patch add some NULL check to fix these violations.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
2022-08-02 18:01:24 +08:00
Conghui 7d987f9b0f dm: virtio-block: support NO_NOTIFY
disable NOTIFY during getting requests from virtqueue. This will improve
the IO performance.

Tracked-On: #7940
Signed-off-by: Conghui <conghui.chen@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2022-08-02 11:14:54 +08:00
Conghui 1bf3cb61f5 dm: virtio-blk: enable support for iothread
The usage is:

-s <slot> virtio-blk,[iothread,]<filepath>

e.g  -s 3 virtio-blk,iothread,test.img

Tracked-On: #7940
Signed-off-by: Conghui <conghui.chen@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2022-08-02 11:14:54 +08:00
Conghui fa69f79e33 dm: add iothread support in virtio framework
Add ioeventfd and iothread to virtio framework. When a virtio device
claim to support iothread, virtio framework will register a ioeventfd
and add it to iothread's epoll. After that, the new notify will come
through the iothread instead of the vcpu thread. The notify handler will
be called to process the request.

Tracked-On: #7940
Signed-off-by: Conghui <conghui.chen@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2022-08-02 11:14:54 +08:00