Commit Graph

297818 Commits

Author SHA1 Message Date
nakayama e8f73aaeb4 Fix "error: cast from pointer to integer of different size" on
sparc build.
2022-09-02 06:01:38 +00:00
thorpej 45288633c8 Re-factor how pktq_barrier() is issued by if_detach().
Rather than excplicitly referencing ip_pktq and ip6_pktq in if_detach(),
instead add all pktqueues to a global list.  This list is then used in
the new pktq_ifdetach() function to issue a barrier on all pktqueues.

Note that the performance of this list is not critical; it will seldom
be accessed (then pktqueues are created/destroyed and when network
interfaces are detached), and so a simple synchronization strategy using
a rwlock is sufficient.
2022-09-02 05:50:36 +00:00
kre 70a8fd8df8 Fix the syntax of the non _LP64 code fragment to match that in the
_LP64 fragment, so hopefully 32 bit ports with XEN (i386) will
build again.
2022-09-02 05:09:49 +00:00
thorpej 60fe01447e f_detach(): Drain the protocol input queues before the pr_purgeif()
calls; pktq_barrier() doesn't remove packets from the queue, it waits
for the packets enqueued before the barrier to drain.  This, in turn,
may cause the protocols to gain additional references to the interface
that's detaching.  By draining the queues first, we ensure that no
additional references will be taken after calling pr_purgeif().
2022-09-02 04:34:58 +00:00
thorpej 0c0a3f29e3 pktqueue: Re-factor sysctl handling.
Provide a new pktq_sysctl_setup() function that attaches standard
pktq sysctl nodes below a specified parent node, with either a
fixed node ID or CTL_CREATE to dynamically assign node IDs.  Make
all of the sysctl handlers private to pktqueue.c, and remove the
INET- and INET6-specific pktqueue sysctl code from net/if.c.
2022-09-02 03:50:00 +00:00
gutteridge 42d743eb34 ktrace.1: correct historical reference and minor grammar tweak 2022-09-02 03:43:53 +00:00
gutteridge 8b5211b80a kdump.1: use past tense for history 2022-09-02 03:39:29 +00:00
riastradh 2bea1ff88c cprng_fast(9): Assert not in pserialize read section.
This may sleep to take the global entropy lock in case it needs to be
reseeded.  If that happens we can't be in a pserialize read section.
2022-09-01 18:32:25 +00:00
riastradh 7295f80b8b nd6: Take ifnet psref around cprng_fast in nd6_slowtimo.
This may sleep on an adpative mutex, the global entropy lock, so
pserialize is forbidden.
2022-09-01 18:32:17 +00:00
riastradh 5cfdc56642 xhci(4): Make sure to destroy sc_rhlock on detach. 2022-09-01 18:09:45 +00:00
riastradh 6ca9ac72e4 drmfb: Rework console detection and takeover.
While here, simplify logic by removing an unreachable error branch so
we never have to contemplate unwinding claiming of the console.
2022-09-01 17:54:47 +00:00
bouyer 7b782151dd Call extent_alloc_subregion() with EX_MALLOCOK; under heavy I/O load we need
lots of them and the preallocatted extent descriptors are not enough.
2022-09-01 16:28:08 +00:00
bouyer bad2ac4874 process_msg() is called from thread context, so malloc() can wait for
memory. Should avoids occasional ENOMEM reading messages
2022-09-01 16:25:18 +00:00
bouyer 4c8adaa46e in backend drivers, use xen_shm_(un)map for the rings instead of inline,
mostly duplicate code.
2022-09-01 15:33:23 +00:00
bouyer aaff4d1b29 Redo previous; kill the right printf() 2022-09-01 15:32:16 +00:00
bouyer 921c7ef390 xen: Add experimental support for PVH dom0. 2022-09-01 12:36:14 +00:00
bouyer f8166b1646 Add commented out experimental PVH dom0 options and pseudo-device 2022-09-01 12:35:02 +00:00
bouyer 4afc9f0078 Remove a noisy printf; HVM guests triggers it (a lot) and it seems to be
expected.
2022-09-01 12:31:26 +00:00
bouyer 5dac1986e8 Add PVH support for backend drivers grant operation.
Now a domU in a PVH dom0 boots multiuser.
2022-09-01 12:29:00 +00:00
bouyer fa9ca3cca2 Adjust privcmd_notify() so it has a chance to work in a PVH environnement too. 2022-09-01 12:26:00 +00:00
riastradh 092adc4c94 drmfb: Take is_console property from parent, not from self.
The parent is the pci or platform device that firmware knows about.
The `drmfb' device is more of a fictitious invention of the drm stack
that exists for the convenience of the genfb abstraction which needs
device_private to be a struct genfb_softc.

Let's see if this does any better than the last attempt to rework the
logic here.
2022-09-01 12:01:36 +00:00
riastradh 33464fc593 i915: Stop pretending the GTT size is zero as workaround.
Whatever bug this was I don't know how to reproduce any more.
Convinces Mesa iris_dri.so to work on this kernel.
2022-09-01 11:49:23 +00:00
riastradh ed809c7ce7 drm_mm: Give up on trying to phrase find_hole with public rbtree API.
Firefox works with WebGL on Mesa iris_dri.so now.
2022-09-01 11:48:59 +00:00
msaitoh d7198e62f3 KNF. No functional change. 2022-09-01 10:10:20 +00:00
riastradh 8940082214 drm: Fix dma fence stub fix so the lock is actually initialized.
Tested but forgot to amend change before exporting to CVS again.
2022-09-01 09:37:06 +00:00
rin e7be9b6f6b Do not raise SNaN exception for QNaN. 2022-09-01 06:10:58 +00:00
rin 5ef7ca99eb Set FPSCR[FPRF] for calculated result, for all instructions
that are documented to update this field.

Exceptions are fcti{w,d}{,z}; FPSCR[FPRF] becomes undefined,
according to Power ISA. We do not overwrite this field for
these insns at the moment.
2022-09-01 06:08:16 +00:00
rin 62f3100b4b static-fy fpu_fto[ixsd](). NFC. 2022-09-01 05:58:19 +00:00
rin 2acd85f535 Further fix for fcti{w,d}{,z}.
- Treat {Q,S}NaN correctly.
- Set exception bits appropriately.
- Introduce round_int().
2022-09-01 05:56:52 +00:00
rin 97361ac471 Remove stale comment. 2022-09-01 05:51:51 +00:00
thorpej a3c9a952a3 pktq_rps_hash(): Make the "funcp" argument const. 2022-09-01 05:04:22 +00:00
thorpej 0077b7b35c pktq_dequeue(): Prevent packets from getting stuck beind barrier markers.
pktq_barrier() ensures that all packets enqueued before the barrier have
been dequeued before the barrier returns.  However, previously, pktq_dequeue()
would return NULL when a barrier marker was encountered.  If there were
packets queued up behind the marker and no additional softint were scheduled
for the pktqueue, those packets would end up stranded.  pktq_dequeue() now
continues to the next slot after the marker, ensuring that processing can
continue after the barrier has been signaled.
2022-09-01 02:35:06 +00:00
riastradh d83a40f33c drm: Fix dma fence stub so it works with locking operations. 2022-09-01 01:54:38 +00:00
riastradh b4008985b6 drm_mm: Match __drm_mm_interval_first semantics.
- Use the right search criterion.
- Return &mm->head_node, not NULL, if not found.
2022-09-01 01:54:28 +00:00
bouyer 4a760274ce If we check XENPV, make sure to #include "opt_xen.h" 2022-08-31 14:00:44 +00:00
bouyer 8047ea2d23 Remove XENPV support from xenmem; it's only used for !XENPV at this time. 2022-08-31 12:53:27 +00:00
bouyer f461aebfae Work in progress on dom0 PVH support: ioctl support for tools.
Basically, in PVH mode (where XENFEAT_auto_translated_physmap is enabled),
the hypervisor will not map foreing ressources in our virtual address
space for us. Instead, we have to pass it an address in our physical
address space (but not mapped to some RAM) where the ressource will show up
and then enter this PA in pour page table.

For this, introduce xenmem_* which manage the PA space. In PVH mode this
is just allocated from the iomem_ex extent.

With this, I can start a PV domU, and the guest's kernel boots (and
the console works). It hangs because the backend driver can't map the
frontend ressources (yet).

Note that, per https://xenbits.xen.org/docs/unstable/support-matrix.html,
dom0 PVH support is still considered experimental by Xen.
2022-08-31 12:51:56 +00:00
riastradh c5301d0824 dtrace_sdt: Fix bug in builtin module reference counting.
Don't module_hold(NULL)!  This mistake was introduced in my attempt
to get dtrace working for sdt probes defined in non-builtin modules
like zfs.
2022-08-31 12:34:04 +00:00
riastradh cf221fb572 reallocarr(3): Touch up xrefs. 2022-08-31 12:18:41 +00:00
riastradh a2fb076e11 reallocarr(3): Bump date. Note overflow is handled internally. 2022-08-31 12:17:14 +00:00
riastradh 249e1d8c11 reallocarr(3): Clarify semantics. 2022-08-31 12:10:05 +00:00
msaitoh 1bfc2d5f90 Fix previous to make it compile again. 2022-08-31 05:24:41 +00:00
riastradh f29b0cae59 crashme(9): New debug.crashme.mutex_recursion method.
Takes a lock twice.  Set it to 1 for adaptive lock, 2 for spin lock.
2022-08-30 22:38:26 +00:00
riastradh 4707b092a7 lockdebug(9): Try to show symbol names if possible.
Also print the possible owner in ddb/crash `show lock' even if the
kernel is built without LOCKDEBUG.

Output may not be as pretty before with two neatly aligned columns,
but that can be changed; for now the value of having the symbols
printed instead of just obscure hex addresses (which one's an lwp
address and which one's a code pointer? can never remember!) should
outweigh the prettiness temporarily lost.
2022-08-30 22:38:17 +00:00
riastradh 5ec46ddfac ddb(9): Make db_symstr safe to use concurrently with pserialize(9). 2022-08-30 22:38:01 +00:00
riastradh 953ad39a79 ddb(4): Use db_num_to_strbuf in db_symstr.
Simplifies it and will make safer to use.
2022-08-30 22:37:36 +00:00
riastradh 3566aefb0b ddb(9): New db_num_to_strbuf.
Like db_num_to_str, but writes to caller-provided buffer instead of
returning pointer to static storage.
2022-08-30 22:37:03 +00:00
riastradh b672ca148d /etc/ssh: Install ssh_known_hosts with mode 644.
Makes it agree with the mtree and more convenient for admin to edit.

XXX pullup-8
XXX pullup-9
2022-08-30 22:36:48 +00:00
martin 3a0698b068 Simplify name trimming following a suggestion from rillig. 2022-08-30 15:27:37 +00:00
riastradh 03cefdfdcf etc: Fix permissions of various editable configuration files.
This way they match the mtree and make sense and don't cause editors
to ask to override read-only files when editing them.

Exception: Not sure /etc/bluetooth/protocols makes as much sense to
edit, but the mtree says 644, so if you want to change it, make sure
to change it in both places -- Makefile and mtree.

XXX pullup-8
XXX pullup-9
2022-08-30 13:40:37 +00:00