From owner-soc-status@freebsd.org Mon Jul 6 15:00: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 8363DADE4 for ; Mon, 6 Jul 2015 15:00:37 +0000 (UTC) (envelope-from mihai.carabas@gmail.com) Received: from mail-wi0-x22b.google.com (mail-wi0-x22b.google.com [IPv6:2a00:1450:400c:c05::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 0D0081FEF for ; Mon, 6 Jul 2015 15:00:37 +0000 (UTC) (envelope-from mihai.carabas@gmail.com) Received: by wiga1 with SMTP id a1so231442467wig.0 for ; Mon, 06 Jul 2015 08:00:35 -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=Zx9ABRP7lo13TOF+fRKEwAkk4FLpQGgznFEoqx8Qd+s=; b=vn0gWa8SwRB8dQ2NOb/fGw5xCgYWdnw2NCK62gzxDS5MfqFJ5em4r3ZcDKXOZn2n2E IlvBh00X6ZhiyZ/qw47H3J2c1hgd6Qv1I907av/DddSzbReYyYK/id3psmNPJnAev856 2wBSgWa4TQd/djNS1/YFQwB1Rwisai0Z+IOpg0LNbxR5DkEdmPdNSffNKcavEHCX2rpw STz48+kQ766cWVQrOW5I0byfGMnpYFZbrtvhW2zfvCwj7i2rTl8YL6YoOHcNelA8rBfg NQP+oAD7JKfkjyqYON1O0uXPnSqc7HXgen/Vd7+pHXjkrxCi3xMbuVenzr7W3JLtZvu1 v+/w== MIME-Version: 1.0 X-Received: by 10.194.77.179 with SMTP id t19mr99816250wjw.30.1436194835449; Mon, 06 Jul 2015 08:00:35 -0700 (PDT) Received: by 10.28.21.134 with HTTP; Mon, 6 Jul 2015 08:00:35 -0700 (PDT) In-Reply-To: References: Date: Mon, 6 Jul 2015 18:00:35 +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, 06 Jul 2015 15:00:37 -0000 Hi everyone, In the last week I copied the vmm code from amd64 platform and I stripped > it down to only basic operations (vmm init/cleanup, vminit/cleanup and > vmrun). I've written some code for mapping operation [1] (PL-2 stage1 > and PL1 stage-2 - combined) for LPAE format (this is the only format > supported in HYP-mode). Unfortunatelly the FreeBSD pmap code doesn't > support LPAE format and I couldn't integrate memory management in the PMAP > infrastructure (like it is currently in amd64 - this will be handled after > this basic implementation because is an entire project that needs to be > tackled). > > I've also been writing the low-level initialization code for the > hypervisor to replace the stub code installed at boot time. Right now we > are able to insert the vmm-arm.ko module which performs all the necesary > initialization (installs the new exception vector, activates the MMU). When > we remove the vmm-arm module the stub exception vector is reinstalled and > the MMU deactivated, bringing the host to the initial state. > > In the last week I've started writing low-level ASM code which is saving/restoring the guest/host state. I've created a logic for a full pass from the host to the guest and back [1]: - when the host is calling the "HYP" instruction, causes a trap in hyp-mode where it can run different functions specific to this mode. An example is hyp_enter_guest function which saves the host state, loads the guest state and jumps to the guest pc with an eret instruction (back to svc mode basically) - when the guest executes an instruction that causes a trap (e.g. wfi which was configured by us) the code is saving the guest state, loading the host state and than is returning to host svc-mode with the exception of the guest to manage it - I've also implemented a call to panic function in host if the abort exceptions in hyp-mode are raised. There are still some configuration registers that need to be tackled (like VCTBR - defines the guest configuration for the stage 2 address translation). In the next week I have to write the C code which is calling the ASM methods in arm_vmrun and the init code which allocates the context structure (arm_vminit) and maps it in HYP-Mode. I will try to integrate these operations with bhyve userspace tools to ease the development. Thank you, Mihai [1] https://svnweb.freebsd.org/socsvn/soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/hyp.S?view=markup From owner-soc-status@freebsd.org Sat Jul 11 09:27:55 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 463709981EE for ; Sat, 11 Jul 2015 09:27:55 +0000 (UTC) (envelope-from ionutalex.teaca@gmail.com) Received: from mail-ob0-x22d.google.com (mail-ob0-x22d.google.com [IPv6:2607:f8b0:4003:c01::22d]) (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 0D874119D; Sat, 11 Jul 2015 09:27:55 +0000 (UTC) (envelope-from ionutalex.teaca@gmail.com) Received: by obbkm3 with SMTP id km3so204397608obb.1; Sat, 11 Jul 2015 02:27:54 -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=Ya2xKMAvJAkZqJwpFS8D8HJSkKYK7wwIl+hWqACD/6Y=; b=cgjVPNFHi7DdW+9Vj4ERPOcTseApQPkimhH8jp9jh8JnTrfo2G6puHjjF8Jv/gJcl2 g1F5+tmPPpGyhhaho+VsvgeAH7YCJpSckCzyTRCkHia2DjaJnlZ3ZYT5HDFcCPoOgmy2 PwjllXdGFAuzuUFaB2brAZY9sdga6rrT//DZhstE4PhVHZfRrbGlOwIZrtesiF5e/fyW VjtfIqmMjexdqHvgalImPfhU6+l70Dw3qFdqCGsME8yGE4zgzhjAUExbJoEGuIshOqI7 K8MUCDeBVSney7cswOzrB9GNeiL3z25SmSqj4MZRUQLxlcVNfPfW1cLKKF2QAhukb5kg SirQ== MIME-Version: 1.0 X-Received: by 10.202.80.216 with SMTP id e207mr21777883oib.116.1436606874397; Sat, 11 Jul 2015 02:27:54 -0700 (PDT) Received: by 10.76.84.37 with HTTP; Sat, 11 Jul 2015 02:27:54 -0700 (PDT) In-Reply-To: References: Date: Sat, 11 Jul 2015 12:27:54 +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: Sat, 11 Jul 2015 09:27:55 -0000 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 >>> >>> >> > From owner-soc-status@freebsd.org Sat Jul 11 10:24:58 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 58163998BE3 for ; Sat, 11 Jul 2015 10:24:58 +0000 (UTC) (envelope-from tuchalia@gmail.com) Received: from mail-la0-x22e.google.com (mail-la0-x22e.google.com [IPv6:2a00:1450:4010:c03::22e]) (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 D8FC61877 for ; Sat, 11 Jul 2015 10:24:57 +0000 (UTC) (envelope-from tuchalia@gmail.com) Received: by lagx9 with SMTP id x9so277604958lag.1 for ; Sat, 11 Jul 2015 03:24:55 -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:content-type; bh=ev76jYtSjXr6MIE1LXxIDnhwfmfe8bFlPQKuK3pRlgI=; b=KpuCHBpu2Aqfxj792veyzQ9JYjmz+MxNg/sITVC/gRHsrLBGdMEMjuSVLcjq2HLEyi kO2lugNU8CLoY5gKeW1mLEXlcpxSe4ggTMCwLaw4mIpdj4FbnIIrwJXhiDLemCbPpkiw 9d/xDnfEa0BErl5gUcUM5T1nkCas6ZGQ5OqjosbDYg4PMYRuufBlztnAp0PtI3V1tZzO NdfJZyvVP2La5tALdQrL/C3FCFSAWIo3O5CQLTUQw1+Q/oPJ4DzWm2GFinldpCEmAZQj M1CJ5Ur++bfm3IKgqPSdVF0rMLAAy4UB8+OMFE8DtWgDpzAE2+Qxw3ETryU+GdL0eugk Ghgw== X-Received: by 10.152.1.4 with SMTP id 4mr23932541lai.25.1436610295819; Sat, 11 Jul 2015 03:24:55 -0700 (PDT) MIME-Version: 1.0 From: Daniel Peyrolon Date: Sat, 11 Jul 2015 10:24:46 +0000 Message-ID: Subject: Status reports for "JIT for firewalling" 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: Sat, 11 Jul 2015 10:24:58 -0000 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