mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 11:39:53 +00:00
QEMU trivial patches collected between June and October 2018
(Thank you to Thomas Huth) v2: fix 32bit build with updated patch (v3) from Philippe Mathieu-Daudé built in a 32bit debian sid chroot -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJb2D8VAAoJEPMMOL0/L748dZEP/11pPehjPPYVxesxM++pFeuf 2EOrLuOTkwlRX23itj2JHv8UTY3YZR9Z8kkF3SWe7qYfp4kB4dTEYjnJY5Im6fWQ TUbC9D9SivknOOPyQUtGXZQRN8D8m6V4hN2ZcoXC2M48GT23/uqUWBwCKYeHxdLf iJQFmhwDnXSZr+D0l9mpMK2vBsZ5ywcbne8GufTtrkz7Dq9A0nDWVc/XUEHzzahf C+6r2fRPjtImxIjhAGQeAEzOk5tYnqK/3kXjy6T4UygvnZw0pkAS1rIb3hvlzm1e kBlbA+pgL0kKumMmT9LBR4Os4hlL95URUF+BDNGa3EusImSL/wmhsawslQbfxVyv 5at3VKIdvPXr7GQvmhaJ3dllXiQixX7A+axevkwyZkuIcYLnuhvh6bCR3ap+4mq/ GRk4vwXStS6S8rDLAzo4GA4DsE4EDYJSnU13wMEaj1L9sYPVg1224AgCjnlIBbQa ntGD3lY7+nG5q1BeVfZXmpNZ4+N4TSpu2uEBxNvWY2/YkaouleQXJ8W4eFirB1Eo G8TN2fbroLcKgxhOlpvgFrfrgs8T5ZprpqQnvpE2h6M2Nu4JWJq4008q3uIPOwTy o9MrquqOjdG0+OBHr8Ji5HwDKex68NRQhl8BYhqtPhi/+XycDo47YSodNBfw2U/Q Ec9301/TQjBcvCBLEzrt =sHPv -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/vivier2/tags/qemu-trivial-for-3.1-pull-request' into staging QEMU trivial patches collected between June and October 2018 (Thank you to Thomas Huth) v2: fix 32bit build with updated patch (v3) from Philippe Mathieu-Daudé built in a 32bit debian sid chroot # gpg: Signature made Tue 30 Oct 2018 11:23:01 GMT # gpg: using RSA key F30C38BD3F2FBE3C # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" # gpg: aka "Laurent Vivier <laurent@vivier.eu>" # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier2/tags/qemu-trivial-for-3.1-pull-request: milkymist-minimac2: Use qemu_log_mask(GUEST_ERROR) instead of error_report ppc: move at24c to its own CONFIG_ symbol hw/intc/gicv3: Remove useless parenthesis around DIV_ROUND_UP macro hw/pci-host: Remove useless parenthesis around DIV_ROUND_UP macro tests/bios-tables-test: Remove an useless cast xen: Use the PCI_DEVICE macro qobject: Catch another straggler for use of qdict_put_str() configure: Support pkg-config for zlib tests: Fix typos in comments and help message (found by codespell) cpu.h: fix a typo in comment linux-user: fix comment s/atomic_write/atomic_set/ qemu-iotests: make 218 executable scripts/qemu.py: remove trailing quotes on docstring scripts/decodetree.py: remove unused imports docs/devel/testing.rst: add missing newlines after code block qemu-iotests: fix filename containing checks tests/tcg/README: fix location for lm32 tests memory.h: fix typos in comments vga_int: remove unused function protype configs/alpha: Remove unused CONFIG_PARALLEL_ISA switch Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
a2e002ff79
40
configure
vendored
40
configure
vendored
@ -2151,23 +2151,6 @@ EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
#########################################
|
||||
# zlib check
|
||||
|
||||
if test "$zlib" != "no" ; then
|
||||
cat > $TMPC << EOF
|
||||
#include <zlib.h>
|
||||
int main(void) { zlibVersion(); return 0; }
|
||||
EOF
|
||||
if compile_prog "" "-lz" ; then
|
||||
:
|
||||
else
|
||||
error_exit "zlib check failed" \
|
||||
"Make sure to have the zlib libs and headers installed."
|
||||
fi
|
||||
fi
|
||||
LIBS="$LIBS -lz"
|
||||
|
||||
##########################################
|
||||
# lzo check
|
||||
|
||||
@ -3479,6 +3462,29 @@ if ! compile_prog "$glib_cflags -Werror" "$glib_libs" ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
#########################################
|
||||
# zlib check
|
||||
|
||||
if test "$zlib" != "no" ; then
|
||||
if $pkg_config --exists zlib; then
|
||||
zlib_cflags=$($pkg_config --cflags zlib)
|
||||
zlib_libs=$($pkg_config --libs zlib)
|
||||
QEMU_CFLAGS="$zlib_cflags $QEMU_CFLAGS"
|
||||
LIBS="$zlib_libs $LIBS"
|
||||
else
|
||||
cat > $TMPC << EOF
|
||||
#include <zlib.h>
|
||||
int main(void) { zlibVersion(); return 0; }
|
||||
EOF
|
||||
if compile_prog "" "-lz" ; then
|
||||
LIBS="$LIBS -lz"
|
||||
else
|
||||
error_exit "zlib check failed" \
|
||||
"Make sure to have the zlib libs and headers installed."
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
##########################################
|
||||
# SHA command probe for modules
|
||||
if test "$modules" = yes; then
|
||||
|
@ -8,7 +8,6 @@ CONFIG_I82374=y
|
||||
CONFIG_I8254=y
|
||||
CONFIG_I8257=y
|
||||
CONFIG_PARALLEL=y
|
||||
CONFIG_PARALLEL_ISA=y
|
||||
CONFIG_FDC=y
|
||||
CONFIG_PCKBD=y
|
||||
CONFIG_VGA_CIRRUS=y
|
||||
|
@ -28,6 +28,7 @@ CONFIG_SM501=y
|
||||
CONFIG_DDC=y
|
||||
CONFIG_IDE_SII3112=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_AT24C=y
|
||||
CONFIG_BITBANG_I2C=y
|
||||
CONFIG_M41T80=y
|
||||
CONFIG_VGA_CIRRUS=y
|
||||
|
@ -59,6 +59,7 @@ variable (which affects memory reclamation and catches invalid pointers better)
|
||||
and gtester options. If necessary, you can run
|
||||
|
||||
.. code::
|
||||
|
||||
make check-unit V=1
|
||||
|
||||
and copy the actual command line which executes the unit test, then run
|
||||
@ -116,6 +117,7 @@ and using gdb on the test is still simple to do: find out the actual command
|
||||
from the output of
|
||||
|
||||
.. code::
|
||||
|
||||
make check-qtest V=1
|
||||
|
||||
which you can run manually.
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "hw/sysbus.h"
|
||||
#include "trace.h"
|
||||
#include "net/net.h"
|
||||
#include "qemu/log.h"
|
||||
#include "qemu/error-report.h"
|
||||
|
||||
#include <zlib.h>
|
||||
@ -214,7 +215,8 @@ static size_t assemble_frame(uint8_t *buf, size_t size,
|
||||
uint32_t crc;
|
||||
|
||||
if (size < payload_size + 12) {
|
||||
error_report("milkymist_minimac2: received too big ethernet frame");
|
||||
qemu_log_mask(LOG_GUEST_ERROR, "milkymist_minimac2: frame too big "
|
||||
"(%zd bytes)\n", payload_size);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -347,8 +349,9 @@ minimac2_read(void *opaque, hwaddr addr, unsigned size)
|
||||
break;
|
||||
|
||||
default:
|
||||
error_report("milkymist_minimac2: read access to unknown register 0x"
|
||||
TARGET_FMT_plx, addr << 2);
|
||||
qemu_log_mask(LOG_GUEST_ERROR,
|
||||
"milkymist_minimac2_rd%d: 0x%" HWADDR_PRIx "\n",
|
||||
size, addr << 2);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -413,8 +416,10 @@ minimac2_write(void *opaque, hwaddr addr, uint64_t value,
|
||||
break;
|
||||
|
||||
default:
|
||||
error_report("milkymist_minimac2: write access to unknown register 0x"
|
||||
TARGET_FMT_plx, addr << 2);
|
||||
qemu_log_mask(LOG_GUEST_ERROR,
|
||||
"milkymist_minimac2_wr%d: 0x%" HWADDR_PRIx
|
||||
" = 0x%" PRIx64 "\n",
|
||||
size, addr << 2, value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
common-obj-$(CONFIG_DS1225Y) += ds1225y.o
|
||||
common-obj-y += eeprom93xx.o
|
||||
common-obj-$(CONFIG_I2C) += eeprom_at24c.o
|
||||
common-obj-$(CONFIG_AT24C) += eeprom_at24c.o
|
||||
common-obj-y += fw_cfg.o
|
||||
common-obj-y += chrp_nvram.o
|
||||
common-obj-$(CONFIG_MAC_NVRAM) += mac_nvram.o
|
||||
|
@ -144,7 +144,7 @@ static void i440fx_update_memory_mappings(PCII440FXState *d)
|
||||
memory_region_transaction_begin();
|
||||
for (i = 0; i < 13; i++) {
|
||||
pam_update(&d->pam_regions[i], i,
|
||||
pd->config[I440FX_PAM + (DIV_ROUND_UP(i, 2))]);
|
||||
pd->config[I440FX_PAM + DIV_ROUND_UP(i, 2)]);
|
||||
}
|
||||
memory_region_set_enabled(&d->smram_region,
|
||||
!(pd->config[I440FX_SMRAM] & SMRAM_D_OPEN));
|
||||
|
@ -356,7 +356,7 @@ static void mch_update_pam(MCHPCIState *mch)
|
||||
memory_region_transaction_begin();
|
||||
for (i = 0; i < 13; i++) {
|
||||
pam_update(&mch->pam_regions[i], i,
|
||||
pd->config[MCH_HOST_BRIDGE_PAM0 + (DIV_ROUND_UP(i, 2))]);
|
||||
pd->config[MCH_HOST_BRIDGE_PAM0 + DIV_ROUND_UP(i, 2)]);
|
||||
}
|
||||
memory_region_transaction_commit();
|
||||
}
|
||||
|
@ -358,7 +358,7 @@ static uint64_t xen_pt_get_bar_size(PCIIORegion *r)
|
||||
static XenPTBarFlag xen_pt_bar_reg_parse(XenPCIPassthroughState *s,
|
||||
int index)
|
||||
{
|
||||
PCIDevice *d = &s->dev;
|
||||
PCIDevice *d = PCI_DEVICE(s);
|
||||
XenPTRegion *region = NULL;
|
||||
PCIIORegion *r;
|
||||
|
||||
@ -469,7 +469,7 @@ static int xen_pt_bar_reg_write(XenPCIPassthroughState *s, XenPTReg *cfg_entry,
|
||||
{
|
||||
XenPTRegInfo *reg = cfg_entry->reg;
|
||||
XenPTRegion *base = NULL;
|
||||
PCIDevice *d = &s->dev;
|
||||
PCIDevice *d = PCI_DEVICE(s);
|
||||
const PCIIORegion *r;
|
||||
uint32_t writable_mask = 0;
|
||||
uint32_t bar_emu_mask = 0;
|
||||
@ -543,7 +543,7 @@ static int xen_pt_exp_rom_bar_reg_write(XenPCIPassthroughState *s,
|
||||
{
|
||||
XenPTRegInfo *reg = cfg_entry->reg;
|
||||
XenPTRegion *base = NULL;
|
||||
PCIDevice *d = (PCIDevice *)&s->dev;
|
||||
PCIDevice *d = PCI_DEVICE(s);
|
||||
uint32_t writable_mask = 0;
|
||||
uint32_t throughable_mask = get_throughable_mask(s, reg, valid_mask);
|
||||
pcibus_t r_size = 0;
|
||||
@ -1587,7 +1587,7 @@ static int xen_pt_pcie_size_init(XenPCIPassthroughState *s,
|
||||
const XenPTRegGroupInfo *grp_reg,
|
||||
uint32_t base_offset, uint8_t *size)
|
||||
{
|
||||
PCIDevice *d = &s->dev;
|
||||
PCIDevice *d = PCI_DEVICE(s);
|
||||
uint8_t version = get_capability_version(s, base_offset);
|
||||
uint8_t type = get_device_type(s, base_offset);
|
||||
uint8_t pcie_size = 0;
|
||||
|
@ -935,7 +935,7 @@ uint64_t memory_region_size(MemoryRegion *mr);
|
||||
/**
|
||||
* memory_region_is_ram: check whether a memory region is random access
|
||||
*
|
||||
* Returns %true is a memory region is random access.
|
||||
* Returns %true if a memory region is random access.
|
||||
*
|
||||
* @mr: the memory region being queried
|
||||
*/
|
||||
@ -947,7 +947,7 @@ static inline bool memory_region_is_ram(MemoryRegion *mr)
|
||||
/**
|
||||
* memory_region_is_ram_device: check whether a memory region is a ram device
|
||||
*
|
||||
* Returns %true is a memory region is a device backed ram region
|
||||
* Returns %true if a memory region is a device backed ram region
|
||||
*
|
||||
* @mr: the memory region being queried
|
||||
*/
|
||||
@ -1161,7 +1161,7 @@ uint8_t memory_region_get_dirty_log_mask(MemoryRegion *mr);
|
||||
/**
|
||||
* memory_region_is_rom: check whether a memory region is ROM
|
||||
*
|
||||
* Returns %true is a memory region is read-only memory.
|
||||
* Returns %true if a memory region is read-only memory.
|
||||
*
|
||||
* @mr: the memory region being queried
|
||||
*/
|
||||
|
@ -62,7 +62,7 @@
|
||||
* avoids bugs where we forget to subtract GIC_INTERNAL from an
|
||||
* interrupt number.
|
||||
*/
|
||||
#define GICV3_BMP_SIZE (DIV_ROUND_UP(GICV3_MAXIRQ, 32))
|
||||
#define GICV3_BMP_SIZE DIV_ROUND_UP(GICV3_MAXIRQ, 32)
|
||||
|
||||
#define GIC_DECLARE_BITMAP(name) \
|
||||
uint32_t name[GICV3_BMP_SIZE]
|
||||
|
@ -852,7 +852,7 @@ extern CPUInterruptHandler cpu_interrupt_handler;
|
||||
/**
|
||||
* cpu_interrupt:
|
||||
* @cpu: The CPU to set an interrupt on.
|
||||
* @mask: The interupts to set.
|
||||
* @mask: The interrupts to set.
|
||||
*
|
||||
* Invokes the interrupt handler.
|
||||
*/
|
||||
|
@ -147,7 +147,7 @@ typedef struct TaskState {
|
||||
/* Nonzero if process_pending_signals() needs to do something (either
|
||||
* handle a pending signal or unblock signals).
|
||||
* This flag is written from a signal handler so should be accessed via
|
||||
* the atomic_read() and atomic_write() functions. (It is not accessed
|
||||
* the atomic_read() and atomic_set() functions. (It is not accessed
|
||||
* from multiple threads.)
|
||||
*/
|
||||
int signal_pending;
|
||||
|
@ -577,7 +577,7 @@ static QObject *qdict_crumple_for_keyval_qiv(QDict *src, Error **errp)
|
||||
if (!tmp) {
|
||||
tmp = qdict_clone_shallow(src);
|
||||
}
|
||||
qdict_put(tmp, ent->key, qstring_from_str(s));
|
||||
qdict_put_str(tmp, ent->key, s);
|
||||
g_free(buf);
|
||||
}
|
||||
|
||||
|
@ -149,12 +149,10 @@
|
||||
# trans_addl_i(ctx, &arg_opi, insn)
|
||||
#
|
||||
|
||||
import io
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import getopt
|
||||
import pdb
|
||||
|
||||
insnwidth = 32
|
||||
insnmask = 0xffffffff
|
||||
|
@ -93,7 +93,7 @@ class QEMUMachine(object):
|
||||
@param name: prefix for socket and log file names (default: qemu-PID)
|
||||
@param test_dir: where to create socket and log file
|
||||
@param monitor_address: address for QMP monitor
|
||||
@param socket_scm_helper: helper program, required for send_fd_scm()"
|
||||
@param socket_scm_helper: helper program, required for send_fd_scm()
|
||||
@note: Qemu process is not started until launch() is used.
|
||||
'''
|
||||
if args is None:
|
||||
|
@ -319,7 +319,7 @@ static bool load_asl(GArray *sdts, AcpiSdtTable *sdt)
|
||||
ret = g_spawn_command_line_sync(command_line->str, &out, &out_err, NULL, &error);
|
||||
g_assert_no_error(error);
|
||||
if (ret) {
|
||||
ret = g_file_get_contents(sdt->asl_file, (gchar **)&sdt->asl,
|
||||
ret = g_file_get_contents(sdt->asl_file, &sdt->asl,
|
||||
&sdt->asl_len, &error);
|
||||
g_assert(ret);
|
||||
g_assert_no_error(error);
|
||||
@ -390,7 +390,7 @@ try_again:
|
||||
if (g_file_test(aml_file, G_FILE_TEST_EXISTS)) {
|
||||
exp_sdt.aml_file = aml_file;
|
||||
} else if (*ext != '\0') {
|
||||
/* try fallback to generic (extention less) expected file */
|
||||
/* try fallback to generic (extension less) expected file */
|
||||
ext = "";
|
||||
g_free(aml_file);
|
||||
goto try_again;
|
||||
|
@ -41,7 +41,7 @@ docker-qemu-src: $(DOCKER_SRC_COPY)
|
||||
docker-image: ${DOCKER_TARGETS}
|
||||
|
||||
# General rule for building docker images. If we are a sub-make
|
||||
# invoked with SKIP_DOCKER_BUILD we still check the image is upto date
|
||||
# invoked with SKIP_DOCKER_BUILD we still check the image is up to date
|
||||
# though
|
||||
ifdef SKIP_DOCKER_BUILD
|
||||
docker-image-%: $(DOCKER_FILES_DIR)/%.docker
|
||||
|
@ -97,7 +97,7 @@ def _get_so_libs(executable):
|
||||
return libs
|
||||
|
||||
def _copy_binary_with_libs(src, dest_dir):
|
||||
"""Copy a binary executable and all its dependant libraries.
|
||||
"""Copy a binary executable and all its dependent libraries.
|
||||
|
||||
This does rely on the host file-system being fairly multi-arch
|
||||
aware so the file don't clash with the guests layout."""
|
||||
@ -284,7 +284,7 @@ class SubCommand(object):
|
||||
name = None # Subcommand name
|
||||
def shared_args(self, parser):
|
||||
parser.add_argument("--quiet", action="store_true",
|
||||
help="Run quietly unless an error occured")
|
||||
help="Run quietly unless an error occurred")
|
||||
|
||||
def args(self, parser):
|
||||
"""Setup argument parser"""
|
||||
|
@ -122,7 +122,7 @@ class CatchBreakpoint(gdb.Breakpoint):
|
||||
|
||||
|
||||
def run_test():
|
||||
"Run throught the tests one by one"
|
||||
"Run through the tests one by one"
|
||||
|
||||
print ("Checking we can step the first few instructions")
|
||||
step_ok = 0
|
||||
|
0
tests/qemu-iotests/218
Normal file → Executable file
0
tests/qemu-iotests/218
Normal file → Executable file
@ -257,7 +257,7 @@ function _launch_qemu()
|
||||
}
|
||||
|
||||
|
||||
# Silenty kills the QEMU process
|
||||
# Silently kills the QEMU process
|
||||
#
|
||||
# If $wait is set to anything other than the empty string, the process will not
|
||||
# be killed but only waited for, and any output will be forwarded to stdout. If
|
||||
|
@ -170,7 +170,7 @@ if [ ! -e "$TEST_DIR" ]; then
|
||||
fi
|
||||
|
||||
if [ ! -d "$TEST_DIR" ]; then
|
||||
echo "common.config: Error: \$TEST_DIR ($TEST_DIR) is not a directory"
|
||||
echo "common.rc: Error: \$TEST_DIR ($TEST_DIR) is not a directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -179,7 +179,7 @@ if [ -z "$REMOTE_TEST_DIR" ]; then
|
||||
fi
|
||||
|
||||
if [ ! -d "$SAMPLE_IMG_DIR" ]; then
|
||||
echo "common.config: Error: \$SAMPLE_IMG_DIR ($SAMPLE_IMG_DIR) is not a directory"
|
||||
echo "common.rc: Error: \$SAMPLE_IMG_DIR ($SAMPLE_IMG_DIR) is not a directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# TCG tests (per-target rules)
|
||||
#
|
||||
# This Makefile fragement is included from the per-target
|
||||
# This Makefile fragment is included from the per-target
|
||||
# Makefile.target so will be invoked for each linux-user program we
|
||||
# build. We have two options for compiling, either using a configured
|
||||
# guest compiler or calling one of our docker images to do it for us.
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# TCG Compiler Probe
|
||||
#
|
||||
# This Makefile fragement is included multiple times in the main make
|
||||
# This Makefile fragment is included multiple times in the main make
|
||||
# script to probe for available compilers. This is used to build up a
|
||||
# selection of required docker targets before we invoke a sub-make for
|
||||
# each target.
|
||||
|
@ -10,6 +10,6 @@ with "make test-cris".
|
||||
|
||||
LM32
|
||||
====
|
||||
The testsuite for LM32 is in tests/tcg/cris. You can run it
|
||||
The testsuite for LM32 is in tests/tcg/lm32. You can run it
|
||||
with "make test-lm32".
|
||||
|
||||
|
@ -24,7 +24,7 @@ int main(void)
|
||||
rt = 0x123456789ABCDEF1;
|
||||
rs = 0x123456789ABCDEF2;
|
||||
result = 0x0000000000000001;
|
||||
/* This time we do not set dspctrl, but it setted in pre-action. */
|
||||
/* This time we do not set dspctrl, but set it in pre-action. */
|
||||
dspresult = 0x1;
|
||||
|
||||
__asm
|
||||
|
Loading…
Reference in New Issue
Block a user