Commit Graph

3983 Commits

Author SHA1 Message Date
Victor Sun 6c99f76404 HV: prepare ve820 for apl up2
We need ve820 table to enable prelaunched VM for apl-up2 board;

Tracked-On: #3214

Signed-off-by: Victor Sun <victor.sun@intel.com>
2019-08-22 09:10:38 +08:00
Yuan Liu 3cc0eabac6 dm: pm: support control method power button
ACPI supports two ways for power button device, one of them is control
method, and its _HID object is PNP0C0C.

If power button mediator doesn't scan power button from LNXPWRBN node
try to scan PNP0C0C node instead.

v2): Move the functions of openning fixed/control method power button to open_native_power_button

Tracked-On: #3594
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-08-20 09:27:32 +08:00
Yin Fengwei 6beb34c3cb vm_load: update init gdt preparation
Now, we use native gdt saved in boot context for guest and assume
it could be put to same address of guest. But it may not be true
after the pre-launched VM is introduced. The gdt for guest could
be overwritten by guest images.

This patch make 32bit protect mode boot not use saved boot context.
Insteadly, we use predefined vcpu_regs value for protect guest to
initialize the guest bsp registers and copy pre-defined gdt table
to a safe place of guest memory to avoid gdt table overwritten by
guest images.

Tracked-On: #3532

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-08-20 09:22:20 +08:00
Yonghua Huang 700a37856f hv: remove 'flags' field in struct vm_io_range
Currently, 'flags' is defined and set but never be used
  in the flow of handling i/o request after then.

Tracked-On: #861
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-08-19 10:19:54 +08:00
Conghui Chen eab4e42e7b hv: enable console vuart in industry scenario
Enable console vuart for the reset of VMs in industry scenario.

Tracked-On: #3370
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
2019-08-19 08:54:25 +08:00
fuzhongl c7f569da30 HV: switch launch LaaG with OVMF by default
OVMF will open source for V1.2, so enable launch LaaG with OVMF.

Tracked-On: #3506
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Signed-off-by: fuzhongl <fuzhong.liu@intel.com>
2019-08-19 08:53:39 +08:00
David B. Kinder 4d4c4e7b68 doc: remove modernizr.min.js
modernizr.min.js is no longer used by Sphinx's rtd theme and is causing
some browsers to have a noticable flash when pages are loaded. While we
can't easily remove it from the RTD theme, we can replace the script
with an empty file instead.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-08-16 15:36:46 -07:00
Yonghua Huang f791574f0e hv: refine the function pointer type of port I/O request handlers
In the definition of port i/o handler, struct acrn_vm * pointer
 is redundant as input, as context of acrn_vm is aleady linked
 in struct acrn_vcpu * by vcpu->vm, 'vm' is not required as input.

 this patch removes argument '*vm' from 'io_read_fn_t' &
 'io_write_fn_t', use '*vcpu' for them instead.

Tracked-On: #861
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2019-08-16 11:44:27 +08:00
Jie Deng 866935a53f hv: vcr: check guest cr3 before loading pdptrs
Check whether the address area pointed by the guest
cr3 is valid or not before loading pdptrs. Inject #GP(0)
to guest if there are any invalid cases.

Tracked-On: #3572
Signed-off-by: Jie Deng <jie.deng@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-08-16 11:43:17 +08:00
David B. Kinder 5b5efe7193 doc: add v1.2 to the release navigation picker
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-08-15 09:50:33 -07:00
David B. Kinder 7131b19f4a doc: remove references to 2.0 in intro
While we internally call the "new" ACRN architecture 2.0, it could be
confusing to users since we also are calling the upcoming release v1.2
and there is no 2.0 release yet.  Remove references to 2.0 in the
introduction.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-08-15 09:41:23 -07:00
lirui34 27b7cc23ea doc: Release Notes v1.2
Add release notes v1.2

Signed-off-by: lirui34 <ruix.li@intel.com>
2019-08-15 09:23:40 -07:00
David B. Kinder e77d1d7343 doc: add new scenario-based intro
Add the scenario configurations to the ACRN introduction.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-08-15 09:16:24 -07:00
Deb Taylor a5647e9edf Content edits
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2019-08-14 21:09:49 -07:00
huihuang.shi f147c388a5 hv: fix Violations touched ACRN Coding Guidelines
fix violations touched below:
1.Cast operation on a constant value
2.signed/unsigned implicity conversion
3.return value unused.

V1->V2:
1.bitmap api will return boolean type, not need to check "!= 0", deleted.
2.The behaves ~(uint32_t)X and (uint32_t)~X are not defined in ACRN hypervisor Coding Guidelines,
removed the change of it.
Tracked-On: #861
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2019-08-15 09:47:11 +08:00
Yuan Liu f1b71d983a dm: expand default WaaG memory to 4G
This patch is used to expand WaaG memory from 2G to 4G in launch script.

Tracked-On: #3576
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-08-14 16:10:03 +08:00
Shiqing Gao 062fe19800 hv: move vmx_rdmsr_pat/vmx_wrmsr_pat from vmcs.c to vmsr.c
This patch moves vmx_rdmsr_pat/vmx_wrmsr_pat from vmcs.c to vmsr.c,
so that these two functions would become internal functions inside
vmsr.c.
This approach improves the modularity.

v1 -> v2:
 * remove 'vmx_rdmsr_pat'
 * rename 'vmx_wrmsr_pat' with 'write_pat_msr'

Tracked-On: #1842
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2019-08-14 10:51:35 +08:00
David B. Kinder 9144c56771 doc: incorporate new scenario-based hardware doc
Changing from just describing the supported hardware to a new hardware
support matrix based on the usage scenarios.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-08-13 18:30:25 -07:00
Tianhua Sun 9c48fc4ac5 hv: fix failed to build release version build with Kconfig setting
Hardcode "RELEASE=0" will cause the value of "CONFIG_RELEASE"
to be 'n' in kconfig.mk, it will be overwritten "CONFIG_RELEASE"
with Kconfig setting.

Tracked-On: #3565
Signed-off-by: Tianhua Sun <tianhuax.s.sun@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2019-08-14 08:52:59 +08:00
yunzha4x bbf4df7bf7 doc: update Getting started guide for Intel NUC software setup
Signed-off-by: yunzha4x <yunx.zhang@intel.com>
2019-08-13 14:59:00 -07:00
yunzha4x 02073a2d72 doc: update Getting started guide for Intel NUC software setup
Signed-off-by: yunzha4x <yunx.zhang@intel.com>
2019-08-13 14:59:00 -07:00
yunzha4x b06c84ba1f doc:update Getting started guide for Intel NUC software setup
Signed-off-by: yunzha4x <yunx.zhang@intel.com>
2019-08-13 14:59:00 -07:00
Lei Lu bf1a162c3e doc: update Using SBL on UP2 Board
1. The origin clearlinux version 29070 in this doucment example is not
   workable with acrn latest code, update the clearlinux version.
2. Replace the sos_console_login.png with vm_console_login.png

Signed-off-by: Lei Lu <leix.lu@intel.com>
2019-08-13 14:30:16 -07:00
Shiqing Gao c3001e61a2 doc: add limitation for UEFI services
- add limitation for UEFI services

Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
2019-08-13 14:29:20 -07:00
Tonny Tzeng 0a067a833f make: white-list SBL firmware boards
The top-level Makefile white-lists BOARDs require to generate UEFI
executable, but more UEFI BOARDs have been supported since then.
As a result, the build instructions in existing documents may not be
sufficient for those new BOARD targets, if the reader misses to supply
the FIRMWARE variable while building the hypervisor.

Instead of adding new UEFI BOARD types using the original long if-else
statements, I'd like to propose to white-list SBL BOARD types, and add
the new SBL BOARD types to the list while needed.

Tracked-On: #3541
Signed-off-by: Tonny Tzeng <tonny.tzeng@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2019-08-12 11:24:55 +08:00
Li, Fei1 d82a00a128 hv: vpci: remove pBDF configure for emulated device
Since now we use vBDF to search the device for PCI vdev.

Tracked-On: #3475
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
2019-08-12 10:00:44 +08:00
Li, Fei1 90480db553 hv: vpci: split vPCI device from SOS for post-launched VM
When assgined a PCI PTDev to post-launched VM from SOS, using a pointer to point to
the real struct pci_vdev. When post-launched VM access its PTDev configure space in
SOS address space, using this real struct pci_vdev.

Tracked-On: #3475
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
2019-08-12 10:00:44 +08:00
Deb Taylor 13de9a4cf6 Formatting for new Hardware Support page 2019-08-09 16:58:20 -07:00
lirui34 70e1e8d154 doc: hybrid mode scenario introduction
Add introduction about how to enable hybrid mode scenario.

Signed-off-by: lirui34 <ruix.li@intel.com>
2019-08-09 16:32:13 -07:00
Li, Fei1 4c8e60f1d0 hv: vpci: add each vdev_ops for each emulated PCI device
Add a field (vdev_ops) in struct acrn_vm_pci_dev_config to configure a PCI CFG
operation for an emulated PCI device. Use pci_pt_dev_ops for PCI_DEV_TYPE_PTDEV
by default if there's no such configure.

Tracked-On: #3475
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-08-09 14:19:49 +08:00
Li, Fei1 ff54fa2325 hv: vpci: add emulated PCI device configure for SOS
Add emulated PCI device configure for SOS to prepare for add support for customizing
special pci operations for each emulated PCI device.

Tracked-On: #3475
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
2019-08-09 14:19:49 +08:00
Mingqiang Chi 973ba5b63f hv:fix need to make twice in hypervisor folder
now the dependency is like this in Makefile:
  acrn.bin << xxxx.a << xxxx.obj
if excute 'make' in hypervsior fold for the first time,
it can generate acrn.bin, if excute 'make' for second
time, it can not do the final link because there are
the same timestamp for acrn.bin and xxxx.a generated by
previous build, add PHONY to fix this issue.

Tracked-On: #3542
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-08-09 11:28:23 +08:00
Junming Liu 4dfd5d6ae6 dm:gvt:keep LaaG aperture size consistent with the host
Keep LaaG aperture size consistent with the host bios setting,
if we statically set LaaG aperture 256MB,
it may not have memory space for LaaG aperture.
We get host aperture size from cfg port 0x62.

Tracked-On: #3537
Signed-off-by: Junming Liu <junming.liu@intel.com>
Reviewed-by: Xinyun Liu <xinyun.liu@intel.com>
2019-08-09 10:29:42 +08:00
Yifan Luo f65ba2154f HV: shell: fix temp_str out of bounds buffer access
String buffer temp_str is defined with size TEMP_STR_SIZE(60U) but accessed with MAX_STR_SIZE(256U). Better to limit the access bound to TEMP_STR_SIZE to prevent potential issue.

Tracked-On: #3549
Signed-off-by: Yifan Luo <luoyifan@cmss.chinamobile.com>
2019-08-09 10:26:38 +08:00
Yifan Luo 50e0a932a2 dm: virtio-i2c: fix native_adapter memory leak
If failed to create native_adapter, free allocated native_adapter memory before return.

Tracked-On: #3543
Signed-off-by: Yifan Luo <luoyifan@cmss.chinamobile.com>
2019-08-08 10:36:46 +08:00
Li, Fei1 5471473f60 hv: vpci: create iommu domain in vpci_init for all guests
Create an iommu domain for all guest in vpci_init no matter if there's a PTDev
in it.

Tracked-On: #3475
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Reviewed-by: Dongsheng Zhang <dongsheng.x.zhang@intel.com>
2019-08-06 11:51:02 +08:00
Li, Fei1 599a058403 hv: vpci: refine init_vdevs
Now almost the vPCI device information could be obtain from PCI device configure
in VM configure. init_vdevs could make things more easier.
And rename init_vdevs to vpci_init_vdevs, init_vdev to vpci_init_vdevs to avoid
MISRA-C violations.

Tracked-On: #3475
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
Reviewed-by: Dongsheng Zhang <dongsheng.x.zhang@intel.com>
2019-08-06 11:51:02 +08:00
Li, Fei1 eb21f205e4 hv: vm_config: build pci device configure for SOS
Align SOS pci device configure with pre-launched VM and filter pre-launched VM's
PCI PT device from SOS pci device configure.

Tracked-On: #3475
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
2019-08-06 11:51:02 +08:00
Li, Fei1 adbaaaf6cb hv: vpci: rename ptdev_config to pci_dev_config
pci_dev_config in VM configure stores all the PCI devices for a VM. Besides PT
devices, there're other type devices, like virtual host bridge. So rename ptdev
to pci_dev for these configure.

Tracked-On: #3475
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-08-06 11:51:02 +08:00
fuyanX 83e887dbb3 memmap:reserve phys-addr for hvlog
acrn.conf:add memmap phys-addr 2M for hvlog,
not mapped by kernel.

Tracked-On: projectacrn/acrn-hypervisor#3533
Signed-off-by: YanX Fu <yanx.fu@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
2019-08-05 18:27:38 +08:00
David B. Kinder 70fdde4230 doc: add the SDC2 scenario doc into the navigation
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-08-02 17:24:54 -07:00
David B. Kinder f0ecf8291f doc: incorporate scenario-based doc update
PR #3516 was submitted during a documentation reorganization and
resulted in merge conflicts with files that no longer exist.  We closed
that PR and opened this one with those changes applied to the right
files.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-08-02 15:38:23 -07:00
David B. Kinder 9580a2131b doc: apply edits to SDC2 scenario doc
Update merged PR #3463 with format and wording improvements.
(Not linked yet into the document navigation)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-08-02 12:59:00 -07:00
Tonny Tzeng 0ab14fab39 doc: adding guide to launch 2 Linux UOSes using SDC2 scenario
Tracked-On: #3462
Signed-off-by: Tonny Tzeng <tonny.tzeng@intel.com>
Reviewed-by: Fuzhong Liu <fuzhong.liu@intel.com>
Reviewed-by: Nanlin Xie <nanlin.xie@intel.com>
2019-08-02 10:27:02 -07:00
David B. Kinder 0085348f36 doc: update v1.0.1 release notes
Fix some wording, table formatting, and links to issues and commits from
the original PR #3515

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-08-02 10:23:13 -07:00
lirui34 3b00ab160e doc: release notes v1.0.1
Add release notes v1.0.1

Signed-off-by: lirui34 <ruix.li@intel.com>
2019-08-02 09:55:19 -07:00
David B. Kinder abd8b710a4 doc: improve CSS for home page grid
Update the ACRN logo size to remove specifics in the CSS.  (Grid images
should be ~100px high for the grid.)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-08-02 09:53:34 -07:00
David B. Kinder a1cc860d5d doc: fix image proportions on home page for ie
The ACRN icon on the new graphical home page looked fine with firefox,
edge, and chrome browsers, but not on IE.  This PR fixes that

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-08-02 07:56:42 -07:00
David B. Kinder cd232f4442 doc: fix broken links after content reorg
Home page "button" links needed to be manually updated (because of the
raw html usage) after content around.

Move partition mode docs from try to develop persona pages.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-08-02 07:34:25 -07:00
David B. Kinder 0d07dad5cb doc: additional doc navigation restructuring
Adjust doc navigation organization based on additional feedback.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-08-01 21:30:22 -07:00