mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-04 15:14:27 +00:00
hv: Cleanup: Remove dead code.
Now, UOS will use hypercall to init BSP state, we could remove set_bsp_real_mode_entry() and set_bsp_protect_mode_regs(). For SOS, GDT will inherit from SBL or UEFI. For UOS, DM will prepare GDT. We don't need hypervisor to prepare GDT for guest. The entry_addr of vcpu struct could be removed. The guest entry is set through BSP rip register. GUEST_CFG_OFFSET is not needed any more after this patchset. Tracked-On: #1231 Signed-off-by: Yin Fengwei <fengwei.yin@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -160,8 +160,6 @@ int copy_from_gva(struct vcpu *vcpu, void *h_ptr, uint64_t gva,
|
||||
uint32_t size, uint32_t *err_code, uint64_t *fault_addr);
|
||||
int copy_to_gva(struct vcpu *vcpu, void *h_ptr, uint64_t gva,
|
||||
uint32_t size, uint32_t *err_code, uint64_t *fault_addr);
|
||||
|
||||
uint64_t create_guest_init_gdt(struct vm *vm, uint32_t *limit);
|
||||
extern struct acrn_vcpu_regs vm0_boot_context;
|
||||
|
||||
#endif /* !ASSEMBLER */
|
||||
|
||||
@@ -209,7 +209,6 @@ struct vcpu {
|
||||
uint16_t pcpu_id; /* Physical CPU ID of this VCPU */
|
||||
uint16_t vcpu_id; /* virtual identifier for VCPU */
|
||||
struct vm *vm; /* Reference to the VM this VCPU belongs to */
|
||||
void *entry_addr; /* Entry address for this VCPU when first started */
|
||||
|
||||
/* State of this VCPU before suspend */
|
||||
volatile enum vcpu_state prev_state;
|
||||
@@ -287,8 +286,6 @@ void vcpu_set_pat_ext(struct vcpu *vcpu, uint64_t val);
|
||||
void set_vcpu_regs(struct vcpu *vcpu, struct acrn_vcpu_regs *vcpu_regs);
|
||||
void reset_vcpu_regs(struct vcpu *vcpu);
|
||||
void set_ap_entry(struct vcpu *vcpu, uint64_t entry);
|
||||
void set_bsp_real_mode_entry(struct vcpu *vcpu);
|
||||
void set_bsp_protect_mode_regs(struct vcpu *vcpu);
|
||||
|
||||
static inline bool is_long_mode(struct vcpu *vcpu)
|
||||
{
|
||||
|
||||
@@ -457,18 +457,6 @@ struct acrn_vm_pci_msix_remap {
|
||||
uint32_t vector_ctl;
|
||||
} __aligned(8);
|
||||
|
||||
/**
|
||||
* @brief The guest config pointer offset.
|
||||
*
|
||||
* It's designed to support passing DM config data pointer, based on it,
|
||||
* hypervisor would parse then pass DM defined configuration to GUEST VCPU
|
||||
* when booting guest VM.
|
||||
* the address 0xef000 here is designed by DM, as it arranged all memory
|
||||
* layout below 1M, DM add this address to E280 reserved range to make sure
|
||||
* there is no overlap for the address 0xef000 usage.
|
||||
*/
|
||||
#define GUEST_CFG_OFFSET 0xef000UL
|
||||
|
||||
/**
|
||||
* @brief Info The power state data of a VCPU.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user