Commit Graph

7817 Commits

Author SHA1 Message Date
David B. Kinder a8dd662635 doc: update sample app doc to use sudo
Previously the sample apps needed to be run as root, but with a recent
update they could be run as a normal (acrn) user.  Update the sample app
to use sudo for running these sample app components in case the user
doesn't login as root.  Also, split running the background app and the
foreground app into two commands to eliminate some confusion.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-24 20:46:35 -07:00
David B. Kinder 2addfe9ca1 doc: update GSG to include scp instructions
Make the GSG more consistent with the sample app doc and show how to use
scp to transfer files between the dev and target machines.

Also add a mention of the sample app guide at the end of the GSG.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-24 17:27:00 -07:00
Chuang Ke 68a7854052 [Workshop] Configurator create scenario popup window disappear sometimes
fix: 1. popup window won't be close when user click  background
2.close popup window do cancel function related

Tracked-On: #7991
Signed-off-by: Chuang-Ke <chuangx.ke@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-24 11:05:28 +08:00
Chuang Ke 2e4a373abb [config_tool] vUART widget address for pre-launched VM doesn't update
when the VM of a vUART endpoint changes the configurator can clear its corresponding I/O port or BDF settings automatically

Tracked-On: #8033
Signed-off-by: Chuang-Ke <chuangx.ke@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-24 10:27:52 +08:00
Chenli Wei 0609250743 misc: add assert to check the RTVM CPU affinity
The current ACRN Configurator have no warning when the user set CPU zero
to RTVM.

This patch add an assert to check the above.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-24 08:28:26 +08:00
Chenli Wei e44b1b84ea misc: add cpu details to launch script
The current code use cpu_id in scenario xml and use apic_id of the pCPU
in the launched script, this confuses the user, especially the same name
"cpu_affinity" is used for these script.

So this patch add some comment to launched script to explain the
relationship between cpu_id and apic_id.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
2022-08-23 16:40:25 +08:00
David B. Kinder 5a8339be25 doc: update sample app guide
Address comments from DX reviews, and update the cyclictest histogram
output (improvements from PR #8026)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-22 16:47:13 -07:00
Zhang Wei 31f92eba63 doc: Add a python package in GSG
The Getting Started Guide specifies that we need to install the Python packages lxml, xmlschema, and defusedxml.
However, a make clean involves the execution of the Python script manager.py. This script imports the package requests.py, which might not be installed if the developer follows the Getting Started Guide.

Add requests follow this command in GSG.
sudo pip3 install "elementpath==2.5.0" lxml "xmlschema==1.9.2" defusedxml tqdm requests

[External_System_ID] ACRN-9144
Tracked-On: #8029
Signed-off-by: Zhang Wei <wei6.zhang@intel.com>
2022-08-22 10:03:30 -07:00
Chenli Wei fa818d7b83 misc: refine the ACRN Configurator error message
The current ACRN Configurator show the XML name instead of DX-friendly
name when user delete the default value of some numeric field.

This patch add some "acrn:errormsg" which will show the DX-friendly name
to fix the above issue.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-22 15:33:23 +08:00
David B. Kinder 946d5f274a Fix sample app histogram display
Improve graph labels and align histogram bars on x-axis labels
Add n= value to show it's not a static image.

Tracked-On: #8025

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-20 11:56:56 +08:00
David B. Kinder f4ef01dc2c doc: update sample app guide
* Fix preempt-rt patched kernel label on wrong VM
* Fix path copying hmi_vm.img and rt_vm.img (they're not in ~/acrn-work
  directory)
* Rename png images to avoid potential conflicts with other images on the
  system.
* Fix Ubuntu wecome message text after logging into RT_VM

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-19 11:39:54 -07:00
Liu Long b9c4d2622c ACRN: Doc: Modify the SampleApplication document
1. Add the move iasl binary to the /usr/sbin directory.
2. Modify login RT_VM user to root user.

Signed-off-by: Liu Long <long.liu@linux.intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-18 21:31:51 -07:00
Yuanyuan Zhao 1993bc8283 config_tools: change some default value
Change default user vm memory size from 256 to 1024.

Tracked-On: #8018
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-19 12:28:45 +08:00
Yuanyuan Zhao 32bc596129 config_tool: add MAX_PCI_BUS_NUM in UI
Add MAX_PCI_BUS_NUM in UI for user.
If user defined MAX_PCI_BUS_NUM is greater than the value
calculated by board.xml, use user defined MAX_PCI_BUS_NUM.

Tracked-On: #8018
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-19 12:28:45 +08:00
David B. Kinder a7edf92ae4 doc: update sample app user guide
After review with engineering, we added material for showing what a
successful hmi_vm.img build ending looks like (and a hint of what to do
if it looks like the build failed.  Also added using a dhclient commmand
to the instructions in case the HMI_VM didn't get an IP address.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-18 18:03:40 -07:00
David B. Kinder 7c05b055d7 doc: fix typos in sample app guide
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-18 16:45:21 -07:00
David B. Kinder 0b938933db doc: add sample application user guide
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-18 15:36:29 -07:00
Liu Long 42f0878f0a SampleApplication: Disable the schroot mapping.
Disable the schroot mapping data from native env to the
chroot env.

Tracked-On: #7820
Signed-off-by: Liu Long <long.liu@linux.intel.com>
2022-08-18 11:27:09 +08:00
Chenli Wei 93b4a6e45d SampleApplication: Update the image create scripts
Update the rc.local for User VM, check the echo result and try again
if the echo failed.

Tracked-On: #7820
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
2022-08-18 09:32:42 +08:00
David B. Kinder c88076d9ef doc: revert to not using requirements.txt in the GSG
GSG was recently updated to use a requirements.txt for python
dependencies, but that file doesn't exist in the repo at the v3.0 tag
the instructions say to use.  Revert to not use a requirements.txt until
we get this figured out.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-17 16:58:00 -07:00
Liu Long e6de2e5798 SampleApplication: Update the image create scripts
1. Delete the generated images if the create scripts failed.
2. Enable root user login on GUI.
3. Enable systemd service in case there are many error logs.

Tracked-On: #7820
Signed-off-by: Liu Long <long.liu@linux.intel.com>
2022-08-17 18:30:14 +08:00
Chenli Wei 7f3174f740 misc: add a uio init setting
We need set uio when the hmi and rt user VM setup, so creat a rc.local
in the '/etc' and run it after system setup.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
2022-08-17 18:00:39 +08:00
Chuang Ke e47d0e2b2a [config_tool] v2 show warning message when users attempt to create a new scenario
fix warning message when users attempt to create a new scenario, or import an existing scenario, for an existing configuration
v1-->v2: update text to align with the design prototype spec.

Tracked-On: #7898
Signed-off-by: Chuang-Ke chuangx.ke@intel.com
Reviewed-by: Junjie Mao junjie.mao@intel.com
2022-08-17 16:48:43 +08:00
Chuang Ke 731d2171c7 [config_tool] Real time vCPU checkbox is confusing to users
add tooltip to explain "Real-time vCPU"
use the one generated from the XSD files to generate tooltip infomation.

Signed-off-by: Chuang-Ke <chuangx.ke@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Tracked-On: #8000
2022-08-17 16:13:43 +08:00
David B. Kinder 9f0998af3e doc: remove use of :term: role in tooltip
The configurator can't process :term: glossary references, so remove it.

Tracked-On: #5692

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-17 10:51:26 +08:00
David B. Kinder b82805f77b doc: add tooltip for real-time vCPU option checkbox
Tracked-On: #9779

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-17 10:20:56 +08:00
chuangxke 206505453e Focus change to new VM when added
the focus  change to that new VM on the Basic tab when the new VM  added

Tracked-On: #7914
Signed-off-by: Chuang-Ke <chuangx.ke@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-17 10:04:51 +08:00
Wu Zhou 8c5bb8b471 hv: change 'DISABLED' settings to 'ENABLED'
In order to improve DX, 'DISABLED' style configurator settings are
changed to 'ENABLED' style. The meaning of the MACROs are reversed,
so in the hv code we have to change '#ifndef' -> '#ifdef' or
'#ifdef' -> '#ifndef'.

Including:
  - MCE_ON_PSC_DISABLED -> MCE_ON_PSC_ENABLED
  - ENFORCE_TURNOFF_AC -> SPLIT_LOCK_DETECTION_ENABLED
  - ENFORCE_TURNOFF_GP -> UC_LOCK_DETECTION_ENABLED

Tracked-On: #7661
Acked-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Wu Zhou <wu.zhou@intel.com>
2022-08-17 09:23:33 +08:00
Wu Zhou c7b00e134f config-tools: change 'DISABLED' settings to 'ENABLED' in config xml
In order to improve DX, 'DISABLED' style configurator settings are
changed to 'ENABLED' style. The config xml files need too be changed
accordingly.

Including:
  - MCE_ON_PSC_DISABLED -> MCE_ON_PSC_ENABLED
  - ENFORCE_TURNOFF_AC -> SPLIT_LOCK_DETECTION_ENABLED
  - ENFORCE_TURNOFF_GP -> UC_LOCK_DETECTION_ENABLED

Tracked-On: #7661

Signed-off-by: Wu Zhou <wu.zhou@intel.com>
2022-08-17 09:23:33 +08:00
Wu Zhou 21d10af9d5 config-tools: change 'DISABLED' settings to 'ENABLED'
Some configurator settings are defined as 'feature DISABLED' style, which
could cause confusion to developers. This patch is to change them into
straightforward 'ENABLED' style.

Including:
  - MCE_ON_PSC_DISABLED -> MCE_ON_PSC_ENABLED
  - ENFORCE_TURNOFF_AC -> SPLIT_LOCK_DETECTION_ENABLED
  - ENFORCE_TURNOFF_GP -> UC_LOCK_DETECTION_ENABLED

Tracked-On: #7661

Signed-off-by: Wu Zhou <wu.zhou@intel.com>
2022-08-17 09:23:33 +08:00
David B. Kinder f2dacfa30c doc: update rdt doc with real-time vCPU option clarification
Improve explanation of the Real-time vCPU option checkbox.

[External_System_ID] ACRN-9307

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-16 14:28:06 -07:00
zihengL1 b026238a69 config-tools: modified requirements.txt and update GSG
Modified requirements.txt in misc/config_tools/configurator
directory and add GSG requirements.txt inmisc/config_tools
directory.
Relevant python package installing steps in GSG.

Tracked-On: #7975
Reviewed-by: Junjie Mao junjie.mao@intel.com
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-08-16 17:20:23 +08:00
Chuang Ke 815d9b45c6 configurator does not consider L3 CAT config when opening an exiting configuration
1. rewrite function to match xml data structure  to fix the bug
2. fix inconsistency in one function ( data push order change accordingly)

Tracked-On: #7927
Signed-off-by: Chuang-Ke <chuangx.ke@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-16 16:21:48 +08:00
Zhao Yakui 92034e9f7d ACRN:DM:VGPU: Add more check to avoid no geometry parameter for virtio-gpu
When no geometry parameter is passed for virtio-gpu, it should not be started.

Tracked-On: #7988
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Sun Peng <peng.p.sun@linux.intel.com>
Reviewed-by: Wang Yu <yu1.wang@intel.com>
2022-08-16 15:29:27 +08:00
Zhao Yakui 86eff3c6a1 ACRN:DM:VDisplay: Report the number of connected vscreen for virtio-gpu devices
When multi-display window is initialied/configured, it should report the correct number
to virtio-gpu devides so that it can notify that the Guest_VM can use multi-display.
Otherwise the Guest VM still gets only one display.

Tracked-On: #7988
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Sun Peng <peng.p.sun@linux.intel.com>
Reviewed-by: Wang Yu <yu1.wang@intel.com>
2022-08-16 15:29:27 +08:00
Zhao Yakui 5676cceda0 ACRN:DM:Vdisplay: Render one small bogus texture to fix the display issue in multi render_context
When virtio-gpu is used for guest_vm, ACRN uses the libSDL API to render the framebuffer
submitted from guest virtio-gpu device. The libSDL will cache some op/states related with
3D internally and skip some 3D API. This works well for one display. When multi displays
are enabled, ACRN will create  one SDL_Renderer/SDL_window for each display_window.
As the libSDL caches some states, it can't select the correct 3D shader and show
the garbage when switching among multi SDL_Renderer.

This is one limitation in libSDL.
So one small texture(32x32) is created and rendered so that each time it can reconfigure
the internal state for target texture. This is used to workaround the display issue.

Tracked-On: #7988
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Sun Peng <peng.p.sun@linux.intel.com>
Reviewed-by: Wang Yu <yu1.wang@intel.com>
2022-08-16 15:29:27 +08:00
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