mirror of https://github.com/xqemu/xqemu.git
trivial patches for 2014-09-22
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAABAgAGBQJUH9lbAAoJEL7lnXSkw9fb8TYH/iXU1Sbt74zkZX6g9G8TvfEj OY+T9F6IOcdHFNBayEN2X8xNMr//XT4hLlI/Mz+DzWDK4w84Jprny+YgrQHWs6fa yvPuv2FcOSv+Ws/n4e8GWSq89LcsAygIZAUAWwzb49cNRbfSsMDN7yJNUGud6OWx SVsos4keZP/FNMXq2mBnY7zibTfS4ECzYVyzQjrmlMYwao7v1DE11OTkNTgTp9zW 89tJRuFMd8g8kf1viQdbjvsza2eTqaQOBn8+YnwIUQ2JKHKlfh5FHmc4wot+a2ax cGLMLChuggWL28cm+yjSHC9tIDjCrUmRZu2FP2KvoHkCtQuYpQoxgXdIx10AMDs= =5jOt -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-09-22' into staging trivial patches for 2014-09-22 # gpg: Signature made Mon 22 Sep 2014 09:10:03 BST using RSA key ID A4C3D7DB # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" # gpg: aka "Michael Tokarev <mjt@corpit.ru>" # gpg: aka "Michael Tokarev <mjt@debian.org>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D 4324 457C E0A0 8044 65C5 # Subkey fingerprint: 6F67 E18E 7C91 C5B1 5514 66A7 BEE5 9D74 A4C3 D7DB * remotes/mjt/tags/trivial-patches-2014-09-22: arch_init: Setting QEMU_ARCH enum straight pc: Add missing 'static' attribute block: allow creation of fixed vhdx images vl: Print maxmem in hex format for error message configure: trivial fixes xen-hvm.c: Always return -1 when failure occurs in xen_hvm_init() rdma: Fix incorrect description in comments Fix typos and misspellings in comments qemu-char: Permit only a single "stdio" character device Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
17336812c7
|
@ -1593,7 +1593,7 @@ static int vhdx_create_bat(BlockDriverState *bs, BDRVVHDXState *s,
|
|||
bdrv_has_zero_init(bs) == 0) {
|
||||
/* for a fixed file, the default BAT entry is not zero */
|
||||
s->bat = g_try_malloc0(length);
|
||||
if (length && s->bat != NULL) {
|
||||
if (length && s->bat == NULL) {
|
||||
ret = -ENOMEM;
|
||||
goto exit;
|
||||
}
|
||||
|
|
|
@ -1350,7 +1350,7 @@ Advanced options (experts only):
|
|||
--enable-linux-aio enable Linux AIO support
|
||||
--disable-cap-ng disable libcap-ng support
|
||||
--enable-cap-ng enable libcap-ng support
|
||||
--disable-attr disables attr and xattr support
|
||||
--disable-attr disable attr and xattr support
|
||||
--enable-attr enable attr and xattr support
|
||||
--disable-blobs disable installing provided firmware blobs
|
||||
--enable-docs enable documentation build
|
||||
|
@ -1381,7 +1381,7 @@ Advanced options (experts only):
|
|||
--with-vss-sdk=SDK-path enable Windows VSS support in QEMU Guest Agent
|
||||
--with-win-sdk=SDK-path path to Windows Platform SDK (to build VSS .tlb)
|
||||
--disable-seccomp disable seccomp support
|
||||
--enable-seccomp enables seccomp support
|
||||
--enable-seccomp enable seccomp support
|
||||
--with-coroutine=BACKEND coroutine backend. Supported options:
|
||||
gthread, ucontext, sigaltstack, windows
|
||||
--disable-coroutine-pool disable coroutine freelist (worse performance)
|
||||
|
@ -1396,7 +1396,7 @@ Advanced options (experts only):
|
|||
--enable-tpm enable TPM support
|
||||
--disable-libssh2 disable ssh block device support
|
||||
--enable-libssh2 enable ssh block device support
|
||||
--disable-vhdx disables support for the Microsoft VHDX image format
|
||||
--disable-vhdx disable support for the Microsoft VHDX image format
|
||||
--enable-vhdx enable support for the Microsoft VHDX image format
|
||||
--disable-quorum disable quorum block filter support
|
||||
--enable-quorum enable quorum block filter support
|
||||
|
|
|
@ -18,7 +18,7 @@ Contents:
|
|||
* RDMA Migration Protocol Description
|
||||
* Versioning and Capabilities
|
||||
* QEMUFileRDMA Interface
|
||||
* Migration of pc.ram
|
||||
* Migration of VM's ram
|
||||
* Error handling
|
||||
* TODO
|
||||
|
||||
|
@ -149,7 +149,7 @@ The only difference between a SEND message and an RDMA
|
|||
message is that SEND messages cause notifications
|
||||
to be posted to the completion queue (CQ) on the
|
||||
infiniband receiver side, whereas RDMA messages (used
|
||||
for pc.ram) do not (to behave like an actual DMA).
|
||||
for VM's ram) do not (to behave like an actual DMA).
|
||||
|
||||
Messages in infiniband require two things:
|
||||
|
||||
|
@ -355,7 +355,7 @@ If the buffer is empty, then we follow the same steps
|
|||
listed above and issue another "QEMU File" protocol command,
|
||||
asking for a new SEND message to re-fill the buffer.
|
||||
|
||||
Migration of pc.ram:
|
||||
Migration of VM's ram:
|
||||
====================
|
||||
|
||||
At the beginning of the migration, (migration-rdma.c),
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
/* Leave a chunk of memory at the top of RAM for the BIOS ACPI tables
|
||||
* (128K) and other BIOS datastructures (less than 4K reported to be used at
|
||||
* the moment, 32K should be enough for a while). */
|
||||
unsigned acpi_data_size = 0x20000 + 0x8000;
|
||||
static unsigned acpi_data_size = 0x20000 + 0x8000;
|
||||
void pc_set_legacy_acpi_data_size(void)
|
||||
{
|
||||
acpi_data_size = 0x10000;
|
||||
|
|
|
@ -541,7 +541,7 @@ static void *spapr_create_fdt_skel(hwaddr initrd_base,
|
|||
_FDT((fdt_property_cell(fdt, "rtas-error-log-max", RTAS_ERROR_LOG_MAX)));
|
||||
|
||||
/*
|
||||
* According to PAPR, rtas ibm,os-term, does not gaurantee a return
|
||||
* According to PAPR, rtas ibm,os-term does not guarantee a return
|
||||
* back to the guest cpu.
|
||||
*
|
||||
* While an additional ibm,extended-os-term property indicates that
|
||||
|
|
|
@ -6,23 +6,23 @@
|
|||
|
||||
enum {
|
||||
QEMU_ARCH_ALL = -1,
|
||||
QEMU_ARCH_ALPHA = 1,
|
||||
QEMU_ARCH_ARM = 2,
|
||||
QEMU_ARCH_CRIS = 4,
|
||||
QEMU_ARCH_I386 = 8,
|
||||
QEMU_ARCH_M68K = 16,
|
||||
QEMU_ARCH_LM32 = 32,
|
||||
QEMU_ARCH_MICROBLAZE = 64,
|
||||
QEMU_ARCH_MIPS = 128,
|
||||
QEMU_ARCH_PPC = 256,
|
||||
QEMU_ARCH_S390X = 512,
|
||||
QEMU_ARCH_SH4 = 1024,
|
||||
QEMU_ARCH_SPARC = 2048,
|
||||
QEMU_ARCH_XTENSA = 4096,
|
||||
QEMU_ARCH_OPENRISC = 8192,
|
||||
QEMU_ARCH_UNICORE32 = 0x4000,
|
||||
QEMU_ARCH_MOXIE = 0x8000,
|
||||
QEMU_ARCH_TRICORE = 0x10000,
|
||||
QEMU_ARCH_ALPHA = (1 << 0),
|
||||
QEMU_ARCH_ARM = (1 << 1),
|
||||
QEMU_ARCH_CRIS = (1 << 2),
|
||||
QEMU_ARCH_I386 = (1 << 3),
|
||||
QEMU_ARCH_M68K = (1 << 4),
|
||||
QEMU_ARCH_LM32 = (1 << 5),
|
||||
QEMU_ARCH_MICROBLAZE = (1 << 6),
|
||||
QEMU_ARCH_MIPS = (1 << 7),
|
||||
QEMU_ARCH_PPC = (1 << 8),
|
||||
QEMU_ARCH_S390X = (1 << 9),
|
||||
QEMU_ARCH_SH4 = (1 << 10),
|
||||
QEMU_ARCH_SPARC = (1 << 11),
|
||||
QEMU_ARCH_XTENSA = (1 << 12),
|
||||
QEMU_ARCH_OPENRISC = (1 << 13),
|
||||
QEMU_ARCH_UNICORE32 = (1 << 14),
|
||||
QEMU_ARCH_MOXIE = (1 << 15),
|
||||
QEMU_ARCH_TRICORE = (1 << 16),
|
||||
};
|
||||
|
||||
extern const uint32_t arch_type;
|
||||
|
|
|
@ -286,10 +286,10 @@ vcard_emul_rsa_op(VCard *card, VCardKey *key,
|
|||
}
|
||||
}
|
||||
if ((i < buffer_size) && (buffer[i] == 0)) {
|
||||
/* yes, we have a properly formated PKCS #1 signature */
|
||||
/* yes, we have a properly formatted PKCS #1 signature */
|
||||
/*
|
||||
* NOTE: even if we accidentally got an encrypt buffer, which
|
||||
* through shear luck started with 00, 01, ff, 00, it won't matter
|
||||
* through sheer luck started with 00, 01, ff, 00, it won't matter
|
||||
* because the resulting Sign operation will effectively decrypt
|
||||
* the real buffer.
|
||||
*/
|
||||
|
|
|
@ -2523,7 +2523,7 @@ static void *qemu_rdma_data_init(const char *host_port, Error **errp)
|
|||
/*
|
||||
* QEMUFile interface to the control channel.
|
||||
* SEND messages for control only.
|
||||
* pc.ram is handled with regular RDMA messages.
|
||||
* VM's ram is handled with regular RDMA messages.
|
||||
*/
|
||||
static int qemu_rdma_put_buffer(void *opaque, const uint8_t *buf,
|
||||
int64_t pos, int size)
|
||||
|
@ -2539,7 +2539,7 @@ static int qemu_rdma_put_buffer(void *opaque, const uint8_t *buf,
|
|||
|
||||
/*
|
||||
* Push out any writes that
|
||||
* we're queued up for pc.ram.
|
||||
* we're queued up for VM's ram.
|
||||
*/
|
||||
ret = qemu_rdma_write_flush(f, rdma);
|
||||
if (ret < 0) {
|
||||
|
|
10
qemu-char.c
10
qemu-char.c
|
@ -1017,6 +1017,7 @@ static CharDriverState *qemu_chr_open_pipe(ChardevHostdev *opts)
|
|||
/* init terminal so that we can grab keys */
|
||||
static struct termios oldtty;
|
||||
static int old_fd0_flags;
|
||||
static bool stdio_in_use;
|
||||
static bool stdio_allow_signal;
|
||||
|
||||
static void term_exit(void)
|
||||
|
@ -1060,8 +1061,15 @@ static CharDriverState *qemu_chr_open_stdio(ChardevStdio *opts)
|
|||
error_report("cannot use stdio with -daemonize");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (stdio_in_use) {
|
||||
error_report("cannot use stdio by multiple character devices");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
stdio_in_use = true;
|
||||
old_fd0_flags = fcntl(0, F_GETFL);
|
||||
tcgetattr (0, &oldtty);
|
||||
tcgetattr(0, &oldtty);
|
||||
qemu_set_nonblock(0);
|
||||
atexit(term_exit);
|
||||
|
||||
|
|
22
vl.c
22
vl.c
|
@ -3358,34 +3358,34 @@ int main(int argc, char **argv, char **envp)
|
|||
|
||||
sz = qemu_opt_get_size(opts, "maxmem", 0);
|
||||
if (sz < ram_size) {
|
||||
fprintf(stderr, "qemu: invalid -m option value: maxmem "
|
||||
"(%" PRIu64 ") <= initial memory ("
|
||||
RAM_ADDR_FMT ")\n", sz, ram_size);
|
||||
error_report("invalid -m option value: maxmem "
|
||||
"(0x%" PRIx64 ") <= initial memory (0x"
|
||||
RAM_ADDR_FMT ")", sz, ram_size);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
slots = qemu_opt_get_number(opts, "slots", 0);
|
||||
if ((sz > ram_size) && !slots) {
|
||||
fprintf(stderr, "qemu: invalid -m option value: maxmem "
|
||||
"(%" PRIu64 ") more than initial memory ("
|
||||
error_report("invalid -m option value: maxmem "
|
||||
"(0x%" PRIx64 ") more than initial memory (0x"
|
||||
RAM_ADDR_FMT ") but no hotplug slots where "
|
||||
"specified\n", sz, ram_size);
|
||||
"specified", sz, ram_size);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if ((sz <= ram_size) && slots) {
|
||||
fprintf(stderr, "qemu: invalid -m option value: %"
|
||||
error_report("invalid -m option value: %"
|
||||
PRIu64 " hotplug slots where specified but "
|
||||
"maxmem (%" PRIu64 ") <= initial memory ("
|
||||
RAM_ADDR_FMT ")\n", slots, sz, ram_size);
|
||||
"maxmem (0x%" PRIx64 ") <= initial memory (0x"
|
||||
RAM_ADDR_FMT ")", slots, sz, ram_size);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
maxram_size = sz;
|
||||
ram_slots = slots;
|
||||
} else if ((!maxmem_str && slots_str) ||
|
||||
(maxmem_str && !slots_str)) {
|
||||
fprintf(stderr, "qemu: invalid -m option value: missing "
|
||||
"'%s' option\n", slots_str ? "maxmem" : "slots");
|
||||
error_report("invalid -m option value: missing "
|
||||
"'%s' option", slots_str ? "maxmem" : "slots");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -979,6 +979,7 @@ static void xen_wakeup_notifier(Notifier *notifier, void *data)
|
|||
xc_set_hvm_param(xen_xc, xen_domid, HVM_PARAM_ACPI_S_STATE, 0);
|
||||
}
|
||||
|
||||
/* return 0 means OK, or -1 means critical issue -- will exit(1) */
|
||||
int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t *above_4g_mem_size,
|
||||
MemoryRegion **ram_memory)
|
||||
{
|
||||
|
@ -992,15 +993,13 @@ int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t *above_4g_mem_size,
|
|||
state->xce_handle = xen_xc_evtchn_open(NULL, 0);
|
||||
if (state->xce_handle == XC_HANDLER_INITIAL_VALUE) {
|
||||
perror("xen: event channel open");
|
||||
g_free(state);
|
||||
return -errno;
|
||||
return -1;
|
||||
}
|
||||
|
||||
state->xenstore = xs_daemon_open();
|
||||
if (state->xenstore == NULL) {
|
||||
perror("xen: xenstore open");
|
||||
g_free(state);
|
||||
return -errno;
|
||||
return -1;
|
||||
}
|
||||
|
||||
state->exit.notify = xen_exit_notifier;
|
||||
|
@ -1070,7 +1069,7 @@ int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t *above_4g_mem_size,
|
|||
/* Initialize backend core & drivers */
|
||||
if (xen_be_init() != 0) {
|
||||
fprintf(stderr, "%s: xen backend core setup failed\n", __FUNCTION__);
|
||||
exit(1);
|
||||
return -1;
|
||||
}
|
||||
xen_be_register("console", &xen_console_ops);
|
||||
xen_be_register("vkbd", &xen_kbdmouse_ops);
|
||||
|
|
Loading…
Reference in New Issue