qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC 4/8] ioregionfd: Introduce IORegionDFObject type


From: Elena
Subject: Re: [RFC 4/8] ioregionfd: Introduce IORegionDFObject type
Date: Tue, 15 Feb 2022 10:19:27 -0800

On Fri, Feb 11, 2022 at 02:46:47PM +0100, Markus Armbruster wrote:
> Elena Ufimtseva <elena.ufimtseva@oracle.com> writes:
> 
> > Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>
> 
> [...]
> 
> > diff --git a/qapi/qom.json b/qapi/qom.json
> > index eeb5395ff3..439fb94c93 100644
> > --- a/qapi/qom.json
> > +++ b/qapi/qom.json
> > @@ -689,6 +689,29 @@
> >          'data': { 'chardev': 'str',
> >                    '*log': 'str' } }
> >  
> > +##
> > +# @IORegionFDObjectProperties:
> > +#
> > +# Describes ioregionfd for the device
> > +#
> > +# @devid: the id of the device to be associated with the ioregionfd
> > +#
> > +# @iofd: File descriptor
> > +#
> > +# @bar: BAR number to use with ioregionfd
> > +#
> > +# @start: offset from the BAR start address of ioregionfd
> > +#
> > +# @size: size of the ioregionfd
> > +##
> > +# Since: 2.9
> > +{ 'struct': 'IORegionFDObjectProperties',
> > +  'data': { 'devid': 'str',
> > +            'iofd': 'str',
> > +            'bar': 'int',
> > +            '*start': 'int',
> > +            '*size':'int' } }
> 
> Should these three be 'uint32' to match struct IORegionFD?
>

That is right, I will fix this.

Thank you Markus.
> > +
> >  ##
> >  # @RemoteObjectProperties:
> >  #
> > @@ -842,8 +865,10 @@
> >      'tls-creds-psk',
> >      'tls-creds-x509',
> >      'tls-cipher-suites',
> > -    { 'name': 'x-remote-object', 'features': [ 'unstable' ] }
> > -  ] }
> > +    { 'name': 'x-remote-object', 'features': [ 'unstable' ] },
> > +    { 'name' :'ioregionfd-object',
> > +      'if': 'CONFIG_IOREGIONFD' }
> > + ] }
> >  
> >  ##
> >  # @ObjectOptions:
> > @@ -905,7 +930,8 @@
> >        'tls-creds-psk':              'TlsCredsPskProperties',
> >        'tls-creds-x509':             'TlsCredsX509Properties',
> >        'tls-cipher-suites':          'TlsCredsProperties',
> > -      'x-remote-object':            'RemoteObjectProperties'
> > +      'x-remote-object':            'RemoteObjectProperties',
> > +      'ioregionfd-object':          'IORegionFDObjectProperties'
> >    } }
> >  
> >  ##
> > diff --git a/include/hw/remote/ioregionfd.h b/include/hw/remote/ioregionfd.h
> > new file mode 100644
> > index 0000000000..c8a8b32ee0
> > --- /dev/null
> > +++ b/include/hw/remote/ioregionfd.h
> > @@ -0,0 +1,40 @@
> > +/*
> > + * Ioregionfd headers
> > + *
> > + * Copyright © 2018, 2022 Oracle and/or its affiliates.
> > + *
> > + * This work is licensed under the terms of the GNU GPL, version 2 or 
> > later.
> > + * See the COPYING file in the top-level directory.
> > + *
> > + */
> > +
> > +#ifndef IOREGIONFD_H
> > +#define IOREGIONFD_H
> > +
> > +#define PCI_BARS_NR 6
> > +
> > +typedef struct {
> > +    uint64_t val;
> > +    bool memory;
> > +} IORegionFDOp;
> > +
> > +typedef struct {
> > +    int fd;
> > +    char *devid;
> > +    uint32_t bar;
> > +    uint32_t start;
> > +    uint32_t size;
> > +    bool memory;
> > +} IORegionFD;
> > +
> > +struct IORegionFDObject {
> > +    /* private */
> > +    Object parent;
> > +
> > +    IORegionFD ioregfd;
> > +    QTAILQ_ENTRY(IORegionFDObject) next;
> > +};
> > +
> > +typedef struct IORegionFDObject IORegionFDObject;
> > +
> > +#endif /* IOREGIONFD_H */
> 
> [...]
> 



reply via email to

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