From owner-svn-src-all@freebsd.org Tue Jul 7 21:52:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 972DB34E0DB; Tue, 7 Jul 2020 21:52:41 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1blF25tcz49pG; Tue, 7 Jul 2020 21:52:41 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: by mail-yb1-xb2f.google.com with SMTP id h39so21298499ybj.3; Tue, 07 Jul 2020 14:52:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Yl1kIEgiwM+5Iaw/qF4C/2h1C9xeNhgX9Kf7knpsM8Q=; b=I82/y0FhtHrPl17iqzYocu1m5nuTuw3cpIl+FfFsVMwLDFYdJhr9fvIcccZpat10EB 0rDTgFJfd76jSiiJtWHnFb+qSbAqJefSS0lk3yyL59QRqDuIhdplRjTAwya2d+mGUVl2 9EAXSQFOOeDOISdwsATKpxdvmVVGPxjGnyF6R9gi/k7g8ThVfFPtYwciB35xtv/tVC95 D7WF775y+DPvQZPVSgkILtN3U2tgWJll4CrzrppaqaJ6gOj85TDgiEjDhyRHwjFyvT0v SFogbR2SzBkwfTvTv+I97KJ7iLqF3G+YyBiXsz1umBu1NMq2sLqCXpVE4rhixLD7EfpU Yr9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Yl1kIEgiwM+5Iaw/qF4C/2h1C9xeNhgX9Kf7knpsM8Q=; b=e+hjcazC1O2shfHLIZyhjDLuTf8YtjiCyYwEDxCrX4L2bPD/u7SCY6LwOv2yNNntWC R4oag2Qko6Fjp6aW3ARX2WHpulsbels4fNIqPjnzXmMEji9QB5qY7MR7HT3CsjrNaSAJ mDs1oETP1RPIRceQe7Nl64YeCmXtZIBPazdVSs+VHwJcHaYWXF50O+8oF8wTnvXQ4h8Y RP0dmltHSSGXWUgyD7vZXBlJ8xvxkBkHFF41th/x/34iQqEREKhuNwslTO4xv4L8U/dM isUE/ObrcUQaqNBl7zp9sTogvS5gcJVgC/kp5OiA1CQcwKw+wyh7dhkpdji5yA1byMsq nuRg== X-Gm-Message-State: AOAM530ngbClJBbBZvyey4YD+qfEtfnHLhUJrQZy2JqAsv0pPvsyLdkp Jx+U+tl5VuEbp+QcB1Ye9n/piqd2tEwD0LyjTkZZOg== X-Google-Smtp-Source: ABdhPJyFTfiAiE3nB0B+aq+qbRGIfeKMJAec0Zbgjptpzeja+Efwmx3phgxVGSwqdjsFEbJ4DdPfAwH6BK5d+1JB+7Y= X-Received: by 2002:a25:c045:: with SMTP id c66mr33762487ybf.314.1594158759947; Tue, 07 Jul 2020 14:52:39 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:ad26:0:0:0:0:0 with HTTP; Tue, 7 Jul 2020 14:52:39 -0700 (PDT) In-Reply-To: <202007072033.067KXC9V029714@repo.freebsd.org> References: <202007072033.067KXC9V029714@repo.freebsd.org> From: Oliver Pinter Date: Tue, 7 Jul 2020 23:52:39 +0200 Message-ID: Subject: Re: svn commit: r362998 - in head: stand/defaults sys/amd64/amd64 sys/powerpc/aim sys/vm To: Scott Long Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Rspamd-Queue-Id: 4B1blF25tcz49pG X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2020 21:52:41 -0000 On Tuesday, July 7, 2020, Scott Long wrote: > Author: scottl > Date: Tue Jul 7 20:33:11 2020 > New Revision: 362998 > URL: https://svnweb.freebsd.org/changeset/base/362998 > > Log: > Migrate the feature of excluding RAM pages to use "excludelist" > as its nomenclature. > > MFC after: 1 week > > Modified: > head/stand/defaults/loader.conf > head/sys/amd64/amd64/pmap.c > head/sys/powerpc/aim/mmu_radix.c > head/sys/vm/vm_page.c > head/sys/vm/vm_page.h > > Modified: head/stand/defaults/loader.conf > ============================================================ > ================== > --- head/stand/defaults/loader.conf Tue Jul 7 19:09:38 2020 > (r362997) > +++ head/stand/defaults/loader.conf Tue Jul 7 20:33:11 2020 > (r362998) > @@ -49,12 +49,12 @@ entropy_cache_type="boot_entropy_cache" # > Required for > # must not change value even if the > # _name above does change! > > -### RAM Blacklist configuration ############################ > -ram_blacklist_load="NO" # Set this to YES to load > a file > +### RAM Excludelist configuration ############################ > +ram_excludelist_load="NO" # Set this to YES to load a file > # containing a list of addresses to > # exclude from the running system. > -ram_blacklist_name="/boot/blacklist.txt" # Set this to the name of the > file > -ram_blacklist_type="ram_blacklist" # Required for the kernel to find > +ram_excludeist_name="/boot/excludelist.txt" # Set this to the name of > the file > +ram_excludelist_type="ram_excludelist" # Required for the kernel to find This will break systems where the blacklist file is already in use. At least please add this to release notes and provide a backward compatible way. > # the blacklist module > > ### Microcode loading configuration ######################## > > Modified: head/sys/amd64/amd64/pmap.c > ============================================================ > ================== > --- head/sys/amd64/amd64/pmap.c Tue Jul 7 19:09:38 2020 (r362997) > +++ head/sys/amd64/amd64/pmap.c Tue Jul 7 20:33:11 2020 (r362998) > @@ -2060,7 +2060,7 @@ pmap_init(void) > int error, i, ret, skz63; > > /* L1TF, reserve page @0 unconditionally */ > - vm_page_blacklist_add(0, bootverbose); > + vm_page_excludelist_add(0, bootverbose); > > /* Detect bare-metal Skylake Server and Skylake-X. */ > if (vm_guest == VM_GUEST_NO && cpu_vendor_id == CPU_VENDOR_INTEL && > @@ -2081,7 +2081,7 @@ pmap_init(void) > printf("SKZ63: skipping 4M RAM starting " > "at physical 1G\n"); > for (i = 0; i < atop(0x400000); i++) { > - ret = vm_page_blacklist_add(0x40000000 + > + ret = vm_page_excludelist_add(0x40000000 + > ptoa(i), FALSE); > if (!ret && bootverbose) > printf("page at %#lx already > used\n", > > Modified: head/sys/powerpc/aim/mmu_radix.c > ============================================================ > ================== > --- head/sys/powerpc/aim/mmu_radix.c Tue Jul 7 19:09:38 2020 > (r362997) > +++ head/sys/powerpc/aim/mmu_radix.c Tue Jul 7 20:33:11 2020 > (r362998) > @@ -3557,7 +3557,7 @@ mmu_radix_init() > int error, i, pv_npg; > > /* L1TF, reserve page @0 unconditionally */ > - vm_page_blacklist_add(0, bootverbose); > + vm_page_excludelist_add(0, bootverbose); > > zone_radix_pgd = uma_zcache_create("radix_pgd_cache", > RADIX_PGD_SIZE, NULL, NULL, > > Modified: head/sys/vm/vm_page.c > ============================================================ > ================== > --- head/sys/vm/vm_page.c Tue Jul 7 19:09:38 2020 (r362997) > +++ head/sys/vm/vm_page.c Tue Jul 7 20:33:11 2020 (r362998) > @@ -155,10 +155,11 @@ vm_page_t vm_page_array; > long vm_page_array_size; > long first_page; > > -static TAILQ_HEAD(, vm_page) blacklist_head; > -static int sysctl_vm_page_blacklist(SYSCTL_HANDLER_ARGS); > -SYSCTL_PROC(_vm, OID_AUTO, page_blacklist, CTLTYPE_STRING | CTLFLAG_RD | > - CTLFLAG_MPSAFE, NULL, 0, sysctl_vm_page_blacklist, "A", "Blacklist > pages"); > +static TAILQ_HEAD(, vm_page) excludelist_head; > +static int sysctl_vm_page_excludelist(SYSCTL_HANDLER_ARGS); > +SYSCTL_PROC(_vm, OID_AUTO, page_excludelist, CTLTYPE_STRING | CTLFLAG_RD | > + CTLFLAG_MPSAFE, NULL, 0, sysctl_vm_page_excludelist, "A", > + "Blacklist pages"); > > static uma_zone_t fakepg_zone; > > @@ -258,16 +259,16 @@ vm_set_page_size(void) > } > > /* > - * vm_page_blacklist_next: > + * vm_page_excludelist_next: > * > - * Find the next entry in the provided string of blacklist > + * Find the next entry in the provided string of excludelist > * addresses. Entries are separated by space, comma, or newline. > * If an invalid integer is encountered then the rest of the > * string is skipped. Updates the list pointer to the next > * character, or NULL if the string is exhausted or invalid. > */ > static vm_paddr_t > -vm_page_blacklist_next(char **list, char *end) > +vm_page_excludelist_next(char **list, char *end) > { > vm_paddr_t bad; > char *cp, *pos; > @@ -314,13 +315,13 @@ vm_page_blacklist_next(char **list, char *end) > *list = cp; > return (trunc_page(bad)); > } > - printf("Garbage in RAM blacklist, skipping\n"); > + printf("Garbage in RAM excludelist, skipping\n"); > *list = NULL; > return (0); > } > > bool > -vm_page_blacklist_add(vm_paddr_t pa, bool verbose) > +vm_page_excludelist_add(vm_paddr_t pa, bool verbose) > { > struct vm_domain *vmd; > vm_page_t m; > @@ -336,7 +337,7 @@ vm_page_blacklist_add(vm_paddr_t pa, bool verbose) > vm_domain_free_unlock(vmd); > if (ret != 0) { > vm_domain_freecnt_inc(vmd, -1); > - TAILQ_INSERT_TAIL(&blacklist_head, m, listq); > + TAILQ_INSERT_TAIL(&excludelist_head, m, listq); > if (verbose) > printf("Skipping page with pa 0x%jx\n", > (uintmax_t)pa); > } > @@ -344,35 +345,35 @@ vm_page_blacklist_add(vm_paddr_t pa, bool verbose) > } > > /* > - * vm_page_blacklist_check: > + * vm_page_excludelist_check: > * > - * Iterate through the provided string of blacklist addresses, pulling > + * Iterate through the provided string of excludelist addresses, > pulling > * each entry out of the physical allocator free list and putting it > - * onto a list for reporting via the vm.page_blacklist sysctl. > + * onto a list for reporting via the vm.page_excludelist sysctl. > */ > static void > -vm_page_blacklist_check(char *list, char *end) > +vm_page_excludelist_check(char *list, char *end) > { > vm_paddr_t pa; > char *next; > > next = list; > while (next != NULL) { > - if ((pa = vm_page_blacklist_next(&next, end)) == 0) > + if ((pa = vm_page_excludelist_next(&next, end)) == 0) > continue; > - vm_page_blacklist_add(pa, bootverbose); > + vm_page_excludelist_add(pa, bootverbose); > } > } > > /* > - * vm_page_blacklist_load: > + * vm_page_excludelist_load: > * > - * Search for a special module named "ram_blacklist". It'll be a > + * Search for a special module named "ram_excludelist". It'll be a > * plain text file provided by the user via the loader directive > * of the same name. > */ > static void > -vm_page_blacklist_load(char **list, char **end) > +vm_page_excludelist_load(char **list, char **end) > { > void *mod; > u_char *ptr; > @@ -381,7 +382,7 @@ vm_page_blacklist_load(char **list, char **end) > mod = NULL; > ptr = NULL; > > - mod = preload_search_by_type("ram_blacklist"); > + mod = preload_search_by_type("ram_excludelist"); > if (mod != NULL) { > ptr = preload_fetch_addr(mod); > len = preload_fetch_size(mod); > @@ -395,7 +396,7 @@ vm_page_blacklist_load(char **list, char **end) > } > > static int > -sysctl_vm_page_blacklist(SYSCTL_HANDLER_ARGS) > +sysctl_vm_page_excludelist(SYSCTL_HANDLER_ARGS) > { > vm_page_t m; > struct sbuf sbuf; > @@ -406,7 +407,7 @@ sysctl_vm_page_blacklist(SYSCTL_HANDLER_ARGS) > if (error != 0) > return (error); > sbuf_new_for_sysctl(&sbuf, NULL, 128, req); > - TAILQ_FOREACH(m, &blacklist_head, listq) { > + TAILQ_FOREACH(m, &excludelist_head, listq) { > sbuf_printf(&sbuf, "%s%#jx", first ? "" : ",", > (uintmax_t)m->phys_addr); > first = 0; > @@ -793,14 +794,14 @@ vm_page_startup(vm_offset_t vaddr) > } > > /* > - * Remove blacklisted pages from the physical memory allocator. > + * Remove excludelisted pages from the physical memory allocator. > */ > - TAILQ_INIT(&blacklist_head); > - vm_page_blacklist_load(&list, &listend); > - vm_page_blacklist_check(list, listend); > + TAILQ_INIT(&excludelist_head); > + vm_page_excludelist_load(&list, &listend); > + vm_page_excludelist_check(list, listend); > > - list = kern_getenv("vm.blacklist"); > - vm_page_blacklist_check(list, NULL); > + list = kern_getenv("vm.excludelist"); > + vm_page_excludelist_check(list, NULL); > > freeenv(list); > #if VM_NRESERVLEVEL > 0 > > Modified: head/sys/vm/vm_page.h > ============================================================ > ================== > --- head/sys/vm/vm_page.h Tue Jul 7 19:09:38 2020 (r362997) > +++ head/sys/vm/vm_page.h Tue Jul 7 20:33:11 2020 (r362998) > @@ -613,7 +613,7 @@ vm_page_t vm_page_alloc_contig_domain(vm_object_t obje > vm_page_t vm_page_alloc_freelist(int, int); > vm_page_t vm_page_alloc_freelist_domain(int, int, int); > void vm_page_bits_set(vm_page_t m, vm_page_bits_t *bits, vm_page_bits_t > set); > -bool vm_page_blacklist_add(vm_paddr_t pa, bool verbose); > +bool vm_page_excludelist_add(vm_paddr_t pa, bool verbose); > vm_page_t vm_page_grab(vm_object_t, vm_pindex_t, int); > vm_page_t vm_page_grab_unlocked(vm_object_t, vm_pindex_t, int); > int vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int > allocflags, > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" >