From owner-freebsd-virtualization@freebsd.org Fri Mar 23 17:32:11 2018 Return-Path: Delivered-To: freebsd-virtualization@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 B866CF5CF88 for ; Fri, 23 Mar 2018 17:32:11 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-lf0-f51.google.com (mail-lf0-f51.google.com [209.85.215.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2D65D818BD; Fri, 23 Mar 2018 17:32:10 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-lf0-f51.google.com with SMTP id l4-v6so15090974lfg.12; Fri, 23 Mar 2018 10:32:10 -0700 (PDT) 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=0LAzJzfKTL3JkGerfOdR+5sAp2tQonI2yftIZa8MMf0=; b=HSN+9V0kGEEx+3GtvqUwyzMSwcBzrXrZ60G9Cq2M2uH+/5jRr0nKhiKWXQRpXVzvnP H1EA53ougU8oQ+vpI303MgwU7qFmyORzcP7tChdIcu2UBhFZvprOE3/v+eSxIV2U5rOB MF72Ei2w0Utpa0S6sWWZM8V0kUTnhY3uoB7dRo9+DjhFc4ILj3EoOlLzmIN8yHH20qYi XmMnbAlF/Tr7NXWFg6rWidl8XdS/hDV0UL0VUS9aSdRQS0hSIoDyZRUCEFKhHnlhVY3g hYQfvTDvz+xqZqMS2+WMMHC/nKAI8MbAGzOl9tQBvxqReayup54K3HFEk3e/J84dhU8c nvbQ== X-Gm-Message-State: AElRT7FrLlliUG9UvyNjj4oBkIO44fYvuQSmRt12yeSla027K8WQXrQq 7fXoifMhJJ+XP+cyqJeuMFDMzCZVd0M= X-Google-Smtp-Source: AG47ELtKSF2UyfD+xKUlBIdFftqfrEPpe8tiY3twK3kfwd3Nwl9MeKTrVTy+UEXBeEx3C0/DADkxWQ== X-Received: by 10.46.91.143 with SMTP id m15mr10523370lje.75.1521826328920; Fri, 23 Mar 2018 10:32:08 -0700 (PDT) Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com. [209.85.215.50]) by smtp.gmail.com with ESMTPSA id n5sm1975371ljc.71.2018.03.23.10.32.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Mar 2018 10:32:08 -0700 (PDT) Received: by mail-lf0-f50.google.com with SMTP id g203-v6so19397453lfg.11; Fri, 23 Mar 2018 10:32:08 -0700 (PDT) X-Received: by 2002:a19:c4c8:: with SMTP id u191-v6mr21299249lff.109.1521826328646; Fri, 23 Mar 2018 10:32:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.46.129.90 with HTTP; Fri, 23 Mar 2018 10:31:48 -0700 (PDT) In-Reply-To: <201803231458.w2NEwMr7031548@pdx.rh.CN85.dnsmgr.net> References: <201803231458.w2NEwMr7031548@pdx.rh.CN85.dnsmgr.net> From: Kyle Evans Date: Fri, 23 Mar 2018 12:31:48 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Issue encountered booting FreeBSD STABLE and CURRENT snapshots with EFI To: "Rodney W. Grimes" Cc: Joe Maloney , Warner Losh , "freebsd-virtualization@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Mar 2018 17:32:12 -0000 On Fri, Mar 23, 2018 at 9:58 AM, Rodney W. Grimes wrote: >> On Fri, Mar 23, 2018 at 3:56 AM, Joe Maloney wrote: >> > We narrowed the issue down to how vm-bhyve attaches a null.iso when starting >> > the VM. >> > >> >> What exactly are the contents of this null.iso? It sounds like we're > > touch "null.iso" > -rw-r--r-- 1 root wheel 0 Dec 3 22:55 /home/vmbhyve/.config/null.iso > > It is litterly a 0 byte file. This is just there to appease windows > installer that you have a cd drive. > > You can test with bhyve yourself this problem by adding: > -s 3:0,ahci-cd,${vm_dir}/.config/null.iso > to your bhyve command. > Thanks for that! A couple hundred printf's later, I think this might be a firmware bug or something of the sort (?). In this loop [1], the address at 'dp' is getting immediately clobbered by the efi_lookup_devpath on every iteration, so we end up looking at basically all of the partitions and this null.iso unfortunately meets this criteria [2] for removable media with no media present. Therefore, we detect absolutely no disks. The only candidate in efi_lookup_devpath [3] is the firmware itself having overwritten the devpath at that address. We can confirm this with a printf just after the efi_lookup_devpath- the pointer it's returning is in fact exactly match 'dp' every single time. Is there a newer/different firmware you can try? This seems like really peculiar behavior for a firmware to be exhibiting. [1] https://svnweb.freebsd.org/base/head/stand/efi/libefi/efipart.c?view=markup#l232 [2] https://svnweb.freebsd.org/base/head/stand/efi/libefi/efipart.c?view=markup#l261 [3] https://svnweb.freebsd.org/base/head/stand/efi/libefi/devpath.c?view=markup#l53