trivial patches for 2016-10-28

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABCAAGBQJYE2wfAAoJEHAbT2saaT5ZGYUH/3QWJ4OFWbqGo1YYN5AIAheF
 v1bQGTh1HGbLk46ajhUvzB0bMHb1FC1KoOruU2wFYuKK/J5zQ+4X9EmaC/fD7hyx
 nGTcPWAyxKOlqOq3In9ro+xWQNzEhfoypKCQQVC4Y3quzub48wAro8fuFSNXLyBq
 ERvAsjgj0TrLEHoWtJl2bPYiqSd6KAHZAKPFW3Jw8MmsBcTLmnF2PVW3LBfdcHe7
 6vlhqX7lPzVlHRaUsaxRkFxYd2YGisbe3bPRDw2fTxrtOYyEkopQq7xi2Q6Yq5N0
 z0yM2oJ7o1QtUOXYa7KBf03WZ7e119HimaUkGLg+0LVhQNbeG3hd3gNwApXa5og=
 =tYml
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-fetch' into staging

trivial patches for 2016-10-28

# gpg: Signature made Fri 28 Oct 2016 16:17:51 BST
# gpg:                using RSA key 0x701B4F6B1A693E59
# gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>"
# gpg:                 aka "Michael Tokarev <mjt@corpit.ru>"
# gpg:                 aka "Michael Tokarev <mjt@debian.org>"
# Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D  4324 457C E0A0 8044 65C5
#      Subkey fingerprint: 7B73 BAD6 8BE7 A2C2 8931  4B22 701B 4F6B 1A69 3E59

* remotes/mjt/tags/trivial-patches-fetch: (23 commits)
  Fix build for less common build directories names
  clean-up: removed duplicate #includes
  scripts/clean-includes: added duplicate #include check
  monitor: deprecate 'default' option
  qemu-ga: Remove stray 'q' in documentation
  Makefile: Fix help text for target 'installer'
  s390: avoid always-true comparison in s390_pci_generate_fid()
  migration: Remove unneeded NULL check from migrate_fd_error()
  scripts/hxtool: fix undefined behavour of echo
  qemu-options.hx: set: fix copy-paste error
  usb: Change *_exitfn return type from int to void
  MAINTAINERS: qemu-trivial information
  colo-compare: remove unused struct CompareChardevProps and 'props' variable
  milkymist-pfpu: fix potential integer overflow
  hw/block/nvme: Simplify if-statements a little bit
  target-lm32: rewrite gen_compare()
  lm32: milkymist-tmu2: fix integer overflow
  target-lm32: disable asm logging via LOG_DIS()
  target-lm32: swap operand of wcsr in LOG_DIS()
  target-lm32: fix LOG_DIS operand order
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2016-10-31 11:58:30 +00:00
commit 277d44f5a6
48 changed files with 121 additions and 148 deletions

View File

@ -63,6 +63,17 @@ W: http://wiki.qemu.org/SecurityProcess
M: Michael S. Tsirkin <mst@redhat.com> M: Michael S. Tsirkin <mst@redhat.com>
L: secalert@redhat.com L: secalert@redhat.com
Trivial patches
---------------
Trivial patches
M: Michael Tokarev <mjt@tls.msk.ru>
M: Laurent Vivier <laurent@vivier.eu>
S: Maintained
L: qemu-trivial@nongnu.org
K: ^Subject:.*(?i)trivial
T: git git://git.corpit.ru/qemu.git trivial-patches
T: git git://github.com/vivier/qemu.git trivial-patches
Guest CPU cores (TCG): Guest CPU cores (TCG):
---------------------- ----------------------
Overall Overall

View File

@ -695,7 +695,7 @@ help:
@echo '' @echo ''
ifdef CONFIG_WIN32 ifdef CONFIG_WIN32
@echo 'Windows targets:' @echo 'Windows targets:'
@echo ' installer - Build NSIS-based installer for qemu-ga' @echo ' installer - Build NSIS-based installer for QEMU'
ifdef QEMU_GA_MSI_ENABLED ifdef QEMU_GA_MSI_ENABLED
@echo ' msi - Build MSI-based installer for qemu-ga' @echo ' msi - Build MSI-based installer for qemu-ga'
endif endif

View File

@ -33,7 +33,6 @@
#include "sysemu/qtest.h" #include "sysemu/qtest.h"
#include "hw/xen/xen.h" #include "hw/xen/xen.h"
#include "qom/object.h" #include "qom/object.h"
#include "hw/boards.h"
int tcg_tb_size; int tcg_tb_size;
static bool tcg_allowed = true; static bool tcg_allowed = true;

View File

@ -26,7 +26,6 @@
#include "exec/cputlb.h" #include "exec/cputlb.h"
#include "exec/memory-internal.h" #include "exec/memory-internal.h"
#include "exec/ram_addr.h" #include "exec/ram_addr.h"
#include "exec/exec-all.h"
#include "tcg/tcg.h" #include "tcg/tcg.h"
#include "qemu/error-report.h" #include "qemu/error-report.h"
#include "exec/log.h" #include "exec/log.h"

View File

@ -31,7 +31,6 @@
#define MAX_PACKET_LENGTH 4096 #define MAX_PACKET_LENGTH 4096
#include "cpu.h"
#include "qemu/sockets.h" #include "qemu/sockets.h"
#include "sysemu/kvm.h" #include "sysemu/kvm.h"
#include "exec/semihost.h" #include "exec/semihost.h"

View File

@ -375,7 +375,7 @@ static uint16_t nvme_create_sq(NvmeCtrl *n, NvmeCmd *cmd)
if (!cqid || nvme_check_cqid(n, cqid)) { if (!cqid || nvme_check_cqid(n, cqid)) {
return NVME_INVALID_CQID | NVME_DNR; return NVME_INVALID_CQID | NVME_DNR;
} }
if (!sqid || (sqid && !nvme_check_sqid(n, sqid))) { if (!sqid || !nvme_check_sqid(n, sqid)) {
return NVME_INVALID_QID | NVME_DNR; return NVME_INVALID_QID | NVME_DNR;
} }
if (!qsize || qsize > NVME_CAP_MQES(n->bar.cap)) { if (!qsize || qsize > NVME_CAP_MQES(n->bar.cap)) {
@ -449,7 +449,7 @@ static uint16_t nvme_create_cq(NvmeCtrl *n, NvmeCmd *cmd)
uint16_t qflags = le16_to_cpu(c->cq_flags); uint16_t qflags = le16_to_cpu(c->cq_flags);
uint64_t prp1 = le64_to_cpu(c->prp1); uint64_t prp1 = le64_to_cpu(c->prp1);
if (!cqid || (cqid && !nvme_check_cqid(n, cqid))) { if (!cqid || !nvme_check_cqid(n, cqid)) {
return NVME_INVALID_CQID | NVME_DNR; return NVME_INVALID_CQID | NVME_DNR;
} }
if (!qsize || qsize > NVME_CAP_MQES(n->bar.cap)) { if (!qsize || qsize > NVME_CAP_MQES(n->bar.cap)) {

View File

@ -213,7 +213,7 @@ static void tmu2_start(MilkymistTMU2State *s)
/* Read the QEMU source framebuffer into an OpenGL texture */ /* Read the QEMU source framebuffer into an OpenGL texture */
glGenTextures(1, &texture); glGenTextures(1, &texture);
glBindTexture(GL_TEXTURE_2D, texture); glBindTexture(GL_TEXTURE_2D, texture);
fb_len = 2*s->regs[R_TEXHRES]*s->regs[R_TEXVRES]; fb_len = 2ULL * s->regs[R_TEXHRES] * s->regs[R_TEXVRES];
fb = cpu_physical_memory_map(s->regs[R_TEXFBUF], &fb_len, 0); fb = cpu_physical_memory_map(s->regs[R_TEXFBUF], &fb_len, 0);
if (fb == NULL) { if (fb == NULL) {
glDeleteTextures(1, &texture); glDeleteTextures(1, &texture);

View File

@ -53,7 +53,6 @@
#include "hw/pci/pci_bus.h" #include "hw/pci/pci_bus.h"
#include "hw/pci-host/q35.h" #include "hw/pci-host/q35.h"
#include "hw/i386/x86-iommu.h" #include "hw/i386/x86-iommu.h"
#include "hw/timer/hpet.h"
#include "hw/acpi/aml-build.h" #include "hw/acpi/aml-build.h"

View File

@ -30,7 +30,6 @@
#include "qemu/option.h" #include "qemu/option.h"
#include "qemu/config-file.h" #include "qemu/config-file.h"
#include "qemu/error-report.h" #include "qemu/error-report.h"
#include "qemu-common.h"
#include "sysemu/device_tree.h" #include "sysemu/device_tree.h"
#include "sysemu/sysemu.h" #include "sysemu/sysemu.h"
#include "hw/loader.h" #include "hw/loader.h"

View File

@ -47,7 +47,6 @@
#include "elf.h" #include "elf.h"
#include "hw/timer/mc146818rtc.h" #include "hw/timer/mc146818rtc.h"
#include "hw/timer/i8254.h" #include "hw/timer/i8254.h"
#include "sysemu/block-backend.h"
#include "sysemu/blockdev.h" #include "sysemu/blockdev.h"
#include "exec/address-spaces.h" #include "exec/address-spaces.h"
#include "hw/sysbus.h" /* SysBusDevice */ #include "hw/sysbus.h" /* SysBusDevice */

View File

@ -137,7 +137,7 @@ struct MilkymistPFPUState {
}; };
typedef struct MilkymistPFPUState MilkymistPFPUState; typedef struct MilkymistPFPUState MilkymistPFPUState;
static inline hwaddr static inline uint32_t
get_dma_address(uint32_t base, uint32_t x, uint32_t y) get_dma_address(uint32_t base, uint32_t x, uint32_t y)
{ {
return base + 8 * (128 * y + x); return base + 8 * (128 * y + x);

View File

@ -29,7 +29,6 @@
#include "hw/isa/isa.h" #include "hw/isa/isa.h"
#include "hw/nvram/fw_cfg.h" #include "hw/nvram/fw_cfg.h"
#include "hw/sysbus.h" #include "hw/sysbus.h"
#include "hw/boards.h"
#include "trace.h" #include "trace.h"
#include "qemu/error-report.h" #include "qemu/error-report.h"
#include "qemu/config-file.h" #include "qemu/config-file.h"

View File

@ -15,7 +15,6 @@
#include "hw/pci/pci.h" #include "hw/pci/pci.h"
#include "hw/pci/pci_bus.h" #include "hw/pci/pci_bus.h"
#include "hw/pci/pci_host.h" #include "hw/pci/pci_host.h"
#include "hw/pci/pci_bus.h"
#include "hw/pci/pci_bridge.h" #include "hw/pci/pci_bridge.h"
#include "hw/i386/pc.h" #include "hw/i386/pc.h"
#include "qemu/range.h" #include "qemu/range.h"

View File

@ -37,7 +37,6 @@
#include "qemu/log.h" #include "qemu/log.h"
#include "qemu/error-report.h" #include "qemu/error-report.h"
#include "hw/loader.h" #include "hw/loader.h"
#include "sysemu/block-backend.h"
#include "sysemu/blockdev.h" #include "sysemu/blockdev.h"
#include "exec/address-spaces.h" #include "exec/address-spaces.h"

View File

@ -37,7 +37,6 @@
#include "sysemu/block-backend.h" #include "sysemu/block-backend.h"
#include "sysemu/cpus.h" #include "sysemu/cpus.h"
#include "sysemu/kvm.h" #include "sysemu/kvm.h"
#include "sysemu/device_tree.h"
#include "kvm_ppc.h" #include "kvm_ppc.h"
#include "migration/migration.h" #include "migration/migration.h"
#include "mmu-hash64.h" #include "mmu-hash64.h"

View File

@ -809,17 +809,11 @@ static uint32_t s390_pci_generate_fid(Error **errp)
{ {
uint32_t fid = 0; uint32_t fid = 0;
while (fid <= ZPCI_MAX_FID) { do {
if (!s390_pci_find_dev_by_fid(fid)) { if (!s390_pci_find_dev_by_fid(fid)) {
return fid; return fid;
} }
} while (fid++ != ZPCI_MAX_FID);
if (fid == ZPCI_MAX_FID) {
break;
}
fid++;
}
error_setg(errp, "no free fid could be found"); error_setg(errp, "no free fid could be found");
return 0; return 0;

View File

@ -26,7 +26,6 @@
#include "hw/sysbus.h" #include "hw/sysbus.h"
#include "qemu/timer.h" #include "qemu/timer.h"
#include "hw/ptimer.h" #include "hw/ptimer.h"
#include "qemu/timer.h"
#include "qemu/main-loop.h" #include "qemu/main-loop.h"
#include "trace.h" #include "trace.h"

View File

@ -165,8 +165,7 @@ static int tpm_passthrough_unix_tx_bufs(TPMPassthruState *tpm_pt,
ret = tpm_passthrough_unix_write(tpm_pt->tpm_fd, in, in_len); ret = tpm_passthrough_unix_write(tpm_pt->tpm_fd, in, in_len);
if (ret != in_len) { if (ret != in_len) {
if (!tpm_pt->tpm_op_canceled || if (!tpm_pt->tpm_op_canceled || errno != ECANCELED) {
(tpm_pt->tpm_op_canceled && errno != ECANCELED)) {
error_report("tpm_passthrough: error while transmitting data " error_report("tpm_passthrough: error while transmitting data "
"to TPM: %s (%i)", "to TPM: %s (%i)",
strerror(errno), errno); strerror(errno), errno);
@ -178,8 +177,7 @@ static int tpm_passthrough_unix_tx_bufs(TPMPassthruState *tpm_pt,
ret = tpm_passthrough_unix_read(tpm_pt->tpm_fd, out, out_len); ret = tpm_passthrough_unix_read(tpm_pt->tpm_fd, out, out_len);
if (ret < 0) { if (ret < 0) {
if (!tpm_pt->tpm_op_canceled || if (!tpm_pt->tpm_op_canceled || errno != ECANCELED) {
(tpm_pt->tpm_op_canceled && errno != ECANCELED)) {
error_report("tpm_passthrough: error while reading data from " error_report("tpm_passthrough: error while reading data from "
"TPM: %s (%i)", "TPM: %s (%i)",
strerror(errno), errno); strerror(errno), errno);

View File

@ -34,7 +34,6 @@
#include "qapi/error.h" #include "qapi/error.h"
#include "qemu-common.h" #include "qemu-common.h"
#include "qemu/main-loop.h" #include "qemu/main-loop.h"
#include "sysemu/tpm_backend.h"
#define DEBUG_TIS 0 #define DEBUG_TIS 0

View File

@ -13,7 +13,6 @@
#include "qapi/error.h" #include "qapi/error.h"
#include "qemu-common.h" #include "qemu-common.h"
#include "cpu.h" #include "cpu.h"
#include "qemu-common.h"
#include "ui/console.h" #include "ui/console.h"
#include "elf.h" #include "elf.h"
#include "exec/address-spaces.h" #include "exec/address-spaces.h"

View File

@ -547,7 +547,7 @@ static int emulated_initfn(CCIDCardState *base)
return 0; return 0;
} }
static int emulated_exitfn(CCIDCardState *base) static void emulated_exitfn(CCIDCardState *base)
{ {
EmulatedState *card = EMULATED_CCID_CARD(base); EmulatedState *card = EMULATED_CCID_CARD(base);
VEvent *vevent = vevent_new(VEVENT_LAST, NULL, NULL); VEvent *vevent = vevent_new(VEVENT_LAST, NULL, NULL);
@ -564,7 +564,6 @@ static int emulated_exitfn(CCIDCardState *base)
qemu_mutex_destroy(&card->handle_apdu_mutex); qemu_mutex_destroy(&card->handle_apdu_mutex);
qemu_mutex_destroy(&card->vreader_mutex); qemu_mutex_destroy(&card->vreader_mutex);
qemu_mutex_destroy(&card->event_list_mutex); qemu_mutex_destroy(&card->event_list_mutex);
return 0;
} }
static Property emulated_card_properties[] = { static Property emulated_card_properties[] = {

View File

@ -365,11 +365,6 @@ static int passthru_initfn(CCIDCardState *base)
return 0; return 0;
} }
static int passthru_exitfn(CCIDCardState *base)
{
return 0;
}
static VMStateDescription passthru_vmstate = { static VMStateDescription passthru_vmstate = {
.name = "ccid-card-passthru", .name = "ccid-card-passthru",
.version_id = 1, .version_id = 1,
@ -396,7 +391,6 @@ static void passthru_class_initfn(ObjectClass *klass, void *data)
CCIDCardClass *cc = CCID_CARD_CLASS(klass); CCIDCardClass *cc = CCID_CARD_CLASS(klass);
cc->initfn = passthru_initfn; cc->initfn = passthru_initfn;
cc->exitfn = passthru_exitfn;
cc->get_atr = passthru_get_atr; cc->get_atr = passthru_get_atr;
cc->apdu_from_guest = passthru_apdu_from_guest; cc->apdu_from_guest = passthru_apdu_from_guest;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories); set_bit(DEVICE_CATEGORY_INPUT, dc->categories);

View File

@ -33,7 +33,7 @@ typedef struct CCIDCardClass {
void (*apdu_from_guest)(CCIDCardState *card, void (*apdu_from_guest)(CCIDCardState *card,
const uint8_t *apdu, const uint8_t *apdu,
uint32_t len); uint32_t len);
int (*exitfn)(CCIDCardState *card); void (*exitfn)(CCIDCardState *card);
int (*initfn)(CCIDCardState *card); int (*initfn)(CCIDCardState *card);
} CCIDCardClass; } CCIDCardClass;

View File

@ -17,7 +17,6 @@
#include <sys/statvfs.h> #include <sys/statvfs.h>
#ifdef CONFIG_INOTIFY1 #ifdef CONFIG_INOTIFY1
#include <sys/inotify.h> #include <sys/inotify.h>
#include "qapi/error.h"
#include "qemu/main-loop.h" #include "qemu/main-loop.h"
#endif #endif

View File

@ -508,14 +508,14 @@ static void ccid_card_apdu_from_guest(CCIDCardState *card,
} }
} }
static int ccid_card_exitfn(CCIDCardState *card) static void ccid_card_exitfn(CCIDCardState *card)
{ {
CCIDCardClass *cc = CCID_CARD_GET_CLASS(card); CCIDCardClass *cc = CCID_CARD_GET_CLASS(card);
if (cc->exitfn) { if (cc->exitfn) {
return cc->exitfn(card); cc->exitfn(card);
} }
return 0;
} }
static int ccid_card_initfn(CCIDCardState *card) static int ccid_card_initfn(CCIDCardState *card)
@ -1279,7 +1279,6 @@ void ccid_card_card_inserted(CCIDCardState *card)
static int ccid_card_exit(DeviceState *qdev) static int ccid_card_exit(DeviceState *qdev)
{ {
int ret = 0;
CCIDCardState *card = CCID_CARD(qdev); CCIDCardState *card = CCID_CARD(qdev);
USBDevice *dev = USB_DEVICE(qdev->parent_bus->parent); USBDevice *dev = USB_DEVICE(qdev->parent_bus->parent);
USBCCIDState *s = USB_CCID_DEV(dev); USBCCIDState *s = USB_CCID_DEV(dev);
@ -1287,9 +1286,9 @@ static int ccid_card_exit(DeviceState *qdev)
if (ccid_card_inserted(s)) { if (ccid_card_inserted(s)) {
ccid_card_card_removed(card); ccid_card_card_removed(card);
} }
ret = ccid_card_exitfn(card); ccid_card_exitfn(card);
s->card = NULL; s->card = NULL;
return ret; return 0;
} }
static int ccid_card_init(DeviceState *qdev) static int ccid_card_init(DeviceState *qdev)

View File

@ -13,7 +13,6 @@
#include "qemu/bitmap.h" #include "qemu/bitmap.h"
#include "sysemu/sysemu.h" #include "sysemu/sysemu.h"
#include "hw/pci/pci.h" #include "hw/pci/pci.h"
#include "hw/boards.h"
#include "hw/compat.h" #include "hw/compat.h"
#include "hw/mem/pc-dimm.h" #include "hw/mem/pc-dimm.h"
#include "hw/mem/nvdimm.h" #include "hw/mem/nvdimm.h"

View File

@ -9,7 +9,7 @@
extern Monitor *cur_mon; extern Monitor *cur_mon;
/* flags for monitor_init */ /* flags for monitor_init */
#define MONITOR_IS_DEFAULT 0x01 /* 0x01 unused */
#define MONITOR_USE_READLINE 0x02 #define MONITOR_USE_READLINE 0x02
#define MONITOR_USE_CONTROL 0x04 #define MONITOR_USE_CONTROL 0x04
#define MONITOR_USE_PRETTY 0x08 #define MONITOR_USE_PRETTY 0x08

View File

@ -922,7 +922,7 @@ static void migrate_fd_cleanup(void *opaque)
void migrate_fd_error(MigrationState *s, const Error *error) void migrate_fd_error(MigrationState *s, const Error *error)
{ {
trace_migrate_fd_error(error ? error_get_pretty(error) : ""); trace_migrate_fd_error(error_get_pretty(error));
assert(s->to_dst_file == NULL); assert(s->to_dst_file == NULL);
migrate_set_state(&s->state, MIGRATION_STATUS_SETUP, migrate_set_state(&s->state, MIGRATION_STATUS_SETUP,
MIGRATION_STATUS_FAILED); MIGRATION_STATUS_FAILED);

View File

@ -59,7 +59,6 @@
#include "qapi/qmp/json-streamer.h" #include "qapi/qmp/json-streamer.h"
#include "qapi/qmp/json-parser.h" #include "qapi/qmp/json-parser.h"
#include "qom/object_interfaces.h" #include "qom/object_interfaces.h"
#include "cpu.h"
#include "trace.h" #include "trace.h"
#include "trace/control.h" #include "trace/control.h"
#include "monitor/hmp-target.h" #include "monitor/hmp-target.h"
@ -76,7 +75,6 @@
#include "qapi/qmp-event.h" #include "qapi/qmp-event.h"
#include "qapi-event.h" #include "qapi-event.h"
#include "qmp-introspect.h" #include "qmp-introspect.h"
#include "sysemu/block-backend.h"
#include "sysemu/qtest.h" #include "sysemu/qtest.h"
#include "qemu/cutils.h" #include "qemu/cutils.h"
#include "qapi/qmp/dispatch.h" #include "qapi/qmp/dispatch.h"
@ -4094,7 +4092,7 @@ QemuOptsList qemu_mon_opts = {
.name = "chardev", .name = "chardev",
.type = QEMU_OPT_STRING, .type = QEMU_OPT_STRING,
},{ },{
.name = "default", .name = "default", /* deprecated */
.type = QEMU_OPT_BOOL, .type = QEMU_OPT_BOOL,
},{ },{
.name = "pretty", .name = "pretty",

View File

@ -92,10 +92,6 @@ typedef struct CompareClass {
ObjectClass parent_class; ObjectClass parent_class;
} CompareClass; } CompareClass;
typedef struct CompareChardevProps {
bool is_socket;
} CompareChardevProps;
enum { enum {
PRIMARY_IN = 0, PRIMARY_IN = 0,
SECONDARY_IN, SECONDARY_IN,
@ -572,8 +568,6 @@ static int find_and_check_chardev(CharDriverState **chr,
char *chr_name, char *chr_name,
Error **errp) Error **errp)
{ {
CompareChardevProps props;
*chr = qemu_chr_find(chr_name); *chr = qemu_chr_find(chr_name);
if (*chr == NULL) { if (*chr == NULL) {
error_setg(errp, "Device '%s' not found", error_setg(errp, "Device '%s' not found",
@ -581,8 +575,6 @@ static int find_and_check_chardev(CharDriverState **chr,
return 1; return 1;
} }
memset(&props, 0, sizeof(props));
if (!qemu_chr_has_feature(*chr, QEMU_CHAR_FEATURE_RECONNECTABLE)) { if (!qemu_chr_has_feature(*chr, QEMU_CHAR_FEATURE_RECONNECTABLE)) {
error_setg(errp, "chardev \"%s\" is not reconnectable", error_setg(errp, "chardev \"%s\" is not reconnectable",
chr_name); chr_name);

View File

@ -30,7 +30,7 @@ set user's password
@end itemize @end itemize
qemu-ga will read a system configuration file on startup (located at qemu-ga will read a system configuration file on startup (located at
q@file{/etc/qemu/qemu-ga.conf} by default), then parse remaining @file{/etc/qemu/qemu-ga.conf} by default), then parse remaining
configuration options on the command line. For the same key, the last configuration options on the command line. For the same key, the last
option wins, but the lists accumulate (see below for configuration option wins, but the lists accumulate (see below for configuration
file format). file format).

View File

@ -18,7 +18,6 @@
#include "qemu/error-report.h" #include "qemu/error-report.h"
#include "qemu/main-loop.h" #include "qemu/main-loop.h"
#include "qemu/timer.h" #include "qemu/timer.h"
#include "sysemu/block-backend.h"
#include "qemu/cutils.h" #include "qemu/cutils.h"
#define CMD_NOFILE_OK 0x01 #define CMD_NOFILE_OK 0x01

View File

@ -172,7 +172,7 @@ DEF("set", HAS_ARG, QEMU_OPTION_set,
STEXI STEXI
@item -set @var{group}.@var{id}.@var{arg}=@var{value} @item -set @var{group}.@var{id}.@var{arg}=@var{value}
@findex -set @findex -set
Set parameter @var{arg} for item @var{id} of type @var{group}\n" Set parameter @var{arg} for item @var{id} of type @var{group}
ETEXI ETEXI
DEF("global", HAS_ARG, QEMU_OPTION_global, DEF("global", HAS_ARG, QEMU_OPTION_global,
@ -2239,7 +2239,7 @@ two serial ports and the QEMU monitor:
@example @example
-chardev stdio,mux=on,id=char0 \ -chardev stdio,mux=on,id=char0 \
-mon chardev=char0,mode=readline,default \ -mon chardev=char0,mode=readline \
-serial chardev:char0 \ -serial chardev:char0 \
-serial chardev:char0 -serial chardev:char0
@end example @end example
@ -2250,7 +2250,7 @@ multiplexed between the QEMU monitor and a parallel port:
@example @example
-chardev stdio,mux=on,id=char0 \ -chardev stdio,mux=on,id=char0 \
-mon chardev=char0,mode=readline,default \ -mon chardev=char0,mode=readline \
-parallel chardev:char0 \ -parallel chardev:char0 \
-chardev tcp,...,mux=on,id=char1 \ -chardev tcp,...,mux=on,id=char1 \
-serial chardev:char1 \ -serial chardev:char1 \
@ -3112,9 +3112,9 @@ Like -qmp but uses pretty JSON formatting.
ETEXI ETEXI
DEF("mon", HAS_ARG, QEMU_OPTION_mon, \ DEF("mon", HAS_ARG, QEMU_OPTION_mon, \
"-mon [chardev=]name[,mode=readline|control][,default]\n", QEMU_ARCH_ALL) "-mon [chardev=]name[,mode=readline|control]\n", QEMU_ARCH_ALL)
STEXI STEXI
@item -mon [chardev=]name[,mode=readline|control][,default] @item -mon [chardev=]name[,mode=readline|control]
@findex -mon @findex -mon
Setup monitor on chardev @var{name}. Setup monitor on chardev @var{name}.
ETEXI ETEXI
@ -3902,7 +3902,7 @@ colo secondary:
-object filter-redirector,id=f2,netdev=hn0,queue=rx,outdev=red1 -object filter-redirector,id=f2,netdev=hn0,queue=rx,outdev=red1
-object filter-rewriter,id=rew0,netdev=hn0,queue=all -object filter-rewriter,id=rew0,netdev=hn0,queue=all
@item -object filter-dump,id=@var{id},netdev=@var{dev},file=@var{filename}][,maxlen=@var{len}] @item -object filter-dump,id=@var{id},netdev=@var{dev}[,file=@var{filename}][,maxlen=@var{len}]
Dump the network traffic on netdev @var{dev} to the file specified by Dump the network traffic on netdev @var{dev} to the file specified by
@var{filename}. At most @var{len} bytes (64k by default) per packet are stored. @var{filename}. At most @var{len} bytes (64k by default) per packet are stored.

1
qmp.c
View File

@ -36,7 +36,6 @@
#include "qom/object_interfaces.h" #include "qom/object_interfaces.h"
#include "hw/mem/pc-dimm.h" #include "hw/mem/pc-dimm.h"
#include "hw/acpi/acpi_dev_interface.h" #include "hw/acpi/acpi_dev_interface.h"
#include "qemu/uuid.h"
NameInfo *qmp_query_name(Error **errp) NameInfo *qmp_query_name(Error **errp)
{ {

View File

@ -14,15 +14,18 @@
# the top-level directory. # the top-level directory.
# Usage: # Usage:
# clean-includes [--git subjectprefix] file ... # clean-includes [--git subjectprefix] [--check-dup-head] file ...
# or # or
# clean-includes [--git subjectprefix] --all # clean-includes [--git subjectprefix] [--check-dup-head] --all
# #
# If the --git subjectprefix option is given, then after making # If the --git subjectprefix option is given, then after making
# the changes to the files this script will create a git commit # the changes to the files this script will create a git commit
# with the subject line "subjectprefix: Clean up includes" # with the subject line "subjectprefix: Clean up includes"
# and a boilerplate commit message. # and a boilerplate commit message.
# #
# If --check-dup-head is specified, additionally check for duplicate
# header includes.
#
# Using --all will cause clean-includes to run on the whole source # Using --all will cause clean-includes to run on the whole source
# tree (excluding certain directories which are known not to need # tree (excluding certain directories which are known not to need
# handling). # handling).
@ -45,11 +48,15 @@
GIT=no GIT=no
DUPHEAD=no
# Extended regular expression defining files to ignore when using --all # Extended regular expression defining files to ignore when using --all
XDIRREGEX='^(tests/tcg|tests/multiboot|pc-bios|disas/libvixl)' XDIRREGEX='^(tests/tcg|tests/multiboot|pc-bios|disas/libvixl)'
if [ $# -ne 0 ] && [ "$1" = "--git" ]; then while true
do
case $1 in
"--git")
if [ $# -eq 1 ]; then if [ $# -eq 1 ]; then
echo "--git option requires an argument" echo "--git option requires an argument"
exit 1 exit 1
@ -58,10 +65,23 @@ if [ $# -ne 0 ] && [ "$1" = "--git" ]; then
GIT=yes GIT=yes
shift shift
shift shift
fi ;;
"--check-dup-head")
DUPHEAD=yes
shift
;;
"--")
shift
break
;;
*)
break
;;
esac
done
if [ $# -eq 0 ]; then if [ $# -eq 0 ]; then
echo "Usage: clean-includes [--git subjectprefix] [--all | foo.c ...]" echo "Usage: clean-includes [--git subjectprefix] [--check-dup-head] [--all | foo.c ...]"
echo "(modifies the files in place)" echo "(modifies the files in place)"
exit 1 exit 1
fi fi
@ -91,7 +111,6 @@ cat >"$COCCIFILE" <<EOT
) )
EOT EOT
for f in "$@"; do for f in "$@"; do
case "$f" in case "$f" in
*.inc.c) *.inc.c)
@ -154,6 +173,15 @@ for f in "$@"; do
done done
if [ "$DUPHEAD" = "yes" ]; then
egrep "^[[:space:]]*#[[:space:]]*include" "$@" | tr -d '[:blank:]' \
| sort | uniq -c | awk '{if ($1 > 1) print $0}'
if [ $? -eq 0 ]; then
echo "Found duplicate header file includes. Please check the above files manually."
exit 1
fi
fi
if [ "$GIT" = "yes" ]; then if [ "$GIT" = "yes" ]; then
git add -- "$@" git add -- "$@"
git commit --signoff -F - <<EOF git commit --signoff -F - <<EOF

View File

@ -26,32 +26,32 @@ hxtotexi()
;; ;;
STEXI*) STEXI*)
if test $flag -eq 1 ; then if test $flag -eq 1 ; then
echo "line $line: syntax error: expected ETEXI, found $str" >&2 printf "line %d: syntax error: expected ETEXI, found '%s'\n" "$line" "$str" >&2
exit 1 exit 1
fi fi
flag=1 flag=1
;; ;;
ETEXI*) ETEXI*)
if test $flag -ne 1 ; then if test $flag -ne 1 ; then
echo "line $line: syntax error: expected STEXI, found $str" >&2 printf "line %d: syntax error: expected STEXI, found '%s'\n" "$line" "$str" >&2
exit 1 exit 1
fi fi
flag=0 flag=0
;; ;;
SQMP*|EQMP*) SQMP*|EQMP*)
if test $flag -eq 1 ; then if test $flag -eq 1 ; then
echo "line $line: syntax error: expected ETEXI, found $str" >&2 printf "line %d: syntax error: expected ETEXI, found '%s'\n" "$line" "$str" >&2
exit 1 exit 1
fi fi
;; ;;
DEFHEADING*) DEFHEADING*)
echo "$(expr "$str" : "DEFHEADING(\(.*\))")" printf '%s\n' "$(expr "$str" : "DEFHEADING(\(.*\))")"
;; ;;
ARCHHEADING*) ARCHHEADING*)
echo "$(expr "$str" : "ARCHHEADING(\(.*\),.*)")" printf '%s\n' "$(expr "$str" : "ARCHHEADING(\(.*\),.*)")"
;; ;;
*) *)
test $flag -eq 1 && echo "$str" test $flag -eq 1 && printf '%s\n' "$str"
;; ;;
esac esac
line=$((line+1)) line=$((line+1))
@ -69,26 +69,26 @@ hxtoqmp()
;; ;;
SQMP*) SQMP*)
if test $flag -eq 1 ; then if test $flag -eq 1 ; then
echo "line $line: syntax error: expected EQMP, found $str" >&2 printf "line %d: syntax error: expected EQMP, found '%s'\n" "$line" "$str" >&2
exit 1 exit 1
fi fi
flag=1 flag=1
;; ;;
EQMP*) EQMP*)
if test $flag -ne 1 ; then if test $flag -ne 1 ; then
echo "line $line: syntax error: expected SQMP, found $str" >&2 printf "line %d: syntax error: expected SQMP, found '%s'\n" "$line" "$str" >&2
exit 1 exit 1
fi fi
flag=0 flag=0
;; ;;
STEXI*|ETEXI*) STEXI*|ETEXI*)
if test $flag -eq 1 ; then if test $flag -eq 1 ; then
echo "line $line: syntax error: expected EQMP, found $str" >&2 printf "line %d: syntax error: expected EQMP, found '%s'\n" "$line" "$str" >&2
exit 1 exit 1
fi fi
;; ;;
*) *)
test $flag -eq 1 && echo "$str" test $flag -eq 1 && printf '%s\n' "$str"
;; ;;
esac esac
line=$((line+1)) line=$((line+1))

View File

@ -70,7 +70,7 @@ def make_group_name(filename):
if dirname == "": if dirname == "":
return "common" return "common"
return re.sub(r"/|-", "_", dirname) return re.sub(r"[^A-Za-z0-9]", "_", dirname)
def main(args): def main(args):
global _SCRIPT global _SCRIPT

View File

@ -7,10 +7,7 @@
#include "hw/i386/pc.h" #include "hw/i386/pc.h"
#include "hw/isa/isa.h" #include "hw/isa/isa.h"
#include "migration/cpu.h" #include "migration/cpu.h"
#include "exec/exec-all.h"
#include "cpu.h"
#include "exec/exec-all.h"
#include "sysemu/kvm.h" #include "sysemu/kvm.h"
#include "qemu/error-report.h" #include "qemu/error-report.h"

View File

@ -33,12 +33,14 @@
#include "exec/log.h" #include "exec/log.h"
#define DISAS_LM32 1 #define DISAS_LM32 0
#if DISAS_LM32
# define LOG_DIS(...) qemu_log_mask(CPU_LOG_TB_IN_ASM, ## __VA_ARGS__) #define LOG_DIS(...) \
#else do { \
# define LOG_DIS(...) do { } while (0) if (DISAS_LM32) { \
#endif qemu_log_mask(CPU_LOG_TB_IN_ASM, ## __VA_ARGS__); \
} \
} while (0)
#define EXTRACT_FIELD(src, start, end) \ #define EXTRACT_FIELD(src, start, end) \
(((src) >> start) & ((1 << (end - start + 1)) - 1)) (((src) >> start) & ((1 << (end - start + 1)) - 1))
@ -211,7 +213,7 @@ static void dec_and(DisasContext *dc)
static void dec_andhi(DisasContext *dc) static void dec_andhi(DisasContext *dc)
{ {
LOG_DIS("andhi r%d, r%d, %d\n", dc->r2, dc->r0, dc->imm16); LOG_DIS("andhi r%d, r%d, %d\n", dc->r1, dc->r0, dc->imm16);
tcg_gen_andi_tl(cpu_R[dc->r1], cpu_R[dc->r0], (dc->imm16 << 16)); tcg_gen_andi_tl(cpu_R[dc->r1], cpu_R[dc->r0], (dc->imm16 << 16));
} }
@ -274,7 +276,7 @@ static inline void gen_cond_branch(DisasContext *dc, int cond)
static void dec_be(DisasContext *dc) static void dec_be(DisasContext *dc)
{ {
LOG_DIS("be r%d, r%d, %d\n", dc->r0, dc->r1, LOG_DIS("be r%d, r%d, %d\n", dc->r1, dc->r0,
sign_extend(dc->imm16, 16) * 4); sign_extend(dc->imm16, 16) * 4);
gen_cond_branch(dc, TCG_COND_EQ); gen_cond_branch(dc, TCG_COND_EQ);
@ -282,7 +284,7 @@ static void dec_be(DisasContext *dc)
static void dec_bg(DisasContext *dc) static void dec_bg(DisasContext *dc)
{ {
LOG_DIS("bg r%d, r%d, %d\n", dc->r0, dc->r1, LOG_DIS("bg r%d, r%d, %d\n", dc->r1, dc->r0,
sign_extend(dc->imm16, 16 * 4)); sign_extend(dc->imm16, 16 * 4));
gen_cond_branch(dc, TCG_COND_GT); gen_cond_branch(dc, TCG_COND_GT);
@ -290,7 +292,7 @@ static void dec_bg(DisasContext *dc)
static void dec_bge(DisasContext *dc) static void dec_bge(DisasContext *dc)
{ {
LOG_DIS("bge r%d, r%d, %d\n", dc->r0, dc->r1, LOG_DIS("bge r%d, r%d, %d\n", dc->r1, dc->r0,
sign_extend(dc->imm16, 16) * 4); sign_extend(dc->imm16, 16) * 4);
gen_cond_branch(dc, TCG_COND_GE); gen_cond_branch(dc, TCG_COND_GE);
@ -298,7 +300,7 @@ static void dec_bge(DisasContext *dc)
static void dec_bgeu(DisasContext *dc) static void dec_bgeu(DisasContext *dc)
{ {
LOG_DIS("bgeu r%d, r%d, %d\n", dc->r0, dc->r1, LOG_DIS("bgeu r%d, r%d, %d\n", dc->r1, dc->r0,
sign_extend(dc->imm16, 16) * 4); sign_extend(dc->imm16, 16) * 4);
gen_cond_branch(dc, TCG_COND_GEU); gen_cond_branch(dc, TCG_COND_GEU);
@ -306,7 +308,7 @@ static void dec_bgeu(DisasContext *dc)
static void dec_bgu(DisasContext *dc) static void dec_bgu(DisasContext *dc)
{ {
LOG_DIS("bgu r%d, r%d, %d\n", dc->r0, dc->r1, LOG_DIS("bgu r%d, r%d, %d\n", dc->r1, dc->r0,
sign_extend(dc->imm16, 16) * 4); sign_extend(dc->imm16, 16) * 4);
gen_cond_branch(dc, TCG_COND_GTU); gen_cond_branch(dc, TCG_COND_GTU);
@ -314,7 +316,7 @@ static void dec_bgu(DisasContext *dc)
static void dec_bne(DisasContext *dc) static void dec_bne(DisasContext *dc)
{ {
LOG_DIS("bne r%d, r%d, %d\n", dc->r0, dc->r1, LOG_DIS("bne r%d, r%d, %d\n", dc->r1, dc->r0,
sign_extend(dc->imm16, 16) * 4); sign_extend(dc->imm16, 16) * 4);
gen_cond_branch(dc, TCG_COND_NE); gen_cond_branch(dc, TCG_COND_NE);
@ -342,9 +344,6 @@ static void dec_calli(DisasContext *dc)
static inline void gen_compare(DisasContext *dc, int cond) static inline void gen_compare(DisasContext *dc, int cond)
{ {
int rX = (dc->format == OP_FMT_RR) ? dc->r2 : dc->r1;
int rY = (dc->format == OP_FMT_RR) ? dc->r0 : dc->r0;
int rZ = (dc->format == OP_FMT_RR) ? dc->r1 : -1;
int i; int i;
if (dc->format == OP_FMT_RI) { if (dc->format == OP_FMT_RI) {
@ -358,16 +357,16 @@ static inline void gen_compare(DisasContext *dc, int cond)
break; break;
} }
tcg_gen_setcondi_tl(cond, cpu_R[rX], cpu_R[rY], i); tcg_gen_setcondi_tl(cond, cpu_R[dc->r1], cpu_R[dc->r0], i);
} else { } else {
tcg_gen_setcond_tl(cond, cpu_R[rX], cpu_R[rY], cpu_R[rZ]); tcg_gen_setcond_tl(cond, cpu_R[dc->r2], cpu_R[dc->r0], cpu_R[dc->r1]);
} }
} }
static void dec_cmpe(DisasContext *dc) static void dec_cmpe(DisasContext *dc)
{ {
if (dc->format == OP_FMT_RI) { if (dc->format == OP_FMT_RI) {
LOG_DIS("cmpei r%d, r%d, %d\n", dc->r0, dc->r1, LOG_DIS("cmpei r%d, r%d, %d\n", dc->r1, dc->r0,
sign_extend(dc->imm16, 16)); sign_extend(dc->imm16, 16));
} else { } else {
LOG_DIS("cmpe r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1); LOG_DIS("cmpe r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1);
@ -379,7 +378,7 @@ static void dec_cmpe(DisasContext *dc)
static void dec_cmpg(DisasContext *dc) static void dec_cmpg(DisasContext *dc)
{ {
if (dc->format == OP_FMT_RI) { if (dc->format == OP_FMT_RI) {
LOG_DIS("cmpgi r%d, r%d, %d\n", dc->r0, dc->r1, LOG_DIS("cmpgi r%d, r%d, %d\n", dc->r1, dc->r0,
sign_extend(dc->imm16, 16)); sign_extend(dc->imm16, 16));
} else { } else {
LOG_DIS("cmpg r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1); LOG_DIS("cmpg r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1);
@ -391,7 +390,7 @@ static void dec_cmpg(DisasContext *dc)
static void dec_cmpge(DisasContext *dc) static void dec_cmpge(DisasContext *dc)
{ {
if (dc->format == OP_FMT_RI) { if (dc->format == OP_FMT_RI) {
LOG_DIS("cmpgei r%d, r%d, %d\n", dc->r0, dc->r1, LOG_DIS("cmpgei r%d, r%d, %d\n", dc->r1, dc->r0,
sign_extend(dc->imm16, 16)); sign_extend(dc->imm16, 16));
} else { } else {
LOG_DIS("cmpge r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1); LOG_DIS("cmpge r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1);
@ -403,7 +402,7 @@ static void dec_cmpge(DisasContext *dc)
static void dec_cmpgeu(DisasContext *dc) static void dec_cmpgeu(DisasContext *dc)
{ {
if (dc->format == OP_FMT_RI) { if (dc->format == OP_FMT_RI) {
LOG_DIS("cmpgeui r%d, r%d, %d\n", dc->r0, dc->r1, LOG_DIS("cmpgeui r%d, r%d, %d\n", dc->r1, dc->r0,
zero_extend(dc->imm16, 16)); zero_extend(dc->imm16, 16));
} else { } else {
LOG_DIS("cmpgeu r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1); LOG_DIS("cmpgeu r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1);
@ -415,7 +414,7 @@ static void dec_cmpgeu(DisasContext *dc)
static void dec_cmpgu(DisasContext *dc) static void dec_cmpgu(DisasContext *dc)
{ {
if (dc->format == OP_FMT_RI) { if (dc->format == OP_FMT_RI) {
LOG_DIS("cmpgui r%d, r%d, %d\n", dc->r0, dc->r1, LOG_DIS("cmpgui r%d, r%d, %d\n", dc->r1, dc->r0,
zero_extend(dc->imm16, 16)); zero_extend(dc->imm16, 16));
} else { } else {
LOG_DIS("cmpgu r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1); LOG_DIS("cmpgu r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1);
@ -427,7 +426,7 @@ static void dec_cmpgu(DisasContext *dc)
static void dec_cmpne(DisasContext *dc) static void dec_cmpne(DisasContext *dc)
{ {
if (dc->format == OP_FMT_RI) { if (dc->format == OP_FMT_RI) {
LOG_DIS("cmpnei r%d, r%d, %d\n", dc->r0, dc->r1, LOG_DIS("cmpnei r%d, r%d, %d\n", dc->r1, dc->r0,
sign_extend(dc->imm16, 16)); sign_extend(dc->imm16, 16));
} else { } else {
LOG_DIS("cmpne r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1); LOG_DIS("cmpne r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1);
@ -539,7 +538,7 @@ static void dec_modu(DisasContext *dc)
static void dec_mul(DisasContext *dc) static void dec_mul(DisasContext *dc)
{ {
if (dc->format == OP_FMT_RI) { if (dc->format == OP_FMT_RI) {
LOG_DIS("muli r%d, r%d, %d\n", dc->r0, dc->r1, LOG_DIS("muli r%d, r%d, %d\n", dc->r1, dc->r0,
sign_extend(dc->imm16, 16)); sign_extend(dc->imm16, 16));
} else { } else {
LOG_DIS("mul r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1); LOG_DIS("mul r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1);
@ -563,7 +562,7 @@ static void dec_mul(DisasContext *dc)
static void dec_nor(DisasContext *dc) static void dec_nor(DisasContext *dc)
{ {
if (dc->format == OP_FMT_RI) { if (dc->format == OP_FMT_RI) {
LOG_DIS("nori r%d, r%d, %d\n", dc->r0, dc->r1, LOG_DIS("nori r%d, r%d, %d\n", dc->r1, dc->r0,
zero_extend(dc->imm16, 16)); zero_extend(dc->imm16, 16));
} else { } else {
LOG_DIS("nor r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1); LOG_DIS("nor r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1);
@ -865,7 +864,7 @@ static void dec_wcsr(DisasContext *dc)
{ {
int no; int no;
LOG_DIS("wcsr r%d, %d\n", dc->r1, dc->csr); LOG_DIS("wcsr %d, r%d\n", dc->csr, dc->r1);
switch (dc->csr) { switch (dc->csr) {
case CSR_IE: case CSR_IE:
@ -959,7 +958,7 @@ static void dec_wcsr(DisasContext *dc)
static void dec_xnor(DisasContext *dc) static void dec_xnor(DisasContext *dc)
{ {
if (dc->format == OP_FMT_RI) { if (dc->format == OP_FMT_RI) {
LOG_DIS("xnori r%d, r%d, %d\n", dc->r0, dc->r1, LOG_DIS("xnori r%d, r%d, %d\n", dc->r1, dc->r0,
zero_extend(dc->imm16, 16)); zero_extend(dc->imm16, 16));
} else { } else {
if (dc->r1 == R_R0) { if (dc->r1 == R_R0) {
@ -981,7 +980,7 @@ static void dec_xnor(DisasContext *dc)
static void dec_xor(DisasContext *dc) static void dec_xor(DisasContext *dc)
{ {
if (dc->format == OP_FMT_RI) { if (dc->format == OP_FMT_RI) {
LOG_DIS("xori r%d, r%d, %d\n", dc->r0, dc->r1, LOG_DIS("xori r%d, r%d, %d\n", dc->r1, dc->r0,
zero_extend(dc->imm16, 16)); zero_extend(dc->imm16, 16));
} else { } else {
LOG_DIS("xor r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1); LOG_DIS("xor r%d, r%d, r%d\n", dc->r2, dc->r0, dc->r1);

View File

@ -2,7 +2,6 @@
#include "qemu-common.h" #include "qemu-common.h"
#include "cpu.h" #include "cpu.h"
#include "hw/hw.h" #include "hw/hw.h"
#include "cpu.h"
#include "migration/cpu.h" #include "migration/cpu.h"
static int cpu_post_load(void *opaque, int version_id) static int cpu_post_load(void *opaque, int version_id)

View File

@ -8,7 +8,6 @@
#include "helper_regs.h" #include "helper_regs.h"
#include "mmu-hash64.h" #include "mmu-hash64.h"
#include "migration/cpu.h" #include "migration/cpu.h"
#include "exec/exec-all.h"
static int cpu_load_old(QEMUFile *f, void *opaque, int version_id) static int cpu_load_old(QEMUFile *f, void *opaque, int version_id)
{ {

View File

@ -23,7 +23,6 @@
#include "exec/helper-proto.h" #include "exec/helper-proto.h"
#include "helper_regs.h" #include "helper_regs.h"
#include "exec/exec-all.h"
#include "exec/cpu_ldst.h" #include "exec/cpu_ldst.h"
//#define DEBUG_OP //#define DEBUG_OP

View File

@ -6,10 +6,7 @@
#include "hw/boards.h" #include "hw/boards.h"
#include "qemu/timer.h" #include "qemu/timer.h"
#include "cpu.h"
#include "exec/exec-all.h"
#include "migration/cpu.h" #include "migration/cpu.h"
#include "exec/exec-all.h"
#ifdef TARGET_SPARC64 #ifdef TARGET_SPARC64
static const VMStateDescription vmstate_cpu_timer = { static const VMStateDescription vmstate_cpu_timer = {

View File

@ -36,7 +36,6 @@
#include "tcg-op.h" #include "tcg-op.h"
#include "qemu/log.h" #include "qemu/log.h"
#include "sysemu/sysemu.h" #include "sysemu/sysemu.h"
#include "exec/exec-all.h"
#include "exec/cpu_ldst.h" #include "exec/cpu_ldst.h"
#include "exec/semihost.h" #include "exec/semihost.h"

View File

@ -21,9 +21,6 @@
#include <gnutls/gnutls.h> #include <gnutls/gnutls.h>
#include <gnutls/x509.h> #include <gnutls/x509.h>
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
#if !(defined WIN32) && \ #if !(defined WIN32) && \
defined(CONFIG_TASN1) && \ defined(CONFIG_TASN1) && \
(LIBGNUTLS_VERSION_NUMBER >= 0x020600) (LIBGNUTLS_VERSION_NUMBER >= 0x020600)

View File

@ -22,8 +22,6 @@
#include "libqos/virtio-pci.h" #include "libqos/virtio-pci.h"
#include "qapi/error.h" #include "qapi/error.h"
#include "libqos/pci-pc.h"
#include "libqos/virtio-pci.h"
#include "libqos/malloc-pc.h" #include "libqos/malloc-pc.h"
#include "hw/virtio/virtio-net.h" #include "hw/virtio/virtio-net.h"

View File

@ -28,7 +28,6 @@
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include <termios.h> #include <termios.h>
#include <termios.h>
#include <glib/gprintf.h> #include <glib/gprintf.h>

12
vl.c
View File

@ -110,7 +110,6 @@ int main(int argc, char **argv)
#include "trace.h" #include "trace.h"
#include "trace/control.h" #include "trace/control.h"
#include "qemu/queue.h" #include "qemu/queue.h"
#include "sysemu/cpus.h"
#include "sysemu/arch_init.h" #include "sysemu/arch_init.h"
#include "ui/qemu-spice.h" #include "ui/qemu-spice.h"
@ -2408,8 +2407,9 @@ static int mon_init_func(void *opaque, QemuOpts *opts, Error **errp)
if (qemu_opt_get_bool(opts, "pretty", 0)) if (qemu_opt_get_bool(opts, "pretty", 0))
flags |= MONITOR_USE_PRETTY; flags |= MONITOR_USE_PRETTY;
if (qemu_opt_get_bool(opts, "default", 0)) if (qemu_opt_get_bool(opts, "default", 0)) {
flags |= MONITOR_IS_DEFAULT; error_report("option 'default' does nothing and is deprecated");
}
chardev = qemu_opt_get(opts, "chardev"); chardev = qemu_opt_get(opts, "chardev");
chr = qemu_chr_find(chardev); chr = qemu_chr_find(chardev);
@ -2428,16 +2428,12 @@ static void monitor_parse(const char *optarg, const char *mode, bool pretty)
QemuOpts *opts; QemuOpts *opts;
const char *p; const char *p;
char label[32]; char label[32];
int def = 0;
if (strstart(optarg, "chardev:", &p)) { if (strstart(optarg, "chardev:", &p)) {
snprintf(label, sizeof(label), "%s", p); snprintf(label, sizeof(label), "%s", p);
} else { } else {
snprintf(label, sizeof(label), "compat_monitor%d", snprintf(label, sizeof(label), "compat_monitor%d",
monitor_device_index); monitor_device_index);
if (monitor_device_index == 0) {
def = 1;
}
opts = qemu_chr_parse_compat(label, optarg); opts = qemu_chr_parse_compat(label, optarg);
if (!opts) { if (!opts) {
error_report("parse error: %s", optarg); error_report("parse error: %s", optarg);
@ -2449,8 +2445,6 @@ static void monitor_parse(const char *optarg, const char *mode, bool pretty)
qemu_opt_set(opts, "mode", mode, &error_abort); qemu_opt_set(opts, "mode", mode, &error_abort);
qemu_opt_set(opts, "chardev", label, &error_abort); qemu_opt_set(opts, "chardev", label, &error_abort);
qemu_opt_set_bool(opts, "pretty", pretty, &error_abort); qemu_opt_set_bool(opts, "pretty", pretty, &error_abort);
if (def)
qemu_opt_set(opts, "default", "on", &error_abort);
monitor_device_index++; monitor_device_index++;
} }