[SeaBIOS] [PATCH 1/2] pvscsi: ring_desc do not have to be page aligned

Liran Alon posted 2 patches 7 years, 2 months ago
[SeaBIOS] [PATCH 1/2] pvscsi: ring_desc do not have to be page aligned
Posted by Liran Alon 7 years, 2 months ago
In contrast to other allocations made by pvscsi_init_rings(),
ring_desc is only used internally by SeaBIOS (not passed to
device-controller) and there is not restriction which force
it to be page aligned.

Reviewed-by: Mark Kanda <mark.kanda@oracle.com>
Signed-off-by: Liran Alon <liran.alon@oracle.com>
---
 src/hw/pvscsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/hw/pvscsi.c b/src/hw/pvscsi.c
index e0ea33cd751c..9d7d68d80964 100644
--- a/src/hw/pvscsi.c
+++ b/src/hw/pvscsi.c
@@ -167,7 +167,7 @@ pvscsi_init_rings(void *iobase, struct pvscsi_ring_dsc_s **ring_dsc)
 {
     struct PVSCSICmdDescSetupRings cmd = {0,};
 
-    struct pvscsi_ring_dsc_s *dsc = memalign_high(PAGE_SIZE, sizeof(*dsc));
+    struct pvscsi_ring_dsc_s *dsc = malloc_high(sizeof(*dsc));
     if (!dsc) {
         warn_noalloc();
         return;
-- 
2.16.1


_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH 1/2] pvscsi: ring_desc do not have to be page aligned
Posted by Kevin O'Connor 7 years, 2 months ago
On Tue, Nov 13, 2018 at 05:53:40PM +0200, Liran Alon wrote:
> In contrast to other allocations made by pvscsi_init_rings(),
> ring_desc is only used internally by SeaBIOS (not passed to
> device-controller) and there is not restriction which force
> it to be page aligned.

Thanks.  This patch is fine, but we're planning to make a SeaBIOS
release in a few days - I'd look to commit this change post release.

-Kevin

_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH 1/2] pvscsi: ring_desc do not have to be page aligned
Posted by Liran Alon 7 years, 2 months ago

> On 13 Nov 2018, at 20:10, Kevin O'Connor <kevin@koconnor.net> wrote:
> 
> On Tue, Nov 13, 2018 at 05:53:40PM +0200, Liran Alon wrote:
>> In contrast to other allocations made by pvscsi_init_rings(),
>> ring_desc is only used internally by SeaBIOS (not passed to
>> device-controller) and there is not restriction which force
>> it to be page aligned.
> 
> Thanks.  This patch is fine, but we're planning to make a SeaBIOS
> release in a few days - I'd look to commit this change post release.
> 
> -Kevin

I would prefer it will enter this release but I’m fine if it doesn’t make it.
As long as it is eventually committed.

Thanks,
-Liran
_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH 1/2] pvscsi: ring_desc do not have to be page aligned
Posted by Liran Alon 7 years, 2 months ago

> On 13 Nov 2018, at 20:10, Kevin O'Connor <kevin@koconnor.net> wrote:
> 
> On Tue, Nov 13, 2018 at 05:53:40PM +0200, Liran Alon wrote:
>> In contrast to other allocations made by pvscsi_init_rings(),
>> ring_desc is only used internally by SeaBIOS (not passed to
>> device-controller) and there is not restriction which force
>> it to be page aligned.
> 
> Thanks.  This patch is fine, but we're planning to make a SeaBIOS
> release in a few days - I'd look to commit this change post release.
> 
> -Kevin

Gentle ping on committing this now after v1.12.0 was released.

-Liran

_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://mail.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH 1/2] pvscsi: ring_desc do not have to be page aligned
Posted by Kevin O'Connor 7 years, 2 months ago
On Tue, Nov 13, 2018 at 05:53:40PM +0200, Liran Alon wrote:
> In contrast to other allocations made by pvscsi_init_rings(),
> ring_desc is only used internally by SeaBIOS (not passed to
> device-controller) and there is not restriction which force
> it to be page aligned.

Thanks.  I committed this change.

-Kevin

_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://mail.coreboot.org/mailman/listinfo/seabios