From: Paul Mackerras <paulus@samba.org>
To: Alexander Graf <agraf@suse.de>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Liu Ping Fan <kernelfans@gmail.com>,
linuxppc-dev@lists.ozlabs.org, kvm-ppc <kvm-ppc@vger.kernel.org>,
kvm-devel <kvm@vger.kernel.org>,
Ben Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: [PATCH v2] powernv: kvm: make _PAGE_NUMA take effect
Date: Mon, 27 Jan 2014 10:41:07 +0000 [thread overview]
Message-ID: <20140127104106.GA11663@iris.ozlabs.ibm.com> (raw)
In-Reply-To: <C4D7ADEA-9CEB-4717-9AFD-CC8EFB18184A@suse.de>
On Mon, Jan 27, 2014 at 10:11:40AM +0100, Alexander Graf wrote:
>
> On 21.01.2014, at 10:42, Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> wrote:
>
> > Liu Ping Fan <kernelfans@gmail.com> writes:
> >
> >> To make sure that on host, the pages marked with _PAGE_NUMA result in a fault
> >> when guest access them, we should force the checking when guest uses hypercall
> >> to setup hpte.
> >>
> >> Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
> >
> > Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> >
> > When we mark pte with _PAGE_NUMA we already call mmu_notifier_invalidate_range_start and
> > mmu_notifier_invalidate_range_end, which will mark existing guest hpte
> > entry as HPTE_V_ABSENT. Now we need to do that when we are inserting new
> > guest hpte entries. This patch does that.
>
> So what happens next? We insert a page into the HTAB without HPTE_V_VALID set, so the guest will fail to use it. If the guest does an H_READ on it it will suddenly turn to V_VALID though?
>
> I might need a crash course in the use of HPTE_V_ABSENT.
HPTE_V_ABSENT means present from the point of view of the guest but
not present from the host's point of view, so yes H_READ turns
HPTE_V_ABSENT into HPTE_V_VALID.
Paul.
WARNING: multiple messages have this Message-ID (diff)
From: Paul Mackerras <paulus@samba.org>
To: Alexander Graf <agraf@suse.de>
Cc: kvm-devel <kvm@vger.kernel.org>,
kvm-ppc <kvm-ppc@vger.kernel.org>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Liu Ping Fan <kernelfans@gmail.com>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2] powernv: kvm: make _PAGE_NUMA take effect
Date: Mon, 27 Jan 2014 21:41:07 +1100 [thread overview]
Message-ID: <20140127104106.GA11663@iris.ozlabs.ibm.com> (raw)
In-Reply-To: <C4D7ADEA-9CEB-4717-9AFD-CC8EFB18184A@suse.de>
On Mon, Jan 27, 2014 at 10:11:40AM +0100, Alexander Graf wrote:
>
> On 21.01.2014, at 10:42, Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> wrote:
>
> > Liu Ping Fan <kernelfans@gmail.com> writes:
> >
> >> To make sure that on host, the pages marked with _PAGE_NUMA result in a fault
> >> when guest access them, we should force the checking when guest uses hypercall
> >> to setup hpte.
> >>
> >> Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
> >
> > Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> >
> > When we mark pte with _PAGE_NUMA we already call mmu_notifier_invalidate_range_start and
> > mmu_notifier_invalidate_range_end, which will mark existing guest hpte
> > entry as HPTE_V_ABSENT. Now we need to do that when we are inserting new
> > guest hpte entries. This patch does that.
>
> So what happens next? We insert a page into the HTAB without HPTE_V_VALID set, so the guest will fail to use it. If the guest does an H_READ on it it will suddenly turn to V_VALID though?
>
> I might need a crash course in the use of HPTE_V_ABSENT.
HPTE_V_ABSENT means present from the point of view of the guest but
not present from the host's point of view, so yes H_READ turns
HPTE_V_ABSENT into HPTE_V_VALID.
Paul.
WARNING: multiple messages have this Message-ID (diff)
From: Paul Mackerras <paulus@samba.org>
To: Alexander Graf <agraf@suse.de>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Liu Ping Fan <kernelfans@gmail.com>,
linuxppc-dev@lists.ozlabs.org, kvm-ppc <kvm-ppc@vger.kernel.org>,
kvm-devel <kvm@vger.kernel.org>,
Ben Herrenschmidt <benh@kernel.crashing.org>
Subject: Re: [PATCH v2] powernv: kvm: make _PAGE_NUMA take effect
Date: Mon, 27 Jan 2014 21:41:07 +1100 [thread overview]
Message-ID: <20140127104106.GA11663@iris.ozlabs.ibm.com> (raw)
In-Reply-To: <C4D7ADEA-9CEB-4717-9AFD-CC8EFB18184A@suse.de>
On Mon, Jan 27, 2014 at 10:11:40AM +0100, Alexander Graf wrote:
>
> On 21.01.2014, at 10:42, Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> wrote:
>
> > Liu Ping Fan <kernelfans@gmail.com> writes:
> >
> >> To make sure that on host, the pages marked with _PAGE_NUMA result in a fault
> >> when guest access them, we should force the checking when guest uses hypercall
> >> to setup hpte.
> >>
> >> Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
> >
> > Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> >
> > When we mark pte with _PAGE_NUMA we already call mmu_notifier_invalidate_range_start and
> > mmu_notifier_invalidate_range_end, which will mark existing guest hpte
> > entry as HPTE_V_ABSENT. Now we need to do that when we are inserting new
> > guest hpte entries. This patch does that.
>
> So what happens next? We insert a page into the HTAB without HPTE_V_VALID set, so the guest will fail to use it. If the guest does an H_READ on it it will suddenly turn to V_VALID though?
>
> I might need a crash course in the use of HPTE_V_ABSENT.
HPTE_V_ABSENT means present from the point of view of the guest but
not present from the host's point of view, so yes H_READ turns
HPTE_V_ABSENT into HPTE_V_VALID.
Paul.
next prev parent reply other threads:[~2014-01-27 10:41 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-21 8:15 [PATCH v2] powernv: kvm: make _PAGE_NUMA take effect Liu Ping Fan
2014-01-21 8:15 ` Liu Ping Fan
2014-01-21 8:15 ` Liu Ping Fan
2014-01-21 9:42 ` Aneesh Kumar K.V
2014-01-21 9:54 ` Aneesh Kumar K.V
2014-01-21 9:42 ` Aneesh Kumar K.V
2014-01-27 9:11 ` Alexander Graf
2014-01-27 9:11 ` Alexander Graf
2014-01-27 9:11 ` Alexander Graf
2014-01-27 10:28 ` Aneesh Kumar K.V
2014-01-27 10:40 ` Aneesh Kumar K.V
2014-01-27 10:28 ` Aneesh Kumar K.V
2014-01-27 10:42 ` Alexander Graf
2014-01-27 10:42 ` Alexander Graf
2014-01-27 10:42 ` Alexander Graf
2014-01-27 15:57 ` Aneesh Kumar K.V
2014-01-27 15:57 ` Aneesh Kumar K.V
2014-01-27 15:57 ` Aneesh Kumar K.V
2014-01-27 10:41 ` Paul Mackerras [this message]
2014-01-27 10:41 ` Paul Mackerras
2014-01-27 10:41 ` Paul Mackerras
2014-04-03 2:36 ` Liu ping fan
2014-04-03 2:36 ` Liu ping fan
2014-04-03 2:36 ` Liu ping fan
2014-04-03 11:36 ` Alexander Graf
2014-04-03 11:36 ` Alexander Graf
2014-04-03 11:36 ` Alexander Graf
2014-04-03 11:38 ` Alexander Graf
2014-04-03 11:38 ` Alexander Graf
2014-04-03 11:38 ` Alexander Graf
2014-04-03 11:43 ` Alexander Graf
2014-04-03 11:43 ` Alexander Graf
2014-04-03 11:43 ` Alexander Graf
2014-04-07 7:42 ` Aneesh Kumar K.V
2014-04-07 7:54 ` Aneesh Kumar K.V
2014-04-07 7:42 ` Aneesh Kumar K.V
2014-04-07 8:36 ` Alexander Graf
2014-04-07 8:36 ` Alexander Graf
2014-04-07 8:36 ` Alexander Graf
2014-04-10 3:28 ` Liu ping fan
2014-04-10 3:28 ` Liu ping fan
2014-04-10 3:28 ` Liu ping fan
2014-04-10 10:02 ` Alexander Graf
2014-04-10 10:02 ` Alexander Graf
2014-04-10 10:02 ` Alexander Graf
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=20140127104106.GA11663@iris.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=agraf@suse.de \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=kernelfans@gmail.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.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.