[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 22/26] Implement sPAPR Virtual LAN (ibmveth)
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] [PATCH 22/26] Implement sPAPR Virtual LAN (ibmveth) |
Date: |
Thu, 17 Mar 2011 13:09:52 +1100 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Wed, Mar 16, 2011 at 05:29:48PM -0500, Anthony Liguori wrote:
> On 03/15/2011 11:56 PM, David Gibson wrote:
[snip]
> >+ lbuf = qemu_mallocz(total_len);
> >+ p = lbuf;
> >+ for (i = 0; i< nbufs; i++) {
> >+ ret = spapr_tce_dma_read(sdev, VLAN_BD_ADDR(bufs[i]),
> >+ p, VLAN_BD_LEN(bufs[i]));
> >+ if (ret< 0) {
> >+ goto out;
> >+ }
> >+
> >+ p += VLAN_BD_LEN(bufs[i]);
> >+ }
>
> I don't like the idea that there's a guest driven allocation that
> can reach 100mb here. I'd suggest that we at least limit total_len
> to 64k to be on the safe side since a packet can't be larger than
> that anyway.
Ah, a very good point. Done.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
- [Qemu-devel] Re: [PATCH 25/26] Add a PAPR TCE-bypass mechanism for the pSeries machine, (continued)
- [Qemu-devel] Re: [PATCH 25/26] Add a PAPR TCE-bypass mechanism for the pSeries machine, Alexander Graf, 2011/03/16
- [Qemu-devel] Re: [PATCH 25/26] Add a PAPR TCE-bypass mechanism for the pSeries machine, David Gibson, 2011/03/16
- [Qemu-devel] Re: [PATCH 25/26] Add a PAPR TCE-bypass mechanism for the pSeries machine, Benjamin Herrenschmidt, 2011/03/16
- [Qemu-devel] Re: [PATCH 25/26] Add a PAPR TCE-bypass mechanism for the pSeries machine, Alexander Graf, 2011/03/17
- [Qemu-devel] Re: [PATCH 25/26] Add a PAPR TCE-bypass mechanism for the pSeries machine, Benjamin Herrenschmidt, 2011/03/17
- [Qemu-devel] Re: [PATCH 25/26] Add a PAPR TCE-bypass mechanism for the pSeries machine, Alexander Graf, 2011/03/17
[Qemu-devel] [PATCH 22/26] Implement sPAPR Virtual LAN (ibmveth), David Gibson, 2011/03/16
[Qemu-devel] [PATCH 24/26] Implement PAPR virtual SCSI interface (ibmvscsi), David Gibson, 2011/03/16