From owner-soc-status@freebsd.org Mon Jul 20 08:47:30 2015 Return-Path: Delivered-To: soc-status@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FFA29A6FEB for ; Mon, 20 Jul 2015 08:47:30 +0000 (UTC) (envelope-from tuchalia@gmail.com) Received: from mail-lb0-x232.google.com (mail-lb0-x232.google.com [IPv6:2a00:1450:4010:c04::232]) (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 AD0DF15C5; Mon, 20 Jul 2015 08:47:29 +0000 (UTC) (envelope-from tuchalia@gmail.com) Received: by lbbqi7 with SMTP id qi7so10699475lbb.3; Mon, 20 Jul 2015 01:47:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-type; bh=fvhktV+MdXDgzklfxV4JnTTkbbktE+uFRH2ac11MmyA=; b=GUttQfm45ExpWmmVeFefZF0FeNxH0GoWibkiqvC060/Y25A/gSwY8XTC+4ldcj+xQm 3Z7qVqnzU6+pSJyGCdIxwtPRP17e7LZvxP7n9oqIjwyoeSNR3GYzjun9p2cWhr290BJa Ga6rwEzTx1xGYe9xf05dG5Pb3tlq/yDwZg4lqQ8ches71F3pGm71cNm4IjS4dZxu2Ctm UtsjTpO+Q3B6c7SFsVW/vdX5CLMsCV3XgPCxhz0KNiIPgjnVSGwgOTN1VQK6FoJOER7W mHlam2lfwvK5QEIRutu5MbmGgrnmpa38lOD+XNyPeFXyi6w3SYjqUlSuoxyfH4yQEnf8 SLvw== X-Received: by 10.152.170.234 with SMTP id ap10mr26868974lac.28.1437382047514; Mon, 20 Jul 2015 01:47:27 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Daniel Peyrolon Date: Mon, 20 Jul 2015 08:47:17 +0000 Message-ID: Subject: Re: Status reports for "JIT for firewalling" To: "soc-status@freebsd.org" , George Neville-Neil Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: soc-status@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Summer of Code Status Reports and Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jul 2015 08:47:30 -0000 Hi everyone, This has not been a productive week. I've been so far unable to get the compiler working, I contacted David Chinsall as I said, and I have been looking to make everything works. The initialization process of LLVM is not working as expected, which may be related to a bad install (we have already disarded that), a bad building process, or a bad LLVM initialization process. Given the fact that the LLVM API has changed a lot since the last time, that may be possible. El s=C3=A1b., 11 jul. 2015 a las 12:24, Daniel Peyrolon () escribi=C3=B3: > Hi everyone, > > This last pair of weeks I've written the code needed to compile almost al= l > the rules, except those that modify control flow: call and skipto. For > those ones I will have to write them by hand on LLVM IR. > > I also started working on the testing code. I'm using conductor to > control the different hosts. I already have reserved a pair of hosts from > the netperf cluster in order to get that running. > > So far I haven't been able to test anything because the compiler is not > working yet, there has been a change in the API of LLVM since I last work= ed > with it, I sent an email to my past mentor, David Chisnall asking for > advice. > -- > Daniel > --=20 Daniel From owner-soc-status@freebsd.org Mon Jul 20 13:43:26 2015 Return-Path: Delivered-To: soc-status@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C02F9A6FEA for ; Mon, 20 Jul 2015 13:43:26 +0000 (UTC) (envelope-from gnn@freebsd.org) Received: from smtp.hungerhost.com (smtp.hungerhost.com [216.38.53.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F1127A4 for ; Mon, 20 Jul 2015 13:43:25 +0000 (UTC) (envelope-from gnn@freebsd.org) Received: from cpe-24-193-227-129.nyc.res.rr.com ([24.193.227.129]:57395 helo=[192.168.73.208]) by vps.hungerhost.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.85) (envelope-from ) id 1ZHBLo-0006XF-9G; Mon, 20 Jul 2015 09:43:24 -0400 From: "George Neville-Neil" To: "Daniel Peyrolon" Cc: soc-status@freebsd.org Subject: Re: Status reports for "JIT for firewalling" Date: Mon, 20 Jul 2015 09:43:12 -0400 Message-ID: <358A0094-61DE-4685-933F-EDED85A6A07C@freebsd.org> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Mailer: MailMate (1.9.2r5107) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - freebsd.org X-Get-Message-Sender-Via: vps.hungerhost.com: authenticated_id: gnn@neville-neil.com X-Source: X-Source-Args: X-Source-Dir: X-BeenThere: soc-status@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Summer of Code Status Reports and Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jul 2015 13:43:26 -0000 Seems like the next thing to do is build from source as David suggests. Best, George On 20 Jul 2015, at 4:47, Daniel Peyrolon wrote: > Hi everyone, > > This has not been a productive week. I've been so far unable to get > the > compiler working, I contacted David Chinsall as I said, and I have > been > looking to make everything works. The initialization process of LLVM > is not > working as expected, which may be related to a bad install (we have > already > disarded that), a bad building process, or a bad LLVM initialization > process. Given the fact that the LLVM API has changed a lot since the > last > time, that may be possible. > > El sáb., 11 jul. 2015 a las 12:24, Daniel Peyrolon > () > escribió: > >> Hi everyone, >> >> This last pair of weeks I've written the code needed to compile >> almost all >> the rules, except those that modify control flow: call and skipto. >> For >> those ones I will have to write them by hand on LLVM IR. >> >> I also started working on the testing code. I'm using conductor to >> control the different hosts. I already have reserved a pair of hosts >> from >> the netperf cluster in order to get that running. >> >> So far I haven't been able to test anything because the compiler is >> not >> working yet, there has been a change in the API of LLVM since I last >> worked >> with it, I sent an email to my past mentor, David Chisnall asking for >> advice. >> -- >> Daniel >> > -- > Daniel From owner-soc-status@freebsd.org Tue Jul 21 14:53:37 2015 Return-Path: Delivered-To: soc-status@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91F549A77A7 for ; Tue, 21 Jul 2015 14:53:37 +0000 (UTC) (envelope-from stefanogarzarella@gmail.com) Received: from mail-la0-x22b.google.com (mail-la0-x22b.google.com [IPv6:2a00:1450:4010:c03::22b]) (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 175EC1558; Tue, 21 Jul 2015 14:53:37 +0000 (UTC) (envelope-from stefanogarzarella@gmail.com) Received: by lahh5 with SMTP id h5so119547636lah.2; Tue, 21 Jul 2015 07:53:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:cc:content-type; bh=hS4ujbHtOcpwd5TiIjn9Psq2axTcLN+0WnlBhSDabNU=; b=dulvs3QNQ6QolShGv8rYpvHSRTEUJqmkhSyG9VnjeYxXDMR64Mt1l6PO4geMgoDpIn s3eZp0dURK5v2fBKabpjuKLJ20pwUZMlGzrrWHdz5dxxjWplRYIj8j2fdVYszXmkmM7s 6lBvjeUTMVaWP4T9b36TgFCg2J9y6pDVjBoxNOtzyMcwONTQsb2V6FY3tLTSZ4HDxCud CWrZH8s2+XOmakU9hKV3k/JmgEvEqEvO2+bEkgnfk78RbAZ3zuoLVCy6zNBcw/VPNT6f i20vOlT2GhtOMJw6yYDGFJGBSmV6i9ivXx5vY4Sth/eUnLKRWZtLJqOf1NfjZ0qeRLHL +D1A== X-Received: by 10.112.63.137 with SMTP id g9mr33210442lbs.121.1437490414979; Tue, 21 Jul 2015 07:53:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.216.3 with HTTP; Tue, 21 Jul 2015 07:53:15 -0700 (PDT) From: Stefano Garzarella Date: Tue, 21 Jul 2015 16:53:15 +0200 Message-ID: Subject: ptnetmap on bhyve status report To: soc-status@freebsd.org Cc: Luigi Rizzo , Peter Grehan , Neel Natu Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: soc-status@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Summer of Code Status Reports and Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2015 14:53:37 -0000 Dear All, I've successfully mapped the netmap memory in the guest VM last week. I added a new IOCTL in vmm.ko to map netmap memory (returned by the mmap() in the byvhe user space application) in the guest VM. In this way the netmap memory is shared between guest and host. After that I created a kthreads in netmap-host to comunicate with the netmap-guest through shared memory. Since I haven't yet implemented the notification mechanism, I tested it with busy-wait. Both netmap-guest and netmap-host continually poll the shared memory to wait new slots. The performance (guest->host & host->guest) is very good and it is very close to the native performance (host-host experiments) and Linux-KVM performance: - physical ixgbe device [14 Mpps ~line rate] - VALE software switches [24 Mpps] - netmap-pipes (shared memory channels) [50 Mpps] I'm going to start the last step: implement notification mechanism in bhyve/FreeBSD. We want to have a mechanism to exchange notifications between guest and host kthreads. The code is available on https://svnweb.freebsd.org/socsvn/soc2015/stefano/ptnetmap/stable/10/ Thanks, Stefano Garzarella. From owner-soc-status@freebsd.org Tue Jul 21 16:06:27 2015 Return-Path: Delivered-To: soc-status@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 970809A756E for ; Tue, 21 Jul 2015 16:06:27 +0000 (UTC) (envelope-from mihai.carabas@gmail.com) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) (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 1E74814F4 for ; Tue, 21 Jul 2015 16:06:27 +0000 (UTC) (envelope-from mihai.carabas@gmail.com) Received: by wibxm9 with SMTP id xm9so61966857wib.1 for ; Tue, 21 Jul 2015 09:06:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=sNWpnyuMNXNkT4IrtEqBVEU0gVZoF0I2w3YDSCEV99U=; b=us4oaqhDHogYqmSjCCRkDIRb7I68d/XEbmZMoF6iscDOaViaVKckgfhntma4kvE/9u x5zIMiwerYiJcRjHjTe+eFoKRH+Kf/taZ7WC2kjOp919b0l3JD/iwiH4jQn0KbDYZyJa +7GVVeALFwv7Ir6KGd6pgrU5zROKMpUB8Ejs5v8IvZPFwSq0KX7YUklSbkPTEGM0e/hU Fh8yZ5SbyUlAp+QVT1Nt5vF/9eshOsOt8zUl1Afsw8oLu0BOlHDPplUNByygiYTqezK5 TspSs2inDSvNgjOsvGu5SoIHzryfZC/SHELXo3f+epuWobqHxP+Y43O4fGZk4z3UiJwU U3/A== MIME-Version: 1.0 X-Received: by 10.180.20.15 with SMTP id j15mr33252948wie.76.1437494784826; Tue, 21 Jul 2015 09:06:24 -0700 (PDT) Received: by 10.28.21.134 with HTTP; Tue, 21 Jul 2015 09:06:24 -0700 (PDT) In-Reply-To: References: Date: Tue, 21 Jul 2015 19:06:24 +0300 Message-ID: Subject: Re: [GSOC] bhyve port on ARM - weekly status report From: Mihai Carabas To: soc-status@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: soc-status@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Summer of Code Status Reports and Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2015 16:06:27 -0000 Hi everyone, In the last week I've written the glue C code which is calling the ASM > methods to run a VM. The logic flow starts from userspace from bhyvearm > program (it's a duplicate of the normal bhyve due to its high dependency of > x86) using ioctl's to run the VM. > > I've also written a simplified bhyveloadarm which maps the desired memory > from the GPA indicated as a parameter (here I had to write the entire flow > from userspace to kernel because there were empty functions - the MMAP > ioctl). Than it loads the raw kernel image in the memory at a given > address. In the end I set up the PC using also an ioctl. > > I've created a new ramdisk containing the bhyvearm* programs and the > dynamic libraries they depend on. Then I've managed to make bhyveloadarm > to copy a file which contains the bytecode for the "wfi" instruction in the > guest memory and now I'm playing with bhyvearm to make the "guest" run that > instruction. I'm investigating a bug in restoring the host state after the > VM has run (the VM throws a data abort exception because I haven't > configured the VTCR yet and I'm trying to send this exception back in > bhyvearm userspace). > > Last week I fulfilled an important step: I've managed to execute an instruction in the VirtualMachine and returning back with the HYP expection caused by executing a "wfi" instruction (which is disabled by configuration). Than I've added two more operations: mov r0,1 and add r4, r0 , 4 and both are executing OK (tested even step-by-step in the debugger). Further, I've read the exception status registers (HSR, HIFAR, HDFAR, HPFAR) in hyp-mode just before returning to the host. I've read them all even some of them are in state unknown depending on the exception type. I will let the C code to verify this. I also had a design issue and I had to read these registers in "struct hypctx" first and when returning in the host, copy them back to the "vm_exit" structure which was stored in "struct vm" (which isn't mapped in HYP-mode and even if I map it, I have to do a lot of index calculation to place the values in the right place - so I've decided to duplicate the info). So right now, when executing the WFI instruction, it causes a HYP exception which sets VM_EXITCODE_HYP which will determine the userspace utility to exit. An issue that need to be tackled is the reset state of the coprocessor registers. I need to take them one-by-one and set this reset state probably using some state-table approach (like KVM is doing). Thank you, Mihai