All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Atsushi SAKAI <sakaia@jp.fujitsu.com>
Cc: xen-devel@lists.xensource.com, xen-ia64-devel@lists.xensource.com
Subject: Re: [PATCH] Re: Re: [PATCH 2/2] PV framebuffer
Date: Wed, 22 Nov 2006 14:46:47 +0100	[thread overview]
Message-ID: <87r6vv8ugo.fsf@pike.pond.sub.org> (raw)
In-Reply-To: <200611221150.kAMBoeEX021723@fjmscan501.ms.jp.fujitsu.com> (Atsushi SAKAI's message of "Wed, 22 Nov 2006 20:49:47 +0900")

Atsushi SAKAI <sakaia@jp.fujitsu.com> writes:

> Hi, Markus
>
>  This is a patch for work PV frame buffer on IA64.
> We also prepare the patch for FC6 and RHEL5B2 and its confirmed working 
> on IA64 and x86.
>
> In this patch code, 
> #ifdef __ia64__ exists, but it does not need.
> The purpose is avoid the unnecessary error handling for x86.

Do you mean your __ia64__ code works fine everywhere?

> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
> Signed-off-by: Masami Watanabe <masami.watanabe@jp.fujitsu.com>
> Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
>
>
>>From seeing your patches policy,
> We do memory address translation in Dom0 application side.

Looks like this is support for shadow translate mode guests.  My
current code has that, but I didn't catch all places.  Cool.

> Thanks
> Atsushi SAKAI
[...]
> diff -r 92fddc5af648 tools/xenfb/xenfb.c
> --- a/tools/xenfb/xenfb.c	Wed Nov 22 20:34:45 2006 +0900
> +++ b/tools/xenfb/xenfb.c	Wed Nov 22 20:36:35 2006 +0900
> @@ -344,6 +344,9 @@ bool xenfb_attach_dom(struct xenfb *xenf
>          int serrno;
>          int fbdev_evtchn, kbd_evtchn;
>  	unsigned long fbdev_mfn, kbd_mfn;
> +#ifdef __ia64__
> +	xen_pfn_t *page_array;
> +#endif
>  
>  	if (xenfb->domid != -1) {
>  		xenfb_detach_dom(xenfb);
> @@ -432,16 +435,24 @@ bool xenfb_attach_dom(struct xenfb *xenf
>  	if (xenfb->kbd_port == -1) 
>  		goto error;
>  
> +#ifdef __ia64__
>  	ret = xc_domain_translate_gpfn_list(xenfb->xc, domid, 1,
>  					    &fbdev_mfn, &fbdev_mfn);
>  	if (ret < 0 && errno != EINVAL)
>  		goto error;
> +#endif
>  	xenfb->fb_info = xc_map_foreign_range(xenfb->xc, domid, XC_PAGE_SIZE,
>  					      PROT_READ | PROT_WRITE,
>  					      fbdev_mfn);
>  	if (xenfb->fb_info == NULL)
>  		goto error;
>  
> +#ifdef __ia64__
> +	ret = xc_domain_translate_gpfn_list(xenfb->xc, domid, 1,
> +					    &kbd_mfn, &kbd_mfn);
> +	if (ret < 0 && errno != EINVAL)
> +		goto error;
> +#endif
>  	xenfb->kbd_info = xc_map_foreign_range(xenfb->xc, domid, XC_PAGE_SIZE,
>  					       PROT_READ | PROT_WRITE,
>  					       kbd_mfn);
> @@ -466,10 +477,36 @@ bool xenfb_attach_dom(struct xenfb *xenf
>  	 * happens, we happily continue here, and later crash on
>  	 * access.
>  	 */
> -	fbmfns = xc_map_foreign_batch(xenfb->xc, domid, PROT_READ, xenfb->fb_info->pd, n_fbdirs);
> +	
> +#ifdef __ia64__
> +	page_array = (xen_pfn_t *)malloc(n_fbdirs * sizeof(xen_pfn_t));
> +	ret = xc_domain_translate_gpfn_list(xenfb->xc, domid,
> +		n_fbdirs, xenfb->fb_info->pd, page_array);
> +	if (ret == 0) {
> +		memcpy(xenfb->fb_info->pd, page_array,
> +			n_fbdirs * sizeof(xen_pfn_t));
> +	} else {
> +		if (ret < 0 && errno != EINVAL)
> +			goto error;
> +	}

Stupid question: why can't you translate in place here instead of
bouncing through page_array?

> +	free(page_array);
> +#endif
> +	fbmfns = xc_map_foreign_batch(xenfb->xc, domid, PROT_READ | PROT_WRITE, xenfb->fb_info->pd, n_fbdirs);
>  	if (fbmfns == NULL)
>  		goto error;
>  
> +#ifdef __ia64__
> +	page_array = (xen_pfn_t *)malloc(n_fbmfns * sizeof(xen_pfn_t));
> +	ret = xc_domain_translate_gpfn_list(xenfb->xc, domid,
> +		n_fbmfns, fbmfns, page_array);
> +	if (ret == 0) {
> +		memcpy(fbmfns, page_array, n_fbmfns * sizeof(xen_pfn_t));
> +	} else {
> +		if (ret < 0 && errno != EINVAL)
> +			goto error;
> +	}
> +	free(page_array);
> +#endif
>  	xenfb->fb = xc_map_foreign_batch(xenfb->xc, domid, PROT_READ | PROT_WRITE, fbmfns, n_fbmfns);
>  	if (xenfb->fb == NULL)
>  		goto error;

  reply	other threads:[~2006-11-22 13:46 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-10  8:54 [PATCH 2/2] PV framebuffer Markus Armbruster
2006-11-12 14:20 ` Steven Smith
2006-11-14 14:01   ` Markus Armbruster
2006-11-15 12:18     ` Steven Smith
2006-11-15 17:46       ` Markus Armbruster
2006-11-16 16:13         ` Markus Armbruster
2006-11-17 13:23 ` Markus Armbruster
2006-11-17 13:26   ` Markus Armbruster
2006-11-22 11:49   ` [PATCH] Re: [Xen-devel] " Atsushi SAKAI
2006-11-22 13:46     ` Markus Armbruster [this message]
2006-11-24  5:00       ` Atsushi SAKAI
2006-11-24  8:10         ` [PATCH] " Markus Armbruster
2006-11-24  8:48           ` [PATCH] Re: [Xen-devel] " Atsushi SAKAI
2006-11-28 13:04           ` Atsushi SAKAI
2006-11-28 13:55             ` [PATCH] " Markus Armbruster
2006-11-29 13:08               ` [PATCH] Re: [Xen-devel] " Atsushi SAKAI
2006-12-01 12:35               ` Atsushi SAKAI
2006-12-01 18:03                 ` [PATCH] " Markus Armbruster
2006-12-04  8:46                   ` [PATCH] Re: [Xen-devel] " Atsushi SAKAI
2006-12-04 19:44                     ` [PATCH] " Markus Armbruster
2006-12-05 12:01                       ` [PATCH] Re: [Xen-devel] " Atsushi SAKAI
2006-12-05 17:32                         ` [PATCH] " Markus Armbruster
2006-12-07  0:55                           ` [PATCH] Re: [Xen-devel] " Atsushi SAKAI
2006-12-07  7:58                             ` [PATCH] " Markus Armbruster
2006-12-12 11:54                               ` [PATCH] Re: [Xen-devel] " Atsushi SAKAI
2006-12-12 12:23                                 ` [PATCH] " Markus Armbruster
2006-12-13  2:18                                   ` Atsushi SAKAI
2006-12-14 10:58                                   ` [PATCH] Re: [Xen-devel] " Atsushi SAKAI
2006-12-14 11:30                                     ` [PATCH] " Keir Fraser
2006-12-14 12:37                                       ` Markus Armbruster
2006-12-14 13:30                                         ` Keir Fraser
2006-12-15 16:38                                           ` [PATCH][PVFB][LINUX] Fix possible sleep while holding spinlock Markus Armbruster
2006-12-15 18:06                                             ` Keir Fraser
2006-12-15 18:35                                               ` Markus Armbruster
2006-12-19  2:52                                             ` Atsushi SAKAI
2006-12-19  7:49                                               ` Markus Armbruster
2006-12-19  8:17                                                 ` Atsushi SAKAI
2007-01-10  8:50                                                   ` Markus Armbruster
2006-11-28 15:36             ` [PATCH] Re: Re: [PATCH 2/2] PV framebuffer Stephen C. Tweedie
2006-11-24  8:05   ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r6vv8ugo.fsf@pike.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=sakaia@jp.fujitsu.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=xen-ia64-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.