hv: emulate ACPI reset register for Service OS guest

Handle the PIO reset register that is defined in host ACPI:

Parse host FADT table to get the host reset register info, and emulate
it for Service OS:

- return all '1' for guest reads because the read behavior is not defined
  in ACPI.
- ignore guest writes with the reset value to stop it from resetting host;
  if guest writes other values, passthru it to hardware in case the reset
  register supports other functionalities.

Tracked-On: #2700
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Zide Chen
2019-05-08 22:43:10 -07:00
committed by wenlingz
parent 26f08680eb
commit 865ee2956e
7 changed files with 93 additions and 1 deletions

View File

@@ -20,6 +20,11 @@
#define WAKE_VECTOR_32 0x7A86BBDCUL
#define WAKE_VECTOR_64 0x7A86BBE8UL
/* reset register */
#define RESET_REGISTER_ADDRESS 0xCF9U
#define RESET_REGISTER_VALUE 0x0EU
#define RESET_REGISTER_SPACE_ID SPACE_SYSTEM_IO
/* DRHD of DMAR */
#define DRHD_COUNT 2U

View File

@@ -20,6 +20,10 @@
#define WAKE_VECTOR_32 0UL
#define WAKE_VECTOR_64 0UL
#define RESET_REGISTER_ADDRESS 0UL
#define RESET_REGISTER_VALUE 0UL
#define RESET_REGISTER_SPACE_ID 0UL
/* DRHD of DMAR */
#define DRHD_COUNT 0U