Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drm/virtio: Expose allow_p2p capability to user space #40

Open
wants to merge 18 commits into
base: celadon/u/mr0/master
Choose a base branch
from

Conversation

phreer
Copy link

@phreer phreer commented Sep 5, 2024

No description provided.

yhe39 and others added 16 commits September 4, 2024 07:40
Test Done:
1. Android VM boot without issue.
2. Android display well on QNX.

Tracked-On: OAM-119826
Signed-off-by: hangliu1 <[email protected]>
Add ACRN guest support so that it allows Linux to be booted under the
ACRN hypervisor.

Tracked-On: OAM-119803
Signed-off-by: Junjie Mao <[email protected]>
Signed-off-by: Yuanyuan Zhao <[email protected]>
Add virtio over shared memory front-end for both ACRN and QNX
hypervisor.

virtio_guest_shm.c is for QNX hypervisor based VM.
virtio_ivshmem.c is for ACRN hypervisor based VM.

Tracked-On: OAM-119803
Signed-off-by: Junjie Mao <[email protected]>
Signed-off-by: Fei Li <[email protected]>
Signed-off-by: Yuanyuan Zhao <[email protected]>
Add driver for ivshm device.

Tracked-On: OAM-119803
Signed-off-by: Junjie Mao <[email protected]>
Signed-off-by: Yuanyuan Zhao <[email protected]>
Tracked-On: OAM-119803
Signed-off-by: Junjie Mao <[email protected]>
Signed-off-by: Yuanyuan Zhao <[email protected]>
Tracked-On: OAM-119803
Signed-off-by: Junjie Mao <[email protected]>
Signed-off-by: Yuanyuan Zhao <[email protected]>
The inter-VM shared memory in QNX is only accessible from CPU and
cannot be the source or target of DMA transactions.

As a workaround, we alias-map that shared memory as DMA-able to another
region in the guest physical address space when launching the
VMs. Accordingly the drivers in guest OSes need to use that new address
which is accessible to both CPUs and devices.

This patch uses a hardcoded address base(96G) for simplicity. Later we
should switch to a more generic approach such as ACPI SSDT for reporting
the alias maps.

Tracked-On: OAM-119803
Signed-off-by: Junjie Mao <[email protected]>
Signed-off-by: Yuanyuan Zhao <[email protected]>
WA QNX APIC LVT Timer clock accuracy issue by scaling APIC Timer
Initial Count by setting qnx_lvtt_scale in kernel cmdline.
Now this factor is 73 (TSC/clock ratio).

Tracked-On: OAM-119803
Signed-off-by: Fei Li <[email protected]>
Signed-off-by: Yuanyuan Zhao <[email protected]>
Add extra MMIO window which is defined by cmdline.
`pci_root_upper_base` is necessary config and `pci_root_upper_limit`
is optional config.

Tracked-On: OAM-119803
Signed-off-by: Junjie Mao <[email protected]>
Signed-off-by: Yuanyuan Zhao <[email protected]>
Add cmdline to set PCI config info for QNX. The two new parameters are
`pci_config_override` and `pci_bar_override`.

Tracked-On: OAM-119803
Signed-off-by: Junjie Mao <[email protected]>
Signed-off-by: Yuanyuan Zhao <[email protected]>
The virtual RTC provided by QNX does not support alarms. As a result qvm
never binds irq 8 to the virtual RTC and may use that irq for other
virtual devices. In such cases the kernel will complain that:

genirq: Flags mismatch irq 8. 00000000 (guest_shm) vs. 00000000 (rtc0)

That will prevent the real user of that irq from registering the handler
and cause the impacted virtual device to malfunction.

This patch makes the kernel skip RTC irq if it is not reported in the
ACPI namespace, so that we can provide a I/O-port-only RTC device object
to the kernel to make it aware that no irq is to be bound to the RTC.

Tracked-On: OAM-119803
Signed-off-by: Junjie Mao <[email protected]>
Signed-off-by: Yuanyuan Zhao <[email protected]>
Provisioning VFs right after the driver is probed has a probability
(~80%) to make the screen black. So enable the VF after reach `Main
User Target' by setting 'i915_force_provisioning_vfs'.

Tracked-On: OAM-119803
Signed-off-by: Junjie Mao <[email protected]>
Signed-off-by: Yuanyuan Zhao <[email protected]>
In current QNX solution, kernelflinger detected and set vqueues
to virtio block device. However, kernel will probe virtio device
again, and kernel returns error if vqueues have already been setup.

As a workaround setup vqueues even if they have already
set up.

Tracked-On: OAM-119803
Signed-off-by: rajucm <[email protected]>
Signed-off-by: Yuanyuan Zhao <[email protected]>
As a workaround remove support for X86_FEATURE_MSR_SPEC_CTRL in QNX.

Tracked-On: OAM-119803
Signed-off-by: rajucm <[email protected]>
Signed-off-by: Zhong, Fangjian <[email protected]>
Signed-off-by: Yuanyuan Zhao <[email protected]>
As a workaround disable waitpkg & tme which not supported by QNX.

Tracked-On: OAM-119803
Signed-off-by: rajucm <[email protected]>
Signed-off-by: Yuanyuan Zhao <[email protected]>
OPTEE synced with the REE world through vdev shm
mechanism.

Tracked-On: OAM-124009
Signed-off-by: jizhenlo <[email protected]>
@sysopenci
Copy link

Improper Commit Message
Tracked on not found in commit message,
make sure Tracked-On: Jira-ticket is present.

@sysopenci sysopenci added Pending Developer Approval Pending Developer Approval Pending PR Review Pending PR Review Engineering Build Not Started Engineering Build Not Started labels Sep 5, 2024
Test done:
   1. adb reboot twice successfully.
   2. power on, power off work normally.
   3. adb, BT, Wi-Fi audio work normally.

Tracked-On: OAM-124023
Signed-off-by: Zhao, Shirley <[email protected]>
@sysopenci
Copy link

Program name for this pr is not compatable with other dependent prs, for more details please check tracked_on

1 similar comment
@sysopenci
Copy link

Program name for this pr is not compatable with other dependent prs, for more details please check tracked_on

Exposing allow_p2p capability allows user space (e.g., hwcomposer) to
detect whether local memory buffer is optimal for scanning out.

Tracked-On: OAM-124505
Signed-off-by: Weifeng Liu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering Build Not Started Engineering Build Not Started Pending Developer Approval Pending Developer Approval Pending PR Review Pending PR Review Valid commit message
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants