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

Re: [Xen-devel] Re: [Qemu-devel] [PATCH V9 03/16] xen: Add a generic layer for xc calls



On 28.01.2011, at 16:09, Anthony PERARD <anthony.perard@xxxxxxxxxx> wrote:

> On Wed, Jan 26, 2011 at 22:49, Anthony Liguori <anthony@xxxxxxxxxxxxx> wrote:
>> On 01/25/2011 08:29 AM, anthony.perard@xxxxxxxxxx wrote:
>>> 
>>> From: Alexander Graf<agraf@xxxxxxx>
>>> 
>>> This patch adds a generic layer for xc calls, allowing us to choose
>>> between the
>>> xenner and xen implementations at runtime.
>>> 
>>> Signed-off-by: Alexander Graf<agraf@xxxxxxx>
>>> Signed-off-by: Anthony PERARD<anthony.perard@xxxxxxxxxx>
>>> ---
>>>  hw/xen_interfaces.c |  100
>>> +++++++++++++++++++++++++++++++++++++++++++++++++
>>>  hw/xen_interfaces.h |  104
>>> +++++++++++++++++++++++++++++++++++++++++++++++++++
>>>  hw/xen_redirect.h   |   56 +++++++++++++++++++++++++++
>>>  3 files changed, 260 insertions(+), 0 deletions(-)
>>>  create mode 100644 hw/xen_interfaces.c
>>>  create mode 100644 hw/xen_interfaces.h
>>>  create mode 100644 hw/xen_redirect.h
>>> 
>>> diff --git a/hw/xen_interfaces.c b/hw/xen_interfaces.c
>>> new file mode 100644
>>> index 0000000..09f40e0
>>> --- /dev/null
>>> +++ b/hw/xen_interfaces.c
>>> @@ -0,0 +1,100 @@
>>> 
>> 
>> Needs a copyright.
> 
> Will put one.
> 
> 
>>> diff --git a/hw/xen_interfaces.h b/hw/xen_interfaces.h
>>> new file mode 100644
>>> index 0000000..1086850
>>> --- /dev/null
>>> +++ b/hw/xen_interfaces.h
>>> @@ -0,0 +1,104 @@
>>> +#ifndef QEMU_HW_XEN_INTERFACES_H
>>> +#define QEMU_HW_XEN_INTERFACES_H 1
>>> +
>>> +#include<xenctrl.h>
>>> +#include<xs.h>
>>> +
>>> +/* ------------------------------------------------------------- */
>>> +/* xen event channel interface                                   */
>>> +
>>> +struct XenEvtOps {
>>> +    int (*open)(void);
>>> +    int (*domid)(int xce_handle, int domid);
>>> +    int (*close)(int xce_handle);
>>> +    int (*fd)(int xce_handle);
>>> +    int (*notify)(int xce_handle, evtchn_port_t port);
>>> +    evtchn_port_or_error_t (*bind_unbound_port)(int xce_handle, int
>>> domid);
>>> +    evtchn_port_or_error_t (*bind_interdomain)(int xce_handle, int domid,
>>> +                                               evtchn_port_t
>>> remote_port);
>>> +    evtchn_port_or_error_t (*bind_virq)(int xce_handle, unsigned int
>>> virq);
>>> +    int (*unbind)(int xce_handle, evtchn_port_t port);
>>> +    evtchn_port_or_error_t (*pending)(int xce_handle);
>>> +    int (*unmask)(int xce_handle, evtchn_port_t port);
>>> +};
>>> +extern struct XenEvtOps xc_evtchn;
>>> 
>> 
>> typedef away the struct please.
> 
> Ok, I will do that.
> 
> 
>>> diff --git a/hw/xen_redirect.h b/hw/xen_redirect.h
>>> new file mode 100644
>>> index 0000000..6ddecf3
>>> --- /dev/null
>>> +++ b/hw/xen_redirect.h
>>> @@ -0,0 +1,56 @@
>>> +#ifndef QEMU_HW_XEN_REDIRECT_H
>>> +#define QEMU_HW_XEN_REDIRECT_H 1
>>> +
>>> +#include "xen_interfaces.h"
> [...]
>>> +
>>> +/* xenstore interface */
>>> +#define xs_daemon_open              xs.daemon_open
>>> +#define xs_domain_open              xs.domain_open
>>> +#define xs_daemon_open_readonly     xs.daemon_open_readonly
>>> +#define xs_daemon_close             xs.daemon_close
>> 
>> static inline please.
> 
> Because the define have the same name as the Xen function, I will have
> to rename all these functions, or I can just replace all calls in
> xen*.c files.

Just replace the calls directly :)


Alex

> 
>> Regards,
> 
> Thanks,
> 
> -- 
> Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.