* [Qemu-devel] [PULL v2 00/52] Misc changes for 2015-09-25
@ 2015-09-25 16:51 Paolo Bonzini
2015-09-25 16:51 ` [Qemu-devel] [PULL 25/52] hmp: added io apic dump state Paolo Bonzini
` (6 more replies)
0 siblings, 7 replies; 9+ messages in thread
From: Paolo Bonzini @ 2015-09-25 16:51 UTC (permalink / raw)
To: qemu-devel
The following changes since commit 8a47d575dfac0f6675e2ac56c5921cc520d021a6:
Merge remote-tracking branch 'remotes/weil/tags/pull-wxx-20150924' into staging (2015-09-24 22:09:41 +0100)
are available in the git repository at:
git://github.com/bonzini/qemu.git tags/for-upstream
for you to fetch changes up to 8e9620a683925daf9900c2ac5f2dfa14b6439932:
doc: Refresh URLs in the qemu-tech documentation (2015-09-25 12:20:21 +0200)
----------------------------------------------------------------
* First batch of MAINTAINERS updates
* IOAPIC fixes (to pass kvm-unit-tests with -machine kernel_irqchip=off)
* NBD API upgrades from Daniel
* strtosz fixes from Marc-André
* improved support for readonly=on on scsi-generic devices
* new "info ioapic" and "info lapic" monitor commands
* Peter Crosthwaite's ELF_MACHINE cleanups
* docs patches from Thomas and Daniel
----------------------------------------------------------------
Daniel P. Berrange (4):
nbd: convert to use the QAPI SocketAddress object
qemu-nbd: convert to use the QAPI SocketAddress object
Makefile: fix build when VPATH is outside GIT tree
docs: describe the QEMU build system structure / design
Marc-André Lureau (3):
utils: rename strtosz to use qemu prefix
tests: add some qemu_strtosz() tests
vhost-scsi: include linux/vhost.h
Paolo Bonzini (11):
checkpatch: do not recommend qemu_strtok over strtok
scsi-generic: let guests recognize readonly=on on passthrough devices
get_maintainer.pl: \C is deprecated
MAINTAINERS: there is no PPC64 TCG backend anymore
MAINTAINERS: Add disassemblers to the various backends
MAINTAINERS: Add more s390 files
MAINTAINERS: add IPack section
MAINTAINERS: add maintainer for character device front-ends
MAINTAINERS: add maintainer for network device front-ends
ioapic: coalesce level interrupts
ioapic: fix contents of arbitration register
Pavel Butsykin (9):
apic_internal.h: make some apic_get_* functions externally visible
apic_internal.h: rename ESR_ILLEGAL_ADDRESS to APIC_ESR_ILLEGAL_ADDRESS
apic_internal.h: added more constants
apic_internal.h: fix formatting and drop unused consts
monitor: make monitor_fprintf and mon_get_cpu externally visible
hmp: added local apic dump state
ioapic_internal.h: added more constants
hmp: added io apic dump state
hmp: implemented io apic dump state for TCG
Pavel Dovgalyuk (3):
i386: partial revert of interrupt poll fix
i386: interrupt poll processing
typedef: add typedef for QemuOpts
Peter Crosthwaite (21):
linux_user: elfload: Default ELF_MACHINE to ELF_ARCH
linux-user: elfload: Provide default for elf_check_arch
elf_ops: Fix coding style for EM alias case statement
elf: Update EM_MOXIE definition
arm: Remove ELF_MACHINE from cpu.h
mb: Remove ELF_MACHINE from cpu.h
m68k: Remove ELF_MACHINE from cpu.h
cris: Remove ELF_MACHINE from cpu.h
moxie: Remove ELF_MACHINE from cpu.h
unicore: Remove ELF_MACHINE from cpu.h
lm32: Remove ELF_MACHINE from cpu.h
or32: Remove ELF_MACHINE from cpu.h
tricore: Remove ELF_MACHINE from cpu.h
xtensa: Remove ELF_MACHINE from cpu.h
sh4: Remove ELF_MACHINE from cpu.h
s390: Remove ELF_MACHINE from cpu.h
sparc: Remove ELF_MACHINE from cpu.h
mips: Remove ELF_MACHINE from cpu.h
alpha: Remove ELF_MACHINE from cpu.h
i386: Rename ELF_MACHINE to be x86 specific
ppc: Rename ELF_MACHINE to be PPC specific
Thomas Huth (1):
doc: Refresh URLs in the qemu-tech documentation
MAINTAINERS | 58 ++++-
Makefile | 3 +-
block/nbd.c | 71 +++---
cpu-exec.c | 9 +
disas.c | 10 -
docs/build-system.txt | 507 ++++++++++++++++++++++++++++++++++++++
hmp-commands-info.hx | 32 +++
hw/arm/armv7m.c | 2 +-
hw/cris/boot.c | 2 +-
hw/i386/kvm/ioapic.c | 10 +
hw/i386/multiboot.c | 2 +-
hw/intc/apic.c | 22 +-
hw/intc/ioapic.c | 20 +-
hw/intc/ioapic_common.c | 55 +++++
hw/lm32/lm32_boards.c | 4 +-
hw/lm32/milkymist.c | 2 +-
hw/m68k/an5206.c | 2 +-
hw/m68k/dummy_m68k.c | 2 +-
hw/m68k/mcf5208.c | 2 +-
hw/microblaze/boot.c | 4 +-
hw/mips/mips_fulong2e.c | 2 +-
hw/mips/mips_malta.c | 2 +-
hw/mips/mips_mipssim.c | 2 +-
hw/mips/mips_r4k.c | 2 +-
hw/moxie/moxiesim.c | 4 +-
hw/openrisc/openrisc_sim.c | 2 +-
hw/ppc/e500.c | 2 +-
hw/ppc/mac_newworld.c | 4 +-
hw/ppc/mac_oldworld.c | 4 +-
hw/ppc/ppc440_bamboo.c | 2 +-
hw/ppc/prep.c | 2 +-
hw/ppc/spapr.c | 4 +-
hw/ppc/virtex_ml507.c | 2 +-
hw/s390x/ipl.c | 4 +-
hw/scsi/scsi-generic.c | 14 ++
hw/scsi/vhost-scsi.c | 1 +
hw/sparc/leon3.c | 2 +-
hw/sparc/sun4m.c | 4 +-
hw/sparc64/sun4u.c | 4 +-
hw/tricore/tricore_testboard.c | 2 +-
hw/xtensa/sim.c | 4 +-
hw/xtensa/xtfpga.c | 2 +-
include/elf.h | 3 +
include/hw/elf_ops.h | 23 +-
include/hw/i386/apic_internal.h | 96 +++++++-
include/hw/i386/ioapic_internal.h | 7 +
include/hw/i386/pc.h | 5 +
include/hw/virtio/vhost-scsi.h | 25 --
include/monitor/hmp-target.h | 3 +
include/monitor/monitor.h | 1 +
include/qemu-common.h | 27 +-
include/qemu/option.h | 5 +-
include/qemu/typedefs.h | 3 +
linux-user/elfload.c | 37 +--
monitor.c | 7 +-
qapi/opts-visitor.c | 4 +-
qemu-img.c | 5 +-
qemu-io-cmds.c | 2 +-
qemu-nbd.c | 102 +++-----
qemu-tech.texi | 73 +++---
scripts/checkpatch.pl | 4 +-
scripts/get_maintainer.pl | 22 +-
target-alpha/cpu.h | 2 -
target-arm/cpu.h | 2 -
target-cris/cpu.h | 2 -
target-i386/cpu.c | 14 +-
target-i386/cpu.h | 7 +-
target-i386/helper.c | 191 ++++++++++++++
target-i386/monitor.c | 17 ++
target-i386/seg_helper.c | 3 +
target-lm32/cpu.h | 2 -
target-m68k/cpu.h | 2 -
target-microblaze/cpu.h | 2 -
target-mips/cpu.h | 2 -
target-moxie/cpu.h | 2 -
target-openrisc/cpu.h | 1 -
target-ppc/cpu.h | 4 +-
target-s390x/cpu.h | 1 -
target-sh4/cpu.h | 2 -
target-sparc/cpu.h | 6 -
target-tricore/cpu.h | 2 -
target-unicore32/cpu.h | 2 -
target-xtensa/cpu.h | 1 -
tests/test-cutils.c | 91 +++++++
util/cutils.c | 25 +-
85 files changed, 1341 insertions(+), 386 deletions(-)
create mode 100644 docs/build-system.txt
--
2.5.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Qemu-devel] [PULL 25/52] hmp: added io apic dump state
2015-09-25 16:51 [Qemu-devel] [PULL v2 00/52] Misc changes for 2015-09-25 Paolo Bonzini
@ 2015-09-25 16:51 ` Paolo Bonzini
2015-09-25 16:51 ` [Qemu-devel] [PULL 48/52] i386: partial revert of interrupt poll fix Paolo Bonzini
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Paolo Bonzini @ 2015-09-25 16:51 UTC (permalink / raw)
To: qemu-devel; +Cc: Denis V. Lunev, Andreas Färber, Pavel Butsykin
From: Pavel Butsykin <pbutsykin@virtuozzo.com>
Added the hmp command to query io apic state, may be usefull after guest
crashes to understand IRQ routing in guest.
Implementation is only for kvm here. The dump will look like
(qemu) info ioapic
ioapic id=0x00 sel=0x26 (redir[11])
pin 0 0x0000000000010000 dest=0 vec=0 active-hi edge masked fixed physical
pin 1 0x0000000000000031 dest=0 vec=49 active-hi edge fixed physical
...
pin 23 0x0000000000010000 dest=0 vec=0 active-hi edge masked fixed physical
IRR (none)
Remote IRR (none)
Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Andreas Färber <afaerber@suse.de>
Message-Id: <1442927901-1084-9-git-send-email-den@openvz.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hmp-commands-info.hx | 16 ++++++++++++
hw/i386/kvm/ioapic.c | 10 +++++++
hw/intc/ioapic_common.c | 55 +++++++++++++++++++++++++++++++++++++++
include/hw/i386/ioapic_internal.h | 2 ++
include/hw/i386/pc.h | 4 +++
include/monitor/hmp-target.h | 1 +
target-i386/monitor.c | 9 +++++++
7 files changed, 97 insertions(+)
diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx
index b02876c..9b71351 100644
--- a/hmp-commands-info.hx
+++ b/hmp-commands-info.hx
@@ -128,6 +128,22 @@ STEXI
Show local APIC state
ETEXI
+#if defined(TARGET_I386)
+ {
+ .name = "ioapic",
+ .args_type = "",
+ .params = "",
+ .help = "show io apic state",
+ .mhandler.cmd = hmp_info_io_apic,
+ },
+#endif
+
+STEXI
+@item info ioapic
+@findex ioapic
+Show io APIC state
+ETEXI
+
{
.name = "cpus",
.args_type = "",
diff --git a/hw/i386/kvm/ioapic.c b/hw/i386/kvm/ioapic.c
index d2a6c4c..b7390ca 100644
--- a/hw/i386/kvm/ioapic.c
+++ b/hw/i386/kvm/ioapic.c
@@ -10,6 +10,7 @@
* See the COPYING file in the top-level directory.
*/
+#include "monitor/monitor.h"
#include "hw/i386/pc.h"
#include "hw/i386/ioapic_internal.h"
#include "hw/i386/apic_internal.h"
@@ -110,6 +111,15 @@ static void kvm_ioapic_put(IOAPICCommonState *s)
}
}
+void kvm_ioapic_dump_state(Monitor *mon, const QDict *qdict)
+{
+ IOAPICCommonState s;
+
+ kvm_ioapic_get(&s);
+
+ ioapic_print_redtbl(mon, &s);
+}
+
static void kvm_ioapic_reset(DeviceState *dev)
{
IOAPICCommonState *s = IOAPIC_COMMON(dev);
diff --git a/hw/intc/ioapic_common.c b/hw/intc/ioapic_common.c
index 8b7d118..65f6877 100644
--- a/hw/intc/ioapic_common.c
+++ b/hw/intc/ioapic_common.c
@@ -19,6 +19,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "monitor/monitor.h"
#include "hw/i386/ioapic.h"
#include "hw/i386/ioapic_internal.h"
#include "hw/sysbus.h"
@@ -31,6 +32,60 @@
*/
int ioapic_no;
+static void ioapic_irr_dump(Monitor *mon, const char *name, uint32_t bitmap)
+{
+ int i;
+
+ monitor_printf(mon, "%-10s ", name);
+ if (bitmap == 0) {
+ monitor_printf(mon, "(none)\n");
+ return;
+ }
+ for (i = 0; i < IOAPIC_NUM_PINS; i++) {
+ if (bitmap & (1 << i)) {
+ monitor_printf(mon, "%-2u ", i);
+ }
+ }
+ monitor_printf(mon, "\n");
+}
+
+void ioapic_print_redtbl(Monitor *mon, IOAPICCommonState *s)
+{
+ static const char *delm_str[] = {
+ "fixed", "lowest", "SMI", "...", "NMI", "INIT", "...", "extINT"};
+ uint32_t remote_irr = 0;
+ int i;
+
+ monitor_printf(mon, "ioapic id=0x%02x sel=0x%02x", s->id, s->ioregsel);
+ if (s->ioregsel) {
+ monitor_printf(mon, " (redir[%u])\n",
+ (s->ioregsel - IOAPIC_REG_REDTBL_BASE) >> 1);
+ } else {
+ monitor_printf(mon, "\n");
+ }
+ for (i = 0; i < IOAPIC_NUM_PINS; i++) {
+ uint64_t entry = s->ioredtbl[i];
+ uint32_t delm = (uint32_t)((entry & IOAPIC_LVT_DELIV_MODE) >>
+ IOAPIC_LVT_DELIV_MODE_SHIFT);
+ monitor_printf(mon, "pin %-2u 0x%016"PRIx64" dest=%"PRIx64
+ " vec=%-3"PRIu64" %s %-5s %-6s %-6s %s\n",
+ i, entry,
+ (entry >> IOAPIC_LVT_DEST_SHIFT) &
+ (entry & IOAPIC_LVT_DEST_MODE ? 0xff : 0xf),
+ entry & IOAPIC_VECTOR_MASK,
+ entry & IOAPIC_LVT_POLARITY ? "active-lo" : "active-hi",
+ entry & IOAPIC_LVT_TRIGGER_MODE ? "level" : "edge",
+ entry & IOAPIC_LVT_MASKED ? "masked" : "",
+ delm_str[delm],
+ entry & IOAPIC_LVT_DEST_MODE ? "logical" : "physical");
+
+ remote_irr |= entry & IOAPIC_LVT_TRIGGER_MODE ?
+ (entry & IOAPIC_LVT_REMOTE_IRR ? (1 << i) : 0) : 0;
+ }
+ ioapic_irr_dump(mon, "IRR", s->irr);
+ ioapic_irr_dump(mon, "Remote IRR", remote_irr);
+}
+
void ioapic_reset_common(DeviceState *dev)
{
IOAPICCommonState *s = IOAPIC_COMMON(dev);
diff --git a/include/hw/i386/ioapic_internal.h b/include/hw/i386/ioapic_internal.h
index 4f7764e..797ed47 100644
--- a/include/hw/i386/ioapic_internal.h
+++ b/include/hw/i386/ioapic_internal.h
@@ -105,4 +105,6 @@ struct IOAPICCommonState {
void ioapic_reset_common(DeviceState *dev);
+void ioapic_print_redtbl(Monitor *mon, IOAPICCommonState *s);
+
#endif /* !QEMU_IOAPIC_INTERNAL_H */
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 3e002c9..539cf64 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -123,6 +123,10 @@ int pic_get_output(DeviceState *d);
void hmp_info_pic(Monitor *mon, const QDict *qdict);
void hmp_info_irq(Monitor *mon, const QDict *qdict);
+/* ioapic.c */
+
+void kvm_ioapic_dump_state(Monitor *mon, const QDict *qdict);
+
/* Global System Interrupts */
#define GSI_NUM_PINS IOAPIC_NUM_PINS
diff --git a/include/monitor/hmp-target.h b/include/monitor/hmp-target.h
index be50577..213566c 100644
--- a/include/monitor/hmp-target.h
+++ b/include/monitor/hmp-target.h
@@ -43,5 +43,6 @@ void hmp_info_mem(Monitor *mon, const QDict *qdict);
void hmp_info_tlb(Monitor *mon, const QDict *qdict);
void hmp_mce(Monitor *mon, const QDict *qdict);
void hmp_info_local_apic(Monitor *mon, const QDict *qdict);
+void hmp_info_io_apic(Monitor *mon, const QDict *qdict);
#endif /* MONITOR_COMMON */
diff --git a/target-i386/monitor.c b/target-i386/monitor.c
index 9479a77..829fff9 100644
--- a/target-i386/monitor.c
+++ b/target-i386/monitor.c
@@ -24,6 +24,8 @@
#include "cpu.h"
#include "monitor/monitor.h"
#include "monitor/hmp-target.h"
+#include "hw/i386/pc.h"
+#include "sysemu/kvm.h"
#include "hmp.h"
@@ -498,3 +500,10 @@ void hmp_info_local_apic(Monitor *mon, const QDict *qdict)
x86_cpu_dump_local_apic_state(mon_get_cpu(), (FILE *)mon, monitor_fprintf,
CPU_DUMP_FPU);
}
+
+void hmp_info_io_apic(Monitor *mon, const QDict *qdict)
+{
+ if (kvm_irqchip_in_kernel()) {
+ kvm_ioapic_dump_state(mon, qdict);
+ }
+}
--
2.5.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Qemu-devel] [PULL 48/52] i386: partial revert of interrupt poll fix
2015-09-25 16:51 [Qemu-devel] [PULL v2 00/52] Misc changes for 2015-09-25 Paolo Bonzini
2015-09-25 16:51 ` [Qemu-devel] [PULL 25/52] hmp: added io apic dump state Paolo Bonzini
@ 2015-09-25 16:51 ` Paolo Bonzini
2015-09-25 16:51 ` [Qemu-devel] [PULL 49/52] i386: interrupt poll processing Paolo Bonzini
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Paolo Bonzini @ 2015-09-25 16:51 UTC (permalink / raw)
To: qemu-devel; +Cc: Pavel Dovgalyuk
From: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
Processing CPU_INTERRUPT_POLL requests in cpu_has_work functions
break the determinism of cpu_exec. This patch is required to make
interrupts processing deterministic.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
Message-Id: <20150917162331.8676.15286.stgit@PASHA-ISP.def.inno>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
cpu-exec.c | 9 +++++++++
target-i386/cpu.c | 10 ++--------
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/cpu-exec.c b/cpu-exec.c
index 947e646..8fd56a6 100644
--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -27,6 +27,9 @@
#include "exec/address-spaces.h"
#include "qemu/rcu.h"
#include "exec/tb-hash.h"
+#if defined(TARGET_I386) && !defined(CONFIG_USER_ONLY)
+#include "hw/i386/apic.h"
+#endif
/* -icount align implementation. */
@@ -343,6 +346,12 @@ int cpu_exec(CPUState *cpu)
SyncClocks sc;
if (cpu->halted) {
+#if defined(TARGET_I386) && !defined(CONFIG_USER_ONLY)
+ if (cpu->interrupt_request & CPU_INTERRUPT_POLL) {
+ apic_poll_irq(x86_cpu->apic_state);
+ cpu_reset_interrupt(cpu, CPU_INTERRUPT_POLL);
+ }
+#endif
if (!cpu_has_work(cpu)) {
return EXCP_HALTED;
}
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index d2b6bc5..bd411b9 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -3098,14 +3098,8 @@ static bool x86_cpu_has_work(CPUState *cs)
X86CPU *cpu = X86_CPU(cs);
CPUX86State *env = &cpu->env;
-#if !defined(CONFIG_USER_ONLY)
- if (cs->interrupt_request & CPU_INTERRUPT_POLL) {
- apic_poll_irq(cpu->apic_state);
- cpu_reset_interrupt(cs, CPU_INTERRUPT_POLL);
- }
-#endif
-
- return ((cs->interrupt_request & CPU_INTERRUPT_HARD) &&
+ return ((cs->interrupt_request & (CPU_INTERRUPT_HARD |
+ CPU_INTERRUPT_POLL)) &&
(env->eflags & IF_MASK)) ||
(cs->interrupt_request & (CPU_INTERRUPT_NMI |
CPU_INTERRUPT_INIT |
--
2.5.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Qemu-devel] [PULL 49/52] i386: interrupt poll processing
2015-09-25 16:51 [Qemu-devel] [PULL v2 00/52] Misc changes for 2015-09-25 Paolo Bonzini
2015-09-25 16:51 ` [Qemu-devel] [PULL 25/52] hmp: added io apic dump state Paolo Bonzini
2015-09-25 16:51 ` [Qemu-devel] [PULL 48/52] i386: partial revert of interrupt poll fix Paolo Bonzini
@ 2015-09-25 16:51 ` Paolo Bonzini
2015-09-25 16:51 ` [Qemu-devel] [PULL 50/52] typedef: add typedef for QemuOpts Paolo Bonzini
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Paolo Bonzini @ 2015-09-25 16:51 UTC (permalink / raw)
To: qemu-devel; +Cc: Pavel Dovgalyuk
From: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
This patch updates x86_cpu_exec_interrupt function.
It can process two interrupt request at a time (poll and another one).
This makes its execution non-deterministic. Determinism is requred
for recorded icount execution.
Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
Message-Id: <20150917162410.8676.13042.stgit@PASHA-ISP.def.inno>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target-i386/seg_helper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target-i386/seg_helper.c b/target-i386/seg_helper.c
index 1a3a2e7..1cbe559 100644
--- a/target-i386/seg_helper.c
+++ b/target-i386/seg_helper.c
@@ -1321,6 +1321,9 @@ bool x86_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
if (interrupt_request & CPU_INTERRUPT_POLL) {
cs->interrupt_request &= ~CPU_INTERRUPT_POLL;
apic_poll_irq(cpu->apic_state);
+ /* Don't process multiple interrupt requests in a single call.
+ This is required to make icount-driven execution deterministic. */
+ return true;
}
#endif
if (interrupt_request & CPU_INTERRUPT_SIPI) {
--
2.5.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Qemu-devel] [PULL 50/52] typedef: add typedef for QemuOpts
2015-09-25 16:51 [Qemu-devel] [PULL v2 00/52] Misc changes for 2015-09-25 Paolo Bonzini
` (2 preceding siblings ...)
2015-09-25 16:51 ` [Qemu-devel] [PULL 49/52] i386: interrupt poll processing Paolo Bonzini
@ 2015-09-25 16:51 ` Paolo Bonzini
2015-09-28 6:23 ` Pavel Dovgaluk
2015-09-25 16:51 ` [Qemu-devel] [PULL 51/52] docs: describe the QEMU build system structure / design Paolo Bonzini
` (2 subsequent siblings)
6 siblings, 1 reply; 9+ messages in thread
From: Paolo Bonzini @ 2015-09-25 16:51 UTC (permalink / raw)
To: qemu-devel; +Cc: Pavel Dovgalyuk
From: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
This patch moves typedefs for QemuOpts and related types
to qemu/typedefs.h file.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
Message-Id: <20150917162501.8676.85435.stgit@PASHA-ISP.def.inno>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
include/qemu/option.h | 5 +----
include/qemu/typedefs.h | 3 +++
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/qemu/option.h b/include/qemu/option.h
index 57e51c9..71f5f27 100644
--- a/include/qemu/option.h
+++ b/include/qemu/option.h
@@ -30,6 +30,7 @@
#include "qemu/queue.h"
#include "qapi/error.h"
#include "qapi/qmp/qdict.h"
+#include "qemu/typedefs.h"
const char *get_opt_name(char *buf, int buf_size, const char *p, char delim);
const char *get_opt_value(char *buf, int buf_size, const char *p);
@@ -44,10 +45,6 @@ void parse_option_size(const char *name, const char *value,
bool has_help_option(const char *param);
bool is_valid_option_list(const char *param);
-typedef struct QemuOpt QemuOpt;
-typedef struct QemuOpts QemuOpts;
-typedef struct QemuOptsList QemuOptsList;
-
enum QemuOptType {
QEMU_OPT_STRING = 0, /* no parsing (use string as-is) */
QEMU_OPT_BOOL, /* on/off */
diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
index ce82c64..3a835ff 100644
--- a/include/qemu/typedefs.h
+++ b/include/qemu/typedefs.h
@@ -67,6 +67,9 @@ typedef struct Property Property;
typedef struct QEMUBH QEMUBH;
typedef struct QemuConsole QemuConsole;
typedef struct QEMUFile QEMUFile;
+typedef struct QemuOpt QemuOpt;
+typedef struct QemuOpts QemuOpts;
+typedef struct QemuOptsList QemuOptsList;
typedef struct QEMUSGList QEMUSGList;
typedef struct QEMUSizedBuffer QEMUSizedBuffer;
typedef struct QEMUTimerListGroup QEMUTimerListGroup;
--
2.5.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Qemu-devel] [PULL 51/52] docs: describe the QEMU build system structure / design
2015-09-25 16:51 [Qemu-devel] [PULL v2 00/52] Misc changes for 2015-09-25 Paolo Bonzini
` (3 preceding siblings ...)
2015-09-25 16:51 ` [Qemu-devel] [PULL 50/52] typedef: add typedef for QemuOpts Paolo Bonzini
@ 2015-09-25 16:51 ` Paolo Bonzini
2015-09-25 16:51 ` [Qemu-devel] [PULL 52/52] doc: Refresh URLs in the qemu-tech documentation Paolo Bonzini
2015-09-25 22:11 ` [Qemu-devel] [PULL v2 00/52] Misc changes for 2015-09-25 Peter Maydell
6 siblings, 0 replies; 9+ messages in thread
From: Paolo Bonzini @ 2015-09-25 16:51 UTC (permalink / raw)
To: qemu-devel
From: "Daniel P. Berrange" <berrange@redhat.com>
Developers who are new to QEMU, or have a background familiarity
with GNU autotools, can have trouble getting their head around the
home-grown QEMU build system. This document attempts to explain
the structure / design of the configure script and the various
Makefile pieces that live across the source tree.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-Id: <1443102098-13642-1-git-send-email-berrange@redhat.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
MAINTAINERS | 8 +
docs/build-system.txt | 507 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 515 insertions(+)
create mode 100644 docs/build-system.txt
diff --git a/MAINTAINERS b/MAINTAINERS
index 8eeece1..b27dd74 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1408,3 +1408,11 @@ M: Stefan Hajnoczi <stefanha@redhat.com>
L: qemu-block@nongnu.org
S: Supported
F: tests/image-fuzzer/
+
+
+Documentation
+-------------
+Build system architecture
+M: Daniel P. Berrange <berrange@redhat.com>
+S: Odd Fixes
+F: docs/build-system.txt
diff --git a/docs/build-system.txt b/docs/build-system.txt
new file mode 100644
index 0000000..5ddddea
--- /dev/null
+++ b/docs/build-system.txt
@@ -0,0 +1,507 @@
+ The QEMU build system architecture
+ ==================================
+
+This document aims to help developers understand the architecture of the
+QEMU build system. As with projects using GNU autotools, the QEMU build
+system has two stages, first the developer runs the "configure" script
+to determine the local build environment characteristics, then they run
+"make" to build the project. There is about where the similarities with
+GNU autotools end, so try to forget what you know about them.
+
+
+Stage 1: configure
+==================
+
+The QEMU configure script is written directly in shell, and should be
+compatible with any POSIX shell, hence it uses #!/bin/sh. An important
+implication of this is that it is important to avoid using bash-isms on
+development platforms where bash is the primary host.
+
+In contrast to autoconf scripts, QEMU's configure is expected to be
+silent while it is checking for features. It will only display output
+when an error occurs, or to show the final feature enablement summary
+on completion.
+
+Adding new checks to the configure script usually comprises the
+following tasks:
+
+ - Initialize one or more variables with the default feature state.
+
+ Ideally features should auto-detect whether they are present,
+ so try to avoid hardcoding the initial state to either enabled
+ or disabled, as that forces the user to pass a --enable-XXX
+ / --disable-XXX flag on every invocation of configure.
+
+ - Add support to the command line arg parser to handle any new
+ --enable-XXX / --disable-XXX flags required by the feature XXX.
+
+ - Add information to the help output message to report on the new
+ feature flag.
+
+ - Add code to perform the actual feature check. As noted above, try to
+ be fully dynamic in checking enablement/disablement.
+
+ - Add code to print out the feature status in the configure summary
+ upon completion.
+
+ - Add any new makefile variables to $config_host_mak on completion.
+
+
+Taking (a simplified version of) the probe for gnutls from configure,
+we have the following pieces:
+
+ # Initial variable state
+ gnutls=""
+
+ ..snip..
+
+ # Configure flag processing
+ --disable-gnutls) gnutls="no"
+ ;;
+ --enable-gnutls) gnutls="yes"
+ ;;
+
+ ..snip..
+
+ # Help output feature message
+ gnutls GNUTLS cryptography support
+
+ ..snip..
+
+ # Test for gnutls
+ if test "$gnutls" != "no"; then
+ if ! $pkg_config --exists "gnutls"; then
+ gnutls_cflags=`$pkg_config --cflags gnutls`
+ gnutls_libs=`$pkg_config --libs gnutls`
+ libs_softmmu="$gnutls_libs $libs_softmmu"
+ libs_tools="$gnutls_libs $libs_tools"
+ QEMU_CFLAGS="$QEMU_CFLAGS $gnutls_cflags"
+ gnutls="yes"
+ elif test "$gnutls" = "yes"; then
+ feature_not_found "gnutls" "Install gnutls devel"
+ else
+ gnutls="no"
+ fi
+ fi
+
+ ..snip..
+
+ # Completion feature summary
+ echo "GNUTLS support $gnutls"
+
+ ..snip..
+
+ # Define make variables
+ if test "$gnutls" = "yes" ; then
+ echo "CONFIG_GNUTLS=y" >> $config_host_mak
+ fi
+
+
+Helper functions
+----------------
+
+The configure script provides a variety of helper functions to assist
+developers in checking for system features:
+
+ - do_cc $ARGS...
+
+ Attempt to run the system C compiler passing it $ARGS...
+
+ - do_cxx $ARGS...
+
+ Attempt to run the system C++ compiler passing it $ARGS...
+
+ - compile_object $CFLAGS
+
+ Attempt to compile a test program with the system C compiler using
+ $CFLAGS. The test program must have been previously written to a file
+ called $TMPC.
+
+ - compile_prog $CFLAGS $LDFLAGS
+
+ Attempt to compile a test program with the system C compiler using
+ $CFLAGS and link it with the system linker using $LDFLAGS. The test
+ program must have been previously written to a file called $TMPC.
+
+ - has $COMMAND
+
+ Determine if $COMMAND exists in the current environment, either as a
+ shell builtin, or executable binary, returning 0 on success.
+
+ - path_of $COMMAND
+
+ Return the fully qualified path of $COMMAND, printing it to stdout,
+ and returning 0 on success.
+
+ - check_define $NAME
+
+ Determine if the macro $NAME is defined by the system C compiler
+
+ - check_include $NAME
+
+ Determine if the include $NAME file is available to the system C
+ compiler
+
+ - write_c_skeleton
+
+ Write a minimal C program main() function to the temporary file
+ indicated by $TMPC
+
+ - feature_not_found $NAME $REMEDY
+
+ Print a message to stderr that the feature $NAME was not available
+ on the system, suggesting the user try $REMEDY to address the
+ problem.
+
+ - error_exit $MESSAGE $MORE...
+
+ Print $MESSAGE to stderr, followed by $MORE... and then exit from the
+ configure script with non-zero status
+
+ - query_pkg_config $ARGS...
+
+ Run pkg-config passing it $ARGS. If QEMU is doing a static build,
+ then --static will be automatically added to $ARGS
+
+
+Stage 2: makefiles
+==================
+
+The use of GNU make is required with the QEMU build system.
+
+Although the source code is spread across multiple subdirectories, the
+build system should be considered largely non-recursive in nature, in
+contrast to common practices seen with automake. There is some recursive
+invocation of make, but this is related to the things being built,
+rather than the source directory structure.
+
+QEMU currently supports both VPATH and non-VPATH builds, so there are
+three general ways to invoke configure & perform a build.
+
+ - VPATH, build artifacts outside of QEMU source tree entirely
+
+ cd ../
+ mkdir build
+ cd build
+ ../qemu/configure
+ make
+
+ - VPATH, build artifacts in a subdir of QEMU source tree
+
+ mkdir build
+ cd build
+ ../configure
+ make
+
+ - non-VPATH, build artifacts everywhere
+
+ ./configure
+ make
+
+The QEMU maintainers generally recommend that a VPATH build is used by
+developers. Patches to QEMU are expected to ensure VPATH build still
+works.
+
+
+Module structure
+----------------
+
+There are a number of key outputs of the QEMU build system:
+
+ - Tools - qemu-img, qemu-nbd, qga (guest agent), etc
+ - System emulators - qemu-system-$ARCH
+ - Userspace emulators - qemu-$ARCH
+ - Unit tests
+
+The source code is highly modularized, split across many files to
+facilitate building of all of these components with as little duplicated
+compilation as possible. There can be considered to be two distinct
+groups of files, those which are independent of the QEMU emulation
+target and those which are dependent on the QEMU emulation target.
+
+In the target-independent set lives various general purpose helper code,
+such as error handling infrastructure, standard data structures,
+platform portability wrapper functions, etc. This code can be compiled
+once only and the .o files linked into all output binaries.
+
+In the target-dependent set lives CPU emulation, device emulation and
+much glue code. This sometimes also has to be compiled multiple times,
+once for each target being built.
+
+The utility code that is used by all binaries is built into a
+static archive called libqemuutil.a, which is then linked to all the
+binaries. In order to provide hooks that are only needed by some of the
+binaries, code in libqemuutil.a may depend on other functions that are
+not fully implemented by all QEMU binaries. To deal with this there is a
+second library called libqemustub.a which provides dummy stubs for all
+these functions. These will get lazy linked into the binary if the real
+implementation is not present. In this way, the libqemustub.a static
+library can be thought of as a portable implementation of the weak
+symbols concept. All binaries should link to both libqemuutil.a and
+libqemustub.a. e.g.
+
+ qemu-img$(EXESUF): qemu-img.o ..snip.. libqemuutil.a libqemustub.a
+
+
+Windows platform portability
+----------------------------
+
+On Windows, all binaries have the suffix '.exe', so all Makefile rules
+which create binaries must include the $(EXESUF) variable on the binary
+name. e.g.
+
+ qemu-img$(EXESUF): qemu-img.o ..snip..
+
+This expands to '.exe' on Windows, or '' on other platforms.
+
+A further complication for the system emulator binaries is that
+two separate binaries need to be generated.
+
+The main binary (e.g. qemu-system-x86_64.exe) is linked against the
+Windows console runtime subsystem. These are expected to be run from a
+command prompt window, and so will print stderr to the console that
+launched them.
+
+The second binary generated has a 'w' on the end of its name (e.g.
+qemu-system-x86_64w.exe) and is linked against the Windows graphical
+runtime subsystem. These are expected to be run directly from the
+desktop and will open up a dedicated console window for stderr output.
+
+The Makefile.target will generate the binary for the graphical subsystem
+first, and then use objcopy to relink it against the console subsystem
+to generate the second binary.
+
+
+Object variable naming
+----------------------
+
+The QEMU convention is to define variables to list different groups of
+object files. These are named with the convention $PREFIX-obj-y. For
+example the libqemuutil.a file will be linked with all objects listed
+in a variable 'util-obj-y'. So, for example, util/Makefile.obj will
+contain a set of definitions looking like
+
+ util-obj-y += bitmap.o bitops.o hbitmap.o
+ util-obj-y += fifo8.o
+ util-obj-y += acl.o
+ util-obj-y += error.o qemu-error.o
+
+When there is an object file which needs to be conditionally built based
+on some characteristic of the host system, the configure script will
+define a variable for the conditional. For example, on Windows it will
+define $(CONFIG_POSIX) with a value of 'n' and $(CONFIG_WIN32) with a
+value of 'y'. It is now possible to use the config variables when
+listing object files. For example,
+
+ util-obj-$(CONFIG_WIN32) += oslib-win32.o qemu-thread-win32.o
+ util-obj-$(CONFIG_POSIX) += oslib-posix.o qemu-thread-posix.o
+
+On Windows this expands to
+
+ util-obj-y += oslib-win32.o qemu-thread-win32.o
+ util-obj-n += oslib-posix.o qemu-thread-posix.o
+
+Since libqemutil.a links in $(util-obj-y), the POSIX specific files
+listed against $(util-obj-n) are ignored on the Windows platform builds.
+
+
+CFLAGS / LDFLAGS / LIBS handling
+--------------------------------
+
+There are many different binaries being built with differing purposes,
+and some of them might even be 3rd party libraries pulled in via git
+submodules. As such the use of the global CFLAGS variable is generally
+avoided in QEMU, since it would apply to too many build targets.
+
+Flags that are needed by any QEMU code (i.e. everything *except* GIT
+submodule projects) are put in $(QEMU_CFLAGS) variable. For linker
+flags the $(LIBS) variable is sometimes used, but a couple of more
+targeted variables are preferred. $(libs_softmmu) is used for
+libraries that must be linked to system emulator targets, $(LIBS_TOOLS)
+is used for tools like qemu-img, qemu-nbd, etc and $(LIBS_QGA) is used
+for the QEMU guest agent. There is currently no specific variable for
+the userspace emulator targets as the global $(LIBS), or more targeted
+variables shown below, are sufficient.
+
+In addition to these variables, it is possible to provide cflags and
+libs against individual source code files, by defining variables of the
+form $FILENAME-cflags and $FILENAME-libs. For example, the curl block
+driver needs to link to the libcurl library, so block/Makefile defines
+some variables:
+
+ curl.o-cflags := $(CURL_CFLAGS)
+ curl.o-libs := $(CURL_LIBS)
+
+The scope is a little different between the two variables. The libs get
+used when linking any target binary that includes the curl.o object
+file, while the cflags get used when compiling the curl.c file only.
+
+
+Statically defined files
+------------------------
+
+The following key files are statically defined in the source tree, with
+the rules needed to build QEMU. Their behaviour is influenced by a
+number of dynamically created files listed later.
+
+- Makefile
+
+The main entry point used when invoking make to build all the components
+of QEMU. The default 'all' target will naturally result in the build of
+every component. The various tools and helper binaries are built
+directly via a non-recursive set of rules.
+
+Each system/userspace emulation target needs to have a slightly
+different set of make rules / variables. Thus, make will be recursively
+invoked for each of the emulation targets.
+
+The recursive invocation will end up processing the toplevel
+Makefile.target file (more on that later).
+
+
+- */Makefile.objs
+
+Since the source code is spread across multiple directories, the rules
+for each file are similarly modularized. Thus each subdirectory
+containing .c files will usually also contain a Makefile.objs file.
+These files are not directly invoked by a recursive make, but instead
+they are imported by the top level Makefile and/or Makefile.target
+
+Each Makefile.objs usually just declares a set of variables listing the
+.o files that need building from the source files in the directory. They
+will also define any custom linker or compiler flags. For example in
+block/Makefile.objs
+
+ block-obj-$(CONFIG_LIBISCSI) += iscsi.o
+ block-obj-$(CONFIG_CURL) += curl.o
+
+ ..snip...
+
+ iscsi.o-cflags := $(LIBISCSI_CFLAGS)
+ iscsi.o-libs := $(LIBISCSI_LIBS)
+ curl.o-cflags := $(CURL_CFLAGS)
+ curl.o-libs := $(CURL_LIBS)
+
+If there are any rules defined in the Makefile.objs file, they should
+all use $(obj) as a prefix to the target, e.g.
+
+ $(obj)/generated-tcg-tracers.h: $(obj)/generated-tcg-tracers.h-timestamp
+
+
+- Makefile.target
+
+This file provides the entry point used to build each individual system
+or userspace emulator target. Each enabled target has its own
+subdirectory. For example if configure is run with the argument
+'--target-list=x86_64-softmmu', then a sub-directory 'x86_64-softmu'
+will be created, containing a 'Makefile' which symlinks back to
+Makefile.target
+
+So when the recursive '$(MAKE) -C x86_64-softmmu' is invoked, it ends up
+using Makefile.target for the build rules.
+
+
+- rules.mak
+
+This file provides the generic helper rules for invoking build tools, in
+particular the compiler and linker. This also contains the magic (hairy)
+'unnest-vars' function which is used to merge the variable definitions
+from all Makefile.objs in the source tree down into the main Makefile
+context.
+
+
+- default-configs/*.mak
+
+The files under default-configs/ control what emulated hardware is built
+into each QEMU system and userspace emulator targets. They merely
+contain a long list of config variable definitions. For example,
+default-configs/x86_64-softmmu.mak has:
+
+ include pci.mak
+ include sound.mak
+ include usb.mak
+ CONFIG_QXL=$(CONFIG_SPICE)
+ CONFIG_VGA_ISA=y
+ CONFIG_VGA_CIRRUS=y
+ CONFIG_VMWARE_VGA=y
+ CONFIG_VIRTIO_VGA=y
+ ...snip...
+
+These files rarely need changing unless new devices / hardware need to
+be enabled for a particular system/userspace emulation target
+
+
+- tests/Makefile
+
+Rules for building the unit tests. This file is included directly by the
+top level Makefile, so anything defined in this file will influence the
+entire build system. Care needs to be taken when writing rules for tests
+to ensure they only apply to the unit test execution / build.
+
+
+- po/Makefile
+
+Rules for building and installing the binary message catalogs from the
+text .po file sources. This almost never needs changing for any reason.
+
+
+Dynamically created files
+-------------------------
+
+The following files are generated dynamically by configure in order to
+control the behaviour of the statically defined makefiles. This avoids
+the need for QEMU makefiles to go through any pre-processing as seen
+with autotools, where Makefile.am generates Makefile.in which generates
+Makefile.
+
+
+- config-host.mak
+
+When configure has determined the characteristics of the build host it
+will write a long list of variables to config-host.mak file. This
+provides the various install directories, compiler / linker flags and a
+variety of CONFIG_* variables related to optionally enabled features.
+This is imported by the top level Makefile in order to tailor the build
+output.
+
+The variables defined here are those which are applicable to all QEMU
+build outputs. Variables which are potentially different for each
+emulator target are defined by the next file...
+
+It is also used as a dependency checking mechanism. If make sees that
+the modification timestamp on configure is newer than that on
+config-host.mak, then configure will be re-run.
+
+
+- config-host.h
+
+The config-host.h file is used by source code to determine what features
+are enabled. It is generated from the contents of config-host.mak using
+the scripts/create_config program. This extracts all the CONFIG_* variables,
+most of the HOST_* variables and a few other misc variables from
+config-host.mak, formatting them as C preprocessor macros.
+
+
+- $TARGET-NAME/config-target.mak
+
+TARGET-NAME is the name of a system or userspace emulator, for example,
+x86_64-softmmu denotes the system emulator for the x86_64 architecture.
+This file contains the variables which need to vary on a per-target
+basis. For example, it will indicate whether KVM or Xen are enabled for
+the target and any other potential custom libraries needed for linking
+the target.
+
+
+- $TARGET-NAME/config-devices.mak
+
+TARGET-NAME is again the name of a system or userspace emulator. The
+config-devices.mak file is automatically generated by make using the
+scripts/make_device_config.sh program, feeding it the
+default-configs/$TARGET-NAME file as input.
+
+
+- $TARGET-NAME/Makefile
+
+This is the entrypoint used when make recurses to build a single system
+or userspace emulator target. It is merely a symlink back to the
+Makefile.target in the top level.
--
2.5.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Qemu-devel] [PULL 52/52] doc: Refresh URLs in the qemu-tech documentation
2015-09-25 16:51 [Qemu-devel] [PULL v2 00/52] Misc changes for 2015-09-25 Paolo Bonzini
` (4 preceding siblings ...)
2015-09-25 16:51 ` [Qemu-devel] [PULL 51/52] docs: describe the QEMU build system structure / design Paolo Bonzini
@ 2015-09-25 16:51 ` Paolo Bonzini
2015-09-25 22:11 ` [Qemu-devel] [PULL v2 00/52] Misc changes for 2015-09-25 Peter Maydell
6 siblings, 0 replies; 9+ messages in thread
From: Paolo Bonzini @ 2015-09-25 16:51 UTC (permalink / raw)
To: qemu-devel; +Cc: Thomas Huth
From: Thomas Huth <thuth@redhat.com>
The TwoOStwo and Willows page seem to have disappeared completely,
and also some of the other links were not pointing to the right
locations anymore.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1443173916-8895-1-git-send-email-thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
qemu-tech.texi | 73 ++++++++++++++++++++++++----------------------------------
1 file changed, 30 insertions(+), 43 deletions(-)
diff --git a/qemu-tech.texi b/qemu-tech.texi
index b6fcb2d..022017d 100644
--- a/qemu-tech.texi
+++ b/qemu-tech.texi
@@ -320,7 +320,7 @@ SH4
@node QEMU compared to other emulators
@section QEMU compared to other emulators
-Like bochs [3], QEMU emulates an x86 CPU. But QEMU is much faster than
+Like bochs [1], QEMU emulates an x86 CPU. But QEMU is much faster than
bochs as it uses dynamic compilation. Bochs is closely tied to x86 PC
emulation while QEMU can emulate several processors.
@@ -333,25 +333,25 @@ than QEMU (in particular it does register allocation) but it is closely
tied to an x86 host and target and has no support for precise exceptions
and system emulation.
-EM86 [4] is the closest project to user space QEMU (and QEMU still uses
+EM86 [3] is the closest project to user space QEMU (and QEMU still uses
some of its code, in particular the ELF file loader). EM86 was limited
to an alpha host and used a proprietary and slow interpreter (the
-interpreter part of the FX!32 Digital Win32 code translator [5]).
+interpreter part of the FX!32 Digital Win32 code translator [4]).
-TWIN [6] is a Windows API emulator like Wine. It is less accurate than
-Wine but includes a protected mode x86 interpreter to launch x86 Windows
-executables. Such an approach has greater potential because most of the
-Windows API is executed natively but it is far more difficult to develop
-because all the data structures and function parameters exchanged
+TWIN from Willows Software was a Windows API emulator like Wine. It is less
+accurate than Wine but includes a protected mode x86 interpreter to launch
+x86 Windows executables. Such an approach has greater potential because most
+of the Windows API is executed natively but it is far more difficult to
+develop because all the data structures and function parameters exchanged
between the API and the x86 code must be converted.
-User mode Linux [7] was the only solution before QEMU to launch a
+User mode Linux [5] was the only solution before QEMU to launch a
Linux kernel as a process while not needing any host kernel
patches. However, user mode Linux requires heavy kernel patches while
QEMU accepts unpatched Linux kernels. The price to pay is that QEMU is
slower.
-The Plex86 [8] PC virtualizer is done in the same spirit as the now
+The Plex86 [6] PC virtualizer is done in the same spirit as the now
obsolete qemu-fast system emulator. It requires a patched Linux kernel
to work (you cannot launch the same kernel on your PC), but the
patches are really small. As it is a PC virtualizer (no emulation is
@@ -359,13 +359,13 @@ done except for some privileged instructions), it has the potential of
being faster than QEMU. The downside is that a complicated (and
potentially unsafe) host kernel patch is needed.
-The commercial PC Virtualizers (VMWare [9], VirtualPC [10], TwoOStwo
-[11]) are faster than QEMU, but they all need specific, proprietary
+The commercial PC Virtualizers (VMWare [7], VirtualPC [8]) are faster
+than QEMU (without virtualization), but they all need specific, proprietary
and potentially unsafe host drivers. Moreover, they are unable to
provide cycle exact simulation as an emulator can.
-VirtualBox [12], Xen [13] and KVM [14] are based on QEMU. QEMU-SystemC
-[15] uses QEMU to simulate a system where some hardware devices are
+VirtualBox [9], Xen [10] and KVM [11] are based on QEMU. QEMU-SystemC
+[12] uses QEMU to simulate a system where some hardware devices are
developed in SystemC.
@node Portable dynamic translation
@@ -608,64 +608,51 @@ way, it can be relocated at load time.
@table @asis
@item [1]
-@url{http://citeseer.nj.nec.com/piumarta98optimizing.html}, Optimizing
-direct threaded code by selective inlining (1998) by Ian Piumarta, Fabio
-Riccardi.
+@url{http://bochs.sourceforge.net/}, the Bochs IA-32 Emulator Project,
+by Kevin Lawton et al.
@item [2]
-@url{http://developer.kde.org/~sewardj/}, Valgrind, an open-source
-memory debugger for x86-GNU/Linux, by Julian Seward.
+@url{http://www.valgrind.org/}, Valgrind, an open-source memory debugger
+for GNU/Linux.
@item [3]
-@url{http://bochs.sourceforge.net/}, the Bochs IA-32 Emulator Project,
-by Kevin Lawton et al.
+@url{http://ftp.dreamtime.org/pub/linux/Linux-Alpha/em86/v0.2/docs/em86.html},
+the EM86 x86 emulator on Alpha-Linux.
@item [4]
-@url{http://www.cs.rose-hulman.edu/~donaldlf/em86/index.html}, the EM86
-x86 emulator on Alpha-Linux.
-
-@item [5]
@url{http://www.usenix.org/publications/library/proceedings/usenix-nt97/@/full_papers/chernoff/chernoff.pdf},
DIGITAL FX!32: Running 32-Bit x86 Applications on Alpha NT, by Anton
Chernoff and Ray Hookway.
-@item [6]
-@url{http://www.willows.com/}, Windows API library emulation from
-Willows Software.
-
-@item [7]
+@item [5]
@url{http://user-mode-linux.sourceforge.net/},
The User-mode Linux Kernel.
-@item [8]
+@item [6]
@url{http://www.plex86.org/},
The new Plex86 project.
-@item [9]
+@item [7]
@url{http://www.vmware.com/},
The VMWare PC virtualizer.
-@item [10]
-@url{http://www.microsoft.com/windowsxp/virtualpc/},
+@item [8]
+@url{https://www.microsoft.com/download/details.aspx?id=3702},
The VirtualPC PC virtualizer.
-@item [11]
-@url{http://www.twoostwo.org/},
-The TwoOStwo PC virtualizer.
-
-@item [12]
+@item [9]
@url{http://virtualbox.org/},
The VirtualBox PC virtualizer.
-@item [13]
+@item [10]
@url{http://www.xen.org/},
The Xen hypervisor.
-@item [14]
-@url{http://kvm.qumranet.com/kvmwiki/Front_Page},
+@item [11]
+@url{http://www.linux-kvm.org/},
Kernel Based Virtual Machine (KVM).
-@item [15]
+@item [12]
@url{http://www.greensocs.com/projects/QEMUSystemC},
QEMU-SystemC, a hardware co-simulator.
--
2.5.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PULL v2 00/52] Misc changes for 2015-09-25
2015-09-25 16:51 [Qemu-devel] [PULL v2 00/52] Misc changes for 2015-09-25 Paolo Bonzini
` (5 preceding siblings ...)
2015-09-25 16:51 ` [Qemu-devel] [PULL 52/52] doc: Refresh URLs in the qemu-tech documentation Paolo Bonzini
@ 2015-09-25 22:11 ` Peter Maydell
6 siblings, 0 replies; 9+ messages in thread
From: Peter Maydell @ 2015-09-25 22:11 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: QEMU Developers
On 25 September 2015 at 09:51, Paolo Bonzini <pbonzini@redhat.com> wrote:
> The following changes since commit 8a47d575dfac0f6675e2ac56c5921cc520d021a6:
>
> Merge remote-tracking branch 'remotes/weil/tags/pull-wxx-20150924' into staging (2015-09-24 22:09:41 +0100)
>
> are available in the git repository at:
>
> git://github.com/bonzini/qemu.git tags/for-upstream
>
> for you to fetch changes up to 8e9620a683925daf9900c2ac5f2dfa14b6439932:
>
> doc: Refresh URLs in the qemu-tech documentation (2015-09-25 12:20:21 +0200)
>
> ----------------------------------------------------------------
> * First batch of MAINTAINERS updates
> * IOAPIC fixes (to pass kvm-unit-tests with -machine kernel_irqchip=off)
> * NBD API upgrades from Daniel
> * strtosz fixes from Marc-André
> * improved support for readonly=on on scsi-generic devices
> * new "info ioapic" and "info lapic" monitor commands
> * Peter Crosthwaite's ELF_MACHINE cleanups
> * docs patches from Thomas and Daniel
>
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PULL 50/52] typedef: add typedef for QemuOpts
2015-09-25 16:51 ` [Qemu-devel] [PULL 50/52] typedef: add typedef for QemuOpts Paolo Bonzini
@ 2015-09-28 6:23 ` Pavel Dovgaluk
0 siblings, 0 replies; 9+ messages in thread
From: Pavel Dovgaluk @ 2015-09-28 6:23 UTC (permalink / raw)
To: 'Paolo Bonzini', qemu-devel
Thank you!
What about other patches from rr series?
Pavel Dovgalyuk
> -----Original Message-----
> From: Paolo Bonzini [mailto:pbonzini@redhat.com]
> Sent: Friday, September 25, 2015 7:52 PM
> To: qemu-devel@nongnu.org
> Cc: Pavel Dovgalyuk; Pavel Dovgalyuk
> Subject: [PULL 50/52] typedef: add typedef for QemuOpts
>
> From: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
>
> This patch moves typedefs for QemuOpts and related types
> to qemu/typedefs.h file.
>
> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
>
> Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
> Message-Id: <20150917162501.8676.85435.stgit@PASHA-ISP.def.inno>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> include/qemu/option.h | 5 +----
> include/qemu/typedefs.h | 3 +++
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/include/qemu/option.h b/include/qemu/option.h
> index 57e51c9..71f5f27 100644
> --- a/include/qemu/option.h
> +++ b/include/qemu/option.h
> @@ -30,6 +30,7 @@
> #include "qemu/queue.h"
> #include "qapi/error.h"
> #include "qapi/qmp/qdict.h"
> +#include "qemu/typedefs.h"
>
> const char *get_opt_name(char *buf, int buf_size, const char *p, char delim);
> const char *get_opt_value(char *buf, int buf_size, const char *p);
> @@ -44,10 +45,6 @@ void parse_option_size(const char *name, const char *value,
> bool has_help_option(const char *param);
> bool is_valid_option_list(const char *param);
>
> -typedef struct QemuOpt QemuOpt;
> -typedef struct QemuOpts QemuOpts;
> -typedef struct QemuOptsList QemuOptsList;
> -
> enum QemuOptType {
> QEMU_OPT_STRING = 0, /* no parsing (use string as-is) */
> QEMU_OPT_BOOL, /* on/off */
> diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
> index ce82c64..3a835ff 100644
> --- a/include/qemu/typedefs.h
> +++ b/include/qemu/typedefs.h
> @@ -67,6 +67,9 @@ typedef struct Property Property;
> typedef struct QEMUBH QEMUBH;
> typedef struct QemuConsole QemuConsole;
> typedef struct QEMUFile QEMUFile;
> +typedef struct QemuOpt QemuOpt;
> +typedef struct QemuOpts QemuOpts;
> +typedef struct QemuOptsList QemuOptsList;
> typedef struct QEMUSGList QEMUSGList;
> typedef struct QEMUSizedBuffer QEMUSizedBuffer;
> typedef struct QEMUTimerListGroup QEMUTimerListGroup;
> --
> 2.5.0
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-09-28 6:24 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-25 16:51 [Qemu-devel] [PULL v2 00/52] Misc changes for 2015-09-25 Paolo Bonzini
2015-09-25 16:51 ` [Qemu-devel] [PULL 25/52] hmp: added io apic dump state Paolo Bonzini
2015-09-25 16:51 ` [Qemu-devel] [PULL 48/52] i386: partial revert of interrupt poll fix Paolo Bonzini
2015-09-25 16:51 ` [Qemu-devel] [PULL 49/52] i386: interrupt poll processing Paolo Bonzini
2015-09-25 16:51 ` [Qemu-devel] [PULL 50/52] typedef: add typedef for QemuOpts Paolo Bonzini
2015-09-28 6:23 ` Pavel Dovgaluk
2015-09-25 16:51 ` [Qemu-devel] [PULL 51/52] docs: describe the QEMU build system structure / design Paolo Bonzini
2015-09-25 16:51 ` [Qemu-devel] [PULL 52/52] doc: Refresh URLs in the qemu-tech documentation Paolo Bonzini
2015-09-25 22:11 ` [Qemu-devel] [PULL v2 00/52] Misc changes for 2015-09-25 Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).