Re: [PATCH v2 13/15] KVM: s390: remove useless page->index usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/16/25 12:33 PM, Claudio Imbrenda wrote:
The page->index field for VSIE dat tables is only used for segment
tables.

Stop setting the field for all region tables.

Signed-off-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>

Haha, I never noticed, good catch.

Reviewed-by: Janosch Frank <frankja@xxxxxxxxxxxxx>


---
  arch/s390/mm/gmap.c | 9 ---------
  1 file changed, 9 deletions(-)

diff --git a/arch/s390/mm/gmap.c b/arch/s390/mm/gmap.c
index 9d4a62628e51..80674bbf0f7b 100644
--- a/arch/s390/mm/gmap.c
+++ b/arch/s390/mm/gmap.c
@@ -1507,9 +1507,6 @@ int gmap_shadow_r2t(struct gmap *sg, unsigned long saddr, unsigned long r2t,
  	page = gmap_alloc_crst();
  	if (!page)
  		return -ENOMEM;
-	page->index = r2t & _REGION_ENTRY_ORIGIN;
-	if (fake)
-		page->index |= GMAP_SHADOW_FAKE_TABLE;
  	s_r2t = page_to_phys(page);
  	/* Install shadow region second table */
  	spin_lock(&sg->guest_table_lock);
@@ -1590,9 +1587,6 @@ int gmap_shadow_r3t(struct gmap *sg, unsigned long saddr, unsigned long r3t,
  	page = gmap_alloc_crst();
  	if (!page)
  		return -ENOMEM;
-	page->index = r3t & _REGION_ENTRY_ORIGIN;
-	if (fake)
-		page->index |= GMAP_SHADOW_FAKE_TABLE;
  	s_r3t = page_to_phys(page);
  	/* Install shadow region second table */
  	spin_lock(&sg->guest_table_lock);
@@ -1673,9 +1667,6 @@ int gmap_shadow_sgt(struct gmap *sg, unsigned long saddr, unsigned long sgt,
  	page = gmap_alloc_crst();
  	if (!page)
  		return -ENOMEM;
-	page->index = sgt & _REGION_ENTRY_ORIGIN;
-	if (fake)
-		page->index |= GMAP_SHADOW_FAKE_TABLE;
  	s_sgt = page_to_phys(page);
  	/* Install shadow region second table */
  	spin_lock(&sg->guest_table_lock);





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux