From owner-freebsd-current@freebsd.org Thu Feb 21 17:45:01 2019 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3F3314E99E9; Thu, 21 Feb 2019 17:45:00 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48DB9852BC; Thu, 21 Feb 2019 17:44:59 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io1-f46.google.com with SMTP id p17so2573342iol.7; Thu, 21 Feb 2019 09:44:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=dJ6/a3DRNCGyibX6h37cgnjGH4CLo4LITPU8zp1HbMc=; b=FaliBfFsbOAdm9Fw8i6m0+m467Tj4aJe+SDq6LYrfW682yc9mZDgkdpZqx4jbBAh9c 2IF1vM7eipo/j6riytZHDwHlmYYDTd4vfrW8/nTZN9VlQ/xodptMSO+5lSKNBmdjnZGX V1AtnXvzcPphSqmpUiTRei/hyieSt001WO6otPo66HXFJVj7wpzL5ftupgp3wefHMTlT 0ggLth6pdTxfftwhqTe3Vgar9iPhdqUBruXXWvQN+lZt5MQCpMfZP8n2b/wTI6ezCLgA clMmv+YfGf83CcI/l4fynZS/amfw1q0lsf1jI5ni2rAUS/LFBxs1UhCHIH0HA0urDl0V GR7w== X-Gm-Message-State: AHQUAubjDadh+iOMPab9x6SotPmXmHiJXh4JanoJ3+iZ4AUva8ScLesX QcETds/jobeyLTXbYq60T/3gRLuR X-Google-Smtp-Source: AHgI3IawPhukg4kVsFRajsKJ+rb+jsnhyhqm19Z4gjEPZDXjmSIWDRHQ3ElJmZ0+Tp2/ccH/+iluYg== X-Received: by 2002:a5d:968a:: with SMTP id m10mr20955885ion.134.1550769356597; Thu, 21 Feb 2019 09:15:56 -0800 (PST) Received: from mail-io1-f45.google.com (mail-io1-f45.google.com. [209.85.166.45]) by smtp.gmail.com with ESMTPSA id y26sm9398234iob.16.2019.02.21.09.15.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Feb 2019 09:15:56 -0800 (PST) Received: by mail-io1-f45.google.com with SMTP id i5so2351356ioq.8; Thu, 21 Feb 2019 09:15:56 -0800 (PST) X-Received: by 2002:a02:4084:: with SMTP id n126mr17242787jaa.78.1550769356063; Thu, 21 Feb 2019 09:15:56 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Reply-To: cem@freebsd.org From: Conrad Meyer Date: Thu, 21 Feb 2019 09:15:45 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: r344398 Import ACPICA 20190215: breaks bhyve To: Oleg Ginzburg Cc: FreeBSD Current , "freebsd-virtualization@freebsd.org" , Jung-uk Kim Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 48DB9852BC X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of csecem@gmail.com designates 209.85.166.46 as permitted sender) smtp.mailfrom=csecem@gmail.com X-Spamd-Result: default: False [-5.96 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[cem@freebsd.org]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; FORGED_SENDER(0.30)[cem@freebsd.org,csecem@gmail.com]; IP_SCORE(-2.98)[ip: (-9.03), ipnet: 209.85.128.0/17(-3.80), asn: 15169(-1.99), country: US(-0.07)]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_NEQ_ENVFROM(0.00)[cem@freebsd.org,csecem@gmail.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[46.166.85.209.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2019 17:45:01 -0000 Oops, to the list this time. Hi Oleg, Those look like the ACPI lines bhyve attempts to generate and compile in basl_fwrite_madt(): 272 /* Legacy IRQ0 is connected to pin 2 of the IOAPIC */ 273 EFPRINTF(fp, "[0001]\t\tSubtable Type : 02\n"); 274 EFPRINTF(fp, "[0001]\t\tLength : 0A\n"); 275 EFPRINTF(fp, "[0001]\t\tBus : 00\n"); 276 EFPRINTF(fp, "[0001]\t\tSource : 00\n"); 277 EFPRINTF(fp, "[0004]\t\tInterrupt : 00000002\n"); 278 EFPRINTF(fp, "[0002]\t\tFlags (decoded below) : 0005\n"); ^^^ this line ("maximum 1 bit") 279 EFPRINTF(fp, "\t\t\tPolarity : 1\n"); 280 EFPRINTF(fp, "\t\t\tTrigger Mode : 1\n"); 281 EFPRINTF(fp, "\n"); 282 283 EFPRINTF(fp, "[0001]\t\tSubtable Type : 02\n"); 284 EFPRINTF(fp, "[0001]\t\tLength : 0A\n"); 285 EFPRINTF(fp, "[0001]\t\tBus : 00\n"); 286 EFPRINTF(fp, "[0001]\t\tSource : %02X\n", SCI_INT); 287 EFPRINTF(fp, "[0004]\t\tInterrupt : %08X\n", SCI_INT); ^^^ this line ("maximum 2 bit"; SCI_INT=3D=3D9) 288 EFPRINTF(fp, "[0002]\t\tFlags (decoded below) : 0000\n"); 289 EFPRINTF(fp, "\t\t\tPolarity : 3\n"); 290 EFPRINTF(fp, "\t\t\tTrigger Mode : 3\n"); 291 EFPRINTF(fp, "\n"); Would you mind filing a PR to track this investigation? The error message and constraint on Value being in range of BitLength was added to DtCompileFlag() in compiler/dtfield.c way back in r208625 (ACPICA 20100528) =E2=80=94 it's not new. What must be new is the idea tha= t these fields have a smaller bit width that the numbers bhyve has chosen, or bhyve's choice of numbers. We can eliminate bhyve as a suspect, maybe? acpi.c hasn't changed substantially for years. In fact, there is a seemingly related commit r272838 which converted some fields to hexadecimal in order to comply with length limitations. The first of these two tables was introduced in r257933 by tycho@ / neel@. The second was changed from a bare constant by jhb@ in r259998, but previously held the value 9. It dates to the original 2012 "ACPI support for bhyve" commit by grehan@ in r243327. So yeah, probably something changed recently in ACPICA. Best, Conrad On Thu, Feb 21, 2019 at 8:38 AM Oleg Ginzburg wrote: > > Hi, > > most likely r344398[1] commit breaks bhyve with the following errors: > > Subtable Type : 02 > Error 6302 - Flag value is too large ^ (Maximum 1 bit) > 58: [0002] Flags (decoded below) : 0005 > Error 6302 - Flag value is too large ^ (Maximum 2 b= it) > 66: [0004] Interrupt : 00000009 > Error 6302 - Flag value is too large ^ (Maximum 2 bit) > Assertion failed: (error =3D=3D 0), function main, file > /usr/src/usr.sbin/bhyve/bhyverun.c, line 1190. > > Can anyone else confirm this? > > Howto reproduce: > > fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/10.3/FreeBSD-= 10.3-RELEASE-amd64-bootonly.iso > > sh /usr/share/examples/bhyve/vmrun.sh -c 1 -m 1024M -i -I > FreeBSD-10.3-RELEASE-amd64-bootonly.iso guestname > > > __ > [1] - https://svnweb.freebsd.org/base?view=3Drevision&revision=3Dr344398 > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org= "