mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* KVM startup speedup (Chao Peng) * configure fixes and cleanups (David, Thomas) * ctags fix (Sergey) * NBD cleanups (Peter, Eric) * "-L help" command line option (Richard) * More esp.c bugfixes (me, Prasad) * KVM_CAP_MAX_VCPU_ID support (Greg) # gpg: Signature made Thu 16 Jun 2016 17:39:10 BST # gpg: using RSA key 0xBFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: (29 commits) vl: smp_parse: cleanups scsi: esp: make cmdbuf big enough for maximum CDB size scsi: esp: clean up handle_ti/esp_do_dma if s->do_cmd scsi: esp: respect FIFO invariant after message phase scsi: esp: check buffer length before reading scsi command nbd: Avoid magic number for NBD max name size nbd: Detect servers that send unexpected error values nbd: Clean up ioctl handling of qemu-nbd -c nbd: Group all Linux-specific ioctl code in one place nbd: Reject unknown request flags nbd: Improve server handling of bogus commands nbd: Quit server after any write error nbd: More debug typo fixes, use correct formats nbd: Use BDRV_REQ_FUA for better FUA where supported vl.c: Add '-L help' which lists data dirs. KVM: use KVM_CAP_MAX_VCPU_ID scsi-disk: Use (unsigned long) typecasts when using "%lu" format string target-i386: kvm: cache KVM_GET_SUPPORTED_CPUID data nbd: simplify the nbd_request and nbd_reply structs nbd: Don't use cpu_to_*w() functions ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
@@ -498,12 +498,12 @@ test speed: all
|
||||
|
||||
.PHONY: ctags
|
||||
ctags:
|
||||
rm -f $@
|
||||
rm -f tags
|
||||
find "$(SRC_PATH)" -name '*.[hc]' -exec ctags --append {} +
|
||||
|
||||
.PHONY: TAGS
|
||||
TAGS:
|
||||
rm -f $@
|
||||
rm -f TAGS
|
||||
find "$(SRC_PATH)" -name '*.[hc]' -exec etags --append {} +
|
||||
|
||||
cscope:
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
#include "qemu/osdep.h"
|
||||
#include <sys/mman.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/soundcard.h>
|
||||
#include "qemu-common.h"
|
||||
|
||||
@@ -24,11 +24,6 @@
|
||||
|
||||
/* Needed for CONFIG_MADVISE */
|
||||
#include "qemu/osdep.h"
|
||||
|
||||
#if defined(CONFIG_MADVISE) || defined(CONFIG_POSIX_MADVISE)
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
#include "block/block_int.h"
|
||||
#include "qemu-common.h"
|
||||
#include "qcow2.h"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/* This is the Linux kernel elf-loading code, ported into user space */
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include "qemu.h"
|
||||
#include "disas/disas.h"
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
*/
|
||||
#include "qemu/osdep.h"
|
||||
#include <machine/trap.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include "qemu.h"
|
||||
#include "qemu/path.h"
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "qemu/osdep.h"
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include "qemu.h"
|
||||
#include "qemu-common.h"
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/cutils.h"
|
||||
#include "qemu/path.h"
|
||||
#include <sys/mman.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
@@ -270,7 +270,6 @@ aix="no"
|
||||
blobs="yes"
|
||||
pkgversion=""
|
||||
pie=""
|
||||
zero_malloc=""
|
||||
qom_cast_debug="yes"
|
||||
trace_backends="log"
|
||||
trace_file="trace"
|
||||
@@ -1389,11 +1388,9 @@ fi
|
||||
|
||||
# Consult white-list to determine whether to enable werror
|
||||
# by default. Only enable by default for git builds
|
||||
z_version=$(cut -f3 -d. $source_path/VERSION)
|
||||
|
||||
if test -z "$werror" ; then
|
||||
if test -d "$source_path/.git" -a \
|
||||
"$linux" = "yes" ; then
|
||||
\( "$linux" = "yes" -o "$mingw32" = "yes" \) ; then
|
||||
werror="yes"
|
||||
else
|
||||
werror="no"
|
||||
@@ -1782,13 +1779,20 @@ fi
|
||||
# avx2 optimization requirement check
|
||||
|
||||
cat > $TMPC << EOF
|
||||
static void bar(void) {}
|
||||
#pragma GCC push_options
|
||||
#pragma GCC target("avx2")
|
||||
#include <cpuid.h>
|
||||
#include <immintrin.h>
|
||||
|
||||
static int bar(void *a) {
|
||||
return _mm256_movemask_epi8(_mm256_cmpeq_epi8(*(__m256i *)a, (__m256i){0}));
|
||||
}
|
||||
static void *bar_ifunc(void) {return (void*) bar;}
|
||||
static void foo(void) __attribute__((ifunc("bar_ifunc")));
|
||||
int main(void) { foo(); return 0; }
|
||||
int foo(void *a) __attribute__((ifunc("bar_ifunc")));
|
||||
int main(int argc, char *argv[]) { return foo(argv[0]);}
|
||||
EOF
|
||||
if compile_prog "-mavx2" "" ; then
|
||||
if readelf --syms $TMPE |grep "IFUNC.*foo" >/dev/null 2>&1; then
|
||||
if compile_object "" ; then
|
||||
if readelf --syms $TMPO |grep "IFUNC.*foo" >/dev/null 2>&1; then
|
||||
avx2_opt="yes"
|
||||
fi
|
||||
fi
|
||||
@@ -4177,24 +4181,6 @@ if compile_prog "" "" ; then
|
||||
posix_madvise=yes
|
||||
fi
|
||||
|
||||
##########################################
|
||||
# check if we have usable SIGEV_THREAD_ID
|
||||
|
||||
sigev_thread_id=no
|
||||
cat > $TMPC << EOF
|
||||
#include <signal.h>
|
||||
int main(void) {
|
||||
struct sigevent ev;
|
||||
ev.sigev_notify = SIGEV_THREAD_ID;
|
||||
ev._sigev_un._tid = 0;
|
||||
asm volatile("" : : "g"(&ev));
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
if compile_prog "" "" ; then
|
||||
sigev_thread_id=yes
|
||||
fi
|
||||
|
||||
##########################################
|
||||
# check if trace backend exists
|
||||
|
||||
@@ -4574,16 +4560,6 @@ if test "$libnfs" != "no" ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Disable zero malloc errors for official releases unless explicitly told to
|
||||
# enable/disable
|
||||
if test -z "$zero_malloc" ; then
|
||||
if test "$z_version" = "50" ; then
|
||||
zero_malloc="no"
|
||||
else
|
||||
zero_malloc="yes"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now we've finished running tests it's OK to add -Werror to the compiler flags
|
||||
if test "$werror" = "yes"; then
|
||||
QEMU_CFLAGS="-Werror $QEMU_CFLAGS"
|
||||
@@ -4862,7 +4838,6 @@ echo "preadv support $preadv"
|
||||
echo "fdatasync $fdatasync"
|
||||
echo "madvise $madvise"
|
||||
echo "posix_madvise $posix_madvise"
|
||||
echo "sigev_thread_id $sigev_thread_id"
|
||||
echo "uuid support $uuid"
|
||||
echo "libcap-ng support $cap_ng"
|
||||
echo "vhost-net support $vhost_net"
|
||||
@@ -5277,9 +5252,6 @@ fi
|
||||
if test "$posix_madvise" = "yes" ; then
|
||||
echo "CONFIG_POSIX_MADVISE=y" >> $config_host_mak
|
||||
fi
|
||||
if test "$sigev_thread_id" = "yes" ; then
|
||||
echo "CONFIG_SIGEV_THREAD_ID=y" >> $config_host_mak
|
||||
fi
|
||||
|
||||
if test "$spice" = "yes" ; then
|
||||
echo "CONFIG_SPICE=y" >> $config_host_mak
|
||||
@@ -5342,9 +5314,6 @@ if [ "$bsd" = "yes" ] ; then
|
||||
echo "CONFIG_BSD=y" >> $config_host_mak
|
||||
fi
|
||||
|
||||
if test "$zero_malloc" = "yes" ; then
|
||||
echo "CONFIG_ZERO_MALLOC=y" >> $config_host_mak
|
||||
fi
|
||||
if test "$localtime_r" = "yes" ; then
|
||||
echo "CONFIG_LOCALTIME_R=y" >> $config_host_mak
|
||||
fi
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include "qemu/host-utils.h"
|
||||
#include "qemu/sockets.h"
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#ifndef _WIN32
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
#include "qemu/cutils.h"
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
#include "hw/hw.h"
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include <sys/select.h>
|
||||
#include <termios.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include "hw/hw.h"
|
||||
#include "sysemu/char.h"
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include "hw/hw.h"
|
||||
#include "ui/console.h"
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
*/
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include <sys/mman.h>
|
||||
#include "hw/hw.h"
|
||||
#include "hw/i386/pc.h"
|
||||
#include "qemu/error-report.h"
|
||||
|
||||
@@ -36,8 +36,6 @@
|
||||
|
||||
#include "hw/misc/ivshmem.h"
|
||||
|
||||
#include <sys/mman.h>
|
||||
|
||||
#define PCI_VENDOR_ID_IVSHMEM PCI_VENDOR_ID_REDHAT_QUMRANET
|
||||
#define PCI_DEVICE_ID_IVSHMEM 0x1110
|
||||
|
||||
|
||||
@@ -36,9 +36,6 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#if defined(CONFIG_POSIX)
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
#include "hw/hw.h"
|
||||
#include "hw/qdev.h"
|
||||
#include "hw/isa/isa.h"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "net_tx_pkt.h"
|
||||
#include "net/eth.h"
|
||||
#include "net/checksum.h"
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#ifndef NET_TX_PKT_H
|
||||
#define NET_TX_PKT_H
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "net/eth.h"
|
||||
#include "exec/hwaddr.h"
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include <sys/socket.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include "hw/hw.h"
|
||||
|
||||
+12
-10
@@ -98,6 +98,9 @@ static uint32_t get_cmd(ESPState *s, uint8_t *buf, uint8_t buflen)
|
||||
s->dma_memory_read(s->dma_opaque, buf, dmalen);
|
||||
} else {
|
||||
dmalen = s->ti_size;
|
||||
if (dmalen > TI_BUFSZ) {
|
||||
return 0;
|
||||
}
|
||||
memcpy(buf, s->ti_buf, dmalen);
|
||||
buf[0] = buf[2] >> 5;
|
||||
}
|
||||
@@ -219,7 +222,7 @@ static void write_response(ESPState *s)
|
||||
} else {
|
||||
s->ti_size = 2;
|
||||
s->ti_rptr = 0;
|
||||
s->ti_wptr = 0;
|
||||
s->ti_wptr = 2;
|
||||
s->rregs[ESP_RFLAGS] = 2;
|
||||
}
|
||||
esp_raise_irq(s);
|
||||
@@ -242,15 +245,12 @@ static void esp_do_dma(ESPState *s)
|
||||
uint32_t len;
|
||||
int to_device;
|
||||
|
||||
to_device = (s->ti_size < 0);
|
||||
len = s->dma_left;
|
||||
if (s->do_cmd) {
|
||||
trace_esp_do_dma(s->cmdlen, len);
|
||||
assert (s->cmdlen <= sizeof(s->cmdbuf) &&
|
||||
len <= sizeof(s->cmdbuf) - s->cmdlen);
|
||||
s->dma_memory_read(s->dma_opaque, &s->cmdbuf[s->cmdlen], len);
|
||||
s->ti_size = 0;
|
||||
s->cmdlen = 0;
|
||||
s->do_cmd = 0;
|
||||
do_cmd(s, s->cmdbuf);
|
||||
return;
|
||||
}
|
||||
if (s->async_len == 0) {
|
||||
@@ -260,6 +260,7 @@ static void esp_do_dma(ESPState *s)
|
||||
if (len > s->async_len) {
|
||||
len = s->async_len;
|
||||
}
|
||||
to_device = (s->ti_size < 0);
|
||||
if (to_device) {
|
||||
s->dma_memory_read(s->dma_opaque, s->async_buf, len);
|
||||
} else {
|
||||
@@ -315,6 +316,7 @@ void esp_transfer_data(SCSIRequest *req, uint32_t len)
|
||||
{
|
||||
ESPState *s = req->hba_private;
|
||||
|
||||
assert(!s->do_cmd);
|
||||
trace_esp_transfer_data(s->dma_left, s->ti_size);
|
||||
s->async_len = len;
|
||||
s->async_buf = scsi_req_get_buf(req);
|
||||
@@ -345,7 +347,7 @@ static void handle_ti(ESPState *s)
|
||||
s->dma_counter = dmalen;
|
||||
|
||||
if (s->do_cmd)
|
||||
minlen = (dmalen < 32) ? dmalen : 32;
|
||||
minlen = (dmalen < ESP_CMDBUF_SZ) ? dmalen : ESP_CMDBUF_SZ;
|
||||
else if (s->ti_size < 0)
|
||||
minlen = (dmalen < -s->ti_size) ? dmalen : -s->ti_size;
|
||||
else
|
||||
@@ -355,13 +357,13 @@ static void handle_ti(ESPState *s)
|
||||
s->dma_left = minlen;
|
||||
s->rregs[ESP_RSTAT] &= ~STAT_TC;
|
||||
esp_do_dma(s);
|
||||
} else if (s->do_cmd) {
|
||||
}
|
||||
if (s->do_cmd) {
|
||||
trace_esp_handle_ti_cmd(s->cmdlen);
|
||||
s->ti_size = 0;
|
||||
s->cmdlen = 0;
|
||||
s->do_cmd = 0;
|
||||
do_cmd(s, s->cmdbuf);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -449,7 +451,7 @@ void esp_reg_write(ESPState *s, uint32_t saddr, uint64_t val)
|
||||
break;
|
||||
case ESP_FIFO:
|
||||
if (s->do_cmd) {
|
||||
if (s->cmdlen < TI_BUFSZ) {
|
||||
if (s->cmdlen < ESP_CMDBUF_SZ) {
|
||||
s->cmdbuf[s->cmdlen++] = val & 0xff;
|
||||
} else {
|
||||
trace_esp_error_fifo_overrun();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user