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

[Xen-devel] Re: [PATCH 14/16] paravirtualize IO permission bitmap

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: [Xen-devel] Re: [PATCH 14/16] paravirtualize IO permission bitmap
From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Date: Tue, 2 Jun 2009 18:11:04 +0200 (CEST)
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, the arch/x86 maintainers <x86@xxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Christophe Saout <chtephan@xxxxxxxxxxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxx>
Delivery-date: Thu, 04 Jun 2009 02:33:49 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1242163718-2934-15-git-send-email-jeremy@xxxxxxxx>
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: <1242163718-2934-1-git-send-email-jeremy@xxxxxxxx> <1242163718-2934-15-git-send-email-jeremy@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (LFD 1167 2008-08-23)
On Tue, 12 May 2009, Jeremy Fitzhardinge wrote:

> From: Christophe Saout <chtephan@xxxxxxxxxxxxxxxxxxxx>
> 
> A PV Xen guest kernel has no TSS of its own, so the IO permission
> bitmap must be paravirtualized.  This patch adds set_io_bitmap
> as a paravirt op, and defines a native version which updates the tss,
> and a Xen version which uses a hypercall.
> 
> This is much easier now that 32 and 64-bit use the same code to
> manage the IO bitmap.

  Sigh, is there a plan to limit the paravirt horror at some point or
  are we keeping on adding to it forever ?

> --- a/arch/x86/kernel/ioport.c
> +++ b/arch/x86/kernel/ioport.c
> @@ -30,14 +30,31 @@ static void set_bitmap(unsigned long *bitmap, unsigned 
> int base,
>       }
>  }

This needs kernel doc annotation and a comment about the calling
conventions i.e. preemption disabled.
  
> +void native_set_io_bitmap(struct thread_struct *t,
> +                       int changed, unsigned long bytes_updated)
> +{
> +     struct tss_struct *tss;
> +
> +     if (!bytes_updated)
> +             return;
> +
> +     tss = &__get_cpu_var(init_tss);
> +
> +     /* Update the TSS: */
> +     if (t->io_bitmap_ptr)
> +             memcpy(tss->io_bitmap, t->io_bitmap_ptr, bytes_updated);
> +     else
> +             memset(tss->io_bitmap, 0xff, bytes_updated);
> +}
> +

Thanks,

        tglx

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

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