WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: [Qemu-devel] [PATCH V9 03/16] xen: Add a generic lay

To: Anthony Liguori <anthony@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [Qemu-devel] [PATCH V9 03/16] xen: Add a generic layer for xc calls
From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
Date: Fri, 28 Jan 2011 15:09:55 +0000
Cc: Alexander Graf <agraf@xxxxxxx>, Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, QEMU-devel <qemu-devel@xxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Delivery-date: Fri, 28 Jan 2011 07:13:16 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:from :date:x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=DTa8kvg/hQAEY8dIDVQ/o2Bcg0vyNcjJURjgeW7KtqA=; b=leXdqjgU/5OISIaoJQSAPW/H60y9hQXhk6e6AKOARCurx8DblkpJuUQoa0FIO8uxsf zA74c/UCG60Tlm9D+1Ul+PJYXygMqDHyDJ48pJc/LnRE8cSJCUZtFhDk+EmP5O5WkplL GzWnhnFJCdD/oGcJGirqDRSIjDSsNxHzFtiz4=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=UQ3tXU/5ll+mHzFkM6ltqkfPPx30FZuQ4SAn8JwATnkgkrIUKEKD4Mw0EVhHcvcqti vaDSGBt2FN/D8plUqQGGW+ZGjHF69Ch9SIShHgXq5p2WZt301Af23ytYbgEDD7F/tKk9 mK+jlohymGxmxD8ygq9Q8ZCNRY7Sx5vV3aJd8=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4D40A509.7000909@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1295965760-31508-1-git-send-email-anthony.perard@xxxxxxxxxx> <1295965760-31508-4-git-send-email-anthony.perard@xxxxxxxxxx> <4D40A509.7000909@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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.

> Regards,

Thanks,

-- 
Anthony PERARD

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

<Prev in Thread] Current Thread [Next in Thread>