Commit 9dca3432 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'for-linus-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml

Pull UML updates from Richard Weinberger:

 - virtio support

 - fixes for our new time travel mode

 - various improvements to make lockdep and kasan work better

 - SPDX header updates

* tag 'for-linus-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: (25 commits)
  um: irq: Fix LAST_IRQ usage in init_IRQ()
  um: Add SPDX headers for files in arch/um/include
  um: Add SPDX headers for files in arch/um/os-Linux
  um: Add SPDX headers to files in arch/um/kernel/
  um: Add SPDX headers for files in arch/um/drivers
  um: virtio: Implement VHOST_USER_PROTOCOL_F_REPLY_ACK
  um: virtio: Implement VHOST_USER_PROTOCOL_F_SLAVE_REQ
  um: drivers: Add virtio vhost-user driver
  um: Use real DMA barriers
  um: Don't use generic barrier.h
  um: time-travel: Restrict time update in IRQ handler
  um: time-travel: Fix periodic timers
  um: Enable CONFIG_CONSTRUCTORS
  um: Place (soft)irq text with macros
  um: Fix VDSO compiler warning
  um: Implement TRACE_IRQFLAGS_SUPPORT
  um: Remove misleading #define ARCh_IRQ_ENABLED
  um: Avoid using uninitialized regs
  um: Remove sig_info[SIGALRM]
  um: Error handling fixes in vector drivers
  ...
parents 4553d469 73625ed6
...@@ -335,3 +335,10 @@ config UML_NET_SLIRP ...@@ -335,3 +335,10 @@ config UML_NET_SLIRP
Startup example: "eth0=slirp,FE:FD:01:02:03:04,/usr/local/bin/slirp" Startup example: "eth0=slirp,FE:FD:01:02:03:04,/usr/local/bin/slirp"
endmenu endmenu
config VIRTIO_UML
tristate "UML driver for virtio devices"
select VIRTIO
help
This driver provides support for virtio based paravirtual device
drivers over vhost-user sockets.
# SPDX-License-Identifier: GPL-2.0
# #
# Copyright (C) 2000, 2002, 2003 Jeff Dike (jdike@karaya.com) # Copyright (C) 2000, 2002, 2003 Jeff Dike (jdike@karaya.com)
# Licensed under the GPL
# #
# pcap is broken in 2.5 because kbuild doesn't allow pcap.a to be linked # pcap is broken in 2.5 because kbuild doesn't allow pcap.a to be linked
...@@ -61,6 +61,7 @@ obj-$(CONFIG_XTERM_CHAN) += xterm.o xterm_kern.o ...@@ -61,6 +61,7 @@ obj-$(CONFIG_XTERM_CHAN) += xterm.o xterm_kern.o
obj-$(CONFIG_UML_WATCHDOG) += harddog.o obj-$(CONFIG_UML_WATCHDOG) += harddog.o
obj-$(CONFIG_BLK_DEV_COW_COMMON) += cow_user.o obj-$(CONFIG_BLK_DEV_COW_COMMON) += cow_user.o
obj-$(CONFIG_UML_RANDOM) += random.o obj-$(CONFIG_UML_RANDOM) += random.o
obj-$(CONFIG_VIRTIO_UML) += virtio_uml.o
# pcap_user.o must be added explicitly. # pcap_user.o must be added explicitly.
USER_OBJS := fd.o null.o pty.o tty.o xterm.o slip_common.o pcap_user.o vde_user.o vector_user.o USER_OBJS := fd.o null.o pty.o tty.o xterm.o slip_common.o pcap_user.o vde_user.o vector_user.o
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com) * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com)
* Licensed under the GPL
*/ */
#ifndef __CHAN_KERN_H__ #ifndef __CHAN_KERN_H__
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2000 - 2007 Jeff Dike (jdike@{linux.intel,addtoit}.com) * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{linux.intel,addtoit}.com)
* Licensed under the GPL
*/ */
#include <linux/slab.h> #include <linux/slab.h>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2000 - 2007 Jeff Dike (jdike@{linux.intel,addtoit}.com) * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{linux.intel,addtoit}.com)
* Licensed under the GPL
*/ */
#include <stdlib.h> #include <stdlib.h>
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com) * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com)
* Licensed under the GPL
*/ */
#ifndef __CHAN_USER_H__ #ifndef __CHAN_USER_H__
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2007 Jeff Dike (jdike@{linux.intel,addtoit}.com) * Copyright (C) 2007 Jeff Dike (jdike@{linux.intel,addtoit}.com)
* Licensed under the GPL
*/ */
/* /*
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#ifndef __DAEMON_H__ #ifndef __DAEMON_H__
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) and * Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) and
* James Leu (jleu@mindspring.net). * James Leu (jleu@mindspring.net).
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Copyright (C) 2001 by various other people who didn't put their name here. * Copyright (C) 2001 by various other people who didn't put their name here.
* Licensed under the GPL.
*/ */
#include <linux/init.h> #include <linux/init.h>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) and * Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) and
* James Leu (jleu@mindspring.net). * James Leu (jleu@mindspring.net).
* Copyright (C) 2001 by various other people who didn't put their name here. * Copyright (C) 2001 by various other people who didn't put their name here.
* Licensed under the GPL.
*/ */
#include <stdint.h> #include <stdint.h>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{linux.intel,addtoit}.com) * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{linux.intel,addtoit}.com)
* Licensed under the GPL
*/ */
#include <stdio.h> #include <stdio.h>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#include <stdio.h> #include <stdio.h>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2002 Steve Schmidtke * Copyright (C) 2002 Steve Schmidtke
* Licensed under the GPL
*/ */
#include <linux/fs.h> #include <linux/fs.h>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#include <linux/irqreturn.h> #include <linux/irqreturn.h>
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com) * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com)
* Licensed under the GPL
*/ */
#ifndef __LINE_H__ #ifndef __LINE_H__
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) * Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org)
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#ifndef __MCONSOLE_H__ #ifndef __MCONSOLE_H__
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) * Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org)
* Copyright (C) 2001 - 2008 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2001 - 2008 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#include <linux/console.h> #include <linux/console.h>
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com) * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com)
* Licensed under the GPL
*/ */
#ifndef __MCONSOLE_KERN_H__ #ifndef __MCONSOLE_KERN_H__
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) * Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org)
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#include <errno.h> #include <errno.h>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) and * Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) and
* James Leu (jleu@mindspring.net). * James Leu (jleu@mindspring.net).
* Copyright (C) 2001 by various other people who didn't put their name here. * Copyright (C) 2001 by various other people who didn't put their name here.
* Licensed under the GPL.
*/ */
#include <linux/memblock.h> #include <linux/memblock.h>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#include <stdio.h> #include <stdio.h>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2002 - 2007 Jeff Dike (jdike@{linux.intel,addtoit}.com) * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{linux.intel,addtoit}.com)
* Licensed under the GPL
*/ */
#include <stddef.h> #include <stddef.h>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL.
*/ */
#include <linux/init.h> #include <linux/init.h>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL.
*/ */
#include <errno.h> #include <errno.h>
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2002 Jeff Dike (jdike@karaya.com) * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
* Licensed under the GPL
*/ */
#include <net_user.h> #include <net_user.h>
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2001 Jeff Dike (jdike@karaya.com) * Copyright (C) 2001 Jeff Dike (jdike@karaya.com)
* Licensed under the GPL
*/ */
#ifndef __PORT_H__ #ifndef __PORT_H__
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{linux.intel,addtoit}.com) * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{linux.intel,addtoit}.com)
* Licensed under the GPL
*/ */
#include <linux/completion.h> #include <linux/completion.h>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{linux.intel,addtoit}.com) * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{linux.intel,addtoit}.com)
* Licensed under the GPL
*/ */
#include <stdio.h> #include <stdio.h>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#include <stdio.h> #include <stdio.h>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL.
*/ */
#include <linux/if_arp.h> #include <linux/if_arp.h>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL.
*/ */
#include <stdio.h> #include <stdio.h>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL.
*/ */
#include <linux/if_arp.h> #include <linux/if_arp.h>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL.
*/ */
#include <unistd.h> #include <unistd.h>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2000, 2002 Jeff Dike (jdike@karaya.com) * Copyright (C) 2000, 2002 Jeff Dike (jdike@karaya.com)
* Licensed under the GPL
*/ */
#include <linux/fs.h> #include <linux/fs.h>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com) * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com)
* Licensed under the GPL
*/ */
#include <linux/posix_types.h> #include <linux/posix_types.h>
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2000 Jeff Dike (jdike@karaya.com) * Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
* Licensed under the GPL
*/ */
#ifndef __STDIO_CONSOLE_H #ifndef __STDIO_CONSOLE_H
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{linux.intel,addtoit}.com) * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{linux.intel,addtoit}.com)
* Licensed under the GPL
*/ */
#include <errno.h> #include <errno.h>
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2000 Jeff Dike (jdike@karaya.com) * Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
* Copyright (C) 2001 RidgeRun, Inc (glonnon@ridgerun.com) * Copyright (C) 2001 RidgeRun, Inc (glonnon@ridgerun.com)
* Licensed under the GPL
*/ */
#ifndef __UM_UBD_USER_H #ifndef __UM_UBD_USER_H
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2018 Cambridge Greys Ltd * Copyright (C) 2018 Cambridge Greys Ltd
* Copyright (C) 2015-2016 Anton Ivanov (aivanov@brocade.com) * Copyright (C) 2015-2016 Anton Ivanov (aivanov@brocade.com)
* Copyright (C) 2000 Jeff Dike (jdike@karaya.com) * Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
* Licensed under the GPL
*/ */
/* 2001-09-28...2002-04-17 /* 2001-09-28...2002-04-17
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2016 Anton Ivanov (aivanov@brocade.com) * Copyright (C) 2016 Anton Ivanov (aivanov@brocade.com)
* Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com)
* Copyright (C) 2001 Ridgerun,Inc (glonnon@ridgerun.com) * Copyright (C) 2001 Ridgerun,Inc (glonnon@ridgerun.com)
* Licensed under the GPL
*/ */
#include <stddef.h> #include <stddef.h>
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#ifndef __DRIVERS_UMCAST_H #ifndef __DRIVERS_UMCAST_H
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* user-mode-linux networking multicast transport * user-mode-linux networking multicast transport
* Copyright (C) 2001 by Harald Welte <laforge@gnumonks.org> * Copyright (C) 2001 by Harald Welte <laforge@gnumonks.org>
...@@ -8,7 +9,6 @@ ...@@ -8,7 +9,6 @@
* James Leu (jleu@mindspring.net). * James Leu (jleu@mindspring.net).
* Copyright (C) 2001 by various other people who didn't put their name here. * Copyright (C) 2001 by various other people who didn't put their name here.
* *
* Licensed under the GPL.
*/ */
#include <linux/init.h> #include <linux/init.h>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* user-mode-linux networking multicast transport * user-mode-linux networking multicast transport
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
...@@ -8,7 +9,6 @@ ...@@ -8,7 +9,6 @@
* James Leu (jleu@mindspring.net). * James Leu (jleu@mindspring.net).
* Copyright (C) 2001 by various other people who didn't put their name here. * Copyright (C) 2001 by various other people who didn't put their name here.
* *
* Licensed under the GPL.
* *
*/ */
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2007 Luca Bigliardi (shammash@artha.org). * Copyright (C) 2007 Luca Bigliardi (shammash@artha.org).
* Licensed under the GPL.
*/ */
#ifndef __UM_VDE_H__ #ifndef __UM_VDE_H__
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2007 Luca Bigliardi (shammash@artha.org). * Copyright (C) 2007 Luca Bigliardi (shammash@artha.org).
* Licensed under the GPL.
* *
* Transport usage: * Transport usage:
* ethN=vde,<vde_switch>,<mac addr>,<port>,<group>,<mode>,<description> * ethN=vde,<vde_switch>,<mac addr>,<port>,<group>,<mode>,<description>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2007 Luca Bigliardi (shammash@artha.org). * Copyright (C) 2007 Luca Bigliardi (shammash@artha.org).
* Licensed under the GPL.
*/ */
#include <stddef.h> #include <stddef.h>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2017 - Cambridge Greys Limited * Copyright (C) 2017 - Cambridge Greys Limited
* Copyright (C) 2011 - 2014 Cisco Systems Inc * Copyright (C) 2011 - 2014 Cisco Systems Inc
...@@ -5,7 +6,6 @@ ...@@ -5,7 +6,6 @@
* Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) and * Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) and
* James Leu (jleu@mindspring.net). * James Leu (jleu@mindspring.net).
* Copyright (C) 2001 by various other people who didn't put their name here. * Copyright (C) 2001 by various other people who didn't put their name here.
* Licensed under the GPL.
*/ */
#include <linux/version.h> #include <linux/version.h>
...@@ -76,6 +76,7 @@ static void vector_eth_configure(int n, struct arglist *def); ...@@ -76,6 +76,7 @@ static void vector_eth_configure(int n, struct arglist *def);
#define DEFAULT_VECTOR_SIZE 64 #define DEFAULT_VECTOR_SIZE 64
#define TX_SMALL_PACKET 128 #define TX_SMALL_PACKET 128
#define MAX_IOV_SIZE (MAX_SKB_FRAGS + 1) #define MAX_IOV_SIZE (MAX_SKB_FRAGS + 1)
#define MAX_ITERATIONS 64
static const struct { static const struct {
const char string[ETH_GSTRING_LEN]; const char string[ETH_GSTRING_LEN];
...@@ -121,7 +122,8 @@ static int get_mtu(struct arglist *def) ...@@ -121,7 +122,8 @@ static int get_mtu(struct arglist *def)
if (mtu != NULL) { if (mtu != NULL) {
if (kstrtoul(mtu, 10, &result) == 0) if (kstrtoul(mtu, 10, &result) == 0)
return result; if ((result < (1 << 16) - 1) && (result >= 576))
return result;
} }
return ETH_MAX_PACKET; return ETH_MAX_PACKET;
} }
...@@ -186,6 +188,8 @@ static int get_transport_options(struct arglist *def) ...@@ -186,6 +188,8 @@ static int get_transport_options(struct arglist *def)
if (strncmp(transport, TRANS_TAP, TRANS_TAP_LEN) == 0) if (strncmp(transport, TRANS_TAP, TRANS_TAP_LEN) == 0)
return 0;
if (strncmp(transport, TRANS_HYBRID, TRANS_HYBRID_LEN) == 0)
return (vec_rx | VECTOR_BPF); return (vec_rx | VECTOR_BPF);
if (strncmp(transport, TRANS_RAW, TRANS_RAW_LEN) == 0) if (strncmp(transport, TRANS_RAW, TRANS_RAW_LEN) == 0)
return (vec_rx | vec_tx | VECTOR_QDISC_BYPASS); return (vec_rx | vec_tx | VECTOR_QDISC_BYPASS);
...@@ -415,6 +419,7 @@ static int vector_send(struct vector_queue *qi) ...@@ -415,6 +419,7 @@ static int vector_send(struct vector_queue *qi)
if (net_ratelimit()) if (net_ratelimit())
netdev_err(vp->dev, "sendmmsg err=%i\n", netdev_err(vp->dev, "sendmmsg err=%i\n",
result); result);
vp->in_error = true;
result = send_len; result = send_len;
} }
if (result > 0) { if (result > 0) {
...@@ -842,6 +847,10 @@ static int vector_legacy_rx(struct vector_private *vp) ...@@ -842,6 +847,10 @@ static int vector_legacy_rx(struct vector_private *vp)
} }
pkt_len = uml_vector_recvmsg(vp->fds->rx_fd, &hdr, 0); pkt_len = uml_vector_recvmsg(vp->fds->rx_fd, &hdr, 0);
if (pkt_len < 0) {
vp->in_error = true;
return pkt_len;
}
if (skb != NULL) { if (skb != NULL) {
if (pkt_len > vp->header_size) { if (pkt_len > vp->header_size) {
...@@ -888,12 +897,16 @@ static int writev_tx(struct vector_private *vp, struct sk_buff *skb) ...@@ -888,12 +897,16 @@ static int writev_tx(struct vector_private *vp, struct sk_buff *skb)
if (iov_count < 1) if (iov_count < 1)
goto drop; goto drop;
pkt_len = uml_vector_writev( pkt_len = uml_vector_writev(
vp->fds->tx_fd, vp->fds->tx_fd,
(struct iovec *) &iov, (struct iovec *) &iov,
iov_count iov_count
); );
if (pkt_len < 0)
goto drop;
netif_trans_update(vp->dev); netif_trans_update(vp->dev);
netif_wake_queue(vp->dev); netif_wake_queue(vp->dev);
...@@ -908,6 +921,8 @@ static int writev_tx(struct vector_private *vp, struct sk_buff *skb) ...@@ -908,6 +921,8 @@ static int writev_tx(struct vector_private *vp, struct sk_buff *skb)
drop: drop:
vp->dev->stats.tx_dropped++; vp->dev->stats.tx_dropped++;
consume_skb(skb); consume_skb(skb);
if (pkt_len < 0)
vp->in_error = true;
return pkt_len; return pkt_len;
} }
...@@ -936,6 +951,9 @@ static int vector_mmsg_rx(struct vector_private *vp) ...@@ -936,6 +951,9 @@ static int vector_mmsg_rx(struct vector_private *vp)
packet_count = uml_vector_recvmmsg( packet_count = uml_vector_recvmmsg(
vp->fds->rx_fd, qi->mmsg_vector, qi->max_depth, 0); vp->fds->rx_fd, qi->mmsg_vector, qi->max_depth, 0);
if (packet_count < 0)
vp->in_error = true;
if (packet_count <= 0) if (packet_count <= 0)
return packet_count; return packet_count;
...@@ -1005,15 +1023,18 @@ static int vector_mmsg_rx(struct vector_private *vp) ...@@ -1005,15 +1023,18 @@ static int vector_mmsg_rx(struct vector_private *vp)
static void vector_rx(struct vector_private *vp) static void vector_rx(struct vector_private *vp)
{ {
int err; int err;
int iter = 0;
if ((vp->options & VECTOR_RX) > 0) if ((vp->options & VECTOR_RX) > 0)
while ((err = vector_mmsg_rx(vp)) > 0) while (((err = vector_mmsg_rx(vp)) > 0) && (iter < MAX_ITERATIONS))
; iter++;
else else
while ((err = vector_legacy_rx(vp)) > 0) while (((err = vector_legacy_rx(vp)) > 0) && (iter < MAX_ITERATIONS))
; iter++;
if ((err != 0) && net_ratelimit()) if ((err != 0) && net_ratelimit())
netdev_err(vp->dev, "vector_rx: error(%d)\n", err); netdev_err(vp->dev, "vector_rx: error(%d)\n", err);
if (iter == MAX_ITERATIONS)
netdev_err(vp->dev, "vector_rx: device stuck, remote end may have closed the connection\n");
} }
static int vector_net_start_xmit(struct sk_buff *skb, struct net_device *dev) static int vector_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
...@@ -1021,6 +1042,13 @@ static int vector_net_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -1021,6 +1042,13 @@ static int vector_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
struct vector_private *vp = netdev_priv(dev); struct vector_private *vp = netdev_priv(dev);
int queue_depth = 0; int queue_depth = 0;
if (vp->in_error) {
deactivate_fd(vp->fds->rx_fd, vp->rx_irq);
if ((vp->fds->rx_fd != vp->fds->tx_fd) && (vp->tx_irq != 0))
deactivate_fd(vp->fds->tx_fd, vp->tx_irq);
return NETDEV_TX_BUSY;
}
if ((vp->options & VECTOR_TX) == 0) { if ((vp->options & VECTOR_TX) == 0) {
writev_tx(vp, skb); writev_tx(vp, skb);
return NETDEV_TX_OK; return NETDEV_TX_OK;
...@@ -1131,6 +1159,7 @@ static int vector_net_close(struct net_device *dev) ...@@ -1131,6 +1159,7 @@ static int vector_net_close(struct net_device *dev)
vp->fds = NULL; vp->fds = NULL;
spin_lock_irqsave(&vp->lock, flags); spin_lock_irqsave(&vp->lock, flags);
vp->opened = false; vp->opened = false;
vp->in_error = false;
spin_unlock_irqrestore(&vp->lock, flags); spin_unlock_irqrestore(&vp->lock, flags);
return 0; return 0;
} }
...@@ -1498,7 +1527,8 @@ static void vector_eth_configure( ...@@ -1498,7 +1527,8 @@ static void vector_eth_configure(
.transport_data = NULL, .transport_data = NULL,
.in_write_poll = false, .in_write_poll = false,
.coalesce = 2, .coalesce = 2,
.req_size = get_req_size(def) .req_size = get_req_size(def),
.in_error = false
}); });
dev->features = dev->hw_features = (NETIF_F_SG | NETIF_F_FRAGLIST); dev->features = dev->hw_features = (NETIF_F_SG | NETIF_F_FRAGLIST);
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2002 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2002 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#ifndef __UM_VECTOR_KERN_H #ifndef __UM_VECTOR_KERN_H
...@@ -116,6 +116,7 @@ struct vector_private { ...@@ -116,6 +116,7 @@ struct vector_private {
bool rexmit_scheduled; bool rexmit_scheduled;
bool opened; bool opened;
bool in_write_poll; bool in_write_poll;
bool in_error;
/* ethtool stats */ /* ethtool stats */
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2017 - Cambridge Greys Limited * Copyright (C) 2017 - Cambridge Greys Limited
* Copyright (C) 2011 - 2014 Cisco Systems Inc * Copyright (C) 2011 - 2014 Cisco Systems Inc
* Licensed under the GPL.
*/ */
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
...@@ -418,7 +418,7 @@ static int build_raw_transport_data(struct vector_private *vp) ...@@ -418,7 +418,7 @@ static int build_raw_transport_data(struct vector_private *vp)
return 0; return 0;
} }
static int build_tap_transport_data(struct vector_private *vp) static int build_hybrid_transport_data(struct vector_private *vp)
{ {
if (uml_raw_enable_vnet_headers(vp->fds->rx_fd)) { if (uml_raw_enable_vnet_headers(vp->fds->rx_fd)) {
vp->form_header = &raw_form_header; vp->form_header = &raw_form_header;
...@@ -432,7 +432,7 @@ static int build_tap_transport_data(struct vector_private *vp) ...@@ -432,7 +432,7 @@ static int build_tap_transport_data(struct vector_private *vp)
NETIF_F_TSO | NETIF_F_GSO | NETIF_F_GRO); NETIF_F_TSO | NETIF_F_GSO | NETIF_F_GRO);
netdev_info( netdev_info(
vp->dev, vp->dev,
"tap/raw: using vnet headers for tso and tx/rx checksum" "tap/raw hybrid: using vnet headers for tso and tx/rx checksum"
); );
} else { } else {
return 0; /* do not try to enable tap too if raw failed */ return 0; /* do not try to enable tap too if raw failed */
...@@ -442,6 +442,38 @@ static int build_tap_transport_data(struct vector_private *vp) ...@@ -442,6 +442,38 @@ static int build_tap_transport_data(struct vector_private *vp)
return -1; return -1;
} }
static int build_tap_transport_data(struct vector_private *vp)
{
/* "Pure" tap uses the same fd for rx and tx */
if (uml_tap_enable_vnet_headers(vp->fds->tx_fd)) {
vp->form_header = &raw_form_header;
vp->verify_header = &raw_verify_header;
vp->header_size = sizeof(struct virtio_net_hdr);
vp->rx_header_size = sizeof(struct virtio_net_hdr);
vp->dev->hw_features |=
(NETIF_F_TSO | NETIF_F_GSO | NETIF_F_GRO);
vp->dev->features |=
(NETIF_F_RXCSUM | NETIF_F_HW_CSUM |
NETIF_F_TSO | NETIF_F_GSO | NETIF_F_GRO);
netdev_info(
vp->dev,
"tap: using vnet headers for tso and tx/rx checksum"
);
return 0;
}
return -1;
}
static int build_bess_transport_data(struct vector_private *vp)
{
vp->form_header = NULL;
vp->verify_header = NULL;
vp->header_size = 0;
vp->rx_header_size = 0;
return 0;
}
int build_transport_data(struct vector_private *vp) int build_transport_data(struct vector_private *vp)
{ {
char *transport = uml_vector_fetch_arg(vp->parsed, "transport"); char *transport = uml_vector_fetch_arg(vp->parsed, "transport");
...@@ -454,6 +486,10 @@ int build_transport_data(struct vector_private *vp) ...@@ -454,6 +486,10 @@ int build_transport_data(struct vector_private *vp)
return build_raw_transport_data(vp); return build_raw_transport_data(vp);
if (strncmp(transport, TRANS_TAP, TRANS_TAP_LEN) == 0) if (strncmp(transport, TRANS_TAP, TRANS_TAP_LEN) == 0)
return build_tap_transport_data(vp); return build_tap_transport_data(vp);
if (strncmp(transport, TRANS_HYBRID, TRANS_HYBRID_LEN) == 0)
return build_hybrid_transport_data(vp);
if (strncmp(transport, TRANS_BESS, TRANS_BESS_LEN) == 0)
return build_bess_transport_data(vp);
return 0; return 0;
} }
This diff is collapsed.
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2002 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2002 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#ifndef __UM_VECTOR_USER_H #ifndef __UM_VECTOR_USER_H
...@@ -16,13 +16,18 @@ ...@@ -16,13 +16,18 @@
#define TRANS_TAP "tap" #define TRANS_TAP "tap"
#define TRANS_TAP_LEN strlen(TRANS_TAP) #define TRANS_TAP_LEN strlen(TRANS_TAP)
#define TRANS_GRE "gre" #define TRANS_GRE "gre"
#define TRANS_GRE_LEN strlen(TRANS_RAW) #define TRANS_GRE_LEN strlen(TRANS_RAW)
#define TRANS_L2TPV3 "l2tpv3" #define TRANS_L2TPV3 "l2tpv3"
#define TRANS_L2TPV3_LEN strlen(TRANS_L2TPV3) #define TRANS_L2TPV3_LEN strlen(TRANS_L2TPV3)
#define TRANS_HYBRID "hybrid"
#define TRANS_HYBRID_LEN strlen(TRANS_HYBRID)
#define TRANS_BESS "bess"
#define TRANS_BESS_LEN strlen(TRANS_BESS)
#ifndef IPPROTO_GRE #ifndef IPPROTO_GRE
#define IPPROTO_GRE 0x2F #define IPPROTO_GRE 0x2F
#endif #endif
......
// SPDX-License-Identifier: GPL-2.0-or-later
/* Vhost-user protocol */
#ifndef __VHOST_USER_H__
#define __VHOST_USER_H__
/* Message flags */
#define VHOST_USER_FLAG_REPLY BIT(2)
#define VHOST_USER_FLAG_NEED_REPLY BIT(3)
/* Feature bits */
#define VHOST_USER_F_PROTOCOL_FEATURES 30
/* Protocol feature bits */
#define VHOST_USER_PROTOCOL_F_REPLY_ACK 3
#define VHOST_USER_PROTOCOL_F_SLAVE_REQ 5
#define VHOST_USER_PROTOCOL_F_CONFIG 9
/* Vring state index masks */
#define VHOST_USER_VRING_INDEX_MASK 0xff
#define VHOST_USER_VRING_POLL_MASK BIT(8)
/* Supported version */
#define VHOST_USER_VERSION 1
/* Supported transport features */
#define VHOST_USER_SUPPORTED_F BIT_ULL(VHOST_USER_F_PROTOCOL_FEATURES)
/* Supported protocol features */
#define VHOST_USER_SUPPORTED_PROTOCOL_F (BIT_ULL(VHOST_USER_PROTOCOL_F_REPLY_ACK) | \
BIT_ULL(VHOST_USER_PROTOCOL_F_SLAVE_REQ) | \
BIT_ULL(VHOST_USER_PROTOCOL_F_CONFIG))
enum vhost_user_request {
VHOST_USER_GET_FEATURES = 1,
VHOST_USER_SET_FEATURES = 2,
VHOST_USER_SET_OWNER = 3,
VHOST_USER_RESET_OWNER = 4,
VHOST_USER_SET_MEM_TABLE = 5,
VHOST_USER_SET_LOG_BASE = 6,
VHOST_USER_SET_LOG_FD = 7,
VHOST_USER_SET_VRING_NUM = 8,
VHOST_USER_SET_VRING_ADDR = 9,
VHOST_USER_SET_VRING_BASE = 10,
VHOST_USER_GET_VRING_BASE = 11,
VHOST_USER_SET_VRING_KICK = 12,
VHOST_USER_SET_VRING_CALL = 13,
VHOST_USER_SET_VRING_ERR = 14,
VHOST_USER_GET_PROTOCOL_FEATURES = 15,
VHOST_USER_SET_PROTOCOL_FEATURES = 16,
VHOST_USER_GET_QUEUE_NUM = 17,
VHOST_USER_SET_VRING_ENABLE = 18,
VHOST_USER_SEND_RARP = 19,
VHOST_USER_NET_SEND_MTU = 20,
VHOST_USER_SET_SLAVE_REQ_FD = 21,
VHOST_USER_IOTLB_MSG = 22,
VHOST_USER_SET_VRING_ENDIAN = 23,
VHOST_USER_GET_CONFIG = 24,
VHOST_USER_SET_CONFIG = 25,
};
enum vhost_user_slave_request {
VHOST_USER_SLAVE_IOTLB_MSG = 1,
VHOST_USER_SLAVE_CONFIG_CHANGE_MSG = 2,
VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG = 3,
};
struct vhost_user_header {
/*
* Use enum vhost_user_request for outgoing messages,
* uses enum vhost_user_slave_request for incoming ones.
*/
u32 request;
u32 flags;
u32 size;
} __packed;
struct vhost_user_config {
u32 offset;
u32 size;
u32 flags;
u8 payload[0]; /* Variable length */
} __packed;
struct vhost_user_vring_state {
u32 index;
u32 num;
} __packed;
struct vhost_user_vring_addr {
u32 index;
u32 flags;
u64 desc, used, avail, log;
} __packed;
struct vhost_user_mem_region {
u64 guest_addr;
u64 size;
u64 user_addr;
u64 mmap_offset;
} __packed;
struct vhost_user_mem_regions {
u32 num;
u32 padding;
struct vhost_user_mem_region regions[2]; /* Currently supporting 2 */
} __packed;
union vhost_user_payload {
u64 integer;
struct vhost_user_config config;
struct vhost_user_vring_state vring_state;
struct vhost_user_vring_addr vring_addr;
struct vhost_user_mem_regions mem_regions;
};
struct vhost_user_msg {
struct vhost_user_header header;
union vhost_user_payload payload;
} __packed;
#endif
This diff is collapsed.
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#include <stddef.h> #include <stddef.h>
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2002 Jeff Dike (jdike@karaya.com) * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
* Licensed under the GPL
*/ */
#ifndef __XTERM_H__ #ifndef __XTERM_H__
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#include <linux/slab.h> #include <linux/slab.h>
......
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
generic-y += barrier.h
generic-y += bpf_perf_event.h generic-y += bpf_perf_event.h
generic-y += bug.h generic-y += bug.h
generic-y += compat.h generic-y += compat.h
......
...@@ -83,8 +83,8 @@ ...@@ -83,8 +83,8 @@
__preinit_array_end = .; __preinit_array_end = .;
} }
.init_array : { .init_array : {
/* dummy - we call this ourselves */
__init_array_start = .; __init_array_start = .;
*(.init_array)
__init_array_end = .; __init_array_end = .;
} }
.fini_array : { .fini_array : {
......
...@@ -17,17 +17,18 @@ ...@@ -17,17 +17,18 @@
#define TELNETD_IRQ 12 #define TELNETD_IRQ 12
#define XTERM_IRQ 13 #define XTERM_IRQ 13
#define RANDOM_IRQ 14 #define RANDOM_IRQ 14
#define VIRTIO_IRQ 15
#ifdef CONFIG_UML_NET_VECTOR #ifdef CONFIG_UML_NET_VECTOR
#define VECTOR_BASE_IRQ 15 #define VECTOR_BASE_IRQ (VIRTIO_IRQ + 1)
#define VECTOR_IRQ_SPACE 8 #define VECTOR_IRQ_SPACE 8
#define LAST_IRQ (VECTOR_IRQ_SPACE + VECTOR_BASE_IRQ) #define LAST_IRQ (VECTOR_IRQ_SPACE + VECTOR_BASE_IRQ - 1)
#else #else
#define LAST_IRQ RANDOM_IRQ #define LAST_IRQ VIRTIO_IRQ
#endif #endif
......
...@@ -32,7 +32,6 @@ static inline void arch_local_irq_disable(void) ...@@ -32,7 +32,6 @@ static inline void arch_local_irq_disable(void)
} }
#define ARCH_IRQ_DISABLED 0 #define ARCH_IRQ_DISABLED 0
#define ARCh_IRQ_ENABLED (SIGIO|SIGVTALRM)
#include <asm-generic/irqflags.h> #include <asm-generic/irqflags.h>
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2002 Jeff Dike (jdike@karaya.com) * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
* Licensed under the GPL
*/ */
#ifndef __UM_KMAP_TYPES_H #ifndef __UM_KMAP_TYPES_H
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#ifndef __ARCH_UM_MMU_H #ifndef __ARCH_UM_MMU_H
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#ifndef __UM_MMU_CONTEXT_H #ifndef __UM_MMU_CONTEXT_H
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com)
* Copyright 2003 PathScale, Inc. * Copyright 2003 PathScale, Inc.
* Licensed under the GPL
*/ */
#ifndef __UM_PAGE_H #ifndef __UM_PAGE_H
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com)
* Copyright 2003 PathScale, Inc. * Copyright 2003 PathScale, Inc.
* Derived from include/asm-i386/pgalloc.h and include/asm-i386/pgtable.h * Derived from include/asm-i386/pgalloc.h and include/asm-i386/pgtable.h
* Licensed under the GPL
*/ */
#ifndef __UM_PGALLOC_H #ifndef __UM_PGALLOC_H
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com)
* Copyright 2003 PathScale, Inc. * Copyright 2003 PathScale, Inc.
* Derived from include/asm-i386/pgtable.h * Derived from include/asm-i386/pgtable.h
* Licensed under the GPL
*/ */
#ifndef __UM_PGTABLE_2LEVEL_H #ifndef __UM_PGTABLE_2LEVEL_H
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright 2003 PathScale Inc * Copyright 2003 PathScale Inc
* Derived from include/asm-i386/pgtable.h * Derived from include/asm-i386/pgtable.h
* Licensed under the GPL
*/ */
#ifndef __UM_PGTABLE_3LEVEL_H #ifndef __UM_PGTABLE_3LEVEL_H
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Copyright 2003 PathScale, Inc. * Copyright 2003 PathScale, Inc.
* Derived from include/asm-i386/pgtable.h * Derived from include/asm-i386/pgtable.h
* Licensed under the GPL
*/ */
#ifndef __UM_PGTABLE_H #ifndef __UM_PGTABLE_H
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#ifndef __UM_PROCESSOR_GENERIC_H #ifndef __UM_PROCESSOR_GENERIC_H
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#ifndef __UM_PTRACE_GENERIC_H #ifndef __UM_PTRACE_GENERIC_H
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#ifndef __UM_THREAD_INFO_H #ifndef __UM_THREAD_INFO_H
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#ifndef __UM_TLBFLUSH_H #ifndef __UM_TLBFLUSH_H
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2002 Jeff Dike (jdike@karaya.com) * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
* Copyright (C) 2015 Richard Weinberger (richard@nod.at) * Copyright (C) 2015 Richard Weinberger (richard@nod.at)
* Licensed under the GPL
*/ */
#ifndef __UM_UACCESS_H #ifndef __UM_UACCESS_H
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#ifndef __ARCH_H__ #ifndef __ARCH_H__
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#ifndef __START_H__ #ifndef __START_H__
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2004 Fujitsu Siemens Computers GmbH * Copyright (C) 2004 Fujitsu Siemens Computers GmbH
* Author: Bodo Stroesser <bstroesser@fujitsu-siemens.com> * Author: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
* Licensed under the GPL
*/ */
#ifndef __ELF_USER_H__ #ifndef __ELF_USER_H__
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2002 Jeff Dike (jdike@karaya.com) * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
* Licensed under the GPL
*/ */
#ifndef __FRAME_KERN_H_ #ifndef __FRAME_KERN_H_
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com) * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com)
* Licensed under the GPL
*/ */
#ifndef __IRQ_KERN_H__ #ifndef __IRQ_KERN_H__
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#ifndef __IRQ_USER_H__ #ifndef __IRQ_USER_H__
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2000 Jeff Dike (jdike@karaya.com) * Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
* Licensed under the GPL
*/ */
#ifndef __KERN_H__ #ifndef __KERN_H__
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#ifndef __KERN_UTIL_H__ #ifndef __KERN_UTIL_H__
......
...@@ -18,7 +18,7 @@ extern void longjmp(jmp_buf, int); ...@@ -18,7 +18,7 @@ extern void longjmp(jmp_buf, int);
enable = get_signals(); \ enable = get_signals(); \
n = setjmp(*buf); \ n = setjmp(*buf); \
if(n != 0) \ if(n != 0) \
set_signals(enable); \ set_signals_trace(enable); \
n; }) n; })
#endif #endif
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#ifndef __MEM_H__ #ifndef __MEM_H__
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2002 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2002 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#ifndef __UM_NET_KERN_H #ifndef __UM_NET_KERN_H
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#ifndef __UM_NET_USER_H__ #ifndef __UM_NET_USER_H__
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2015 Anton Ivanov (aivanov@{brocade.com,kot-begemot.co.uk}) * Copyright (C) 2015 Anton Ivanov (aivanov@{brocade.com,kot-begemot.co.uk})
* Copyright (C) 2015 Thomas Meyer (thomas@m3y3r.de) * Copyright (C) 2015 Thomas Meyer (thomas@m3y3r.de)
* Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#ifndef __OS_H__ #ifndef __OS_H__
...@@ -36,6 +36,8 @@ ...@@ -36,6 +36,8 @@
#define OS_LIB_PATH "/usr/lib/" #define OS_LIB_PATH "/usr/lib/"
#endif #endif
#define OS_SENDMSG_MAX_FDS 8
/* /*
* types taken from stat_file() in hostfs_user.c * types taken from stat_file() in hostfs_user.c
* (if they are wrong here, they are wrong there...). * (if they are wrong here, they are wrong there...).
...@@ -176,6 +178,9 @@ extern unsigned os_major(unsigned long long dev); ...@@ -176,6 +178,9 @@ extern unsigned os_major(unsigned long long dev);
extern unsigned os_minor(unsigned long long dev); extern unsigned os_minor(unsigned long long dev);
extern unsigned long long os_makedev(unsigned major, unsigned minor); extern unsigned long long os_makedev(unsigned major, unsigned minor);
extern int os_falloc_punch(int fd, unsigned long long offset, int count); extern int os_falloc_punch(int fd, unsigned long long offset, int count);
extern int os_eventfd(unsigned int initval, int flags);
extern int os_sendmsg_fds(int fd, const void *buf, unsigned int len,
const int *fds, unsigned int fds_num);
/* start_up.c */ /* start_up.c */
extern void os_early_checks(void); extern void os_early_checks(void);
...@@ -232,6 +237,7 @@ extern void block_signals(void); ...@@ -232,6 +237,7 @@ extern void block_signals(void);
extern void unblock_signals(void); extern void unblock_signals(void);
extern int get_signals(void); extern int get_signals(void);
extern int set_signals(int enable); extern int set_signals(int enable);
extern int set_signals_trace(int enable);
extern int os_is_signal_stack(void); extern int os_is_signal_stack(void);
extern void deliver_alarm(void); extern void deliver_alarm(void);
...@@ -317,4 +323,10 @@ extern unsigned long os_get_top_address(void); ...@@ -317,4 +323,10 @@ extern unsigned long os_get_top_address(void);
long syscall(long number, ...); long syscall(long number, ...);
/* irqflags tracing */
extern void block_signals_trace(void);
extern void unblock_signals_trace(void);
extern void um_trace_signals_on(void);
extern void um_trace_signals_off(void);
#endif #endif
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#ifndef __PTRACE_USER_H__ #ifndef __PTRACE_USER_H__
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2004 PathScale, Inc * Copyright (C) 2004 PathScale, Inc
* Licensed under the GPL
*/ */
#ifndef __REGISTERS_H #ifndef __REGISTERS_H
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2002 Jeff Dike (jdike@karaya.com) * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
* Licensed under the GPL
*/ */
#ifndef __SIGIO_H__ #ifndef __SIGIO_H__
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2005 Jeff Dike (jdike@karaya.com) * Copyright (C) 2005 Jeff Dike (jdike@karaya.com)
* Licensed under the GPL
*/ */
#ifndef __MM_ID_H #ifndef __MM_ID_H
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#ifndef __SKAS_H #ifndef __SKAS_H
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2015 Thomas Meyer (thomas@m3y3r.de) * Copyright (C) 2015 Thomas Meyer (thomas@m3y3r.de)
* Copyright (C) 2005 Jeff Dike (jdike@karaya.com) * Copyright (C) 2005 Jeff Dike (jdike@karaya.com)
* Licensed under the GPL
*/ */
#ifndef __STUB_DATA_H #ifndef __STUB_DATA_H
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2012 - 2014 Cisco Systems * Copyright (C) 2012 - 2014 Cisco Systems
* Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#ifndef __TIMER_INTERNAL_H__ #ifndef __TIMER_INTERNAL_H__
...@@ -43,6 +43,11 @@ static inline void time_travel_set_timer_expiry(unsigned long long expiry) ...@@ -43,6 +43,11 @@ static inline void time_travel_set_timer_expiry(unsigned long long expiry)
{ {
time_travel_timer_expiry = expiry; time_travel_timer_expiry = expiry;
} }
static inline void time_travel_set_timer_interval(unsigned long long interval)
{
time_travel_timer_interval = interval;
}
#else #else
#define time_travel_mode TT_MODE_OFF #define time_travel_mode TT_MODE_OFF
#define time_travel_time 0 #define time_travel_time 0
...@@ -61,6 +66,10 @@ static inline void time_travel_set_timer_expiry(unsigned long long expiry) ...@@ -61,6 +66,10 @@ static inline void time_travel_set_timer_expiry(unsigned long long expiry)
{ {
} }
static inline void time_travel_set_timer_interval(unsigned long long interval)
{
}
#define time_travel_timer_mode TT_TMR_DISABLED #define time_travel_timer_mode TT_TMR_DISABLED
#endif #endif
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2005 Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> * Copyright (C) 2005 Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
* Licensed under the GPL
*/ */
#ifndef __UM_MALLOC_H__ #ifndef __UM_MALLOC_H__
......
/* SPDX-License-Identifier: GPL-2.0 */
/* /*
* Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#ifndef __USER_H__ #ifndef __USER_H__
......
# SPDX-License-Identifier: GPL-2.0
# #
# Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux,intel}.com) # Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux,intel}.com)
# Licensed under the GPL
# #
# Don't instrument UML-specific code; without this, we may crash when # Don't instrument UML-specific code; without this, we may crash when
...@@ -13,7 +13,6 @@ CPPFLAGS_vmlinux.lds := -DSTART=$(LDS_START) \ ...@@ -13,7 +13,6 @@ CPPFLAGS_vmlinux.lds := -DSTART=$(LDS_START) \
-DELF_FORMAT=$(LDS_ELF_FORMAT) \ -DELF_FORMAT=$(LDS_ELF_FORMAT) \
$(LDS_EXTRA) $(LDS_EXTRA)
extra-y := vmlinux.lds extra-y := vmlinux.lds
clean-files :=
obj-y = config.o exec.o exitcode.o irq.o ksyms.o mem.o \ obj-y = config.o exec.o exitcode.o irq.o ksyms.o mem.o \
physmem.o process.o ptrace.o reboot.o sigio.o \ physmem.o process.o ptrace.o reboot.o sigio.o \
......
/* // SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2002 Jeff Dike (jdike@karaya.com) * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
* Licensed under the GPL
*/ */
#include <stdio.h> #include <stdio.h>
......
...@@ -70,6 +70,8 @@ SECTIONS ...@@ -70,6 +70,8 @@ SECTIONS
SCHED_TEXT SCHED_TEXT
CPUIDLE_TEXT CPUIDLE_TEXT
LOCK_TEXT LOCK_TEXT
IRQENTRY_TEXT
SOFTIRQENTRY_TEXT
*(.fixup) *(.fixup)
*(.stub .text.* .gnu.linkonce.t.*) *(.stub .text.* .gnu.linkonce.t.*)
/* .gnu.warning sections are handled specially by elf32.em. */ /* .gnu.warning sections are handled specially by elf32.em. */
...@@ -101,7 +103,6 @@ SECTIONS ...@@ -101,7 +103,6 @@ SECTIONS
be empty, which isn't pretty. */ be empty, which isn't pretty. */
. = ALIGN(32 / 8); . = ALIGN(32 / 8);
.preinit_array : { *(.preinit_array) } .preinit_array : { *(.preinit_array) }
.init_array : { *(.init_array) }
.fini_array : { *(.fini_array) } .fini_array : { *(.fini_array) }
.data : { .data : {
INIT_TASK_DATA(KERNEL_STACK_SIZE) INIT_TASK_DATA(KERNEL_STACK_SIZE)
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#include <linux/stddef.h> #include <linux/stddef.h>
......
// SPDX-License-Identifier: GPL-2.0
/* /*
* Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Licensed under the GPL
*/ */
#include <linux/ctype.h> #include <linux/ctype.h>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment