Commit Graph

4373 Commits

Author SHA1 Message Date
Li, Fei1
9d26dab6d6 hv: mmio: add a lock to protect mmio_node access
After adding PCI BAR remap support, mmio_node may unregister when there's others
access it. This patch add a lock to protect mmio_node access.

Tracked-On: #3475
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
2019-11-01 14:44:11 +08:00
Li, Fei1
21cb120bcc hv: vpci: add a global PCI lock for each VM
Concurrent access on PCI device may happened if UOS try to access PCI configuration
space on different vCPUs through IO port. This patch just adds a global PCI lock for
each VM to prevent the concurrent access.

Tracked-On: #3475
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
2019-11-01 14:44:11 +08:00
Li, Fei1
f711d3a639 hv: vpci: define PCI CONFIG_ADDRESS Register as its physical layout
Refine PCI CONFIG_ADDRESS Register definition as its physical layout.
In this case, we could read/write PCI CONFIG_ADDRESS Register atomically.

Tracked-On: #3475
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
2019-11-01 14:44:11 +08:00
wenlingz
c8fa8e15f8 Modify KBL-NUC/SDC for default build
Tracked-On: #3968
Signed-off-by: wenlingz <wenling.zhang@intel.com>
2019-11-01 09:06:45 +08:00
Yin Fengwei
98fa9a81cd Doc: Update system power management doc
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
2019-10-31 18:54:51 -04:00
Yin Fengwei
3a4af4b096 doc: Update hv power management doc
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
2019-10-31 18:52:20 -04:00
Jason Chen CJ
b2ef980260 document: update HLD for hypervisor overview
updated this chapter based on latest master
some part still need update:
- vSBL need be replaced by OVMF after removed all vSBL stuff

Tracked-On: #3882
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
2019-10-31 18:44:27 -04:00
Jason Chen CJ
700d54e817 document: update HLD for cpu virtualization
updated this chapter based on latest master

Tracked-On: #3882
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
2019-10-31 18:41:31 -04:00
Li, Fei1
6f310d1ab2 hv: mmio: move EPT operation out of register_mmio_emulation_handler
register_mmio_emulation_handler should only register handler for mmio emulation.

Tracked-On: #3475
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
2019-10-31 11:46:10 +08:00
Li, Fei1
4f6653dc9c hv: vpci: do unmap/map in vdev_pt_write_vbar explicitly
Unmap old mappings in vdev_pt_write_vbar explicitly before set_vbar_base.
Then map new mappings explicitly in vdev_pt_write_vbar.

Tracked-On: #3475
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
2019-10-31 11:46:10 +08:00
Huihuang Shi
5d662ea11f hv: fixed by replace ull to ul.
ul is used as immediate integer suffix with type uint64_t.

Tracked-On: #3214
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
2019-10-31 09:02:59 +08:00
Jian Jun Chen
46b157008c dm: file lock should be held till all mmap is done
Lock should be held till all the mmap operations are done. This is to
avoid the mmap failure when multiple guests are created concurrently.
For example consider the following case in which vm1 and vm2 are
created by acrnd concurrently:
- vm1 is created with 4G+2M memory.
- 4G+2M memory is reserved in hugetlb now and vm1 continues to
  allocate memory for the lowmem without lock held.
- 2G memory is allocated by vm1 for its lowmem, and 2G+2M memory
  is available in hugetlb.
- At this time vm2 is created with 1G+2M memory. It finds that enough
  memory is reserved (2G+2M), so it does not try to reserve more
  memory.
- vm2 allocates some memory for its lowmem/highmem/ovmf.
- vm1 tries to allocate memory for its highmem/ovmf, the allocation
  will fail. vm1 creation failed in this case.

Tracked-On: #3947
Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-10-30 11:37:44 +08:00
David B. Kinder
52304348d6 doc: doc build errors not being reported
PR #3665 moved all the doc build artifacts into the _build folder and
updated scripts and Makefile to account for this, except missed a fix in
the script that checks for known issues. This patch fixes that but shows
we've got a bunch of issues that have not been being reported so we'll
need to fix those problems to resolve failing doc builds.

Also fixed process of the VERSION file in conf.py since the path to that
file was changed by PR #3665 as well and was raising an exeception that
was being masked.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-29 17:28:26 -07:00
David B. Kinder
c1cc3040a4 doc: fix remaining masked doc build errors
This should get us back to a clean doc build now...

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-29 17:26:21 -07:00
David B. Kinder
a7a0852faa doc: fix doc build errors previously masked
As reported in PR #3959, doc build errors were being masked by a script
error.  This PR fixes a chunk of them.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-29 17:11:02 -07:00
Deb Taylor
04d88e4b7d Doc: remove broken links in RNs.
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2019-10-29 20:06:25 -04:00
David B. Kinder
5a7237b3ff doc: fix broken include paths
PR #3665 moved the doc build folder, so files referenced via directives
had an incorrect path (need to add an additional ../../ to the front of
relative paths that were referencing files outside of the doc folder).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-29 16:38:45 -07:00
David B. Kinder
be91d87d36 doc: fix vuart-virt-hld errors
Fix "duplicate label" error (name of a figure collided with the name of
a document).  Also fixed very long lines, cleaned up some stray extra
spaces that were breaking up words, and some grammar issues.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-29 16:38:24 -07:00
Li, Fei1
2c158d5ad4 hv: io: add unregister_mmio_emulation_handler API
Since guest could re-program PCI device MSI-X table BAR, we should add mmio
emulation handler unregister.
However, after add unregister_mmio_emulation_handler API, emul_mmio_regions
is no longer accurate. Just replace it with max_emul_mmio_regions which records
the max index of the emul_mmio_node.

Tracked-On: #3475
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
2019-10-29 14:49:55 +08:00
Li, Fei1
dc1e2adaec hv: vpci: add PCI BAR re-program address check
In theory, guest could re-program PCI BAR address to any address. However, ACRN
hypervisor only support [0, top_address_space) EPT memory mapping. So we need to
check whether the PCI BAR re-program address is within this scope.

Tracked-On: #3475
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-10-29 14:49:55 +08:00
lirui34
dab14856c2 doc: Add industry argument for auto setup script
Also fix efibootmgr not set correct issue.

Signed-off-by: lirui34 <ruix.li@intel.com>
2019-10-29 10:24:24 +08:00
Wei Liu
85b362fbeb acrn-config: modify vxworks uos id for industry launch config
As vm3 for industry scenario was removed from scenario config, so
modify the uos id to proper id.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-29 08:38:25 +08:00
Wei Liu
941d5ad308 acrn-config: parse rootfs_img and refine virtio-blk
1. Parse item of 'rootfs_img' from launch config xml.
2. Refine virtio-blk device for launch config.

Tracked-On: #3931
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
2019-10-29 08:38:25 +08:00
Wei Liu
8cd7c34580 acrn-config: modify board name to uos name
We should use launch_$(uos type) for launch function name instead of using
launch_$(board name).

Tracked-On: #3931
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-29 08:38:25 +08:00
Wei Liu
812d8af65a acrn-config: add mem_size for launch vm
add mem_size parameter for acrn-dm while generating launch script.

Traked-On: #3932
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-29 08:38:25 +08:00
Wei Liu
f46d8a9669 acrn-config: add the '"' character for launch script
1. Add the character of quotation marks for launch vm script.
2. Audio codec should put together with audio devcie and pass to
 vm , otherwise report an error message to webUI.

Tracked-On: #3937
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-29 08:38:25 +08:00
Gao Junhao
4d8ca9c54a doc: add atkbdc emulation doc
add AT keyboard controller emulation doc and entry

Signed-off-by: Gao Junhao <junhao.gao@intel.com>
2019-10-28 18:06:36 -04:00
yuhong.tao@intel.com
ca9adf7ddd doc: add HLD for CAT
The hld of resource director technology, RDT. Should have CAT and
MBA. This is for CAT.

Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2019-10-28 18:04:04 -04:00
Jason Chen CJ
c43e70b544 document: update HLD for hypervisor startup
updated this chapter based on latest master

Tracked-On: #3882
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
2019-10-28 17:59:31 -04:00
Yan, Like
cfcdd8ad09 hv: update virtual interrupts HLD
Signed-off-by: Yan, Like <like.yan@intel.com>
2019-10-28 17:50:34 -04:00
Yan, Like
922b39ed20 Doc: update physical interrupt HLD
Signed-off-by: Yan, Like <like.yan@intel.com>
2019-10-28 17:50:34 -04:00
Yuan Liu
f5ca793c8c doc: add system timer virtualization
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
2019-10-28 07:00:02 -04:00
Sainath Grandhi
4fcedc4329 doc: Adding a section for ACRN requirements on a processor
Adds a new section in reference documentation that lists the
requirements from ACRN upon a processor to boot and function
successfully.
This patch is a starting point and can expect to add a lot
more requirements that would be a translation of
hypervisor/arch/x86/cpu_caps.c

Tracked-On: #3899
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-10-28 13:44:32 +08:00
Sainath Grandhi
f01aad7e77 hv: Let trampoline execution use 1GB pages
ACRN currently uses 2MB large pages in the page tables setup
for trampoline code and data. This patch lets ACRN use 1GB large
pages instead.
When it comes to fixing symbols in trampoline code, fixing pointers
in PDPT is no more needed as PDPT PTEs contain Physical Address.

Tracked-On: #3899
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-10-28 13:44:32 +08:00
Gao Junhao
70f2ee398b doc: add hostbridge emulation doc
add hostbridge emulation doc and entry

Signed-off-by: Gao Junhao <junhao.gao@intel.com>
2019-10-27 10:14:06 -04:00
Gao Junhao
a7e34644d7 doc: add RTC emulation in hypervisor doc
add RTC emulation in hypervisor doc and add entry in hld-emulated-devices

Signed-off-by: Gao Junhao <junhao.gao@intel.com>
2019-10-27 09:58:17 -04:00
Gao Junhao
bdc4a96f82 doc: add virtio-gpio doc
add virtio-gpio doc

Signed-off-by: Gao Junhao <junhao.gao@intel.com>
2019-10-27 09:18:02 -04:00
Deb Taylor
339e959962 Doc: remove tutorials/rt_linux.rst file
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2019-10-25 21:34:26 -04:00
lirui34
8695545d5a doc: Align the updates of rt gsg with 1.3
Need to align the rt gsg updates with 1.3 branch.

Signed-off-by: lirui34 <ruix.li@intel.com>
2019-10-25 16:58:33 -04:00
Gao Junhao
5e11b47d9d doc: add entry for passthru realization
add entry for passthru realization in device model

Signed-off-by: Gao Junhao <junhao.gao@intel.com>
2019-10-25 10:39:53 -04:00
Gao Junhao
016c624b4e doc: modify virtio-i2c doc path
move virtio-i2c doc from tutorials to developer-guilders/hld and add
entry for virtio-i2c in hld-virtio-devices

Signed-off-by: Gao Junhao <junhao.gao@intel.com>
2019-10-25 10:38:25 -04:00
Gao Junhao
69e7649560 doc: add UART emulation in hypervisor doc
add UART emulation in hypervisor doc

Signed-off-by: Gao Junhao <junhao.gao@intel.com>
2019-10-25 10:37:11 -04:00
Yuan Liu
395e54b1bc doc: add ahci virtualization introduction
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
2019-10-25 10:33:35 -04:00
Jason Chen CJ
0b00bbd65f document: update HLD for vm management
add VM state transition, and make this chapter into
part of hypervisor hld, the user level vm management
should be introduced in ACRN tools.

Tracked-On: #3882
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
2019-10-25 10:31:51 -04:00
Kaige Fu
d5c3523d30 hv: Update industry scenarios configuration
This patch makes the following changes:
  - Remove the 4th VM
  - Make the default vcpu num of RTVM as 2

---
  v1 -> v2: Modify CONFIG_MAX_VM_NUM to 3U + KATA

Tracked-On: #3925
Signed-off-by: Yan, Like <like.yan@intel.com>
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
2019-10-25 15:23:16 +08:00
Victor Sun
6f7081f620 acrn-config: remove vm3 for industry scenario
The VM2 of INDUSTRY scenario need 2 vCPUs for performance, so there would
be no available pCPU for VM3, need to remove VM3 for this scenario.

Tracked-On: #3925

Signed-off-by: Victor Sun <victor.sun@intel.com>
2019-10-25 15:17:40 +08:00
Gao Junhao
9143e56336 dm: update ACPI with latest ASL standard
The device model generating ACPI table use the old ASL
standard(version:20190816), then the iasl in clearlinux(version:31360)
is 20191018, it can't disassemble the ACPI table compiled by old
standard.

Tracked-On: #3933
Signed-off-by: Gao Junhao <junhao.gao@intel.com>
Reviewed-by: Fengwei Yin <fengwei.yin@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2019-10-25 15:12:00 +08:00
Shuo A Liu
5f8e7a6cb7 hv: sched: add kick_thread to support notification
kick means to notify one thread_object. If the target thread object is
running, send a IPI to notify it; if the target thread object is
runnable, make reschedule on it.

Also add kick_vcpu API in vcpu layer to notify vcpu.

Tracked-On: #3813
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Signed-off-by: Yu Wang <yu1.wang@intel.com>
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-10-25 13:00:21 +08:00
Conghui Chen
810305be98 hv: sched: disable interrupt when grab schedule spinlock
After moving softirq to following interrupt path, softirq handler might
break in the schedule spinlock context and try to grab the lock again,
then deadlock.

Disable interrupt with schedule spinlock context.
For the IRQ disable/restore operations:
  CPU_INT_ALL_DISABLE(&rflag)
  CPU_INT_ALL_RESTORE(rflag)
each takes 50~60 cycles.

renaming: get_schedule_lock -> obtain_schedule_lock

Tracked-On: #3813
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-10-25 13:00:21 +08:00
Shuo A Liu
15c6a3e31f hv: sched: remove do_switch
Clean up do_swtich and do switch related things in schedule().

Tracked-On: #3813
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Signed-off-by: Yu Wang <yu1.wang@intel.com>
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-10-25 13:00:21 +08:00