From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: andrew.cooper3@citrix.com, xen-devel@lists.xen.org, roger.pau@citrix.com
Subject: Re: [PATCH] x86/HVM: Merge HVM and PVH hypercall tables
Date: Thu, 10 Dec 2015 11:53:06 -0500 [thread overview]
Message-ID: <5669ADF2.9090603@oracle.com> (raw)
In-Reply-To: <56697E8F02000078000BE17D@prv-mh.provo.novell.com>
On 12/10/2015 07:30 AM, Jan Beulich wrote:
>>>> On 08.12.15 at 15:20, <boris.ostrovsky@oracle.com> wrote:
>> The tables are almost identical and therefore there is little reason to
>> keep both sets.
>>
>> PVH needs 3 extra hypercalls:
>> * mmuext_op. PVH uses MMUEXT_TLB_FLUSH_MULTI and MMUEXT_INVLPG_MULTI to
>> optimize TLB flushing. Since HVMlite guests may decide to use them as
>> well we can allow these two commands for all guests in an HVM container.
> I must be missing something here: Especially for the INVLPG variant
> I can't see what use it could be for a PVH guest, as it necessarily
> would act on a different address space (the other one may have at
> least some effect due to hvm_flush_guest_tlbs()).
This is done out of xen_flush_tlb_others(), which is what PVH guests use.
And yes --- there indeed seems to be little reason to do that. But it is
there now so I am not sure we can make this not work anymore for PVH guests.
>
> And then, if those two really are meant to be enabled, why would
> their _LOCAL and _ALL counterparts not be? And similarly,
> MMUEXT_FLUSH_CACHE{,_GLOBAL} may then be valid to expose.
This is only used by PVH guests as optimization (see comment in
xen_init_mmu_ops()). So there is no need to do a hypercall for LOCAL
operations. For ALL/GLOBAL --- maybe we should allow those too, even
though they are not currently used (in Linux).
(In principle we could allow LOCAL ones too. Assuming this all is needed
at all)
>
> Wasn't it much rather that PVH Dom0 needed e.g. MMUEXT_PIN_Ln_TABLE
> to deal with foreign guests' page tables?
That I haven't considered.
Especially given that PVH dom0 is not booting for me, as I just found out:
...
(XEN) d0v0 EPT violation 0x1aa (-w-/r-x) gpa 0x000000c0008116 mfn
0xc0008 type 5
(XEN) d0v0 Walking EPT tables for GFN c0008:
(XEN) d0v0 epte 800000082bf50007
(XEN) d0v0 epte 800000082bf19007
(XEN) d0v0 epte 800000043c6f9007
(XEN) d0v0 epte 80500000c0008805
(XEN) d0v0 --- GLA 0xffffc90020008116
(XEN) domain_crash called from vmx.c:2816
(XEN) Domain 0 (vcpu#0) crashed on cpu#0:
(XEN) ----[ Xen-4.7-unstable x86_64 debug=y Tainted: C ]----
(XEN) CPU: 0
(XEN) RIP: 0010:[<ffffffff816150dc>]
(XEN) RFLAGS: 0000000000010046 CONTEXT: hvm guest (d0v0)
(XEN) rax: 000000000000001d rbx: 0000000000000000 rcx: ffff88014700f9b8
(XEN) rdx: 00000000000000ff rsi: 0000000000000000 rdi: 0000000000000000
(XEN) rbp: ffff88014700fa18 rsp: ffff88014700f9e8 r8: ffff88014700f9c0
(XEN) r9: 000000000000001d r10: ffffffff8189c7f0 r11: 0000000000000000
(XEN) r12: ffffc90020008000 r13: ffffc90020008116 r14: 0000000000000002
(XEN) r15: 000000000000001d cr0: 0000000080050033 cr4: 00000000000406f0
(XEN) cr3: 0000000001c0e000 cr2: 0000000000000000
(XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: 0010
(XEN) Guest stack trace from rsp=ffff88014700f9e8:
(XEN) Fault while accessing guest memory.
(XEN) Hardware Dom0 crashed: rebooting machine in 5 seconds.
We haven't been running regression tests for PVH dom0 so I don't know
how long this has been broken.
-boris
next prev parent reply other threads:[~2015-12-10 16:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-08 14:20 [PATCH] x86/HVM: Merge HVM and PVH hypercall tables Boris Ostrovsky
2015-12-10 12:30 ` Jan Beulich
2015-12-10 16:53 ` Boris Ostrovsky [this message]
2015-12-10 17:13 ` Jan Beulich
2015-12-11 16:50 ` Boris Ostrovsky
2015-12-14 7:51 ` Jan Beulich
2015-12-14 21:25 ` Boris Ostrovsky
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=5669ADF2.9090603@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=roger.pau@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.