Erik Bosman
2006-Apr-04 17:22 UTC
[Xen-devel] [Patch] Allow bitmasks with the badpage bootoption
Hi, The current "badpage" boot option only allows you to select individual pages, which is not an option for me, since I have close to 32M of bad ram. My patch allows the use of masks to select many pages at once, much like the linux BADRAM patch. Masks can be specified using a forward slash, like, for example: badpage=0xa2000/0xef000,0x00100/0xfff00,0x01000 This way, it''s compatible with the current scheme. I also wrote a small testprogram to test the algorithm. Regards, Erik Bosman _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Apr-05 07:20 UTC
Re: [Xen-devel] [Patch] Allow bitmasks with the badpage bootoption
On 4 Apr 2006, at 18:22, Erik Bosman wrote:> The current "badpage" boot option only allows you to select > individual pages, which is not an option for me, since I have > close to 32M of bad ram. My patch allows the use of masks > to select many pages at once, much like the linux BADRAM > patch. > > Masks can be specified using a forward slash, like, for example: > badpage=0xa2000/0xef000,0x00100/0xfff00,0x01000The masking scheme is unnecessarily restrictive. Why not just allow specification of inclusive ranges of pages? For example: badpage=0xa2000-0xa2fff,0x100-0x1ff,0x123-0x456 -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Erik Bosman
2006-Apr-05 11:10 UTC
Re: [Xen-devel] [Patch] Allow bitmasks with the badpage bootoption
On 4/5/06, Keir Fraser <Keir.Fraser@cl.cam.ac.uk> wrote:> > The masking scheme is unnecessarily restrictive. Why not just allow > specification of inclusive ranges of pages? For example: > badpage=0xa2000-0xa2fff,0x100-0x1ff,0x123-0x456 > > -- Keir >This was how I first implemented it for my machine, since it only requires two ranges: badpage=0x2a000-0x2afff,0x3a000-0x3afff But I thought a mask would be better since it resembles the way memory usually breaks (not that I have much experience with this.) On the other hand, ranges are much easier to understand. I''ve attached my original patch. Erik Bosman _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Apr-05 11:27 UTC
Re: [Xen-devel] [Patch] Allow bitmasks with the badpage bootoption
On 5 Apr 2006, at 12:10, Erik Bosman wrote:> This was how I first implemented it for my machine, since it only > requires > two ranges: badpage=0x2a000-0x2afff,0x3a000-0x3afff > > But I thought a mask would be better since it resembles the way memory > usually breaks (not that I have much experience with this.) > > On the other hand, ranges are much easier to understand. > > I''ve attached my original patch.Better, but: 1. Name the variables bad_spfn, bad_epfn 2. Format ''if (bad_epfn == bad_spfn)'' as surrounding code (it''s missing spaces just inside the brackets). 3. Re-send with a ''Signed-off-by:'' line in your email. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel