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

RE: [PATCH v2 3/4] xen/arm: Defer GICv2 CPU interface mapping until the first access


  • To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Tue, 21 Mar 2023 04:00:35 +0000
  • Accept-language: zh-CN, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UJskrjMcZrSEAEGhTrwn91eVNosNnQuC4RXr0Iur/Cs=; b=Vz6UBDmKrmbfwOUsOyN9YbxiS4icwcrx5e4MZxqqpnd/v8YA5eG0pGjXGRBP1b+JqCT5vAsoPALy3qpvUIM2gJlLzuUfHPJ4rfEOun7xmrXIxHUF2pzzpYn8FNctS8ntspCq18/XQamEJSNexAMkuQbdq4USaL8fcxI3rdhgd5j+rMpQnmwcHLm4QyquaBFk9Yg7ma+npnPb5czsOBzmFE77TVVCD8W/PQlfuBK0SDPFlZexJiz7+YzYmDYCyu6eoC1M3lT1CY0uwvqFXYDjpH2Lf6nDNvA1B/nnshtDM76wsxo4y/ICQmzkSakyHpXMeVza0fm6RSTuW6qHZtSwMA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZtZq0HTSRuSpWR1P5mG/qVQZTARErncwn2+SgruUDj4aq8h8vrOUyweNsOD4J03ikfkTuPyBXrskGIisJtVQJJDPeXDWMOI8JlKwgJd6W5/OvphIFH7LCU11PzL4zfOqELftmnz8BbWlYCNcN0gEJp5/3XyKnchP8xi7nXvPRuE7DmAVJIDwpyfO7DlFVICqk55M0mTLzkLYe1Hi6VkQviVCbo54DFOdx9h3Dv6bc44cg7WJY3fjqTU0kmg+bzO+r0gSPOhU17sy/s3ioxn5kyPY9cr4/6QzMkn8SVVUTMYMURf5EhojnvgWgUyUBst+oYV2TWgltNSC4uGARyhLpg==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>
  • Delivery-date: Tue, 21 Mar 2023 04:00:55 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZNGBES9GND13bPU+mzqer9SysH68EWvQAgACL1MCAAAODEA==
  • Thread-topic: [PATCH v2 3/4] xen/arm: Defer GICv2 CPU interface mapping until the first access

Hi,

> Considering that the CPU interface is continuous (I suppose), I have two
> ways of rewriting the gfn check, we can do either:
> 
> gfn_eq(gfn, gaddr_to_gfn(d->arch.vgic.cbase)) ||
> gfn_eq(gfn, gfn_add(gaddr_to_gfn(d->arch.vgic.cbase), 1))
> 
> or
> 
> gfn_to_gaddr(gfn) >= d->arch.vgic.cbase ||
> gfn_to_gaddr(gfn) < d->arch.vgic.cbase + d->arch.vgic.csize

Oops, copy paste error, this should be 

gfn_to_gaddr(gfn) >= d->arch.vgic.cbase &&
gfn_to_gaddr(gfn) < d->arch.vgic.cbase + d->arch.vgic.csize

Kind regards,
Henry

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.