trivial patches for 2015-01-15
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJUt3myAAoJEL7lnXSkw9fbKXkH/00rjLDjazEuCNlitZDEDbPi gSNEHVk65xSmhhHURpvilKfA2IfXt67H9zDKp8FYFR0qfyLjgm5nMZQ7JWAcBk8e UD851zL3anuJyjxQUB//vK5VmNyoG29IFyFXQAqXwuvZDZAflvAuXxsQYHh+tB/f mIcQZNUmIAjLeg/JdY55s3b5ZLUcmd8Mmtzi1wZQPHeZQq5CxG3GGTKMB7wI4zJ/ 76NnP163Gdvr8J1J00icjE8sl7f0o/tJzhR7lbK5QtzySMtRVj8lkDBYC77lOe6U CaWTZgDCLtxtEVJ7xP/1hjg/TmSiPuOiAAvPFaUjdzb641Adshk4EaKF8ww2g9I= =YF9X -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2015-01-15' into staging trivial patches for 2015-01-15 # gpg: Signature made Thu 15 Jan 2015 08:26:26 GMT using RSA key ID A4C3D7DB # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" # gpg: aka "Michael Tokarev <mjt@corpit.ru>" # gpg: aka "Michael Tokarev <mjt@debian.org>" * remotes/mjt/tags/pull-trivial-patches-2015-01-15: vl.c: fix some alignment issues blizzard: do not depend on VGA internals Makefile: Remove config.status and common.env during 'make distclean' target-openrisc: bugfix for dec_sys to decode instructions correctly Do not hang on full PTY misc: Fix new typos in comments target-arm: Fix typo in comment (seperately -> separately) target-tricore: Fix new typos migration/qemu-file.c: Don't shift left into sign bit translate-all: Mark map_exec() with the 'unused' attribute tests/hd-geo-test.c: Remove unused test_image variable vt82c686: avoid out-of-bounds read Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
df58887b20
4
Makefile
4
Makefile
@ -313,8 +313,8 @@ qemu-%.tar.bz2:
|
|||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi
|
rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi
|
||||||
rm -f config-all-devices.mak config-all-disas.mak
|
rm -f config-all-devices.mak config-all-disas.mak config.status
|
||||||
rm -f po/*.mo
|
rm -f po/*.mo tests/qemu-iotests/common.env
|
||||||
rm -f roms/seabios/config.mak roms/vgabios/config.mak
|
rm -f roms/seabios/config.mak roms/vgabios/config.mak
|
||||||
rm -f qemu-doc.info qemu-doc.aux qemu-doc.cp qemu-doc.cps qemu-doc.dvi
|
rm -f qemu-doc.info qemu-doc.aux qemu-doc.cp qemu-doc.cps qemu-doc.dvi
|
||||||
rm -f qemu-doc.fn qemu-doc.fns qemu-doc.info qemu-doc.ky qemu-doc.kys
|
rm -f qemu-doc.fn qemu-doc.fns qemu-doc.info qemu-doc.ky qemu-doc.kys
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include "qemu-common.h"
|
#include "qemu-common.h"
|
||||||
#include "ui/console.h"
|
#include "ui/console.h"
|
||||||
#include "hw/devices.h"
|
#include "hw/devices.h"
|
||||||
#include "vga_int.h"
|
|
||||||
#include "ui/pixel_ops.h"
|
#include "ui/pixel_ops.h"
|
||||||
|
|
||||||
typedef void (*blizzard_fn_t)(uint8_t *, const uint8_t *, unsigned int);
|
typedef void (*blizzard_fn_t)(uint8_t *, const uint8_t *, unsigned int);
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
typedef struct SuperIOConfig
|
typedef struct SuperIOConfig
|
||||||
{
|
{
|
||||||
uint8_t config[0xff];
|
uint8_t config[0x100];
|
||||||
uint8_t index;
|
uint8_t index;
|
||||||
uint8_t data;
|
uint8_t data;
|
||||||
} SuperIOConfig;
|
} SuperIOConfig;
|
||||||
|
@ -52,7 +52,7 @@ typedef void (*hotplug_fn)(HotplugHandler *plug_handler,
|
|||||||
* require asynchronous unplug handling.
|
* require asynchronous unplug handling.
|
||||||
* @unplug: unplug callback.
|
* @unplug: unplug callback.
|
||||||
* Used for device removal with devices that implement
|
* Used for device removal with devices that implement
|
||||||
* asynchronous and synchronous (suprise) removal.
|
* asynchronous and synchronous (surprise) removal.
|
||||||
*/
|
*/
|
||||||
typedef struct HotplugHandlerClass {
|
typedef struct HotplugHandlerClass {
|
||||||
/* <private> */
|
/* <private> */
|
||||||
|
@ -503,7 +503,7 @@ unsigned int qemu_get_be16(QEMUFile *f)
|
|||||||
unsigned int qemu_get_be32(QEMUFile *f)
|
unsigned int qemu_get_be32(QEMUFile *f)
|
||||||
{
|
{
|
||||||
unsigned int v;
|
unsigned int v;
|
||||||
v = qemu_get_byte(f) << 24;
|
v = (unsigned int)qemu_get_byte(f) << 24;
|
||||||
v |= qemu_get_byte(f) << 16;
|
v |= qemu_get_byte(f) << 16;
|
||||||
v |= qemu_get_byte(f) << 8;
|
v |= qemu_get_byte(f) << 8;
|
||||||
v |= qemu_get_byte(f);
|
v |= qemu_get_byte(f);
|
||||||
|
@ -1402,6 +1402,7 @@ static CharDriverState *qemu_chr_open_pty(const char *id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
close(slave_fd);
|
close(slave_fd);
|
||||||
|
qemu_set_nonblock(master_fd);
|
||||||
|
|
||||||
chr = qemu_chr_alloc();
|
chr = qemu_chr_alloc();
|
||||||
|
|
||||||
|
@ -972,7 +972,7 @@ static const ARMCPRegInfo v7_cp_reginfo[] = {
|
|||||||
* The override is necessary because of the overly-broad TLB_LOCKDOWN
|
* The override is necessary because of the overly-broad TLB_LOCKDOWN
|
||||||
* definition.
|
* definition.
|
||||||
*/
|
*/
|
||||||
/* MAIR0/1 are defined seperately from their 64-bit counterpart which
|
/* MAIR0/1 are defined separately from their 64-bit counterpart which
|
||||||
* allows them to assign the correct fieldoffset based on the endianness
|
* allows them to assign the correct fieldoffset based on the endianness
|
||||||
* handled in the field definitions.
|
* handled in the field definitions.
|
||||||
*/
|
*/
|
||||||
|
@ -1320,7 +1320,7 @@ static void dec_sys(DisasContext *dc, uint32_t insn)
|
|||||||
#ifdef OPENRISC_DISAS
|
#ifdef OPENRISC_DISAS
|
||||||
uint32_t K16;
|
uint32_t K16;
|
||||||
#endif
|
#endif
|
||||||
op0 = extract32(insn, 16, 8);
|
op0 = extract32(insn, 16, 10);
|
||||||
#ifdef OPENRISC_DISAS
|
#ifdef OPENRISC_DISAS
|
||||||
K16 = extract32(insn, 0, 16);
|
K16 = extract32(insn, 0, 16);
|
||||||
#endif
|
#endif
|
||||||
|
@ -90,7 +90,7 @@ A(0xE200, CPM0, TRICORE_FEATURE_13)
|
|||||||
A(0xE280, CPM1, TRICORE_FEATURE_13)
|
A(0xE280, CPM1, TRICORE_FEATURE_13)
|
||||||
A(0xE300, CPM2, TRICORE_FEATURE_13)
|
A(0xE300, CPM2, TRICORE_FEATURE_13)
|
||||||
A(0xE380, CPM3, TRICORE_FEATURE_13)
|
A(0xE380, CPM3, TRICORE_FEATURE_13)
|
||||||
/* memory Managment Registers */
|
/* memory management registers */
|
||||||
A(0x8000, MMU_CON, TRICORE_FEATURE_13)
|
A(0x8000, MMU_CON, TRICORE_FEATURE_13)
|
||||||
A(0x8004, MMU_ASI, TRICORE_FEATURE_13)
|
A(0x8004, MMU_ASI, TRICORE_FEATURE_13)
|
||||||
A(0x800C, MMU_TVA, TRICORE_FEATURE_13)
|
A(0x800C, MMU_TVA, TRICORE_FEATURE_13)
|
||||||
|
@ -5022,7 +5022,7 @@ static void decode_32Bit_opc(CPUTriCoreState *env, DisasContext *ctx)
|
|||||||
case OPCM_32_RR_LOGICAL_SHIFT:
|
case OPCM_32_RR_LOGICAL_SHIFT:
|
||||||
decode_rr_logical_shift(env, ctx);
|
decode_rr_logical_shift(env, ctx);
|
||||||
break;
|
break;
|
||||||
case OPCM_32_RR_ADRESS:
|
case OPCM_32_RR_ADDRESS:
|
||||||
decode_rr_address(env, ctx);
|
decode_rr_address(env, ctx);
|
||||||
break;
|
break;
|
||||||
case OPCM_32_RR_IDIRECT:
|
case OPCM_32_RR_IDIRECT:
|
||||||
|
@ -503,7 +503,7 @@ enum {
|
|||||||
/* RR Format */
|
/* RR Format */
|
||||||
OPCM_32_RR_LOGICAL_SHIFT = 0x0f,
|
OPCM_32_RR_LOGICAL_SHIFT = 0x0f,
|
||||||
OPCM_32_RR_ACCUMULATOR = 0x0b,
|
OPCM_32_RR_ACCUMULATOR = 0x0b,
|
||||||
OPCM_32_RR_ADRESS = 0x01,
|
OPCM_32_RR_ADDRESS = 0x01,
|
||||||
OPCM_32_RR_DIVIDE = 0x4b,
|
OPCM_32_RR_DIVIDE = 0x4b,
|
||||||
OPCM_32_RR_IDIRECT = 0x2d,
|
OPCM_32_RR_IDIRECT = 0x2d,
|
||||||
/* RR1 Format */
|
/* RR1 Format */
|
||||||
@ -1082,7 +1082,7 @@ enum {
|
|||||||
OPC2_32_RR_XOR_LT_U = 0x32,
|
OPC2_32_RR_XOR_LT_U = 0x32,
|
||||||
OPC2_32_RR_XOR_NE = 0x30,
|
OPC2_32_RR_XOR_NE = 0x30,
|
||||||
};
|
};
|
||||||
/* OPCM_32_RR_ADRESS */
|
/* OPCM_32_RR_ADDRESS */
|
||||||
enum {
|
enum {
|
||||||
OPC2_32_RR_ADD_A = 0x01,
|
OPC2_32_RR_ADD_A = 0x01,
|
||||||
OPC2_32_RR_ADDSC_A = 0x60,
|
OPC2_32_RR_ADDSC_A = 0x60,
|
||||||
|
@ -1289,7 +1289,7 @@ static void ahci_test_identify(QPCIDevice *ahci, void *hba_base)
|
|||||||
PX_WREG(i, AHCI_PX_IS, reg);
|
PX_WREG(i, AHCI_PX_IS, reg);
|
||||||
g_assert_cmphex(PX_RREG(i, AHCI_PX_IS), ==, 0);
|
g_assert_cmphex(PX_RREG(i, AHCI_PX_IS), ==, 0);
|
||||||
|
|
||||||
/* Wipe the FIS-Recieve Buffer */
|
/* Wipe the FIS-Receive Buffer */
|
||||||
fb = PX_RREG(i, AHCI_PX_FB);
|
fb = PX_RREG(i, AHCI_PX_FB);
|
||||||
g_assert_cmphex(fb, !=, 0);
|
g_assert_cmphex(fb, !=, 0);
|
||||||
qmemset(fb, 0x00, 0x100);
|
qmemset(fb, 0x00, 0x100);
|
||||||
|
@ -22,8 +22,6 @@
|
|||||||
#include "qemu-common.h"
|
#include "qemu-common.h"
|
||||||
#include "libqtest.h"
|
#include "libqtest.h"
|
||||||
|
|
||||||
static const char test_image[] = "/tmp/qtest.XXXXXX";
|
|
||||||
|
|
||||||
static char *create_test_img(int secs)
|
static char *create_test_img(int secs)
|
||||||
{
|
{
|
||||||
char *template = strdup("/tmp/qtest.XXXXXX");
|
char *template = strdup("/tmp/qtest.XXXXXX");
|
||||||
|
@ -276,14 +276,14 @@ bool cpu_restore_state(CPUState *cpu, uintptr_t retaddr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
static inline void map_exec(void *addr, long size)
|
static __attribute__((unused)) void map_exec(void *addr, long size)
|
||||||
{
|
{
|
||||||
DWORD old_protect;
|
DWORD old_protect;
|
||||||
VirtualProtect(addr, size,
|
VirtualProtect(addr, size,
|
||||||
PAGE_EXECUTE_READWRITE, &old_protect);
|
PAGE_EXECUTE_READWRITE, &old_protect);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static inline void map_exec(void *addr, long size)
|
static __attribute__((unused)) void map_exec(void *addr, long size)
|
||||||
{
|
{
|
||||||
unsigned long start, end, page_size;
|
unsigned long start, end, page_size;
|
||||||
|
|
||||||
|
38
vl.c
38
vl.c
@ -2873,7 +2873,7 @@ int main(int argc, char **argv, char **envp)
|
|||||||
if (optind >= argc)
|
if (optind >= argc)
|
||||||
break;
|
break;
|
||||||
if (argv[optind][0] != '-') {
|
if (argv[optind][0] != '-') {
|
||||||
hda_opts = drive_add(IF_DEFAULT, 0, argv[optind++], HD_OPTS);
|
hda_opts = drive_add(IF_DEFAULT, 0, argv[optind++], HD_OPTS);
|
||||||
} else {
|
} else {
|
||||||
const QEMUOption *popt;
|
const QEMUOption *popt;
|
||||||
|
|
||||||
@ -2918,15 +2918,15 @@ int main(int argc, char **argv, char **envp)
|
|||||||
if (drive_def(optarg) == NULL) {
|
if (drive_def(optarg) == NULL) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QEMU_OPTION_set:
|
case QEMU_OPTION_set:
|
||||||
if (qemu_set_option(optarg) != 0)
|
if (qemu_set_option(optarg) != 0)
|
||||||
exit(1);
|
exit(1);
|
||||||
break;
|
break;
|
||||||
case QEMU_OPTION_global:
|
case QEMU_OPTION_global:
|
||||||
if (qemu_global_option(optarg) != 0)
|
if (qemu_global_option(optarg) != 0)
|
||||||
exit(1);
|
exit(1);
|
||||||
break;
|
break;
|
||||||
case QEMU_OPTION_mtdblock:
|
case QEMU_OPTION_mtdblock:
|
||||||
drive_add(IF_MTD, -1, optarg, MTD_OPTS);
|
drive_add(IF_MTD, -1, optarg, MTD_OPTS);
|
||||||
break;
|
break;
|
||||||
@ -2978,7 +2978,7 @@ int main(int argc, char **argv, char **envp)
|
|||||||
fprintf(stderr, "qemu: invalid physical CHS format\n");
|
fprintf(stderr, "qemu: invalid physical CHS format\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
if (hda_opts != NULL) {
|
if (hda_opts != NULL) {
|
||||||
char num[16];
|
char num[16];
|
||||||
snprintf(num, sizeof(num), "%d", cyls);
|
snprintf(num, sizeof(num), "%d", cyls);
|
||||||
qemu_opt_set(hda_opts, "cyls", num);
|
qemu_opt_set(hda_opts, "cyls", num);
|
||||||
@ -3152,9 +3152,9 @@ int main(int argc, char **argv, char **envp)
|
|||||||
case QEMU_OPTION_S:
|
case QEMU_OPTION_S:
|
||||||
autostart = 0;
|
autostart = 0;
|
||||||
break;
|
break;
|
||||||
case QEMU_OPTION_k:
|
case QEMU_OPTION_k:
|
||||||
keyboard_layout = optarg;
|
keyboard_layout = optarg;
|
||||||
break;
|
break;
|
||||||
case QEMU_OPTION_localtime:
|
case QEMU_OPTION_localtime:
|
||||||
rtc_utc = 0;
|
rtc_utc = 0;
|
||||||
break;
|
break;
|
||||||
@ -3362,9 +3362,9 @@ int main(int argc, char **argv, char **envp)
|
|||||||
case QEMU_OPTION_debugcon:
|
case QEMU_OPTION_debugcon:
|
||||||
add_device_config(DEV_DEBUGCON, optarg);
|
add_device_config(DEV_DEBUGCON, optarg);
|
||||||
break;
|
break;
|
||||||
case QEMU_OPTION_loadvm:
|
case QEMU_OPTION_loadvm:
|
||||||
loadvm = optarg;
|
loadvm = optarg;
|
||||||
break;
|
break;
|
||||||
case QEMU_OPTION_full_screen:
|
case QEMU_OPTION_full_screen:
|
||||||
full_screen = 1;
|
full_screen = 1;
|
||||||
break;
|
break;
|
||||||
@ -3476,7 +3476,7 @@ int main(int argc, char **argv, char **envp)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case QEMU_OPTION_vnc:
|
case QEMU_OPTION_vnc:
|
||||||
#ifdef CONFIG_VNC
|
#ifdef CONFIG_VNC
|
||||||
display_remote++;
|
display_remote++;
|
||||||
vnc_display = optarg;
|
vnc_display = optarg;
|
||||||
@ -3514,11 +3514,11 @@ int main(int argc, char **argv, char **envp)
|
|||||||
}
|
}
|
||||||
qemu_uuid_set = true;
|
qemu_uuid_set = true;
|
||||||
break;
|
break;
|
||||||
case QEMU_OPTION_option_rom:
|
case QEMU_OPTION_option_rom:
|
||||||
if (nb_option_roms >= MAX_OPTION_ROMS) {
|
if (nb_option_roms >= MAX_OPTION_ROMS) {
|
||||||
fprintf(stderr, "Too many option ROMs\n");
|
fprintf(stderr, "Too many option ROMs\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
opts = qemu_opts_parse(qemu_find_opts("option-rom"), optarg, 1);
|
opts = qemu_opts_parse(qemu_find_opts("option-rom"), optarg, 1);
|
||||||
if (!opts) {
|
if (!opts) {
|
||||||
exit(1);
|
exit(1);
|
||||||
@ -3530,8 +3530,8 @@ int main(int argc, char **argv, char **envp)
|
|||||||
fprintf(stderr, "Option ROM file is not specified\n");
|
fprintf(stderr, "Option ROM file is not specified\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
nb_option_roms++;
|
nb_option_roms++;
|
||||||
break;
|
break;
|
||||||
case QEMU_OPTION_semihosting:
|
case QEMU_OPTION_semihosting:
|
||||||
semihosting_enabled = 1;
|
semihosting_enabled = 1;
|
||||||
semihosting_target = SEMIHOSTING_TARGET_AUTO;
|
semihosting_target = SEMIHOSTING_TARGET_AUTO;
|
||||||
|
Loading…
Reference in New Issue
Block a user