xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Oleksandr Tyshchenko <olekstysh@gmail.com>
Cc: "Oleksandr Tyshchenko" <oleksandr_tyshchenko@epam.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Julien Grall" <julien@xen.org>,
	"Bertrand Marquis" <bertrand.marquis@arm.com>,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"George Dunlap" <george.dunlap@citrix.com>,
	"Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>,
	"Julien Grall" <jgrall@amazon.com>,
	xen-devel@lists.xenproject.org, "Henry Wang" <Henry.Wang@arm.com>
Subject: Re: [PATCH V7 2/2] xen/gnttab: Store frame GFN in struct page_info on Arm
Date: Tue, 11 Oct 2022 13:59:59 +0200	[thread overview]
Message-ID: <df56f268-59d8-4b9a-52a6-40bfd0b91414@suse.com> (raw)
In-Reply-To: <20220716145658.4175730-2-olekstysh@gmail.com>

On 16.07.2022 16:56, Oleksandr Tyshchenko wrote:
> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
> 
> Rework Arm implementation to store grant table frame GFN
> in struct page_info directly instead of keeping it in
> standalone status/shared arrays. This patch is based on
> the assumption that a grant table page is a xenheap page.
> 
> To cover 64-bit/40-bit IPA on Arm64/Arm32 we need the space
> to hold 52-bit/28-bit + extra bit value respectively. In order
> to not grow the size of struct page_info borrow the required
> amount of bits from type_info's count portion which current
> context won't suffer (currently only 1 bit is used on Arm).

I'm afraid this isn't true: There's no requirement for a guest to pass
all different GFNs to VCPUOP_register_vcpu_info, yet map_vcpu_info()
tries to obtain a reference for every vCPU. With my adding of GFN
(really gaddr) based registration of the runstate area (already
looking towards 4.18) the maximum possible count is to further grow.

I guess this went unnoticed because Linux presumably uses different
GFNs for every vCPU, so the issue doesn't surface. But I'm afraid this
is a regression (unless I'm overlooking something, perhaps a
mitigating factor) which wants fixing for 4.17.

Jan


  parent reply	other threads:[~2022-10-11 12:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-16 14:56 [PATCH V7 1/2] xen/arm: Harden the P2M code in p2m_remove_mapping() Oleksandr Tyshchenko
2022-07-16 14:56 ` [PATCH V7 2/2] xen/gnttab: Store frame GFN in struct page_info on Arm Oleksandr Tyshchenko
2022-07-16 15:08   ` Julien Grall
2022-07-16 15:20     ` Oleksandr Tyshchenko
2022-07-18  8:53   ` Jan Beulich
2022-10-11 11:59   ` Jan Beulich [this message]
2022-10-11 13:01     ` Julien Grall
2022-10-11 13:28       ` Jan Beulich
2022-10-11 13:33         ` Julien Grall
2022-10-11 13:38           ` Jan Beulich
2022-10-17 13:46           ` Jan Beulich
2022-10-17 14:37             ` Julien Grall
2022-07-16 15:06 ` [PATCH V7 1/2] xen/arm: Harden the P2M code in p2m_remove_mapping() Julien Grall
2022-07-16 15:29   ` Oleksandr Tyshchenko
2022-07-20 18:20     ` Julien Grall

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=df56f268-59d8-4b9a-52a6-40bfd0b91414@suse.com \
    --to=jbeulich@suse.com \
    --cc=Henry.Wang@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bertrand.marquis@arm.com \
    --cc=george.dunlap@citrix.com \
    --cc=jgrall@amazon.com \
    --cc=julien@xen.org \
    --cc=oleksandr_tyshchenko@epam.com \
    --cc=olekstysh@gmail.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=wl@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).