All of lore.kernel.org
 help / color / mirror / Atom feed
* PV guest + shadow paging
@ 2007-07-26 22:32 Levin Johnson
  0 siblings, 0 replies; 18+ messages in thread
From: Levin Johnson @ 2007-07-26 22:32 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/html, Size: 1034 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* PV guest + shadow paging
@ 2007-07-27 15:54 Levin Johnson
  0 siblings, 0 replies; 18+ messages in thread
From: Levin Johnson @ 2007-07-27 15:54 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/html, Size: 1052 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* PV guest + shadow paging
@ 2007-07-27 19:12 Levin Johnson
  0 siblings, 0 replies; 18+ messages in thread
From: Levin Johnson @ 2007-07-27 19:12 UTC (permalink / raw)
  To: xen-devel; +Cc: levin.johnson

[-- Attachment #1: Type: text/html, Size: 762 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* PV guest + shadow paging
@ 2007-07-28 15:58 Levin Johnson
  2007-07-29 21:38 ` Ian Pratt
  0 siblings, 1 reply; 18+ messages in thread
From: Levin Johnson @ 2007-07-28 15:58 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/html, Size: 744 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: PV guest + shadow paging
  2007-07-28 15:58 PV guest + shadow paging Levin Johnson
@ 2007-07-29 21:38 ` Ian Pratt
  2007-07-30  6:34   ` Ian Campbell
  0 siblings, 1 reply; 18+ messages in thread
From: Ian Pratt @ 2007-07-29 21:38 UTC (permalink / raw)
  To: Levin Johnson, xen-devel

[-- Attachment #1: Type: text/plain, Size: 836 bytes --]

> In a PV guest, shadow paging is used for logging dirty pages during
> live
> migration. For a HVM guest, it's enabled all the time due to full
> virtualization.
> 
> Does the current version of Xen support running a PV guest with shadow
> paging enabled all the time ? If so, will it work if I just put
> "shadow_memory = 8"
> in the cfg file ?

During live relocation of PV guests, shadow mode is used to log dirty page accesses, but its not used to do address translation. It is possible to get PV guests running in 'auto translate mode', but I'm not sure it can be done via the guest config file. Since this mode is typically only used by various research projects its possible that support has rotted. Look for any references to auto translate mode in the domain builder for clues as to how to enable it.

Ian


 

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: PV guest + shadow paging
  2007-07-29 21:38 ` Ian Pratt
@ 2007-07-30  6:34   ` Ian Campbell
  2007-07-30  8:15     ` Tim Deegan
  0 siblings, 1 reply; 18+ messages in thread
From: Ian Campbell @ 2007-07-30  6:34 UTC (permalink / raw)
  To: Ian Pratt; +Cc: Levin Johnson, xen-devel

On Sun, 2007-07-29 at 22:38 +0100, Ian Pratt wrote:
> > In a PV guest, shadow paging is used for logging dirty pages during
> > live
> > migration. For a HVM guest, it's enabled all the time due to full
> > virtualization.
> > 
> > Does the current version of Xen support running a PV guest with shadow
> > paging enabled all the time ? If so, will it work if I just put
> > "shadow_memory = 8"
> > in the cfg file ?
> 
> During live relocation of PV guests, shadow mode is used to log dirty
> page accesses, but its not used to do address translation. It is
> possible to get PV guests running in 'auto translate mode', but I'm 
> not sure it can be done via the guest config file. Since this mode is
> typically only used by various research projects its possible that
> support has rotted. Look for any references to auto translate mode in
> the domain builder for clues as to how to enable it.

Adding
        features = "auto_translated_physmap|writable_page_tables"
to the config file should add those features to the set passed to the
guest. I can't remember which set you would need to enable shadow mode,
you may have to dig round in the builder and/or hypervisor to figure it
out.

However I'm not sure shadow mode (other than log-dirty) isn't broken for
PV guests. It's been a long time since I tried it but it was broken back
when the paravirt_ops tree was still trying to use it.

Ian.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: PV guest + shadow paging
  2007-07-30  6:34   ` Ian Campbell
@ 2007-07-30  8:15     ` Tim Deegan
  2007-10-22 11:01       ` tgh
  0 siblings, 1 reply; 18+ messages in thread
From: Tim Deegan @ 2007-07-30  8:15 UTC (permalink / raw)
  To: Ian Campbell; +Cc: Ian Pratt, xen-devel, Levin Johnson

At 07:34 +0100 on 30 Jul (1185780899), Ian Campbell wrote:
> Adding
>         features = "auto_translated_physmap|writable_page_tables"
> to the config file should add those features to the set passed to the
> guest. I can't remember which set you would need to enable shadow mode,
> you may have to dig round in the builder and/or hypervisor to figure it
> out.

IIRC, "auto_translated_physmap" turns on both shadow mode and
auto-translation.  You could enable just the shadowing without the
auto-translation by changing tools/libxc/xc_dom_x86.c to remove
XEN_DOMCTL_SHADOW_ENABLE_TRANSLATE from the "mode" argument to
xc_shadow_control().

> However I'm not sure shadow mode (other than log-dirty) isn't broken for
> PV guests. It's been a long time since I tried it but it was broken back
> when the paravirt_ops tree was still trying to use it.

Auto-translate was (briefly) fixed at that time too, but I'm quite sure
it doesn't work in the current tree.  Some people had this kind of thing
going for academic research projects; maybe one of them can comment.

Cheers,

Tim.

-- 
Tim Deegan <Tim.Deegan@xensource.com>, XenSource UK Limited
Registered office c/o EC2Y 5EB, UK; company number 05334508

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: PV guest + shadow paging
  2007-07-30  8:15     ` Tim Deegan
@ 2007-10-22 11:01       ` tgh
  2007-10-22 11:20         ` Tim Deegan
  0 siblings, 1 reply; 18+ messages in thread
From: tgh @ 2007-10-22 11:01 UTC (permalink / raw)
  To: Tim Deegan, Ian Campbell, Ian Pratt; +Cc: xen-devel, Levin Johnson

hi
what is the auto_translated_physmap ?how does it work?and what about 
other mechanisms and how many mechanisms for paging are there in xen ?

Thank you in advance


Tim Deegan 写道:
> At 07:34 +0100 on 30 Jul (1185780899), Ian Campbell wrote:
>   
>> Adding
>>         features = "auto_translated_physmap|writable_page_tables"
>> to the config file should add those features to the set passed to the
>> guest. I can't remember which set you would need to enable shadow mode,
>> you may have to dig round in the builder and/or hypervisor to figure it
>> out.
>>     
>
> IIRC, "auto_translated_physmap" turns on both shadow mode and
> auto-translation.  You could enable just the shadowing without the
> auto-translation by changing tools/libxc/xc_dom_x86.c to remove
> XEN_DOMCTL_SHADOW_ENABLE_TRANSLATE from the "mode" argument to
> xc_shadow_control().
>
>   
>> However I'm not sure shadow mode (other than log-dirty) isn't broken for
>> PV guests. It's been a long time since I tried it but it was broken back
>> when the paravirt_ops tree was still trying to use it.
>>     
>
> Auto-translate was (briefly) fixed at that time too, but I'm quite sure
> it doesn't work in the current tree.  Some people had this kind of thing
> going for academic research projects; maybe one of them can comment.
>
> Cheers,
>
> Tim.
>
>   

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: PV guest + shadow paging
  2007-10-22 11:01       ` tgh
@ 2007-10-22 11:20         ` Tim Deegan
  2007-10-22 12:01           ` Samuel Thibault
  2007-10-24  4:32           ` Jeremy Fitzhardinge
  0 siblings, 2 replies; 18+ messages in thread
From: Tim Deegan @ 2007-10-22 11:20 UTC (permalink / raw)
  To: tgh; +Cc: Ian Pratt, Levin Johnson, xen-devel, Ian Campbell

Hi,

At 19:01 +0800 on 22 Oct (1193079674), tgh wrote:
> what is the auto_translated_physmap ?

A shadow pagetable mode where Xen does the translation between
guest-physical and machine-physical addresses for PV guests.  Normally
PV guests do that translation themselves, because it's faster, and Xen
does it for HVM guests because they can't do it themseves.

> how does it work?

It doesn't, at least not in xen-unstable.  As I said, I believe some
research projects have it working in their own trees because it's useful
for things like deterministic replay of guest execution.

> and what about 
> other mechanisms and how many mechanisms for paging are there in xen ?

Plenty.  There are between two and eighteen shadow modes, depending on
how you'd like to count them, hardware support for using two sets of
pagetables at once, normal PV guest paging, writeable pagetables, grant
tables for letting one guest see another guest's pages, and IOMMU
support for paging DMA.  Probably one or two more in there somewhere.

Tim.

-- 
Tim Deegan <Tim.Deegan@xensource.com>, XenSource UK Limited
Registered office c/o EC2Y 5EB, UK; company number 05334508

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: PV guest + shadow paging
  2007-10-22 11:20         ` Tim Deegan
@ 2007-10-22 12:01           ` Samuel Thibault
  2007-10-23 15:13             ` Mark Williamson
  2007-10-24  4:32           ` Jeremy Fitzhardinge
  1 sibling, 1 reply; 18+ messages in thread
From: Samuel Thibault @ 2007-10-22 12:01 UTC (permalink / raw)
  To: Tim Deegan; +Cc: Ian Campbell, Ian Pratt, Levin Johnson, xen-devel

Hi,

Tim Deegan, le Mon 22 Oct 2007 12:20:48 +0100, a écrit :
> At 19:01 +0800 on 22 Oct (1193079674), tgh wrote:
> > what is the auto_translated_physmap ?
> 
> A shadow pagetable mode where Xen does the translation between
> guest-physical and machine-physical addresses for PV guests.  Normally
> PV guests do that translation themselves, because it's faster, and Xen
> does it for HVM guests because they can't do it themseves.

It can be useful too for PV guests that don't (want to) support PAE.

Samuel

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: PV guest + shadow paging
  2007-10-22 12:01           ` Samuel Thibault
@ 2007-10-23 15:13             ` Mark Williamson
  0 siblings, 0 replies; 18+ messages in thread
From: Mark Williamson @ 2007-10-23 15:13 UTC (permalink / raw)
  To: xen-devel
  Cc: Samuel Thibault, Tim Deegan, Ian Pratt, Levin Johnson,
	Ian Campbell

> > A shadow pagetable mode where Xen does the translation between
> > guest-physical and machine-physical addresses for PV guests.  Normally
> > PV guests do that translation themselves, because it's faster, and Xen
> > does it for HVM guests because they can't do it themseves.
>
> It can be useful too for PV guests that don't (want to) support PAE.

Are there any patches to allow this?  I would find it quite useful.  I've had 
the impression that most of the moving parts are already there but there's 
not been sufficient impetus to tie them all together?

Cheers,
Mark

-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: PV guest + shadow paging
  2007-10-22 11:20         ` Tim Deegan
  2007-10-22 12:01           ` Samuel Thibault
@ 2007-10-24  4:32           ` Jeremy Fitzhardinge
  2007-10-24  8:21             ` Tim Deegan
  1 sibling, 1 reply; 18+ messages in thread
From: Jeremy Fitzhardinge @ 2007-10-24  4:32 UTC (permalink / raw)
  To: Tim Deegan; +Cc: Ian Campbell, Ian Pratt, Levin Johnson, xen-devel

Tim Deegan wrote:
> A shadow pagetable mode where Xen does the translation between
> guest-physical and machine-physical addresses for PV guests.  Normally
> PV guests do that translation themselves, because it's faster, and Xen
> does it for HVM guests because they can't do it themseves.
>   

I think we'll need it to take advantage of NPT/EPT though, right?

    J

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: PV guest + shadow paging
  2007-10-24  4:32           ` Jeremy Fitzhardinge
@ 2007-10-24  8:21             ` Tim Deegan
  2007-10-24 10:00               ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 18+ messages in thread
From: Tim Deegan @ 2007-10-24  8:21 UTC (permalink / raw)
  To: Jeremy Fitzhardinge; +Cc: Ian Campbell, Ian Pratt, Levin Johnson, xen-devel

At 21:32 -0700 on 23 Oct (1193175163), Jeremy Fitzhardinge wrote:
> Tim Deegan wrote:
> > A shadow pagetable mode where Xen does the translation between
> > guest-physical and machine-physical addresses for PV guests.  Normally
> > PV guests do that translation themselves, because it's faster, and Xen
> > does it for HVM guests because they can't do it themseves.
> >   
> 
> I think we'll need it to take advantage of NPT/EPT though, right?

The joy of NPT(VMI?)/EPT is that you don't need shadow pagetables at
all. :)

Tim.

-- 
Tim Deegan <Tim.Deegan@xensource.com>, XenSource UK Limited
Registered office c/o EC2Y 5EB, UK; company number 05334508

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: PV guest + shadow paging
  2007-10-24  8:21             ` Tim Deegan
@ 2007-10-24 10:00               ` Jeremy Fitzhardinge
  2007-10-24 10:05                 ` Keir Fraser
  0 siblings, 1 reply; 18+ messages in thread
From: Jeremy Fitzhardinge @ 2007-10-24 10:00 UTC (permalink / raw)
  To: Tim Deegan; +Cc: Ian Campbell, Ian Pratt, Levin Johnson, xen-devel

Tim Deegan wrote:
> The joy of NPT(VMI?)/EPT is that you don't need shadow pagetables at
> all. :)
>   

Sure, but from a guest interface perspective they look the same.

    J

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: PV guest + shadow paging
  2007-10-24 10:00               ` Jeremy Fitzhardinge
@ 2007-10-24 10:05                 ` Keir Fraser
  2007-10-24 18:59                   ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 18+ messages in thread
From: Keir Fraser @ 2007-10-24 10:05 UTC (permalink / raw)
  To: Jeremy Fitzhardinge, Tim Deegan
  Cc: Ian Pratt, Levin Johnson, xen-devel, Ian Campbell

On 24/10/07 11:00, "Jeremy Fitzhardinge" <jeremy@goop.org> wrote:

> Tim Deegan wrote:
>> The joy of NPT(VMI?)/EPT is that you don't need shadow pagetables at
>> all. :)
>>   
> 
> Sure, but from a guest interface perspective they look the same.

Would you want to take advantage of NPT/EPT once you've pv'ed your mmu
interfaces?

 -- Keir

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: PV guest + shadow paging
  2007-10-24 10:05                 ` Keir Fraser
@ 2007-10-24 18:59                   ` Jeremy Fitzhardinge
  2007-10-24 20:39                     ` Nakajima, Jun
  0 siblings, 1 reply; 18+ messages in thread
From: Jeremy Fitzhardinge @ 2007-10-24 18:59 UTC (permalink / raw)
  To: Keir Fraser; +Cc: Tim Deegan, Ian Pratt, xen-devel, Levin Johnson, Ian Campbell

Keir Fraser wrote:
> On 24/10/07 11:00, "Jeremy Fitzhardinge" <jeremy@goop.org> wrote:
>
>   
>> Tim Deegan wrote:
>>     
>>> The joy of NPT(VMI?)/EPT is that you don't need shadow pagetables at
>>> all. :)
>>>   
>>>       
>> Sure, but from a guest interface perspective they look the same.
>>     
>
> Would you want to take advantage of NPT/EPT once you've pv'ed your mmu
> interfaces?
>   

I think so.  NPT/EPT would seem to have all the advantages of shadow
paging and direct paging without the disadvantages.  We would avoid
taking faults/hypercalls on pagetable updates, and have the secondary
benefit of not needing to worry about page permissions on pagetables,
making it easier to use superpages for the kernel and in general. 
Perhaps the initial implementations will be sufficiently poor that it
isn't worth doing now, but I think it will in time.

    J

^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: PV guest + shadow paging
  2007-10-24 18:59                   ` Jeremy Fitzhardinge
@ 2007-10-24 20:39                     ` Nakajima, Jun
  2007-10-24 21:47                       ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 18+ messages in thread
From: Nakajima, Jun @ 2007-10-24 20:39 UTC (permalink / raw)
  To: Jeremy Fitzhardinge, Keir Fraser
  Cc: Ian Campbell, Tim Deegan, Ian Pratt, xen-devel, Levin Johnson

Jeremy Fitzhardinge wrote:
> Keir Fraser wrote:
> > On 24/10/07 11:00, "Jeremy Fitzhardinge" <jeremy@goop.org> wrote:
> > 
> > 
> > > Tim Deegan wrote:
> > > 
> > > > The joy of NPT(VMI?)/EPT is that you don't need shadow
pagetables at
> > > > all. :) 
> > > > 
> > > > 
> > > Sure, but from a guest interface perspective they look the same.
> > > 
> > 
> > Would you want to take advantage of NPT/EPT once you've pv'ed your
mmu
> > interfaces? 
> > 
> 
> I think so.  NPT/EPT would seem to have all the advantages of shadow
> paging and direct paging without the disadvantages.  We would avoid
> taking faults/hypercalls on pagetable updates, and have the secondary
> benefit of not needing to worry about page permissions on pagetables,
> making it easier to use superpages for the kernel and in general.
> Perhaps the initial implementations will be sufficiently poor that it
> isn't worth doing now, but I think it will in time.
> 
>     J

Well, then you need to run those in HVM domains ;-)


Jun
---
Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: PV guest + shadow paging
  2007-10-24 20:39                     ` Nakajima, Jun
@ 2007-10-24 21:47                       ` Jeremy Fitzhardinge
  0 siblings, 0 replies; 18+ messages in thread
From: Jeremy Fitzhardinge @ 2007-10-24 21:47 UTC (permalink / raw)
  To: Nakajima, Jun
  Cc: Ian Pratt, Ian Campbell, Tim Deegan, xen-devel, Levin Johnson

Nakajima, Jun wrote:
> Well, then you need to run those in HVM domains ;-)

Sure, but they can be a PV HVM domain.

J

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2007-10-24 21:47 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-28 15:58 PV guest + shadow paging Levin Johnson
2007-07-29 21:38 ` Ian Pratt
2007-07-30  6:34   ` Ian Campbell
2007-07-30  8:15     ` Tim Deegan
2007-10-22 11:01       ` tgh
2007-10-22 11:20         ` Tim Deegan
2007-10-22 12:01           ` Samuel Thibault
2007-10-23 15:13             ` Mark Williamson
2007-10-24  4:32           ` Jeremy Fitzhardinge
2007-10-24  8:21             ` Tim Deegan
2007-10-24 10:00               ` Jeremy Fitzhardinge
2007-10-24 10:05                 ` Keir Fraser
2007-10-24 18:59                   ` Jeremy Fitzhardinge
2007-10-24 20:39                     ` Nakajima, Jun
2007-10-24 21:47                       ` Jeremy Fitzhardinge
  -- strict thread matches above, loose matches on Subject: below --
2007-07-27 19:12 Levin Johnson
2007-07-27 15:54 Levin Johnson
2007-07-26 22:32 Levin Johnson

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.