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

Install efi and conf file to /usr/share/acrn #3

Merged
merged 2 commits into from
Mar 8, 2018
Merged

Install efi and conf file to /usr/share/acrn #3

merged 2 commits into from
Mar 8, 2018

Conversation

miguelinux
Copy link
Contributor

Currently acrn.efi is installed to /usr/share, this PR changes the installation directory to /usr/share/acrn.

Even more the conf file was not installed, this PR install it to /usr/share/acrn/demo

Currently the acrn EFI hypervisor file is installing directly to
/usr/share. This patch adds a "acrn" directory to store in
/usr/share/acrn

Signed-off-by: Miguel Bernal Marin <[email protected]>
The EFI configuration example file is not installed.
This patch adds a rule to install the configuration example file
at /usr/share/acrn

Signed-off-by: Miguel Bernal Marin <[email protected]>
@jren1 jren1 merged commit 92bbdf3 into projectacrn:master Mar 8, 2018
@paspndevops paspndevops mentioned this pull request Oct 22, 2019
psun3x added a commit to psun3x/acrn-hypervisor that referenced this pull request Jul 14, 2020
OpRegion: 8KB(0x2000)
[ OpRegion Header      ] Offset: 0x0
[ Mailbox projectacrn#1: ACPI     ] Offset: 0x100
[ Mailbox projectacrn#2: SWSCI    ] Offset: 0x200
[ Mailbox projectacrn#3: ASLE     ] Offset: 0x300
[ Mailbox projectacrn#4: VBT      ] Offset: 0x400
[ Mailbox projectacrn#5: ASLE EXT ] Offset: 0x1C00
Extended OpRegion: 8KB(0x2000)
[ Raw VBT              ] Offset: 0x0

Generally VBT stores in MailBox4 in OpRegion which max size is 6KB.
If VBT larger than 6KB, it will be stored in extended OpRegion which
is neighborhood with legacy OpRegion. In this case, we need to
passthrough extended OpRegion also to support GVT-d feature. The
OpRegion size that we passthrough should be (OpRegion+Extended)=16KB
ASLE.rvda stores the location of VBT.
For OpRegion 2.1+: ASLE.rvda = offset to OpRegion base address
For OpRegion 2.0:  ASLE.rvda = physical address

To-do: Add support for OpRegion on some platforms(eg. APL)

Tracked-On: projectacrn#5029
Signed-off-by: Sun Peng <[email protected]>
wenlingz pushed a commit that referenced this pull request Jul 15, 2020
OpRegion: 8KB(0x2000)
[ OpRegion Header      ] Offset: 0x0
[ Mailbox #1: ACPI     ] Offset: 0x100
[ Mailbox #2: SWSCI    ] Offset: 0x200
[ Mailbox #3: ASLE     ] Offset: 0x300
[ Mailbox #4: VBT      ] Offset: 0x400
[ Mailbox #5: ASLE EXT ] Offset: 0x1C00
Extended OpRegion: 8KB(0x2000)
[ Raw VBT              ] Offset: 0x0

Generally VBT stores in MailBox4 in OpRegion which max size is 6KB.
If VBT larger than 6KB, it will be stored in extended OpRegion which
is neighborhood with legacy OpRegion. In this case, we need to
passthrough extended OpRegion also to support GVT-d feature. The
OpRegion size that we passthrough should be (OpRegion+Extended)=16KB
ASLE.rvda stores the location of VBT.
For OpRegion 2.1+: ASLE.rvda = offset to OpRegion base address
For OpRegion 2.0:  ASLE.rvda = physical address

To-do: Add support for OpRegion on some platforms(eg. APL)

Tracked-On: #5029
Signed-off-by: Sun Peng <[email protected]>
yonghuah added a commit to yonghuah/acrn-hypervisor that referenced this pull request Feb 21, 2022
 'mevent_lmutex' is initialized as default type
 attempting to recursively lock on this kind of
 mutext results in undefined behaviour.

 Recursively lock on 'mevent_lmutex' can be detected
 in mevent thread when user tries to trigger system
 reset from user VM, in this case, user VM reboot hang.

 The backtrace for this issue:
  projectacrn#1 in mevent_qlock () at core/mevent.c:93
  projectacrn#2 in mevent_delete_even at core/mevent.c:357
    ===>Recursively LOCK
  projectacrn#3 in mevent_delete_close at core/mevent.c:387
  projectacrn#4 in acrn_timer_deinit at core/timer.c:106
  projectacrn#5 in virtio_reset_dev at hw/pci/virtio/virtio.c:171
  projectacrn#6 in virtio_console_reset at
     hw/pci/virtio/virtio_console.c:196
  projectacrn#7 in virtio_console_destroy at
    hw/pci/virtio/virtio_console.c:1015
  projectacrn#8 in virtio_console_teardown_backend at
    hw/pci/virtio/virtio_console.c:1042
  projectacrn#9 in mevent_drain_del_list () at
    core/mevent.c:348 ===> 1st LOCK
  projectacrn#10 in mevent_dispatch () at core/mevent.c:472
  projectacrn#11 in main at core/main.c:1110

  So the root cause is:
  mevent_mutex lock is recursively locked by mevent thread
  itself (projectacrn#9 for this first lock and projectacrn#2 for recursively lock),
  which is not allowed for mutex with default attribute.

  This patch changes the mutex type of 'mevent_lmutex'
  from default to "PTHREAD_MUTEX_RECURSIVE", because
  recrusively lock shall be allowed as user of mevent
  may call mevent functions (where mutex lock maybe required)
  in teardown callbacks.

Tracked-On: projectacrn#7133
Signed-off-by: Yonghua Huang <[email protected]>
Acked-by: Yu Wang <[email protected]>
yonghuah added a commit to yonghuah/acrn-hypervisor that referenced this pull request Feb 21, 2022
 'mevent_lmutex' is initialized as default type,
 while attempting to recursively lock on this
 kind of mutext results in undefined behaviour.

 Recursively lock on 'mevent_lmutex' can be detected
 in mevent thread when user tries to trigger system
 reset from user VM, in this case, user VM reboot hang.

 The backtrace for this issue:
  projectacrn#1 in mevent_qlock () at core/mevent.c:93
  projectacrn#2 in mevent_delete_even at core/mevent.c:357
    ===>Recursively LOCK
  projectacrn#3 in mevent_delete_close at core/mevent.c:387
  projectacrn#4 in acrn_timer_deinit at core/timer.c:106
  projectacrn#5 in virtio_reset_dev at hw/pci/virtio/virtio.c:171
  projectacrn#6 in virtio_console_reset at
     hw/pci/virtio/virtio_console.c:196
  projectacrn#7 in virtio_console_destroy at
    hw/pci/virtio/virtio_console.c:1015
  projectacrn#8 in virtio_console_teardown_backend at
    hw/pci/virtio/virtio_console.c:1042
  projectacrn#9 in mevent_drain_del_list () at
    core/mevent.c:348 ===> 1st LOCK
  projectacrn#10 in mevent_dispatch () at core/mevent.c:472
  projectacrn#11 in main at core/main.c:1110

  So the root cause is:
  mevent_mutex lock is recursively locked by mevent thread
  itself (projectacrn#9 for this first lock and projectacrn#2 for recursively lock),
  which is not allowed for mutex with default attribute.

  This patch changes the mutex type of 'mevent_lmutex'
  from default to "PTHREAD_MUTEX_RECURSIVE", because
  recrusively lock shall be allowed as user of mevent
  may call mevent functions (where mutex lock maybe required)
  in teardown callbacks.

Tracked-On: projectacrn#7133
Signed-off-by: Yonghua Huang <[email protected]>
Acked-by: Yu Wang <[email protected]>
acrnsi-robot pushed a commit that referenced this pull request Feb 21, 2022
 'mevent_lmutex' is initialized as default type,
 while attempting to recursively lock on this
 kind of mutext results in undefined behaviour.

 Recursively lock on 'mevent_lmutex' can be detected
 in mevent thread when user tries to trigger system
 reset from user VM, in this case, user VM reboot hang.

 The backtrace for this issue:
  #1 in mevent_qlock () at core/mevent.c:93
  #2 in mevent_delete_even at core/mevent.c:357
    ===>Recursively LOCK
  #3 in mevent_delete_close at core/mevent.c:387
  #4 in acrn_timer_deinit at core/timer.c:106
  #5 in virtio_reset_dev at hw/pci/virtio/virtio.c:171
  #6 in virtio_console_reset at
     hw/pci/virtio/virtio_console.c:196
  #7 in virtio_console_destroy at
    hw/pci/virtio/virtio_console.c:1015
  #8 in virtio_console_teardown_backend at
    hw/pci/virtio/virtio_console.c:1042
  #9 in mevent_drain_del_list () at
    core/mevent.c:348 ===> 1st LOCK
  #10 in mevent_dispatch () at core/mevent.c:472
  #11 in main at core/main.c:1110

  So the root cause is:
  mevent_mutex lock is recursively locked by mevent thread
  itself (#9 for this first lock and #2 for recursively lock),
  which is not allowed for mutex with default attribute.

  This patch changes the mutex type of 'mevent_lmutex'
  from default to "PTHREAD_MUTEX_RECURSIVE", because
  recrusively lock shall be allowed as user of mevent
  may call mevent functions (where mutex lock maybe required)
  in teardown callbacks.

Tracked-On: #7133
Signed-off-by: Yonghua Huang <[email protected]>
Acked-by: Yu Wang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants