mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-26 15:31:35 +00:00
dm: resize the vm_config buffer in 'vm_get_config()'
resize vm_config buffer from 16KB to 32KB, as 16KB is not enough on EHL platform, which will result in crash when accessing this memory. Tracked-On: #5649 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
parent
1f686aeac8
commit
1cdf544d28
@ -713,7 +713,7 @@ vm_irqfd(struct vmctx *ctx, struct acrn_irqfd *args)
|
|||||||
int
|
int
|
||||||
vm_get_config(struct vmctx *ctx, struct acrn_vm_config *vm_cfg)
|
vm_get_config(struct vmctx *ctx, struct acrn_vm_config *vm_cfg)
|
||||||
{
|
{
|
||||||
#define VM_CFG_BUFF_SIZE 0x4000
|
#define VM_CFG_BUFF_SIZE 0x8000
|
||||||
int i, err = 0;
|
int i, err = 0;
|
||||||
uint8_t *configs_buff;
|
uint8_t *configs_buff;
|
||||||
struct acrn_vm_config *pcfg;
|
struct acrn_vm_config *pcfg;
|
||||||
@ -735,6 +735,7 @@ vm_get_config(struct vmctx *ctx, struct acrn_vm_config *vm_cfg)
|
|||||||
pr_err("%s, failed: get platform info.\n", __func__);
|
pr_err("%s, failed: get platform info.\n", __func__);
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
assert(VM_CFG_BUFF_SIZE > (platform_info.max_vms * platform_info.vm_config_entry_size));
|
||||||
|
|
||||||
for (i = 0; i < platform_info.max_vms; i++) {
|
for (i = 0; i < platform_info.max_vms; i++) {
|
||||||
pcfg = (struct acrn_vm_config *)(configs_buff + (i * platform_info.vm_config_entry_size));
|
pcfg = (struct acrn_vm_config *)(configs_buff + (i * platform_info.vm_config_entry_size));
|
||||||
|
Loading…
Reference in New Issue
Block a user