diff options
author | David 'Digit' Turner <digit@android.com> | 2010-05-10 23:52:07 -0700 |
---|---|---|
committer | David 'Digit' Turner <digit@android.com> | 2010-05-11 18:11:57 -0700 |
commit | dd9cb7929e2b98bf9f8017ebbd7e433d38541664 (patch) | |
tree | 8eac0c57bc1b62e1cf53fe776ac1e67a9d3a956a | |
parent | a7fb77d6eca56e61e94f62e7deb4120b60b1e919 (diff) | |
download | external_qemu-dd9cb7929e2b98bf9f8017ebbd7e433d38541664.zip external_qemu-dd9cb7929e2b98bf9f8017ebbd7e433d38541664.tar.gz external_qemu-dd9cb7929e2b98bf9f8017ebbd7e433d38541664.tar.bz2 |
Upstream: integrate minor cleanups
Change-Id: I8de8e1044794f0ef8427717fc0b3b5e9e121247b
-rw-r--r-- | Changelog | 70 | ||||
-rw-r--r-- | arm-dis.c | 63 | ||||
-rw-r--r-- | arm-semi.c | 4 | ||||
-rw-r--r-- | block_int.h | 1 | ||||
-rw-r--r-- | bt-host.c | 3 | ||||
-rw-r--r-- | bt-vhci.c | 3 | ||||
-rw-r--r-- | buffered_file.c | 43 | ||||
-rw-r--r-- | console.h | 1 | ||||
-rw-r--r-- | qemu-thread.c | 2 | ||||
-rw-r--r-- | sysemu.h | 16 |
10 files changed, 147 insertions, 59 deletions
@@ -1,3 +1,73 @@ +version 0.12.0: + + - Update to SeaBIOS 0.5.0 + - e1000: fix device link status in Linux (Anthony Liguori) + - monitor: fix QMP for balloon command (Luiz Capitulino) + - QMP: Return an empty dict by default (Luiz Capitulino) + - QMP: Only handle converted commands (Luiz Capitulino) + - pci: support PCI based option rom loading (Gerd Hoffman/Anthony Liguori) + - Fix backcompat for hotplug of SCSI controllers (Daniel P. Berrange) + - fdc: fix migration from 0.11 (Juan Quintela) + - vmware-vga: fix segv on cursor resize. (Dave Airlie) + - vmware-vga: various fixes (Dave Airlie/Anthony Liguori) + - qdev: improve property error reporting. (Gerd Hoffmann) + - fix vga names in default_list (Gerd Hoffmann) + - usb-host: check mon before using it. (Gerd Hoffmann) + - usb-net: use qdev for -usbdevice (Gerd Hoffmann) + - monitor: Catch printing to non-existent monitor (Luiz Capitulino) + - Avoid permanently disabled QEMU monitor when UNIX migration fails (Daniel P. Berrange) + - Fix loading of ELF multiboot kernels (Kevin Wolf) + - qemu-io: Fix memory leak (Kevin Wolf) + - Fix thinko in linuxboot.S (Paolo Bonzini) + - target-i386: Fix evaluation of DR7 register (Jan Kiszka) + - vnc: hextile: do not generate ForegroundSpecified and SubrectsColoured tiles (Anthony Liguori) + - S390: Bail out without KVM (Alexander Graf) + - S390: Don't tell guest we're updating config space (Alexander Graf) + - target-s390: Fail on unknown instructions (Alexander Graf) + - osdep: Fix runtime failure on older Linux kernels (Andre Przywara) + - Fix a make -j race (Juergen Lock) + - target-alpha: Fix generic ctz64. (Richard Henderson) + - s390: Fix buggy assignment (Stefan Weil) + - target-mips: fix user-mode emulation startup (Nathan Froyd) + - target-i386: Update CPUID feature set for TCG (Andre Przywara) + - s390: fix build on 32 bit host (Michael S. Tsirkin) + +version 0.12.0-rc2: + + - v2: properly save kvm system time msr registers (Glauber Costa) + - convert more monitor commands to qmp (Luiz Capitulino) + - vnc: fix capslock tracking logic. (Gerd Hoffmann) + - QemuOpts: allow larger option values. (Gerd Hoffmann) + - scsi: fix drive hotplug. (Gerd Hoffmann) + - pci: don't hw_error() when no slot is available. (Gerd Hoffmann) + - pci: don't abort() when trying to hotplug with acpi off. (Gerd Hoffmann) + - allow default devices to be implemented in config file (Gerd Hoffman) + - vc: colorize chardev title line with blue background. (Gerd Hoffmann) + - chardev: make chardevs specified in config file work. (Gerd Hoffmann) + - qdev: also match bus name for global properties (Gerd Hoffmann) + - qdev: add command line option to set global defaults for properties. (Gerd Hoffmann) + - kvm: x86: Save/restore exception_index (Jan Kiszka) + - qdev: Replace device names containing whitespace (Markus Armbruster) + - fix rtc-td-hack on host without high-res timers (Gleb Natapov) + - virtio: verify features on load (Michael S. Tsirkin) + - vmware_vga: add rom file so that it boots. (Dave Airlie) + - Do not abort on qemu_malloc(0) in production builds (Anthony Liguori) + - Fix ARM userspace strex implementation. (Paul Brook) + - qemu: delete rule target on error (Michael S. Tsirkin) + - QMP: add human-readable description to error response (Markus Armbruster) + - convert more monitor commands to QError (Markus Armbruster) + - monitor: Fix double-prompt after "change vnc passwd BLA" (Markus Armbruster) + - monitor: do_cont(): Don't ask for passwords (Luiz Capitulino) + - monitor: Introduce 'block_passwd' command (Luiz Capitulino) + - pci: interrupt disable bit support (Michael S. Tsirkin) + - pci: interrupt status bit implementation (Michael S. Tsirkin) + - pci: prepare irq code for interrupt state (Michael S. Tsirkin) + - msix: function mask support (Michael S. Tsirkin) + - msix: macro rename for function mask support (Michael S. Tsirkin) + - cpuid: Fix multicore setup on Intel (Andre Przywara) + - kvm: x86: Fix initial kvm_has_msr_star (Jan Kiszka) + - Update OpenBIOS images to r640 (Aurelien Jarno) + version 0.10.2: - fix savevm/loadvm (Anthony Liguori) @@ -17,15 +17,12 @@ more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see <http://www.gnu.org/licenses/>. */ /* Start of qemu specific additions. Mostly this is stub definitions for things we don't care about. */ #include "dis-asm.h" -#define FALSE 0 -#define TRUE (!FALSE) #define ATTRIBUTE_UNUSED __attribute__((unused)) #define ISSPACE(x) ((x) == ' ' || (x) == '\t' || (x) == '\n') @@ -1532,7 +1529,7 @@ static unsigned int regname_selected = 1; #define NUM_ARM_REGNAMES NUM_ELEM (regnames) #define arm_regnames regnames[regname_selected].reg_names -static bfd_boolean force_thumb = FALSE; +static bfd_boolean force_thumb = false; /* Current IT instruction state. This contains the same state as the IT bits in the CPSR. */ @@ -1629,7 +1626,7 @@ arm_decode_shift (long given, fprintf_ftype func, void *stream, } /* Print one coprocessor instruction on INFO->STREAM. - Return TRUE if the instuction matched, FALSE if this is not a + Return true if the instuction matched, false if this is not a recognised coprocessor instruction. */ static bfd_boolean @@ -2122,10 +2119,10 @@ print_insn_coprocessor (bfd_vma pc, struct disassemble_info *info, long given, else func (stream, "%c", *c); } - return TRUE; + return true; } } - return FALSE; + return false; } static void @@ -2219,7 +2216,7 @@ print_arm_address (bfd_vma pc, struct disassemble_info *info, long given) } /* Print one neon instruction on INFO->STREAM. - Return TRUE if the instuction matched, FALSE if this is not a + Return true if the instuction matched, false if this is not a recognised neon instruction. */ static bfd_boolean @@ -2245,7 +2242,7 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb) else if ((given & 0xff000000) == 0xf9000000) given ^= 0xf9000000 ^ 0xf4000000; else - return FALSE; + return false; } for (insn = neon_opcodes; insn->assembler; insn++) @@ -2335,34 +2332,34 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb) { int amask = (1 << size) - 1; if ((idx_align & (1 << size)) != 0) - return FALSE; + return false; if (size > 0) { if ((idx_align & amask) == amask) align = 8 << size; else if ((idx_align & amask) != 0) - return FALSE; + return false; } } break; case 2: if (size == 2 && (idx_align & 2) != 0) - return FALSE; + return false; align = (idx_align & 1) ? 16 << size : 0; break; case 3: if ((size == 2 && (idx_align & 3) != 0) || (idx_align & 1) != 0) - return FALSE; + return false; break; case 4: if (size == 2) { if ((idx_align & 3) == 3) - return FALSE; + return false; align = (idx_align & 3) * 64; } else @@ -2671,10 +2668,10 @@ print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb) else func (stream, "%c", *c); } - return TRUE; + return true; } } - return FALSE; + return false; } /* Print one ARM instruction from PC on INFO->STREAM. */ @@ -2686,10 +2683,10 @@ print_insn_arm_internal (bfd_vma pc, struct disassemble_info *info, long given) void *stream = info->stream; fprintf_ftype func = info->fprintf_func; - if (print_insn_coprocessor (pc, info, given, FALSE)) + if (print_insn_coprocessor (pc, info, given, false)) return; - if (print_insn_neon (info, given, FALSE)) + if (print_insn_neon (info, given, false)) return; for (insn = arm_opcodes; insn->assembler; insn++) @@ -3322,10 +3319,10 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given) void *stream = info->stream; fprintf_ftype func = info->fprintf_func; - if (print_insn_coprocessor (pc, info, given, TRUE)) + if (print_insn_coprocessor (pc, info, given, true)) return; - if (print_insn_neon (info, given, TRUE)) + if (print_insn_neon (info, given, true)) return; for (insn = thumb32_opcodes; insn->assembler; insn++) @@ -3460,7 +3457,7 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given) unsigned int op = (given & 0x00000f00) >> 8; unsigned int i12 = (given & 0x00000fff); unsigned int i8 = (given & 0x000000ff); - bfd_boolean writeback = FALSE, postind = FALSE; + bfd_boolean writeback = false, postind = false; int offset = 0; func (stream, "[%s", arm_regnames[Rn]); @@ -3490,22 +3487,22 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given) case 0xF: /* 8-bit + preindex with wb */ offset = i8; - writeback = TRUE; + writeback = true; break; case 0xD: /* 8-bit - preindex with wb */ offset = -i8; - writeback = TRUE; + writeback = true; break; case 0xB: /* 8-bit + postindex */ offset = i8; - postind = TRUE; + postind = true; break; case 0x9: /* 8-bit - postindex */ offset = -i8; - postind = TRUE; + postind = true; break; default: @@ -3878,12 +3875,12 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info) unsigned char b[4]; long given; int status; - int is_thumb = FALSE; - int is_data = FALSE; + int is_thumb = false; + int is_data = false; unsigned int size = 4; void (*printer) (bfd_vma, struct disassemble_info *, long); #if 0 - bfd_boolean found = FALSE; + bfd_boolean found = false; if (info->disassembler_options) { @@ -3906,7 +3903,7 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info) if (pc <= last_mapping_addr) last_mapping_sym = -1; is_thumb = (last_type == MAP_THUMB); - found = FALSE; + found = false; /* Start scanning at the start of the function, or wherever we finished last time. */ n = info->symtab_pos + 1; @@ -3924,7 +3921,7 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info) && get_sym_code_type (info, n, &type)) { last_sym = n; - found = TRUE; + found = true; } } @@ -3941,7 +3938,7 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info) if (get_sym_code_type (info, n, &type)) { last_sym = n; - found = TRUE; + found = true; break; } } @@ -4013,7 +4010,7 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info) #endif if (force_thumb) - is_thumb = TRUE; + is_thumb = true; info->bytes_per_line = 4; @@ -15,9 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, - * MA 02110-1301, USA. + * along with this program; if not, see <http://www.gnu.org/licenses/>. */ #include <sys/types.h> diff --git a/block_int.h b/block_int.h index 830b7e9..32b66b5 100644 --- a/block_int.h +++ b/block_int.h @@ -37,6 +37,7 @@ #define BLOCK_OPT_BACKING_FILE "backing_file" #define BLOCK_OPT_BACKING_FMT "backing_fmt" #define BLOCK_OPT_CLUSTER_SIZE "cluster_size" +#define BLOCK_OPT_PREALLOC "preallocation" typedef struct AIOPool { void (*cancel)(BlockDriverAIOCB *acb); @@ -14,8 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * with this program; if not, see <http://www.gnu.org/licenses/>. */ #include "qemu-common.h" @@ -14,8 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * with this program; if not, see <http://www.gnu.org/licenses/>. */ #include "qemu-common.h" diff --git a/buffered_file.c b/buffered_file.c index 364b912..641ce21 100644 --- a/buffered_file.c +++ b/buffered_file.c @@ -39,10 +39,10 @@ typedef struct QEMUFileBuffered } QEMUFileBuffered; #ifdef DEBUG_BUFFERED_FILE -#define dprintf(fmt, ...) \ +#define DPRINTF(fmt, ...) \ do { printf("buffered-file: " fmt, ## __VA_ARGS__); } while (0) #else -#define dprintf(fmt, ...) \ +#define DPRINTF(fmt, ...) \ do { } while (0) #endif @@ -52,7 +52,7 @@ static void buffered_append(QEMUFileBuffered *s, if (size > (s->buffer_capacity - s->buffer_size)) { void *tmp; - dprintf("increasing buffer capacity from %ld by %ld\n", + DPRINTF("increasing buffer capacity from %zu by %zu\n", s->buffer_capacity, size + 1024); s->buffer_capacity += size + 1024; @@ -75,11 +75,11 @@ static void buffered_flush(QEMUFileBuffered *s) size_t offset = 0; if (s->has_error) { - dprintf("flush when error, bailing\n"); + DPRINTF("flush when error, bailing\n"); return; } - dprintf("flushing %ld byte(s) of data\n", s->buffer_size); + DPRINTF("flushing %zu byte(s) of data\n", s->buffer_size); while (offset < s->buffer_size) { ssize_t ret; @@ -87,22 +87,22 @@ static void buffered_flush(QEMUFileBuffered *s) ret = s->put_buffer(s->opaque, s->buffer + offset, s->buffer_size - offset); if (ret == -EAGAIN) { - dprintf("backend not ready, freezing\n"); + DPRINTF("backend not ready, freezing\n"); s->freeze_output = 1; break; } if (ret <= 0) { - dprintf("error flushing data, %ld\n", ret); + DPRINTF("error flushing data, %zd\n", ret); s->has_error = 1; break; } else { - dprintf("flushed %ld byte(s)\n", ret); + DPRINTF("flushed %zd byte(s)\n", ret); offset += ret; } } - dprintf("flushed %ld of %ld byte(s)\n", offset, s->buffer_size); + DPRINTF("flushed %zu of %zu byte(s)\n", offset, s->buffer_size); memmove(s->buffer, s->buffer + offset, s->buffer_size - offset); s->buffer_size -= offset; } @@ -113,45 +113,45 @@ static int buffered_put_buffer(void *opaque, const uint8_t *buf, int64_t pos, in int offset = 0; ssize_t ret; - dprintf("putting %ld bytes at %Ld\n", size, pos); + DPRINTF("putting %d bytes at %" PRId64 "\n", size, pos); if (s->has_error) { - dprintf("flush when error, bailing\n"); + DPRINTF("flush when error, bailing\n"); return -EINVAL; } - dprintf("unfreezing output\n"); + DPRINTF("unfreezing output\n"); s->freeze_output = 0; buffered_flush(s); while (!s->freeze_output && offset < size) { if (s->bytes_xfer > s->xfer_limit) { - dprintf("transfer limit exceeded when putting\n"); + DPRINTF("transfer limit exceeded when putting\n"); break; } ret = s->put_buffer(s->opaque, buf + offset, size - offset); if (ret == -EAGAIN) { - dprintf("backend not ready, freezing\n"); + DPRINTF("backend not ready, freezing\n"); s->freeze_output = 1; break; } if (ret <= 0) { - dprintf("error putting\n"); + DPRINTF("error putting\n"); s->has_error = 1; offset = -EINVAL; break; } - dprintf("put %ld byte(s)\n", ret); + DPRINTF("put %zd byte(s)\n", ret); offset += ret; s->bytes_xfer += ret; } if (offset >= 0) { - dprintf("buffering %ld bytes\n", size - offset); + DPRINTF("buffering %d bytes\n", size - offset); buffered_append(s, buf + offset, size - offset); offset = size; } @@ -164,7 +164,7 @@ static int buffered_close(void *opaque) QEMUFileBuffered *s = opaque; int ret; - dprintf("closing\n"); + DPRINTF("closing\n"); while (!s->has_error && s->buffer_size) { buffered_flush(s); @@ -211,6 +211,13 @@ out: return s->xfer_limit; } +static size_t buffered_get_rate_limit(void *opaque) +{ + QEMUFileBuffered *s = opaque; + + return s->xfer_limit; +} + static void buffered_rate_tick(void *opaque) { QEMUFileBuffered *s = opaque; @@ -83,6 +83,7 @@ void kbd_put_keysym(int keysym); #define QEMU_BIG_ENDIAN_FLAG 0x01 #define QEMU_ALLOCATED_FLAG 0x02 +#define QEMU_REALPIXELS_FLAG 0x04 struct PixelFormat { uint8_t bits_per_pixel; diff --git a/qemu-thread.c b/qemu-thread.c index 719cfcd..3923db7 100644 --- a/qemu-thread.c +++ b/qemu-thread.c @@ -158,6 +158,6 @@ void qemu_thread_self(QemuThread *thread) int qemu_thread_equal(QemuThread *thread1, QemuThread *thread2) { - return (thread1->thread == thread2->thread); + return pthread_equal(thread1->thread, thread2->thread); } @@ -3,6 +3,11 @@ /* Misc. things related to the system emulator. */ #include "qemu-common.h" +#include "qemu-option.h" +#include "qemu-queue.h" +#include "qemu-timer.h" +#include "qdict.h" +#include "qerror.h" #ifdef _WIN32 #include <windows.h> @@ -70,6 +75,17 @@ int qemu_savevm_state_complete(QEMUFile *f); int qemu_savevm_state(QEMUFile *f); int qemu_loadvm_state(QEMUFile *f); +void qemu_errors_to_file(FILE *fp); +void qemu_errors_to_mon(Monitor *mon); +void qemu_errors_to_previous(void); +void qemu_error(const char *fmt, ...) __attribute__ ((format(printf, 1, 2))); +void qemu_error_internal(const char *file, int linenr, const char *func, + const char *fmt, ...) + __attribute__ ((format(printf, 4, 5))); + +#define qemu_error_new(fmt, ...) \ + qemu_error_internal(__FILE__, __LINE__, __func__, fmt, ## __VA_ARGS__) + #ifdef _WIN32 /* Polling handling */ |