Date: Mon, 22 Mar 2021 09:34:05 GMT From: Ka Ho Ng <khng@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: ede14736fd6d - main - ivrs_drv: Fix IVHDs with duplicated BaseAddress Message-ID: <202103220934.12M9Y5Oc046846@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=ede14736fd6d74db0374f4a233491ad5dc0e9b1d commit ede14736fd6d74db0374f4a233491ad5dc0e9b1d Author: Ka Ho Ng <khng@FreeBSD.org> AuthorDate: 2021-03-22 09:33:43 +0000 Commit: Ka Ho Ng <khng@FreeBSD.org> CommitDate: 2021-03-22 09:33:43 +0000 ivrs_drv: Fix IVHDs with duplicated BaseAddress Reviewed by: jhb Approved by: philip (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28945 --- sys/amd64/vmm/amd/ivrs_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/amd64/vmm/amd/ivrs_drv.c b/sys/amd64/vmm/amd/ivrs_drv.c index da3e0e17d140..d33229623a96 100644 --- a/sys/amd64/vmm/amd/ivrs_drv.c +++ b/sys/amd64/vmm/amd/ivrs_drv.c @@ -366,10 +366,11 @@ ivhd_identify(driver_t *driver, device_t parent) for (i = ivhd_count - 1 ; i > 0 ; i--){ if (ivhd_is_newer(&ivhd_hdrs[i-1]->Header, &ivhd_hdrs[i]->Header)) { - ivhd_hdrs[i-1] = ivhd_hdrs[i]; + memmove(&ivhd_hdrs[i-1], &ivhd_hdrs[i], + sizeof(void *) * (ivhd_count - i)); ivhd_count--; } - } + } ivhd_devs = malloc(sizeof(device_t) * ivhd_count, M_DEVBUF, M_WAITOK | M_ZERO);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103220934.12M9Y5Oc046846>