From patchwork Tue Jan 11 15:03:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 12709940 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B5DE2C433FE for ; Tue, 11 Jan 2022 15:03:39 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.255795.438547 (Exim 4.92) (envelope-from ) id 1n7IgH-0001zQ-KR; Tue, 11 Jan 2022 15:03:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 255795.438547; Tue, 11 Jan 2022 15:03:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1n7IgH-0001xb-Fh; Tue, 11 Jan 2022 15:03:25 +0000 Received: by outflank-mailman (input) for mailman id 255795; Tue, 11 Jan 2022 15:03:23 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1n7IgF-0001Pm-Cp for xen-devel@lists.xenproject.org; Tue, 11 Jan 2022 15:03:23 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 9db5c590-72ef-11ec-9ce5-af14b9085ebd; Tue, 11 Jan 2022 16:03:21 +0100 (CET) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id EFD1321138; Tue, 11 Jan 2022 15:03:20 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C9D1E14043; Tue, 11 Jan 2022 15:03:20 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id OAUkMDic3WFCfQAAMHmgww (envelope-from ); Tue, 11 Jan 2022 15:03:20 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 9db5c590-72ef-11ec-9ce5-af14b9085ebd DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1641913400; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lxNmvTh7zUDPqVHTg8LgcS4pfv8P5zMlZ5EGYG1JZ+0=; b=jcbXIbFm90CkyiXAqPcCol6RxP0jfBFWm5LJA1iF/9epVlUUCtbENaCyvUwpkJ3Rstav/K qLzWmwG8fqlLdFbWRcEAifyRMjAntX+c/Tn82A7eTexAITnFWmFCzDD5nlF5kayMMZEDxe MsAapERjfpf7K/QkiZRxpvHQbb0FY0c= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Wei Liu , Anthony PERARD Subject: [PATCH v2 1/3] tools/libs/evtchn: decouple more from mini-os Date: Tue, 11 Jan 2022 16:03:16 +0100 Message-Id: <20220111150318.22570-2-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220111150318.22570-1-jgross@suse.com> References: <20220111150318.22570-1-jgross@suse.com> MIME-Version: 1.0 Mini-OS and libevtchn are using implementation details of each other. Change that by letting libevtchn use the new alloc_file_type() and get_file_from_fd() functions and the generic dev pointer of struct file from Mini-OS. By using private struct declarations Mini-OS will be able to drop the libevtchn specific definitions of struct evtchn_port_info and evtchn_port_list in future. While at it use boll for "pending" and "bound". Switch to use xce as function parameter instead of fd where possible. Signed-off-by: Juergen Gross --- V2: - use xce instead of fd as parameter internally (Andrew Cooper) - add alloc_file_type() support --- tools/libs/evtchn/minios.c | 143 +++++++++++++++++++++++-------------- 1 file changed, 91 insertions(+), 52 deletions(-) diff --git a/tools/libs/evtchn/minios.c b/tools/libs/evtchn/minios.c index e5dfdc5ef5..c3a5ce3b98 100644 --- a/tools/libs/evtchn/minios.c +++ b/tools/libs/evtchn/minios.c @@ -38,29 +38,40 @@ #include "private.h" -extern void minios_evtchn_close_fd(int fd); +LIST_HEAD(port_list, port_info); + +struct port_info { + LIST_ENTRY(port_info) list; + evtchn_port_t port; + bool pending; + bool bound; +}; extern struct wait_queue_head event_queue; +int minios_evtchn_close_fd(int fd); + /* XXX Note: This is not threadsafe */ -static struct evtchn_port_info *port_alloc(int fd) +static struct port_info *port_alloc(xenevtchn_handle *xce) { - struct evtchn_port_info *port_info; + struct port_info *port_info; + struct file *file = get_file_from_fd(xce->fd); + struct port_list *port_list = file->dev; - port_info = malloc(sizeof(struct evtchn_port_info)); + port_info = malloc(sizeof(struct port_info)); if ( port_info == NULL ) return NULL; - port_info->pending = 0; + port_info->pending = false; port_info->port = -1; - port_info->bound = 0; + port_info->bound = false; - LIST_INSERT_HEAD(&files[fd].evtchn.ports, port_info, list); + LIST_INSERT_HEAD(port_list, port_info, list); return port_info; } -static void port_dealloc(struct evtchn_port_info *port_info) +static void port_dealloc(struct port_info *port_info) { if ( port_info->bound ) unbind_evtchn(port_info->port); @@ -69,18 +80,54 @@ static void port_dealloc(struct evtchn_port_info *port_info) free(port_info); } +int minios_evtchn_close_fd(int fd) +{ + struct port_info *port_info, *tmp; + struct file *file = get_file_from_fd(fd); + struct port_list *port_list = file->dev; + + LIST_FOREACH_SAFE(port_info, port_list, list, tmp) + port_dealloc(port_info); + free(port_list); + + return 0; +} + +static struct file_ops evtchn_ops = { + .name = "evtchn", + .close = minios_evtchn_close_fd, + .select_rd = select_read_flag, +}; + /* * XENEVTCHN_NO_CLOEXEC is being ignored, as there is no exec() call supported * in Mini-OS. */ int osdep_evtchn_open(xenevtchn_handle *xce, unsigned int flags) { - int fd = alloc_fd(FTYPE_EVTCHN); + int fd; + struct file *file; + struct port_list *list; + static unsigned int ftype_evtchn; - if ( fd == -1 ) + if ( !ftype_evtchn ) + ftype_evtchn = alloc_file_type(&evtchn_ops); + + list = malloc(sizeof(*list)); + if ( !list ) return -1; - LIST_INIT(&files[fd].evtchn.ports); + fd = alloc_fd(ftype_evtchn); + file = get_file_from_fd(fd); + + if ( !file ) + { + free(list); + return -1; + } + + file->dev = list; + LIST_INIT(list); xce->fd = fd; printf("evtchn_open() -> %d\n", fd); @@ -102,16 +149,6 @@ int osdep_evtchn_restrict(xenevtchn_handle *xce, domid_t domid) return -1; } -void minios_evtchn_close_fd(int fd) -{ - struct evtchn_port_info *port_info, *tmp; - - LIST_FOREACH_SAFE(port_info, &files[fd].evtchn.ports, list, tmp) - port_dealloc(port_info); - - files[fd].type = FTYPE_NONE; -} - int xenevtchn_fd(xenevtchn_handle *xce) { return xce->fd; @@ -134,42 +171,43 @@ int xenevtchn_notify(xenevtchn_handle *xce, evtchn_port_t port) static void evtchn_handler(evtchn_port_t port, struct pt_regs *regs, void *data) { - int fd = (int)(intptr_t)data; - struct evtchn_port_info *port_info; + xenevtchn_handle *xce = data; + struct file *file = get_file_from_fd(xce->fd); + struct port_info *port_info; + struct port_list *port_list; - assert(files[fd].type == FTYPE_EVTCHN); + assert(file); + port_list = file->dev; mask_evtchn(port); - LIST_FOREACH(port_info, &files[fd].evtchn.ports, list) + LIST_FOREACH(port_info, port_list, list) { if ( port_info->port == port ) goto found; } - printk("Unknown port for handle %d\n", fd); + printk("Unknown port for handle %d\n", xce->fd); return; found: - port_info->pending = 1; - files[fd].read = 1; + port_info->pending = true; + file->read = true; wake_up(&event_queue); } xenevtchn_port_or_error_t xenevtchn_bind_unbound_port(xenevtchn_handle *xce, uint32_t domid) { - int fd = xce->fd; - struct evtchn_port_info *port_info; + struct port_info *port_info; int ret; evtchn_port_t port; assert(get_current() == main_thread); - port_info = port_alloc(fd); + port_info = port_alloc(xce); if ( port_info == NULL ) return -1; printf("xenevtchn_bind_unbound_port(%d)", domid); - ret = evtchn_alloc_unbound(domid, evtchn_handler, - (void *)(intptr_t)fd, &port); + ret = evtchn_alloc_unbound(domid, evtchn_handler, xce, &port); printf(" = %d\n", ret); if ( ret < 0 ) @@ -179,7 +217,7 @@ xenevtchn_port_or_error_t xenevtchn_bind_unbound_port(xenevtchn_handle *xce, return -1; } - port_info->bound = 1; + port_info->bound = true; port_info->port = port; unmask_evtchn(port); @@ -190,19 +228,18 @@ xenevtchn_port_or_error_t xenevtchn_bind_interdomain(xenevtchn_handle *xce, uint32_t domid, evtchn_port_t remote_port) { - int fd = xce->fd; - struct evtchn_port_info *port_info; + struct port_info *port_info; evtchn_port_t local_port; int ret; assert(get_current() == main_thread); - port_info = port_alloc(fd); + port_info = port_alloc(xce); if ( port_info == NULL ) return -1; printf("xenevtchn_bind_interdomain(%d, %"PRId32")", domid, remote_port); ret = evtchn_bind_interdomain(domid, remote_port, evtchn_handler, - (void *)(intptr_t)fd, &local_port); + xce, &local_port); printf(" = %d\n", ret); if ( ret < 0 ) @@ -212,7 +249,7 @@ xenevtchn_port_or_error_t xenevtchn_bind_interdomain(xenevtchn_handle *xce, return -1; } - port_info->bound = 1; + port_info->bound = true; port_info->port = local_port; unmask_evtchn(local_port); @@ -222,9 +259,11 @@ xenevtchn_port_or_error_t xenevtchn_bind_interdomain(xenevtchn_handle *xce, int xenevtchn_unbind(xenevtchn_handle *xce, evtchn_port_t port) { int fd = xce->fd; - struct evtchn_port_info *port_info; + struct file *file = get_file_from_fd(fd); + struct port_info *port_info; + struct port_list *port_list = file->dev; - LIST_FOREACH(port_info, &files[fd].evtchn.ports, list) + LIST_FOREACH(port_info, port_list, list) { if ( port_info->port == port ) { @@ -243,17 +282,16 @@ int xenevtchn_unbind(xenevtchn_handle *xce, evtchn_port_t port) xenevtchn_port_or_error_t xenevtchn_bind_virq(xenevtchn_handle *xce, unsigned int virq) { - int fd = xce->fd; - struct evtchn_port_info *port_info; + struct port_info *port_info; evtchn_port_t port; assert(get_current() == main_thread); - port_info = port_alloc(fd); + port_info = port_alloc(xce); if ( port_info == NULL ) return -1; printf("xenevtchn_bind_virq(%d)", virq); - port = bind_virq(virq, evtchn_handler, (void *)(intptr_t)fd); + port = bind_virq(virq, evtchn_handler, xce); printf(" = %d\n", port); if ( port < 0 ) @@ -263,7 +301,7 @@ xenevtchn_port_or_error_t xenevtchn_bind_virq(xenevtchn_handle *xce, return -1; } - port_info->bound = 1; + port_info->bound = true; port_info->port = port; unmask_evtchn(port); @@ -272,27 +310,28 @@ xenevtchn_port_or_error_t xenevtchn_bind_virq(xenevtchn_handle *xce, xenevtchn_port_or_error_t xenevtchn_pending(xenevtchn_handle *xce) { - int fd = xce->fd; - struct evtchn_port_info *port_info; + struct file *file = get_file_from_fd(xce->fd); + struct port_info *port_info; + struct port_list *port_list = file->dev; unsigned long flags; evtchn_port_t ret = -1; local_irq_save(flags); - files[fd].read = 0; + file->read = false; - LIST_FOREACH(port_info, &files[fd].evtchn.ports, list) + LIST_FOREACH(port_info, port_list, list) { if ( port_info->port != -1 && port_info->pending ) { if ( ret == -1 ) { ret = port_info->port; - port_info->pending = 0; + port_info->pending = false; } else { - files[fd].read = 1; + file->read = true; break; } } From patchwork Tue Jan 11 15:03:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 12709938 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 51642C433F5 for ; Tue, 11 Jan 2022 15:03:38 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.255792.438521 (Exim 4.92) (envelope-from ) id 1n7IgF-0001QI-Nz; Tue, 11 Jan 2022 15:03:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 255792.438521; Tue, 11 Jan 2022 15:03:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1n7IgF-0001QB-Iy; Tue, 11 Jan 2022 15:03:23 +0000 Received: by outflank-mailman (input) for mailman id 255792; Tue, 11 Jan 2022 15:03:22 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1n7IgE-0001Pl-J8 for xen-devel@lists.xenproject.org; Tue, 11 Jan 2022 15:03:22 +0000 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 9dcbdf25-72ef-11ec-81c1-a30af7de8005; Tue, 11 Jan 2022 16:03:21 +0100 (CET) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 23F7A212C5; Tue, 11 Jan 2022 15:03:21 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 014C913DDD; Tue, 11 Jan 2022 15:03:20 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id kKTMOjic3WFCfQAAMHmgww (envelope-from ); Tue, 11 Jan 2022 15:03:20 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 9dcbdf25-72ef-11ec-81c1-a30af7de8005 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1641913401; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FkeH3cfFFVMIE3XajBHPWxcpnP57bP6Oa1K/USAaIVA=; b=pkP45NirCD81TT9ZA5BUr/E8TvnTSdufQhqI6Zp+1qu30xx48D2t02qp/78ie6Ota7ed+2 WORVu1Q6c4R3spidoqY26eYut7ZAOFrrtuZzQFvmt+G592JCuEbg7ZgnbFPrhSjfUq1ZB3 kFVP5Am669GxR+8bFpn0ik4SPHrEeHs= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Wei Liu , Anthony PERARD Subject: [PATCH v2 2/3] tools/libs/gnttab: decouple more from mini-os Date: Tue, 11 Jan 2022 16:03:17 +0100 Message-Id: <20220111150318.22570-3-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220111150318.22570-1-jgross@suse.com> References: <20220111150318.22570-1-jgross@suse.com> MIME-Version: 1.0 libgnttab is using implementation details of Mini-OS. Change that by letting libgnttab use the new alloc_file_type() and get_file_from_fd() functions and the generic dev pointer of struct file from Mini-OS. Signed-off-by: Juergen Gross --- V2: - add alloc_file_type() support --- tools/libs/gnttab/minios.c | 68 +++++++++++++++++++++++++++----------- 1 file changed, 48 insertions(+), 20 deletions(-) diff --git a/tools/libs/gnttab/minios.c b/tools/libs/gnttab/minios.c index f78caadd30..c19f339c8c 100644 --- a/tools/libs/gnttab/minios.c +++ b/tools/libs/gnttab/minios.c @@ -28,18 +28,53 @@ #include #include +#include #include #include "private.h" -void minios_gnttab_close_fd(int fd); +int minios_gnttab_close_fd(int fd); + +int minios_gnttab_close_fd(int fd) +{ + struct file *file = get_file_from_fd(fd); + + gntmap_fini(file->dev); + free(file->dev); + + return 0; +} + +static struct file_ops gnttab_ops = { + .name = "gnttab", + .close = minios_gnttab_close_fd, +}; int osdep_gnttab_open(xengnttab_handle *xgt) { - int fd = alloc_fd(FTYPE_GNTMAP); - if ( fd == -1 ) + int fd; + struct file *file; + struct gntmap *gntmap; + static unsigned int ftype_gnttab; + + if ( !ftype_gnttab ) + ftype_gnttab = alloc_file_type(&gnttab_ops); + + gntmap = malloc(sizeof(*gntmap)); + if ( !gntmap ) + return -1; + + fd = alloc_fd(ftype_gnttab); + file = get_file_from_fd(fd); + + if ( !file ) + { + free(gntmap); return -1; - gntmap_init(&files[fd].gntmap); + } + + file->dev = gntmap; + gntmap_init(gntmap); xgt->fd = fd; return 0; } @@ -52,28 +87,22 @@ int osdep_gnttab_close(xengnttab_handle *xgt) return close(xgt->fd); } -void minios_gnttab_close_fd(int fd) -{ - gntmap_fini(&files[fd].gntmap); - files[fd].type = FTYPE_NONE; -} - void *osdep_gnttab_grant_map(xengnttab_handle *xgt, uint32_t count, int flags, int prot, uint32_t *domids, uint32_t *refs, uint32_t notify_offset, evtchn_port_t notify_port) { - int fd = xgt->fd; + struct file *file = get_file_from_fd(xgt->fd); int stride = 1; + if (flags & XENGNTTAB_GRANT_MAP_SINGLE_DOMAIN) stride = 0; if (notify_offset != -1 || notify_port != -1) { errno = ENOSYS; return NULL; } - return gntmap_map_grant_refs(&files[fd].gntmap, - count, domids, stride, + return gntmap_map_grant_refs(file->dev, count, domids, stride, refs, prot & PROT_WRITE); } @@ -81,11 +110,10 @@ int osdep_gnttab_unmap(xengnttab_handle *xgt, void *start_address, uint32_t count) { - int fd = xgt->fd; + struct file *file = get_file_from_fd(xgt->fd); int ret; - ret = gntmap_munmap(&files[fd].gntmap, - (unsigned long) start_address, - count); + + ret = gntmap_munmap(file->dev, (unsigned long) start_address, count); if (ret < 0) { errno = -ret; return -1; @@ -95,10 +123,10 @@ int osdep_gnttab_unmap(xengnttab_handle *xgt, int osdep_gnttab_set_max_grants(xengnttab_handle *xgt, uint32_t count) { - int fd = xgt->fd; + struct file *file = get_file_from_fd(xgt->fd); int ret; - ret = gntmap_set_max_grants(&files[fd].gntmap, - count); + + ret = gntmap_set_max_grants(file->dev, count); if (ret < 0) { errno = -ret; return -1; From patchwork Tue Jan 11 15:03:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 12709939 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6EEF4C433EF for ; Tue, 11 Jan 2022 15:03:39 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.255794.438543 (Exim 4.92) (envelope-from ) id 1n7IgH-0001uO-Av; Tue, 11 Jan 2022 15:03:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 255794.438543; Tue, 11 Jan 2022 15:03:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1n7IgH-0001u3-4p; Tue, 11 Jan 2022 15:03:25 +0000 Received: by outflank-mailman (input) for mailman id 255794; Tue, 11 Jan 2022 15:03:23 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1n7IgF-0001Pl-C2 for xen-devel@lists.xenproject.org; Tue, 11 Jan 2022 15:03:23 +0000 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 9de6bbf7-72ef-11ec-81c1-a30af7de8005; Tue, 11 Jan 2022 16:03:21 +0100 (CET) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 506721F3B1; Tue, 11 Jan 2022 15:03:21 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 29BBA13DDD; Tue, 11 Jan 2022 15:03:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id sAr7CDmc3WFCfQAAMHmgww (envelope-from ); Tue, 11 Jan 2022 15:03:21 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 9de6bbf7-72ef-11ec-81c1-a30af7de8005 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1641913401; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k0wxCynhrG7+3fmG6x+LbTZBr6u3QyVqAaptOz8E8AA=; b=H3R1EhnhtZXIGv+EwDOxndd7oUu0h/Qcna+uQd108vxqfcUQeiQS8rXlryzHcsrzjMRgZu DFb2TIz3bRGlJqjEUwL8sEDJYi/Efwj3oqrqtfcmpe5KdYq5ddRYRoS1YnEcF3Yl0gd7lk 09P6Taa3yS9Rl6Lc2Y51dlMih6NWWMM= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Wei Liu , Anthony PERARD Subject: [PATCH v2 3/3] tools/libs/ctrl: remove file related handling Date: Tue, 11 Jan 2022 16:03:18 +0100 Message-Id: <20220111150318.22570-4-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20220111150318.22570-1-jgross@suse.com> References: <20220111150318.22570-1-jgross@suse.com> MIME-Version: 1.0 There is no special file handling related to libxenctrl in Mini-OS any longer, so the close hook can be removed. Signed-off-by: Juergen Gross Acked-by: Andrew Cooper --- V2: - new patch --- tools/libs/ctrl/xc_minios.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tools/libs/ctrl/xc_minios.c b/tools/libs/ctrl/xc_minios.c index 1799daafdc..3dea7a78a5 100644 --- a/tools/libs/ctrl/xc_minios.c +++ b/tools/libs/ctrl/xc_minios.c @@ -35,15 +35,6 @@ #include "xc_private.h" -void minios_interface_close_fd(int fd); - -extern void minios_interface_close_fd(int fd); - -void minios_interface_close_fd(int fd) -{ - files[fd].type = FTYPE_NONE; -} - /* Optionally flush file to disk and discard page cache */ void discard_file_cache(xc_interface *xch, int fd, int flush) {