From owner-svn-src-stable-8@FreeBSD.ORG Sun Dec 12 10:27:11 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74EC51065670; Sun, 12 Dec 2010 10:27:11 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6261A8FC18; Sun, 12 Dec 2010 10:27:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBCARB4w044144; Sun, 12 Dec 2010 10:27:11 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBCARBSZ044141; Sun, 12 Dec 2010 10:27:11 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201012121027.oBCARBSZ044141@svn.freebsd.org> From: Bernhard Schmidt Date: Sun, 12 Dec 2010 10:27:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216392 - stable/8/sys/dev/iwn X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Dec 2010 10:27:11 -0000 Author: bschmidt Date: Sun Dec 12 10:27:11 2010 New Revision: 216392 URL: http://svn.freebsd.org/changeset/base/216392 Log: MFC r216195: For 6000 series and newer devices the DC calibration results are no longer requested of the boot firmware. Instead of sending those results to the runtime firmware the firmware is told to do the DC calibration itself. Approved by: re (kib) Modified: stable/8/sys/dev/iwn/if_iwn.c stable/8/sys/dev/iwn/if_iwnvar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/8/sys/dev/iwn/if_iwn.c Sun Dec 12 08:52:13 2010 (r216391) +++ stable/8/sys/dev/iwn/if_iwn.c Sun Dec 12 10:27:11 2010 (r216392) @@ -223,7 +223,7 @@ static int iwn5000_save_calib_result(str struct iwn_phy_calib *, int, int); static void iwn5000_free_calib_results(struct iwn_softc *); static int iwn5000_chrystal_calib(struct iwn_softc *); -static int iwn5000_send_calib_query(struct iwn_softc *); +static int iwn5000_send_calib_query(struct iwn_softc *, uint32_t); static int iwn5000_rx_calib_result(struct iwn_softc *, struct iwn_rx_desc *, struct iwn_rx_data *); static int iwn5000_send_wimax_coex(struct iwn_softc *); @@ -756,6 +756,7 @@ iwn_hal_attach(struct iwn_softc *sc) default: sc->txchainmask = IWN_ANT_ABC; sc->rxchainmask = IWN_ANT_ABC; + sc->calib_runtime = IWN_CALIB_DC; break; } sc->calib_init = IWN_CALIB_XTAL | IWN_CALIB_LO | @@ -767,8 +768,9 @@ iwn_hal_attach(struct iwn_softc *sc) sc->fwname = "iwn6050fw"; sc->txchainmask = IWN_ANT_AB; sc->rxchainmask = IWN_ANT_AB; - sc->calib_init = IWN_CALIB_XTAL | IWN_CALIB_DC | IWN_CALIB_LO | + sc->calib_init = IWN_CALIB_XTAL | IWN_CALIB_LO | IWN_CALIB_TX_IQ | IWN_CALIB_BASE_BAND; + sc->calib_runtime = IWN_CALIB_DC; break; case IWN_HW_REV_TYPE_6005: sc->sc_hal = &iwn5000_hal; @@ -778,6 +780,7 @@ iwn_hal_attach(struct iwn_softc *sc) sc->rxchainmask = IWN_ANT_AB; sc->calib_init = IWN_CALIB_XTAL | IWN_CALIB_LO | IWN_CALIB_TX_IQ | IWN_CALIB_BASE_BAND; + sc->calib_runtime = IWN_CALIB_DC; break; default: device_printf(sc->sc_dev, "adapter type %d not supported\n", @@ -5316,7 +5319,7 @@ iwn5000_chrystal_calib(struct iwn_softc * only once at first boot. */ static int -iwn5000_send_calib_query(struct iwn_softc *sc) +iwn5000_send_calib_query(struct iwn_softc *sc, uint32_t cfg) { #define CALIB_INIT_CFG 0xffffffff; struct iwn5000_calib_config cmd; @@ -5324,12 +5327,15 @@ iwn5000_send_calib_query(struct iwn_soft memset(&cmd, 0, sizeof cmd); cmd.ucode.once.enable = CALIB_INIT_CFG; - cmd.ucode.once.start = CALIB_INIT_CFG; - cmd.ucode.once.send = CALIB_INIT_CFG; - cmd.ucode.flags = CALIB_INIT_CFG; + if (cfg == 0) { + cmd.ucode.once.start = CALIB_INIT_CFG; + cmd.ucode.once.send = CALIB_INIT_CFG; + cmd.ucode.flags = CALIB_INIT_CFG; + } else + cmd.ucode.once.start = cfg; - DPRINTF(sc, IWN_DEBUG_CALIBRATE, "%s: query calibration results\n", - __func__); + DPRINTF(sc, IWN_DEBUG_CALIBRATE, + "%s: query calibration results, cfg %x\n", __func__, cfg); error = iwn_cmd(sc, IWN5000_CMD_CALIB_CONFIG, &cmd, sizeof cmd, 0); if (error != 0) @@ -5559,7 +5565,7 @@ iwn5000_post_alive(struct iwn_softc *sc) * Query other calibration results from the initialization * firmware. */ - error = iwn5000_send_calib_query(sc); + error = iwn5000_send_calib_query(sc, 0); if (error != 0) { device_printf(sc->sc_dev, "%s: could not query calibration, error=%d\n", @@ -5579,6 +5585,19 @@ iwn5000_post_alive(struct iwn_softc *sc) * firmware to the runtime firmware. */ error = iwn5000_send_calib_results(sc); + + /* + * Tell the runtime firmware to do certain calibration types. + */ + if (sc->calib_runtime != 0) { + error = iwn5000_send_calib_query(sc, sc->calib_runtime); + if (error != 0) { + device_printf(sc->sc_dev, + "%s: could not send query calibration, " + "error=%d, cfg=%x\n", __func__, error, + sc->calib_runtime); + } + } } return error; } Modified: stable/8/sys/dev/iwn/if_iwnvar.h ============================================================================== --- stable/8/sys/dev/iwn/if_iwnvar.h Sun Dec 12 08:52:13 2010 (r216391) +++ stable/8/sys/dev/iwn/if_iwnvar.h Sun Dec 12 10:27:11 2010 (r216392) @@ -264,6 +264,7 @@ struct iwn_softc { int calib_cnt; struct iwn_calib_state calib; u_int calib_init; + u_int calib_runtime; #define IWN_CALIB_XTAL (1 << IWN_CALIB_IDX_XTAL) #define IWN_CALIB_DC (1 << IWN_CALIB_IDX_DC) #define IWN_CALIB_LO (1 << IWN_CALIB_IDX_LO) From owner-svn-src-stable-8@FreeBSD.ORG Mon Dec 13 10:27:36 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C183106564A; Mon, 13 Dec 2010 10:27:36 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39C958FC16; Mon, 13 Dec 2010 10:27:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBDARawP076632; Mon, 13 Dec 2010 10:27:36 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBDARa2F076628; Mon, 13 Dec 2010 10:27:36 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201012131027.oBDARa2F076628@svn.freebsd.org> From: Michael Tuexen Date: Mon, 13 Dec 2010 10:27:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216402 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Dec 2010 10:27:36 -0000 Author: tuexen Date: Mon Dec 13 10:27:35 2010 New Revision: 216402 URL: http://svn.freebsd.org/changeset/base/216402 Log: MFC r216188: Fix a bug where also the number of non-renegable gap reports was considered to be potentially renegable. Approved by: re Modified: stable/8/sys/netinet/sctp_indata.c stable/8/sys/netinet/sctp_input.c stable/8/sys/netinet/sctp_structs.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Mon Dec 13 08:56:30 2010 (r216401) +++ stable/8/sys/netinet/sctp_indata.c Mon Dec 13 10:27:35 2010 (r216402) @@ -3081,14 +3081,17 @@ sctp_handle_segments(struct mbuf *m, int int num_frs = 0; int chunk_freed; int non_revocable; - uint16_t frag_strt, frag_end; - uint32_t last_frag_high; + uint16_t frag_strt, frag_end, prev_frag_end; - tp1 = NULL; - last_frag_high = 0; + tp1 = TAILQ_FIRST(&asoc->sent_queue); + prev_frag_end = 0; chunk_freed = 0; for (i = 0; i < (num_seg + num_nr_seg); i++) { + if (i == num_seg) { + prev_frag_end = 0; + tp1 = TAILQ_FIRST(&asoc->sent_queue); + } frag = (struct sctp_gap_ack_block *)sctp_m_getptr(m, *offset, sizeof(struct sctp_gap_ack_block), (uint8_t *) & block); *offset += sizeof(block); @@ -3097,58 +3100,29 @@ sctp_handle_segments(struct mbuf *m, int } frag_strt = ntohs(frag->start); frag_end = ntohs(frag->end); - /* some sanity checks on the fragment offsets */ + if (frag_strt > frag_end) { - /* this one is malformed, skip */ + /* This gap report is malformed, skip it. */ continue; } - if (compare_with_wrap((frag_end + last_tsn), *biggest_tsn_acked, - MAX_TSN)) - *biggest_tsn_acked = frag_end + last_tsn; - - /* mark acked dgs and find out the highestTSN being acked */ - if (tp1 == NULL) { + if (frag_strt <= prev_frag_end) { + /* This gap report is not in order, so restart. */ tp1 = TAILQ_FIRST(&asoc->sent_queue); - /* save the locations of the last frags */ - last_frag_high = frag_end + last_tsn; - } else { - /* - * now lets see if we need to reset the queue due to - * a out-of-order SACK fragment - */ - if (compare_with_wrap(frag_strt + last_tsn, - last_frag_high, MAX_TSN)) { - /* - * if the new frag starts after the last TSN - * frag covered, we are ok and this one is - * beyond the last one - */ - ; - } else { - /* - * ok, they have reset us, so we need to - * reset the queue this will cause extra - * hunting but hey, they chose the - * performance hit when they failed to order - * their gaps - */ - tp1 = TAILQ_FIRST(&asoc->sent_queue); - } - last_frag_high = frag_end + last_tsn; + } + if (compare_with_wrap((last_tsn + frag_end), *biggest_tsn_acked, MAX_TSN)) { + *biggest_tsn_acked = last_tsn + frag_end; } if (i < num_seg) { non_revocable = 0; } else { non_revocable = 1; } - if (i == num_seg) { - tp1 = NULL; - } if (sctp_process_segment_range(stcb, &tp1, last_tsn, frag_strt, frag_end, non_revocable, &num_frs, biggest_newly_acked_tsn, this_sack_lowest_newack, ecn_seg_sums)) { chunk_freed = 1; } + prev_frag_end = frag_end; } if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FR_LOGGING_ENABLE) { if (num_frs) @@ -4817,7 +4791,7 @@ sctp_handle_sack(struct mbuf *m, int off } } /********************************************/ - /* drop the acked chunks from the sendqueue */ + /* drop the acked chunks from the sentqueue */ /********************************************/ asoc->last_acked_seq = cum_ack; @@ -4925,9 +4899,10 @@ done_with_it: * we had some before and now we have NONE. */ - if (num_seg) + if (num_seg) { sctp_check_for_revoked(stcb, asoc, cum_ack, biggest_tsn_acked); - else if (asoc->saw_sack_with_frags) { + asoc->saw_sack_with_frags = 1; + } else if (asoc->saw_sack_with_frags) { int cnt_revoked = 0; tp1 = TAILQ_FIRST(&asoc->sent_queue); @@ -4963,10 +4938,10 @@ done_with_it: } asoc->saw_sack_with_frags = 0; } - if (num_seg || num_nr_seg) - asoc->saw_sack_with_frags = 1; + if (num_nr_seg > 0) + asoc->saw_sack_with_nr_frags = 1; else - asoc->saw_sack_with_frags = 0; + asoc->saw_sack_with_nr_frags = 0; /* JRS - Use the congestion control given in the CC module */ asoc->cc_functions.sctp_cwnd_update_after_sack(stcb, asoc, accum_moved, reneged_all, will_exit_fast_recovery); Modified: stable/8/sys/netinet/sctp_input.c ============================================================================== --- stable/8/sys/netinet/sctp_input.c Mon Dec 13 08:56:30 2010 (r216401) +++ stable/8/sys/netinet/sctp_input.c Mon Dec 13 10:27:35 2010 (r216402) @@ -4644,6 +4644,7 @@ process_control_chunks: ((compare_with_wrap(cum_ack, stcb->asoc.last_acked_seq, MAX_TSN)) || (cum_ack == stcb->asoc.last_acked_seq)) && (stcb->asoc.saw_sack_with_frags == 0) && + (stcb->asoc.saw_sack_with_nr_frags == 0) && (!TAILQ_EMPTY(&stcb->asoc.sent_queue)) ) { /* @@ -4737,6 +4738,7 @@ process_control_chunks: ((compare_with_wrap(cum_ack, stcb->asoc.last_acked_seq, MAX_TSN)) || (cum_ack == stcb->asoc.last_acked_seq)) && (stcb->asoc.saw_sack_with_frags == 0) && + (stcb->asoc.saw_sack_with_nr_frags == 0) && (!TAILQ_EMPTY(&stcb->asoc.sent_queue))) { /* * We have a SIMPLE sack having no Modified: stable/8/sys/netinet/sctp_structs.h ============================================================================== --- stable/8/sys/netinet/sctp_structs.h Mon Dec 13 08:56:30 2010 (r216401) +++ stable/8/sys/netinet/sctp_structs.h Mon Dec 13 10:27:35 2010 (r216402) @@ -1058,6 +1058,7 @@ struct sctp_association { uint8_t delayed_connection; uint8_t ifp_had_enobuf; uint8_t saw_sack_with_frags; + uint8_t saw_sack_with_nr_frags; uint8_t in_asocid_hash; uint8_t assoc_up_sent; uint8_t adaptation_needed; From owner-svn-src-stable-8@FreeBSD.ORG Mon Dec 13 10:40:16 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCF2B1065698; Mon, 13 Dec 2010 10:40:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A968A8FC1E; Mon, 13 Dec 2010 10:40:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBDAeGu6076902; Mon, 13 Dec 2010 10:40:16 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBDAeGB5076900; Mon, 13 Dec 2010 10:40:16 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201012131040.oBDAeGB5076900@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 13 Dec 2010 10:40:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216403 - stable/8/sys/amd64/amd64 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Dec 2010 10:40:16 -0000 Author: kib Date: Mon Dec 13 10:40:16 2010 New Revision: 216403 URL: http://svn.freebsd.org/changeset/base/216403 Log: MFC r216231: Do not leak %rdx value in the previous image to the new image after execve(2). Approved by: re (bz) Modified: stable/8/sys/amd64/amd64/machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/amd64/amd64/machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/machdep.c Mon Dec 13 10:27:35 2010 (r216402) +++ stable/8/sys/amd64/amd64/machdep.c Mon Dec 13 10:40:16 2010 (r216403) @@ -874,6 +874,7 @@ exec_setregs(td, entry, stack, ps_string regs->tf_fs = _ufssel; regs->tf_gs = _ugssel; regs->tf_flags = TF_HASSEGS; + td->td_retval[1] = 0; /* * Reset the hardware debug registers if they were in use. From owner-svn-src-stable-8@FreeBSD.ORG Mon Dec 13 12:34:36 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA21D1065670; Mon, 13 Dec 2010 12:34:35 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C754A8FC1C; Mon, 13 Dec 2010 12:34:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBDCYZPG082512; Mon, 13 Dec 2010 12:34:35 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBDCYZvl082510; Mon, 13 Dec 2010 12:34:35 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201012131234.oBDCYZvl082510@svn.freebsd.org> From: Robert Watson Date: Mon, 13 Dec 2010 12:34:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216406 - stable/8/sys/amd64/conf X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Dec 2010 12:34:36 -0000 Author: rwatson Date: Mon Dec 13 12:34:35 2010 New Revision: 216406 URL: http://svn.freebsd.org/changeset/base/216406 Log: Merge r216365 from head to stable/8: Derive the XENHVM kernel from GENERIC, adding only the options required to support PV drivers (such as xenpci), and non-adptive locking (along with a comment about why). This change eliminates the synchronisation problem between GENERIC and XENHVM, which had become severely rotted in HEAD, and in 8-STABLE included non-production kernel debugging features such as WITNESS. However, it comes at the cost of enabling devices and options that may not be present under Xen (such as random ethernet cards). For now, opt for a simpler kernel configuration file rather than using nooptions/ nodevice to enumerate and eliminate them. This leads to a somewhat larger XENHVM kernel. This is an MFC candidate for 8-STABLE before 8.2, in order to provide a production-worthy XENHVM kernel configuration for amd64. Discussed with: gibbs, cperciva Reported by: Piete Brooks Sponsored by: DARPA, AFRL Approved by: re (kib) Modified: stable/8/sys/amd64/conf/XENHVM Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/amd64/conf/XENHVM ============================================================================== --- stable/8/sys/amd64/conf/XENHVM Mon Dec 13 12:15:46 2010 (r216405) +++ stable/8/sys/amd64/conf/XENHVM Mon Dec 13 12:34:35 2010 (r216406) @@ -1,161 +1,23 @@ # # XENHVM -- Xen HVM kernel configuration file for FreeBSD/amd64 # -# For more information on this file, please read the config(5) manual page, -# and/or the handbook section on Kernel Configuration Files: -# -# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html -# -# The handbook is also available locally in /usr/share/doc/handbook -# if you've installed the doc distribution, otherwise always see the -# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the -# latest information. -# -# An exhaustive list of options and more detailed explanations of the -# device lines is also present in the ../../conf/NOTES and NOTES files. -# If you are in doubt as to the purpose or necessity of a line, check first -# in NOTES. -# # $FreeBSD$ - -cpu HAMMER -ident XENHVM - -# To statically compile in device wiring instead of /boot/device.hints -#hints "GENERIC.hints" # Default places to look for devices. - -# Use the following to compile in values accessible to the kernel -# through getenv() (or kenv(1) in userland). The format of the file -# is 'variable=value', see kenv(1) # -# env "GENERIC.env" +include GENERIC +ident XENHVM -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions MODULES_OVERRIDE="" -options SCHED_ULE # ULE scheduler -options PREEMPTION # Enable kernel thread preemption -options INET # InterNETworking -options INET6 # IPv6 communications protocols -options SCTP # Stream Control Transmission Protocol -options FFS # Berkeley Fast Filesystem -options SOFTUPDATES # Enable FFS soft updates support -options UFS_ACL # Support for access control lists -options UFS_DIRHASH # Improve performance on big directories -options UFS_GJOURNAL # Enable gjournal-based UFS journaling -options MD_ROOT # MD is a potential root device -options NFSCLIENT # Network Filesystem Client -options NFSSERVER # Network Filesystem Server -options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCLIENT -options MSDOSFS # MSDOS Filesystem -options CD9660 # ISO 9660 Filesystem -options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework -options GEOM_PART_GPT # GUID Partition Tables. -options GEOM_LABEL # Provides labelization -options COMPAT_43TTY # BSD 4.3 TTY compat (sgtty) -options COMPAT_FREEBSD32 # Compatible with i386 binaries -options COMPAT_FREEBSD4 # Compatible with FreeBSD4 -options COMPAT_FREEBSD5 # Compatible with FreeBSD5 -options COMPAT_FREEBSD6 # Compatible with FreeBSD6 -options COMPAT_FREEBSD7 # Compatible with FreeBSD7 -options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE # ktrace(1) support -options STACK # stack(9) support -options SYSVSHM # SYSV-style shared memory -options SYSVMSG # SYSV-style message queues -options SYSVSEM # SYSV-style semaphores -options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions -options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) -options AUDIT # Security event auditing -#options KDTRACE_FRAME # Ensure frames are compiled in -#options KDTRACE_HOOKS # Kernel DTrace hooks +# +# Adaptive locks rely on a lock-free pointer read to determine the run state +# of the thread holding a lock when under contention; under a virtualisation +# system, the thread run state may not accurately reflect whether the thread +# (or rather its host VCPU) is actually executing. As such, disable this +# optimisation. +# options NO_ADAPTIVE_MUTEXES options NO_ADAPTIVE_RWLOCKS -# Debugging for use in -current -options KDB # Enable kernel debugger support. -options DDB # Support DDB. -options GDB # Support remote GDB. -options INVARIANTS # Enable calls of extra sanity checking -options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options WITNESS # Enable checks to detect deadlocks and cycles -options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed - -# Make an SMP-capable kernel by default -options SMP # Symmetric MultiProcessor Kernel - -# CPU frequency control -device cpufreq - -# Bus support. -device acpi -device pci - -# Floppy drives -device fdc - # Xen HVM support options XENHVM device xenpci - -# ATA and ATAPI devices -device ata -device atadisk # ATA disk drives -device ataraid # ATA RAID drives -device atapicd # ATAPI CDROM drives -device atapifd # ATAPI floppy drives -device atapist # ATAPI tape drives -options ATA_STATIC_ID # Static device numbering - -# SCSI peripherals -device scbus # SCSI bus (required for SCSI) -device ch # SCSI media changers -device da # Direct Access (disks) -device sa # Sequential Access (tape etc) -device cd # CD -device pass # Passthrough device (direct SCSI access) -device ses # SCSI Environmental Services (and SAF-TE) - - -# atkbdc0 controls both the keyboard and the PS/2 mouse -device atkbdc # AT keyboard controller -device atkbd # AT keyboard -device psm # PS/2 mouse - -device kbdmux # keyboard multiplexer - -device vga # VGA video card driver - -device splash # Splash screen and screen saver support - -# syscons is the default console driver, resembling an SCO console -device sc - -device agp # support several AGP chipsets - -# Serial (COM) ports -device uart # Generic UART driver - -# PCI Ethernet NICs that use the common MII bus controller code. -# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! -device miibus # MII bus support -device re # RealTek 8139C+/8169/8169S/8110S - -# Pseudo devices. -device loop # Network loopback -device random # Entropy device -device ether # Ethernet support -device tun # Packet tunnel. -device pty # BSD-style compatibility pseudo ttys -device md # Memory "disks" -device gif # IPv6 and IPv4 tunneling -device faith # IPv6-to-IPv4 relaying (translation) -device firmware # firmware assist module - -# The `bpf' device enables the Berkeley Packet Filter. -# Be aware of the administrative consequences of enabling this! -# Note that 'bpf' is required for DHCP. -device bpf # Berkeley packet filter From owner-svn-src-stable-8@FreeBSD.ORG Mon Dec 13 14:19:51 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6AAC106566B; Mon, 13 Dec 2010 14:19:51 +0000 (UTC) (envelope-from itetcu@FreeBSD.org) Received: from worf.ds9.tecnik93.com (worf.ds9.tecnik93.com [81.196.207.130]) by mx1.freebsd.org (Postfix) with ESMTP id 1D2C08FC20; Mon, 13 Dec 2010 14:19:50 +0000 (UTC) Received: from it.buh.tecnik93.com (unknown [188.27.101.203]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by worf.ds9.tecnik93.com (Postfix) with ESMTPSA id B457322C54D7; Mon, 13 Dec 2010 16:00:22 +0200 (EET) Date: Mon, 13 Dec 2010 16:00:21 +0200 From: Ion-Mihai Tetcu To: Robert Watson Message-ID: <20101213160021.60401b79@it.buh.tecnik93.com> In-Reply-To: <201012131234.oBDCYZvl082510@svn.freebsd.org> References: <201012131234.oBDCYZvl082510@svn.freebsd.org> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.22.1; amd64-portbld-freebsd8.1) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/VhbRdw3mS0Y7Uwz3lXwlCy3"; protocol="application/pgp-signature" Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r216406 - stable/8/sys/amd64/conf X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Dec 2010 14:19:51 -0000 --Sig_/VhbRdw3mS0Y7Uwz3lXwlCy3 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 13 Dec 2010 12:34:35 +0000 (UTC) Robert Watson wrote: > Author: rwatson > Date: Mon Dec 13 12:34:35 2010 > New Revision: 216406 > URL: http://svn.freebsd.org/changeset/base/216406 >=20 > Log: > Merge r216365 from head to stable/8: > =20 > Derive the XENHVM kernel from GENERIC, adding only the options > required to support PV drivers (such as xenpci), and non-adptive > locking (along with a comment about why). > =20 > This change eliminates the synchronisation problem between > GENERIC and XENHVM, which had become severely rotted in HEAD, and in > 8-STABLE included non-production kernel debugging features such as > WITNESS.=20 > However, it comes at the cost of enabling devices and options > that may not be present under Xen (such as random ethernet cards). > For now, opt for a simpler kernel configuration file rather than > using nooptions/ nodevice to enumerate and eliminate them. This > leads to a somewhat larger XENHVM kernel. > =20 > This is an MFC candidate for 8-STABLE before 8.2, in order to > provide a production-worthy XENHVM kernel configuration for amd64. > =20 > Discussed with: gibbs, cperciva > Reported by: Piete Brooks > Sponsored by: DARPA, AFRL > =20 > Approved by: re (kib) What about the same for i386? BTW, on a i386R trying to do a make buildworld && make buildkernel KERNCONF=3DVPS yesterday resulted in: cc -c -O -pipe -std=3Dc99 -g -Wall -Wredundant-decls -Wnested-externs -Wst= rict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual = -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sy= s -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -inclu= de opt_global.h -fno-common -finline-limit=3D8000 --param inline-unit-growt= h=3D100 --param large-function-growth=3D1000 -mno-align-long-strings -mpre= ferred-stack-boundary=3D2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3= -ffreestanding -fstack-protector -Werror /usr/src/sys/i386/xen/xen_machde= p.c /usr/src/sys/i386/xen/xen_machdep.c: In function 'initvalues': /usr/src/sys/i386/xen/xen_machdep.c:1077: error: 'IdlePTDnew' undeclared (f= irst use in this function) /usr/src/sys/i386/xen/xen_machdep.c:1077: error: (Each undeclared identifie= r is reported only once /usr/src/sys/i386/xen/xen_machdep.c:1077: error: for each function it appea= rs in.) /usr/src/sys/i386/xen/xen_machdep.c:1082: error: 'IdlePTDnewma' undeclared = (first use in this function) /usr/src/sys/i386/xen/xen_machdep.c:1085: error: 'IdlePDPTnew' undeclared (= first use in this function) /usr/src/sys/i386/xen/xen_machdep.c:1124: error: 'IdlePDPT' undeclared (fir= st use in this function) /usr/src/sys/i386/xen/xen_machdep.c:1125: error: 'IdlePDPTma' undeclared (f= irst use in this function) /usr/src/sys/i386/xen/xen_machdep.c:1125: error: 'IdlePDPTnewma' undeclared= (first use in this function) cc1: warnings being treated as errors /usr/src/sys/i386/xen/xen_machdep.c:893: warning: unused variable 'pdir_sha= dow_ma' *** Error code 1 Maybe I have something wrong in the KERNCONF? # cat /root/kernels/ # # XEN -- Kernel configuration for i386 XEN DomU # # $FreeBSD: src/sys/i386/conf/XEN,v 1.9.2.2 2010/11/28 16:25:16 cperciva Ex= p $ cpu I686_CPU ident XEN makeoptions DEBUG=3D-g # Build kernel with gdb(1) debug = symbols #makeoptions MODULES_OVERRIDE=3D"" options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options SCTP # Stream Control Transmission Proto= col options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big direct= ories options GEOM_LABEL # Provides labelization options COMPAT_43TTY # BSD 4.3 TTY compat (sgtty) options COMPAT_FREEBSD7 # Compatible with FreeBSD7 options KTRACE # ktrace(1) support options STACK # stack(9) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options P1003_1B_SEMAPHORES # POSIX-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time exte= nsions options KBD_INSTALL_CDEV # install a CDEV entry in /dev # Debugging for use in -current options KDB # Enable kernel debugger support. #options DDB # Support DDB. #options GDB # Support remote GDB. #options INVARIANTS # Enable calls of extra sanity chec= king #options INVARIANT_SUPPORT # Extra sanity checks of internal s= tructures, required by INVARIANTS #options WITNESS # Enable checks to detect deadlocks= and cycles #options WITNESS_SKIPSPIN # Don't run witness on spinlocks fo= r speed nooption NATIVE option XEN nodevice atpic nodevice isa options MCLSHIFT=3D12 # To make an SMP kernel, the next two lines are needed options SMP # Symmetric MultiProcessor Kernel device apic # I/O APIC #device atkbdc # AT keyboard controller #device atkbd # AT keyboard #device psm # PS/2 mouse device pci #device kbdmux # keyboard multiplexer device loop # Network loopback device random # Entropy device device ether # Ethernet support device pty # Pseudo-ttys (telnet etc) device bpf # Berkeley packet filter device eisa device ata options ATA_STATIC_ID # Static device numbering device vga # VGA video card driver options VGA_NO_FONT_LOADING options VGA_NO_MODE_CHANGE # syscons is the default console driver, resembling an SCO console device sc options SC_NO_CUTPASTE options SC_NO_FONT_LOADING options SC_NO_HISTORY options SC_NO_MODE_CHANGE options SC_NO_SYSMOUSE device pmtimer --=20 IOnut - Un^d^dregistered ;) FreeBSD "user" "Intellectual Property" is nowhere near as valuable as "Intellect" FreeBSD committer -> itetcu@FreeBSD.org, PGP Key ID 057E9F8B493A297B --Sig_/VhbRdw3mS0Y7Uwz3lXwlCy3 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEARECAAYFAk0GJvYACgkQJ7GIuiH/oeUBLQCeNva7WIhPV2LAHsQR/4we90pL MLIAoIZUXpOf3bZz9cL37CXM+4o4+UHA =aO+W -----END PGP SIGNATURE----- --Sig_/VhbRdw3mS0Y7Uwz3lXwlCy3-- From owner-svn-src-stable-8@FreeBSD.ORG Mon Dec 13 15:31:55 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F13D1106566B; Mon, 13 Dec 2010 15:31:55 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id ABAF38FC17; Mon, 13 Dec 2010 15:31:55 +0000 (UTC) Received: from lemongrass.sec.cl.cam.ac.uk (lemongrass.sec.cl.cam.ac.uk [128.232.18.47]) by cyrus.watson.org (Postfix) with ESMTPSA id D410546B03; Mon, 13 Dec 2010 10:31:52 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: "Robert N. M. Watson" In-Reply-To: <20101213160021.60401b79@it.buh.tecnik93.com> Date: Mon, 13 Dec 2010 15:31:48 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201012131234.oBDCYZvl082510@svn.freebsd.org> <20101213160021.60401b79@it.buh.tecnik93.com> To: Ion-Mihai Tetcu X-Mailer: Apple Mail (2.1082) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r216406 - stable/8/sys/amd64/conf X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Dec 2010 15:31:56 -0000 On 13 Dec 2010, at 14:00, Ion-Mihai Tetcu wrote: >> Derive the XENHVM kernel from GENERIC, adding only the options >> required to support PV drivers (such as xenpci), and non-adptive >> locking (along with a comment about why). >=20 > What about the same for i386? We don't currently support combining PV drivers with a non-PV kernel on = i386; nor do we support a pure PV kernel on amd64. The former strikes me = as more of a problem than the latter. Other than Amazon EC2, it seems = most interesting targets will support HVM in practice, and benefit from = PV drivers, but not require a pure PV kernel (i.e., Xen-modified VM = system). Your kernel configuration is likely trying to build options XEN on i386 = without PAE; we currently require options PAE to build a PV Xen kernel = on i386. (It also looks like "options XEN" is spelled "option XEN" in = your config file below?) Robert >=20 >=20 > BTW, on a i386R trying to do a > make buildworld && make buildkernel KERNCONF=3DVPS > yesterday resulted in: >=20 > cc -c -O -pipe -std=3Dc99 -g -Wall -Wredundant-decls -Wnested-externs = -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline = -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc = -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL = -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common = -finline-limit=3D8000 --param inline-unit-growth=3D100 --param = large-function-growth=3D1000 -mno-align-long-strings = -mpreferred-stack-boundary=3D2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 = -mno-sse3 -ffreestanding -fstack-protector -Werror = /usr/src/sys/i386/xen/xen_machdep.c > /usr/src/sys/i386/xen/xen_machdep.c: In function 'initvalues': > /usr/src/sys/i386/xen/xen_machdep.c:1077: error: 'IdlePTDnew' = undeclared (first use in this function) > /usr/src/sys/i386/xen/xen_machdep.c:1077: error: (Each undeclared = identifier is reported only once > /usr/src/sys/i386/xen/xen_machdep.c:1077: error: for each function it = appears in.) > /usr/src/sys/i386/xen/xen_machdep.c:1082: error: 'IdlePTDnewma' = undeclared (first use in this function) > /usr/src/sys/i386/xen/xen_machdep.c:1085: error: 'IdlePDPTnew' = undeclared (first use in this function) > /usr/src/sys/i386/xen/xen_machdep.c:1124: error: 'IdlePDPT' undeclared = (first use in this function) > /usr/src/sys/i386/xen/xen_machdep.c:1125: error: 'IdlePDPTma' = undeclared (first use in this function) > /usr/src/sys/i386/xen/xen_machdep.c:1125: error: 'IdlePDPTnewma' = undeclared (first use in this function) > cc1: warnings being treated as errors > /usr/src/sys/i386/xen/xen_machdep.c:893: warning: unused variable = 'pdir_shadow_ma' > *** Error code 1 >=20 >=20 > Maybe I have something wrong in the KERNCONF? >=20 > # cat /root/kernels/ > # > # XEN -- Kernel configuration for i386 XEN DomU > # > # $FreeBSD: src/sys/i386/conf/XEN,v 1.9.2.2 2010/11/28 16:25:16 = cperciva Exp $ >=20 > cpu I686_CPU > ident XEN >=20 > makeoptions DEBUG=3D-g # Build kernel with gdb(1) = debug symbols > #makeoptions MODULES_OVERRIDE=3D"" >=20 > options SCHED_ULE # ULE scheduler > options PREEMPTION # Enable kernel thread = preemption >=20 > options INET # InterNETworking > options INET6 # IPv6 communications = protocols > options SCTP # Stream Control Transmission = Protocol > options FFS # Berkeley Fast Filesystem > options SOFTUPDATES # Enable FFS soft updates = support > options UFS_ACL # Support for access control = lists > options UFS_DIRHASH # Improve performance on big = directories > options GEOM_LABEL # Provides labelization > options COMPAT_43TTY # BSD 4.3 TTY compat (sgtty) > options COMPAT_FREEBSD7 # Compatible with FreeBSD7 > options KTRACE # ktrace(1) support > options STACK # stack(9) support > options SYSVSHM # SYSV-style shared memory > options SYSVMSG # SYSV-style message queues > options SYSVSEM # SYSV-style semaphores > options P1003_1B_SEMAPHORES # POSIX-style semaphores > options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time = extensions > options KBD_INSTALL_CDEV # install a CDEV entry in /dev >=20 > # Debugging for use in -current > options KDB # Enable kernel debugger = support. > #options DDB # Support DDB. > #options GDB # Support remote GDB. > #options INVARIANTS # Enable calls of extra sanity = checking > #options INVARIANT_SUPPORT # Extra sanity checks of = internal structures, required by INVARIANTS > #options WITNESS # Enable checks to detect = deadlocks and cycles > #options WITNESS_SKIPSPIN # Don't run witness on = spinlocks for speed >=20 > nooption NATIVE > option XEN > nodevice atpic > nodevice isa > options MCLSHIFT=3D12 >=20 > # To make an SMP kernel, the next two lines are needed > options SMP # Symmetric MultiProcessor = Kernel > device apic # I/O APIC >=20 >=20 > #device atkbdc # AT keyboard controller > #device atkbd # AT keyboard > #device psm # PS/2 mouse > device pci >=20 > #device kbdmux # keyboard multiplexer >=20 > device loop # Network loopback > device random # Entropy device > device ether # Ethernet support > device pty # Pseudo-ttys (telnet etc) > device bpf # Berkeley packet filter >=20 > device eisa > device ata > options ATA_STATIC_ID # Static device numbering >=20 > device vga # VGA video card driver > options VGA_NO_FONT_LOADING > options VGA_NO_MODE_CHANGE >=20 > # syscons is the default console driver, resembling an SCO console > device sc > options SC_NO_CUTPASTE > options SC_NO_FONT_LOADING > options SC_NO_HISTORY > options SC_NO_MODE_CHANGE > options SC_NO_SYSMOUSE >=20 > device pmtimer >=20 >=20 >=20 > --=20 > IOnut - Un^d^dregistered ;) FreeBSD "user" > "Intellectual Property" is nowhere near as valuable as = "Intellect" > FreeBSD committer -> itetcu@FreeBSD.org, PGP Key ID 057E9F8B493A297B From owner-svn-src-stable-8@FreeBSD.ORG Mon Dec 13 17:53:42 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26BD91065764; Mon, 13 Dec 2010 17:53:41 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A54C8FC17; Mon, 13 Dec 2010 17:53:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBDHrftE089467; Mon, 13 Dec 2010 17:53:41 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBDHrfAf089465; Mon, 13 Dec 2010 17:53:41 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201012131753.oBDHrfAf089465@svn.freebsd.org> From: Bernhard Schmidt Date: Mon, 13 Dec 2010 17:53:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216411 - stable/8/sys/dev/wpi X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Dec 2010 17:53:42 -0000 Author: bschmidt Date: Mon Dec 13 17:53:41 2010 New Revision: 216411 URL: http://svn.freebsd.org/changeset/base/216411 Log: MFC r216238: Fix scanning after loosing a connection. The firmware assumes that as long as an association ID is set any scan is supposed to be a background scan. This implies that the firmware will switch back to the associated channel after a certain threshold, though, we are not notified about that. We currently catch this case by a timer which will reset the firmware after a 'scan timeout', though, upper layers are not notified about that and will simply hang until manual intervention. Fix this by resetting the firmware's knowledge about any association on RUN -> ASSOC and !INIT -> SCAN transitions. Approved by: re (kib) Modified: stable/8/sys/dev/wpi/if_wpi.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/wpi/if_wpi.c ============================================================================== --- stable/8/sys/dev/wpi/if_wpi.c Mon Dec 13 17:53:38 2010 (r216410) +++ stable/8/sys/dev/wpi/if_wpi.c Mon Dec 13 17:53:41 2010 (r216411) @@ -1248,8 +1248,25 @@ wpi_newstate(struct ieee80211vap *vap, e IEEE80211_UNLOCK(ic); WPI_LOCK(sc); - if (nstate == IEEE80211_S_AUTH) { - /* The node must be registered in the firmware before auth */ + if (nstate == IEEE80211_S_SCAN && vap->iv_state != IEEE80211_S_INIT) { + /* + * On !INIT -> SCAN transitions, we need to clear any possible + * knowledge about associations. + */ + error = wpi_config(sc); + if (error != 0) { + device_printf(sc->sc_dev, + "%s: device config failed, error %d\n", + __func__, error); + } + } + if (nstate == IEEE80211_S_AUTH || + (nstate == IEEE80211_S_ASSOC && vap->iv_state == IEEE80211_S_RUN)) { + /* + * The node must be registered in the firmware before auth. + * Also the associd must be cleared on RUN -> ASSOC + * transitions. + */ error = wpi_auth(sc, vap); if (error != 0) { device_printf(sc->sc_dev, From owner-svn-src-stable-8@FreeBSD.ORG Mon Dec 13 17:56:31 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74CAD1065670; Mon, 13 Dec 2010 17:56:31 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 62B6C8FC19; Mon, 13 Dec 2010 17:56:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBDHuVQN089576; Mon, 13 Dec 2010 17:56:31 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBDHuVSx089574; Mon, 13 Dec 2010 17:56:31 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201012131756.oBDHuVSx089574@svn.freebsd.org> From: Bernhard Schmidt Date: Mon, 13 Dec 2010 17:56:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216412 - stable/8/sys/dev/iwn X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Dec 2010 17:56:31 -0000 Author: bschmidt Date: Mon Dec 13 17:56:31 2010 New Revision: 216412 URL: http://svn.freebsd.org/changeset/base/216412 Log: MFC r216237: Fixes for monitor mode: - Do not call iwn_calib_reset() for monitor mode. We do not want to query information and do runtime calibration while in monitor mode. Poking the firmware with adjustments for calibration results in firmware asserts. This could happened on RUN -> RUN transition only. - Adjust blink rate for monitor mode. It's supposed to not freak out and turn off after a while. - While here, remove one useless assignment of calib.state, it gets overwritten later in the function. Approved by: re (kib) Modified: stable/8/sys/dev/iwn/if_iwn.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/8/sys/dev/iwn/if_iwn.c Mon Dec 13 17:53:41 2010 (r216411) +++ stable/8/sys/dev/iwn/if_iwn.c Mon Dec 13 17:56:31 2010 (r216412) @@ -1983,7 +1983,8 @@ iwn_newstate(struct ieee80211vap *vap, e /* * RUN -> RUN transition; Just restart the timers. */ - if (vap->iv_state == IEEE80211_S_RUN) { + if (vap->iv_state == IEEE80211_S_RUN && + vap->iv_opmode != IEEE80211_M_MONITOR) { iwn_calib_reset(sc); break; } @@ -4851,11 +4852,9 @@ iwn_run(struct iwn_softc *sc, struct iee struct iwn_node_info node; int error; - sc->calib.state = IWN_CALIB_STATE_INIT; - if (ic->ic_opmode == IEEE80211_M_MONITOR) { /* Link LED blinks while monitoring. */ - iwn_set_led(sc, IWN_LED_LINK, 5, 5); + iwn_set_led(sc, IWN_LED_LINK, 20, 20); return 0; } error = iwn_set_timing(sc, ni); From owner-svn-src-stable-8@FreeBSD.ORG Mon Dec 13 18:28:33 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82B5A1065670; Mon, 13 Dec 2010 18:28:33 +0000 (UTC) (envelope-from itetcu@FreeBSD.org) Received: from worf.ds9.tecnik93.com (worf.ds9.tecnik93.com [81.196.207.130]) by mx1.freebsd.org (Postfix) with ESMTP id DBFC08FC0A; Mon, 13 Dec 2010 18:28:32 +0000 (UTC) Received: from it.buh.tecnik93.com (unknown [188.27.101.203]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by worf.ds9.tecnik93.com (Postfix) with ESMTPSA id 942C022C54D4; Mon, 13 Dec 2010 20:28:31 +0200 (EET) Date: Mon, 13 Dec 2010 20:28:30 +0200 From: Ion-Mihai Tetcu To: "Robert N. M. Watson" Message-ID: <20101213202830.75fbce4c@it.buh.tecnik93.com> In-Reply-To: References: <201012131234.oBDCYZvl082510@svn.freebsd.org> <20101213160021.60401b79@it.buh.tecnik93.com> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.22.1; amd64-portbld-freebsd8.1) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/Rs_BOp4qMCqJKg49KoSDVhF"; protocol="application/pgp-signature" Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r216406 - stable/8/sys/amd64/conf X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Dec 2010 18:28:33 -0000 --Sig_/Rs_BOp4qMCqJKg49KoSDVhF Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 13 Dec 2010 15:31:48 +0000 "Robert N. M. Watson" wrote: >=20 > On 13 Dec 2010, at 14:00, Ion-Mihai Tetcu wrote: >=20 > >> Derive the XENHVM kernel from GENERIC, adding only the options > >> required to support PV drivers (such as xenpci), and non-adptive > >> locking (along with a comment about why). > >=20 > > What about the same for i386? >=20 > We don't currently support combining PV drivers with a non-PV kernel > on i386; nor do we support a pure PV kernel on amd64. The former > strikes me as more of a problem than the latter. Other than Amazon > EC2, it seems most interesting targets will support HVM in practice, > and benefit from PV drivers, but not require a pure PV kernel (i.e., > Xen-modified VM system). I see. Thanks for the time you took to explain things, I'm very new to XEN. Do we have any docs somewhere (well, except the sources) about our XEN support and various options / optimizations? I only know about AdrianChadd's wiki pags and http://wiki.freebsd.org/FreeBSD/Xen (which are nice, if you happen to know about XEN already and especially if you want to work towards a FreebSD as XEN host). I guess there are more interested people taht want just to run FreeBSD as guest OS (my case). >=20 > Your kernel configuration is likely trying to build options XEN on > i386 without PAE; we currently require options PAE to build a PV Xen > kernel on i386.=20 Hum, yes, I thought it doesn't make sense to have PAE when my VM has only 1GB of RAM. Maybe a comment in sys/i386/conf/XEN would help. > (It also looks like "options XEN" is spelled "option > XEN" in your config file below?) Which proves I mange to make typos even when copy/pasting, sigh. Thanks again, --=20 IOnut - Un^d^dregistered ;) FreeBSD "user" "Intellectual Property" is nowhere near as valuable as "Intellect" FreeBSD committer -> itetcu@FreeBSD.org, PGP Key ID 057E9F8B493A297B --Sig_/Rs_BOp4qMCqJKg49KoSDVhF Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEARECAAYFAk0GZc4ACgkQJ7GIuiH/oeWl3QCeLsALW+iCACuyWFBUZaVOv2Zb B5IAnjvR41fQDp+ESiKsp16/lWlktH9L =wY6T -----END PGP SIGNATURE----- --Sig_/Rs_BOp4qMCqJKg49KoSDVhF-- From owner-svn-src-stable-8@FreeBSD.ORG Mon Dec 13 20:04:57 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62DB8106567A; Mon, 13 Dec 2010 20:04:57 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 282C98FC17; Mon, 13 Dec 2010 20:04:57 +0000 (UTC) Received: from [192.168.2.102] (host86-163-246-141.range86-163.btcentralplus.com [86.163.246.141]) by cyrus.watson.org (Postfix) with ESMTPSA id 5955946B2E; Mon, 13 Dec 2010 15:04:54 -0500 (EST) References: <201012131234.oBDCYZvl082510@svn.freebsd.org> <20101213160021.60401b79@it.buh.tecnik93.com> <20101213202830.75fbce4c@it.buh.tecnik93.com> In-Reply-To: <20101213202830.75fbce4c@it.buh.tecnik93.com> Mime-Version: 1.0 (iPad Mail 8C148) Message-Id: X-Mailer: iPad Mail (8C148) From: "Robert N. M. Watson" Date: Mon, 13 Dec 2010 20:07:05 +0000 To: Ion-Mihai Tetcu Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "svn-src-stable@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , "Robert N. M. Watson" , "svn-src-stable-8@freebsd.org" Subject: Re: svn commit: r216406 - stable/8/sys/amd64/conf X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Dec 2010 20:04:57 -0000 On 13 Dec 2010, at 18:28, Ion-Mihai Tetcu wrote: > I see. Thanks for the time you took to explain things, I'm very new to > XEN. > Do we have any docs somewhere (well, except the sources) about our XEN > support and various options / optimizations? I only know about > AdrianChadd's wiki pags and http://wiki.freebsd.org/FreeBSD/Xen (which > are nice, if you happen to know about XEN already and especially if you > want to work towards a FreebSD as XEN host). > I guess there are more interested people taht want just to run FreeBSD > as guest OS (my case). >>=20 The current state of our Xen documentation is ... minimalist. Having basical= ly come to it for the first time last week, when we decided we needed to dep= loy FreeBSD on one of our Xen server pools, it's proven pretty hard-going. I= have some more technical problems to resolve but high on my todo list for t= he next couple of days is documenting what has worked for me on the Wiki (wi= th the intent of migrating that to the Handbook once I've confirmed my instr= uctions are reproducible!). I also want to drop in at least some stub man pa= ges for our PV drivers. However, more fundamentally, we appear to have some serious functional gaps:= - No ability to use PV drivers under HVM on i386. - No ability to use a full PV kernel for amd64 (I don't consider this a prob= lem for my use though -- HVM on amd64 appears to work well). - No (obvious) port of Xen guest command line tools to steer ballooning, etc= . - Likely under-testing in certain PV drivers, such as the balloon driver. - A possible issue with VM migration on PV i386 (we saw panics in local test= ing, but now wonder I it was an unrelated issue relating to different CPU ty= pes -- more investigation due). - No event mechanism for blkfront to propagate block device expansion up the= geom stack, in support of live file system resizing. Right now a destructiv= e orphan/retaste is required. - No live file system resizing support in UFS (does work in ZFS). - No reference "appliance" images for VM starting points (really requires li= ve file system resizing to be useful). This was a top request o our admin fo= lks. All this said, and after quite a lot of head-scratching, FreeBSD/amd64 seems= to work well on Xen here a Cambridge, both with and without Xen PV drivers c= ompiled in. We need a lot of sanding and polishing but the foundations have b= een usefully laid. And I would agree that documentation is key. Robert= From owner-svn-src-stable-8@FreeBSD.ORG Mon Dec 13 21:01:03 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B0BD1065670; Mon, 13 Dec 2010 21:01:03 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from out-0.mx.aerioconnect.net (out-0-28.mx.aerioconnect.net [216.240.47.88]) by mx1.freebsd.org (Postfix) with ESMTP id F330B8FC15; Mon, 13 Dec 2010 21:01:02 +0000 (UTC) Received: from idiom.com (postfix@mx0.idiom.com [216.240.32.160]) by out-0.mx.aerioconnect.net (8.13.8/8.13.8) with ESMTP id oBDKjTGj024910; Mon, 13 Dec 2010 12:45:29 -0800 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by idiom.com (Postfix) with ESMTP id BA0802D6012; Mon, 13 Dec 2010 12:45:27 -0800 (PST) Message-ID: <4D0685E5.3050803@freebsd.org> Date: Mon, 13 Dec 2010 12:45:25 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: "Robert N. M. Watson" References: <201012131234.oBDCYZvl082510@svn.freebsd.org> <20101213160021.60401b79@it.buh.tecnik93.com> <20101213202830.75fbce4c@it.buh.tecnik93.com> In-Reply-To: X-Scanned-By: MIMEDefang 2.67 on 216.240.47.51 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "svn-src-stable@freebsd.org" , "svn-src-all@freebsd.org" , Ion-Mihai Tetcu , "src-committers@freebsd.org" , "svn-src-stable-8@freebsd.org" Subject: Re: svn commit: r216406 - stable/8/sys/amd64/conf X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Dec 2010 21:01:03 -0000 On 12/13/10 12:07 PM, Robert N. M. Watson wrote: > On 13 Dec 2010, at 18:28, Ion-Mihai Tetcu > wrote: > >> I see. Thanks for the time you took to explain things, I'm very new to >> XEN. >> Do we have any docs somewhere (well, except the sources) about our XEN >> support and various options / optimizations? I only know about >> AdrianChadd's wiki pags and http://wiki.freebsd.org/FreeBSD/Xen (which >> are nice, if you happen to know about XEN already and especially if you >> want to work towards a FreebSD as XEN host). >> I guess there are more interested people taht want just to run FreeBSD >> as guest OS (my case). > > The current state of our Xen documentation is ... minimalist. Having > basically come to it for the first time last week, when we decided > we needed to deploy FreeBSD on one of our Xen server pools, it's > proven pretty hard-going. I have some more technical problems to > resolve but high on my todo list for the next couple of days is > documenting what has worked for me on the Wiki (with the intent of > migrating that to the Handbook once I've confirmed my instructions > are reproducible!). I also want to drop in at least some stub man > pages for our PV drivers. > > However, more fundamentally, we appear to have some serious > functional gaps: > > - No ability to use PV drivers under HVM on i386. > - No ability to use a full PV kernel for amd64 (I don't consider > this a problem for my use though -- HVM on amd64 appears to work well). > - No (obvious) port of Xen guest command line tools to steer > ballooning, etc. > - Likely under-testing in certain PV drivers, such as the balloon > driver. > - A possible issue with VM migration on PV i386 (we saw panics in > local testing, but now wonder I it was an unrelated issue relating > to different CPU types -- more investigation due). > - No event mechanism for blkfront to propagate block device > expansion up the geom stack, in support of live file system > resizing. Right now a destructive orphan/retaste is required. > - No live file system resizing support in UFS (does work in ZFS). > - No reference "appliance" images for VM starting points (really > requires live file system resizing to be useful). This was a top > request o our admin folks. > > All this said, and after quite a lot of head-scratching, > FreeBSD/amd64 seems to work well on Xen here a Cambridge, both with > and without Xen PV drivers compiled in. We need a lot of sanding and > polishing but the foundations have been usefully laid. And I would > agree that documentation is key. > > Robert you should talk to the people at rootBSD.com they use Xen to deploy their BSD VPS systems and no doubt have stories to tell and suggestions as to where we could get the best bang for our buck. From owner-svn-src-stable-8@FreeBSD.ORG Tue Dec 14 13:45:57 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91A2A106564A; Tue, 14 Dec 2010 13:45:57 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 646978FC17; Tue, 14 Dec 2010 13:45:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBEDjv7p020047; Tue, 14 Dec 2010 13:45:57 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBEDjvdt020045; Tue, 14 Dec 2010 13:45:57 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201012141345.oBEDjvdt020045@svn.freebsd.org> From: Rick Macklem Date: Tue, 14 Dec 2010 13:45:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216430 - stable/8/sys/fs/nfsserver X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2010 13:45:57 -0000 Author: rmacklem Date: Tue Dec 14 13:45:57 2010 New Revision: 216430 URL: http://svn.freebsd.org/changeset/base/216430 Log: MFC: r216330 Disable attempts to establish a callback connection from the experimental NFSv4 server to a NFSv4 client when delegations are not being issued, even if the client advertises a callback path. This avoids a problem where a Linux client advertises a callback path that doesn't work, due to a firewall, and then times out an Open attempt before the FreeBSD server gives up its callback connection attempt. (Suggested by drb at karlov.mff.cuni.cz.) The server should probably have a 1sec timeout on callback connection attempts when there are no delegations issued to the client, but that patch will require changes to the krpc and this serves as a work around until then. Tested by: drb at karlov.mff.cuni.cz Approved by: re (kib) Modified: stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Tue Dec 14 10:06:28 2010 (r216429) +++ stable/8/sys/fs/nfsserver/nfs_nfsdstate.c Tue Dec 14 13:45:57 2010 (r216430) @@ -147,12 +147,20 @@ nfsrv_setclient(struct nfsrv_descript *n if (nfsrv_openpluslock > NFSRV_V4STATELIMIT) return (NFSERR_RESOURCE); - if ((nd->nd_flag & ND_GSS) && nfsrv_nogsscallback) + if (nfsrv_issuedelegs == 0 || + ((nd->nd_flag & ND_GSS) != 0 && nfsrv_nogsscallback != 0)) /* - * Don't do callbacks for AUTH_GSS. - * (Since these aren't yet debugged, they might cause the - * server to crap out, if they get past the Init call to - * the client.) + * Don't do callbacks when delegations are disabled or + * for AUTH_GSS unless enabled via nfsrv_nogsscallback. + * If establishing a callback connection is attempted + * when a firewall is blocking the callback path, the + * server may wait too long for the connect attempt to + * succeed during the Open. Some clients, such as Linux, + * may timeout and give up on the Open before the server + * replies. Also, since AUTH_GSS callbacks are not + * yet interoperability tested, they might cause the + * server to crap out, if they get past the Init call to + * the client. */ new_clp->lc_program = 0; From owner-svn-src-stable-8@FreeBSD.ORG Tue Dec 14 15:33:49 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27C65106564A; Tue, 14 Dec 2010 15:33:49 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EEBB38FC15; Tue, 14 Dec 2010 15:33:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBEFXmVP022502; Tue, 14 Dec 2010 15:33:48 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBEFXmrH022500; Tue, 14 Dec 2010 15:33:48 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201012141533.oBEFXmrH022500@svn.freebsd.org> From: Tijl Coosemans Date: Tue, 14 Dec 2010 15:33:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216433 - stable/8/lib/csu/ia64 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2010 15:33:49 -0000 Author: tijl Date: Tue Dec 14 15:33:48 2010 New Revision: 216433 URL: http://svn.freebsd.org/changeset/base/216433 Log: MFC r216351: Add a .note.ABI-tag section to ia64 startup files by linking crtbrand.c in crt1.o. On other architectures crtbrand.c is included from crt1.c, but that's not a C source code file on ia64. Instead it is compiled separately and included in crt1.o using incremental linking. Approved by: re (kensmith), kib (mentor) Modified: stable/8/lib/csu/ia64/Makefile Directory Properties: stable/8/lib/csu/ (props changed) Modified: stable/8/lib/csu/ia64/Makefile ============================================================================== --- stable/8/lib/csu/ia64/Makefile Tue Dec 14 15:14:08 2010 (r216432) +++ stable/8/lib/csu/ia64/Makefile Tue Dec 14 15:33:48 2010 (r216433) @@ -2,22 +2,43 @@ .PATH: ${.CURDIR}/../common -SRCS= crt1.S crti.S crtn.S +SRCS= crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} -OBJS+= Scrt1.o gcrt1.o -CFLAGS+= -Wall -Wno-unused \ - -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include +OBJS+= crt1.o gcrt1.o Scrt1.o +CFLAGS+= -Wall -Wno-unused all: ${OBJS} CLEANFILES= ${OBJS} +CLEANFILES+= crt1_.o gcrt1_.o Scrt1_.o +CLEANFILES+= crtbrand.o gcrtbrand.o Scrtbrand.o -gcrt1.o: crt1.S - ${CC} ${CFLAGS} -DGCRT -c -o gcrt1.o ${.ALLSRC} +crt1_.o: crt1.S + ${CC} ${CFLAGS} -c -o ${.TARGET} ${.ALLSRC} -Scrt1.o: crt1.S - ${CC} ${CFLAGS} -fPIC -DPIC -c -o Scrt1.o ${.ALLSRC} +crtbrand.o: crtbrand.c + ${CC} ${CFLAGS} -c -o ${.TARGET} ${.ALLSRC} + +crt1.o: crt1_.o crtbrand.o + ${LD} ${LDFLAGS} -r -o ${.TARGET} crt1_.o crtbrand.o + +gcrt1_.o: crt1.S + ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.ALLSRC} + +gcrtbrand.o: crtbrand.c + ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.ALLSRC} + +gcrt1.o: gcrt1_.o gcrtbrand.o + ${LD} ${LDFLAGS} -r -o ${.TARGET} ${.ALLSRC} + +Scrt1_.o: crt1.S + ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.ALLSRC} + +Scrtbrand.o: crtbrand.c + ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.ALLSRC} + +Scrt1.o: Scrt1_.o Scrtbrand.o + ${LD} ${LDFLAGS} -r -o ${.TARGET} ${.ALLSRC} realinstall: ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ From owner-svn-src-stable-8@FreeBSD.ORG Tue Dec 14 15:34:00 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 243CA106564A; Tue, 14 Dec 2010 15:34:00 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EAFD08FC0C; Tue, 14 Dec 2010 15:33:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBEFXxce022542; Tue, 14 Dec 2010 15:33:59 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBEFXxBf022540; Tue, 14 Dec 2010 15:33:59 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201012141533.oBEFXxBf022540@svn.freebsd.org> From: Martin Matuska Date: Tue, 14 Dec 2010 15:33:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216434 - stable/8/cddl/contrib/opensolaris/lib/libzpool/common X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2010 15:34:00 -0000 Author: mm Date: Tue Dec 14 15:33:59 2010 New Revision: 216434 URL: http://svn.freebsd.org/changeset/base/216434 Log: MFC r210044, r214622: MFC r210044 (pjd): MFp4 180933: Initialize rw_count properly so that zdb(8) doesn't trigger assertion in rw_enter(): ASSERT(rwlp->rw_count == 0); While here, assert that rw_count is 0 when destroying the lock. MFC r214622 (pjd): 1. Remove invalid assertion. 2. Properly recalculate delta in case pthread_cond_timedwait() is interrupted. 3. Style fix. Reported by: [1] App Deb Approved by: re (kib), pjd, delphij (mentor) Modified: stable/8/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Tue Dec 14 15:33:48 2010 (r216433) +++ stable/8/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c Tue Dec 14 15:33:59 2010 (r216434) @@ -174,11 +174,13 @@ rw_init(krwlock_t *rwlp, char *name, int rwlock_init(&rwlp->rw_lock, USYNC_THREAD, NULL); rwlp->rw_owner = NULL; rwlp->initialized = B_TRUE; + rwlp->rw_count = 0; } void rw_destroy(krwlock_t *rwlp) { + ASSERT(rwlp->rw_count == 0); rwlock_destroy(&rwlp->rw_lock); rwlp->rw_owner = (void *)-1UL; rwlp->initialized = B_FALSE; @@ -306,9 +308,9 @@ cv_timedwait(kcondvar_t *cv, kmutex_t *m struct timeval tv; clock_t delta; - ASSERT(abstime > 0); + abstime += lbolt; top: - delta = abstime; + delta = abstime - lbolt; if (delta <= 0) return (-1); @@ -319,7 +321,7 @@ top: ts.tv_nsec = tv.tv_usec * 1000 + (delta % hz) * (NANOSEC / hz); ASSERT(ts.tv_nsec >= 0); - if(ts.tv_nsec >= NANOSEC) { + if (ts.tv_nsec >= NANOSEC) { ts.tv_sec++; ts.tv_nsec -= NANOSEC; } From owner-svn-src-stable-8@FreeBSD.ORG Tue Dec 14 15:36:48 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B619106564A; Tue, 14 Dec 2010 15:36:48 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 482148FC1E; Tue, 14 Dec 2010 15:36:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBEFam4m022683; Tue, 14 Dec 2010 15:36:48 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBEFamXZ022680; Tue, 14 Dec 2010 15:36:48 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201012141536.oBEFamXZ022680@svn.freebsd.org> From: Martin Matuska Date: Tue, 14 Dec 2010 15:36:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216436 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2010 15:36:48 -0000 Author: mm Date: Tue Dec 14 15:36:47 2010 New Revision: 216436 URL: http://svn.freebsd.org/changeset/base/216436 Log: MFC r208683, r210999, r212385: MFC r208683 (pjd): Fix a bug where resilver is not started automatically on pool import or load. If disk was missing on pool load or import and on next pool load or import it was present, resilver wasn't started automatically and ZFS reported all disks as ONLINE and healthy. Then, when another disk died, pool became unaccessible, because if it was 2-way mirror or RAIDZ1 two vdevs were out of sync. To fix the problem, start resilver automatically on pool load or import. Obtained from: OpenSolaris MFC r210999 (pjd): In FreeBSD we use 'jailed' property. MFC r212385 (pjd): On FreeBSD we can log from pool that have multiple top-level vdevs or log vdevs, so don't deny adding new vdevs if bootfs property is set. Approved by: re (kib), pjd, delphij (mentor) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Dec 14 15:35:44 2010 (r216435) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Tue Dec 14 15:36:47 2010 (r216436) @@ -1595,6 +1595,12 @@ spa_load(spa_t *spa, nvlist_t *config, s */ if (need_update) spa_async_request(spa, SPA_ASYNC_CONFIG_UPDATE); + + /* + * Check all DTLs to see if anything needs resilvering. + */ + if (vdev_resilver_needed(rvd, NULL, NULL)) + spa_async_request(spa, SPA_ASYNC_RESILVER); } error = 0; Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Dec 14 15:35:44 2010 (r216435) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Dec 14 15:36:47 2010 (r216436) @@ -357,7 +357,7 @@ zfs_secpolicy_setprop(const char *name, * quota on things *under* (ie. contained by) * the thing they own. */ - if (dsl_prop_get_integer(name, "zoned", &zoned, + if (dsl_prop_get_integer(name, "jailed", &zoned, setpoint)) return (EPERM); if (!zoned || strlen(name) <= strlen(setpoint)) @@ -1217,8 +1217,12 @@ zfs_ioc_vdev_add(zfs_cmd_t *zc) { spa_t *spa; int error; +#ifdef sun nvlist_t *config, **l2cache, **spares; uint_t nl2cache = 0, nspares = 0; +#else + nvlist_t *config; +#endif error = spa_open(zc->zc_name, &spa, FTAG); if (error != 0) @@ -1226,6 +1230,7 @@ zfs_ioc_vdev_add(zfs_cmd_t *zc) error = get_nvlist(zc->zc_nvlist_conf, zc->zc_nvlist_conf_size, &config); +#ifdef sun (void) nvlist_lookup_nvlist_array(config, ZPOOL_CONFIG_L2CACHE, &l2cache, &nl2cache); @@ -1246,6 +1251,7 @@ zfs_ioc_vdev_add(zfs_cmd_t *zc) spa_close(spa, FTAG); return (EDOM); } +#endif if (error == 0) { error = spa_vdev_add(spa, config); From owner-svn-src-stable-8@FreeBSD.ORG Tue Dec 14 19:59:40 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36782106564A; Tue, 14 Dec 2010 19:59:40 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 239B98FC12; Tue, 14 Dec 2010 19:59:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBEJxeAN028692; Tue, 14 Dec 2010 19:59:40 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBEJxebZ028690; Tue, 14 Dec 2010 19:59:40 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201012141959.oBEJxebZ028690@svn.freebsd.org> From: Jack F Vogel Date: Tue, 14 Dec 2010 19:59:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216440 - stable/8/sys/dev/e1000 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2010 19:59:40 -0000 Author: jfv Date: Tue Dec 14 19:59:39 2010 New Revision: 216440 URL: http://svn.freebsd.org/changeset/base/216440 Log: MFC r216172, r216176: Correct the RX discard and refresh_mbuf logic to match igb, the old discard code could cause panics due to a bad pointer, now simply have discard always free mbufs and depend on refresh. In the refresh code, make sure the mbuf and soft buf struct are properly reset. Approved by: re Modified: stable/8/sys/dev/e1000/if_em.c Modified: stable/8/sys/dev/e1000/if_em.c ============================================================================== --- stable/8/sys/dev/e1000/if_em.c Tue Dec 14 18:23:15 2010 (r216439) +++ stable/8/sys/dev/e1000/if_em.c Tue Dec 14 19:59:39 2010 (r216440) @@ -525,7 +525,7 @@ em_attach(device_t dev) /* Sysctl for setting the interface flow control */ em_set_flow_cntrl(adapter, "flow_control", - "max number of rx packets to process", + "configure flow control", &adapter->fc_setting, em_fc_setting); /* @@ -3751,46 +3751,43 @@ em_refresh_mbufs(struct rx_ring *rxr, in cleaned = -1; while (i != limit) { rxbuf = &rxr->rx_buffers[i]; - /* - ** Just skip entries with a buffer, - ** they can only be due to an error - ** and are to be reused. - */ - if (rxbuf->m_head != NULL) - goto reuse; - m = m_getjcl(M_DONTWAIT, MT_DATA, - M_PKTHDR, adapter->rx_mbuf_sz); - /* - ** If we have a temporary resource shortage - ** that causes a failure, just abort refresh - ** for now, we will return to this point when - ** reinvoked from em_rxeof. - */ - if (m == NULL) - goto update; + if (rxbuf->m_head == NULL) { + m = m_getjcl(M_DONTWAIT, MT_DATA, + M_PKTHDR, adapter->rx_mbuf_sz); + /* + ** If we have a temporary resource shortage + ** that causes a failure, just abort refresh + ** for now, we will return to this point when + ** reinvoked from em_rxeof. + */ + if (m == NULL) + goto update; + } else + m = rxbuf->m_head; + m->m_len = m->m_pkthdr.len = adapter->rx_mbuf_sz; + m->m_flags |= M_PKTHDR; + m->m_data = m->m_ext.ext_buf; /* Use bus_dma machinery to setup the memory mapping */ error = bus_dmamap_load_mbuf_sg(rxr->rxtag, rxbuf->map, m, segs, &nsegs, BUS_DMA_NOWAIT); if (error != 0) { + printf("Refresh mbufs: hdr dmamap load" + " failure - %d\n", error); m_free(m); + rxbuf->m_head = NULL; goto update; } - - /* If nsegs is wrong then the stack is corrupt. */ - KASSERT(nsegs == 1, ("Too many segments returned!")); - + rxbuf->m_head = m; bus_dmamap_sync(rxr->rxtag, rxbuf->map, BUS_DMASYNC_PREREAD); - rxbuf->m_head = m; rxr->rx_base[i].buffer_addr = htole64(segs[0].ds_addr); -reuse: + cleaned = i; /* Calculate next index */ if (++i == adapter->num_rx_desc) i = 0; - /* This is the work marker for refresh */ rxr->next_to_refresh = i; } update: @@ -4208,8 +4205,8 @@ em_rxeof(struct rx_ring *rxr, int count, len = le16toh(cur->length); eop = (status & E1000_RXD_STAT_EOP) != 0; - if ((rxr->discard == TRUE) || (cur->errors & - E1000_RXD_ERR_FRAME_ERR_MASK)) { + if ((cur->errors & E1000_RXD_ERR_FRAME_ERR_MASK) || + (rxr->discard == TRUE)) { ifp->if_ierrors++; ++rxr->rx_discarded; if (!eop) /* Catch subsequent segs */ @@ -4306,9 +4303,7 @@ next_desc: static __inline void em_rx_discard(struct rx_ring *rxr, int i) { - struct adapter *adapter = rxr->adapter; struct em_buffer *rbuf; - struct mbuf *m; rbuf = &rxr->rx_buffers[i]; /* Free any previous pieces */ @@ -4318,14 +4313,14 @@ em_rx_discard(struct rx_ring *rxr, int i rxr->fmp = NULL; rxr->lmp = NULL; } - - /* Reset state, keep loaded DMA map and reuse */ - m = rbuf->m_head; - m->m_len = m->m_pkthdr.len = adapter->rx_mbuf_sz; - m->m_flags |= M_PKTHDR; - m->m_data = m->m_ext.ext_buf; - m->m_next = NULL; - + /* + ** Free buffer and allow em_refresh_mbufs() + ** to clean up and recharge buffer. + */ + if (rbuf->m_head) { + m_free(rbuf->m_head); + rbuf->m_head = NULL; + } return; } From owner-svn-src-stable-8@FreeBSD.ORG Tue Dec 14 20:19:42 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23954106566B; Tue, 14 Dec 2010 20:19:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 062168FC15; Tue, 14 Dec 2010 20:19:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBEKJfYS029436; Tue, 14 Dec 2010 20:19:41 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBEKJf2k029433; Tue, 14 Dec 2010 20:19:41 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201012142019.oBEKJf2k029433@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 14 Dec 2010 20:19:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216446 - in stable/8/sys/amd64: amd64 include X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2010 20:19:42 -0000 Author: jkim Date: Tue Dec 14 20:19:41 2010 New Revision: 216446 URL: http://svn.freebsd.org/changeset/base/216446 Log: MFC: r210780 Rearrange struct pcb to make better use of cache lines. Approved by: re (kib) Modified: stable/8/sys/amd64/amd64/genassym.c stable/8/sys/amd64/include/pcb.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/amd64/amd64/genassym.c ============================================================================== --- stable/8/sys/amd64/amd64/genassym.c Tue Dec 14 20:13:30 2010 (r216445) +++ stable/8/sys/amd64/amd64/genassym.c Tue Dec 14 20:19:41 2010 (r216446) @@ -135,7 +135,6 @@ ASSYM(PCB_RIP, offsetof(struct pcb, pcb_ ASSYM(PCB_FSBASE, offsetof(struct pcb, pcb_fsbase)); ASSYM(PCB_GSBASE, offsetof(struct pcb, pcb_gsbase)); ASSYM(PCB_KGSBASE, offsetof(struct pcb, pcb_kgsbase)); -ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags)); ASSYM(PCB_CR0, offsetof(struct pcb, pcb_cr0)); ASSYM(PCB_CR2, offsetof(struct pcb, pcb_cr2)); ASSYM(PCB_CR3, offsetof(struct pcb, pcb_cr3)); @@ -146,6 +145,7 @@ ASSYM(PCB_DR2, offsetof(struct pcb, pcb_ ASSYM(PCB_DR3, offsetof(struct pcb, pcb_dr3)); ASSYM(PCB_DR6, offsetof(struct pcb, pcb_dr6)); ASSYM(PCB_DR7, offsetof(struct pcb, pcb_dr7)); +ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags)); ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault)); ASSYM(PCB_GS32SD, offsetof(struct pcb, pcb_gs32sd)); ASSYM(PCB_TSSP, offsetof(struct pcb, pcb_tssp)); Modified: stable/8/sys/amd64/include/pcb.h ============================================================================== --- stable/8/sys/amd64/include/pcb.h Tue Dec 14 20:13:30 2010 (r216445) +++ stable/8/sys/amd64/include/pcb.h Tue Dec 14 20:19:41 2010 (r216446) @@ -55,15 +55,6 @@ struct pcb { register_t pcb_fsbase; register_t pcb_gsbase; register_t pcb_kgsbase; - u_long pcb_flags; -#define PCB_DBREGS 0x02 /* process using debug registers */ -#define PCB_KERNFPU 0x04 /* kernel uses fpu */ -#define PCB_FPUINITDONE 0x08 /* fpu state is initialized */ -#define PCB_USERFPUINITDONE 0x10 /* fpu user state is initialized */ -#define PCB_GS32BIT 0x20 /* linux gs switch */ -#define PCB_32BIT 0x40 /* process has 32 bit context (segs etc) */ -#define PCB_FULLCTX 0x80 /* full context restore on sysret */ - register_t pcb_cr0; register_t pcb_cr2; register_t pcb_cr3; @@ -75,6 +66,15 @@ struct pcb { register_t pcb_dr6; register_t pcb_dr7; + u_long pcb_flags; +#define PCB_DBREGS 0x02 /* process using debug registers */ +#define PCB_KERNFPU 0x04 /* kernel uses fpu */ +#define PCB_FPUINITDONE 0x08 /* fpu state is initialized */ +#define PCB_USERFPUINITDONE 0x10 /* fpu user state is initialized */ +#define PCB_GS32BIT 0x20 /* linux gs switch */ +#define PCB_32BIT 0x40 /* process has 32 bit context (segs etc) */ +#define PCB_FULLCTX 0x80 /* full context restore on sysret */ + uint16_t pcb_initial_fpucw; caddr_t pcb_onfault; /* copyin/out fault recovery */ From owner-svn-src-stable-8@FreeBSD.ORG Wed Dec 15 08:27:18 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C95D106564A; Wed, 15 Dec 2010 08:27:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 09F278FC12; Wed, 15 Dec 2010 08:27:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBF8RH8K045372; Wed, 15 Dec 2010 08:27:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBF8RHxn045370; Wed, 15 Dec 2010 08:27:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201012150827.oBF8RHxn045370@svn.freebsd.org> From: Alexander Motin Date: Wed, 15 Dec 2010 08:27:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216452 - stable/8/sys/dev/ahci X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Dec 2010 08:27:18 -0000 Author: mav Date: Wed Dec 15 08:27:17 2010 New Revision: 216452 URL: http://svn.freebsd.org/changeset/base/216452 Log: MFC r216309: Add IDs of HighPoint RocketRAID 62x cards (Marvell 88SE9128 chips). PR: kern/152926 Submitted by: Mike Tancsa Approved by: re (kib) Modified: stable/8/sys/dev/ahci/ahci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/ahci/ahci.c ============================================================================== --- stable/8/sys/dev/ahci/ahci.c Wed Dec 15 01:19:14 2010 (r216451) +++ stable/8/sys/dev/ahci/ahci.c Wed Dec 15 08:27:17 2010 (r216452) @@ -172,6 +172,10 @@ static struct { {0x614511ab, 0x00, "Marvell 88SX6145", AHCI_Q_NOFORCE|AHCI_Q_4CH|AHCI_Q_EDGEIS}, {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_NOBSYRES}, {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2|AHCI_Q_NOBSYRES}, + {0x06201103, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES}, + {0x06201b4b, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES}, + {0x06221103, 0x00, "HighPoint RocketRAID 622", AHCI_Q_NOBSYRES}, + {0x06221b4b, 0x00, "HighPoint RocketRAID 622", AHCI_Q_NOBSYRES}, {0x044c10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, {0x044d10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, {0x044e10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, From owner-svn-src-stable-8@FreeBSD.ORG Wed Dec 15 15:15:42 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9922A1065693; Wed, 15 Dec 2010 15:15:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52FFE8FC16; Wed, 15 Dec 2010 15:15:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBFFFgSh055881; Wed, 15 Dec 2010 15:15:42 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBFFFgsj055878; Wed, 15 Dec 2010 15:15:42 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201012151515.oBFFFgsj055878@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 15 Dec 2010 15:15:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216455 - in stable/8/sys: amd64/amd64 i386/isa X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Dec 2010 15:15:42 -0000 Author: kib Date: Wed Dec 15 15:15:42 2010 New Revision: 216455 URL: http://svn.freebsd.org/changeset/base/216455 Log: MFC r216394: In fpudna()/npxdna(), mark FPU context initialized and optionally mark user FPU context initialized, if current context is user context. It was reversed in r215865, by inadequate change of this code fragment to a call to fpuuserinited()/npxuserinited(). Approved by: re (bz) Modified: stable/8/sys/amd64/amd64/fpu.c stable/8/sys/i386/isa/npx.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/amd64/amd64/fpu.c ============================================================================== --- stable/8/sys/amd64/amd64/fpu.c Wed Dec 15 12:46:53 2010 (r216454) +++ stable/8/sys/amd64/amd64/fpu.c Wed Dec 15 15:15:42 2010 (r216455) @@ -426,7 +426,9 @@ fpudna(void) fxrstor(&fpu_initialstate); if (pcb->pcb_initial_fpucw != __INITIAL_FPUCW__) fldcw(pcb->pcb_initial_fpucw); - fpuuserinited(curthread); + pcb->pcb_flags |= PCB_FPUINITDONE; + if (PCB_USER_FPU(pcb)) + pcb->pcb_flags |= PCB_USERFPUINITDONE; } else fxrstor(pcb->pcb_save); critical_exit(); Modified: stable/8/sys/i386/isa/npx.c ============================================================================== --- stable/8/sys/i386/isa/npx.c Wed Dec 15 12:46:53 2010 (r216454) +++ stable/8/sys/i386/isa/npx.c Wed Dec 15 15:15:42 2010 (r216455) @@ -684,7 +684,9 @@ npxdna(void) fpurstor(&npx_initialstate); if (pcb->pcb_initial_npxcw != __INITIAL_NPXCW__) fldcw(pcb->pcb_initial_npxcw); - npxuserinited(curthread); + pcb->pcb_flags |= PCB_NPXINITDONE; + if (PCB_USER_FPU(pcb)) + pcb->pcb_flags |= PCB_NPXUSERINITDONE; } else { /* * The following fpurstor() may cause an IRQ13 when the From owner-svn-src-stable-8@FreeBSD.ORG Wed Dec 15 15:19:17 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5DB8106566B; Wed, 15 Dec 2010 15:19:17 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C35368FC14; Wed, 15 Dec 2010 15:19:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBFFJHa2056039; Wed, 15 Dec 2010 15:19:17 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBFFJHQm056037; Wed, 15 Dec 2010 15:19:17 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201012151519.oBFFJHQm056037@svn.freebsd.org> From: Martin Matuska Date: Wed, 15 Dec 2010 15:19:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216456 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Dec 2010 15:19:17 -0000 Author: mm Date: Wed Dec 15 15:19:17 2010 New Revision: 216456 URL: http://svn.freebsd.org/changeset/base/216456 Log: MFC r209230 (pjd): Remove redundant assignment. Approved by: re (kib), pjd, delphij (mentor) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Dec 15 15:15:42 2010 (r216455) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Dec 15 15:19:17 2010 (r216456) @@ -1593,8 +1593,6 @@ zfs_checkexp(vfs_t *vfsp, struct sockadd * which we have to use here, because only this file system * has mnt_export configured. */ - vfsp = zfsvfs->z_parent->z_vfs; - return (vfs_stdcheckexp(zfsvfs->z_parent->z_vfs, nam, extflagsp, credanonp, numsecflavors, secflavors)); } From owner-svn-src-stable-8@FreeBSD.ORG Wed Dec 15 15:23:26 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 182CA1065673; Wed, 15 Dec 2010 15:23:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 052F28FC0A; Wed, 15 Dec 2010 15:23:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBFFNP3N056194; Wed, 15 Dec 2010 15:23:25 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBFFNPAQ056186; Wed, 15 Dec 2010 15:23:25 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201012151523.oBFFNPAQ056186@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 15 Dec 2010 15:23:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216457 - in stable/8/sys/amd64: amd64 ia32 include linux32 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Dec 2010 15:23:26 -0000 Author: kib Date: Wed Dec 15 15:23:25 2010 New Revision: 216457 URL: http://svn.freebsd.org/changeset/base/216457 Log: MFC r216253: Retire write-only PCB_FULLCTX pcb flag on amd64. Approved by: re (bz) Modified: stable/8/sys/amd64/amd64/exception.S stable/8/sys/amd64/amd64/genassym.c stable/8/sys/amd64/amd64/machdep.c stable/8/sys/amd64/amd64/vm_machdep.c stable/8/sys/amd64/ia32/ia32_signal.c stable/8/sys/amd64/include/pcb.h stable/8/sys/amd64/linux32/linux32_sysvec.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/amd64/amd64/exception.S ============================================================================== --- stable/8/sys/amd64/amd64/exception.S Wed Dec 15 15:19:17 2010 (r216456) +++ stable/8/sys/amd64/amd64/exception.S Wed Dec 15 15:23:25 2010 (r216457) @@ -376,7 +376,6 @@ IDTVEC(fast_syscall) movq %rsp,%rdi call syscall movq PCPU(CURPCB),%rax - andq $~PCB_FULLCTX,PCB_FLAGS(%rax) MEXITCOUNT jmp doreti Modified: stable/8/sys/amd64/amd64/genassym.c ============================================================================== --- stable/8/sys/amd64/amd64/genassym.c Wed Dec 15 15:19:17 2010 (r216456) +++ stable/8/sys/amd64/amd64/genassym.c Wed Dec 15 15:23:25 2010 (r216457) @@ -161,7 +161,6 @@ ASSYM(PCB_SIZE, sizeof(struct pcb)); ASSYM(PCB_DBREGS, PCB_DBREGS); ASSYM(PCB_32BIT, PCB_32BIT); ASSYM(PCB_GS32BIT, PCB_GS32BIT); -ASSYM(PCB_FULLCTX, PCB_FULLCTX); ASSYM(COMMON_TSS_RSP0, offsetof(struct amd64tss, tss_rsp0)); Modified: stable/8/sys/amd64/amd64/machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/machdep.c Wed Dec 15 15:19:17 2010 (r216456) +++ stable/8/sys/amd64/amd64/machdep.c Wed Dec 15 15:23:25 2010 (r216457) @@ -488,7 +488,6 @@ sigreturn(td, uap) #endif kern_sigprocmask(td, SIG_SETMASK, &ucp->uc_sigmask, NULL, 0); - td->td_pcb->pcb_flags |= PCB_FULLCTX; td->td_pcb->pcb_full_iret = 1; return (EJUSTRETURN); } @@ -1897,7 +1896,6 @@ set_regs(struct thread *td, struct reg * tp->tf_gs = regs->r_gs; tp->tf_flags = TF_HASSEGS; } - td->td_pcb->pcb_flags |= PCB_FULLCTX; return (0); } @@ -2084,7 +2082,6 @@ set_mcontext(struct thread *td, const mc td->td_pcb->pcb_fsbase = mcp->mc_fsbase; td->td_pcb->pcb_gsbase = mcp->mc_gsbase; } - td->td_pcb->pcb_flags |= PCB_FULLCTX; td->td_pcb->pcb_full_iret = 1; return (0); } Modified: stable/8/sys/amd64/amd64/vm_machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/vm_machdep.c Wed Dec 15 15:19:17 2010 (r216456) +++ stable/8/sys/amd64/amd64/vm_machdep.c Wed Dec 15 15:23:25 2010 (r216457) @@ -347,7 +347,6 @@ cpu_set_syscall_retval(struct thread *td */ td->td_frame->tf_rip -= td->td_frame->tf_err; td->td_frame->tf_r10 = td->td_frame->tf_rcx; - td->td_pcb->pcb_flags |= PCB_FULLCTX; break; case EJUSTRETURN: Modified: stable/8/sys/amd64/ia32/ia32_signal.c ============================================================================== --- stable/8/sys/amd64/ia32/ia32_signal.c Wed Dec 15 15:19:17 2010 (r216456) +++ stable/8/sys/amd64/ia32/ia32_signal.c Wed Dec 15 15:23:25 2010 (r216457) @@ -206,7 +206,6 @@ ia32_set_mcontext(struct thread *td, con tp->tf_rflags = rflags; tp->tf_rsp = mcp->mc_esp; tp->tf_ss = mcp->mc_ss; - td->td_pcb->pcb_flags |= PCB_FULLCTX; td->td_pcb->pcb_full_iret = 1; return (0); } @@ -746,7 +745,7 @@ ia32_setregs(td, entry, stack, ps_string fpstate_drop(td); /* Return via doreti so that we can change to a different %cs */ - pcb->pcb_flags |= PCB_FULLCTX | PCB_32BIT; + pcb->pcb_flags |= PCB_32BIT; pcb->pcb_flags &= ~PCB_GS32BIT; td->td_pcb->pcb_full_iret = 1; td->td_retval[1] = 0; Modified: stable/8/sys/amd64/include/pcb.h ============================================================================== --- stable/8/sys/amd64/include/pcb.h Wed Dec 15 15:19:17 2010 (r216456) +++ stable/8/sys/amd64/include/pcb.h Wed Dec 15 15:23:25 2010 (r216457) @@ -73,7 +73,6 @@ struct pcb { #define PCB_USERFPUINITDONE 0x10 /* fpu user state is initialized */ #define PCB_GS32BIT 0x20 /* linux gs switch */ #define PCB_32BIT 0x40 /* process has 32 bit context (segs etc) */ -#define PCB_FULLCTX 0x80 /* full context restore on sysret */ uint16_t pcb_initial_fpucw; Modified: stable/8/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- stable/8/sys/amd64/linux32/linux32_sysvec.c Wed Dec 15 15:19:17 2010 (r216456) +++ stable/8/sys/amd64/linux32/linux32_sysvec.c Wed Dec 15 15:23:25 2010 (r216457) @@ -880,7 +880,7 @@ exec_linux_setregs(td, entry, stack, ps_ fpstate_drop(td); /* Return via doreti so that we can change to a different %cs */ - pcb->pcb_flags |= PCB_FULLCTX | PCB_32BIT; + pcb->pcb_flags |= PCB_32BIT; pcb->pcb_flags &= ~PCB_GS32BIT; td->td_retval[1] = 0; } From owner-svn-src-stable-8@FreeBSD.ORG Wed Dec 15 15:25:57 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73976106566B; Wed, 15 Dec 2010 15:25:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 46B3B8FC13; Wed, 15 Dec 2010 15:25:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBFFPvaY056366; Wed, 15 Dec 2010 15:25:57 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBFFPv2q056362; Wed, 15 Dec 2010 15:25:57 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201012151525.oBFFPv2q056362@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 15 Dec 2010 15:25:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216458 - in stable/8/sys/amd64: amd64 linux32 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Dec 2010 15:25:57 -0000 Author: kib Date: Wed Dec 15 15:25:56 2010 New Revision: 216458 URL: http://svn.freebsd.org/changeset/base/216458 Log: MFC r216255: Update some comments related to use of amd64 full context switch. In exec_linux_setregs(), use locally cached pointer to pcb to set pcb_full_iret. In set_regs(), note that full return is needed when code that sets segment registers is enabled. Approved by: re (bz) Modified: stable/8/sys/amd64/amd64/machdep.c stable/8/sys/amd64/amd64/vm_machdep.c stable/8/sys/amd64/linux32/linux32_sysvec.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/amd64/amd64/machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/machdep.c Wed Dec 15 15:23:25 2010 (r216457) +++ stable/8/sys/amd64/amd64/machdep.c Wed Dec 15 15:25:56 2010 (r216458) @@ -1895,6 +1895,7 @@ set_regs(struct thread *td, struct reg * tp->tf_fs = regs->r_fs; tp->tf_gs = regs->r_gs; tp->tf_flags = TF_HASSEGS; + td->td_pcb->pcb_full_iret = 1; } return (0); } Modified: stable/8/sys/amd64/amd64/vm_machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/vm_machdep.c Wed Dec 15 15:23:25 2010 (r216457) +++ stable/8/sys/amd64/amd64/vm_machdep.c Wed Dec 15 15:25:56 2010 (r216458) @@ -339,10 +339,9 @@ cpu_set_syscall_retval(struct thread *td * Reconstruct pc, we know that 'syscall' is 2 bytes, * lcall $X,y is 7 bytes, int 0x80 is 2 bytes. * We saved this in tf_err. - * We have to do a full context restore so that %r10 - * (which was holding the value of %rcx) is restored + * %r10 (which was holding the value of %rcx) is restored * for the next iteration. - * r10 restore is only required for freebsd/amd64 processes, + * %r10 restore is only required for freebsd/amd64 processes, * but shall be innocent for any ia32 ABI. */ td->td_frame->tf_rip -= td->td_frame->tf_err; Modified: stable/8/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- stable/8/sys/amd64/linux32/linux32_sysvec.c Wed Dec 15 15:23:25 2010 (r216457) +++ stable/8/sys/amd64/linux32/linux32_sysvec.c Wed Dec 15 15:25:56 2010 (r216458) @@ -875,13 +875,13 @@ exec_linux_setregs(td, entry, stack, ps_ regs->tf_flags = TF_HASSEGS; regs->tf_cs = _ucode32sel; regs->tf_rbx = ps_strings; - td->td_pcb->pcb_full_iret = 1; load_cr0(rcr0() | CR0_MP | CR0_TS); fpstate_drop(td); - /* Return via doreti so that we can change to a different %cs */ + /* Do full restore on return so that we can change to a different %cs */ pcb->pcb_flags |= PCB_32BIT; pcb->pcb_flags &= ~PCB_GS32BIT; + pcb->pcb_full_iret = 1; td->td_retval[1] = 0; } From owner-svn-src-stable-8@FreeBSD.ORG Wed Dec 15 16:22:00 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29B191065670; Wed, 15 Dec 2010 16:22:00 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 168C18FC17; Wed, 15 Dec 2010 16:22:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBFGLxni062008; Wed, 15 Dec 2010 16:21:59 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBFGLxNS062007; Wed, 15 Dec 2010 16:21:59 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201012151621.oBFGLxNS062007@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 15 Dec 2010 16:21:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216460 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Dec 2010 16:22:00 -0000 Author: bz Date: Wed Dec 15 16:21:59 2010 New Revision: 216460 URL: http://svn.freebsd.org/changeset/base/216460 Log: Record merge-info for r216171 previously merged as r216366. Record merge-info for r216172,216176 previously merged as r216440. Approved by: re (kib) Modified: Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) From owner-svn-src-stable-8@FreeBSD.ORG Wed Dec 15 22:59:51 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53A60106564A; Wed, 15 Dec 2010 22:59:51 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41AFC8FC19; Wed, 15 Dec 2010 22:59:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBFMxpwg098423; Wed, 15 Dec 2010 22:59:51 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBFMxpRl098421; Wed, 15 Dec 2010 22:59:51 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201012152259.oBFMxpRl098421@svn.freebsd.org> From: Jack F Vogel Date: Wed, 15 Dec 2010 22:59:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216467 - stable/8/sys/dev/e1000 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Dec 2010 22:59:51 -0000 Author: jfv Date: Wed Dec 15 22:59:50 2010 New Revision: 216467 URL: http://svn.freebsd.org/changeset/base/216467 Log: MFC r216173 Remove the test for a minimum frame size from the IPV6 TX context descriptor setup, when using VLANs and HW TAGGING the length of an ICMP6 frame will fail this test and be discarded. Approved by: re Modified: stable/8/sys/dev/e1000/if_igb.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/e1000/if_igb.c ============================================================================== --- stable/8/sys/dev/e1000/if_igb.c Wed Dec 15 22:58:45 2010 (r216466) +++ stable/8/sys/dev/e1000/if_igb.c Wed Dec 15 22:59:50 2010 (r216467) @@ -3429,8 +3429,6 @@ igb_tx_ctx_setup(struct tx_ring *txr, st case ETHERTYPE_IPV6: ip6 = (struct ip6_hdr *)(mp->m_data + ehdrlen); ip_hlen = sizeof(struct ip6_hdr); - if (mp->m_len < ehdrlen + ip_hlen) - return (FALSE); ipproto = ip6->ip6_nxt; type_tucmd_mlhl |= E1000_ADVTXD_TUCMD_IPV6; break; From owner-svn-src-stable-8@FreeBSD.ORG Thu Dec 16 10:58:46 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F132106564A; Thu, 16 Dec 2010 10:58:46 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D0548FC13; Thu, 16 Dec 2010 10:58:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBGAwkV4038582; Thu, 16 Dec 2010 10:58:46 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBGAwklF038580; Thu, 16 Dec 2010 10:58:46 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201012161058.oBGAwklF038580@svn.freebsd.org> From: Michael Tuexen Date: Thu, 16 Dec 2010 10:58:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216481 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Dec 2010 10:58:46 -0000 Author: tuexen Date: Thu Dec 16 10:58:45 2010 New Revision: 216481 URL: http://svn.freebsd.org/changeset/base/216481 Log: MFC r216397: Bugfix: Do correct accounting using the MIB counters when an association is aborted via sctp_abort_association(). Approved by: re Modified: stable/8/sys/netinet/sctputil.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Thu Dec 16 09:49:16 2010 (r216480) +++ stable/8/sys/netinet/sctputil.c Thu Dec 16 10:58:45 2010 (r216481) @@ -3847,6 +3847,11 @@ sctp_abort_association(struct sctp_inpcb SCTP_TCB_LOCK(stcb); atomic_subtract_int(&stcb->asoc.refcnt, 1); #endif + SCTP_STAT_INCR_COUNTER32(sctps_aborted); + if ((SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) || + (SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_SHUTDOWN_RECEIVED)) { + SCTP_STAT_DECR_GAUGE32(sctps_currestab); + } (void)sctp_free_assoc(inp, stcb, SCTP_NORMAL_PROC, SCTP_FROM_SCTPUTIL + SCTP_LOC_4); #if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) SCTP_SOCKET_UNLOCK(so, 1); From owner-svn-src-stable-8@FreeBSD.ORG Thu Dec 16 14:57:07 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38BEB106566B; Thu, 16 Dec 2010 14:57:07 +0000 (UTC) (envelope-from brucec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26B358FC0C; Thu, 16 Dec 2010 14:57:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBGEv7vc062297; Thu, 16 Dec 2010 14:57:07 GMT (envelope-from brucec@svn.freebsd.org) Received: (from brucec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBGEv7ow062295; Thu, 16 Dec 2010 14:57:07 GMT (envelope-from brucec@svn.freebsd.org) Message-Id: <201012161457.oBGEv7ow062295@svn.freebsd.org> From: Bruce Cran Date: Thu, 16 Dec 2010 14:57:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216484 - stable/8/usr.sbin/sysinstall X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Dec 2010 14:57:07 -0000 Author: brucec Date: Thu Dec 16 14:57:06 2010 New Revision: 216484 URL: http://svn.freebsd.org/changeset/base/216484 Log: MFC r216407: USB probing often takes a long time and finishes finding devices after init has started. In the case of sysinstall, this means that it has already built its list of devices before probing finishes. Add a hint for users who have booted from a USB stick only to find that sysinstall can't find it. Approved by: re (kensmith) Modified: stable/8/usr.sbin/sysinstall/media.c Directory Properties: stable/8/usr.sbin/sysinstall/ (props changed) Modified: stable/8/usr.sbin/sysinstall/media.c ============================================================================== --- stable/8/usr.sbin/sysinstall/media.c Thu Dec 16 11:58:50 2010 (r216483) +++ stable/8/usr.sbin/sysinstall/media.c Thu Dec 16 14:57:06 2010 (r216484) @@ -239,7 +239,7 @@ mediaSetUSB(dialogMenuItem *self) cnt = deviceCount(devs); if (!cnt) { - msgConfirm("No USB devices found!"); + msgConfirm("No USB devices found (try Options/Re-scan Devices)"); return DITEM_FAILURE | DITEM_CONTINUE; } else if (cnt > 1) { From owner-svn-src-stable-8@FreeBSD.ORG Fri Dec 17 19:48:54 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D545C106566C; Fri, 17 Dec 2010 19:48:54 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2E118FC1A; Fri, 17 Dec 2010 19:48:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBHJmsQv006001; Fri, 17 Dec 2010 19:48:54 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBHJmsC7005999; Fri, 17 Dec 2010 19:48:54 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201012171948.oBHJmsC7005999@svn.freebsd.org> From: Xin LI Date: Fri, 17 Dec 2010 19:48:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216506 - stable/8/usr.bin/kdump X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Dec 2010 19:48:55 -0000 Author: delphij Date: Fri Dec 17 19:48:54 2010 New Revision: 216506 URL: http://svn.freebsd.org/changeset/base/216506 Log: MFC r216130: Decode IPC_CREAT and IPC_EXCL for semget(2). PR: bin/152781 Submitted by: Anton Yuzhaninov Approved by: re (kib) Modified: stable/8/usr.bin/kdump/mksubr Directory Properties: stable/8/usr.bin/kdump/ (props changed) Modified: stable/8/usr.bin/kdump/mksubr ============================================================================== --- stable/8/usr.bin/kdump/mksubr Fri Dec 17 18:22:50 2010 (r216505) +++ stable/8/usr.bin/kdump/mksubr Fri Dec 17 19:48:54 2010 (r216506) @@ -252,6 +252,8 @@ shmctlname (int cmd) { void semgetname (int flag) { int or = 0; + if_print_or(flag, IPC_CREAT, or); + if_print_or(flag, IPC_EXCL, or); if_print_or(flag, SEM_R, or); if_print_or(flag, SEM_A, or); if_print_or(flag, (SEM_R>>3), or); From owner-svn-src-stable-8@FreeBSD.ORG Sat Dec 18 11:45:54 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C470410656C0; Sat, 18 Dec 2010 11:45:54 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B16DC8FC13; Sat, 18 Dec 2010 11:45:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBIBjs8W079740; Sat, 18 Dec 2010 11:45:54 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBIBjsvg079738; Sat, 18 Dec 2010 11:45:54 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201012181145.oBIBjsvg079738@svn.freebsd.org> From: Michael Tuexen Date: Sat, 18 Dec 2010 11:45:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216517 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Dec 2010 11:45:54 -0000 Author: tuexen Date: Sat Dec 18 11:45:54 2010 New Revision: 216517 URL: http://svn.freebsd.org/changeset/base/216517 Log: MFC 216480: Add a missing cast. Reported by blade_ly at yahoo.com.cn. Approved by: re (kib) Modified: stable/8/sys/netinet/sctp_indata.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Sat Dec 18 11:31:32 2010 (r216516) +++ stable/8/sys/netinet/sctp_indata.c Sat Dec 18 11:45:54 2010 (r216517) @@ -1754,7 +1754,7 @@ sctp_process_a_data_chunk(struct sctp_tc asoc->fragmented_delivery_inprogress == 0 && TAILQ_EMPTY(&asoc->resetHead) && ((ordered == 0) || - ((asoc->strmin[strmno].last_sequence_delivered + 1) == strmseq && + ((uint16_t) (asoc->strmin[strmno].last_sequence_delivered + 1) == strmseq && TAILQ_EMPTY(&asoc->strmin[strmno].inqueue)))) { /* Candidate for express delivery */ /* From owner-svn-src-stable-8@FreeBSD.ORG Sat Dec 18 23:03:02 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FC61106566B; Sat, 18 Dec 2010 23:03:02 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C9258FC12; Sat, 18 Dec 2010 23:03:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBIN31sW035882; Sat, 18 Dec 2010 23:03:01 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBIN317Z035879; Sat, 18 Dec 2010 23:03:01 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201012182303.oBIN317Z035879@svn.freebsd.org> From: Robert Watson Date: Sat, 18 Dec 2010 23:03:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216545 - stable/8/share/man/man4 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Dec 2010 23:03:02 -0000 Author: rwatson Date: Sat Dec 18 23:03:01 2010 New Revision: 216545 URL: http://svn.freebsd.org/changeset/base/216545 Log: Merge xen.4 man page from head to stable/8; revs r216419, r216420, r216428, r216429, r216497, r216500, r216501, r216509. Approved by: re (kib) Sponsored by: DARPA, AFRL Added: stable/8/share/man/man4/xen.4 - copied, changed from r216420, head/share/man/man4/xen.4 Modified: stable/8/share/man/man4/Makefile Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/Makefile ============================================================================== --- stable/8/share/man/man4/Makefile Sat Dec 18 22:16:15 2010 (r216544) +++ stable/8/share/man/man4/Makefile Sat Dec 18 23:03:01 2010 (r216545) @@ -485,6 +485,7 @@ MAN= aac.4 \ wlan_xauth.4 \ ${_wpi.4} \ xe.4 \ + ${_xen.4} \ xl.4 \ xpt.4 \ zero.4 \ @@ -671,6 +672,7 @@ _spkr.4= spkr.4 _tpm.4= tpm.4 _urtw.4= urtw.4 _wpi.4= wpi.4 +_xen.4= xen.4 MLINKS+=lindev.4 full.4 .endif Copied and modified: stable/8/share/man/man4/xen.4 (from r216420, head/share/man/man4/xen.4) ============================================================================== --- head/share/man/man4/xen.4 Mon Dec 13 23:30:56 2010 (r216420, copy source) +++ stable/8/share/man/man4/xen.4 Sat Dec 18 23:03:01 2010 (r216545) @@ -28,29 +28,26 @@ .\" .\" $FreeBSD$ .\" -.Dd December 13, 2010 +.Dd December 17, 2010 .Dt XEN 4 .Os .Sh NAME .Nm xen .Nd Xen Hypervisor Guest (DomU) Support .Sh SYNOPSIS -To compile para-virtualized (PV) Xen guest support into the i386 kernel, place -the following line in your kernel configuration file: +To compile para-virtualized (PV) Xen guest support into an i386 kernel, place +the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "options PAE" .Cd "options XEN" +.Cd "nooptions NATIVE" .Ed .Pp -To compile hardware-assisted virtualization (HVM) Xen guest support into the -amd64 kernel, place the following line in your kernel configuration file: +To compile hardware-assisted virtualization (HVM) Xen guest support with +para-virtualized drivers into an amd64 kernel, place the following lines in +your kernel configuration file: .Bd -ragged -offset indent .Cd "options XENHVM" -.Ed -.Pp -To compile the Xen PCI bus and para-virtualized (PV) drivers into an amd64 -or i386 kernel, place the following line in your kernel configuration file: -.Bd -ragged -offset indent .Cd "device xenpci" .Ed .Sh DESCRIPTION @@ -58,27 +55,99 @@ The Xen Hypervisor allows multiple virtu computer system. When first released, Xen required that i386 kernels be compiled "para-virtualized" as the x86 instruction set was not fully virtualizable. +Primarily, para-virtualization modifies the virtual memory system to use +hypervisor calls (hypercalls) rather than direct hardware instructions to +modify the TLB, although para-virtualized device drivers were also required +to access resources such as virtual network interfaces and disk devices. +.Pp With later instruction set extensions from AMD and Intel to support fully -virtualizable instructions, unmodified kernels could also be supported, -referred to as hardware-assisted virtualization (HVM). -HVM systems may still use para-virtualized drivers, which are aware of -virtualization and able to optimize certain behaviours to improve -performance or semantics. +virtualizable instructions, unmodified virtual memory systems can also be +supported; this is referred to as hardware-assisted virtualization (HVM). +HVM configurations may either rely on transparently emulated hardware +peripherals, or para-virtualized drivers, which are aware of virtualization, +and hence able to optimize certain behaviors to improve performance or +semantics. .Pp .Fx supports a fully para-virtualized (PV) kernel on the i386 architecture using -.Cd "options XEN" ; +.Cd "options XEN" +and +.Cd "nooptions NATIVE" ; currently, this requires use of a PAE kernel, enabled via .Cd "options PAE" . +.Pp .Fx -supports hardware-assited virtualization (HVM) on both the i386 and amd64 +supports hardware-assisted virtualization (HVM) on both the i386 and amd64 kernels; however, PV device drivers with an HVM kernel are only supported on -the amd64 architecture. +the amd64 architecture, and require +.Cd "options XENHVM" +and +.Cd "device xenpci" . .Pp Para-virtualized device drivers are required in order to support certain -functionality, such as the dynamic addition of new virtual devices, and the -"balloon driver" (returning physical memory to the Hypervisor on demand), -and VM suspend/resume. +functionality, such as processing management requests, returning idle +physical memory pages to the hypervisor, etc. +.Ss Xen DomU device drivers +Xen para-virtualized drivers are automatically added to the kernel if a PV +kernel is compiled using +.Cd "options XEN" ; +for HVM environments, +.Cd "options XENHVM" +and +.Cd "device xenpci" +are required. +The follow drivers are supported: +.Bl -hang -offset indent -width blkfront +.It Nm balloon +Allow physical memory pages to be returned to the hypervisor as a result of +manual tuning or automatic policy. +.It Nm blkback +Exports local block devices or files to other Xen domains where they can +then be imported via +.Nm blkfront . +.It Nm blkfront +Import block devices from other Xen domains as local block devices, to be +used for file systems, swap, etc. +.It Nm console +Export the low-level system console via the Xen console service. +.It Nm control +Process management operations from Domain 0, including power off, reboot, +suspend, crash, and halt requests. +.It Nm evtchn +Expose Xen events via the +.Pa /dev/xen/evtchn +special device. +.It Nm netback +Export local network interfaces to other Xen domains where they can be +imported via +.Nm netfront . +.It Nm netfront +Import network interfaces from other Xen domains as local network interfaces, +which may be used for IPv4, IPv6, etc. +.It Nm pcifront +Allow physical PCI devices to be passed through into a PV domain. +.It Nm xenpci +Represents the Xen PCI device, an emulated PCI device that is exposed to +HVM domains. +This device allows detection of the Xen hypervisor, and provides interrupt +and shared memory services required to interact with the hypervisor. +.El +.Ss Performance considerations +In general, PV drivers will perform better than emulated hardware, and are +the recommended configuration for HVM installations. +.Pp +Using a hypervisor introduces a second layer of scheduling that may limit the +effectiveness of certain +.Fx +scheduling optimisations. +Among these is adaptive locking, which is no longer able to determine whether +a thread holding a lock is in execution. +It is recommended that adaptive locking be disabled when using Xen: +.Bd -unfilled -offset indent +.Cd "options NO_ADAPTIVE_MUTEXES" +.Cd "options NO_ADAPTIVE_RWLOCKS" +.Cd "options NO_ADAPTIVE_SX" +.Ed .Sh SEE ALSO .Xr pae 4 .Sh HISTORY @@ -90,7 +159,7 @@ first appeared in .An -nosplit .Fx support for Xen was first added by -.An Kip Mac Aq kmacy@FreeBSD.org +.An Kip Macy Aq kmacy@FreeBSD.org and .An Doug Rabson Aq dfr@FreeBSD.org . Further refinements were made by @@ -109,7 +178,8 @@ amd64. .Pp Para-virtualized drivers under hardware-assisted virtualization (HVM) kernel are only supported on amd64, not i386. -.P -As of this release, Xen DomU support is not heavily tested; instability has -been reported during VM migration of PV kernels, and certain PV driver -features, such as the balloon driver, are under-exercised. +.Pp +As of this release, Xen PV DomU support is not heavily tested; instability +has been reported during VM migration of PV kernels. +.Pp +Certain PV driver features, such as the balloon driver, are under-exercised.