|
|
|
|
|
|
|
|
|
|
xen-ia64-devel
Re: [Xen-ia64-devel] Protection key support for PV domains
Hi Isaku,
many thanks for your comments, see below ...
Am Freitag, 13. Juli 2007 schrieb Isaku Yamahata:
> On Wed, Jul 11, 2007 at 03:52:15PM +0200, Dietmar Hahn wrote:
> > diff -r 87b0b6a08dbd -r 44ccb8aa58cc xen/include/public/arch-ia64.h
> > --- a/xen/include/public/arch-ia64.h Mon Jul 9 09:22:58 2007 -0600
> > +++ b/xen/include/public/arch-ia64.h Wed Jul 11 15:37:09 2007 +0200
> > @@ -236,7 +236,9 @@ struct mapped_regs {
> > int banknum; // 0 or 1, which virtual register bank is
> > active unsigned long rrs[8]; // region registers
> > unsigned long krs[8]; // kernel registers
> > +#if !defined(CONFIG_XEN_IA64_USE_PKR)
> > unsigned long pkrs[8]; // protection key registers
> > +#endif
> > unsigned long tmp[8]; // temp registers (e.g. for
> > hyperprivops) };
> > };
>
> struct mapped_regs is a part of ABI beween hypervisor and guest os
> so that the layout shouldn't be changed depending on configuration.
I had to remove this '#if !defined ...' I did this only for me to avoid
confusion (and maybe wrong usage) because of the same name in mapped_regs and
arch_vcpu.
> Since there is no user of pkrs currently, eliminating pkrs[8]; or
> replacing pkrs[8];tmp[8]; with tmp[16]; or somethine like that
> would be fine.
>
> > A later step would be:
> > 8. extend the hyperprivops with setting protection key registers.
>
> I'm not sure how you want to update pkrs and its performance
> impact, though.
> If you want to paravirtualize pkrs related operation, would it be
> convinient to place pkrs[] in struct mapped_regs?
> Then guest OS can read/write the value without vmm intervention.
> Off course after updating those values it is necessary to call
> VMM to commit it.
Maybe this would be a better solution.
But before doing this we should discuss the following problem.
If the domU writes 2 or more pkr's and than calls the hypervisor to update the
cpu-pkrs we have the problem, how do we handle the order of setting the
cpu-pkr's (the setting of a pkr invalidates the other pkr's with the same key
but maybe other access rights).
This problem is still unsolved with my current patch.
Should the domU knows what it is doing or should we implement the correct
mechanism in the hypervisor?
Thanks.
Dietmar.
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|
|
|
|
|