aboutsummaryrefslogtreecommitdiff
path: root/src/hw/virtio-scsi.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-07-11 12:30:26 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-09-27 19:02:34 -0400
commitf3d2a156448f006e5d83eb60cb1da2dea6c997bf (patch)
tree618e0b3a309bbd60ea8cf4b713091a269d302aa3 /src/hw/virtio-scsi.c
parente5a0b6163703627728f978d079d8c5f449af5fdd (diff)
downloadseabios-hppa-f3d2a156448f006e5d83eb60cb1da2dea6c997bf.zip
seabios-hppa-f3d2a156448f006e5d83eb60cb1da2dea6c997bf.tar.gz
seabios-hppa-f3d2a156448f006e5d83eb60cb1da2dea6c997bf.tar.bz2
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.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/hw/virtio-scsi.c b/src/hw/virtio-scsi.c
index 466b305..a87cad8 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;