From owner-freebsd-xen@freebsd.org Fri May 18 00:10:19 2018 Return-Path: Delivered-To: freebsd-xen@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 76B66EE400A for ; Fri, 18 May 2018 00:10:19 +0000 (UTC) (envelope-from nathan.friess@gmail.com) Received: from mail-pl0-x244.google.com (mail-pl0-x244.google.com [IPv6:2607:f8b0:400e:c01::244]) (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 DB5CE7C4F0; Fri, 18 May 2018 00:10:18 +0000 (UTC) (envelope-from nathan.friess@gmail.com) Received: by mail-pl0-x244.google.com with SMTP id v24-v6so3494066plo.3; Thu, 17 May 2018 17:10:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Zl3ZYXvCLILo9jg6bhq4TBcSr1uMttZS7dr0EKPYleM=; b=ZpN2DVUAExl0QBVAEPdn1KLXVYUBFHtH+Cu62LR4kNjvqgvwx4xrFUnGAZhdwThXp2 VxnShrFr3BblAjgUTqQXpjnz9vKgqMPVTOn0dvgTmsvaUp48c6xaaRdjdgcYKGxHUOkF uZMi8woZVVUfutgDZk6Q96mZi2NehuNkRrOMvSVu9H8tgRsAdQ/5LBVaumAAVPBLKLso FVkt1Ybu/kXgHNILcsvWkO29MqiPjYrje6SsjX90PgLFSnSZa3JaQOxSvQhMBErDvgBg ouk03ZSVh420jUJ/itWt1O2w9gNZz/fxR6oq/5boAt5nempEEAe6eDfC/2GCdH5llSJh 2z9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Zl3ZYXvCLILo9jg6bhq4TBcSr1uMttZS7dr0EKPYleM=; b=PL54+FMxkRg6WFhIlgsfIPb11NGkmXMakLz/FEH4zDmrujFsYbW4cxFyAfoCyJcAvK qE0P2wHebo43hZCpV3O5Os8VRVCwxpEXQnrqmZMS9Acpjc4NbmeeWszIkyyv7XWrDsrH zLRMhnHVBpFyGErwiuiVtp0STVhiSe+BDsRfR9yiaOuKhkQV5DfDRYkxCWg3lFXuZ2LI VoWRbIVjTwX+bmPm15SJu7Lh9K7xExp4VL6VXvRp1DCcbRdIyKlZ9t2ipwx1P9RpGvj8 4/XOaJYlSxz+XK94PKoABFGZa8rBjPfpmma9K3RRM2MB3B+J3vNZ6AGJM/of4WZ3KE2b cRhQ== X-Gm-Message-State: ALKqPwdcsz8iKdYMUJdcgpPAiId9x1VSJN5O1TYzL1PlIL6ZWbv6rqNq PDkJ1CkVJlUEjsf3wqbShmu/9IWp X-Google-Smtp-Source: AB8JxZogIONfYwpR6WolJOVgjq3Rmwht6gCwdPkSYO+EzOPr5A8x2Kah9udqU9txoV5OQ3nPm6kjMQ== X-Received: by 2002:a17:902:8541:: with SMTP id d1-v6mr7479916plo.106.1526602217431; Thu, 17 May 2018 17:10:17 -0700 (PDT) Received: from [10.2.1.1] (S01060018e7c4b870.cg.shawcable.net. [70.72.182.108]) by smtp.gmail.com with ESMTPSA id t9-v6sm9163329pgr.37.2018.05.17.17.10.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 May 2018 17:10:17 -0700 (PDT) Subject: Re: Linux domU only works with xen_platform_pci=0 ? To: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Cc: freebsd-xen@freebsd.org References: <20180513151649.4ls73myegkhm3cep@MacBook-Pro-de-Roger.local> <0749df4b-1614-dcdf-1bf2-1bbad1ae5743@duckster.net> <20180514130445.ahqk5ol3kdhriqju@MacBook-Pro-de-Roger.local> <6c0e1f5a-3e7d-054e-298c-5ec3d97e6141@gmail.com> <20180515080836.kufr3q3mk5mxwx4q@MacBook-Pro-de-Roger.local> From: Nathan Friess Message-ID: Date: Thu, 17 May 2018 18:10:15 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180515080836.kufr3q3mk5mxwx4q@MacBook-Pro-de-Roger.local> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 May 2018 00:10:19 -0000 On 2018-05-15 02:08 AM, Roger Pau Monné wrote: > On Mon, May 14, 2018 at 08:34:54PM -0600, Nathan Friess wrote: >> >> I had similar issues with Linux domUs being unable to detect their disks >> when FreeBSD 11.1-RELEASE is the backend: >> >> https://lists.freebsd.org/pipermail/freebsd-xen/2016-December/002924.html >> >> >> What seems to be happening is that on my system the frontend and backend may >> go from state InitWait to Initialised in different orders and so either end >> may end up getting stuck waiting for the other side to change state when the >> other side already has done so. >> >> I have been running with the attached patch since my last message above and >> Linux domUs have been working perfectly since then. I realize that the call >> to pause() is not the correct solution but it demonstrates that some fine >> tuning of how the states are handled will help. > > Can you please give a try to the patch at: > > https://lists.freebsd.org/pipermail/freebsd-xen/2018-May/003132.html > > I think this is the proper way to solve the issue, and I would like to > commit it ASAP in order to MFC it to stable-11 before 11.2 is > released, but it could benefit from some more testing. > > Thanks, Roger. > I tried the patch on and I my Linux domU did was not able to complete the attachment to the FreeBSD backend. I applied the patch to the 11-RELEASE kernel. (I couldn't get 11-STABLE to compile.) With xen_platform_pci=0 the frontend and backend vbds were both stuck in state 1. With xen_platform_pci=1 the frontend was in state 1 and backend in state 3. This second case is one that I think was happening before and why I added the pause as a hack. Things seems to work best if both ends see each other go into state 2 and then proceed from there. Adding the pause back in allows the frontend to go into state 3 but for some reason the backend stays in state 2. So the above patch is an improvement but it is still possible to miss state changes. I didn't have time last night to do full debugging to see why the backend didn't move from state 2 to 3 in the last case. Nathan