Merge remote-tracking branch 'stefanha/trivial-patches' into staging

* stefanha/trivial-patches:
  configure: fix seccomp check
  arch_init.c: add missing '%' symbols before PRIu64 in debug printfs
  kvm: Fix warning from static code analysis
  qapi: Fix enumeration typo error
  console: Clean up bytes per pixel calculation
  Fix copy&paste typos in documentation comments
  linux-user: Remove #if 0'd cpu_get_real_ticks() definition
  ui: Fix spelling in comment (ressource -> resource)
  Spelling fixes in comments and macro names (ressource -> resource)
  Fix spelling (licenced -> licensed) in GPL
  Spelling fixes in comments and documentation
  srp: Don't use QEMU_PACKED for single elements of a structured type
This commit is contained in:
Anthony Liguori 2012-09-17 10:21:42 -05:00
commit 509e9c462d
20 changed files with 48 additions and 63 deletions

View File

@ -562,7 +562,7 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)
if ((i & 63) == 0) { if ((i & 63) == 0) {
uint64_t t1 = (qemu_get_clock_ns(rt_clock) - bwidth) / 1000000; uint64_t t1 = (qemu_get_clock_ns(rt_clock) - bwidth) / 1000000;
if (t1 > MAX_WAIT) { if (t1 > MAX_WAIT) {
DPRINTF("big wait: " PRIu64 " milliseconds, %d iterations\n", DPRINTF("big wait: %" PRIu64 " milliseconds, %d iterations\n",
t1, i); t1, i);
break; break;
} }
@ -587,7 +587,7 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)
expected_time = ram_save_remaining() * TARGET_PAGE_SIZE / bwidth; expected_time = ram_save_remaining() * TARGET_PAGE_SIZE / bwidth;
DPRINTF("ram_save_live: expected(" PRIu64 ") <= max(" PRIu64 ")?\n", DPRINTF("ram_save_live: expected(%" PRIu64 ") <= max(%" PRIu64 ")?\n",
expected_time, migrate_max_downtime()); expected_time, migrate_max_downtime());
if (expected_time <= migrate_max_downtime()) { if (expected_time <= migrate_max_downtime()) {
@ -799,8 +799,8 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
} while (!(flags & RAM_SAVE_FLAG_EOS)); } while (!(flags & RAM_SAVE_FLAG_EOS));
done: done:
DPRINTF("Completed load of VM with exit code %d seq iteration " PRIu64 "\n", DPRINTF("Completed load of VM with exit code %d seq iteration "
ret, seq_iter); "%" PRIu64 "\n", ret, seq_iter);
return ret; return ret;
} }

2
configure vendored
View File

@ -1433,10 +1433,10 @@ if test "$seccomp" != "no" ; then
LIBS=`$pkg_config --libs libseccomp` LIBS=`$pkg_config --libs libseccomp`
seccomp="yes" seccomp="yes"
else else
seccomp="no"
if test "$seccomp" = "yes"; then if test "$seccomp" = "yes"; then
feature_not_found "libseccomp" feature_not_found "libseccomp"
fi fi
seccomp="no"
fi fi
fi fi
########################################## ##########################################

View File

@ -1612,7 +1612,7 @@ PixelFormat qemu_different_endianness_pixelformat(int bpp)
memset(&pf, 0x00, sizeof(PixelFormat)); memset(&pf, 0x00, sizeof(PixelFormat));
pf.bits_per_pixel = bpp; pf.bits_per_pixel = bpp;
pf.bytes_per_pixel = bpp / 8; pf.bytes_per_pixel = DIV_ROUND_UP(bpp, 8);
pf.depth = bpp == 32 ? 24 : bpp; pf.depth = bpp == 32 ? 24 : bpp;
switch (bpp) { switch (bpp) {
@ -1661,13 +1661,12 @@ PixelFormat qemu_default_pixelformat(int bpp)
memset(&pf, 0x00, sizeof(PixelFormat)); memset(&pf, 0x00, sizeof(PixelFormat));
pf.bits_per_pixel = bpp; pf.bits_per_pixel = bpp;
pf.bytes_per_pixel = bpp / 8; pf.bytes_per_pixel = DIV_ROUND_UP(bpp, 8);
pf.depth = bpp == 32 ? 24 : bpp; pf.depth = bpp == 32 ? 24 : bpp;
switch (bpp) { switch (bpp) {
case 15: case 15:
pf.bits_per_pixel = 16; pf.bits_per_pixel = 16;
pf.bytes_per_pixel = 2;
pf.rmask = 0x00007c00; pf.rmask = 0x00007c00;
pf.gmask = 0x000003E0; pf.gmask = 0x000003E0;
pf.bmask = 0x0000001F; pf.bmask = 0x0000001F;

View File

@ -31,7 +31,7 @@ Arguments:
Returns: Returns:
H_SUCCESS : Successully called the RTAS function (RTAS result H_SUCCESS : Successfully called the RTAS function (RTAS result
will have been stored in the parameter block) will have been stored in the parameter block)
H_PARAMETER : Unknown token H_PARAMETER : Unknown token

View File

@ -58,11 +58,11 @@ try ...
xhci controller support xhci controller support
----------------------- -----------------------
There also is xhci host controller support available. It got alot There is also xhci host controller support available. It got a lot
less testing than ehci and there are a bunch of known limitations, so less testing than ehci and there are a bunch of known limitations, so
ehci may work better for you. On the other hand the xhci hardware ehci may work better for you. On the other hand the xhci hardware
design is much more virtualization-friendly, thus xhci emulation uses design is much more virtualization-friendly, thus xhci emulation uses
less ressources (especially cpu). If you wanna give xhci a try less resources (especially cpu). If you want to give xhci a try
use this to add the host controller ... use this to add the host controller ...
qemu -device nec-usb-xhci,id=xhci qemu -device nec-usb-xhci,id=xhci

View File

@ -6,9 +6,9 @@
* *
* Copyright (c) 2008 OKL * Copyright (c) 2008 OKL
* Copyright (c) 2011 NICTA Pty Ltd * Copyright (c) 2011 NICTA Pty Ltd
* Originally Written by Hans Jiang * Originally written by Hans Jiang
* *
* This code is licenced under the GPL version 2 or later. See * This code is licensed under the GPL version 2 or later. See
* the COPYING file in the top-level directory. * the COPYING file in the top-level directory.
* *
* TODO: implement vectors. * TODO: implement vectors.

View File

@ -3,10 +3,10 @@
* *
* Copyright (c) 2008 OK Labs * Copyright (c) 2008 OK Labs
* Copyright (c) 2011 NICTA Pty Ltd * Copyright (c) 2011 NICTA Pty Ltd
* Originally Written by Hans Jiang * Originally written by Hans Jiang
* Updated by Peter Chubb * Updated by Peter Chubb
* *
* This code is licenced under GPL version 2 or later. See * This code is licensed under GPL version 2 or later. See
* the COPYING file in the top-level directory. * the COPYING file in the top-level directory.
* *
*/ */

View File

@ -5,7 +5,7 @@
* Written by Hans at OK-Labs * Written by Hans at OK-Labs
* Updated by Peter Chubb. * Updated by Peter Chubb.
* *
* This code is licenced under the GPL, version 2 or later. * This code is licensed under the GPL, version 2 or later.
* See the file `COPYING' in the top level directory. * See the file `COPYING' in the top level directory.
* *
* It (partially) emulates a Kyoto Microcomputer * It (partially) emulates a Kyoto Microcomputer

View File

@ -177,13 +177,13 @@ struct srp_tsk_mgmt {
uint8_t reserved1[6]; uint8_t reserved1[6];
uint64_t tag; uint64_t tag;
uint8_t reserved2[4]; uint8_t reserved2[4];
uint64_t lun QEMU_PACKED; uint64_t lun;
uint8_t reserved3[2]; uint8_t reserved3[2];
uint8_t tsk_mgmt_func; uint8_t tsk_mgmt_func;
uint8_t reserved4; uint8_t reserved4;
uint64_t task_tag; uint64_t task_tag;
uint8_t reserved5[8]; uint8_t reserved5[8];
}; } QEMU_PACKED;
/* /*
* We need the packed attribute because the SRP spec only aligns the * We need the packed attribute because the SRP spec only aligns the
@ -198,14 +198,14 @@ struct srp_cmd {
uint8_t data_in_desc_cnt; uint8_t data_in_desc_cnt;
uint64_t tag; uint64_t tag;
uint8_t reserved2[4]; uint8_t reserved2[4];
uint64_t lun QEMU_PACKED; uint64_t lun;
uint8_t reserved3; uint8_t reserved3;
uint8_t task_attr; uint8_t task_attr;
uint8_t reserved4; uint8_t reserved4;
uint8_t add_cdb_len; uint8_t add_cdb_len;
uint8_t cdb[16]; uint8_t cdb[16];
uint8_t add_data[0]; uint8_t add_data[0];
}; } QEMU_PACKED;
enum { enum {
SRP_RSP_FLAG_RSPVALID = 1 << 0, SRP_RSP_FLAG_RSPVALID = 1 << 0,

View File

@ -47,13 +47,13 @@ static int xen_host_pci_sysfs_path(const XenHostPCIDevice *d,
} }
/* This size should be enough to read the first 7 lines of a ressource file */ /* This size should be enough to read the first 7 lines of a resource file */
#define XEN_HOST_PCI_RESSOURCE_BUFFER_SIZE 400 #define XEN_HOST_PCI_RESOURCE_BUFFER_SIZE 400
static int xen_host_pci_get_resource(XenHostPCIDevice *d) static int xen_host_pci_get_resource(XenHostPCIDevice *d)
{ {
int i, rc, fd; int i, rc, fd;
char path[PATH_MAX]; char path[PATH_MAX];
char buf[XEN_HOST_PCI_RESSOURCE_BUFFER_SIZE]; char buf[XEN_HOST_PCI_RESOURCE_BUFFER_SIZE];
unsigned long long start, end, flags, size; unsigned long long start, end, flags, size;
char *endptr, *s; char *endptr, *s;
uint8_t type; uint8_t type;

View File

@ -96,7 +96,7 @@ typedef struct XenPTRegion {
* - do NOT use ALL F for init_val, otherwise the tbl will not be registered. * - do NOT use ALL F for init_val, otherwise the tbl will not be registered.
*/ */
/* emulated register infomation */ /* emulated register information */
struct XenPTRegInfo { struct XenPTRegInfo {
uint32_t offset; uint32_t offset;
uint32_t size; uint32_t size;
@ -140,7 +140,7 @@ typedef int (*xen_pt_reg_size_init_fn)
(XenPCIPassthroughState *, const XenPTRegGroupInfo *, (XenPCIPassthroughState *, const XenPTRegGroupInfo *,
uint32_t base_offset, uint8_t *size); uint32_t base_offset, uint8_t *size);
/* emulated register group infomation */ /* emulated register group information */
struct XenPTRegGroupInfo { struct XenPTRegGroupInfo {
uint8_t grp_id; uint8_t grp_id;
XenPTRegisterGroupType grp_type; XenPTRegisterGroupType grp_type;

View File

@ -562,7 +562,7 @@ static int xen_pt_exp_rom_bar_reg_write(XenPCIPassthroughState *s,
return 0; return 0;
} }
/* Header Type0 reg static infomation table */ /* Header Type0 reg static information table */
static XenPTRegInfo xen_pt_emu_reg_header0[] = { static XenPTRegInfo xen_pt_emu_reg_header0[] = {
/* Vendor ID reg */ /* Vendor ID reg */
{ {
@ -753,7 +753,7 @@ static XenPTRegInfo xen_pt_emu_reg_header0[] = {
* Vital Product Data Capability * Vital Product Data Capability
*/ */
/* Vital Product Data Capability Structure reg static infomation table */ /* Vital Product Data Capability Structure reg static information table */
static XenPTRegInfo xen_pt_emu_reg_vpd[] = { static XenPTRegInfo xen_pt_emu_reg_vpd[] = {
{ {
.offset = PCI_CAP_LIST_NEXT, .offset = PCI_CAP_LIST_NEXT,
@ -775,7 +775,7 @@ static XenPTRegInfo xen_pt_emu_reg_vpd[] = {
* Vendor Specific Capability * Vendor Specific Capability
*/ */
/* Vendor Specific Capability Structure reg static infomation table */ /* Vendor Specific Capability Structure reg static information table */
static XenPTRegInfo xen_pt_emu_reg_vendor[] = { static XenPTRegInfo xen_pt_emu_reg_vendor[] = {
{ {
.offset = PCI_CAP_LIST_NEXT, .offset = PCI_CAP_LIST_NEXT,
@ -866,7 +866,7 @@ static int xen_pt_linkctrl2_reg_init(XenPCIPassthroughState *s,
return 0; return 0;
} }
/* PCI Express Capability Structure reg static infomation table */ /* PCI Express Capability Structure reg static information table */
static XenPTRegInfo xen_pt_emu_reg_pcie[] = { static XenPTRegInfo xen_pt_emu_reg_pcie[] = {
/* Next Pointer reg */ /* Next Pointer reg */
{ {
@ -981,7 +981,7 @@ static int xen_pt_pmcsr_reg_write(XenPCIPassthroughState *s,
return 0; return 0;
} }
/* Power Management Capability reg static infomation table */ /* Power Management Capability reg static information table */
static XenPTRegInfo xen_pt_emu_reg_pm[] = { static XenPTRegInfo xen_pt_emu_reg_pm[] = {
/* Next Pointer reg */ /* Next Pointer reg */
{ {
@ -1259,7 +1259,7 @@ static int xen_pt_msgdata_reg_write(XenPCIPassthroughState *s,
return 0; return 0;
} }
/* MSI Capability Structure reg static infomation table */ /* MSI Capability Structure reg static information table */
static XenPTRegInfo xen_pt_emu_reg_msi[] = { static XenPTRegInfo xen_pt_emu_reg_msi[] = {
/* Next Pointer reg */ /* Next Pointer reg */
{ {
@ -1396,7 +1396,7 @@ static int xen_pt_msixctrl_reg_write(XenPCIPassthroughState *s,
return 0; return 0;
} }
/* MSI-X Capability Structure reg static infomation table */ /* MSI-X Capability Structure reg static information table */
static XenPTRegInfo xen_pt_emu_reg_msix[] = { static XenPTRegInfo xen_pt_emu_reg_msix[] = {
/* Next Pointer reg */ /* Next Pointer reg */
{ {

View File

@ -1410,13 +1410,11 @@ int kvm_init(void)
return 0; return 0;
err: err:
if (s) { if (s->vmfd >= 0) {
if (s->vmfd >= 0) { close(s->vmfd);
close(s->vmfd); }
} if (s->fd != -1) {
if (s->fd != -1) { close(s->fd);
close(s->fd);
}
} }
g_free(s); g_free(s);

View File

@ -89,19 +89,6 @@ int cpu_get_pic_interrupt(CPUX86State *env)
} }
#endif #endif
/* timers for rdtsc */
#if 0
static uint64_t emu_time;
int64_t cpu_get_real_ticks(void)
{
return emu_time++;
}
#endif
#if defined(CONFIG_USE_NPTL) #if defined(CONFIG_USE_NPTL)
/***********************************************************/ /***********************************************************/
/* Helper routines for implementing atomic operations. */ /* Helper routines for implementing atomic operations. */

View File

@ -253,9 +253,9 @@ void memory_region_init_ram(MemoryRegion *mr,
uint64_t size); uint64_t size);
/** /**
* memory_region_init_ram: Initialize RAM memory region from a user-provided. * memory_region_init_ram_ptr: Initialize RAM memory region from a
* pointer. Accesses into the region will modify * user-provided pointer. Accesses into the
* memory directly. * region will modify memory directly.
* *
* @mr: the #MemoryRegion to be initialized. * @mr: the #MemoryRegion to be initialized.
* @name: the name of the region. * @name: the name of the region.
@ -607,7 +607,8 @@ void memory_region_add_subregion(MemoryRegion *mr,
target_phys_addr_t offset, target_phys_addr_t offset,
MemoryRegion *subregion); MemoryRegion *subregion);
/** /**
* memory_region_add_subregion: Add a subregion to a container, with overlap. * memory_region_add_subregion_overlap: Add a subregion to a container
* with overlap.
* *
* Adds a subregion at @offset. The subregion may overlap with other * Adds a subregion at @offset. The subregion may overlap with other
* subregions. Conflicts are resolved by having a higher @priority hide a * subregions. Conflicts are resolved by having a higher @priority hide a
@ -769,7 +770,7 @@ void memory_listener_unregister(MemoryListener *listener);
void memory_global_dirty_log_start(void); void memory_global_dirty_log_start(void);
/** /**
* memory_global_dirty_log_stop: begin dirty logging for all regions * memory_global_dirty_log_stop: end dirty logging for all regions
*/ */
void memory_global_dirty_log_stop(void); void memory_global_dirty_log_stop(void);

View File

@ -293,7 +293,7 @@
## ##
# @GuestFsFreezeStatus # @GuestFsFreezeStatus
# #
# An enumation of filesystem freeze states # An enumeration of filesystem freeze states
# #
# @thawed: filesystems thawed/unfrozen # @thawed: filesystems thawed/unfrozen
# #

View File

@ -118,7 +118,7 @@
## ##
# @RunState # @RunState
# #
# An enumation of VM run states. # An enumeration of VM run states.
# #
# @debug: QEMU is running on a debugger # @debug: QEMU is running on a debugger
# #
@ -785,7 +785,7 @@
## ##
# @SpiceQueryMouseMode # @SpiceQueryMouseMode
# #
# An enumation of Spice mouse states. # An enumeration of Spice mouse states.
# #
# @client: Mouse cursor position is determined by the client. # @client: Mouse cursor position is determined by the client.
# #

View File

@ -89,7 +89,7 @@ static void help(void)
" '-r' tries to repair any inconsistencies that are found during the check.\n" " '-r' tries to repair any inconsistencies that are found during the check.\n"
" '-r leaks' repairs only cluster leaks, whereas '-r all' fixes all\n" " '-r leaks' repairs only cluster leaks, whereas '-r all' fixes all\n"
" kinds of errors, with a higher risk of choosing the wrong fix or\n" " kinds of errors, with a higher risk of choosing the wrong fix or\n"
" hiding corruption that has already occured.\n" " hiding corruption that has already occurred.\n"
"\n" "\n"
"Parameters to snapshot subcommand:\n" "Parameters to snapshot subcommand:\n"
" 'snapshot' is the name of the snapshot to create, apply or delete\n" " 'snapshot' is the name of the snapshot to create, apply or delete\n"

View File

@ -87,7 +87,7 @@ Perform a consistency check on the disk image @var{filename}.
If @code{-r} is specified, qemu-img tries to repair any inconsistencies found If @code{-r} is specified, qemu-img tries to repair any inconsistencies found
during the check. @code{-r leaks} repairs only cluster leaks, whereas during the check. @code{-r leaks} repairs only cluster leaks, whereas
@code{-r all} fixes all kinds of errors, with a higher risk of choosing the @code{-r all} fixes all kinds of errors, with a higher risk of choosing the
wrong fix or hiding corruption that has already occured. wrong fix or hiding corruption that has already occurred.
Only the formats @code{qcow2}, @code{qed} and @code{vdi} support Only the formats @code{qcow2}, @code{qed} and @code{vdi} support
consistency checks. consistency checks.

View File

@ -312,7 +312,7 @@ static void qemu_spice_create_update(SimpleSpiceDisplay *ssd)
} }
/* /*
* Called from spice server thread context (via interface_release_ressource) * Called from spice server thread context (via interface_release_resource)
* We do *not* hold the global qemu mutex here, so extra care is needed * We do *not* hold the global qemu mutex here, so extra care is needed
* when calling qemu functions. QEMU interfaces used: * when calling qemu functions. QEMU interfaces used:
* - g_free (underlying glibc free is re-entrant). * - g_free (underlying glibc free is re-entrant).