Skip to contentSkip to conversation

HYBRID: set_page_prot() (make pte readonly)

DISCUSSION Mukesh Rathor 3 participants 8 messages Oct 7, 2011

lore
Share & tools
lore
#0 lore raw

Hi Jeremy,

This for my hybrid, PV in HVM container with EPT. With EPT, I don't have the guest going to xen for any va_mapping, and only dealing with pfn's.

So, I'm at a loss on how to make set_page_prot() work during xen_map_identity_early(). I tried few things, but no luck. The fixmap is not setup during this time, so can't use that.

Have any ideas?

thanks,
Mukesh

#1 lore raw
Quoted 3 lines · Mukesh Rathor

Hi Jeremy,

This for my hybrid, PV in HVM container with EPT.

Do you have something functional without EPT? I appreciate that this is just a stepping stone to the final functionality but it might be worth starting to post those patches? It would be a useful baseline for others to start looking at additional features/optimisations on top of etc.

Quoted 3 lines

With EPT, I don't
have the guest going to xen for any va_mapping, and only dealing with pfn's.

Do you do this by stubbing out the hypercalls (e.g. via a VDSO type thing in guest address space) or are you cutting off the PV MMU stuff at start of day using XENFEAT_autotranslated_physmap and/or XENFEAT_writeable_*? Or some other option?

Quoted 3 lines

So, I'm at a loss on how to make set_page_prot() work during xen_map_identity_early(). I tried few things, but no luck. The fixmap is not setup during this time, so can't use that.

You can just omit it altogether if XENFEAT_writeable_pagetables is set?

Ian.

Quoted 10 lines

Have any ideas?

thanks,
Mukesh

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#6 lore raw
In reply to Mukesh Rathor
Quoted 5 lines · Mukesh Rathor

So, I'm at a loss on how to make set_page_prot() work during xen_map_identity_early(). I tried few things, but no luck. The fixmap is not setup during this time, so can't use that.

Have any ideas?

Why do you need set_page_prot() at all? It's only being used to mark pagetable entries RO, but you presumably don't need to do that with EPT.

J

#2 lore raw
In reply to Ian Campbell
Quoted 5 lines · On Fri, 7 Oct 2011 08:58:09 +0100 Ian Campbell <[email protected]> wrote:

Do you have something functional without EPT? I appreciate that this is just a stepping stone to the final functionality but it might be worth starting to post those patches? It would be a useful baseline for others to start looking at additional features/optimisations on top of etc.

Hi Ian,

Please see my previous posts with patches attached for hybrid without EPT. Search for HYBRID in subject.

Quoted 4 lines

Do you do this by stubbing out the hypercalls (e.g. via a VDSO type thing in guest address space) or are you cutting off the PV MMU stuff at start of day using XENFEAT_autotranslated_physmap and/or XENFEAT_writeable_*? Or some other option?

I'm cutting off PV MMU stuff with XENFEAT_auto_translated_physmap.

Quoted 6 lines
Quoted 3 lines

So, I'm at a loss on how to make set_page_prot() work during xen_map_identity_early(). I tried few things, but no luck. The fixmap is not setup during this time, so can't use that.

You can just omit it altogether if XENFEAT_writeable_pagetables is set?

Right.

thanks,
Mukesh

#7 lore raw
In reply to Jeremy Fitzhardinge
Quoted 5 lines · On Fri, 07 Oct 2011 08:46:52 -0700 Jeremy Fitzhardinge <[email protected]> wrote:
Quoted 4 lines · Mukesh Rathor

So, I'm at a loss on how to make set_page_prot() work during xen_map_identity_early(). I tried few things, but no luck. The fixmap is not setup during this time, so can't use that.

Quoted 7 lines
Quoted 1 line

Have any ideas?

Why do you need set_page_prot() at all? It's only being used to mark pagetable entries RO, but you presumably don't need to do that with EPT.

J

Yes, you are right, with EPT I wouldn't need to do that.

thanks
Mukesh

#3 lore raw
In reply to Mukesh Rathor
Quoted 9 lines · Mukesh Rathor
Quoted 5 lines · On Fri, 7 Oct 2011 08:58:09 +0100 Ian Campbell <[email protected]> wrote:

Do you have something functional without EPT? I appreciate that this is just a stepping stone to the final functionality but it might be worth starting to post those patches? It would be a useful baseline for others to start looking at additional features/optimisations on top of etc.

Quoted 4 lines

Hi Ian,

Please see my previous posts with patches attached for hybrid without EPT. Search for HYBRID in subject.

I remember the WIP diffs from back in July, have there been others since then? I guess I was thinking more along the lines of beginning to post this new feature as a patch series for review or something like that.

Ian.

#4 lore raw
Quoted 12 lines · On Fri, 7 Oct 2011 19:23:00 +0100 Ian Campbell <[email protected]> wrote:
Quoted 11 lines · Mukesh Rathor
Quoted 5 lines · On Fri, 7 Oct 2011 08:58:09 +0100 Ian Campbell <[email protected]> wrote:

Do you have something functional without EPT? I appreciate that this is just a stepping stone to the final functionality but it might be worth starting to post those patches? It would be a useful baseline for others to start looking at additional features/optimisations on top of etc.

Hi Ian,

Quoted 7 lines
Quoted 2 lines

Please see my previous posts with patches attached for hybrid without EPT. Search for HYBRID in subject.

I remember the WIP diffs from back in July, have there been others since then? I guess I was thinking more along the lines of beginning to post this new feature as a patch series for review or something like that.

No, I'm just doing the prototype which allows me to learn the stuff at the same time. Once I've my prototype working, I'll post patches and be able to understand comments/feedback better.

Mukesh

#5 lore raw
Quoted 18 lines · Mukesh Rathor
Quoted 15 lines · On Fri, 7 Oct 2011 19:23:00 +0100 Ian Campbell <[email protected]> wrote:
Quoted 13 lines · Mukesh Rathor
Quoted 5 lines · On Fri, 7 Oct 2011 08:58:09 +0100 Ian Campbell <[email protected]> wrote:

Do you have something functional without EPT? I appreciate that this is just a stepping stone to the final functionality but it might be worth starting to post those patches? It would be a useful baseline for others to start looking at additional features/optimisations on top of etc.

Hi Ian,

Please see my previous posts with patches attached for hybrid without EPT. Search for HYBRID in subject.

Quoted 8 lines
Quoted 4 lines

I remember the WIP diffs from back in July, have there been others since then? I guess I was thinking more along the lines of beginning to post this new feature as a patch series for review or something like that.

No, I'm just doing the prototype which allows me to learn the stuff at the same time. Once I've my prototype working, I'll post patches and be able to understand comments/feedback better.

OK, thanks!

Ian.