Re: svn commit: r315959 - in head/sys: amd64/amd64 amd64/vmm amd64/vmm/amd i386/i386 x86/include x86/x86 x86/xen

2017-03-27 Thread Andriy Gapon
On 27/03/2017 14:05, Chagin Dmitry wrote:
> I believe it, but on my machine genassym.c is processed before device_if.m

Yeah, looks like the order could be arbitrary because the dependency is not 
defined.
Anyway, I am reverting the change.
Thank you for the report and sorry for the trouble.

-- 
Andriy Gapon
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r315959 - in head/sys: amd64/amd64 amd64/vmm amd64/vmm/amd i386/i386 x86/include x86/x86 x86/xen

2017-03-27 Thread Chagin Dmitry
On Mon, Mar 27, 2017 at 11:30:42AM +0300, Andriy Gapon wrote:
> On 03/26/2017 11:30, Chagin Dmitry wrote:
> > On Sat, Mar 25, 2017 at 06:45:09PM +, Andriy Gapon wrote:
> >> Author: avg
> >> Date: Sat Mar 25 18:45:09 2017
> >> New Revision: 315959
> >> URL: https://svnweb.freebsd.org/changeset/base/315959
> >>
> >> Log:
> >>   specific end of interrupt implementation for AMD Local APIC
> >>   
> >>   The change is more intrusive than I would like because the feature
> >>   requires that a vector number is written to a special register.
> >>   Thus, now the vector number has to be provided to lapic_eoi().
> >>   It was readily available in the IO-APIC and MSI cases, but the IPI
> >>   handlers required more work.
> >>   Also, we now store the VMM IPI number in a global variable, so that it
> >>   is available to the justreturn handler for the same reason.
> >>   
> >>   Reviewed by: kib
> >>   MFC after:   6 weeks
> >>   Differential Revision: https://reviews.freebsd.org/D9880
> >>
> >> Modified:
> >>   head/sys/amd64/amd64/apic_vector.S
> >>   head/sys/amd64/amd64/genassym.c
> > 
> > 
> > 
> > Hi, Andriy, u broke the build
> > 
> > 
> > /usr/local/bin/clang40 -c -O2 -pipe -fno-strict-aliasing -g -nostdinc -I. 
> > -I/home/git/head/sys -I/home/git/head/sys/contrib/libfdt -D_KERNEL 
> > -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-omit-frame-pointer 
> > -mno-omit-leaf-frame-pointer -MD -MF.depend.genassym.o -MTgenassym.o 
> > -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float 
> > -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector 
> > -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes 
> > -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef 
> > -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs 
> > -fdiagnostics-show-option -Wno-unknown-pragmas 
> > -Wno-error-tautological-compare -Wno-error-empty-body 
> > -Wno-error-parentheses-equality -Wno-error-unused-function 
> > -Wno-error-pointer-sign -Wno-error-shift-negative-value 
> > -Wno-error-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 
> > /home/git/head/sys/amd64/amd64/genassym.c
> > In file included from /home/git/head/sys/amd64/amd64/genassym.c:47:
> > /home/git/head/sys/sys/bus.h:730:10: fatal error: 'device_if.h' file not 
> > found
> > #include "device_if.h"
> >  ^
> > 1 error generated.
> > *** Error code 1
> 
> I've got another report about this problem, but I can not reproduce it here 
> with
> a clean kernel build of GENERIC.
> I am not sure what the problem is.
> Do you have anything unusual in make.conf, src.conf or your kernel 
> configuration?
> 

I believe it, but on my machine genassym.c is processed before device_if.m

cat /etc/make.conf:

SENDMAIL_CF_DIR=/usr/local/share/sendmail/cf

DEFAULT_VERSIONS+=linux=c6_64

KERNCONF= YOY
CFLAGS  += -ferror-limit=1
DEBUG_FLAGS += -g

MODULES_OVERRIDE+=usb/usb usb/xhci usb/ehci usb/ukbd usb/umass usb/uhid usb/ums
MODULES_OVERRIDE+=vmm nmdm drm2/drm2 drm2/i915kms fdescfs
MODULES_OVERRIDE+=linux linux64 linprocfs linsysfs procfs pseudofs linux_common 
acpi/acpi_ibm

CC=/usr/local/bin/clang40
CXX=/usr/local/bin/clang++40
CPP=/usr/local/bin/clang-cpp40

cat /etc/src.conf:
WITHOUT_GAMES=yes
WITHOUT_HTML=yes
WITHOUT_IPFILTER=yes
WITHOUT_IPFW=yes
WITHOUT_NDIS=yes
WITHOUT_NIS=yes
WITHOUT_SVNLITE=yes
WITHOUT_SYSINSTALL=yes
WITHOUT_TESTS=yes

WITHOUT_CLANG_FULL=yes
WITHOUT_CLANG_BOOTSTRAP=yes


___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r315959 - in head/sys: amd64/amd64 amd64/vmm amd64/vmm/amd i386/i386 x86/include x86/x86 x86/xen

2017-03-27 Thread Andriy Gapon
On 03/26/2017 11:30, Chagin Dmitry wrote:
> On Sat, Mar 25, 2017 at 06:45:09PM +, Andriy Gapon wrote:
>> Author: avg
>> Date: Sat Mar 25 18:45:09 2017
>> New Revision: 315959
>> URL: https://svnweb.freebsd.org/changeset/base/315959
>>
>> Log:
>>   specific end of interrupt implementation for AMD Local APIC
>>   
>>   The change is more intrusive than I would like because the feature
>>   requires that a vector number is written to a special register.
>>   Thus, now the vector number has to be provided to lapic_eoi().
>>   It was readily available in the IO-APIC and MSI cases, but the IPI
>>   handlers required more work.
>>   Also, we now store the VMM IPI number in a global variable, so that it
>>   is available to the justreturn handler for the same reason.
>>   
>>   Reviewed by:   kib
>>   MFC after: 6 weeks
>>   Differential Revision: https://reviews.freebsd.org/D9880
>>
>> Modified:
>>   head/sys/amd64/amd64/apic_vector.S
>>   head/sys/amd64/amd64/genassym.c
> 
> 
> 
> Hi, Andriy, u broke the build
> 
> 
> /usr/local/bin/clang40 -c -O2 -pipe -fno-strict-aliasing -g -nostdinc -I. 
> -I/home/git/head/sys -I/home/git/head/sys/contrib/libfdt -D_KERNEL 
> -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-omit-frame-pointer 
> -mno-omit-leaf-frame-pointer -MD -MF.depend.genassym.o -MTgenassym.o 
> -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float 
> -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector 
> -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes 
> -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef 
> -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs 
> -fdiagnostics-show-option -Wno-unknown-pragmas 
> -Wno-error-tautological-compare -Wno-error-empty-body 
> -Wno-error-parentheses-equality -Wno-error-unused-function 
> -Wno-error-pointer-sign -Wno-error-shift-negative-value 
> -Wno-error-address-of-packed-member -mno-aes -mno-avx -std=iso9899:1999 
> /home/git/head/sys/amd64/amd64/genassym.c
> In file included from /home/git/head/sys/amd64/amd64/genassym.c:47:
> /home/git/head/sys/sys/bus.h:730:10: fatal error: 'device_if.h' file not found
> #include "device_if.h"
>  ^
> 1 error generated.
> *** Error code 1

I've got another report about this problem, but I can not reproduce it here with
a clean kernel build of GENERIC.
I am not sure what the problem is.
Do you have anything unusual in make.conf, src.conf or your kernel 
configuration?

-- 
Andriy Gapon
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r315959 - in head/sys: amd64/amd64 amd64/vmm amd64/vmm/amd i386/i386 x86/include x86/x86 x86/xen

2017-03-26 Thread Chagin Dmitry
On Sat, Mar 25, 2017 at 06:45:09PM +, Andriy Gapon wrote:
> Author: avg
> Date: Sat Mar 25 18:45:09 2017
> New Revision: 315959
> URL: https://svnweb.freebsd.org/changeset/base/315959
> 
> Log:
>   specific end of interrupt implementation for AMD Local APIC
>   
>   The change is more intrusive than I would like because the feature
>   requires that a vector number is written to a special register.
>   Thus, now the vector number has to be provided to lapic_eoi().
>   It was readily available in the IO-APIC and MSI cases, but the IPI
>   handlers required more work.
>   Also, we now store the VMM IPI number in a global variable, so that it
>   is available to the justreturn handler for the same reason.
>   
>   Reviewed by:kib
>   MFC after:  6 weeks
>   Differential Revision: https://reviews.freebsd.org/D9880
> 
> Modified:
>   head/sys/amd64/amd64/apic_vector.S
>   head/sys/amd64/amd64/genassym.c



Hi, Andriy, u broke the build


/usr/local/bin/clang40 -c -O2 -pipe -fno-strict-aliasing -g -nostdinc -I. 
-I/home/git/head/sys -I/home/git/head/sys/contrib/libfdt -D_KERNEL 
-DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-omit-frame-pointer 
-mno-omit-leaf-frame-pointer -MD -MF.depend.genassym.o -MTgenassym.o 
-mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float 
-fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector 
-gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef 
-Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs 
-fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare 
-Wno-error-empty-body -Wno-error-parentheses-equality 
-Wno-error-unused-function -Wno-error-pointer-sign 
-Wno-error-shift-negative-value -Wno-error-address-of-packed-member -mno-aes 
-mno-avx -std=iso9899:1999 /home/git/head/sys/amd64/amd64/genassym.c
In file included from /home/git/head/sys/amd64/amd64/genassym.c:47:
/home/git/head/sys/sys/bus.h:730:10: fatal error: 'device_if.h' file not found
#include "device_if.h"
 ^
1 error generated.
*** Error code 1











>   head/sys/amd64/vmm/amd/svm.c
>   head/sys/amd64/vmm/vmm.c
>   head/sys/amd64/vmm/vmm_host.h
>   head/sys/i386/i386/apic_vector.s
>   head/sys/i386/i386/genassym.c
>   head/sys/x86/include/apicvar.h
>   head/sys/x86/x86/io_apic.c
>   head/sys/x86/x86/local_apic.c
>   head/sys/x86/x86/msi.c
>   head/sys/x86/xen/xen_apic.c
> 
> Modified: head/sys/amd64/amd64/apic_vector.S
> ==
> --- head/sys/amd64/amd64/apic_vector.SSat Mar 25 15:57:47 2017
> (r315958)
> +++ head/sys/amd64/amd64/apic_vector.SSat Mar 25 18:45:09 2017
> (r315959)
> @@ -50,22 +50,6 @@
>  #define LK
>  #endif
>  
> - .text
> - SUPERALIGN_TEXT
> - /* End Of Interrupt to APIC */
> -as_lapic_eoi:
> - cmpl$0,x2apic_mode
> - jne 1f
> - movqlapic_map,%rax
> - movl$0,LA_EOI(%rax)
> - ret
> -1:
> - movl$MSR_APIC_EOI,%ecx
> - xorl%eax,%eax
> - xorl%edx,%edx
> - wrmsr
> - ret
> -
>  /*
>   * I/O Interrupt Entry Point.  Rather than having one entry point for
>   * each interrupt source, we use one entry point for each 32-bit word
> @@ -182,7 +166,7 @@ IDTVEC(xen_intr_upcall)
>  
>   SUPERALIGN_TEXT
>  invltlb_ret:
> - callas_lapic_eoi
> + callnative_lapic_eoi
>   POP_FRAME
>   jmp doreti_iret
>  
> @@ -191,18 +175,21 @@ IDTVEC(invltlb)
>   PUSH_FRAME
>  
>   callinvltlb_handler
> + movl$IPI_INVLTLB, %edi
>   jmp invltlb_ret
>  
>  IDTVEC(invltlb_pcid)
>   PUSH_FRAME
>  
>   callinvltlb_pcid_handler
> + movl$IPI_INVLTLB, %edi
>   jmp invltlb_ret
>  
>  IDTVEC(invltlb_invpcid)
>   PUSH_FRAME
>  
>   callinvltlb_invpcid_handler
> + movl$IPI_INVLTLB, %edi
>   jmp invltlb_ret
>  
>  /*
> @@ -215,6 +202,7 @@ IDTVEC(invlpg)
>   PUSH_FRAME
>  
>   callinvlpg_handler
> + movl$IPI_INVLPG, %edi
>   jmp invltlb_ret
>  
>  /*
> @@ -226,6 +214,7 @@ IDTVEC(invlrng)
>   PUSH_FRAME
>  
>   callinvlrng_handler
> + movl$IPI_INVLRNG, %edi
>   jmp invltlb_ret
>  
>  /*
> @@ -237,6 +226,7 @@ IDTVEC(invlcache)
>   PUSH_FRAME
>  
>   callinvlcache_handler
> + movl$IPI_INVLCACHE, %edi
>   jmp invltlb_ret
>  
>  /*
> @@ -247,7 +237,8 @@ IDTVEC(invlcache)
>  IDTVEC(ipi_intr_bitmap_handler)  
>   PUSH_FRAME
>  
> - callas_lapic_eoi
> + movl$IPI_BITMAP_VECTOR, %edi
> + callnative_lapic_eoi
>   
>   FAKE_MCOUNT(TF_RIP(%rsp))
>  
> @@ -263,7 +254,8 @@ IDTVEC(ipi_intr_bitmap_handler)   
>  IDTVEC(cpustop)
>   PUSH_FRAME
>  
> - callas_lapic_eoi
> + movl$IPI_STOP, %edi
> + call