mirror of https://github.com/xemu-project/xemu.git
Merge remote-tracking branch 'mjt/trivial-patches' into staging
# By Stefan Weil (5) and others # Via Michael Tokarev * mjt/trivial-patches: migration: Fix compiler warning ('caps' may be used uninitialized) util/path: Fix type which is longer than 8 bit for MinGW hw/9pfs: Fix errno value for xattr functions vl: Clean up unnecessary boot_order complications qemu-char: Fix potential out of bounds access to local arrays pci-ohci: Add missing 'break' in ohci_service_td sh4: Fix serial line access for Linux kernels later than 3.2 hw/alpha: Fix compiler warning (integer constant is too large) target-i386: Fix compiler warning (integer constant is too large) block: Remove unused assignment (fixes warning from clang) exec: cleanup DEBUG_SUBPAGE tests: Fix schema parser test for in-tree build tests: Update .gitignore for test-int128 and test-bitops .gitignore: ignore tests/qemu-iotests/socket_scm_helper Message-id: 1381051979-25742-1-git-send-email-mjt@msgid.tls.msk.ru Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
This commit is contained in:
commit
80dfc87394
|
@ -1926,7 +1926,6 @@ void qmp_drive_mirror(const char *device, const char *target,
|
||||||
} else {
|
} else {
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case NEW_IMAGE_MODE_EXISTING:
|
case NEW_IMAGE_MODE_EXISTING:
|
||||||
ret = 0;
|
|
||||||
break;
|
break;
|
||||||
case NEW_IMAGE_MODE_ABSOLUTE_PATHS:
|
case NEW_IMAGE_MODE_ABSOLUTE_PATHS:
|
||||||
/* create new image with backing file */
|
/* create new image with backing file */
|
||||||
|
|
18
exec.c
18
exec.c
|
@ -1573,7 +1573,7 @@ static uint64_t subpage_read(void *opaque, hwaddr addr,
|
||||||
uint8_t buf[4];
|
uint8_t buf[4];
|
||||||
|
|
||||||
#if defined(DEBUG_SUBPAGE)
|
#if defined(DEBUG_SUBPAGE)
|
||||||
printf("%s: subpage %p len %d addr " TARGET_FMT_plx "\n", __func__,
|
printf("%s: subpage %p len %u addr " TARGET_FMT_plx "\n", __func__,
|
||||||
subpage, len, addr);
|
subpage, len, addr);
|
||||||
#endif
|
#endif
|
||||||
address_space_read(subpage->as, addr + subpage->base, buf, len);
|
address_space_read(subpage->as, addr + subpage->base, buf, len);
|
||||||
|
@ -1596,7 +1596,7 @@ static void subpage_write(void *opaque, hwaddr addr,
|
||||||
uint8_t buf[4];
|
uint8_t buf[4];
|
||||||
|
|
||||||
#if defined(DEBUG_SUBPAGE)
|
#if defined(DEBUG_SUBPAGE)
|
||||||
printf("%s: subpage %p len %d addr " TARGET_FMT_plx
|
printf("%s: subpage %p len %u addr " TARGET_FMT_plx
|
||||||
" value %"PRIx64"\n",
|
" value %"PRIx64"\n",
|
||||||
__func__, subpage, len, addr, value);
|
__func__, subpage, len, addr, value);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1617,16 +1617,16 @@ static void subpage_write(void *opaque, hwaddr addr,
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool subpage_accepts(void *opaque, hwaddr addr,
|
static bool subpage_accepts(void *opaque, hwaddr addr,
|
||||||
unsigned size, bool is_write)
|
unsigned len, bool is_write)
|
||||||
{
|
{
|
||||||
subpage_t *subpage = opaque;
|
subpage_t *subpage = opaque;
|
||||||
#if defined(DEBUG_SUBPAGE)
|
#if defined(DEBUG_SUBPAGE)
|
||||||
printf("%s: subpage %p %c len %d addr " TARGET_FMT_plx "\n",
|
printf("%s: subpage %p %c len %u addr " TARGET_FMT_plx "\n",
|
||||||
__func__, subpage, is_write ? 'w' : 'r', len, addr);
|
__func__, subpage, is_write ? 'w' : 'r', len, addr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return address_space_access_valid(subpage->as, addr + subpage->base,
|
return address_space_access_valid(subpage->as, addr + subpage->base,
|
||||||
size, is_write);
|
len, is_write);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const MemoryRegionOps subpage_ops = {
|
static const MemoryRegionOps subpage_ops = {
|
||||||
|
@ -1646,8 +1646,8 @@ static int subpage_register (subpage_t *mmio, uint32_t start, uint32_t end,
|
||||||
idx = SUBPAGE_IDX(start);
|
idx = SUBPAGE_IDX(start);
|
||||||
eidx = SUBPAGE_IDX(end);
|
eidx = SUBPAGE_IDX(end);
|
||||||
#if defined(DEBUG_SUBPAGE)
|
#if defined(DEBUG_SUBPAGE)
|
||||||
printf("%s: %p start %08x end %08x idx %08x eidx %08x mem %ld\n", __func__,
|
printf("%s: %p start %08x end %08x idx %08x eidx %08x section %d\n",
|
||||||
mmio, start, end, idx, eidx, memory);
|
__func__, mmio, start, end, idx, eidx, section);
|
||||||
#endif
|
#endif
|
||||||
for (; idx <= eidx; idx++) {
|
for (; idx <= eidx; idx++) {
|
||||||
mmio->sub_section[idx] = section;
|
mmio->sub_section[idx] = section;
|
||||||
|
@ -1668,8 +1668,8 @@ static subpage_t *subpage_init(AddressSpace *as, hwaddr base)
|
||||||
"subpage", TARGET_PAGE_SIZE);
|
"subpage", TARGET_PAGE_SIZE);
|
||||||
mmio->iomem.subpage = true;
|
mmio->iomem.subpage = true;
|
||||||
#if defined(DEBUG_SUBPAGE)
|
#if defined(DEBUG_SUBPAGE)
|
||||||
printf("%s: %p base " TARGET_FMT_plx " len %08x %d\n", __func__,
|
printf("%s: %p base " TARGET_FMT_plx " len %08x\n", __func__,
|
||||||
mmio, base, TARGET_PAGE_SIZE, subpage_memory);
|
mmio, base, TARGET_PAGE_SIZE);
|
||||||
#endif
|
#endif
|
||||||
subpage_register(mmio, 0, TARGET_PAGE_SIZE-1, PHYS_SECTION_UNASSIGNED);
|
subpage_register(mmio, 0, TARGET_PAGE_SIZE-1, PHYS_SECTION_UNASSIGNED);
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ ssize_t v9fs_get_xattr(FsContext *ctx, const char *path,
|
||||||
if (xops) {
|
if (xops) {
|
||||||
return xops->getxattr(ctx, path, name, value, size);
|
return xops->getxattr(ctx, path, name, value, size);
|
||||||
}
|
}
|
||||||
errno = -EOPNOTSUPP;
|
errno = EOPNOTSUPP;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ int v9fs_set_xattr(FsContext *ctx, const char *path, const char *name,
|
||||||
if (xops) {
|
if (xops) {
|
||||||
return xops->setxattr(ctx, path, name, value, size, flags);
|
return xops->setxattr(ctx, path, name, value, size, flags);
|
||||||
}
|
}
|
||||||
errno = -EOPNOTSUPP;
|
errno = EOPNOTSUPP;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -135,7 +135,7 @@ int v9fs_remove_xattr(FsContext *ctx,
|
||||||
if (xops) {
|
if (xops) {
|
||||||
return xops->removexattr(ctx, path, name);
|
return xops->removexattr(ctx, path, name);
|
||||||
}
|
}
|
||||||
errno = -EOPNOTSUPP;
|
errno = EOPNOTSUPP;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -700,7 +700,7 @@ static IOMMUTLBEntry typhoon_translate_iommu(MemoryRegion *iommu, hwaddr addr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (addr >= 0x80000000000 && addr <= 0xfffffffffff) {
|
if (addr >= 0x80000000000ull && addr <= 0xfffffffffffull) {
|
||||||
/* Check the fourth window for DAC enable and window enable. */
|
/* Check the fourth window for DAC enable and window enable. */
|
||||||
if ((pchip->win[3].wba & 0x80000000001ull) == 0x80000000001ull) {
|
if ((pchip->win[3].wba & 0x80000000001ull) == 0x80000000001ull) {
|
||||||
uint64_t pte_addr;
|
uint64_t pte_addr;
|
||||||
|
|
|
@ -248,11 +248,9 @@ static uint64_t sh_serial_read(void *opaque, hwaddr offs,
|
||||||
s->flags &= ~SH_SERIAL_FLAG_RDF;
|
s->flags &= ~SH_SERIAL_FLAG_RDF;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#if 0
|
|
||||||
case 0x18:
|
case 0x18:
|
||||||
ret = s->fcr;
|
ret = s->fcr;
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case 0x1c:
|
case 0x1c:
|
||||||
ret = s->rx_cnt;
|
ret = s->rx_cnt;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1143,7 +1143,9 @@ static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed)
|
||||||
switch (ret) {
|
switch (ret) {
|
||||||
case USB_RET_IOERROR:
|
case USB_RET_IOERROR:
|
||||||
case USB_RET_NODEV:
|
case USB_RET_NODEV:
|
||||||
|
DPRINTF("usb-ohci: got DEV ERROR\n");
|
||||||
OHCI_SET_BM(td.flags, TD_CC, OHCI_CC_DEVICENOTRESPONDING);
|
OHCI_SET_BM(td.flags, TD_CC, OHCI_CC_DEVICENOTRESPONDING);
|
||||||
|
break;
|
||||||
case USB_RET_NAK:
|
case USB_RET_NAK:
|
||||||
DPRINTF("usb-ohci: got NAK\n");
|
DPRINTF("usb-ohci: got NAK\n");
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -150,6 +150,7 @@ MigrationCapabilityStatusList *qmp_query_migrate_capabilities(Error **errp)
|
||||||
MigrationState *s = migrate_get_current();
|
MigrationState *s = migrate_get_current();
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
caps = NULL; /* silence compiler warning */
|
||||||
for (i = 0; i < MIGRATION_CAPABILITY_MAX; i++) {
|
for (i = 0; i < MIGRATION_CAPABILITY_MAX; i++) {
|
||||||
if (head == NULL) {
|
if (head == NULL) {
|
||||||
head = g_malloc0(sizeof(*caps));
|
head = g_malloc0(sizeof(*caps));
|
||||||
|
|
|
@ -2989,11 +2989,11 @@ QemuOpts *qemu_chr_parse_compat(const char *label, const char *filename)
|
||||||
if (strstart(filename, "vc", &p)) {
|
if (strstart(filename, "vc", &p)) {
|
||||||
qemu_opt_set(opts, "backend", "vc");
|
qemu_opt_set(opts, "backend", "vc");
|
||||||
if (*p == ':') {
|
if (*p == ':') {
|
||||||
if (sscanf(p+1, "%8[0-9]x%8[0-9]", width, height) == 2) {
|
if (sscanf(p+1, "%7[0-9]x%7[0-9]", width, height) == 2) {
|
||||||
/* pixels */
|
/* pixels */
|
||||||
qemu_opt_set(opts, "width", width);
|
qemu_opt_set(opts, "width", width);
|
||||||
qemu_opt_set(opts, "height", height);
|
qemu_opt_set(opts, "height", height);
|
||||||
} else if (sscanf(p+1, "%8[0-9]Cx%8[0-9]C", width, height) == 2) {
|
} else if (sscanf(p+1, "%7[0-9]Cx%7[0-9]C", width, height) == 2) {
|
||||||
/* chars */
|
/* chars */
|
||||||
qemu_opt_set(opts, "cols", width);
|
qemu_opt_set(opts, "cols", width);
|
||||||
qemu_opt_set(opts, "rows", height);
|
qemu_opt_set(opts, "rows", height);
|
||||||
|
|
|
@ -75,7 +75,7 @@ static void walk_pte2(MemoryMappingList *list,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* PAE Paging or IA-32e Paging */
|
/* PAE Paging or IA-32e Paging */
|
||||||
#define PLM4_ADDR_MASK 0xffffffffff000 /* selects bits 51:12 */
|
#define PLM4_ADDR_MASK 0xffffffffff000ULL /* selects bits 51:12 */
|
||||||
|
|
||||||
static void walk_pde(MemoryMappingList *list, hwaddr pde_start_addr,
|
static void walk_pde(MemoryMappingList *list, hwaddr pde_start_addr,
|
||||||
int32_t a20_mask, target_ulong start_line_addr)
|
int32_t a20_mask, target_ulong start_line_addr)
|
||||||
|
|
|
@ -5,9 +5,11 @@ check-qjson
|
||||||
check-qlist
|
check-qlist
|
||||||
check-qstring
|
check-qstring
|
||||||
test-aio
|
test-aio
|
||||||
|
test-bitops
|
||||||
test-throttle
|
test-throttle
|
||||||
test-cutils
|
test-cutils
|
||||||
test-hbitmap
|
test-hbitmap
|
||||||
|
test-int128
|
||||||
test-iov
|
test-iov
|
||||||
test-mul64
|
test-mul64
|
||||||
test-qapi-types.[ch]
|
test-qapi-types.[ch]
|
||||||
|
@ -21,3 +23,4 @@ test-thread-pool
|
||||||
test-x86-cpuid
|
test-x86-cpuid
|
||||||
test-xbzrle
|
test-xbzrle
|
||||||
*-test
|
*-test
|
||||||
|
qapi-schema/*.test.*
|
||||||
|
|
|
@ -261,10 +261,10 @@ check-tests/test-qapi.py: tests/test-qapi.py
|
||||||
|
|
||||||
.PHONY: $(patsubst %, check-%, $(check-qapi-schema-y))
|
.PHONY: $(patsubst %, check-%, $(check-qapi-schema-y))
|
||||||
$(patsubst %, check-%, $(check-qapi-schema-y)): check-%.json: $(SRC_PATH)/%.json
|
$(patsubst %, check-%, $(check-qapi-schema-y)): check-%.json: $(SRC_PATH)/%.json
|
||||||
$(call quiet-command, PYTHONPATH=$(SRC_PATH)/scripts $(PYTHON) $(SRC_PATH)/tests/qapi-schema/test-qapi.py <$^ >$*.out 2>$*.err; echo $$? >$*.exit, " TEST $*.out")
|
$(call quiet-command, PYTHONPATH=$(SRC_PATH)/scripts $(PYTHON) $(SRC_PATH)/tests/qapi-schema/test-qapi.py <$^ >$*.test.out 2>$*.test.err; echo $$? >$*.test.exit, " TEST $*.out")
|
||||||
@diff -q $(SRC_PATH)/$*.out $*.out
|
@diff -q $(SRC_PATH)/$*.out $*.test.out
|
||||||
@diff -q $(SRC_PATH)/$*.err $*.err
|
@diff -q $(SRC_PATH)/$*.err $*.test.err
|
||||||
@diff -q $(SRC_PATH)/$*.exit $*.exit
|
@diff -q $(SRC_PATH)/$*.exit $*.test.exit
|
||||||
|
|
||||||
# Consolidated targets
|
# Consolidated targets
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ check.log
|
||||||
check.time
|
check.time
|
||||||
*.out.bad
|
*.out.bad
|
||||||
*.notrun
|
*.notrun
|
||||||
|
socket_scm_helper
|
||||||
|
|
||||||
# ignore everything in the scratch directory
|
# ignore everything in the scratch directory
|
||||||
scratch/
|
scratch/
|
||||||
|
|
|
@ -39,7 +39,7 @@ static int strneq(const char *s1, unsigned int n, const char *s2)
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pathelem *add_entry(struct pathelem *root, const char *name,
|
static struct pathelem *add_entry(struct pathelem *root, const char *name,
|
||||||
unsigned char type);
|
unsigned type);
|
||||||
|
|
||||||
static struct pathelem *new_entry(const char *root,
|
static struct pathelem *new_entry(const char *root,
|
||||||
struct pathelem *parent,
|
struct pathelem *parent,
|
||||||
|
@ -82,7 +82,7 @@ static struct pathelem *add_dir_maybe(struct pathelem *path)
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pathelem *add_entry(struct pathelem *root, const char *name,
|
static struct pathelem *add_entry(struct pathelem *root, const char *name,
|
||||||
unsigned char type)
|
unsigned type)
|
||||||
{
|
{
|
||||||
struct pathelem **e;
|
struct pathelem **e;
|
||||||
|
|
||||||
|
|
6
vl.c
6
vl.c
|
@ -2825,7 +2825,7 @@ int main(int argc, char **argv, char **envp)
|
||||||
const char *icount_option = NULL;
|
const char *icount_option = NULL;
|
||||||
const char *initrd_filename;
|
const char *initrd_filename;
|
||||||
const char *kernel_filename, *kernel_cmdline;
|
const char *kernel_filename, *kernel_cmdline;
|
||||||
const char *boot_order = NULL;
|
const char *boot_order;
|
||||||
DisplayState *ds;
|
DisplayState *ds;
|
||||||
int cyls, heads, secs, translation;
|
int cyls, heads, secs, translation;
|
||||||
QemuOpts *hda_opts = NULL, *opts, *machine_opts;
|
QemuOpts *hda_opts = NULL, *opts, *machine_opts;
|
||||||
|
@ -4050,9 +4050,7 @@ int main(int argc, char **argv, char **envp)
|
||||||
initrd_filename = qemu_opt_get(machine_opts, "initrd");
|
initrd_filename = qemu_opt_get(machine_opts, "initrd");
|
||||||
kernel_cmdline = qemu_opt_get(machine_opts, "append");
|
kernel_cmdline = qemu_opt_get(machine_opts, "append");
|
||||||
|
|
||||||
if (!boot_order) {
|
boot_order = machine->default_boot_order;
|
||||||
boot_order = machine->default_boot_order;
|
|
||||||
}
|
|
||||||
opts = qemu_opts_find(qemu_find_opts("boot-opts"), NULL);
|
opts = qemu_opts_find(qemu_find_opts("boot-opts"), NULL);
|
||||||
if (opts) {
|
if (opts) {
|
||||||
char *normal_boot_order;
|
char *normal_boot_order;
|
||||||
|
|
Loading…
Reference in New Issue