Commit Graph

126 Commits

Author SHA1 Message Date
David B. Kinder ae34fdd843 doc: fix misspellings
Fix misspellings missed during regular reviews.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-02-27 13:45:45 -08:00
Li, Fei1 987ddafa6b hv: vlapic: refine apicv_post_intr to internal function
Rename vlapic_post_intr to apicv_post_intr and move it to internal function
since it's only used in vlaic.c.

Tracked-On: #1842
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-02-25 14:17:27 +08:00
Shiqing Gao ea66747e33 doc: add more rules in coding guidelines
This patch adds more rules in coding guidelines.

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
2019-02-14 21:31:02 -08:00
Arindam Roy de8d85753e HV: Modularize vtd.c to remove acrn_vm usage
This patch is a modified one. It removes the usage
of acrn_vm struct from inside vtd.c.
It also puts struct iommu_domain inside vtd.h,
from vtd.c.
It modifies the signature of init_iommu_domain
in order to remove dependency on acrn_vm from
inside vtd.c.
Incorporated comments from Jason and Eddie.
Changed the name of sos_vm_domain to
fallback_iommu_domain
Removed any reference of sos_vm from vtd.[c|h]
files, including comments.

Tracked-On: #2496
Signed-off-by: Arindam Roy <arindam.roy@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2019-02-06 08:53:46 +08:00
Li, Fei1 ce19dd423e hv: vlapic: make vlapic deliver interrupt related functions more readable
Rename vlapic_deliver_intr to vlapic_receive_intr: ioapic/msi device
deliver an interrupt to lapic.
Rename vlapic_pending_intr to vlapic_find_deliverable_intr: find a
deliverable interrupt which pending in irr and its priority large than ppr.
Rename vlapic_intr_accepted to vlapic_get_deliverable_intr: get the deliverable
interrupt from irr and set it in isr (which also raise ppr update)

Tracked-On: #1842
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
2019-02-02 09:31:49 +08:00
Victor Sun a01c3cb913 doc: change term of vm0 to sos_vm
Using term of VM0 would mislead to a VM with VM id 0 easily, whereas
VM id 0 could be used for any PRE_LAUNCHED_VM. So replace VM0 with
SOS_VM.

Signed-off-by: Victor Sun <victor.sun@intel.com>
2019-01-30 17:14:26 -08:00
David B. Kinder 0881bae738 doc: fix correct use of Clear Linux OS
Proper use of the Clear Linux name is with a noun, specifically "OS".
Also fixed some grammar edits along the way.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-01-30 15:17:33 -08:00
Shiqing Gao fc887eade4 doc: update coding guidelines
- update and add some rules in coding guidelines

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
2019-01-30 10:48:15 -08:00
Yan, Like 72faca5068 doc: update documents for "--lapic_pt" feature
- added description of lapic pt feature based on vlapic in HLD virt-interrupt part;
- updated the doc to include description of new acrn-dm option "--lapic_pt".

Tracked-On: #2351
Signed-off-by: Yan, Like <like.yan@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2019-01-30 10:45:57 -08:00
Shiqing Gao d0c9fce72d doc: add more rules in coding guidelines
This patch adds more rules in coding guidelines.

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
2019-01-23 11:57:10 -08:00
Jason Chen CJ 15030f6f2c io_emul: reshuffle io emulation path
This is the following patch after removing pending_pre_work, it make sure
all io emulation is done on its own cpu.

For hv emulated request, it follows the steps:
	hv_emulate_pio->emulate_pio_complete
	hv_emulate_mmio->emulate_mmio_complete

For dm emulated request, it follows the steps:
	acrn_insert_request->dm_emulate_io_complete
while in acrn_insert_request, it could trigger scheduling out then resume by
hcall_notify_ioreq_finish, or busy wait for ioreq completion if polling mode
is enabled.

Tracked-On: #2394
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Xu, Anthony <anthony.xu@intel.com>
2019-01-23 16:21:17 +08:00
Victor Sun 49e6deaf26 HV: rename the term of vm0 to sos vm
Under sharing mode, VM0 is identical with SOS VM. But the coupling of
SOS VM and VM 0 is not friendly for partition mode.

This patch is a pure term change of vm0 to sos VM, it does not change
any code logic or senmantic.

Tracked-On: #2291

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-01-21 18:03:31 +08:00
Mingqiang Chi 55e5ed2e1a hv:move ept violation handler to io_emul.c
move this api from ept.c to io_emul.c to avoid
reverse dependency.

Tracked-On: #1842
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
2019-01-21 13:49:54 +08:00
Mingqiang Chi 1d98b7012d hv: move 'setup_io_bitmap' to vm.c
move this api from io_emul.c to vm.c to avoid reverse
dependency

Tracked-On: #1842
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
2019-01-21 13:49:54 +08:00
Geoffroy Van Cutsem c11090215d Update doc/developer-guides/GVT-g-kernel-options.rst
Co-Authored-By: dbkinder <david.b.kinder@intel.com>
2019-01-13 22:56:58 -08:00
Geoffroy Van Cutsem d998170f17 Update doc/developer-guides/GVT-g-kernel-options.rst
Co-Authored-By: dbkinder <david.b.kinder@intel.com>
2019-01-13 22:56:58 -08:00
David B. Kinder a6cef1095f doc: add GVT-g kernel options doc
Update developer docs with a new GVT-g kernel options document. Update
existing docs with referenced labels.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-01-13 22:56:58 -08:00
Shiqing Gao fae6cbf194 doc: add more rules in coding guidelines
This patch adds more rules in coding guidelines.

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
2019-01-10 21:03:51 -08:00
Shiqing Gao e2971ebc98 hv: vlapic: code clean-up
* rename `vlapic_set_intr_ready` to `vlapic_accept_intr`
 * replace calling of `vlapic_intr_edge` with `vlapic_set_intr`
 * remove `vlapic_intr_level` and `vlapic_intr_edge`

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-01-11 09:44:10 +08:00
Shuang Zheng 79f40a569b Update and complete `acrn-dm` parameters description
Update and complete `acrn-dm` parameters description in the user guide and HLD

Tracked-On: #2036
Signed-off-by: Shuang Zheng shuang.zheng@intel.com
2019-01-09 16:19:35 -08:00
Mingqiang Chi 7907fef59e hv:Rename several APIs for vpic and vioapic
vpic:
   vpic_set_irq         --> vpic_set_irqline
   vpic_get_irq_trigger --> vpic_get_irqline_trigger_mode
vioapic:
   vioapic_set_irq_nolock --> vioapic_set_irqline_nolock
   vioapic_set_irq        --> vioapic_set_irqline_lock
   vioapic_send_intr      --> vioapic_generate_intr

Tracked-On: #1842
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
2019-01-08 14:32:20 +08:00
Shiqing Gao 070a56dbc4 doc: rename register_io_emulation_handler
This is a follow-up patch in doc corresponding to the
changes in source code.

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
2019-01-08 11:28:13 +08:00
Shiqing Gao a177d75ed3 doc: initial draft of ACRN coding guidelines
This patch introduces an initial draft of ACRN coding guidelines.

We will update this document gradually to support ACRN achieve
MISRA-C compliance.

Tracked-On: #861
Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
2018-12-26 22:46:46 -08:00
Jason Chen CJ 746fbe147d modulization: move functions related with cpu caps into cpu_caps.c
move cpu caps related functions like capability init/detect/check
in cpu.c & mmu.c into a new file cpu_caps.c

Changes to be committed:
	modified:   developer-guides/hld/hv-memmgt.rst
	modified:   ../hypervisor/Makefile
	modified:   ../hypervisor/arch/x86/cpu.c
	new file:   ../hypervisor/arch/x86/cpu_caps.c
	modified:   ../hypervisor/arch/x86/mmu.c
	modified:   ../hypervisor/arch/x86/vmx_asm.S
	modified:   ../hypervisor/include/arch/x86/cpu.h
	new file:   ../hypervisor/include/arch/x86/cpu_caps.h
	modified:   ../hypervisor/include/arch/x86/guest/vm.h
	modified:   ../hypervisor/include/arch/x86/mmu.h
	modified:   ../hypervisor/include/arch/x86/vmcs.h

Tracked-On: #1842
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-12-19 09:07:14 +08:00
Jason Chen CJ 59e3f562b8 remove check_tsc
there is no need to clear CR4.TSD as there is no user mode
in ACRN hypervisor.

Tracked-On: #1842
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
2018-12-17 14:31:52 +08:00
David B. Kinder 117b71e6af doc: add partition mode hld
Partition mode HLD content added to hypervisor hld.
Add target links in referenced docs.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-12-15 10:35:38 -08:00
Zide Chen c89d6e6526 modularization: clean up namings in vMTRR module
- rename 3 module interface APIs
  init_mtrr() -> init_vmtrr()
  mtrr_rdmsr -> read_vmtrr()
  mtrr_wrmsr() -> write_vmtrr()

- follow naming convention for other modules, rename struct mtrr_state
  to struct acrn_vmtrr. And add acrn_vcpu to it.

- because MTRR is x86 architecture specific, move struct acrn_vmtrr to
  struct acrn_vcpu_arch.

Tracked-on: #1842
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-12-14 09:43:06 +08:00
Peter Fang f5a66e8e20 doc: update OVMF usage for acrn-dm
Tracked-On: #1832
Signed-off-by: Peter Fang <peter.fang@intel.com>
2018-12-13 09:56:09 +08:00
Geoffroy Van Cutsem 21a5b30865 Update add acrn-dm parameter descriptions
Co-Authored-By: dbkinder <david.b.kinder@intel.com>
2018-12-12 08:57:16 -08:00
Geoffroy Van Cutsem c45300fb54 Update doc/developer-guides/hld/hld-devicemodel.rst
Co-Authored-By: dbkinder <david.b.kinder@intel.com>
2018-12-12 08:57:16 -08:00
Geoffroy Van Cutsem 6d5b769d67 Update doc/developer-guides/hld/hld-devicemodel.rst
Co-Authored-By: dbkinder <david.b.kinder@intel.com>
2018-12-12 08:57:16 -08:00
Geoffroy Van Cutsem 5998f434bc Update doc/developer-guides/hld/hld-devicemodel.rst
Co-Authored-By: dbkinder <david.b.kinder@intel.com>
2018-12-12 08:57:16 -08:00
Geoffroy Van Cutsem c607aedff4 Update doc/developer-guides/hld/hld-devicemodel.rst
Co-Authored-By: dbkinder <david.b.kinder@intel.com>
2018-12-12 08:57:16 -08:00
Geoffroy Van Cutsem ba79b21860 Update doc/developer-guides/hld/hld-devicemodel.rst
Co-Authored-By: dbkinder <david.b.kinder@intel.com>
2018-12-12 08:57:16 -08:00
Geoffroy Van Cutsem 4ab193cf6c Update doc/developer-guides/hld/hld-devicemodel.rst
Co-Authored-By: dbkinder <david.b.kinder@intel.com>
2018-12-12 08:57:16 -08:00
Geoffroy Van Cutsem 1c70f812a0 Update doc/developer-guides/hld/hld-devicemodel.rst
Co-Authored-By: dbkinder <david.b.kinder@intel.com>
2018-12-12 08:57:16 -08:00
Geoffroy Van Cutsem 341bf84ced Update doc/developer-guides/hld/hld-devicemodel.rst
Co-Authored-By: dbkinder <david.b.kinder@intel.com>
2018-12-12 08:57:16 -08:00
Geoffroy Van Cutsem a0708339bc Update doc/developer-guides/hld/hld-devicemodel.rst
Co-Authored-By: dbkinder <david.b.kinder@intel.com>
2018-12-12 08:57:16 -08:00
Geoffroy Van Cutsem a7be8f731d Update doc/developer-guides/hld/hld-devicemodel.rst
Co-Authored-By: dbkinder <david.b.kinder@intel.com>
2018-12-12 08:57:16 -08:00
Geoffroy Van Cutsem 5aedc8f4aa Update doc/developer-guides/hld/hld-devicemodel.rst
Co-Authored-By: dbkinder <david.b.kinder@intel.com>
2018-12-12 08:57:16 -08:00
Geoffroy Van Cutsem e7e8ce63f2 Update doc/developer-guides/hld/hld-devicemodel.rst
Co-Authored-By: dbkinder <david.b.kinder@intel.com>
2018-12-12 08:57:16 -08:00
Geoffroy Van Cutsem 2454289400 Update doc/developer-guides/hld/hld-devicemodel.rst
Co-Authored-By: dbkinder <david.b.kinder@intel.com>
2018-12-12 08:57:16 -08:00
Geoffroy Van Cutsem edd06fe928 Update doc/developer-guides/hld/hld-devicemodel.rst
Co-Authored-By: dbkinder <david.b.kinder@intel.com>
2018-12-12 08:57:16 -08:00
Geoffroy Van Cutsem 1ef6b657fd Update doc/developer-guides/hld/hld-devicemodel.rst
Co-Authored-By: dbkinder <david.b.kinder@intel.com>
2018-12-12 08:57:16 -08:00
Geoffroy Van Cutsem 8b13bf3f7c Update doc/developer-guides/hld/hld-devicemodel.rst
Co-Authored-By: dbkinder <david.b.kinder@intel.com>
2018-12-12 08:57:16 -08:00
Geoffroy Van Cutsem 7446089d80 Update doc/developer-guides/hld/hld-devicemodel.rst
Co-Authored-By: dbkinder <david.b.kinder@intel.com>
2018-12-12 08:57:16 -08:00
Geoffroy Van Cutsem 666c97b0d7 Update doc/developer-guides/hld/hld-devicemodel.rst
Co-Authored-By: dbkinder <david.b.kinder@intel.com>
2018-12-12 08:57:16 -08:00
Geoffroy Van Cutsem a21c3ca3eb Update doc/developer-guides/hld/hld-devicemodel.rst
Co-Authored-By: dbkinder <david.b.kinder@intel.com>
2018-12-12 08:57:16 -08:00
David B. Kinder 7bcd7054e5 doc: additional DM parameter documentation
Update the device model HLD with additional parameter documentation

Tracked-On: #2021

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-12-12 08:57:16 -08:00
David B. Kinder fe1ace4f56 doc: fix doc misspellings
Fix documentation misspellings missed during the regular review.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-12-05 17:07:39 -08:00