Skip to content

Commit

Permalink
Revert "hv: allow guest with the highest severity to read RESET_CONTROL"
Browse files Browse the repository at this point in the history
This reverts commit 4e552b0.

Tracked-On: projectacrn#8724
Signed-off-by: Yuan Lu <yuan.y.lu@intel.com>
Reviewed-by: Fei Li <fei1.li@intel.com>
  • Loading branch information
yison committed Sep 5, 2024
1 parent 1571a6d commit c7aa73c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions hypervisor/arch/x86/guest/vm_reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,12 @@ static bool handle_reset_reg_read(struct acrn_vcpu *vcpu, __unused uint16_t addr
{
bool ret = true;

if (get_highest_severity_vm(true) == vcpu->vm) {
/* Guest may read RESET_CONTROL register before cold reset or warm reset */
vcpu->req.reqs.pio_request.value = pio_read8(0xcf9U);

} else if (is_postlaunched_vm(vcpu->vm)) {
if (is_postlaunched_vm(vcpu->vm)) {
/* re-inject to DM */
ret = false;
} else {
/*
* - reset control register 0xcf9: hide this from guests whose severity is not the highest.
* - reset control register 0xcf9: hide this from guests for now.
* - FADT reset register: the read behavior is not defined in spec, keep it simple to return all '1'.
*/
vcpu->req.reqs.pio_request.value = ~0U;
Expand Down

0 comments on commit c7aa73c

Please sign in to comment.