hv: fix out-of-date comments related to pre-launched VMs rebooting

Like post-launched VMs, for pre-launched VMs, the ACPI reset register
is also fixed at 0xcf9 and the reset value is 0xE, so pre-launched VMs
now also use ACPI reset register for rebooting.

Tracked-On: #5411
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
This commit is contained in:
dongshen 2020-10-22 15:42:00 -07:00 committed by wenlingz
parent 0b217dd3d1
commit 43d7eb5d76

View File

@ -117,9 +117,9 @@ static bool handle_common_reset_reg_write(struct acrn_vcpu *vcpu, bool reset)
ret = false;
}
/*
* ignore writes from SOS and pre-launched VM.
* equivalent to hide this port from guests.
*/
* ignore writes from SOS and pre-launched VM.
* equivalent to hide this port from guests.
*/
}
put_vm_lock(vm);
@ -211,12 +211,11 @@ void register_reset_port_handler(struct acrn_vm *vm)
io_range.base = 0x64U;
register_pio_emulation_handler(vm, KB_PIO_IDX, &io_range, handle_kb_read, handle_kb_write);
/* ACPI reset register is fixed at 0xcf9 for post-launched and pre-launched VMs */
io_range.base = 0xcf9U;
register_pio_emulation_handler(vm, CF9_PIO_IDX, &io_range, handle_reset_reg_read, handle_cf9_write);
/*
* - pre-launched VMs don't support ACPI;
* - ACPI reset register is fixed at 0xcf9 for post-launched VMs;
* - here is taking care of SOS only:
* Don't support MMIO or PCI based reset register for now.
* ACPI Spec: Register_Bit_Width must be 8 and Register_Bit_Offset must be 0.