Commit Graph

8202 Commits

Author SHA1 Message Date
David B. Kinder 9ac6c31c3b doc: add tutorial for enabling multiple displays
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-11-16 07:43:59 -08:00
Helmut Buchsbaum 3a1eb26de0 debian/rules: Cleanup egg-info directory of acrn-board-inspector
Tracked-On: #8257
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-11-16 16:36:20 +08:00
Helmut Buchsbaum 13937162e1 debian: Fix release package build
Since acrn-tools are not built when creating a release build, there are no
tool binaries to be installed. Generate the required debian/acrn-tools.install
file on the fly whenever a debug build is requested. This keeps this file
empty on a release build avoiding the resulting build errors about missing
files.

Additionally a package specific README.Debian file is added to explain this
behavior. It will be installed according to Debian packaging guidelines
at /usr/share/doc/acrn-tools/README.Debian.

Tracked-On: #8257
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-11-16 16:36:20 +08:00
szhen11 48c01048ba ignore debuild intermediate files
ignore debuild intermediate files in .gitignore to avoid
these files pollute acrn-hypervisor repo when using debuild
to build acrn.

Tracked-On: #8262
Signed-off-by: szhen11 <shuang.zheng@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-11-16 15:43:40 +08:00
Junjie Mao ce6500893f board_inspector: use executables found under system paths
Using partial executable paths in the board inspector may cause unintended
results when another executable has the same name and is also detectable in
the search paths.

Introduce a wrapper module (`external_tools`) which locates executables
only under system paths such as /usr/bin and /usr/sbin and converts partial
executable paths to absolute ones before executing them via the subprocess
module. All invocations to `subprocess.run` or `subprocess.Popen`
throughout the board inspector are replaced with `external_tools.run`, with
the only exception being the invocation to the legacy board parser which
already uses an absolute path to the current Python interpreter.

Tracked-On: #8315
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-11-16 11:02:42 +08:00
Junjie Mao 32edd75f7f static_allocator/gpa: deduplicate secondary PCI window list
When one single device being connected after multiple-levels of PCI-to-PCI
bridges, all those bridges may have the same MMIO window. That causes the
current static allocator not to consider that window being occupied because
of how it detects nested MMIO regions.

Remove duplicates in the list of secondary bus MMIO windows to fix that
issue.

Tracked-On: #8312
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-11-15 09:57:51 +08:00
Chenli Wei 6d57f8254b misc: rename common.py to avoid private library conflict
The offline tool use a utility libary and use "common" to named it, this
name conflict with some customer's local library, so we rename it to a
better and clear name.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-11-14 12:03:51 +08:00
Chenli Wei 25445eefe7 misc: fix the vCPU number issue of document
Current code use a invalid parameter to print the vCPU number, this
patch use the length of vCPU list to fix the above issue.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-11-14 11:34:15 +08:00
Chenli Wei 174917726d misc: refine the calculate logic of hv_ram_size
The legacy logic use double IVSHMEM_SIZE to calculate the HV RAM, it can't
match the current code.

This patch use the IVSHMEM_SIZE size only.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-11-14 10:41:49 +08:00
szhen11 4fd7a4d9cf config_tools: add the dummy address to let anonymous trial of ACRN
update the debian/debian_build.sh script to let the gbp dch to get
the email address for debian/changlog from one of the 3 ways with
priority from high to low: using environment variable 'EMAIL' or
'DEBEMAIL' if existed(this is actually gbp dch required), user.email
in git config if existed(set user.email to environment variable
'EMAIL' or 'DEBEMAIL' for gbp dch), or using a dummy address
"projectacrn@gmail.com".

Tracked-On: #8262
Signed-off-by: szhen11 <shuang.zheng@intel.com>
2022-11-14 10:18:09 +08:00
Xie, nanlin d21b6a38d8 misc: Update CODEOWNER for doc reviewer changed.
Tracked-On: #5581

Signed-off-by: Xie, nanlin <nanlin.xie@intel.com>
2022-11-14 10:00:41 +08:00
yuchuyang 504e49a567 config-tools: generate config_summary.rst
Generate config_summary.rst when saving scneario XML and launch scripts.

Tracked-On: #8300
Signed-off-by: yuchuyang <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-11-14 09:53:53 +08:00
Junjie Mao 6d48d4428a debian/rules: adapt to configurator-generated work folders
When building debian packages using one or more work folders generated by
the configurator, the build system will use the name of the work folder as
the scenario name because the configurator always names a scenario XML as
'scenario.xml'. Scenario names are important here because:

  1. they are used to name the installed hypervisor binaries and map files,
     and the postinst scripts will use those names to fetch the right
     binary to put under /boot.

  2. when multiple work folders defining different scenarios on the same
     board is given, use the basename of the scenario XMLs leads to a name
     conflict.

Not following the same scenario name derivation rule in debian/rule will
prevent a proper hypervisor binary to be put under /boot and lead to
boot-time failure. The potential scenario name collisions can also cause
unintended binaries to be installed.

This patch updates debian/rules to follow the same scenario name derivation
rules as the build system is using.

Tracked-On: #8301
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-11-10 10:43:14 +08:00
yuchuyang 638567e425 config-tools: refine print out message after running board inspector
1. Generate success message when there is no critical error.
2. Generate note when there is error(s).

Tracked-On: #8297
Signed-off-by: yuchuyang <yu-chu.yang@intel.com>
2022-11-09 09:19:52 +08:00
hangliu1 808b4f6628 config tool: combine multiple xhci to one line
generate one line of parameter in launch scipt for
multiple xchi configs in scenario.xml.

Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Tracked-On: #6690
2022-11-08 10:43:29 +08:00
yuchuyang 089ea130a7 config-tools: fix virio GPU rendering issue
Fix the following issues:
1. <gpu> and <displays> elements are added to scenario XML when they are not configured.
2. Virtio GPU components disappears after switching to another tab and switching back to
   previous tab.
3. Wrong error message of vertical offset checking.

Improve the error check in virtio_devices.xsd:
1. Every window virtual display need to configure window resolution, horizontal offset
   and vertical offset.
2. Any display's elements need to be configured. The existing code
   only check the first window resolution, horizontal offset, vertical
   offset and monitor id.

Tracked-On: #8292
Signed-off-by: yuchuyang <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-11-08 09:45:54 +08:00
Junjie Mao 0cee1f8080 static_allocator: skip ACPI objects referring all functions of a PCI device
According to section 6.1.1, ACPI Spec 6.4, _ADR of a device object under
PCI/PCIe bus can use a special function number 0xFFFF to refer to all
functions of a certain device. Such objects will have their own nodes in
the board XML, and that causes build-time issues when a static allocator
attempts to get all BDFs occupied under the root bus because 0xFFFF is not
a valid function number (which ranges from 0 to 7).

This patch skips ACPI devices with such addresses when listing existing
BDFs.

Tracked-On: #8293
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-11-07 16:22:27 +08:00
Yuanyuan Zhao 0a4c76357e hv: hide mwait from guest.
When CPU support MONITOR/MWAIT, OS prefer to use it enter
deeper C-state.

Now ACRN pass through MONITOR/MWAIT to guest.

For vCPUs (ie vCPU A and vCPU B) share a pCPU, if vCPU A uses MWait to enter C state,
vCPU B could run only after the time slice of vCPU A is expired. This time slice of
vCPU A is gone to waste.

For Local APIC pass-through (used for RTVM), the guest pay more attention to
timeliness than power saving.

So this patch hides MONITOR/MWAIT by:
    1. Clear vCPUID.05H, vCPUID.01H:ECX.[bit 3] and
    MSR_IA32_MISC_ENABLE_MONITOR_ENA to tell the guest VM's vCPU
    does not support MONITOR/MAIT.
    2. Enable MSR_IA32_MISC_ENABLE_MONITOR_ENA bit for
    MSR_IA32_MISC_ENABLE inject 'GP'.
    3. Trap instruction 'MONITOR' and 'MWAIT' and inject 'UD'.
    4. Clear vCPUID.07H:ECX.[bit 5] to hide 'UMONITOR/UMWAIT'.
    5. Clear  "enable user wait and pause" VM-execution control, so
    UMONITOR/MWAIT causes an 'UD'.

Tracked-On: #8253
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Fei Li <fei1.li@intel.com>
2022-11-04 18:55:52 +08:00
Yuanyuan Zhao 4083da9470 config_tools: offline CPUs owned by User VMs
When launch a User VM own pCPUs, offline Service VM vCPUs which use
the same pCPUs by launch script.

Tracked-On: #8253
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-11-04 12:44:54 +08:00
Yuanyuan Zhao 138499f886 config_tools: add own_pcpu widget
Add "exclusively owns physical CPUs" checkbox to pre-launched VMs
and post-launched VMs. RTVM will not display this checkbox.
If this checkbox is set, the VM will use all the pCPUs assigned to
it alone.

Tracked-On: #8253
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-11-04 12:44:54 +08:00
Chenli Wei ea7e9540a0 misc: update ASRock board XML
This patch update the board.xml for ASRock.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-11-04 12:14:50 +08:00
yuchuyang 3bb70efa12 config-tools: re-rendering the data after importing different board XML
Switch tag in order to trigger the component re-rendering after importing
different board XML.

Tracked-On: #8288
Signed-off-by: Yang, Yu-chu <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-11-04 11:33:02 +08:00
David B. Kinder 439fc12246 doc: update doc build requirements
Verified that the newly released RTD theme is OK to use with the doc build process,
so update the requirements.txt with that and tweak the acceptable docutils versions.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-11-02 14:08:06 -07:00
Xie, nanlin 6edc1a7715 doc: Upgrade RT kernel to 5.15 in sample app guide
Signed-off-by: Xie, nanlin <nanlin.xie@intel.com>
2022-11-02 14:05:47 -07:00
hangliu1 f144e8089c HV: remove rewrite of PMU guest flag in acrn dm
Exclude "GUEST_FLAG_PMU_PASSTHROUGH" from DM_OWNED_GUEST_FLAG_MASK
in case device model rewrite the value in release mode, reserve it
in debug mode.

Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
Tracked-On:#6690
2022-11-02 15:50:30 +08:00
hangliu1 0aa5ec5bda config tool:add debug mode limitation for PMU
In release mode, "GUEST_FLAG_PMU_PASSTHROUGH" is
not generated for specific VM.

Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
Tracked-On:#6690
2022-11-02 15:50:30 +08:00
Sun Peng 10f25cdab6 dm: vga: remove all the assertion.
To avoid assertions in devicemodel, remove all the assert() in vga.c,
use print error message to check errors.

All the behavior of registers follow this spec:
https://wiki.osdev.org/VGA_Hardware#Graphics_Mode

Tracked-On: #8125
Signed-off-by: Sun Peng <peng.p.sun@linux.intel.com>
Reviewed-by: Huang, Yonghua <yonghua.huang@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2022-11-02 15:03:35 +08:00
Helmut Buchsbaum 9941c44bee debian/rules: Dynamically generate acrn-hypervisor.install
To be able to to conditionally add a launch script directory for
acrn-hypervisor package, the debian/acrn-hypervisor.install file must be
created dynamically. If there are only configurations (e.g. partitioned
scenarios) that do not need any launch scripts, we have to omit the
launch script directory entry in debian/acrn-hypervisor.install.

Tracked-On: #8263
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-11-02 14:24:49 +08:00
szhen11 41feb1053e debian: create script to build acrn with debuild
$ debian/debian_build.sh -h
Usage: debian/debian_build.sh [--board_list ACRN_BOARDLIST] [--scenario_list ACRN_SCENARIOLIST] [--config_path CONFIGDIRS] [--release n|y] [acrn | board_inspector | clean]
Optional arguments:
  -h, --help           show this help message and exit
  -b, --board_list     list the boards to build, seperated by blank; build all scanned boards in the config path if specified as ""; build the default boards in debian rules if not specified
  -s, --scenario_list  list the scenarios to build, seperated by blank; build all scanned scenarios in the config path if specified as ""; build the default scenarios in debian rules if not specified
  -c, --config_path    specify the config path for the board and scenario configuration files, default use misc/config_tools/data if not specified
  -r, --release        build debug version with n, release version with y; default defined in debian rules if not specified
  acrn|board_inspector|clean    specify the build target, default value is acrn if not specified
Examples:
  debian/debian_build.sh
  debian/debian_build.sh -b nuc11tnbi5 -s shared
  debian/debian_build.sh -b "nuc11tnbi5 tgl-vecow-spc-7100-Corei7" -s "shared hybrid" -c misc/config_tools/data -r y
  debian/debian_build.sh -b "" -s shared
  debian/debian_build.sh board_inspector

Tracked-On: #8246
Signed-off-by: szhen11 <shuang.zheng@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-11-01 14:41:59 +08:00
zhangrouyu e5c1eafba3 doc: update changes to 22.04 on sample app guide
Tracked-On: #8269
Signed-off-by: zhangrouyu <rouyu.zhang@intel.com>
2022-11-01 09:56:07 +08:00
David B. Kinder 4f0bc815ac doc: update missed changes to Ubuntu 22.04
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-10-31 06:55:29 -07:00
zhangrouyu c9a836aed8 update ubuntu version from 20.04.5 to 22.04.1 in GSG document
Signed-off-by: zhangrouyu <rouyu.zhang@intel.com>
2022-10-28 06:57:08 -07:00
Yang,Yu-chu aada036ac6 config-tools: clean up the vm names which do not exist
Clean up vm_name of vuart and/or VM_NAME of IVSHMEM which is not defined in
//vm/name while loading scenario XML.

Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
Rviewed-by: Junjie Mao <junjie.mao@intel.com>
Tracked-On: #8270
2022-10-28 11:17:46 +08:00
Junjie Mao c526cbebf1 doc: handle anonymous complex types in XML schema
The schema of scenario XMLs uses both named and anonymous complex types,
but the configdoc.xsl today only works for named complex types. That causes
improper rendering of config items related to virtio devices (whose schema
uses anonymous types) as well as wrong applicable VM icons which states
that virtio devices apply to not only post-launched VMs but also
pre-launched and service VM, which does not make sense.

This patch improves configdoc.xsl by adding support of anonymous complex
types so that they are walked through in the same way as named ones.

Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-10-27 18:26:54 -07:00
Fei Li ab4e19d0be hv: vPCI: fix large bar base update
The current code would write 'BAR address & size_maks' into PCIe virtual
BAR before updating the virtual BAR's base address when guest writing a
PCIe device's BAR. If the size of a PCIe device's BAR is larger than 4G,
the low 32 bits size_mask for this 64 bits BAR is zero. When ACRN updating
the virtual BAR's base address, the low 32 bits sizing information would
be lost.

This patch saves whether a BAR writing is sizing or not before updating the
virtual BAR's base address.

Tracked-On: #8267
Signed-off-by: Fei Li <fei1.li@intel.com>
2022-10-28 05:55:20 +08:00
zhangrouyu 5a452e5e32 Create a requirements.txt for python package on GSG
Tracked-On: #8269
Signed-off-by: zhangrouyu <rouyu.zhang@intel.com>
2022-10-27 16:15:40 +08:00
David B. Kinder 893fbfec78 doc: fix views and applicable VMs label handling in config option doc
Custom attributes in the XML schema, such as `applicable-vms` and `views`,
are designed to recursively inherit those of the parent. Thus, the
effective attribute of an element should be derived by its lowest ancestor
that has that attribute explicitly defined. Looking up only one level would
not be sufficient.

This patch updates the `configdoc.xsl` to derive the effective attributes
properly so that icons in the generated doc properly reflects what is
specified in the schema. Addresses ACRN-7347

Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-10-26 07:52:26 -07:00
David B. Kinder 991f55598b doc: grammar fixes
fixing some grammar issues in documentation

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-10-26 07:43:56 -07:00
Junjie Mao e96937aa89 Makefile: do not try to figure out BOARD and SCENARIO for cleanup
The targets "clean" and "distclean" are special as they do not need BOARD
or SCENARIO from users. This patch stops the guesswork of BOARD and
SCENARIO if any of those two targets are specified.

It is assumed that "clean" or "distclean" is not invoked with other targets
at the same time.

Tracked-On: #8259
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-10-26 14:09:44 +08:00
Junjie Mao 64cbc706b7 Makefile: retake XMLs from users if they are updated
In the current config.mk board and scenario XMLs are only copied to the
build directory when they do not exist. That prevents users from using XML
files they have edited, probably to fix previously reported validation
errors, for a rebuild unless the former build directory is totally removed.

This patch adds the user-given paths to XML files (if they exist) as
dependencies of the copied files in the build directory, so that users can
now provide new board and/or scenario XMLs to an existing build to
automatically trigger a complete rebuild.

Building without explicitly specifying BOARD and SCENARIO is still
supported if a build directory already exists. In that case the copied
board and scenario XMLs will not be modified.

Tracked-On: #8259
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-10-26 14:09:44 +08:00
Junjie Mao 314f3004c7 Makefile: make dependencies on validated configurations explicit
ACRN config tools generate source files, scripts and binaries based on
users' inputs in the configurations files, i.e., board and scenario
XMLs. Those generation activities all assume that users' inputs are
properly validated, so that all assumptions they have on such inputs are
hold.

Unfortunately, not all dependencies on validated user inputs are explicitly
stated in the Makefiles today. That will cause random error messages
(typically a Python stack trace) to be printed along with validation errors
when an invalid scenario XML is given, and such messages confuse users
about the root causes of the failure.

This patch decouples scenario validation from genconf.sh and make that step
as a separate target that depends on the board and scenario XMLs. One
timestamp file is generated only when the validation succeeds so that
targets requiring validated XMLs can refer that file in its dependency list
to make it explicit.

Dependencies of the following targets are also updated accordingly:

  * $(HV_ALLOCATION_XML), which is the allocation XML including static
    allocation results, now also depends on validated XMLs.

  * $(HV_CONFIG_TIMESTAMP), which records when the config source files are
    generated, now also depends on validated XMLs.

  * $(SERIAL_CONF), which is the serial conf for the service VM, depends on
    the allocation XML.

By the way, the missing dependency on HV_CONFIG_DIR for touching
HV_DIFFCONFIG_LIST is added to fix the "file not found" issue.

Tracked-On: #8259
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-10-26 14:09:44 +08:00
Junjie Mao 819567e519 Makefile: drop the dependency on hvdefconfig
In the top-level Makefile, the target "hypervisor" depends on "hvdefconfig"
because, at the time the latter is introduced, building without specifying
BOARD or SCENARIO is supported by using a pair of default board and
scenario XMLs.

This is no longer the case today, as BOARD and SCENARIO are now mandatory
command line options. As a result, that dependency is no longer necessary,
and this patch just removes that.

Tracked-On: #8259
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-10-26 14:09:44 +08:00
Junjie Mao cdf7796a62 Makefile: clean up unnecessary phony targets
Phony targets are mostly for recipes that are expected to be invoked
directly from the command line as a target and will always be executed. As
a result, it is in most cases not appropriate for a real file target to to
depend on a phony one, as that means the file will always be regenerated.

In the Makefile today, however, dependencies on phony targets are common
and cause the hypervisor to be fully rebuilt regardless of whether an
existing build exists or not.

This patch cleans up the following phony targets which are not meant to be
targets from the command line.

  - pre_build: This target has three outputs, namely the prebuild checker,
    the ACPI tables for pre-launched VMs and the serial.conf. It is split
    into three targets, one for each output.

  - headers: This target is an alias of dynamically-generated header
    files. It is replaced with a variable so that targets depending on
    "header" now depends on the actual header files generated.

With this patch, make will only rebuild modified files and targets
depending on them directly or indirectly.

Tracked-On: #8259
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-10-26 14:09:44 +08:00
Junjie Mao 0e8ce66af9 Makefile: specify default goal using the variable .DEFAULT_GOAL
The target "default" in hypervisor/Makefile is just an alias of the target
"all" in order to make "all" being the default goal. This patch replaces
that duplicate target and specifies the default goal by defining the
variable .DEFAULT_GOAL instead.

Tracked-On: #8259
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-10-26 14:09:44 +08:00
Kunhui-Li 7c18e26044 config_tools: add assertions for virtio gpu
1. In the full screen mode, a VM supports 4 virtual displays at most.
2. A vm supports 2 virtual windows at most.
3. The monitor ID cannot be duplicated in the full screen mode.
4. All the display elements are in DisplayConfiguration of VMType.xsd. It
cannot be set as required. Using assertions to check if the sub-elements
are set for any type of virtual display accordingly.
 - check if a display has been added and a display type is set.
 - check if monitor ID is set for full screen virtual display.
 - check if resolution and offsets are set for window virtual display.

Tracked-On: #7970
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-10-26 08:15:17 +08:00
Kunhui-Li ad17268c5e config_tools: add virtio gpu widget
add virtio gpu widget for the new design.

Tracked-On: #7970
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-10-26 08:15:17 +08:00
Kunhui-Li f165ff3b5a config_tools: update the upgrader.py script for virtio gpu
this patch updates the upgrader.py script for virtio gpu.

Tracked-On: #7970
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-10-26 08:15:17 +08:00
Kunhui-Li 5554040dbb config_tools: refine virtio gpu in launch script
If display type is "Windows", the generated launch script will follow
the below rule.
"virtio-gpu,geometry=<width>x<height>+<x_off>+<y_off>,geometry=<width>x<height>+<x_off>+<y_off>"

If display type is "Full screen", the generated launch script look like
this. For example:
"virtio-gpu,geometry=fullscreen:0,geometry=fullscreen:1"

Tracked-On: #7970
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-10-26 08:15:17 +08:00
Kunhui-Li 4f3a28d29f config_tools: refine virtio gpu device in the schema
this patch refines virtio gpu device in the schema for new design.

Tracked-On: #7970
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-10-26 08:15:17 +08:00
Fei Li 7c940207d2 hv: vpci: fix pass-thru pcie device may access MSI-X BAR
Now ACRN would traps MSI-X Table Structure access and does MSI-X interrupt
remapping for pass-thru PCIe devices. ACRN does this trap by unmmapping the
address ranges where the MSI-X Table Structure locates in granularity of 4K
pages. So there may have other registers (non-MSI-X structures) in these
trapped pages

However, the guest may access these registers (non-MSI-X structures) in these
trapped pages, which needs to be forwarded to the physical device. This patch
forwards the access to real hardware for pass-thru PCIe devices.

Tracked-On: #8255
Signed-off-by: Fei Li <fei1.li@intel.com>
2022-10-26 01:02:20 +08:00