git: 17162a06159a - stable/12 - ivrs_drv: Fix IVHDs with duplicated BaseAddress
Ka Ho Ng
khng at FreeBSD.org
Fri Sep 3 19:05:56 UTC 2021
The branch stable/12 has been updated by khng:
URL: https://cgit.FreeBSD.org/src/commit/?id=17162a06159a120a14ac0e0332eb4a23138837ee
commit 17162a06159a120a14ac0e0332eb4a23138837ee
Author: Ka Ho Ng <khng at FreeBSD.org>
AuthorDate: 2021-03-22 09:33:43 +0000
Commit: Ka Ho Ng <khng at FreeBSD.org>
CommitDate: 2021-09-03 18:46:40 +0000
ivrs_drv: Fix IVHDs with duplicated BaseAddress
Reviewed by: jhb
Approved by: philip (mentor)
Differential Revision: https://reviews.freebsd.org/D28945
(cherry picked from commit ede14736fd6d74db0374f4a233491ad5dc0e9b1d)
---
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 b754058c07d5..a02a3ff0b8e9 100644
--- a/sys/amd64/vmm/amd/ivrs_drv.c
+++ b/sys/amd64/vmm/amd/ivrs_drv.c
@@ -367,10 +367,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);
More information about the dev-commits-src-all
mailing list