From nobody@FreeBSD.org  Sun Mar 23 15:47:10 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id BAB02982
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 23 Mar 2014 15:47:10 +0000 (UTC)
Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id A6A167E3
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 23 Mar 2014 15:47:10 +0000 (UTC)
Received: from cgiserv.freebsd.org ([127.0.1.6])
	by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s2NFl9BT080122
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 23 Mar 2014 15:47:09 GMT
	(envelope-from nobody@cgiserv.freebsd.org)
Received: (from nobody@localhost)
	by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s2NFl94Q080121;
	Sun, 23 Mar 2014 15:47:09 GMT
	(envelope-from nobody)
Message-Id: <201403231547.s2NFl94Q080121@cgiserv.freebsd.org>
Date: Sun, 23 Mar 2014 15:47:09 GMT
From: Andrew Stevenson <andrew@ugh.net.au>
To: freebsd-gnats-submit@FreeBSD.org
Subject: options XENHVM requires options SMP
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         187854
>Category:       kern
>Synopsis:       options XENHVM requires options SMP
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jhb
>State:          patched
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 23 15:50:01 UTC 2014
>Closed-Date:    
>Last-Modified:  Wed Mar 26 17:50:00 UTC 2014
>Originator:     Andrew Stevenson
>Release:        10-RELEASE
>Organization:
UgH!
>Environment:
10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
If compiling a kernel with options XENHVM the build will fail unless you also have options SMP.

cc  -c -O2 -pipe -fno-strict-aliasing -march=k8 -std=c99 -gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option  -Wno-error-tautological-compare -Wno-error-empty-body  -Wno-error-parentheses-equality -Wno-unused-function   -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h  -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -Werror  /usr/src/sys/x86/xen/hvm.c
/usr/src/sys/x86/xen/hvm.c:120:18: error: use of undeclared identifier 'lapic_ipi_vectored'; did you mean 'xen_ipi_vectored'?
        .ipi_vectored   = lapic_ipi_vectored,
                          ^~~~~~~~~~~~~~~~~~
                          xen_ipi_vectored
/usr/src/sys/x86/xen/hvm.c:75:13: note: 'xen_ipi_vectored' declared here
static void xen_ipi_vectored(u_int vector, int dest);
            ^
1 error generated.
*** Error code 1

Stop.


I don't know this dependency is a problem per se but it should be documented, e.g in xen(4) or in comments in GENERIC or if it is documented then documented in bigger letters :-)
>How-To-Repeat:
cd /usr/src/sys/amd64/conf
cp GENERIC BLAH
<edit blah to comment out options SMP>
cd /usr/src
make build kernel KERNCONF=BLAH
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-doc->freebsd-bugs 
Responsible-Changed-By: jhb 
Responsible-Changed-When: Wed Mar 26 15:30:56 UTC 2014 
Responsible-Changed-Why:  
This should be fixed and isn't a doc bug. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=187854 
State-Changed-From-To: open->patched 
State-Changed-By: jhb 
State-Changed-When: Wed Mar 26 17:40:18 UTC 2014 
State-Changed-Why:  
Fix committed to HEAD. 


Responsible-Changed-From-To: freebsd-bugs->jhb 
Responsible-Changed-By: jhb 
Responsible-Changed-When: Wed Mar 26 17:40:18 UTC 2014 
Responsible-Changed-Why:  
Fix committed to HEAD. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=187854 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/187854: commit references a PR
Date: Wed, 26 Mar 2014 17:40:17 +0000 (UTC)

 Author: jhb
 Date: Wed Mar 26 17:40:13 2014
 New Revision: 263772
 URL: http://svnweb.freebsd.org/changeset/base/263772
 
 Log:
   Fix build without SMP.
   
   PR:		kern/187854
   MFC after:	1 week
 
 Modified:
   head/sys/x86/xen/hvm.c
 
 Modified: head/sys/x86/xen/hvm.c
 ==============================================================================
 --- head/sys/x86/xen/hvm.c	Wed Mar 26 17:00:37 2014	(r263771)
 +++ head/sys/x86/xen/hvm.c	Wed Mar 26 17:40:13 2014	(r263772)
 @@ -71,9 +71,9 @@ static driver_filter_t xen_ipi_bitmap_ha
  static driver_filter_t xen_cpustop_handler;
  static driver_filter_t xen_cpususpend_handler;
  static driver_filter_t xen_cpustophard_handler;
 -#endif
  static void xen_ipi_vectored(u_int vector, int dest);
  static void xen_hvm_cpu_resume(void);
 +#endif
  static void xen_hvm_cpu_init(void);
  
  /*---------------------------- Extern Declarations ---------------------------*/
 @@ -106,11 +106,13 @@ struct xen_ipi_handler
  /*-------------------------------- Global Data -------------------------------*/
  enum xen_domain_type xen_domain_type = XEN_NATIVE;
  
 +#ifdef SMP
  struct cpu_ops xen_hvm_cpu_ops = {
  	.ipi_vectored	= lapic_ipi_vectored,
  	.cpu_init	= xen_hvm_cpu_init,
  	.cpu_resume	= xen_hvm_cpu_resume
  };
 +#endif
  
  static MALLOC_DEFINE(M_XENHVM, "xen_hvm", "Xen HVM PV Support");
  
 @@ -551,7 +553,9 @@ xen_hvm_init(enum xen_hvm_init_type init
  		}
  
  		setup_xen_features();
 +#ifdef SMP
  		cpu_ops = xen_hvm_cpu_ops;
 +#endif
  		break;
  	case XEN_HVM_INIT_RESUME:
  		if (error != 0)
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
