mirror of https://gitee.com/openkylin/qemu.git
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:
commit
509e9c462d
|
@ -562,7 +562,7 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)
|
|||
if ((i & 63) == 0) {
|
||||
uint64_t t1 = (qemu_get_clock_ns(rt_clock) - bwidth) / 1000000;
|
||||
if (t1 > MAX_WAIT) {
|
||||
DPRINTF("big wait: " PRIu64 " milliseconds, %d iterations\n",
|
||||
DPRINTF("big wait: %" PRIu64 " milliseconds, %d iterations\n",
|
||||
t1, i);
|
||||
break;
|
||||
}
|
||||
|
@ -587,7 +587,7 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)
|
|||
|
||||
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());
|
||||
|
||||
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));
|
||||
|
||||
done:
|
||||
DPRINTF("Completed load of VM with exit code %d seq iteration " PRIu64 "\n",
|
||||
ret, seq_iter);
|
||||
DPRINTF("Completed load of VM with exit code %d seq iteration "
|
||||
"%" PRIu64 "\n", ret, seq_iter);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -1433,10 +1433,10 @@ if test "$seccomp" != "no" ; then
|
|||
LIBS=`$pkg_config --libs libseccomp`
|
||||
seccomp="yes"
|
||||
else
|
||||
seccomp="no"
|
||||
if test "$seccomp" = "yes"; then
|
||||
feature_not_found "libseccomp"
|
||||
fi
|
||||
seccomp="no"
|
||||
fi
|
||||
fi
|
||||
##########################################
|
||||
|
|
|
@ -1612,7 +1612,7 @@ PixelFormat qemu_different_endianness_pixelformat(int bpp)
|
|||
memset(&pf, 0x00, sizeof(PixelFormat));
|
||||
|
||||
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;
|
||||
|
||||
switch (bpp) {
|
||||
|
@ -1661,13 +1661,12 @@ PixelFormat qemu_default_pixelformat(int bpp)
|
|||
memset(&pf, 0x00, sizeof(PixelFormat));
|
||||
|
||||
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;
|
||||
|
||||
switch (bpp) {
|
||||
case 15:
|
||||
pf.bits_per_pixel = 16;
|
||||
pf.bytes_per_pixel = 2;
|
||||
pf.rmask = 0x00007c00;
|
||||
pf.gmask = 0x000003E0;
|
||||
pf.bmask = 0x0000001F;
|
||||
|
|
|
@ -31,7 +31,7 @@ Arguments:
|
|||
|
||||
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)
|
||||
H_PARAMETER : Unknown token
|
||||
|
||||
|
|
|
@ -58,11 +58,11 @@ try ...
|
|||
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
|
||||
ehci may work better for you. On the other hand the xhci hardware
|
||||
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 ...
|
||||
|
||||
qemu -device nec-usb-xhci,id=xhci
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
*
|
||||
* Copyright (c) 2008 OKL
|
||||
* 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.
|
||||
*
|
||||
* TODO: implement vectors.
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
*
|
||||
* Copyright (c) 2008 OK Labs
|
||||
* Copyright (c) 2011 NICTA Pty Ltd
|
||||
* Originally Written by Hans Jiang
|
||||
* Originally written by Hans Jiang
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
|
2
hw/kzm.c
2
hw/kzm.c
|
@ -5,7 +5,7 @@
|
|||
* Written by Hans at OK-Labs
|
||||
* 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.
|
||||
*
|
||||
* It (partially) emulates a Kyoto Microcomputer
|
||||
|
|
8
hw/srp.h
8
hw/srp.h
|
@ -177,13 +177,13 @@ struct srp_tsk_mgmt {
|
|||
uint8_t reserved1[6];
|
||||
uint64_t tag;
|
||||
uint8_t reserved2[4];
|
||||
uint64_t lun QEMU_PACKED;
|
||||
uint64_t lun;
|
||||
uint8_t reserved3[2];
|
||||
uint8_t tsk_mgmt_func;
|
||||
uint8_t reserved4;
|
||||
uint64_t task_tag;
|
||||
uint8_t reserved5[8];
|
||||
};
|
||||
} QEMU_PACKED;
|
||||
|
||||
/*
|
||||
* 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;
|
||||
uint64_t tag;
|
||||
uint8_t reserved2[4];
|
||||
uint64_t lun QEMU_PACKED;
|
||||
uint64_t lun;
|
||||
uint8_t reserved3;
|
||||
uint8_t task_attr;
|
||||
uint8_t reserved4;
|
||||
uint8_t add_cdb_len;
|
||||
uint8_t cdb[16];
|
||||
uint8_t add_data[0];
|
||||
};
|
||||
} QEMU_PACKED;
|
||||
|
||||
enum {
|
||||
SRP_RSP_FLAG_RSPVALID = 1 << 0,
|
||||
|
|
|
@ -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 */
|
||||
#define XEN_HOST_PCI_RESSOURCE_BUFFER_SIZE 400
|
||||
/* This size should be enough to read the first 7 lines of a resource file */
|
||||
#define XEN_HOST_PCI_RESOURCE_BUFFER_SIZE 400
|
||||
static int xen_host_pci_get_resource(XenHostPCIDevice *d)
|
||||
{
|
||||
int i, rc, fd;
|
||||
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;
|
||||
char *endptr, *s;
|
||||
uint8_t type;
|
||||
|
|
|
@ -96,7 +96,7 @@ typedef struct XenPTRegion {
|
|||
* - do NOT use ALL F for init_val, otherwise the tbl will not be registered.
|
||||
*/
|
||||
|
||||
/* emulated register infomation */
|
||||
/* emulated register information */
|
||||
struct XenPTRegInfo {
|
||||
uint32_t offset;
|
||||
uint32_t size;
|
||||
|
@ -140,7 +140,7 @@ typedef int (*xen_pt_reg_size_init_fn)
|
|||
(XenPCIPassthroughState *, const XenPTRegGroupInfo *,
|
||||
uint32_t base_offset, uint8_t *size);
|
||||
|
||||
/* emulated register group infomation */
|
||||
/* emulated register group information */
|
||||
struct XenPTRegGroupInfo {
|
||||
uint8_t grp_id;
|
||||
XenPTRegisterGroupType grp_type;
|
||||
|
|
|
@ -562,7 +562,7 @@ static int xen_pt_exp_rom_bar_reg_write(XenPCIPassthroughState *s,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Header Type0 reg static infomation table */
|
||||
/* Header Type0 reg static information table */
|
||||
static XenPTRegInfo xen_pt_emu_reg_header0[] = {
|
||||
/* Vendor ID reg */
|
||||
{
|
||||
|
@ -753,7 +753,7 @@ static XenPTRegInfo xen_pt_emu_reg_header0[] = {
|
|||
* 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[] = {
|
||||
{
|
||||
.offset = PCI_CAP_LIST_NEXT,
|
||||
|
@ -775,7 +775,7 @@ static XenPTRegInfo xen_pt_emu_reg_vpd[] = {
|
|||
* 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[] = {
|
||||
{
|
||||
.offset = PCI_CAP_LIST_NEXT,
|
||||
|
@ -866,7 +866,7 @@ static int xen_pt_linkctrl2_reg_init(XenPCIPassthroughState *s,
|
|||
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[] = {
|
||||
/* Next Pointer reg */
|
||||
{
|
||||
|
@ -981,7 +981,7 @@ static int xen_pt_pmcsr_reg_write(XenPCIPassthroughState *s,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Power Management Capability reg static infomation table */
|
||||
/* Power Management Capability reg static information table */
|
||||
static XenPTRegInfo xen_pt_emu_reg_pm[] = {
|
||||
/* Next Pointer reg */
|
||||
{
|
||||
|
@ -1259,7 +1259,7 @@ static int xen_pt_msgdata_reg_write(XenPCIPassthroughState *s,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* MSI Capability Structure reg static infomation table */
|
||||
/* MSI Capability Structure reg static information table */
|
||||
static XenPTRegInfo xen_pt_emu_reg_msi[] = {
|
||||
/* Next Pointer reg */
|
||||
{
|
||||
|
@ -1396,7 +1396,7 @@ static int xen_pt_msixctrl_reg_write(XenPCIPassthroughState *s,
|
|||
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[] = {
|
||||
/* Next Pointer reg */
|
||||
{
|
||||
|
|
12
kvm-all.c
12
kvm-all.c
|
@ -1410,13 +1410,11 @@ int kvm_init(void)
|
|||
return 0;
|
||||
|
||||
err:
|
||||
if (s) {
|
||||
if (s->vmfd >= 0) {
|
||||
close(s->vmfd);
|
||||
}
|
||||
if (s->fd != -1) {
|
||||
close(s->fd);
|
||||
}
|
||||
if (s->vmfd >= 0) {
|
||||
close(s->vmfd);
|
||||
}
|
||||
if (s->fd != -1) {
|
||||
close(s->fd);
|
||||
}
|
||||
g_free(s);
|
||||
|
||||
|
|
|
@ -89,19 +89,6 @@ int cpu_get_pic_interrupt(CPUX86State *env)
|
|||
}
|
||||
#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)
|
||||
/***********************************************************/
|
||||
/* Helper routines for implementing atomic operations. */
|
||||
|
|
11
memory.h
11
memory.h
|
@ -253,9 +253,9 @@ void memory_region_init_ram(MemoryRegion *mr,
|
|||
uint64_t size);
|
||||
|
||||
/**
|
||||
* memory_region_init_ram: Initialize RAM memory region from a user-provided.
|
||||
* pointer. Accesses into the region will modify
|
||||
* memory directly.
|
||||
* memory_region_init_ram_ptr: Initialize RAM memory region from a
|
||||
* user-provided pointer. Accesses into the
|
||||
* region will modify memory directly.
|
||||
*
|
||||
* @mr: the #MemoryRegion to be initialized.
|
||||
* @name: the name of the region.
|
||||
|
@ -607,7 +607,8 @@ void memory_region_add_subregion(MemoryRegion *mr,
|
|||
target_phys_addr_t offset,
|
||||
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
|
||||
* 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);
|
||||
|
||||
/**
|
||||
* 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);
|
||||
|
||||
|
|
|
@ -293,7 +293,7 @@
|
|||
##
|
||||
# @GuestFsFreezeStatus
|
||||
#
|
||||
# An enumation of filesystem freeze states
|
||||
# An enumeration of filesystem freeze states
|
||||
#
|
||||
# @thawed: filesystems thawed/unfrozen
|
||||
#
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
##
|
||||
# @RunState
|
||||
#
|
||||
# An enumation of VM run states.
|
||||
# An enumeration of VM run states.
|
||||
#
|
||||
# @debug: QEMU is running on a debugger
|
||||
#
|
||||
|
@ -785,7 +785,7 @@
|
|||
##
|
||||
# @SpiceQueryMouseMode
|
||||
#
|
||||
# An enumation of Spice mouse states.
|
||||
# An enumeration of Spice mouse states.
|
||||
#
|
||||
# @client: Mouse cursor position is determined by the client.
|
||||
#
|
||||
|
|
|
@ -89,7 +89,7 @@ static void help(void)
|
|||
" '-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"
|
||||
" 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"
|
||||
"Parameters to snapshot subcommand:\n"
|
||||
" 'snapshot' is the name of the snapshot to create, apply or delete\n"
|
||||
|
|
|
@ -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
|
||||
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
|
||||
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
|
||||
consistency checks.
|
||||
|
|
|
@ -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
|
||||
* when calling qemu functions. QEMU interfaces used:
|
||||
* - g_free (underlying glibc free is re-entrant).
|
||||
|
|
Loading…
Reference in New Issue