All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <JBeulich@suse.com>, Tim Deegan <tim@xen.org>
Cc: xen-devel@lists.xenproject.org
Subject: Re: [PATCH RFC 2/2] xen/pvh: enable mmu_update hypercall
Date: Thu, 16 Oct 2014 13:30:28 +0200	[thread overview]
Message-ID: <543FAC54.1090903@citrix.com> (raw)
In-Reply-To: <543FA1D9020000780003F13D@mail.emea.novell.com>

El 16/10/14 a les 10.45, Jan Beulich ha escrit:
>>>> On 16.10.14 at 09:53, <tim@xen.org> wrote:
>> At 12:53 +0200 on 15 Oct (1413374025), Roger Pau Monne wrote:
>>> This is needed for performing save/restore of PV guests.
>>
>> On IRC I suggested that this would be OK as long as there were other
>> checks to make sure that the target of all these ops is PV (in
>> particular that a PVH/HVM guest can't end up calling PV MM operations
>> on itself).

Silly question, but shouldn't all this checks already be in place in
case a PV Dom0 tries to execute mmu_update hypercalls against an HVM guest?

> And not just that - I can't even see how this would work at present:
> paging_write_guest_entry() uses
> v->arch.paging.mode->write_guest_entry, yet that actor gets filled
> by shadow code only. I don't currently see how for PVH, requiring
> HAP, this wouldn't end up in NULL dereferences. Am I overlooking
> some (non-grep-able) initialization of this and .cmpxchg_guest_entry?

It "works" because this is only used by the migration code, and the page
that's modified is never of the type PGT_writable_page. Should I look
into implementing this operations for HAP, or should I just prevent it's
usage from do_mmu_update if the caller turns out to be a HAP guest?

Roger.

  reply	other threads:[~2014-10-16 11:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-15 10:53 [PATCH RFC 0/2] xen/pvh: enable migration on PVH Dom0 Roger Pau Monne
2014-10-15 10:53 ` [PATCH RFC 1/2] xen/pvh: take the p2m lock when doing logdirty ops from HVM domains Roger Pau Monne
2014-10-15 11:31   ` Andrew Cooper
2014-10-15 11:52     ` Roger Pau Monné
2014-10-15 11:55       ` Andrew Cooper
2014-10-15 11:58         ` Roger Pau Monné
2014-10-16  8:21   ` Jan Beulich
2014-10-16  9:20   ` Tim Deegan
2014-10-16 10:03     ` Roger Pau Monné
2014-11-13 15:46       ` Tim Deegan
2014-11-13 16:17         ` Jan Beulich
2014-10-16 14:15     ` Jan Beulich
2014-10-16 15:05       ` Tim Deegan
2014-10-15 10:53 ` [PATCH RFC 2/2] xen/pvh: enable mmu_update hypercall Roger Pau Monne
2014-10-16  7:53   ` Tim Deegan
2014-10-16  8:45     ` Jan Beulich
2014-10-16 11:30       ` Roger Pau Monné [this message]
2014-10-16 13:28         ` Jan Beulich

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=543FAC54.1090903@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.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.