AESNI driver and fpu_kern KPI

2010-05-15 Thread Kostik Belousov
Hello,

please find at http://people.freebsd.org/~kib/misc/aesni.1.patch the
combined patch, containing the fpu_kern KPI and Intel AESNI crypto(9)
driver.  I did development and some testing on the hardware generously
provided by Sentex Communications to Netperf cluster.

I already posted the kern_fpu part. This is a KPI for x86 arches to
denote the region of the kernel code as using the FPU/SSE hardware. I
wanted to use the KPI for some in-kernel SSE code to have a proof that
interface is useful and up to the task. The crypto(9) driver using
AESNI instructions appeared to be a perfect match.

Also, the patch should fix the fpu dna in kernel mode messages
usually appearing when using VIA padlock engine. Padlock does not use
FPU resources, but occasionally issues NPX exception if FPU is marked
as unavailable due to context switch.

I am interested in the problem reports and reviews. Maintainers of
!x86-oids are welcome to provide feedback whether they feel that
proposed KPI could be implemented on their architectures, or what
modifications they consider as needed to be able to implement
it.

Unless major objections are raised or bugs are found, I plan to commit
the fpu_kern KPI shortly.

On the other hand, some code in the AESNI driver was derived from the
Intel whitepaper, that does not specified a license for the code
explicitely. I asked the author of the paper for clarification, he
seems to be supportive. In the worst case, aeskeys_{i386,amd64}.S
files would be rewritten from scratch. Until the issue is resolved,
AESNI part cannot be committed.



pgpVGOxglQWJr.pgp
Description: PGP signature


Re: AESNI driver and fpu_kern KPI

2010-05-15 Thread Marius Strobl
On Sat, May 15, 2010 at 01:04:01PM +0300, Kostik Belousov wrote:
 
 I am interested in the problem reports and reviews. Maintainers of
 !x86-oids are welcome to provide feedback whether they feel that
 proposed KPI could be implemented on their architectures, or what
 modifications they consider as needed to be able to implement
 it.
 

FYI, sparc64 doesn't need such a KPI as it supports using the FPU
in kernel unconditionally for ages.

Marius

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: AESNI driver and fpu_kern KPI

2010-05-15 Thread Kostik Belousov
On Sat, May 15, 2010 at 01:04:36PM +0200, Marius Strobl wrote:
 On Sat, May 15, 2010 at 01:04:01PM +0300, Kostik Belousov wrote:
  
  I am interested in the problem reports and reviews. Maintainers of
  !x86-oids are welcome to provide feedback whether they feel that
  proposed KPI could be implemented on their architectures, or what
  modifications they consider as needed to be able to implement
  it.
  
 
 FYI, sparc64 doesn't need such a KPI as it supports using the FPU
 in kernel unconditionally for ages.

How is this done on sparc64 ? Is PSTATE.PEF cleared on kernel entry,
or FPU is disabled ?

When I researched the problem space, I noted that windows on amd64
also provides an unrestricted access to XMM, while not on i386:
http://msdn.microsoft.com/en-us/library/ff545910%28VS.85%29.aspx
It seems that windows unconditionally set CR0.TS on kernel-mode
entry from usermode.


pgpmCJ699IGGD.pgp
Description: PGP signature


Followup: if_em.c prevents the 2nd time resuming

2010-05-15 Thread Taku YAMAMOTO
PR filed as kern/146614.
http://www.freebsd.org/cgi/query-pr.cgi?pr=146614

-- 
-|-__   YAMAMOTO, Taku
 | __  t...@tackymt.homeip.net

  - A chicken is an egg's way of producing more eggs. -
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Call for Test and Review: bwn(4) - another Broadcom Wireless driver

2010-05-15 Thread Gustau Pérez
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

En/na Weongyo Jeong ha escrit:
 On Fri, May 07, 2010 at 06:08:05PM +0200, Gustavo Perez Querol wrote:
 Hello Gustau, I'm so sorry for belated response that I had no time to
 read and work email and wireless stuffs.

 Could you please test this symptom with attached patch?  It looks in
 CURRENT it missed to initialize a ratectl when it associates with AP.

   The patch made the machine to panic. I think it happened when launching
 the supplicant. In fact, right now it works by putting the RF switch to
 OFF. As soon as I change it to ON the machine panics.

   It get a trap 12, with two reasons : page fault and bufwrite, buffer is
 not busy?

   I'm running 9.0/AMD64 from 1 of May (don't know exact svn revision).

   Do you want me to test anything else ?

 OK.  The patch is ready to test.  Could you please test it with attached
 patch?

 regards,
 Weongyo Jeong


   It worked fine with current. I still haven't tested it a few hours,
let's see if it works. Thanks !

   However, right now I'm testing zfs with the same laptop (with a
different HDD) and unfortunately I'm seeing the same with STABLE.
Tons of :

 bwn0: unsupported rate 0

   I wonder if the patch you sent will work with stable's source code ...

   Regards,

   Gustau


- --
PGP KEY : http://www-entel.upc.edu/gus/gus.asc
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.14 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJL7reSAAoJEH+VVM1WSYnPPh0P/1u/Z/RPR/8nworwJw7SDCtb
q+2ZI2171LnbMKVYPPsIxeuRMCV6w0M7pzizMJ7hdbW9XRz2PSdcubFa+WutTYZx
3k+AZMjJObM/9gLKveqmTLkz16Pc8WsNOSaxWbDKsxGhF0/CZ6hH7y5iiAdN/UTB
eVSRSFVrqXRgtGBrKvMM0LvhGJM+l7txHxjSoHLF3zXAQYmggt7jo+3qUCe3m17J
8Wm2An3l9wPfCmtUbXF/6tJpUmtqqopRZSV7LjmpWuqk8w4JIajt5YTVn9F7w0ZX
iB12mTYamWy4ZzFsIg0Tbj/x68XbVDgR5RoNSPsSbqO85C9CP/Nx6R+U9lIye40+
rOX/ApXjM87S7uoDSLjDAc706KZGo56O6tpopazGpoTgtyH5dCoSumRUEucz3zJJ
wMIahSK4TyGjO0Nz/dRxqIjPZbxQ2DSbC0KaiCHakWD+aYvNC7i6gC8Hfnx1Z3C2
8XoSiJo/SyfmC0lfzKvz+RzXLifJWRLrY9QbPYvKhrfwHquoAU3hDVS62Slyjrg6
hdGxx3pXK2gr8+vjeKC/k3lVl/h39oQfYEoIhuduur9v2H3ftqNlqWfi3Q4SRL9a
89BEZCvL6F1F/TzrAIZUIr1iLPAbWsQBxyhkqeSqWFpokgLDZ2nsJU8oPsr5ls/Q
Wef0yTu4lulwIXYUtBol
=wEO7
-END PGP SIGNATURE-

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Followup: if_em.c prevents the 2nd time resuming

2010-05-15 Thread Brandon Gooch
On Sat, May 15, 2010 at 8:23 AM, Taku YAMAMOTO t...@tackymt.homeip.net wrote:
 PR filed as kern/146614.
 http://www.freebsd.org/cgi/query-pr.cgi?pr=146614

Thanks brother! I didn't know exactly how to fix it -- I just
commented the code out! Gad someone did (no offense Jack, you're still
THE MAN!!!)

;)

-Brandon
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Followup: if_em.c prevents the 2nd time resuming

2010-05-15 Thread Marius Strobl
On Sat, May 15, 2010 at 10:23:17PM +0900, Taku YAMAMOTO wrote:
 PR filed as kern/146614.
 http://www.freebsd.org/cgi/query-pr.cgi?pr=146614
 

That was an mismerge introduced when moving the original patch
forward to a newer version of the e1000 source. It's now fixed.
Thanks for reporting.

Marius

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Call for Test and Review: bwn(4) - another Broadcom Wireless driver

2010-05-15 Thread Weongyo Jeong
On Sat, May 15, 2010 at 05:02:42PM +0200, Gustau P??rez wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 En/na Weongyo Jeong ha escrit:
  On Fri, May 07, 2010 at 06:08:05PM +0200, Gustavo Perez Querol wrote:
  Hello Gustau, I'm so sorry for belated response that I had no time to
  read and work email and wireless stuffs.
 
  Could you please test this symptom with attached patch?  It looks in
  CURRENT it missed to initialize a ratectl when it associates with AP.
 
The patch made the machine to panic. I think it happened when launching
  the supplicant. In fact, right now it works by putting the RF switch to
  OFF. As soon as I change it to ON the machine panics.
 
It get a trap 12, with two reasons : page fault and bufwrite, buffer is
  not busy?
 
I'm running 9.0/AMD64 from 1 of May (don't know exact svn revision).
 
Do you want me to test anything else ?
 
  OK.  The patch is ready to test.  Could you please test it with attached
  patch?
 
  regards,
  Weongyo Jeong
 
 
It worked fine with current. I still haven't tested it a few hours,
 let's see if it works. Thanks !
 
However, right now I'm testing zfs with the same laptop (with a
 different HDD) and unfortunately I'm seeing the same with STABLE.
 Tons of :
 
  bwn0: unsupported rate 0
 
I wonder if the patch you sent will work with stable's source code ...

Recently the ratectl framwork was MFC to STABLE_8 so it could cause this
problem.  I'll MFC my patch to STABLE_8 as soon as possible.

regards,
Weongyo Jeong

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Call for Test and Review: bwn(4) - another Broadcom Wireless driver

2010-05-15 Thread Weongyo Jeong
On Tue, May 11, 2010 at 10:04:34AM +0200, Ian FREISLICH wrote:
 Ian FREISLICH wrote:
  Weongyo Jeong wrote:
  Do you want me to test anything else ?
   
   OK.  The patch is ready to test.  Could you please test it with attached
   patch?
  
  No panic this time.  I also don't get these messages any more:
  
  May 10 23:25:36 mini kernel: bwn0: unsupported rate 0
  May 10 23:26:13 mini last message repeated 2 times
  May 10 23:28:29 mini last message repeated 320 times
  May 10 23:28:32 mini last message repeated 61 times
  May 10 23:29:42 mini shutdown: reboot by ianf: 
  
  It still doesn't associate with my AP until I destroy the wlan
  interface and create it again:
 
 But, after about 12 hours it reduced the rate to 36mbit/s OFDM with
 large amounts of time either not transmitting or not recieving -
 86% packet loss over 5 minutes.

The rate change to 36 MBit/s is a normal operation depending on the rate
control algorithm.  But the packet loss could be a problem so I think we
need to narrow down this issue why this happens.

regards,
Weongyo Jeong

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Call for Test and Review: bwn(4) - another Broadcom Wireless driver

2010-05-15 Thread Weongyo Jeong
On Mon, May 10, 2010 at 11:41:34PM +0200, Ian FREISLICH wrote:
 Weongyo Jeong wrote:
 Do you want me to test anything else ?
  
  OK.  The patch is ready to test.  Could you please test it with attached
  patch?
 
 No panic this time.  I also don't get these messages any more:
 
 May 10 23:25:36 mini kernel: bwn0: unsupported rate 0
 May 10 23:26:13 mini last message repeated 2 times
 May 10 23:28:29 mini last message repeated 320 times
 May 10 23:28:32 mini last message repeated 61 times
 May 10 23:29:42 mini shutdown: reboot by ianf: 
 
 It still doesn't associate with my AP until I destroy the wlan
 interface and create it again:

Could you please show me your setup and steps you did?  It would be
helpful if you give me a typescript file using script(1).

regards,
Weongyo Jeong

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


missing /usr/lib/liblzma.a during HEAD buildworld ?

2010-05-15 Thread Luigi Rizzo
Hi,
building HEAD on my laptop (stable/7 approx jun 2009)
fails with the following error:

sh /usr/home/luigi/FreeBSD/head/tools/install.sh -o root -g wheel -m 444  
fr.ISO8859-1-s 
/home/luigi/FreeBSD/obj_head/usr/home/luigi/FreeBSD/head/tmp/legacy/usr/share/tmac/mdoc/fr.ISO8859-1
sh /usr/home/luigi/FreeBSD/head/tools/install.sh -o root -g wheel -m 444  
ru.KOI8-R-s 
/home/luigi/FreeBSD/obj_head/usr/home/luigi/FreeBSD/head/tmp/legacy/usr/share/tmac/mdoc/ru.KOI8-R
=== usr.bin/ar (obj,depend,all,install)
make: don't know how to make /usr/lib/liblzma.a. Stop
*** Error code 2

Stop in /usr/home/luigi/FreeBSD/head.
*** Error code 1

The build apparently works fine on my desktop, still stable/7 from Sep.2009)

Any idea on what could be wrong ?

cheers
luigi
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: missing /usr/lib/liblzma.a during HEAD buildworld ?

2010-05-15 Thread Renato Botelho
On Sat, May 15, 2010 at 6:18 PM, Luigi Rizzo ri...@iet.unipi.it wrote:
 Hi,
 building HEAD on my laptop (stable/7 approx jun 2009)
 fails with the following error:

 sh /usr/home/luigi/FreeBSD/head/tools/install.sh -o root -g wheel -m 444  
 fr.ISO8859-1-s 
 /home/luigi/FreeBSD/obj_head/usr/home/luigi/FreeBSD/head/tmp/legacy/usr/share/tmac/mdoc/fr.ISO8859-1
 sh /usr/home/luigi/FreeBSD/head/tools/install.sh -o root -g wheel -m 444  
 ru.KOI8-R-s 
 /home/luigi/FreeBSD/obj_head/usr/home/luigi/FreeBSD/head/tmp/legacy/usr/share/tmac/mdoc/ru.KOI8-R
 === usr.bin/ar (obj,depend,all,install)
 make: don't know how to make /usr/lib/liblzma.a. Stop
 *** Error code 2

 Stop in /usr/home/luigi/FreeBSD/head.
 *** Error code 1

 The build apparently works fine on my desktop, still stable/7 from Sep.2009)

 Any idea on what could be wrong ?

http://lists.freebsd.org/pipermail/freebsd-current/2010-May/017250.html

-- 
Renato Botelho
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org