From: Ed White <edmund.h.white@intel.com>
To: "Lengyel, Tamas" <tlengyel@novetta.com>
Cc: Ravi Sahita <ravi.sahita@intel.com>,
Wei Liu <wei.liu2@citrix.com>,
Razvan Cojocaru <rcojocaru@bitdefender.com>,
Tim Deegan <tim@xen.org>, Ian Jackson <ian.jackson@eu.citrix.com>,
Xen-devel <xen-devel@lists.xen.org>,
Jan Beulich <jbeulich@suse.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Daniel De Graaf <dgdegra@tycho.nsa.gov>
Subject: Re: [PATCH v2 00/12] Alternate p2m: support multiple copies of host p2m
Date: Wed, 24 Jun 2015 15:55:31 -0700 [thread overview]
Message-ID: <558B3563.9070402@intel.com> (raw)
In-Reply-To: <CAD33N+4WW7cHzLGSHh7LAXmJeTJrTFj--wa-vXnron94WMPLUA@mail.gmail.com>
On 06/24/2015 03:45 PM, Lengyel, Tamas wrote:
> On Wed, Jun 24, 2015 at 6:02 PM, Ed White <edmund.h.white@intel.com> wrote:
>
>> On 06/24/2015 02:34 PM, Lengyel, Tamas wrote:
>>> Hi Ed,
>>> I tried the system using memsharing and I collected the following crash
>>> log. In this test I ran memsharing on all pages of the domain before
>>> activating altp2m and creating the view. Afterwards I used my updated
>>> xen-access to create a copy of this p2m with only R/X permissions. The
>> idea
>>> would be that the altp2m view remains completely shared, while the
>> hostp2m
>>> would be able to do its CoW propagation as the domain is executing.
>>>
>>> (XEN) mm locking order violation: 278 > 239
>>> (XEN) Xen BUG at mm-locks.h:68
>>> (XEN) ----[ Xen-4.6-unstable x86_64 debug=y Tainted: C ]----
>>> (XEN) CPU: 2
>>> (XEN) RIP: e008:[<ffff82d0801f8768>]
>>> p2m_altp2m_propagate_change+0x85/0x4a9
>>> (XEN) RFLAGS: 0000000000010282 CONTEXT: hypervisor (d6v0)
>>> (XEN) rax: 0000000000000000 rbx: 0000000000000000 rcx:
>> 0000000000000000
>>> (XEN) rdx: ffff8302163a8000 rsi: 000000000000000a rdi:
>> ffff82d0802a069c
>>> (XEN) rbp: ffff8302163afa68 rsp: ffff8302163af9e8 r8:
>> ffff83021c000000
>>> (XEN) r9: 0000000000000003 r10: 00000000000000ef r11:
>> 0000000000000003
>>> (XEN) r12: ffff83010cc51820 r13: 0000000000000000 r14:
>> ffff830158d90000
>>> (XEN) r15: 0000000000025697 cr0: 0000000080050033 cr4:
>> 00000000001526f0
>>> (XEN) cr3: 00000000dbba3000 cr2: 00000000778c9714
>>> (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: e008
>>> (XEN) Xen stack trace from rsp=ffff8302163af9e8:
>>> (XEN) ffff8302163af9f8 00000000803180f8 000000000000000c
>> ffff82d0801892ee
>>> (XEN) ffff82d0801fb4d1 ffff83010cc51de0 000000000008ff49
>> ffff82d08012f86a
>>> (XEN) ffff83010cc51820 ffff83010cc51820 0000000000000000
>> 0000000000000000
>>> (XEN) ffff83010cc51820 0000000000000000 ffff8300dbb334b8
>> ffff8302163afa00
>>> (XEN) ffff8302163afb18 ffff82d0801fd549 0000000500000009
>> ffff830200000001
>>> (XEN) 0000000000000001 ffff830158d90000 0000000000000002
>> 000000000008ff49
>>> (XEN) 0000000000025697 000000000000000c ffff8302163afae8
>> 80c000008ff49175
>>> (XEN) 80c00000d0a97175 01ff83010cc51820 0000000000000097
>> ffff8300dbb33000
>>> (XEN) ffff8302163afb78 000000000008ff49 0000000000000000
>> 0000000000000001
>>> (XEN) 0000000000025697 ffff83010cc51820 ffff8302163afb38
>> ffff82d0801fd644
>>> (XEN) ffffffffffffffff 00000000000d0a97 ffff8302163afb98
>> ffff82d0801f23c5
>>> (XEN) ffff830158d90000 000000000cc51820 ffff830158d90000
>> 000000000000000c
>>> (XEN) 000000000008ff49 ffff83010cc51820 0000000000025697
>> 00000000000d0a97
>>> (XEN) 000000000008ff49 ffff830158d90000 ffff8302163afbd8
>> ffff82d0801f45c8
>>> (XEN) ffff83010cc51820 000000000000000c ffff83008fd41170
>> 000000000008ff49
>>> (XEN) 0000000000025697 ffff82e001a152e0 ffff8302163afc58
>> ffff82d080205b51
>>> (XEN) 0000000000000009 000000000008ff49 ffff8300d0a97000
>> ffff83008fd41160
>>> (XEN) ffff82e001a152f0 ffff82e0011fe920 ffff83010cc51820
>> 0000000c00000000
>>> (XEN) 0000000000025697 0000000000000003 ffff83010cc51820
>> ffff8302163afd34
>>> (XEN) 0000000000025697 0000000000000000 ffff8302163afca8
>> ffff82d0801f1f7d
>>> (XEN) Xen call trace:
>>> (XEN) [<ffff82d0801f8768>] p2m_altp2m_propagate_change+0x85/0x4a9
>>> (XEN) [<ffff82d0801fd549>] ept_set_entry_sve+0x5fa/0x6e6
>>> (XEN) [<ffff82d0801fd644>] ept_set_entry+0xf/0x11
>>> (XEN) [<ffff82d0801f23c5>] p2m_set_entry+0xd4/0x112
>>> (XEN) [<ffff82d0801f45c8>] set_shared_p2m_entry+0x2d0/0x39b
>>> (XEN) [<ffff82d080205b51>] __mem_sharing_unshare_page+0x83f/0xbd6
>>> (XEN) [<ffff82d0801f1f7d>] __get_gfn_type_access+0x224/0x2b0
>>> (XEN) [<ffff82d0801c6df5>] hvm_hap_nested_page_fault+0x21f/0x795
>>> (XEN) [<ffff82d0801e86ae>] vmx_vmexit_handler+0x1764/0x1af3
>>> (XEN) [<ffff82d0801ee891>] vmx_asm_vmexit_handler+0x41/0xc0
>>
>> The crash here is because I haven't successfully forced all the shared
>> pages in the host p2m to become unshared before copying,
>> which is the intended behaviour.
>>
>> I think I know how that has happened and how to fix it, but what you're
>> trying to do won't work by design. By the time a copy from host p2m to
>> altp2m occurs, the sharing is supposed to be broken.
>>
>
> Hm. If the sharing gets broken before the hostp2m->altp2m copy, maybe doing
> sharing after the view has been created is a better route? I guess the
> sharing code would need to be adapted to check if altp2m is enabled for
> that to work..
>
>
>>
>> You're coming up with some ways of attempting to use altp2m that we
>> hadn't thought of. That's a good thing, and just what we want, but
>> there are limits to what we can support without more far-reaching
>> changes to existing parts of Xen. This isn't going to be do-able for
>> 4.6.
>>
>
> My main concern is just getting it to work, hitting 4.6 is not a priority.
> I understand that my stuff is highly experimental ;) While the gfn
> remapping feature is intriguing, in my setup I already have a copy of the
> page I would want to present during a singlestep-altp2mswitch - in the
> origin domains memory. AFAIU the gfn remapping would work only within the
> domains existing p2m space.
Understood, but for us hitting 4.6 with the initial version of altp2m
is *the* priority. And yes, remapping is restricted to pages from the
same host p2m.
Ed
next prev parent reply other threads:[~2015-06-24 22:55 UTC|newest]
Thread overview: 116+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-22 18:56 [PATCH v2 00/12] Alternate p2m: support multiple copies of host p2m Ed White
2015-06-22 18:56 ` [PATCH v2 01/12] VMX: VMFUNC and #VE definitions and detection Ed White
2015-06-24 8:45 ` Andrew Cooper
2015-06-22 18:56 ` [PATCH v2 02/12] VMX: implement suppress #VE Ed White
2015-06-24 9:35 ` Andrew Cooper
2015-06-29 14:20 ` George Dunlap
2015-06-29 14:31 ` Andrew Cooper
2015-06-29 15:03 ` George Dunlap
2015-06-29 16:21 ` Sahita, Ravi
2015-06-29 16:21 ` Ed White
2015-06-22 18:56 ` [PATCH v2 03/12] x86/HVM: Hardware alternate p2m support detection Ed White
2015-06-24 9:44 ` Andrew Cooper
2015-06-24 10:07 ` Jan Beulich
2015-06-22 18:56 ` [PATCH v2 04/12] x86/altp2m: basic data structures and support routines Ed White
2015-06-24 10:06 ` Andrew Cooper
2015-06-24 10:23 ` Jan Beulich
2015-06-24 17:20 ` Ed White
2015-06-24 10:29 ` Andrew Cooper
2015-06-24 11:14 ` Andrew Cooper
2015-06-26 21:17 ` Ed White
2015-06-27 19:25 ` Ed White
2015-06-29 13:00 ` Andrew Cooper
2015-06-29 16:23 ` Ed White
2015-06-24 14:44 ` Jan Beulich
2015-06-22 18:56 ` [PATCH v2 05/12] VMX/altp2m: add code to support EPTP switching and #VE Ed White
2015-06-24 11:59 ` Andrew Cooper
2015-06-24 17:31 ` Ed White
2015-06-24 17:40 ` Andrew Cooper
2015-06-22 18:56 ` [PATCH v2 06/12] VMX: add VMFUNC leaf 0 (EPTP switching) to emulator Ed White
2015-06-24 12:47 ` Andrew Cooper
2015-06-24 20:29 ` Ed White
2015-06-25 8:26 ` Jan Beulich
2015-06-24 14:26 ` Jan Beulich
2015-06-22 18:56 ` [PATCH v2 07/12] x86/altp2m: add control of suppress_ve Ed White
2015-06-24 13:05 ` Andrew Cooper
2015-06-24 14:38 ` Jan Beulich
2015-06-24 17:53 ` Ed White
2015-06-25 8:12 ` Jan Beulich
2015-06-25 16:36 ` Ed White
2015-06-26 6:04 ` Jan Beulich
2015-06-26 16:27 ` Ed White
2015-07-06 17:12 ` George Dunlap
2015-07-06 17:35 ` Ed White
2015-07-06 18:29 ` George Dunlap
2015-07-06 18:43 ` Ed White
2015-07-07 10:10 ` George Dunlap
2015-07-07 16:24 ` Ed White
2015-07-07 17:33 ` George Dunlap
2015-07-07 17:38 ` Sahita, Ravi
2015-07-08 7:24 ` Jan Beulich
2015-07-08 10:12 ` Tim Deegan
2015-07-08 12:51 ` George Dunlap
2015-07-08 7:23 ` Jan Beulich
2015-07-07 8:04 ` Jan Beulich
2015-06-22 18:56 ` [PATCH v2 08/12] x86/altp2m: alternate p2m memory events Ed White
2015-06-24 13:09 ` Andrew Cooper
2015-06-24 16:01 ` Lengyel, Tamas
2015-06-24 18:02 ` Ed White
2015-06-22 18:56 ` [PATCH v2 09/12] x86/altp2m: add remaining support routines Ed White
2015-06-23 18:15 ` Lengyel, Tamas
2015-06-23 18:52 ` Ed White
2015-06-23 19:35 ` Lengyel, Tamas
2015-06-24 13:46 ` Andrew Cooper
2015-06-24 17:47 ` Ed White
2015-06-24 18:19 ` Andrew Cooper
2015-06-26 16:30 ` Ed White
2015-06-29 13:03 ` Andrew Cooper
2015-06-29 16:24 ` Ed White
2015-06-24 16:15 ` Lengyel, Tamas
2015-06-24 18:06 ` Ed White
2015-06-25 8:52 ` Ian Campbell
2015-06-25 16:27 ` Ed White
2015-06-25 12:44 ` Lengyel, Tamas
2015-06-25 13:40 ` Razvan Cojocaru
2015-06-25 16:48 ` Ed White
2015-06-25 17:39 ` Sahita, Ravi
2015-06-25 18:22 ` Razvan Cojocaru
2015-06-25 18:23 ` Lengyel, Tamas
2015-06-25 20:46 ` Ed White
2015-06-25 22:45 ` Lengyel, Tamas
2015-06-25 23:10 ` Ed White
2015-06-25 2:44 ` Lengyel, Tamas
2015-06-25 16:31 ` Ed White
2015-06-25 17:42 ` Lengyel, Tamas
2015-06-25 20:27 ` Ed White
2015-06-25 21:33 ` Lengyel, Tamas
2015-06-22 18:56 ` [PATCH v2 10/12] x86/altp2m: define and implement alternate p2m HVMOP types Ed White
2015-06-24 13:58 ` Andrew Cooper
2015-06-24 14:53 ` Jan Beulich
2015-06-22 18:56 ` [PATCH v2 11/12] x86/altp2m: Add altp2mhvm HVM domain parameter Ed White
2015-06-24 14:06 ` Andrew Cooper
2015-06-24 14:59 ` Jan Beulich
2015-06-24 17:57 ` Ed White
2015-06-24 18:08 ` Andrew Cooper
2015-06-25 8:34 ` Jan Beulich
2015-06-25 8:33 ` Jan Beulich
2015-06-22 18:56 ` [PATCH v2 12/12] x86/altp2m: XSM hooks for altp2m HVM ops Ed White
2015-06-26 19:24 ` Daniel De Graaf
2015-06-26 19:35 ` Ed White
2015-06-29 17:52 ` Daniel De Graaf
2015-06-29 17:55 ` Sahita, Ravi
2015-06-23 21:27 ` [PATCH v2 00/12] Alternate p2m: support multiple copies of host p2m Lengyel, Tamas
2015-06-23 22:25 ` Ed White
2015-06-24 5:39 ` Razvan Cojocaru
2015-06-24 13:32 ` Lengyel, Tamas
2015-06-24 13:37 ` Razvan Cojocaru
2015-06-24 16:43 ` Ed White
2015-06-24 21:34 ` Lengyel, Tamas
2015-06-24 22:02 ` Ed White
2015-06-24 22:45 ` Lengyel, Tamas
2015-06-24 22:55 ` Ed White [this message]
2015-06-25 9:00 ` Andrew Cooper
2015-06-25 16:38 ` Ed White
2015-06-25 17:29 ` Lengyel, Tamas
2015-06-25 20:34 ` Ed White
2015-06-24 14:10 ` Andrew Cooper
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=558B3563.9070402@intel.com \
--to=edmund.h.white@intel.com \
--cc=andrew.cooper3@citrix.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=ravi.sahita@intel.com \
--cc=rcojocaru@bitdefender.com \
--cc=tim@xen.org \
--cc=tlengyel@novetta.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/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.