All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksandr Tyshchenko <olekstysh@gmail.com>
To: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org
Cc: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Juergen Gross <jgross@suse.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Julien Grall <julien@xen.org>
Subject: [PATCH V4 1/6] xen/unpopulated-alloc: Drop check for virt_addr_valid() in fill_list()
Date: Thu,  9 Dec 2021 22:05:31 +0200	[thread overview]
Message-ID: <1639080336-26573-2-git-send-email-olekstysh@gmail.com> (raw)
In-Reply-To: <1639080336-26573-1-git-send-email-olekstysh@gmail.com>

From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>

If memremap_pages() succeeds the range is guaranteed to have proper page
table, there is no need for an additional virt_addr_valid() check.

Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
Changes RFC -> V2:
   - new patch, instead of
     "[RFC PATCH 1/2] arm64: mm: Make virt_addr_valid to check for pfn_valid again"

Changes V2 -> V3:
   - add Boris' R-b

Changes V3 -> V4:
   - no changes
---
 drivers/xen/unpopulated-alloc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/xen/unpopulated-alloc.c b/drivers/xen/unpopulated-alloc.c
index 87e6b7d..a03dc5b 100644
--- a/drivers/xen/unpopulated-alloc.c
+++ b/drivers/xen/unpopulated-alloc.c
@@ -85,7 +85,6 @@ static int fill_list(unsigned int nr_pages)
 	for (i = 0; i < alloc_pages; i++) {
 		struct page *pg = virt_to_page(vaddr + PAGE_SIZE * i);
 
-		BUG_ON(!virt_addr_valid(vaddr + PAGE_SIZE * i));
 		pg->zone_device_data = page_list;
 		page_list = pg;
 		list_count++;
-- 
2.7.4


  reply	other threads:[~2021-12-09 20:05 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09 20:05 [PATCH V4 0/6] xen: Add support of extended regions (safe ranges) on Arm Oleksandr Tyshchenko
2021-12-09 20:05 ` Oleksandr Tyshchenko
2021-12-09 20:05 ` Oleksandr Tyshchenko [this message]
2021-12-09 20:05 ` [PATCH V4 2/6] arm/xen: Switch to use gnttab_setup_auto_xlat_frames() for DT Oleksandr Tyshchenko
2021-12-09 20:05   ` Oleksandr Tyshchenko
2021-12-09 20:05 ` [PATCH V4 3/6] xen/balloon: Bring alloc(free)_xenballooned_pages helpers back Oleksandr Tyshchenko
2021-12-09 20:05 ` [PATCH V4 4/6] xen/unpopulated-alloc: Add mechanism to use Xen resource Oleksandr Tyshchenko
2021-12-10  1:19   ` Stefano Stabellini
2021-12-09 20:05 ` [PATCH V4 5/6] arm/xen: Read extended regions from DT and init " Oleksandr Tyshchenko
2021-12-09 20:05   ` Oleksandr Tyshchenko
2021-12-09 20:05 ` [PATCH V4 6/6] dt-bindings: xen: Clarify "reg" purpose Oleksandr Tyshchenko
2021-12-10  9:09   ` Julien Grall
2021-12-10  9:33     ` Oleksandr
2021-12-10 11:36       ` Oleksandr Tyshchenko
2021-12-10 13:54         ` Bertrand Marquis
2021-12-10 16:41         ` Rob Herring
2021-12-16 21:51         ` Stefano Stabellini
2021-12-16 22:02 ` [PATCH V4 0/6] xen: Add support of extended regions (safe ranges) on Arm Oleksandr
2021-12-16 22:02   ` Oleksandr
2021-12-17 19:13   ` Boris Ostrovsky
2021-12-17 19:13     ` Boris Ostrovsky
2021-12-17 19:19     ` Oleksandr
2021-12-17 19:19       ` Oleksandr
2021-12-17 19:23       ` Boris Ostrovsky
2021-12-17 19:23         ` Boris Ostrovsky
2021-12-17 19:17   ` Boris Ostrovsky
2021-12-17 19:17     ` Boris Ostrovsky
2022-01-07 11:31 ` Juergen Gross
2022-01-07 11:31   ` Juergen Gross

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=1639080336-26573-2-git-send-email-olekstysh@gmail.com \
    --to=olekstysh@gmail.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jgross@suse.com \
    --cc=julien@xen.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleksandr_tyshchenko@epam.com \
    --cc=sstabellini@kernel.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.