From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>, michael@walle.cc
Subject: Re: [PATCH v5 44/79] lm32/lm32_boards: use memdev for RAM
Date: Tue, 18 Feb 2020 18:26:34 +0100 [thread overview]
Message-ID: <30cd5be3-6a52-0145-abb9-8b4373128daf@redhat.com> (raw)
In-Reply-To: <20200217173452.15243-45-imammedo@redhat.com>
On 2/17/20 6:34 PM, Igor Mammedov wrote:
> memory_region_allocate_system_memory() API is going away, so
> replace it with memdev allocated MemoryRegion. The later is
> initialized by generic code, so board only needs to opt in
> to memdev scheme by providing
> MachineClass::default_ram_id
> and using MachineState::ram instead of manually initializing
> RAM memory region.
>
> PS:
> while at it add check for user supplied RAM size and error
> out if it mismatches board expected value.
>
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
> v2:
> * fix format string causing build failure on 32-bit host
> (Philippe Mathieu-Daudé <philmd@redhat.com>)
>
> CC: michael@walle.cc
> CC: philmd@redhat.com
> ---
> hw/lm32/lm32_boards.c | 39 ++++++++++++++++++++++++++-------------
> 1 file changed, 26 insertions(+), 13 deletions(-)
>
> diff --git a/hw/lm32/lm32_boards.c b/hw/lm32/lm32_boards.c
> index d1894adab8..4e0a98c117 100644
> --- a/hw/lm32/lm32_boards.c
> +++ b/hw/lm32/lm32_boards.c
> @@ -19,6 +19,7 @@
>
> #include "qemu/osdep.h"
> #include "qemu/units.h"
> +#include "qemu/cutils.h"
> #include "qemu/error-report.h"
> #include "cpu.h"
> #include "hw/sysbus.h"
> @@ -75,22 +76,28 @@ static void main_cpu_reset(void *opaque)
>
> static void lm32_evr_init(MachineState *machine)
> {
> + MachineClass *mc = MACHINE_GET_CLASS(machine);
> const char *kernel_filename = machine->kernel_filename;
> LM32CPU *cpu;
> CPULM32State *env;
> DriveInfo *dinfo;
> MemoryRegion *address_space_mem = get_system_memory();
> - MemoryRegion *phys_ram = g_new(MemoryRegion, 1);
> qemu_irq irq[32];
> ResetInfo *reset_info;
> int i;
>
> + if (machine->ram_size != mc->default_ram_size) {
> + char *sz = size_to_str(mc->default_ram_size);
> + error_report("Invalid RAM size, should be %s", sz);
> + g_free(sz);
> + exit(EXIT_FAILURE);
> + }
> +
> /* memory map */
> hwaddr flash_base = 0x04000000;
> size_t flash_sector_size = 256 * KiB;
> size_t flash_size = 32 * MiB;
> hwaddr ram_base = 0x08000000;
> - size_t ram_size = 64 * MiB;
> hwaddr timer0_base = 0x80002000;
> hwaddr uart0_base = 0x80006000;
> hwaddr timer1_base = 0x8000a000;
> @@ -107,9 +114,7 @@ static void lm32_evr_init(MachineState *machine)
>
> reset_info->flash_base = flash_base;
>
> - memory_region_allocate_system_memory(phys_ram, NULL, "lm32_evr.sdram",
> - ram_size);
> - memory_region_add_subregion(address_space_mem, ram_base, phys_ram);
> + memory_region_add_subregion(address_space_mem, ram_base, machine->ram);
>
> dinfo = drive_get(IF_PFLASH, 0, 0);
> /* Spansion S29NS128P */
> @@ -144,7 +149,7 @@ static void lm32_evr_init(MachineState *machine)
>
> if (kernel_size < 0) {
> kernel_size = load_image_targphys(kernel_filename, ram_base,
> - ram_size);
> + machine->ram_size);
> reset_info->bootstrap_pc = ram_base;
> }
>
> @@ -159,6 +164,7 @@ static void lm32_evr_init(MachineState *machine)
>
> static void lm32_uclinux_init(MachineState *machine)
> {
> + MachineClass *mc = MACHINE_GET_CLASS(machine);
> const char *kernel_filename = machine->kernel_filename;
> const char *kernel_cmdline = machine->kernel_cmdline;
> const char *initrd_filename = machine->initrd_filename;
> @@ -166,18 +172,23 @@ static void lm32_uclinux_init(MachineState *machine)
> CPULM32State *env;
> DriveInfo *dinfo;
> MemoryRegion *address_space_mem = get_system_memory();
> - MemoryRegion *phys_ram = g_new(MemoryRegion, 1);
> qemu_irq irq[32];
> HWSetup *hw;
> ResetInfo *reset_info;
> int i;
>
> + if (machine->ram_size != mc->default_ram_size) {
> + char *sz = size_to_str(mc->default_ram_size);
> + error_report("Invalid RAM size, should be %s", sz);
> + g_free(sz);
> + exit(EXIT_FAILURE);
> + }
> +
> /* memory map */
> hwaddr flash_base = 0x04000000;
> size_t flash_sector_size = 256 * KiB;
> size_t flash_size = 32 * MiB;
> hwaddr ram_base = 0x08000000;
> - size_t ram_size = 64 * MiB;
> hwaddr uart0_base = 0x80000000;
> hwaddr timer0_base = 0x80002000;
> hwaddr timer1_base = 0x80010000;
> @@ -200,9 +211,7 @@ static void lm32_uclinux_init(MachineState *machine)
>
> reset_info->flash_base = flash_base;
>
> - memory_region_allocate_system_memory(phys_ram, NULL,
> - "lm32_uclinux.sdram", ram_size);
> - memory_region_add_subregion(address_space_mem, ram_base, phys_ram);
> + memory_region_add_subregion(address_space_mem, ram_base, machine->ram);
>
> dinfo = drive_get(IF_PFLASH, 0, 0);
> /* Spansion S29NS128P */
> @@ -238,7 +247,7 @@ static void lm32_uclinux_init(MachineState *machine)
>
> if (kernel_size < 0) {
> kernel_size = load_image_targphys(kernel_filename, ram_base,
> - ram_size);
> + machine->ram_size);
> reset_info->bootstrap_pc = ram_base;
> }
>
> @@ -252,7 +261,7 @@ static void lm32_uclinux_init(MachineState *machine)
> hw = hwsetup_init();
> hwsetup_add_cpu(hw, "LM32", 75000000);
> hwsetup_add_flash(hw, "flash", flash_base, flash_size);
> - hwsetup_add_ddr_sdram(hw, "ddr_sdram", ram_base, ram_size);
> + hwsetup_add_ddr_sdram(hw, "ddr_sdram", ram_base, machine->ram_size);
> hwsetup_add_timer(hw, "timer0", timer0_base, timer0_irq);
> hwsetup_add_timer(hw, "timer1_dev_only", timer1_base, timer1_irq);
> hwsetup_add_timer(hw, "timer2_dev_only", timer2_base, timer2_irq);
> @@ -288,6 +297,8 @@ static void lm32_evr_class_init(ObjectClass *oc, void *data)
> mc->init = lm32_evr_init;
> mc->is_default = 1;
> mc->default_cpu_type = LM32_CPU_TYPE_NAME("lm32-full");
> + mc->default_ram_size = 64 * MiB;
> + mc->default_ram_id = "lm32_evr.sdram";
> }
>
> static const TypeInfo lm32_evr_type = {
> @@ -304,6 +315,8 @@ static void lm32_uclinux_class_init(ObjectClass *oc, void *data)
> mc->init = lm32_uclinux_init;
> mc->is_default = 0;
> mc->default_cpu_type = LM32_CPU_TYPE_NAME("lm32-full");
> + mc->default_ram_size = 64 * MiB;
> + mc->default_ram_id = "lm32_uclinux.sdram";
> }
>
> static const TypeInfo lm32_uclinux_type = {
>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
next prev parent reply other threads:[~2020-02-18 17:27 UTC|newest]
Thread overview: 187+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-17 17:33 [PATCH v5 00/79] refactor main RAM allocation to use hostmem backend Igor Mammedov
2020-02-17 17:33 ` [PATCH v5 01/79] numa: remove deprecated -mem-path fallback to anonymous RAM Igor Mammedov
2020-02-17 18:42 ` Richard Henderson
2020-02-17 17:33 ` [PATCH v5 02/79] machine: introduce memory-backend property Igor Mammedov
2020-02-17 18:43 ` Richard Henderson
2020-02-18 17:10 ` Philippe Mathieu-Daudé
2020-02-17 17:33 ` [PATCH v5 03/79] machine: alias -mem-path and -mem-prealloc into memory-foo backend Igor Mammedov
2020-02-17 17:33 ` [PATCH v5 04/79] machine: introduce convenience MachineState::ram Igor Mammedov
2020-02-17 18:45 ` Richard Henderson
2020-02-17 17:33 ` [PATCH v5 05/79] initialize MachineState::ram in NUMA case Igor Mammedov
2020-02-17 17:33 ` [PATCH v5 06/79] vl.c: move -m parsing after memory backends has been processed Igor Mammedov
2020-02-17 17:33 ` [PATCH v5 07/79] vl.c: ensure that ram_size matches size of machine.memory-backend Igor Mammedov
2020-02-17 18:47 ` Richard Henderson
2020-02-17 17:33 ` [PATCH v5 08/79] alpha/dp264: use memdev for RAM Igor Mammedov
2020-02-17 17:33 ` [PATCH v5 09/79] arm/aspeed: actually check RAM size Igor Mammedov
2020-02-17 18:48 ` Richard Henderson
2020-02-17 17:33 ` [PATCH v5 10/79] arm/aspeed: use memdev for RAM Igor Mammedov
2020-02-17 18:48 ` Richard Henderson
2020-02-17 17:33 ` [PATCH v5 11/79] arm/collie: " Igor Mammedov
2020-02-17 18:49 ` Richard Henderson
2020-02-18 17:16 ` Philippe Mathieu-Daudé
2020-02-19 13:44 ` Igor Mammedov
2020-02-19 14:05 ` Philippe Mathieu-Daudé
2020-02-17 17:33 ` [PATCH v5 12/79] arm/cubieboard: " Igor Mammedov
2020-02-17 18:50 ` Richard Henderson
2020-02-17 17:33 ` [PATCH v5 13/79] arm/digic_boards: " Igor Mammedov
2020-02-17 18:51 ` Richard Henderson
2020-02-18 17:18 ` Philippe Mathieu-Daudé
2020-02-17 17:33 ` [PATCH v5 14/79] arm/highbank: " Igor Mammedov
2020-02-17 18:52 ` Richard Henderson
2020-02-17 17:33 ` [PATCH v5 15/79] arm/imx25_pdk: drop RAM size fixup Igor Mammedov
2020-02-17 18:56 ` Richard Henderson
2020-02-18 6:51 ` Philippe Mathieu-Daudé
2020-02-18 15:42 ` [PATCH v6 " Igor Mammedov
2020-02-17 17:33 ` [PATCH v5 16/79] arm/imx25_pdk: use memdev for RAM Igor Mammedov
2020-02-17 18:57 ` Richard Henderson
2020-02-17 17:33 ` [PATCH v5 17/79] arm/integratorcp: " Igor Mammedov
2020-02-17 18:58 ` Richard Henderson
2020-02-18 6:55 ` Philippe Mathieu-Daudé
2020-02-18 8:04 ` Igor Mammedov
2020-02-18 16:41 ` Igor Mammedov
2020-02-18 17:09 ` Philippe Mathieu-Daudé
2020-02-17 17:33 ` [PATCH v5 18/79] arm/kzm: drop RAM size fixup Igor Mammedov
2020-02-17 18:58 ` Richard Henderson
2020-02-17 17:33 ` [PATCH v5 19/79] arm/kzm: use memdev for RAM Igor Mammedov
2020-02-17 18:59 ` Richard Henderson
2020-02-17 17:33 ` [PATCH v5 20/79] arm/mcimx6ul-evk: " Igor Mammedov
2020-02-17 19:00 ` Richard Henderson
2020-02-18 17:18 ` Philippe Mathieu-Daudé
2020-02-17 17:33 ` [PATCH v5 21/79] arm/mcimx7d-sabre: " Igor Mammedov
2020-02-17 19:01 ` Richard Henderson
2020-02-17 17:33 ` [PATCH v5 22/79] arm/mps2-tz: " Igor Mammedov
2020-02-17 19:02 ` Richard Henderson
2020-02-18 6:56 ` Philippe Mathieu-Daudé
2020-02-17 17:33 ` [PATCH v5 23/79] arm/mps2: " Igor Mammedov
2020-02-17 19:03 ` Richard Henderson
2020-02-18 6:57 ` Philippe Mathieu-Daudé
2020-02-17 17:33 ` [PATCH v5 24/79] arm/musicpal: " Igor Mammedov
2020-02-17 19:11 ` Richard Henderson
2020-02-18 6:58 ` Philippe Mathieu-Daudé
2020-02-18 8:59 ` Igor Mammedov
2020-02-18 17:29 ` Richard Henderson
2020-02-17 17:33 ` [PATCH v5 25/79] arm/nseries: " Igor Mammedov
2020-02-17 19:12 ` Richard Henderson
2020-02-17 17:33 ` [PATCH v5 26/79] arm/omap_sx1: " Igor Mammedov
2020-02-17 19:13 ` Richard Henderson
2020-02-18 17:20 ` Philippe Mathieu-Daudé
2020-02-17 17:34 ` [PATCH v5 27/79] arm/palm: " Igor Mammedov
2020-02-17 19:14 ` Richard Henderson
2020-02-18 17:22 ` Philippe Mathieu-Daudé
2020-02-19 13:44 ` Igor Mammedov
2020-02-19 14:05 ` Philippe Mathieu-Daudé
2020-02-17 17:34 ` [PATCH v5 28/79] arm/sabrelite: " Igor Mammedov
2020-02-17 19:17 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 29/79] arm/raspi: " Igor Mammedov
2020-02-17 18:06 ` Philippe Mathieu-Daudé
2020-02-17 19:17 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 30/79] arm/sbsa-ref: " Igor Mammedov
2020-02-17 19:18 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 31/79] arm/versatilepb: " Igor Mammedov
2020-02-17 19:18 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 32/79] arm/vexpress: " Igor Mammedov
2020-02-17 19:20 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 33/79] arm/virt: " Igor Mammedov
2020-02-17 19:20 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 34/79] arm/xilinx_zynq: drop RAM size fixup Igor Mammedov
2020-02-17 19:23 ` Richard Henderson
2020-02-18 17:23 ` Philippe Mathieu-Daudé
2020-02-19 13:44 ` Igor Mammedov
2020-02-19 14:07 ` Philippe Mathieu-Daudé
2020-02-17 17:34 ` [PATCH v5 35/79] arm/xilinx_zynq: use memdev for RAM Igor Mammedov
2020-02-17 19:24 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 36/79] arm/xlnx-versal-virt: " Igor Mammedov
2020-02-17 19:25 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 37/79] arm/xlnx-zcu102: " Igor Mammedov
2020-02-17 19:25 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 38/79] s390x/s390-virtio-ccw: " Igor Mammedov
2020-02-17 19:26 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 39/79] null-machine: " Igor Mammedov
2020-02-17 19:26 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 40/79] cris/axis_dev88: " Igor Mammedov
2020-02-17 19:27 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 41/79] hppa: " Igor Mammedov
2020-02-17 18:33 ` Richard Henderson
2020-02-18 7:00 ` Philippe Mathieu-Daudé
2020-02-17 17:34 ` [PATCH v5 42/79] x86/microvm: " Igor Mammedov
2020-02-17 19:27 ` Richard Henderson
2020-02-18 17:25 ` Philippe Mathieu-Daudé
2020-02-17 17:34 ` [PATCH v5 43/79] x86/pc: " Igor Mammedov
2020-02-17 19:28 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 44/79] lm32/lm32_boards: " Igor Mammedov
2020-02-17 19:29 ` Richard Henderson
2020-02-18 17:26 ` Philippe Mathieu-Daudé [this message]
2020-02-17 17:34 ` [PATCH v5 45/79] lm32/milkymist: " Igor Mammedov
2020-02-17 19:29 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 46/79] m68k/an5206: " Igor Mammedov
2020-02-17 19:30 ` Richard Henderson
2020-02-18 17:44 ` Philippe Mathieu-Daudé
2020-02-17 17:34 ` [PATCH v5 47/79] m68k/q800: " Igor Mammedov
2020-02-17 19:30 ` Richard Henderson
2020-02-18 7:05 ` Philippe Mathieu-Daudé
2020-02-17 17:34 ` [PATCH v5 48/79] m68k/mcf5208: " Igor Mammedov
2020-02-17 19:30 ` Richard Henderson
2020-02-18 17:44 ` Philippe Mathieu-Daudé
2020-02-17 17:34 ` [PATCH v5 49/79] m68k/next-cube: " Igor Mammedov
2020-02-17 19:31 ` Richard Henderson
2020-02-18 7:04 ` Philippe Mathieu-Daudé
2020-02-17 17:34 ` [PATCH v5 50/79] mips/boston: " Igor Mammedov
2020-02-17 17:34 ` [PATCH v5 51/79] mips/mips_fulong2e: drop RAM size fixup Igor Mammedov
2020-02-18 17:29 ` Philippe Mathieu-Daudé
2020-02-17 17:34 ` [PATCH v5 52/79] mips/mips_fulong2e: use memdev for RAM Igor Mammedov
2020-02-18 17:28 ` Philippe Mathieu-Daudé
2020-02-17 17:34 ` [PATCH v5 53/79] mips/mips_jazz: " Igor Mammedov
2020-02-17 17:34 ` [PATCH v5 54/79] mips/mips_jazz: add max ram size check Igor Mammedov
2020-02-17 17:34 ` [PATCH v5 55/79] mips/mips_malta: use memdev for RAM Igor Mammedov
2020-02-17 17:34 ` [PATCH v5 56/79] mips/mips_mipssim: " Igor Mammedov
2020-02-17 17:34 ` [PATCH v5 57/79] mips/mips_r4k: " Igor Mammedov
2020-02-17 17:34 ` [PATCH v5 58/79] ppc/e500: drop RAM size fixup Igor Mammedov
2020-02-17 19:32 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 59/79] ppc/e500: use memdev for RAM Igor Mammedov
2020-02-17 19:32 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 60/79] ppc/mac_newworld: " Igor Mammedov
2020-02-17 19:32 ` Richard Henderson
2020-02-18 17:46 ` Philippe Mathieu-Daudé
2020-02-17 17:34 ` [PATCH v5 61/79] ppc/mac_oldworld: " Igor Mammedov
2020-02-17 19:32 ` Richard Henderson
2020-02-18 17:46 ` Philippe Mathieu-Daudé
2020-02-17 17:34 ` [PATCH v5 62/79] ppc/pnv: " Igor Mammedov
2020-02-17 19:33 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 63/79] ppc/ppc405_boards: add RAM size checks Igor Mammedov
2020-02-17 19:34 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 64/79] ppc/ppc405_boards: use memdev for RAM Igor Mammedov
2020-02-17 19:37 ` Richard Henderson
2020-02-18 15:43 ` [PATCH v6 " Igor Mammedov
2020-02-17 17:34 ` [PATCH v5 65/79] ppc/{ppc440_bamboo, sam460ex}: drop RAM size fixup Igor Mammedov
2020-02-17 17:34 ` [PATCH v5 66/79] ppc/{ppc440_bamboo, sam460ex}: use memdev for RAM Igor Mammedov
2020-02-18 15:45 ` [PATCH v6 " Igor Mammedov
2020-02-17 17:34 ` [PATCH v5 67/79] ppc/spapr: " Igor Mammedov
2020-02-17 19:39 ` Richard Henderson
2020-02-18 17:30 ` Philippe Mathieu-Daudé
2020-02-17 17:34 ` [PATCH v5 68/79] ppc/virtex_ml507: " Igor Mammedov
2020-02-17 19:40 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 69/79] sparc/leon3: " Igor Mammedov
2020-02-17 19:40 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 70/79] sparc/sun4m: " Igor Mammedov
2020-02-17 17:34 ` [PATCH v5 71/79] sparc/niagara: " Igor Mammedov
2020-02-17 19:42 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 72/79] remove no longer used memory_region_allocate_system_memory() Igor Mammedov
2020-02-17 18:37 ` Richard Henderson
2020-02-18 17:40 ` Philippe Mathieu-Daudé
2020-02-17 17:34 ` [PATCH v5 73/79] exec: cleanup qemu_minrampagesize()/qemu_maxrampagesize() Igor Mammedov
2020-02-17 18:39 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 74/79] exec: drop bogus mem_path from qemu_ram_alloc_from_fd() Igor Mammedov
2020-02-17 18:40 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 75/79] make mem_path local variable Igor Mammedov
2020-02-17 18:40 ` Richard Henderson
2020-02-17 17:34 ` [PATCH v5 76/79] hostmem: introduce "prealloc-threads" property Igor Mammedov
2020-02-17 17:34 ` [PATCH v5 77/79] hostmem: fix strict bind policy Igor Mammedov
2020-02-17 17:34 ` [PATCH v5 78/79] tests/numa-test: make top level args dynamic and g_autofree(cli) cleanups Igor Mammedov
2020-02-17 17:34 ` [PATCH v5 79/79] tests:numa-test: use explicit memdev to specify node RAM Igor Mammedov
2020-02-18 17:51 ` Philippe Mathieu-Daudé
2020-02-19 13:00 ` Igor Mammedov
2020-02-19 14:06 ` Philippe Mathieu-Daudé
2020-02-19 14:30 ` Igor Mammedov
2020-02-17 20:44 ` [PATCH v5 00/79] refactor main RAM allocation to use hostmem backend no-reply
2020-02-18 15:47 ` Igor Mammedov
2020-02-18 15:50 ` Igor Mammedov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=30cd5be3-6a52-0145-abb9-8b4373128daf@redhat.com \
--to=philmd@redhat.com \
--cc=imammedo@redhat.com \
--cc=michael@walle.cc \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).