From: Ian Campbell Subject: Re: [PATCH 02/10] Move PAGE_SHIFT to memmap.h Date: Wed, 24 Aug 2011 22:08:39 +0100 Message-ID: <1314220119.17978.692.camel@dagon.hellion.org.uk> References: <1313683408-32306-1-git-send-email-evil.dani@gmail.com> <1313683408-32306-3-git-send-email-evil.dani@gmail.com> <20110824175146.GB15675@dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20110824175146.GB15675@dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Konrad Rzeszutek Wilk Cc: Daniel Castro , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Wed, 2011-08-24 at 18:51 +0100, Konrad Rzeszutek Wilk wrote: > On Fri, Aug 19, 2011 at 01:03:19AM +0900, Daniel Castro wrote: > > PAGE_SHIFT is used by both Virtio and Xen as a contant when moving > > addresses from guest space to machine space, in order to have a > > single definition PAGE_SHIFT has been moved to memmap.h. This has > > no impact on neither virtio or xen. > > > > Signed-off-by: Daniel Castro > > --- > > src/memmap.h | 2 ++ > > src/virtio-ring.h | 2 +- > > 2 files changed, 3 insertions(+), 1 deletions(-) > > > > diff --git a/src/memmap.h b/src/memmap.h > > index 01c7ddb..8674168 100644 > > --- a/src/memmap.h > > +++ b/src/memmap.h > > @@ -21,6 +21,8 @@ void memmap_finalize(void); > > > > // A typical OS page size > > #define PAGE_SIZE 4096 > > +//Used by Virtio and Xen > > +#define PAGE_SHIFT 12 > > So aren't those two files also used on other architectures - say > PPC64 which have a different page size - 64K. Isn't there some other > defines for this? Or are the patches for that not present anywhere yet? This patch is against SeaBIOS, which is a reimplementation of the legacy PC BIOS -- I don't think you would want it on anything other than x86 and AFAICT SeaBIOS doesn't have any support for doing so. Ian. > > > > > // e820 map storage (defined in system.c) > > extern struct e820entry e820_list[]; > > diff --git a/src/virtio-ring.h b/src/virtio-ring.h > > index b7a7aaf..fd30778 100644 > > --- a/src/virtio-ring.h > > +++ b/src/virtio-ring.h > > @@ -4,7 +4,7 @@ > > #include "types.h" // u64 > > #include "memmap.h" // PAGE_SIZE > > > > -#define PAGE_SHIFT 12 > > + > > #define PAGE_MASK (PAGE_SIZE-1) > > > > #define virt_to_phys(v) (unsigned long)(v) > > -- > > 1.7.4.1 > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel