qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC v3 7/8] vhost-vdpa: introduce vhost-vdpa backend


From: Cindy Lu
Subject: Re: [RFC v3 7/8] vhost-vdpa: introduce vhost-vdpa backend
Date: Mon, 8 Jun 2020 22:46:26 +0800

On Thu, Jun 4, 2020 at 7:34 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>
> On Thu, Jun 04, 2020 at 12:39:34PM +0200, Eugenio Perez Martin wrote:
> > > +static int vhost_vdpa_set_config(struct vhost_dev *dev, const uint8_t 
> > > *data,
> > > +                                   uint32_t offset, uint32_t size,
> > > +                                   uint32_t flags)
> > > +{
> > > +    struct vhost_vdpa_config config;
> > > +    int ret;
> > > +    if ((size > VHOST_VDPA_MAX_CONFIG_SIZE) || (data == NULL)) {
> >
> > VHOST_VDPA_MAX_CONFIG_SIZE is currently undefined.
> >
> > If we want to maintain this as a stack allocation (as proposed in
> > https://www.mail-archive.com/qemu-devel@nongnu.org/msg701744.html) I
> > think that the best option is to decide which is the maximum value buf
> > can hold, and set it in vhost_vdpa_config.buf declaration.
>
> That depends on device features. qemu has logic to figure out
> config size based on that and set config_size accordingly.
> Why not reuse it? Sending more should be ok and extra
> data just ignored.
>
> --
> MST
>
Thanks Michael and Eugenio for your suggestion,I‘m rewriting this part




reply via email to

[Prev in Thread] Current Thread [Next in Thread]