diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-07-11 12:30:26 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-09-27 19:02:34 -0400 |
commit | f3d2a156448f006e5d83eb60cb1da2dea6c997bf (patch) | |
tree | 618e0b3a309bbd60ea8cf4b713091a269d302aa3 /src/hw/virtio-scsi.c | |
parent | e5a0b6163703627728f978d079d8c5f449af5fdd (diff) | |
download | seabios-f3d2a156448f006e5d83eb60cb1da2dea6c997bf.tar.gz |
virtio: Allocate drive_s storage in low memory
Use the "low" memory segment instead of the f-segment for the drive_s
storage. This can help avoid running out of memory in the f-segment.
Tested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/hw/virtio-scsi.c')
-rw-r--r-- | src/hw/virtio-scsi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/hw/virtio-scsi.c b/src/hw/virtio-scsi.c index 466b3058..a87cad88 100644 --- a/src/hw/virtio-scsi.c +++ b/src/hw/virtio-scsi.c @@ -7,7 +7,6 @@ // // This file may be distributed under the terms of the GNU LGPLv3 license. -#include "biosvar.h" // GET_GLOBALFLAT #include "block.h" // struct drive_s #include "blockcmd.h" // scsi_drive_setup #include "config.h" // CONFIG_* @@ -114,7 +113,7 @@ virtio_scsi_add_lun(u32 lun, struct drive_s *tmpl_drv) { struct virtio_lun_s *tmpl_vlun = container_of(tmpl_drv, struct virtio_lun_s, drive); - struct virtio_lun_s *vlun = malloc_fseg(sizeof(*vlun)); + struct virtio_lun_s *vlun = malloc_low(sizeof(*vlun)); if (!vlun) { warn_noalloc(); return -1; |