From owner-soc-status@freebsd.org Mon Jul 27 08:48:39 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 D3A0F9AB3C8 for ; Mon, 27 Jul 2015 08:48:39 +0000 (UTC) (envelope-from mihai.carabas@gmail.com) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) (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 5F9401FD for ; Mon, 27 Jul 2015 08:48:39 +0000 (UTC) (envelope-from mihai.carabas@gmail.com) Received: by wicgb10 with SMTP id gb10so101715061wic.1 for ; Mon, 27 Jul 2015 01:48:37 -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=ys4dKuZ9ceoVHDYKOViIWKVwwoge/GMBQh3Yc615xsk=; b=BWqDLpEj9djIFwci+sOHEi4mmolsRjCliQgtx3JMJy8GJHR89YX3qWL2jbKLAAplzK zRkLAyZquhXPr56Ge87zT2Bq3SofnO40WaJdnhY6GcmxcI+LGRMmaRu5PdO/F0vAZ2KK Wcdg+nZIifv3ErbJk+5/RJBo01y0Je/6H2N2Xz7ABISTqTwVXw9PGb27CpuDQKxQik0f Xa27+fym7VhIIcBVjpHvDpobFRizutYmtFZoNc+vH07UYjtXFBUKfIla1WLBBkN43KEz w08EoXH/3FH14F/+v93tOQkIcbgFMEPaka5GBU87jczLutvvufE88IUBDI/86BfLJK1M UeAg== MIME-Version: 1.0 X-Received: by 10.194.216.202 with SMTP id os10mr11966215wjc.13.1437986917587; Mon, 27 Jul 2015 01:48:37 -0700 (PDT) Received: by 10.28.21.134 with HTTP; Mon, 27 Jul 2015 01:48:37 -0700 (PDT) In-Reply-To: References: Date: Mon, 27 Jul 2015 11:48:37 +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: Mon, 27 Jul 2015 08:48:40 -0000 Hi everyone, 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). > > I've dropped the reset-state work. I've only set some of them to the compulsory value at the virtual machine creation. If needed I will come back to this issue. After a discussion with Peter, the next step was implementing emulation for memory access, basically to be able to emulate MMIO devices. I've started by decoding the HSR (syndrome register) and put prints on each exception type. Than I've interpreted that Data Abort Exception (DABT) caused by a stage-2 translation to be able to decode the instruction. I've saved the decoded instruction (read/write, the register number, the access size [b,h,w]) and the fault address and sent it to bhyve userspace utility. Here I've used the MMIO infrastructure taken from X86 to find an emulated address and call the instruction emulation function (vmm_emulate_instruction). Further I've implemented the instruction emulation function in sys/arm/vmm/vmm_instruction_emul.c to get the register value and call the memread/memwrite callbacks accordingly. At this point I have a functional MMIO emulation. I've started modifying the bvm_console with some conditional code for ARM to replace the inl/outl calls with some memory acccesses. I've used the consport.c from X86 to emulate the bvm_console. I've added some instructions to write some characters to memory, and these are printed ok. Further I've compiled a FreeBSD guest with bvm_console and ran it in bhyve. Here are the first prints of a FreeBSD guest running on bhyve-arm [1] after solving some tedious bugs (I was trashing some temporary registers which were saving the SCTRL and I was disabling the MMU in the guest whenever I was context-switching between host and guest). Further I'm continuing with solving different guest exceptions this week. Thank you, Mihai [1] # bhyvearm -b test initarm: console initialized arg1 kmdp = 0xc107a6d4 boothowto = 0x00000000 dtbp = 0xc0428708 lastaddr1: 0xc108c000 loader passed (static) kenv: no env, null ptr KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2015 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 11.0-CURRENT #23 r288062:288705M: Fri Jul 24 04:57:12 EEST 2015 root@freebsd64 :/root/obj/arm.armv6/root/soc2015/mihai/bhyve-on-arm-head/sys/ FVP_VE_CORTEX_A15x1_GUEST arm FreeBSD clang version 3.6.1 (tags/RELEASE_361/final 237755) 20150525 subsystem 1000000 0xc0328b60(0)... hyp_handle_exception:386 DABT from guest at address c112c000 without a stage-2 fault translation From owner-soc-status@freebsd.org Mon Jul 27 19:34:15 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 62B049ACB2B for ; Mon, 27 Jul 2015 19:34:15 +0000 (UTC) (envelope-from prasadjoshi.linux@gmail.com) Received: from mail-vn0-x22f.google.com (mail-vn0-x22f.google.com [IPv6:2607:f8b0:400c:c0f::22f]) (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 1DCB7CEC for ; Mon, 27 Jul 2015 19:34:15 +0000 (UTC) (envelope-from prasadjoshi.linux@gmail.com) Received: by vnds125 with SMTP id s125so34801051vnd.1 for ; Mon, 27 Jul 2015 12:34:14 -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 :cc:content-type; bh=RivDhUsNSdCkK0URXCbfZJJcxeG/J9mUHaAP5jS1WKk=; b=WBKnHEHtjonnMtgSSqn5GvdAzI/qDhLLDKbnJH2P9C7oo1BK5iedOUXttwj2RKpGqQ sooLHI0YwMCTaAkwOwtwTDqkE71WX+3Y3EsMqYdVv/SgFeD78sA6yjWlcLM+A3Am8jUb Ea98HuW5khY2ZxU+U0DJpmu6L2NuejCsnXoaH/dugMaIFo6kJuIL/LxSfhL3hpNiwig8 fJsycNBvC173ZMyYQpAubobQrhcL0fCXl8dsIxuU3bhItYT4HyEbnJi2whOx7vQD2jJE rF3MnqvrTDU7L+/2e+5/u4VwS/UOHFfi1gKPVBz3/3R9O9I0n4KzoodVUiwrxAp4LdBY Q+Fw== MIME-Version: 1.0 X-Received: by 10.52.122.52 with SMTP id lp20mr36889407vdb.64.1438025654073; Mon, 27 Jul 2015 12:34:14 -0700 (PDT) Received: by 10.31.50.6 with HTTP; Mon, 27 Jul 2015 12:34:14 -0700 (PDT) In-Reply-To: References: Date: Tue, 28 Jul 2015 01:04:14 +0530 Message-ID: Subject: Re: [gsoc15] dynamically discover bes From: Prasad Joshi To: soc-status@freebsd.org Cc: Xin LI Content-Type: text/plain; charset=UTF-8 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, 27 Jul 2015 19:34:15 -0000 Status report ========== The BEs menu is working. With my code changes, when machine is booted by default gptzfsboot tries to boot an active BE. However, if user presses any key, the code finds out all BEs and displays menu for selection to user. Once user selects a BE to boot from, appropriate information is passed to next stage of boot loader. Tasks for coming week ================= 1. I disabled some of the existing gptzfsboot code which handles serial console. I will try to enable it again and check if menu functionality works on serial console. Thanks and Regards, Prasad On Sun, Jul 12, 2015 at 10:03 PM, Prasad Joshi wrote: > Status report for past two weeks > ========================= > - Last two weeks I struggled to get non-active BE to boot completely - > after zfs mount -a all files in /dev/ used to disappear. Finally > disabling canmount property on each dataset helped me boot non-active > BEs. > > - I added code to pass mountpoint information from gptzfsboot to > zfsloader, then from zfsloader I could set vfs.root.mountfrom env > variable. > > - Added code to find timestamp of each BE clone, with this change BEs > could now be sorted on either timestamp, BE name, or object number > > Tasks For coming week > ================== > 1. start the initial implementation of menu functionality. > > On Tue, Jun 30, 2015 at 7:26 PM, Prasad Joshi > wrote: >> Week 5 Update >> >> - I did not work on GSoC for 3 days in this week. Had to attend full >> day sessions in the University. >> - Last week I was faced with a problem with booting alternate >> (non-active) BE. Plan in this week was to locate the problem. It seems >> like, during bootup zfsloader needs to initialize libzfs library. The >> libzfs library initialization fails because '/dev/zfs' cannot be >> opened. I verified the zfs kernel modules, which create the device are >> loaded. I think, and as suggested by mentor, I will have to set >> vfs.root.mountfrom environment variable during bootup. >> >> Thanks and Regards, >> Prasad >> >> On Mon, Jun 22, 2015 at 11:42 PM, Prasad Joshi >> wrote: >>> Week 4 update >>> >>> - I have been able to discover BEs on console. I could detect active BE. >>> Created list of BEs. Code to sort BEs on object number, name, or timestamp >>> is added. >>> >>> - I am able to boot from nonactive BE to some extent. At the moment, code >>> requires me to enter BE number to boot from. >>> >>> Tasks next week >>> 1. Identify a problem with be bootup. >>> 2. Pass mount point info through env variable to loader. >>> 3. Start with console based menu. >>> >>> Thanks and Regards, >>> Prasad >>> >>> On Jun 15, 2015 7:48 PM, "Prasad Joshi" wrote: >>>> >>>> Week 3 status >>>> ========== >>>> After understanding on disk representation of snapshots and clones, I >>>> have been able to find names of the BEs created using beadm command. I >>>> could print the BE names on console. >>>> >>>> The next task would be to convert BE names to object numbers, create >>>> list of BEs. >>>> >>>> Thanks and Regards, >>>> Prasad >>>> >>>> On Tue, Jun 9, 2015 at 6:36 AM, Prasad Joshi >>>> wrote: >>>> > Last week I mostly worked on understanding beadm and gptzfsboot code >>>> > >>>> > beadm create prepares new BE by creating a snapshot and clone of that >>>> > snapshot. beadm activate command sets bootfs property of the POOL. >>>> > bootfs property contains object number of active dataset object. >>>> > During bootup gptzfsboot probes all the disks, creating SPA for any >>>> > valid pool. gptzfsboot assumes the first pool it finds as a primary >>>> > pool, it then reads meta object set, then tries to find object nunber >>>> > of active dataset object either through >>>> > a. bootfs - it would be set if BE was already created >>>> > b. mos->properties_zap->root_dataset->dd_head_dataset_obj (through >>>> > root_datasets bonus buffer) >>>> > Once the object number is obtaind gptzfsboot mounts the dataset. >>>> > >>>> > After mounting, few files are looked up like /boot/config or >>>> > /boot.config for presense of boot command (did not went into details >>>> > of this). Then (if keyboard is not hit), gptzfsboot execs >>>> > /boot/zfsloader. If gptzfsboot is interrupted by keyboard, then it >>>> > displays default BE or POOL it is trying to boot from (using >>>> > zfs_rlookup() to map active dataset object to string BE name). Though >>>> > I haven't checked this but through serial console user would be >>>> > allowed to enter other pool or BE to boot from. >>>> > >>>> > I could not go into details of how gptzfsboot reads /boot/zfsloader from >>>> > disk. >>>> > >>>> > Pending Tasks >>>> > ============= >>>> > 1. Understand upon keyboard interruption, how user entered zfs paths >>>> > (format [zfs:pool/filesystem:][/path/to/loader]) are converted in >>>> > object numbers? >>>> > 2. Learn ZFS on disk format in more details so as to identify active >>>> > dataset object numbers of all BEs. Once the object numbers are >>>> > available, I can use zfs_rlookup() function to map object number to >>>> > printable pool name. >>>> > 3. Prepare library for console based menu. >>>> > >>>> > Plan for next week >>>> > ================== >>>> > Pending task 2 above From owner-soc-status@freebsd.org Mon Jul 27 20:36:19 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 2E0CF9AC8B0 for ; Mon, 27 Jul 2015 20:36:19 +0000 (UTC) (envelope-from tuchalia@gmail.com) Received: from mail-lb0-x231.google.com (mail-lb0-x231.google.com [IPv6:2a00:1450:4010:c04::231]) (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 A7489698; Mon, 27 Jul 2015 20:36:18 +0000 (UTC) (envelope-from tuchalia@gmail.com) Received: by lbbyj8 with SMTP id yj8so61456186lbb.0; Mon, 27 Jul 2015 13:36:15 -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 :cc:content-type; bh=h4dhc4f4NRwrg1umXDZ3NtZ8HtMRMz8RwXORbc+iyQc=; b=Vy1wmTW+ErLl+mrYwAlX0i+Lk44zC32loOUhSrFew6debx8W3qtf35z8Ya90ozodHy fWNkSfwwssnp8mhMNhfgwTqMaoKiaqICwBQKVg9jw6RhFpSy59COs7d1/ZuHzMV36GVa 84ho599+eNB2ZlMWSyas0NY08tnbEaCrAOM+ocuw+BOCl6tXJcnsibcV6ZZIWb5fjJfk NbTzjHyrkJL+HMZ/GxOfTwNR2zzL+JiIqO4xpb7xCuwSpNticfVVTQJZsHMBqM9DP88o Fw64dwx84IrPlEl2UMdHIcJoVY7u92r5WYlyFAX02SNEuGAJB46Ok8/E4HnVr7xv3kcH +dWQ== X-Received: by 10.112.40.51 with SMTP id u19mr28789999lbk.44.1438029375356; Mon, 27 Jul 2015 13:36:15 -0700 (PDT) MIME-Version: 1.0 References: <358A0094-61DE-4685-933F-EDED85A6A07C@freebsd.org> In-Reply-To: <358A0094-61DE-4685-933F-EDED85A6A07C@freebsd.org> From: Daniel Peyrolon Date: Mon, 27 Jul 2015 20:36:05 +0000 Message-ID: Subject: Re: Status reports for "JIT for firewalling" To: George Neville-Neil Cc: soc-status@freebsd.org 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, 27 Jul 2015 20:36:19 -0000 Hi again, Unfortunately I haven't been able to make any further progress. I've been having a lot of problems to get the compiler working. I tested many different hypotheses about the bug with no success so far, and I've talked with David Chisnall to see if he could lend me a hand and he has given me some pointers. So, hopefully, I'll be past this stage this week. El lun., 20 jul. 2015 a las 15:43, George Neville-Neil () escribi=C3=B3: > 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=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 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 > --=20 Daniel From owner-soc-status@freebsd.org Mon Jul 27 21:37:14 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 EF8D29AC48F for ; Mon, 27 Jul 2015 21:37:14 +0000 (UTC) (envelope-from mdw@freebsd.org) Received: from mehl.mmap.at (static.56.42.47.78.clients.your-server.de [78.47.42.56]) (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 181DA8AF; Mon, 27 Jul 2015 21:37:13 +0000 (UTC) (envelope-from mdw@freebsd.org) Received: from [192.168.43.206] (178.115.129.10.wireless.dyn.drei.com [178.115.129.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mehl.mmap.at (Postfix) with ESMTPSA id C6DAAB08E4; Mon, 27 Jul 2015 23:29:45 +0200 (CEST) Message-ID: <55B6A2C7.4080706@freebsd.org> Date: Mon, 27 Jul 2015 23:29:43 +0200 From: Manuel Wiesinger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: soc-status@FreeBSD.org Subject: Status: Linux packages for pkg(8) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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, 27 Jul 2015 21:37:15 -0000 Hi, Sorry for becoming lazy with the weekly status report and thanks to bapt@ for reminding me. Next report will be sent on Monday, August 3. This week (probably Friday) I will commit code to Github, that can read a Debian repository just like a FreeBSD-repo, including signature/hash validation of all downloaded files. This code will be in presentable form. Meaning, all extra cases are handled, error handling is done, unnecessary comments, dead code, nasty debug output, etc. is removed. I have code to download and extract Debian-packages too, but it is not yet shaped and not really integrated into pkg(8) yet. Plan for this week: finalise the work on repositories, test extra-cases, check if really everything is correctly put into the database. Plan for next week: shape and integrate package downloading, implement feedback from commits. Further todos: add pkg-audit support (easy), write unit-tests Regards, Manuel From owner-soc-status@freebsd.org Wed Jul 29 16:08: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 631889AE785 for ; Wed, 29 Jul 2015 16:08:37 +0000 (UTC) (envelope-from ionutalex.teaca@gmail.com) Received: from mail-oi0-x234.google.com (mail-oi0-x234.google.com [IPv6:2607:f8b0:4003:c06::234]) (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 2937B1E24; Wed, 29 Jul 2015 16:08:37 +0000 (UTC) (envelope-from ionutalex.teaca@gmail.com) Received: by oigi136 with SMTP id i136so7556517oig.1; Wed, 29 Jul 2015 09:08:36 -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 :cc:content-type; bh=v1MqBiDn/OIEakzEn1A6GM49Di/JHQlEgGp22oUEcuQ=; b=qkZV1IsPY9Hou9XPaOtrpBkgH3yiDUY2JQBObjaVJQ9ivO5ehB4W07xYL+umUswY/J oQvJlhoWdjKB6ABMdHZfsVI+MTrHQQpvGQwwNG0yGy+YZM6XKqB7AjArTzvrbnNp6oPi m4nTtBeYuHJ0XkATvD33xVb8Oa1vl7oS0TCdiwAxtt6nGUrpueAFcALtVCrXPOyQDECH dYbtYgQhl9jRXWMovXK9T+vJ3oOPv7BOWNVu5Mn8Dyxdu1VFNRK/5xiOkHirJRbP7NOu /iRDnKwU4umpbPY/iVsJ4NvY1C3UR0xqJZYBUvgCgCobvkxIqpcqgMuDSmTW9BXKn37+ 6Mdw== MIME-Version: 1.0 X-Received: by 10.202.193.65 with SMTP id r62mr39180165oif.1.1438186116427; Wed, 29 Jul 2015 09:08:36 -0700 (PDT) Received: by 10.76.84.37 with HTTP; Wed, 29 Jul 2015 09:08:36 -0700 (PDT) In-Reply-To: References: Date: Wed, 29 Jul 2015 19:08:36 +0300 Message-ID: Subject: Re: GSOC 2015 - NE2000 emulation in bhyve Status From: Alex Teaca To: soc-status@freebsd.org Cc: Gavin Atkinson 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: Wed, 29 Jul 2015 16:08:37 -0000 Hi, - I've added support for the read-only registers from the page0 - handle the monitor mode of the NIC - lock the reception flow with the .pe_barwrite and .pe_barwrite flows At the moment I am going to handle the multicast traffic and promiscuous mode. Thanks, Alex On Sat, Jul 11, 2015 at 12:27 PM, Alex Teaca wrote: > Hi, > > I've implemented the reception protocol of the NE2000 nic card. In order > to test it, I send in both directions (from guest to host and from host to > guest) big files (about 350M) > and it works without any problems. > > At the moment, I want to implement a mechanism to lock the access on the > shared resources between the tx and rx flows. > > Thanks, > Alex > > > > On Sun, Jun 28, 2015 at 7:16 PM, Alex Teaca > wrote: > >> Hi, >> >> From the last status report: >> >> implement 2 commits: >> - parse the input string parameter and get the tap name and mac address >> from it >> - implement some logging and asserts related with the receive buffer ring >> >> Also, I start to think about the receive protocol which is the next step >> of the implementation by reading the specification from the datasheet >> and understanding the implementation of the ED driver regarding the way >> it receives packets from the NE2000 memory. It is pretty clear >> what we need to implement and after a short design I will be able to >> implement. >> >> Thanks, >> Alex >> >> >> On Sun, Jun 14, 2015 at 11:37 PM, Alex Teaca >> wrote: >> >>> Hi, >>> >>> At the moment I am able to configure an IP address on the network >>> interface corresponding to the NE2000 NIC. When I ping >>> to the host IP, the tcpdump catches both ARP Request (sent by the guest >>> using the NE2000 card) and an ARP Reply >>> sent by the host OS. So, there is implemented the transmission protocol. >>> For reception, the packets are only read >>> from the tap device when it is notified by the mevent mechanism. >>> >>> For mode details, see the commits. >>> >>> Thanks, >>> Alex >>> >>> >>> On Tue, Jun 2, 2015 at 7:45 PM, Alex Teaca >>> wrote: >>> >>>> Hi, >>>> >>>> I've started the implementation of the NE2000 module. At the moment the >>>> ED driver is able to probe the emulated device (RealTek 8029) and add it as >>>> a network interface. >>>> >>>> Some of the features which are implemented: >>>> - implement some logging support >>>> - clone the /usr/src/sys/dev/ed/if_edreg.h register interface from the >>>> ed driver into the bhyve tree sources >>>> - implement the NE2000 registers support and an API to access the NIC >>>> registers (get and set by offset) >>>> - design and implement the Remote DMA protocol so the ED driver can >>>> store and load from the NIC's RAM memory >>>> >>>> Thanks, >>>> Alex >>>> >>>> >>> >> >