[Qemu-devel] [PATCH v2 5/6] vga: add some optional CGA compatibility hacks

2012-08-22 Thread Matthew Ogilvie
This patch adds some optional compatibility hacks (default disabled) to allow Microport UNIX to function under qemu. I've tried to structure it to be easy to add more hacks for other old CGA programs, if anyone ever needs them. Microport UNIX System V/386 v 2.1 (ca 1987) tries to program the CGA

[Qemu-devel] [PATCH v2 2/6] target-i386/translate.c: mov to/from crN/drN: ignore mod bits

2012-08-22 Thread Matthew Ogilvie
>From AMD's documentation (multiple versions of 24594.pdf): > This instruction is always treated as a register-to-register (MOD = 11) > instruction, regardless of the encoding of the MOD field in the MODR/M > byte. Also, Microport UNIX System V/386 v 2.1 (ca 1987) runs fine on real Intel 386 and 4

Re: [Qemu-devel] [PATCH 3/6] QAPI: Introduce memchar_write QMP command

2012-08-22 Thread Lei Li
On 08/23/2012 01:42 PM, Eric Blake wrote: On 08/22/2012 11:14 PM, Lei Li wrote: Signed-off-by: Lei Li Subject line uses '_', but the QMP command uses '-' [1] --- hmp-commands.hx | 16 hmp.c| 15 +++ hmp.h|1 + qapi-schema.jso

[Qemu-devel] unicore32 fails assertion without -kernel (was: How to reliably start a bare QEMU target to query capabilities via QMP)

2012-08-22 Thread Markus Armbruster
"Daniel P. Berrange" writes: > I've been adapting libvirt to use to the various new QMP commands to > query QEMU's capabilities, instead of the hated -help parsing. Obviously > the critical part of this is being able to reliably start a bare QEMU > process with no actual guest OS configured (no d

[Qemu-devel] [PATCH v2 3/6] vl: fix -hdachs/-hda argument order parsing issues

2012-08-22 Thread Matthew Ogilvie
Without this patch, the -hdachs argument had to occur either BEFORE the corresponding "-hda" option, or AFTER the plain disk image name (if neither -hda nor -drive is used). Otherwise it would effectively be ignored. Option -hdachs still has no effect on -drive, but that seems best. Signed-off-b

[Qemu-devel] [PATCH v2 6/6] i8259: add -no-spurious-interrupt-hack option

2012-08-22 Thread Matthew Ogilvie
This patch provides a way to optionally suppress spurious interrupts, as a workaround for systems described below: Some old operating systems do not handle spurious interrupts well, and qemu tends to generate them significantly more often than real hardware. Examples: - Microport UNIX System V/

[Qemu-devel] [PATCH v2 0/6] Running Microport UNIX (ca 1987)

2012-08-22 Thread Matthew Ogilvie
After applying this version 2 of this patch series, I can successfully run "Micoport UNIX System V/386, v 2.1" (ca 1987) under qemu. (although not if I try to enable KVM) Version 1 of this series was posted about 4 weeks ago. See http://patchwork.ozlabs.org/project/qemu-devel/list/?submitter=156

[Qemu-devel] [PATCH v2 1/6] fix some debug printf format strings

2012-08-22 Thread Matthew Ogilvie
These are normally ifdefed out and don't matter. But if you enable them, they ought to be correct. Signed-off-by: Matthew Ogilvie --- This version of the patch adds i8259.c. An alternative approach might be to eliminate these printf's, and/or replace them with trace*() calls, but until someone

Re: [Qemu-devel] [PATCH 5/6] Fix enumeration typo error

2012-08-22 Thread Eric Blake
On 08/22/2012 11:14 PM, Lei Li wrote: > Signed-off-by: Lei Li > --- > qapi-schema-guest.json |2 +- > qapi-schema.json |4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) This is independent. Have you considered posting it to the trivial patch queue, possibly for 1.2, sinc

Re: [Qemu-devel] [PATCH 4/6] QAPI: Introduce memchar_read QMP command

2012-08-22 Thread Eric Blake
On 08/22/2012 11:14 PM, Lei Li wrote: > Signed-off-by: Lei Li Again, subject line should use '-' not '_' for QMP. > --- > hmp-commands.hx | 16 > hmp.c| 15 +++ > hmp.h|1 + > qapi-schema.json | 23 +++ > qemu-c

Re: [Qemu-devel] [PATCH 3/6] QAPI: Introduce memchar_write QMP command

2012-08-22 Thread Eric Blake
On 08/22/2012 11:14 PM, Lei Li wrote: > Signed-off-by: Lei Li Subject line uses '_', but the QMP command uses '-' [1] > --- > hmp-commands.hx | 16 > hmp.c| 15 +++ > hmp.h|1 + > qapi-schema.json | 28

Re: [Qemu-devel] [PATCH V12 0/6] add-cow file format

2012-08-22 Thread Dong Xu Wang
Anyone can give me some comments? That will be very grateful.. On Fri, Aug 10, 2012 at 11:39 PM, Dong Xu Wang wrote: > This will introduce a new file format: add-cow. > > add-cow can benefit from other available functions, such as path_has_protocol > and > qed_read_string, so we will make them p

[Qemu-devel] [PATCH 3/6] QAPI: Introduce memchar_write QMP command

2012-08-22 Thread Lei Li
Signed-off-by: Lei Li --- hmp-commands.hx | 16 hmp.c| 15 +++ hmp.h|1 + qapi-schema.json | 28 qemu-char.c | 36 qmp-commands.hx | 33 +

[Qemu-devel] [PATCH 6/6] Expose MemCharDriver via command line

2012-08-22 Thread Lei Li
Signed-off-by: Lei Li --- qemu-char.c | 24 qemu-config.c |3 +++ qemu-options.hx | 10 ++ 3 files changed, 37 insertions(+), 0 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index ff6651b..36f4ecc 100644 --- a/qemu-char.c +++ b/qemu-char.c @@

[Qemu-devel] [PATCH 4/6] QAPI: Introduce memchar_read QMP command

2012-08-22 Thread Lei Li
Signed-off-by: Lei Li --- hmp-commands.hx | 16 hmp.c| 15 +++ hmp.h|1 + qapi-schema.json | 23 +++ qemu-char.c | 32 qmp-commands.hx | 31 ++

[Qemu-devel] [PATCH 2/6] monitor: Adjust qmp_human_monitor_command to new MemCharDriver

2012-08-22 Thread Lei Li
Signed-off-by: Lei Li --- monitor.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/monitor.c b/monitor.c index 480f583..ab4650b 100644 --- a/monitor.c +++ b/monitor.c @@ -642,7 +642,13 @@ char *qmp_human_monitor_command(const char *command_line, bool has_cpu_inde

[Qemu-devel] [PATCH 5/6] Fix enumeration typo error

2012-08-22 Thread Lei Li
Signed-off-by: Lei Li --- qapi-schema-guest.json |2 +- qapi-schema.json |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qapi-schema-guest.json b/qapi-schema-guest.json index d955cf1..ed0eb69 100644 --- a/qapi-schema-guest.json +++ b/qapi-schema-guest.json @@

[Qemu-devel] [PATCH 1/6] qemu-char: Convert MemCharDriver to circular buffer

2012-08-22 Thread Lei Li
Signed-off-by: Lei Li --- qemu-char.c | 96 +++--- qemu-char.h |2 +- 2 files changed, 78 insertions(+), 20 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 398baf1..b21b93a 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2528,38

[Qemu-devel] [RFC v2 ATCH 0/4] char: expose MemoryCharDriver to users and provide QMP interface

2012-08-22 Thread Lei Li
This RFC series attempts to convert the MemCharDriver to use a circular buffer for input and output, expose it to users by introducing QMP commands memchar_write and memchar_read and via the command line like the other CharDriverStates. Serial ports in qemu always use CharDriverStates as there bac

Re: [Qemu-devel] passing translated address out in QEMU

2012-08-22 Thread Xin Tong
On Wed, Aug 22, 2012 at 8:14 PM, 陳韋任 (Wei-Ren Chen) wrote: >> In tcg_gen_qemu_ld8s(tmp, addr, index); a TCGv addr is passed to the >> INDEX_op_qemu_ld8s as param and the loaded value is passed back in >> tmp. i want to get the translated value as well. how can i do that ? > > IIUC, qemu_ld take

Re: [Qemu-devel] Dump guest page table inside QEMU makes system hang

2012-08-22 Thread Wei-Ren Chen
> It's quite embarrassing. The code I posted before is buggy, and it dumps all > 1024 * 1024 page table entries. It takes a lot of time, so that I think the > system hangs. Attach is the code snipt what I am using, which works fine now. > Another question is, I would like to know the hva correspo

Re: [Qemu-devel] passing translated address out in QEMU

2012-08-22 Thread Wei-Ren Chen
> In tcg_gen_qemu_ld8s(tmp, addr, index); a TCGv addr is passed to the > INDEX_op_qemu_ld8s as param and the loaded value is passed back in > tmp. i want to get the translated value as well. how can i do that ? IIUC, qemu_ld takes addr as guest virtual address, then loads the value in that addr

Re: [Qemu-devel] [PATCH 3/5] trace-cmd: Support trace-agent of virtio-trace

2012-08-22 Thread Yoshihiro YUNOMAE
Hi Steven, (2012/08/22 22:51), Steven Rostedt wrote: On Wed, 2012-08-22 at 17:43 +0900, Yoshihiro YUNOMAE wrote: Add read path and control path to use trace-agent of virtio-trace. When we use trace-agent, trace-cmd will be used as follows: # AGENT_READ_DIR=/tmp/virtio-trace/tracing \

[Qemu-devel] QEMU version for ARM7 adaptation

2012-08-22 Thread Vinicius Sanches
Dear all, What is the best QEMU version available to enable ARM7 core? Thanks and regards.

Re: [Qemu-devel] [PATCH 2/5] trace-cmd: Use tracing directory to count CPUs

2012-08-22 Thread Masami Hiramatsu
(2012/08/23 11:01), Masami Hiramatsu wrote: > (2012/08/22 22:41), Steven Rostedt wrote: >> On Wed, 2012-08-22 at 17:43 +0900, Yoshihiro YUNOMAE wrote: >>> From: Masami Hiramatsu >>> >>> Count debugfs/tracing/per_cpu/cpu* to determine the >>> number of CPUs. >> >> I'm curious, do you find that sysc

Re: [Qemu-devel] Dump guest page table inside QEMU makes system hang

2012-08-22 Thread Wei-Ren Chen
> >> The system will hang while booting. However, if I comment > >> cpu_physical_memory_read in function dump_guest_pgtable, there > >> is no problem. What I am missing here? Thanks. > > > > cpu_physical_memory_read() can cause faults or other side effects like > > MMIO. Using cpu_get_phys_page_d

[Qemu-devel] [PATCH v9 6/6] allower the user to disable pv event support

2012-08-22 Thread Wen Congyang
Signed-off-by: Wen Congyang --- hw/pc_piix.c|6 +- qemu-config.c |4 qemu-options.hx |3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index f73fb85..76d3de1 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -151,6 +151,8

[Qemu-devel] [PATCH v9 5/6] introduce a new qom device to deal with panicked event

2012-08-22 Thread Wen Congyang
If the target is x86/x86_64, the guest's kernel will write 0x01 to the port KVM_PV_EVENT_PORT when it is panciked. This patch introduces a new qom device kvm_pv_ioport to listen this I/O port, and deal with panicked event according to panicked_action's value. The possible actions are: 1. emit QEVEN

[Qemu-devel] [PATCH v9 4/6] add a new qevent: QEVENT_GUEST_PANICKED

2012-08-22 Thread Wen Congyang
This event will be emited when the guest is panicked. Signed-off-by: Wen Congyang --- monitor.c |1 + monitor.h |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index 480f583..cd2adb7 100644 --- a/monitor.c +++ b/monitor.c @@ -455,6 +455,7 @@ sta

[Qemu-devel] [PATCH v9 3/6] add a new runstate: RUN_STATE_GUEST_PANICKED

2012-08-22 Thread Wen Congyang
The guest will be in this state when it is panicked. Signed-off-by: Wen Congyang --- qapi-schema.json |6 +- qmp.c|3 ++- vl.c |7 ++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index bd8ad74..ed

[Qemu-devel] [PATCH v9 2/6] kvm: Update kernel headers

2012-08-22 Thread Wen Congyang
Corresponding kvm.git hash: 35f2d16b with my patch for kvm --- linux-headers/asm-s390/kvm.h |2 +- linux-headers/asm-s390/kvm_para.h |2 +- linux-headers/asm-x86/kvm.h |1 + linux-headers/asm-x86/kvm_para.h |9 + linux-headers/linux/kvm.h |3 +++ lin

[Qemu-devel] [PATCH v9 1/6] start vm after reseting it

2012-08-22 Thread Wen Congyang
The guest should run after reseting it, but it does not run if its old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED. We don't set runstate to RUN_STATE_PAUSED when reseting the guest, so the runstate will be changed from RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED to RUN_STATE_RUNNING(no

[Qemu-devel] [PATCH v9] kvm: notify host when the guest is panicked

2012-08-22 Thread Wen Congyang
We can know the guest is panicked when the guest runs on xen. But we do not have such feature on kvm. Another purpose of this feature is: management app(for example: libvirt) can do auto dump when the guest is panicked. If management app does not do auto dump, the guest's user can do dump by hand

Re: [Qemu-devel] [PATCH] boards: add a 'none' machine type to all platforms

2012-08-22 Thread Anthony Liguori
Peter Maydell writes: > On 22 August 2012 23:42, Anthony Liguori wrote: >> Peter Maydell writes: >>> How about documenting this machine (and its purpose) somewhere? >> >> Okay, but where? I don't know an obvious place. > > If we hadn't got ourselves into this mess where we can't change > -help

Re: [Qemu-devel] [PATCH 2/5] trace-cmd: Use tracing directory to count CPUs

2012-08-22 Thread Masami Hiramatsu
(2012/08/22 22:41), Steven Rostedt wrote: > On Wed, 2012-08-22 at 17:43 +0900, Yoshihiro YUNOMAE wrote: >> From: Masami Hiramatsu >> >> Count debugfs/tracing/per_cpu/cpu* to determine the >> number of CPUs. > > I'm curious, do you find that sysconf doesn't return the # of CPUs the > system has?

[Qemu-devel] [PATCH 2/2] PPC: e500: calculate initrd_base like dt_base

2012-08-22 Thread Scott Wood
While investigating dtb pad issues, I noticed that initrd_base wasn't taking loadaddr into account the way dt_base was. This seems wrong. Signed-off-by: Scott Wood --- hw/ppc/e500.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 1ccf

[Qemu-devel] [PATCH 1/2] PPC: e500: increase DTC_LOAD_PAD

2012-08-22 Thread Scott Wood
An allowance of 5 MiB for BSS is not enough for Linux kernels with certain debug options enabled (not sure exactly which one caused it, but I'd guess lockdep). The kernel I ran into this with had a BSS of around 6.4 MB. Unfortunately, uImage does not give us enough information to determine the ac

[Qemu-devel] [PATCH 3/3] vmware_vga: Allow simple drivers to work without using the fifo

2012-08-22 Thread BALATON Zoltan
Postpone stopping the dirty log to the point where the command fifo is configured to allow drivers which don't use the fifo to work too. (Without this the picture rendered into the vram never got to the screen and the DIRECT_VRAM option meant to support this case was removed a year ago.) Signed-o

[Qemu-devel] [PATCH 2/3] vmware_vga: Return a value for FB_SIZE before the device is enabled

2012-08-22 Thread BALATON Zoltan
According to the documentation drivers using this device should read FB_SIZE before enabling the device to know what memory to map. This would not work if we return 0 before enabled. Signed-off-by: BALATON Zoltan --- hw/vmware_vga.c | 13 - 1 file changed, 8 insertions(+), 5 delet

[Qemu-devel] [PATCH 1/3] vmware_vga: Cleanup and remove duplicated info from local state

2012-08-22 Thread BALATON Zoltan
Removed info from vmsvga_state that is available from elsewhere and thus was duplicated here unnecessarily. Also includes some coding style fixes suggested by checkpatch.pl. Signed-off-by: BALATON Zoltan --- console.h | 20 ++ hw/vmware_vga.c | 196 +++--

[Qemu-devel] [PATCH v3] console: Cleanup computation of bytes per pixel and add missing cases

2012-08-22 Thread BALATON Zoltan
Division with round up is the correct way to compute this even if the only case where division with round down gives incorrect result is probably 15 bpp. This case was explicitely patched up in one of these functions but was unhandled in the other. This patch also adds the missing cases and aborts

Re: [Qemu-devel] [PATCH] boards: add a 'none' machine type to all platforms

2012-08-22 Thread Peter Maydell
On 22 August 2012 23:42, Anthony Liguori wrote: > Peter Maydell writes: >> How about documenting this machine (and its purpose) somewhere? > > Okay, but where? I don't know an obvious place. If we hadn't got ourselves into this mess where we can't change -help output, the obvious place would be

Re: [Qemu-devel] [PATCH] boards: add a 'none' machine type to all platforms

2012-08-22 Thread Anthony Liguori
Peter Maydell writes: > On 22 August 2012 21:24, Anthony Liguori wrote: >> This allows any QEMU binary to be executed with: >> >> $QEMU_BINARY -qmp stdio > > ...presumably you mean -qmp stdio -M none ? > >> >> Without errors from missing options that are required by various boards. >> This >

Re: [Qemu-devel] [PATCH] qom: removal of link property need to release its target

2012-08-22 Thread Anthony Liguori
Paolo Bonzini writes: > Il 22/08/2012 23:41, Anthony Liguori ha scritto: >> >> (1) should drop the floating reference and the reference held by the >> container. That's what I meant by calling object_unparent in >> qmp_device_del. >> >> (2) should simply remove the device from the bus (further

Re: [Qemu-devel] [PATCH] qom: removal of link property need to release its target

2012-08-22 Thread Paolo Bonzini
Il 22/08/2012 23:41, Anthony Liguori ha scritto: > > (1) should drop the floating reference and the reference held by the > container. That's what I meant by calling object_unparent in > qmp_device_del. > > (2) should simply remove the device from the bus (further releasing a > reference). > >

Re: [Qemu-devel] [PATCH] qom: removal of link property need to release its target

2012-08-22 Thread Anthony Liguori
Hi Paolo, Paolo Bonzini writes: > Il 22/08/2012 18:36, Anthony Liguori ha scritto: >> We can fix this by adding an extra reference in add_link but this >> creates yet another problem with hotplug. Specificially, qdev_free() >> asserts that ref > 0 because there is now a reference being held by

Re: [Qemu-devel] [PATCH] boards: add a 'none' machine type to all platforms

2012-08-22 Thread Anthony Liguori
Eric Blake writes: > On 08/22/2012 02:24 PM, Anthony Liguori wrote: >> This allows any QEMU binary to be executed with: >> >> $QEMU_BINARY -qmp stdio > > Don't you mean: > > $QEMU_BINARY -M none -qmp stdio I did, thanks. > > I agree with including this in 1.2, as otherwise your new query-tar

Re: [Qemu-devel] Ping 1.2 PATCH "eventfd: making it thread safe" (was Re: [PATCH v2 1/3] net: asynchronous send/receive infrastructure for net/socket.c)

2012-08-22 Thread Anthony Liguori
Paolo Bonzini writes: > Il 21/08/2012 21:06, Anthony Liguori ha scritto: >> Paolo Bonzini writes: >> >>> Il 21/08/2012 18:39, ronnie sahlberg ha scritto: In net_socket_update_fd_handler() shouldnt you call qemu_notify_event() if any of the handlers have changed from NUL

[Qemu-devel] [PATCH for 1.2] ivshmem: fix memory_region_del_eventfd assertion failure

2012-08-22 Thread Paolo Bonzini
We do not register ioeventfds unless the IVSHMEM_IOEVENTFD feature is set. The same feature must be checked before releasing the eventfds. Regression introduced by commit 563027c (ivshmem: use EventNotifier and memory API, 2012-07-05). Reported-by: Cam Macdonnell Tested-by: Cam Macdonnell Signe

[Qemu-devel] [PATCH for 1.2] qom: object_delete should unparent the object first

2012-08-22 Thread Paolo Bonzini
object_deinit is only called when the reference count goes to zero, and yet tries to do an object_unparent. Now, object_unparent either does nothing or it will decrease the reference count. Because we know the reference count is zero, the object_unparent call in object_deinit is useless. Instead,

Re: [Qemu-devel] Ping 1.2 PATCH "eventfd: making it thread safe" (was Re: [PATCH v2 1/3] net: asynchronous send/receive infrastructure for net/socket.c)

2012-08-22 Thread Paolo Bonzini
Il 21/08/2012 21:06, Anthony Liguori ha scritto: > Paolo Bonzini writes: > >> Il 21/08/2012 18:39, ronnie sahlberg ha scritto: >>> In >>> net_socket_update_fd_handler() >>> >>> shouldnt you call qemu_notify_event() if any of the handlers have >>> changed from NULL to non-NULL ? >>> or else it mig

Re: [Qemu-devel] [PATCH] qom: removal of link property need to release its target

2012-08-22 Thread Paolo Bonzini
Il 22/08/2012 18:36, Anthony Liguori ha scritto: > We can fix this by adding an extra reference in add_link but this > creates yet another problem with hotplug. Specificially, qdev_free() > asserts that ref > 0 because there is now a reference being held by the > bus. I think that's correct. Unp

Re: [Qemu-devel] Windows slow boot: contractor wanted

2012-08-22 Thread Richard Davies
Avi Kivity wrote: > Richard Davies wrote: > > Avi Kivity wrote: > > > Richard Davies wrote: > > > > I can trigger the slow boots without KSM and they have the same > > > > profile, with _raw_spin_lock_irqsave and isolate_freepages_block at > > > > the top. > > > > > > > > I reduced to 3x 20GB 8-cor

Re: [Qemu-devel] Windows slow boot: contractor wanted

2012-08-22 Thread Richard Davies
Avi Kivity wrote: > Richard Davies wrote: > > Below are two 'perf top' snapshots during a slow boot, which appear to > > me to support your idea of a spin-lock problem. ... > >PerfTop: 62249 irqs/sec kernel:96.9% exact: 0.0% [4000Hz cycles], > > (all, 16 CPUs) > > ---

Re: [Qemu-devel] Windows slow boot: contractor wanted

2012-08-22 Thread Richard Davies
Avi Kivity wrote: > Richard Davies wrote: > > I can trigger the slow boots without KSM and they have the same profile, > > with _raw_spin_lock_irqsave and isolate_freepages_block at the top. > > > > I reduced to 3x 20GB 8-core VMs on a 128GB host (rather than 3x 40GB 8-core > > VMs), and haven't ma

Re: [Qemu-devel] [PATCH] boards: add a 'none' machine type to all platforms

2012-08-22 Thread Peter Maydell
On 22 August 2012 21:24, Anthony Liguori wrote: > This allows any QEMU binary to be executed with: > > $QEMU_BINARY -qmp stdio ...presumably you mean -qmp stdio -M none ? > > Without errors from missing options that are required by various boards. This > also provides a mode that we can use i

Re: [Qemu-devel] [PATCH] boards: add a 'none' machine type to all platforms

2012-08-22 Thread Eric Blake
On 08/22/2012 02:24 PM, Anthony Liguori wrote: > This allows any QEMU binary to be executed with: > > $QEMU_BINARY -qmp stdio Don't you mean: $QEMU_BINARY -M none -qmp stdio I agree with including this in 1.2, as otherwise your new query-target and other commands are incomplete (that is, this

[Qemu-devel] [PATCH] boards: add a 'none' machine type to all platforms

2012-08-22 Thread Anthony Liguori
This allows any QEMU binary to be executed with: $QEMU_BINARY -qmp stdio Without errors from missing options that are required by various boards. This also provides a mode that we can use in the future to construct machines entirely through QMP commands. Cc: Daniel Berrange Cc: Markus Armbru

Re: [Qemu-devel] How to reliably start a bare QEMU target to query capabilities via QMP

2012-08-22 Thread Anthony Liguori
"Daniel P. Berrange" writes: > I've been adapting libvirt to use to the various new QMP commands to > query QEMU's capabilities, instead of the hated -help parsing. Obviously > the critical part of this is being able to reliably start a bare QEMU > process with no actual guest OS configured (no d

[Qemu-devel] How to reliably start a bare QEMU target to query capabilities via QMP

2012-08-22 Thread Daniel P. Berrange
I've been adapting libvirt to use to the various new QMP commands to query QEMU's capabilities, instead of the hated -help parsing. Obviously the critical part of this is being able to reliably start a bare QEMU process with no actual guest OS configured (no disks, no kernel, etc) and talk to its m

[Qemu-devel] [XEN][RFC PATCH V2 07/17] hvm-io: send invalidate map cache to each registered servers

2012-08-22 Thread Julien Grall
When an invalidate mapcache cache occurs, Xen need to send and IOREQ_TYPE_INVALIDATE to each server and wait that all IO is completed. We introduce a new function hvm_wait_on_io to wait until an IO is completed. Signed-off-by: Julien Grall --- xen/arch/x86/hvm/hvm.c | 41 ++

[Qemu-devel] [XEN][RFC PATCH V2 16/17] xl: Fix PCI library

2012-08-22 Thread Julien Grall
Quickly fix for PCI library. For the moment each hotplug PCI are add to QEMU 0. We need to find a best way to specify which qemu handle the PCI. Signed-off-by: Julien Grall --- tools/libxl/libxl_pci.c | 19 +++ 1 files changed, 11 insertions(+), 8 deletions(-) diff --git a/too

[Qemu-devel] [XEN][RFC PATCH V2 17/17] xl: implement save/restore for multiple device models

2012-08-22 Thread Julien Grall
Each device model will be save/restore one by one. Signed-off-by: Julien Grall --- tools/libxl/libxl.c |5 +- tools/libxl/libxl_dom.c | 143 ++ tools/libxl/libxl_internal.h | 16 +++-- 3 files changed, 130 insertions(+), 34 deletions(-

[Qemu-devel] [XEN][RFC PATCH V2 03/17] hvm-pci: Handle PCI config space in Xen

2012-08-22 Thread Julien Grall
Add function to register a bdf within a server. An handler was add to catch (cf8 -> cff) ioport access. When Xen reveices a PIO for cf8, it's store the value inside the current vcpu until it receives a PIO for cfc -> cff. In this case, it checks if the bdf is registered and forge the ioreq that wil

[Qemu-devel] [QEMU][RFC V2 09/10] xen-memory: handle node "device_model" for physical mapping

2012-08-22 Thread Julien Grall
Retrieve only physical mapping where device model corresponds to dmid. When a new physical mapping is added, specify the device model id of the current QEMU. Signed-off-by: Julien Grall --- xen-all.c | 20 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/xen

[Qemu-devel] [XEN][RFC PATCH V2 11/17] xc: modify save/restore to support multiple device models

2012-08-22 Thread Julien Grall
- add save/restore new special pages and remove unused - modify save file structure to allow multiple qemu states Signed-off-by: Julien Grall --- tools/libxc/xc_domain_restore.c | 150 +-- tools/libxc/xc_domain_save.c|6 +- 2 files changed, 11

[Qemu-devel] [XEN][RFC PATCH V2 14/17] xl-parsing: Parse new device_models option

2012-08-22 Thread Julien Grall
Add new option "device_models". The user can specify the capability of the QEMU (ui, vifs, ...). This option only works with QEMU upstream (qemu-xen). For instance: device_models= [ 'name=all,vifs=nic1', 'name=qvga,ui', 'name=qide,ide' ] Each device model can also take a path argument which overr

[Qemu-devel] [XEN][RFC PATCH V2 04/17] hvm: Change initialization/destruction of an hvm

2012-08-22 Thread Julien Grall
Prepare/Release structure for multiple ioreq servers. Signed-off-by: Julien Grall --- xen/arch/x86/hvm/hvm.c | 33 ++--- 1 files changed, 10 insertions(+), 23 deletions(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 687e480..292d57b 100644 --

[Qemu-devel] [QEMU][RFC V2 05/10] xen-memory: register memory/IO range in Xen

2012-08-22 Thread Julien Grall
Add Memory listener on IO and modify the one on memory. Becareful, the first listener is not called is the range is still register with register_ioport*. So Xen will never know that this QEMU is handle the range. IO request works as before, the only thing is QEMU will never receive IO request that

[Qemu-devel] [PATCH] w32: Always use standard instead of native format strings

2012-08-22 Thread Stefan Weil
GLib 2.0 include files use __printf__ for the format attribute which resolves to native format strings on w32 hosts. QEMU wants standard format strings instead of native format strings, so we simply change any declaration with __printf__ to use __gnu_printf__. This works because all basic printf

[Qemu-devel] [PATCH V5 3/8] hw/cirrus_vga.c: replace register_ioport*

2012-08-22 Thread Julien Grall
This patch replaces all register_ioport* with portio_*. It permits to use the new Memory stuff like listener. Signed-off-by: Julien Grall --- hw/cirrus_vga.c | 42 -- 1 files changed, 24 insertions(+), 18 deletions(-) diff --git a/hw/cirrus_vga.c b/hw/c

[Qemu-devel] [QEMU][RFC V2 10/10] xen: emulate IDE outside default device set

2012-08-22 Thread Julien Grall
IDE can be emulate in a different QEMU that the default. This patch also fixes ide_get_geometry. When QEMU didn't emulate IDE, it try to derefence a NULL bus. Signed-off-by: Julien Grall --- hw/ide/qdev.c |8 +++- hw/pc_piix.c | 38 -- hw/xen.h

[Qemu-devel] [XEN][RFC PATCH V2 13/17] xl: add device model id to qmp functions

2012-08-22 Thread Julien Grall
With the support of multiple device model, the qmp library need to know which device models is currently used. Signed-off-by: Julien Grall --- tools/libxl/libxl_internal.h | 24 --- tools/libxl/libxl_qmp.c | 49 -- 2 files changed,

[Qemu-devel] [XEN][RFC PATCH V2 15/17] xl: support spawn/destroy on multiple device model

2012-08-22 Thread Julien Grall
Old configuration file is still working with qemu disaggregation. Before to spawn any QEMU, the toolstack will fill correctly, if needed, configuration structure. For the moment, the toolstack spawns device models one by one. Signed-off-by: Julien Grall --- tools/libxl/libxl.c | 16 +

[Qemu-devel] [XEN][RFC PATCH V2 12/17] xl: Add interface to handle qemu disaggregation

2012-08-22 Thread Julien Grall
This patch modifies libxl interface for qemu disaggregation. For the moment, due to some dependencies between devices, we can't let the user choose which QEMU emulate a device. Moreoever this patch adds an "id" field to nic interface. It will be used in config file to specify which QEMU handle the

[Qemu-devel] [XEN][RFC PATCH V2 05/17] hvm: Modify hvm_op

2012-08-22 Thread Julien Grall
This patch removes useless hvm_param due to structure modification and bind new hypercalls to handle ioreq servers and PCI. Signed-off-by: Julien Grall --- xen/arch/x86/hvm/hvm.c | 150 +-- xen/include/public/hvm/params.h |5 -- 2 files changed,

[Qemu-devel] [QEMU][RFC V2 00/10] QEMU disaggregation in Xen environment.

2012-08-22 Thread Julien Grall
Hello, This patch series only concerns QEMU. Another serie will come for Xen. I'm currently working on QEMU disaggregation in Xen environment. The goal is to be able to running multiple QEMU for a same domain (http://lists.xen.org/archives/html/xen-devel/2012-03/msg00299.html). I have already se

[Qemu-devel] [QEMU][RFC V2 04/10] xen-hvm: register qemu as ioreq server and retrieve shared pages

2012-08-22 Thread Julien Grall
With QEMU disaggregation in Xen environment, each QEMU needs to ask Xen for an ioreq server id. This id will be use to retrieve its private share pages. Signed-off-by: Julien Grall --- xen-all.c | 80 +--- 1 files changed, 76 insertions(+

[Qemu-devel] [XEN][RFC PATCH V2 01/17] hvm: Modify interface to support multiple ioreq server

2012-08-22 Thread Julien Grall
Add structure to handle ioreq server. It's a server which can handle a range of IO (MMIO and/or PIO) and emulate a PCI device. Each server has its own shared page to receive ioreq. So we have introduced to HVM PARAM to set/get the first and the last shared page used for ioreq. With this id, the ser

[Qemu-devel] [XEN][RFC PATCH V2 02/17] hvm: Add functions to handle ioreq servers

2012-08-22 Thread Julien Grall
This patch adds functions to : - create/destroy server - map/unmap IO range to a server Signed-off-by: Julien Grall --- xen/arch/x86/hvm/hvm.c | 356 1 files changed, 356 insertions(+), 0 deletions(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xe

[Qemu-devel] [XEN][RFC PATCH V2 00/17] QEMU disaggregation in Xen environment

2012-08-22 Thread Julien Grall
Hello, This patch series only concerns Xen. Another serie will come for QEMU. I'm currently working on QEMU disaggregation in Xen environment. The goal is to be able to running multiple QEMU for a same domain (http://lists.xen.org/archives/html/xen-devel/2012-03/msg00299.html). I have already se

[Qemu-devel] [QEMU][RFC V2 08/10] xen: audio is not a part of default devices

2012-08-22 Thread Julien Grall
Signed-off-by: Julien Grall --- arch_init.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/arch_init.c b/arch_init.c index 9b46bfc..1077b16 100644 --- a/arch_init.c +++ b/arch_init.c @@ -44,6 +44,7 @@ #include "exec-memory.h" #include "hw/pcspk.h" #include "qemu

[Qemu-devel] [QEMU][RFC V2 06/10] xen-pci: register PCI device in Xen and handle IOREQ_TYPE_PCI_CONFIG

2012-08-22 Thread Julien Grall
With QEMU disaggregation QEMU needs to specify which PCI device it's able to handle. It will use the device place in the topology (domain, bus, device, function). When Xen will trap an access for the config space, it will forge a new ioreq and forward it to the right QEMU. Signed-off-by: Julien Gr

[Qemu-devel] [QEMU][RFC V2 07/10] xen: specify which device is part of default devices

2012-08-22 Thread Julien Grall
One major problem of QEMU disaggregation is that some devices needs to be "emulate" in each QEMU, but only one need to register it in Xen. This patch introduces helpers that can be used in QEMU code (for instance hw/pc_piix.c) to specify if the device is part of default sets. Signed-off-by: Julie

[Qemu-devel] [PATCH V5 7/8] hw/apm.c: replace register_ioport*

2012-08-22 Thread Julien Grall
This patch replaces all register_ioport* by a MemorySection. It permits to use the new Memory stuff like listener. Moreover, the PCI is added as an argument for apm_init, so we can register IO inside the pci IO address space. Signed-off-by: Julien Grall --- hw/apm.c | 24

[Qemu-devel] [XEN][RFC PATCH V2 10/17] xc: Add argument to allocate more special pages

2012-08-22 Thread Julien Grall
This patch permits to allocate more special pages. Indeed, for multiple ioreq server, we need to have 2 shared pages by server. Signed-off-by: Julien Grall --- tools/libxc/xc_hvm_build_x86.c| 59 +++- tools/libxc/xenguest.h|4 ++- tools/pytho

[Qemu-devel] [XEN][RFC PATCH V2 08/17] hvm-io: Handle server in buffered IO

2012-08-22 Thread Julien Grall
As for the normal IO, Xen browses the ranges to find which server is able to handle the IO. There is a special case for IOREQ_TYPE_TIMEOFFSET. Indeed, this IO must be send to all servers. For this purpose, a new function hvm_buffered_io_send_server was introduced. It sends an IO to a specific serve

[Qemu-devel] [XEN][RFC PATCH V2 06/17] hvm-io: IO refactoring with ioreq server

2012-08-22 Thread Julien Grall
Modification of several parts of the IO handle. Each vcpu now contain a pointer to the current IO shared page. A default shared page has been created for IO handle by Xen. Each time that Xen receives an ioreq, it will use the default shared page and set the right shared page when it's able to know

[Qemu-devel] [XEN][RFC PATCH V2 09/17] xc: Add the hypercall for multiple servers

2012-08-22 Thread Julien Grall
This patch add 5 hypercalls to register server, io range and PCI. Signed-off-by: Julien Grall --- tools/libxc/xc_domain.c | 155 +++ tools/libxc/xenctrl.h | 21 ++ 2 files changed, 176 insertions(+), 0 deletions(-) diff --git a/tools/libxc/xc

[Qemu-devel] [PATCH V5 4/8] hw/serial.c: replace register_ioport*

2012-08-22 Thread Julien Grall
This patch replaces all register_ioport* with a MemoryRegion. It permits to use the new Memory stuff like listener. For more flexibility, the IO address space is passed as an argument. Signed-off-by: Julien Grall --- hw/mips_mipssim.c |3 ++- hw/pc.h |2 +- hw/serial.c |

[Qemu-devel] [QEMU][RFC V2 02/10] xen: modify QEMU status path in XenStore

2012-08-22 Thread Julien Grall
QEMU will now write its status in another XenStore path because multiple QEMU can run for a same domain. If xen_dmid machine option is not specified, it means that an old version of Xen is used, so status is written in the old path. Signed-off-by: Julien Grall --- xen-all.c | 16 ++

[Qemu-devel] [QEMU][RFC V2 03/10] xen: add wrappers for new Xen disaggregation hypercalls

2012-08-22 Thread Julien Grall
QEMU disaggregation is not supported on old Xen versions. Signed-off-by: Julien Grall --- hw/xen_common.h | 58 +++ 1 files changed, 58 insertions(+), 0 deletions(-) diff --git a/hw/xen_common.h b/hw/xen_common.h index 727757a..b2525ad 10064

[Qemu-devel] [QEMU][RFC V2 01/10] xen: add new machine options to support QEMU disaggregation in Xen environment

2012-08-22 Thread Julien Grall
- xen_dmid: specify the id of QEMU. It will be used to retrieve/store information inside XenStore. - xen_default_dev (on/off): as default devices need to be create in each QEMU (due to code dependency), this option specifies if it will register range/PCI of default device via xe

[Qemu-devel] [PATCH V5 5/8] hw/pc.c: replace register_ioport*

2012-08-22 Thread Julien Grall
This patch replaces all register_ioport* with portio_* or isa_register_portio_list. It permits to use the new Memory stuff like listener. Signed-off-by: Julien Grall --- hw/pc.c | 58 +++--- 1 files changed, 43 insertions(+), 15 deletions(-)

[Qemu-devel] [PATCH V5 8/8] smb: replace_register_ioport*

2012-08-22 Thread Julien Grall
This patch fix smb_ioport_* to be compliant with read/write memory callback. Moreover it replaces all register_ioport* which use theses functions by the new Memory API. Signed-off-by: Julien Grall --- hw/pm_smbus.c |7 --- hw/pm_smbus.h |6 -- hw/vt82c686.c | 18 +++

[Qemu-devel] [PATCH V5 2/8] hw/acpi_piix4.c: replace register_ioport*

2012-08-22 Thread Julien Grall
This patch replaces all register_ioport* with the new memory API. It permits to use the new Memory stuff like listener. Signed-off-by: Julien Grall --- hw/acpi_piix4.c | 160 ++ 1 files changed, 124 insertions(+), 36 deletions(-) diff --git a

[Qemu-devel] [PATCH V5 6/8] hw/dma.c: replace register_ioport*

2012-08-22 Thread Julien Grall
This patch replaces all register_ioport* be the new memory API functions. It permits to use the new Memory stuff like listener. Signed-off-by: Julien Grall --- hw/dma.c | 108 + 1 files changed, 72 insertions(+), 36 deletions(-) diff

[Qemu-devel] [PATCH V5 1/8] isa: add isa_address_space_io

2012-08-22 Thread Julien Grall
This function permits to retrieve ISA IO address space. It will be usefull when we need to pass IO address space as argument. Signed-off-by: Julien Grall --- hw/isa-bus.c |5 + hw/isa.h |1 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/isa-bus.c b/hw/isa-bus

[Qemu-devel] [PATCH V5 0/8] memory: unifiy ioport registration

2012-08-22 Thread Julien Grall
This is the fifth version of patch series about ioport registration. The fourth version was sent few months ago (https://lists.gnu.org/archive/html/qemu-devel/2012-04/msg01396.html). Some part of QEMU still use register_ioport* functions to register ioport. These functions doesn't allow to use Mem

[Qemu-devel] [PATCH for-1.2 v2] target-xtensa: return ENOSYS for unimplemented simcalls

2012-08-22 Thread Max Filippov
This prevents guest from proceeding with uninitialised garbage returned from unimplemented simcalls. Signed-off-by: Max Filippov --- target-xtensa/xtensa-semi.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/target-xtensa/xtensa-semi.c b/target-xtensa/xtensa-semi.c ind

  1   2   3   >