[Qemu-devel] [PATCH] pc: reduce duplication, fix PIIX descriptions

2013-08-27 Thread Michael S. Tsirkin
We have a lot of code duplication between machine types, this increases with each new machine type and each new field. This has already introduced a minor bug: description for pc-1.3 says "Standard PC" while description for pc-1.4 is "Standard PC (i440FX + PIIX, 1996)" which makes you think 1.3 is

Re: [Qemu-devel] [PATCH 06/47] hw/alpha/Makefile.objs: Build objects depending on CLIPPER

2013-08-27 Thread Paolo Bonzini
Il 27/08/2013 01:17, Peter Maydell ha scritto: > On 26 August 2013 23:33, Paolo Bonzini wrote: >> Il 26/08/2013 19:30, Richard Henderson ha scritto: >>> This isn't the kernel, where non-pagable code size is a concern, so I don't >>> see >>> how full configuration of machine emulations and devices

Re: [Qemu-devel] [PATCH] spapr: support CPU hotplug

2013-08-27 Thread Paolo Bonzini
Il 27/08/2013 08:37, Alexey Kardashevskiy ha scritto: >>> So this is here to make sure we don't accidentally get out of halted state >>> by an interrupt on that vcpu. Could you please somehow make that part >>> obvious? Either by adding a comment or by only explicitly masking DEC and >>> EE and

Re: [Qemu-devel] [PATCH v3 6/6] hw: Clean up bogus default boot order

2013-08-27 Thread Paolo Bonzini
Il 26/08/2013 09:12, Markus Armbruster ha scritto: > * pc and its variants > > Of 19 PC types, 18 get .default_boot_order = "cad", and one (xenfv) > gets nothing. I think you mean xenpv---which isn't a PC machine, in principle (or so Stefano told me) it could be used for ARM as well. Paolo

[Qemu-devel] [PATCH] pc: fix regression for 64 bit PCI memory

2013-08-27 Thread Michael S. Tsirkin
commit 398489018183d613306ab022653552247d93919f pc: limit 64 bit hole to 2G by default introduced a way for management to control the window allocated to the 64 bit PCI hole. This is useful, but existing management tools do not know how to set this property. As a result, e.g. specifying a lar

Re: [Qemu-devel] [PATCH v3 6/6] hw: Clean up bogus default boot order

2013-08-27 Thread Markus Armbruster
Paolo Bonzini writes: > Il 26/08/2013 09:12, Markus Armbruster ha scritto: >> * pc and its variants >> >> Of 19 PC types, 18 get .default_boot_order = "cad", and one (xenfv) >> gets nothing. > > I think you mean xenpv---which isn't a PC machine, in principle (or so > Stefano told me) it coul

Re: [Qemu-devel] [PATCH] pc: reduce duplication, fix PIIX descriptions

2013-08-27 Thread Paolo Bonzini
Il 27/08/2013 09:01, Michael S. Tsirkin ha scritto: > We have a lot of code duplication between machine types, > this increases with each new machine type > and each new field. > > This has already introduced a minor bug: description > for pc-1.3 says "Standard PC" while description for > pc-1.4 i

Re: [Qemu-devel] Boot Problems Windows XP guest

2013-08-27 Thread Stefan Hajnoczi
On Mon, Aug 26, 2013 at 11:52:26AM +0200, Erik Rull wrote: > is it possible to get back to the "legacy" BIOS instead of the (u)efi based > BIOS? I have problems booting the guest on a SSD HDD, there it reboots > infinitely, when running the guest on a rotating HDD, it works. On qemu 1.2.0 > both di

Re: [Qemu-devel] [PATCH] spapr: support CPU hotplug

2013-08-27 Thread Alexey Kardashevskiy
On 08/27/2013 05:02 PM, Paolo Bonzini wrote: > Il 27/08/2013 08:37, Alexey Kardashevskiy ha scritto: So this is here to make sure we don't accidentally get out of halted state by an interrupt on that vcpu. Could you please somehow make that part obvious? Either by adding a comment

Re: [Qemu-devel] questions about the bdrv_co_do_readv()

2013-08-27 Thread Stefan Hajnoczi
On Mon, Aug 26, 2013 at 09:59:51PM -0500, Yaodong Yang wrote: > In sum, the bdrv_co_do_readv() seems to be executed inside two thread, the > migration thread and native iothread. Both of them executed the function > twice for a single request. Could someone explain it for me ? I appreciate it >

Re: [Qemu-devel] [PATCH v2] pci: add config space access traces

2013-08-27 Thread Alexey Kardashevskiy
On 08/21/2013 02:42 PM, Alexey Kardashevskiy wrote: > This adds pci_cfg_read and pci_cfg_write traces for config spaces accesses. > > Signed-off-by: Alexey Kardashevskiy > --- > Changes: > v2: > * added slot and function numbers into traces > * added arrows in trace strings > --- > hw/pci/pci_ho

[Qemu-devel] [Bug 1216368] Re: unsupported screen resolution crashes sdl-qemu

2013-08-27 Thread Lei Li
Yes, it is a bug. It should go back to the previous setting if the new screen resolution falied. I will send a patch later. Thanks. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1216368 Title: u

Re: [Qemu-devel] [PATCH] pc: reduce duplication, fix PIIX descriptions

2013-08-27 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > We have a lot of code duplication between machine types, > this increases with each new machine type > and each new field. > > This has already introduced a minor bug: description > for pc-1.3 says "Standard PC" while description for > pc-1.4 is "Standard PC (i440FX

Re: [Qemu-devel] AioContext, IOthread and Block migration thread

2013-08-27 Thread Stefan Hajnoczi
On Mon, Aug 26, 2013 at 10:07:23AM -0500, Yaodong Yang wrote: > 1. Is it true that all the requests to disk images need to go through > function bdrv_co_do_readv() or bdrv_co_do_writev()? Yes, read/write requests go through those functions. > 2. In block-migration thread, the bdrv_co_do_readv is

[Qemu-devel] [RFC PATCH 2/3] block: add function qemu_get_bds_queue

2013-08-27 Thread Wenchao Xia
It should be caller's responsibility to tell which bds* needs take action in multithread case, but since now only one thread exist and only one bds* group exist, add this function to manage the bds* queue temporarily. Once the block layer user code manage the bds* queue by itself and global bdrv_st

[Qemu-devel] [RFC PATCH 0/3] move global bdrv_states out of block.c

2013-08-27 Thread Wenchao Xia
In order to support multiple caller from different thread, global inside block layer should be carefully treated. bdrv_states represent a group of bds* which is now used by qemu, so it is a user concept which should be managed by user. This series tries to move it out, so later different thread can

[Qemu-devel] [RFC PATCH 1/3] block: add typedef for BlockDriverState queue

2013-08-27 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- block.c |2 +- include/block/block.h |2 ++ 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/block.c b/block.c index a387c1a..9db3c32 100644 --- a/block.c +++ b/block.c @@ -93,7 +93,7 @@ static bool bdrv_exceed_iops_limits(BlockDr

[Qemu-devel] [RFC PATCH 3/3] block: add parameter bds queue in bdrv_invalidate_cache_all()

2013-08-27 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- block.c |4 ++-- include/block/block.h |2 +- migration.c |2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/block.c b/block.c index bf35b90..e4dd84e 100644 --- a/block.c +++ b/block.c @@ -4175,11 +4175,11 @@ vo

Re: [Qemu-devel] [PATCH] qcow2: Change default for new images to compat=1.1

2013-08-27 Thread Kevin Wolf
Am 23.08.2013 um 13:05 hat Ján Tomko geschrieben: > On 08/19/2013 11:25 AM, Kevin Wolf wrote: > > By the time that qemu 1.7 will be released, enough time will has passed > > since qemu 1.1, which is the first version to understand version 3 > > images, that changing the default shouldn't hurt many

Re: [Qemu-devel] pvpanic plans?

2013-08-27 Thread Richard W.M. Jones
On Thu, Aug 22, 2013 at 03:09:06PM -0500, Anthony Liguori wrote: > Paolo Bonzini writes: > > Also, a virtio watchdog device makes little sense, IMHO. PV makes sense > > if emulation has insufficient performance, excessive CPU usage, or > > excessive complexity. We already have both an ISA and a

[Qemu-devel] [PATCH v2] qcow2: Change default for new images to compat=1.1

2013-08-27 Thread Kevin Wolf
By the time that qemu 1.7 will be released, enough time will have passed since qemu 1.1, which is the first version to understand version 3 images, that changing the default shouldn't hurt many people any more and the benefits of using the new format outweigh the pain. qemu-iotests already runs wi

[Qemu-devel] [PATCH v2 1/3] hpet: inverse polarity when pin above ISA_NUM_IRQS

2013-08-27 Thread Liu Ping Fan
According to hpet spec, hpet irq is high active. But according to ICH spec, there is inversion before the input of ioapic. So the OS will expect low active on this IRQ line.(And this is observed on bare metal). We fold the emulation of this inversion inside the hpet logic. Signed-off-by: Liu Ping

[Qemu-devel] [PATCH v2 2/3] vl: add func to check the machine type

2013-08-27 Thread Liu Ping Fan
On different machines, the device can has different properties. Export machine type's check interface to devices, so the device can decide its behavior at runtime. Signed-off-by: Liu Ping Fan --- include/hw/boards.h | 1 + vl.c| 8 2 files changed, 9 insertions(+) diff

[Qemu-devel] [PATCH v2 3/3] hpet: entitle more irq pins for hpet

2013-08-27 Thread Liu Ping Fan
On q35 machine, IRQ2/8 can be reserved for hpet timer 0/1. And pin 16~23 of ioapic can be dynamically assigned to hpet as guest chooses. Signed-off-by: Liu Ping Fan --- hw/timer/hpet.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/hw/timer/hpet.c b/hw/timer/

Re: [Qemu-devel] [PATCH] gluster: Abort on AIO completion failure

2013-08-27 Thread Bharata B Rao
On Tue, Aug 27, 2013 at 08:58:05AM +0200, Paolo Bonzini wrote: > > diff --git a/block/gluster.c b/block/gluster.c > > index 46f36f8..942154a 100644 > > --- a/block/gluster.c > > +++ b/block/gluster.c > > @@ -427,20 +427,9 @@ static void gluster_finish_aiocb(struct glfs_fd *fd, > > ssize_t ret, voi

[Qemu-devel] [PATCH v1] gluster: Abort on AIO completion failure

2013-08-27 Thread Bharata B Rao
Currently if gluster AIO callback thread fails to notify the QEMU thread about AIO completion, we try graceful recovery by marking the disk drive as inaccessible. This error recovery code is race-prone as found by Asias and Stefan. However as found out by Paolo, this kind of error is impossible and

Re: [Qemu-devel] [PATCH v2] pci: add config space access traces

2013-08-27 Thread Michael S. Tsirkin
On Tue, Aug 27, 2013 at 05:48:35PM +1000, Alexey Kardashevskiy wrote: > On 08/21/2013 02:42 PM, Alexey Kardashevskiy wrote: > > This adds pci_cfg_read and pci_cfg_write traces for config spaces accesses. > > > > Signed-off-by: Alexey Kardashevskiy > > --- > > Changes: > > v2: > > * added slot and

Re: [Qemu-devel] [PATCH v2] pci: add config space access traces

2013-08-27 Thread Michael S. Tsirkin
On Wed, Aug 21, 2013 at 02:42:06PM +1000, Alexey Kardashevskiy wrote: > This adds pci_cfg_read and pci_cfg_write traces for config spaces accesses. > > Signed-off-by: Alexey Kardashevskiy > --- Applied, thanks. > Changes: > v2: > * added slot and function numbers into traces > * added arrows in

[Qemu-devel] [PATCH v2 0/2] qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe

2013-08-27 Thread Stefan Hajnoczi
v2: * Rebased onto qemu.git/master following the merge of Alex's AioContext timers The purpose of these patches is to eventually allow device models to set and cancel timers without holding the global mutex. When the device model runs in a vcpu thread and the iothread processes timers, the QEMUT

[Qemu-devel] [PATCH v2 1/2] qemu-timer: drop outdated signal safety comments

2013-08-27 Thread Stefan Hajnoczi
host_alarm_handler() is invoked from the signal processing thread (currently the iothread). Previously we did processing in a real signal handler with signalfd and therefore needed signal-safe timer code. Today host_alarm_handler() just marks the alarm timer as expired/pending and notifies the ma

[Qemu-devel] [PATCH v2 2/2] qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe

2013-08-27 Thread Stefan Hajnoczi
Introduce QEMUTimerList->active_timers_lock to protect the linked list of active timers. This allows qemu_timer_mod_ns() to be called from any thread. Note that vm_clock is not thread-safe and its use of qemu_clock_has_timers() works fine today but is also not thread-safe. The purpose of this pa

Re: [Qemu-devel] [PATCH] pc: reduce duplication, fix PIIX descriptions

2013-08-27 Thread Michael S. Tsirkin
On Tue, Aug 27, 2013 at 09:29:33AM +0200, Paolo Bonzini wrote: > Il 27/08/2013 09:01, Michael S. Tsirkin ha scritto: > > We have a lot of code duplication between machine types, > > this increases with each new machine type > > and each new field. > > > > This has already introduced a minor bug: d

Re: [Qemu-devel] [PATCH v2] pseries: Update SLOF firmware image

2013-08-27 Thread Alexander Graf
On 27.08.2013, at 05:42, Alexey Kardashevskiy wrote: > This has reworked USB OHCI and adds support of USB EHCI, > VIRTIO-SCSI and various fixes (IBM VSCSI, VGA and more). > > The full list of fixes is: > * usb-ohci: Convert td-phys every time to td-virt > * usb-storage: Fix cbwflags field > *

Re: [Qemu-devel] [PATCH v3 1/8] target-ppc: Add helper for KVM_PPC_RTAS_DEFINE_TOKEN

2013-08-27 Thread Alexander Graf
On 27.08.2013, at 06:10, Benjamin Herrenschmidt wrote: > On Tue, 2013-08-27 at 03:48 +0200, Andreas Färber wrote: >> Also, QEMU is definitely not the only project that has higher >> acceptance >> criteria than patch-works-for-the-patch-author. :) > > There's a difference between high acceptance

Re: [Qemu-devel] pvpanic plans?

2013-08-27 Thread Richard W.M. Jones
On Thu, Aug 22, 2013 at 01:25:32PM -0500, Anthony Liguori wrote: > I believe that the watchdogs we emulate today are not supported by a > majority of guests. BTW this is not true. The two watchdog devices are supported by all Linux guests. Windows guests do not support them, but Windows lacks[1]

Re: [Qemu-devel] [PATCH v2 1/2] qemu-timer: drop outdated signal safety comments

2013-08-27 Thread Alex Bligh
On 27 Aug 2013, at 09:23, Stefan Hajnoczi wrote: > host_alarm_handler() is invoked from the signal processing thread > (currently the iothread). Previously we did processing in a real signal > handler with signalfd and therefore needed signal-safe timer code. > > Today host_alarm_handler() just

Re: [Qemu-devel] [PATCH] spapr-vscsi: Adding VSCSI capabilities

2013-08-27 Thread Alexander Graf
On 27.08.2013, at 07:43, Nikunj A Dadhania wrote: > Alexander Graf writes: > >> On 26.08.2013, at 13:46, Nikunj A Dadhania wrote: >> >>> Alexander Graf writes: >>> On 26.08.2013, at 12:58, Nikunj A Dadhania wrote: > This implements capabilities exchange between host and client

Re: [Qemu-devel] [PATCH v2 3/3] hpet: entitle more irq pins for hpet

2013-08-27 Thread Paolo Bonzini
Il 27/08/2013 10:10, Liu Ping Fan ha scritto: > On q35 machine, IRQ2/8 can be reserved for hpet timer 0/1. And pin 16~23 > of ioapic can be dynamically assigned to hpet as guest chooses. First of all, the backwards-compatible q35 machines should also use the old value. Second, the HPET should _no

Re: [Qemu-devel] [PATCH] spapr: support CPU hotplug

2013-08-27 Thread Alexander Graf
On 27.08.2013, at 09:41, Alexey Kardashevskiy wrote: > On 08/27/2013 05:02 PM, Paolo Bonzini wrote: >> Il 27/08/2013 08:37, Alexey Kardashevskiy ha scritto: > So this is here to make sure we don't accidentally get out of halted > state by an interrupt on that vcpu. Could you please someh

Re: [Qemu-devel] [PATCH v2 2/2] qemu-timer: make qemu_timer_mod_ns() and qemu_timer_del() thread-safe

2013-08-27 Thread Alex Bligh
On 27 Aug 2013, at 09:23, Stefan Hajnoczi wrote: > Introduce QEMUTimerList->active_timers_lock to protect the linked list > of active timers. This allows qemu_timer_mod_ns() to be called from any > thread. > > Note that vm_clock is not thread-safe and its use of > qemu_clock_has_timers() works

Re: [Qemu-devel] [PATCH v2 3/3] hpet: entitle more irq pins for hpet

2013-08-27 Thread liu ping fan
On Tue, Aug 27, 2013 at 4:45 PM, Paolo Bonzini wrote: > Il 27/08/2013 10:10, Liu Ping Fan ha scritto: >> On q35 machine, IRQ2/8 can be reserved for hpet timer 0/1. And pin 16~23 >> of ioapic can be dynamically assigned to hpet as guest chooses. > > First of all, the backwards-compatible q35 machin

Re: [Qemu-devel] [PATCH] spapr: support CPU hotplug

2013-08-27 Thread Alexey Kardashevskiy
On 08/27/2013 06:54 PM, Alexander Graf wrote: > > On 27.08.2013, at 09:41, Alexey Kardashevskiy wrote: > >> On 08/27/2013 05:02 PM, Paolo Bonzini wrote: >>> Il 27/08/2013 08:37, Alexey Kardashevskiy ha scritto: >> So this is here to make sure we don't accidentally get out of halted >> st

Re: [Qemu-devel] [PATCH] spapr: support CPU hotplug

2013-08-27 Thread Alexander Graf
On 27.08.2013, at 11:03, Alexey Kardashevskiy wrote: > On 08/27/2013 06:54 PM, Alexander Graf wrote: >> >> On 27.08.2013, at 09:41, Alexey Kardashevskiy wrote: >> >>> On 08/27/2013 05:02 PM, Paolo Bonzini wrote: Il 27/08/2013 08:37, Alexey Kardashevskiy ha scritto: >>> So this is here

Re: [Qemu-devel] [PATCH] spapr-vscsi: Adding VSCSI capabilities

2013-08-27 Thread Nikunj A Dadhania
Alexander Graf writes: >> +static int vscsi_send_capabilities(VSCSIState *s, vscsi_req *req) >> +{ >> +struct viosrp_capabilities *vcap; >> +struct capabilities cap = { }; >> +uint16_t len, req_len; >> +uint64_t buffer; >> +int rc; >> + >> +vcap = &req->iu.mad.capabilities;

Re: [Qemu-devel] [PATCH v3 6/8] xics-kvm: Support for in-kernel XICS interrupt controller

2013-08-27 Thread Alexander Graf
On 19.08.2013, at 07:55, Alexey Kardashevskiy wrote: > From: David Gibson > > Recent (host) kernels support emulating the PAPR defined "XICS" interrupt > controller system within KVM. This patch allows qemu to initialize and > configure the in-kernel XICS, and keep its state in sync with qemu'

Re: [Qemu-devel] [PATCH v3] xics: Add H_IPOLL implementation

2013-08-27 Thread Alexander Graf
On 23.08.2013, at 14:02, Alexey Kardashevskiy wrote: > From: Benjamin Herrenschmidt > > This adds support for the H_IPOLL hypercall which the guest > uses to poll for a pending interrupt. This hypercall is > mandatory for PAPR+ and there is no way for the guest to > detect whether it is support

Re: [Qemu-devel] [PATCH v3] xics: Implement H_XIRR_X

2013-08-27 Thread Alexander Graf
On 23.08.2013, at 14:03, Alexey Kardashevskiy wrote: > From: Benjamin Herrenschmidt > > This implements H_XIRR_X hypercall in addition to H_XIRR as > it is mandatory for PAPR+ and there is no way for the guest to > detect whether it is supported or not so just add it. > > As the Partition Adju

Re: [Qemu-devel] [PATCH v2 3/3] hpet: entitle more irq pins for hpet

2013-08-27 Thread Paolo Bonzini
Il 27/08/2013 11:01, liu ping fan ha scritto: > On Tue, Aug 27, 2013 at 4:45 PM, Paolo Bonzini wrote: >> Il 27/08/2013 10:10, Liu Ping Fan ha scritto: >>> On q35 machine, IRQ2/8 can be reserved for hpet timer 0/1. And pin 16~23 >>> of ioapic can be dynamically assigned to hpet as guest chooses. >>

Re: [Qemu-devel] [PATCH 1/5] qcow2: Add corrupt bit

2013-08-27 Thread Kevin Wolf
Am 26.08.2013 um 15:04 hat Max Reitz geschrieben: > This adds an incompatible bit indicating corruption to qcow2. Any image > with this bit set may not be written to unless for repairing (and > subsequently clearing the bit if the repair has been successful). > > Signed-off-by: Max Reitz > --- >

Re: [Qemu-devel] [PATCH 1/5] qcow2: Add corrupt bit

2013-08-27 Thread Max Reitz
Am 27.08.2013 11:54, schrieb Kevin Wolf: Am 26.08.2013 um 15:04 hat Max Reitz geschrieben: This adds an incompatible bit indicating corruption to qcow2. Any image with this bit set may not be written to unless for repairing (and subsequently clearing the bit if the repair has been successful).

Re: [Qemu-devel] [PATCH 1/2] kvm irqfd: support msimessage to irq translation in PHB

2013-08-27 Thread Alexander Graf
On 23.08.2013, at 06:29, Alexey Kardashevskiy wrote: > On 08/19/2013 07:01 PM, Michael S. Tsirkin wrote: >> On Mon, Aug 19, 2013 at 06:10:01PM +1000, Alexey Kardashevskiy wrote: >>> On 08/19/2013 05:54 PM, Michael S. Tsirkin wrote: On Mon, Aug 19, 2013 at 05:44:04PM +1000, Alexey Kardashevsk

Re: [Qemu-devel] [PATCH 2/5] qcow2: Metadata overlap checks

2013-08-27 Thread Kevin Wolf
Am 26.08.2013 um 15:04 hat Max Reitz geschrieben: > Two new functions are added; the first one checks a given range in the > image file for overlaps with metadata (main header, L1 tables, L2 > tables, refcount table and blocks). > > The second one should be used immediately before writing to the i

Re: [Qemu-devel] [PATCH 1/2] kvm irqfd: support msimessage to irq translation in PHB

2013-08-27 Thread Michael S. Tsirkin
On Tue, Aug 27, 2013 at 12:06:49PM +0200, Alexander Graf wrote: > > On 23.08.2013, at 06:29, Alexey Kardashevskiy wrote: > > > On 08/19/2013 07:01 PM, Michael S. Tsirkin wrote: > >> On Mon, Aug 19, 2013 at 06:10:01PM +1000, Alexey Kardashevskiy wrote: > >>> On 08/19/2013 05:54 PM, Michael S. Tsir

Re: [Qemu-devel] [PATCH 1/2] kvm irqfd: support msimessage to irq translation in PHB

2013-08-27 Thread Benjamin Herrenschmidt
On Tue, 2013-08-27 at 13:26 +0300, Michael S. Tsirkin wrote: > e would end up with something like > > > > diff --git a/kvm-all.c b/kvm-all.c > > index 716860f..ca3251e 100644 > > --- a/kvm-all.c > > +++ b/kvm-all.c > > @@ -1190,6 +1190,10 @@ int kvm_irqchip_add_msi_route(KVMState *s, > > MSIMessa

Re: [Qemu-devel] [PULL 5/7] tcg: Add mmu helpers that take a return address argument

2013-08-27 Thread Aurelien Jarno
On Mon, Aug 26, 2013 at 03:34:15PM -0700, Richard Henderson wrote: > On 08/26/2013 03:26 PM, Paolo Bonzini wrote: > > Something that can be done on top of this patch: what about moving the > > "-1" to helper_ret_*? It is common to pretty much all the targets > > (except ARM has -2), and it would a

Re: [Qemu-devel] [PULL 5/7] tcg: Add mmu helpers that take a return address argument

2013-08-27 Thread Aurelien Jarno
On Tue, Aug 27, 2013 at 12:26:00AM +0100, Peter Maydell wrote: > On 26 August 2013 22:00, Richard Henderson wrote: > > Allow the code that tcg generates to be less obtuse, passing in > > the return address directly instead of computing it in the helper. > > > +uint8_t helper_ret_ldb_mmu(CPUArchSt

Re: [Qemu-devel] [PATCH v2 0/9] Improve tcg ldst optimization

2013-08-27 Thread Aurelien Jarno
On Fri, Aug 16, 2013 at 11:13:25PM -0700, Richard Henderson wrote: > V2: > * Feedback from Aurelien > * Added the first patch. > * ARM patches fixed. > > Sorry about not merging back from the tree on my arm machine > before posting the patch set last time. > > > r~ > > > Richard H

[Qemu-devel] [PATCH] sdl: Reverse support for video mode setting

2013-08-27 Thread Lei Li
Currently, If the setting of video mode failed, qemu will exit. It should go back to the previous setting if the new screen resolution failed. This patch fixes LP#1216368, add support to revert to existing surface for the failure of video mode setting. Reported-by: Sascha Krissler Signed-off-by:

Re: [Qemu-devel] [PATCH 2/5] qcow2: Metadata overlap checks

2013-08-27 Thread Max Reitz
Am 27.08.2013 12:17, schrieb Kevin Wolf: Am 26.08.2013 um 15:04 hat Max Reitz geschrieben: Two new functions are added; the first one checks a given range in the image file for overlaps with metadata (main header, L1 tables, L2 tables, refcount table and blocks). The second one should be used i

Re: [Qemu-devel] [PATCH 7/8] spapr vfio: add spapr-pci-vfio-host-bridge to support vfio

2013-08-27 Thread Alexander Graf
On 07.08.2013, at 10:21, Alexey Kardashevskiy wrote: > The patch adds a spapr-pci-vfio-host-bridge device type > which is a PCI Host Bridge with VFIO support. The new device > inherits from the spapr-pci-host-bridge device and adds > the following properties: > iommu - IOMMU group ID which

Re: [Qemu-devel] [PATCH 2/5] qcow2: Metadata overlap checks

2013-08-27 Thread Kevin Wolf
Am 27.08.2013 um 13:06 hat Max Reitz geschrieben: > Am 27.08.2013 12:17, schrieb Kevin Wolf: > >Am 26.08.2013 um 15:04 hat Max Reitz geschrieben: > >>Two new functions are added; the first one checks a given range in the > >>image file for overlaps with metadata (main header, L1 tables, L2 > >>tabl

[Qemu-devel] [PATCH v2] cpu: Move cpu state syncs up into cpu_dump_state()

2013-08-27 Thread James Hogan
The x86 and ppc targets call cpu_synchronize_state() from their *_cpu_dump_state() callbacks to ensure that up to date state is dumped when KVM is enabled (for example when a KVM internal error occurs). Move this call up into the generic cpu_dump_state() function so that other KVM targets (namely

Re: [Qemu-devel] [PATCH 1/2] kvm irqfd: support msimessage to irq translation in PHB

2013-08-27 Thread Alexander Graf
On 27.08.2013, at 12:32, Benjamin Herrenschmidt wrote: > On Tue, 2013-08-27 at 13:26 +0300, Michael S. Tsirkin wrote: >> e would end up with something like >>> >>> diff --git a/kvm-all.c b/kvm-all.c >>> index 716860f..ca3251e 100644 >>> --- a/kvm-all.c >>> +++ b/kvm-all.c >>> @@ -1190,6 +1190,10

Re: [Qemu-devel] [PATCH 3/5] qcow2: Employ metadata overlap checks

2013-08-27 Thread Kevin Wolf
Am 26.08.2013 um 15:04 hat Max Reitz geschrieben: > The pre-write overlap check function is now called before most of the > qcow2 writes (aborting it on collision or other error). > > Signed-off-by: Max Reitz > --- > block/qcow2-cache.c| 17 + > block/qcow2-cluster.c | 23 ++

[Qemu-devel] trigger a gpio interrupt inside qemu

2013-08-27 Thread she roy
Is there somebody can help me to trigger a gpio interrupt inside qemu? I wrote a simple function to trigger a interrupt in pl061.c as follow: PL061State *gPl061; void pl061_raise_irq() { qemu_set_irq(gPl061->irq, 1); } gPl061 is assigned in function pl061_initfn: static int pl061_initfn(SysBusD

Re: [Qemu-devel] [PATCH 3/5] qcow2: Employ metadata overlap checks

2013-08-27 Thread Max Reitz
Am 27.08.2013 13:32, schrieb Kevin Wolf: Am 26.08.2013 um 15:04 hat Max Reitz geschrieben: The pre-write overlap check function is now called before most of the qcow2 writes (aborting it on collision or other error). Signed-off-by: Max Reitz --- block/qcow2-cache.c| 17 +

Re: [Qemu-devel] [PATCH 3/5] qcow2: Employ metadata overlap checks

2013-08-27 Thread Kevin Wolf
Am 27.08.2013 um 13:41 hat Max Reitz geschrieben: > Am 27.08.2013 13:32, schrieb Kevin Wolf: > >Am 26.08.2013 um 15:04 hat Max Reitz geschrieben: > >>The pre-write overlap check function is now called before most of the > >>qcow2 writes (aborting it on collision or other error). > >> > >>Signed-off

Re: [Qemu-devel] trigger a gpio interrupt inside qemu

2013-08-27 Thread Max Filippov
On Tue, Aug 27, 2013 at 3:36 PM, she roy wrote: > Is there somebody can help me to trigger a gpio interrupt inside qemu? I > wrote a simple function to trigger a interrupt in pl061.c as follow: > PL061State *gPl061; > void pl061_raise_irq() > { > qemu_set_irq(gPl061->irq, 1); > } [...] > But

Re: [Qemu-devel] [PATCH 4/5] qcow2: Check allocations in qcow2_check

2013-08-27 Thread Kevin Wolf
Am 26.08.2013 um 15:04 hat Max Reitz geschrieben: > Adds a new function checking for overlapping cluster allocations. > Furthermore, qcow2_check now marks the image as consistent if no > corruptions have been found. > > Signed-off-by: Max Reitz > --- > block/qcow2-cluster.c | 414 >

Re: [Qemu-devel] [PATCH 5/5] qemu-iotests: Overlapping cluster allocations

2013-08-27 Thread Kevin Wolf
Am 26.08.2013 um 15:04 hat Max Reitz geschrieben: > A new test on corrupted images with overlapping cluster allocations. > > Signed-off-by: Max Reitz One more thing that could be checked is that the image can be opened read-only, but not r/w while the corrupt flag is set. The existing tests look

[Qemu-devel] [PULL 1/3] w32: Fix broken out-of-tree builds (missing version.o)

2013-08-27 Thread Stefan Weil
Commit 0b516ef0dfad9a7b34c675c98e8ec92ab4d38466 added version.o to all executables, but broke out-of-tree builds: for those builds the pattern rule %.o: %.rc from rules.mak does not match, so version.o was no longer built. Adding explicit build rules fixes this. Reported-by: Michael Roth Signed-

[Qemu-devel] [PULL 2/3] w32: Add an icon resource

2013-08-27 Thread Stefan Weil
The QEMU mascot which was already used for the NSIS installer is now used for all QEMU executables. Signed-off-by: Stefan Weil --- version.rc |2 ++ 1 file changed, 2 insertions(+) diff --git a/version.rc b/version.rc index 82e10ec..a50d62f 100644 --- a/version.rc +++ b/version.rc @@ -26,3

[Qemu-devel] [PULL 0/3] w32: Fix build and other small improvements

2013-08-27 Thread Stefan Weil
The following changes since commit f7ad538e1ea130c8b6f3abb06ad6c856242c799e: Merge remote-tracking branch 'stefanha/block' into staging (2013-08-26 09:19:50 -0500) are available in the git repository at: git://qemu.weilnetz.de/qemu.git mingw for you to fetch changes up to 92f1623663a8797e

[Qemu-devel] [PATCH V10 03/15] monitor: avoid use of global *cur_mon in block_completion_it()

2013-08-27 Thread Wenchao Xia
Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake --- monitor.c | 18 ++ 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/monitor.c b/monitor.c index a59a402..d1a6bda 100644 --- a/monitor.c +++ b/monitor.c @@ -4090,14 +4090,21 @@ static void file_completion(Moni

[Qemu-devel] [PATCH V10 05/15] monitor: avoid use of global *cur_mon in readline_completion()

2013-08-27 Thread Wenchao Xia
Now all completion functions do not use *cur_mon any more, instead they use rs->mon. In short, structure ReadLineState decide where the complete action would be taken now. Tested with the case that qemu have two telnet monitors, auto completion function works normal. Signed-off-by: Wenchao Xia R

[Qemu-devel] [PULL 3/3] gtk: Remove unused include statements which are not portable

2013-08-27 Thread Stefan Weil
These include files don't exist for MinGW and are not needed for Linux (and hopefully for other hosts as well), so remove them. Signed-off-by: Stefan Weil --- ui/gtk.c |4 1 file changed, 4 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index c38146f..b5f4f0b 100644 --- a/ui/gtk.c +++ b

[Qemu-devel] [PATCH V10 08/15] monitor: avoid direct use of global variable *mon_cmds

2013-08-27 Thread Wenchao Xia
New member *cmd_table is added in structure Monitor to avoid direct usage of *mon_cmds. Now monitor have an associated command table, when global variable *info_cmds is also discarded, structure Monitor would gain full control about how to deal with user input. Signed-off-by: Wenchao Xia --- mon

[Qemu-devel] [PATCH V10 00/15] monitor: support sub command group in auto completion and help

2013-08-27 Thread Wenchao Xia
This series make auto completion and help functions works normal for sub command, by using reentrant functions. In order to do that, global variables are not directly used in those functions any more. With this series, cmd_table is a member of structure Monitor so it is possible to create a monitor

[Qemu-devel] [PATCH V10 09/15] monitor: code move for parse_cmdline()

2013-08-27 Thread Wenchao Xia
help_cmd() need this function later, so move it. get_str() is called by parse_cmdline() so it is moved also. Some code style error reported by check script, is also fixed. Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake --- monitor.c | 191 +++

[Qemu-devel] [PATCH V10 01/15] monitor: avoid use of global *cur_mon in cmd_completion()

2013-08-27 Thread Wenchao Xia
A new local variable *mon is added in monitor_find_completion() to make compile pass, which will be removed later in conversion patch for monitor_find_completion(). Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake --- monitor.c | 13 +++-- 1 files changed, 7 insertions(+), 6 deletio

[Qemu-devel] [PATCH V10 13/15] monitor: support sub command in auto completion

2013-08-27 Thread Wenchao Xia
This patch allows auto completion work normal for sub command case, "info block [DEVICE]" can auto complete now, by re-enter the completion function. In original code "info" is treated as a special case, now it is treated as a sub command group, global variable info_cmds is not used any more. "hel

[Qemu-devel] [PATCH V10 06/15] monitor: call sortcmdlist() only one time

2013-08-27 Thread Wenchao Xia
It doesn't need to be done for every monitor, so change it. Signed-off-by: Wenchao Xia --- monitor.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/monitor.c b/monitor.c index fffb434..db4d441 100644 --- a/monitor.c +++ b/monitor.c @@ -4762,6 +4762,7 @@ void monitor_i

[Qemu-devel] [PATCH V10 12/15] monitor: refine monitor_find_completion()

2013-08-27 Thread Wenchao Xia
In order to support sub command in auto completion, a reentrant function is needed, so monitor_find_completion() is split into two parts. The first part does parsing of user input which need to be done only once, the second part does the auto completion job according to the parsing result, which co

[Qemu-devel] [PATCH V10 04/15] monitor: avoid use of global *cur_mon in monitor_find_completion()

2013-08-27 Thread Wenchao Xia
Parameter *mon is added, and local variable *mon added in previous patch is removed. The caller readline_completion(), pass rs->mon as value, which should be initialized in readline_init() called by monitor_init(). Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake --- include/monitor/readline.

[Qemu-devel] [PATCH V10 02/15] monitor: avoid use of global *cur_mon in file_completion()

2013-08-27 Thread Wenchao Xia
Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake --- monitor.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/monitor.c b/monitor.c index 31b527d..a59a402 100644 --- a/monitor.c +++ b/monitor.c @@ -4034,7 +4034,7 @@ static void cmd_completion(Monitor *mon, cons

[Qemu-devel] [PATCH V10 14/15] monitor: allow "help" show message for single command in sub group

2013-08-27 Thread Wenchao Xia
A new parameter type 'S' is introduced to allow user input any string. "help info block" works normal now. Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake --- hmp-commands.hx |2 +- monitor.c | 27 +++ 2 files changed, 28 insertions(+), 1 deletions(-) dif

[Qemu-devel] [PATCH V10 07/15] monitor: split off monitor_data_init()

2013-08-27 Thread Wenchao Xia
In qmp_human_monitor_command(), the monitor need to initialized for basic functionalities, and later more init code will be added, so split off this function. Note that it is different with QMP mode monitor which accept json string from monitor's input, qmp_human_monitor_command() retrieve the huma

[Qemu-devel] [PATCH V10 11/15] monitor: support sub command in help

2013-08-27 Thread Wenchao Xia
The old code in help_cmd() uses global 'info_cmds' and treats it as a special case. Actually 'info_cmds' is a sub command group of 'mon_cmds', in order to avoid direct use of it, help_cmd() needs to change its work mechanism to support sub command and not treat it as a special case any more. To su

[Qemu-devel] [PATCH V10 15/15] monitor: improve auto complete of "help" for single command in sub group

2013-08-27 Thread Wenchao Xia
Now special case "help *" in auto completion can work with sub commands, such as "help info u*". Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake --- monitor.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/monitor.c b/monitor.c index 81f41e6..8d07f9c 100644 ---

[Qemu-devel] [PATCH V10 10/15] monitor: refine parse_cmdline()

2013-08-27 Thread Wenchao Xia
Since this function will be used by help_cmd() later, so improve it to make it more generic and easier to use. free_cmdline_args() is added too as paired function to free the result. One change of this function is that, when the valid args in input exceed the limit of MAX_ARGS, it fails now, inste

Re: [Qemu-devel] pvpanic plans?

2013-08-27 Thread Ronen Hod
On 08/27/2013 11:06 AM, Richard W.M. Jones wrote: On Thu, Aug 22, 2013 at 03:09:06PM -0500, Anthony Liguori wrote: Paolo Bonzini writes: Also, a virtio watchdog device makes little sense, IMHO. PV makes sense if emulation has insufficient performance, excessive CPU usage, or excessive complex

[Qemu-devel] [PATCH] configure: Don't write .pyc files by default (python -B)

2013-08-27 Thread Stefan Weil
When a Python script is run, Python normally writes bytecode into a .pyc file. QEMU's build process uses several Python scripts which are called from configure or make. The generated .pyc files take disk space without being of much use, because those scripts are short, not time critical and only c

Re: [Qemu-devel] [libvirt] pvpanic plans?

2013-08-27 Thread Daniel P. Berrange
On Thu, Aug 22, 2013 at 09:16:57PM +0200, Paolo Bonzini wrote: > Il 22/08/2013 19:53, Laszlo Ersek ha scritto: > >> > We should just introduce a simple watchdog device based on virtio and > >> > call it a day. Then it's cross platform, solves the guest enumeration > >> > problem, and libvirt can d

Re: [Qemu-devel] [libvirt] pvpanic plans?

2013-08-27 Thread Anthony Liguori
On Tue, Aug 27, 2013 at 8:13 AM, Daniel P. Berrange wrote: > On Thu, Aug 22, 2013 at 09:16:57PM +0200, Paolo Bonzini wrote: >> Il 22/08/2013 19:53, Laszlo Ersek ha scritto: >> >> > We should just introduce a simple watchdog device based on virtio and >> >> > call it a day. Then it's cross platfor

Re: [Qemu-devel] KVM guest cpu L3 cache and cpufreq

2013-08-27 Thread Benoît Canet
Hello Eduardo, I read a bit about caches on wikipedia. If I understand correctly changing the CPUID L3 cache infos in QEMU will change the value displayed in the guest /proc/cpuinfo but will not change the size of the l3 cache used by the hardware. So I am chasing a cosmetic bug. If it right ?

Re: [Qemu-devel] KVM guest cpu L3 cache and cpufreq

2013-08-27 Thread Gleb Natapov
On Tue, Aug 27, 2013 at 03:18:16PM +0200, Benoît Canet wrote: > > Hello Eduardo, > > I read a bit about caches on wikipedia. > > If I understand correctly changing the CPUID L3 cache infos in QEMU will > change > the value displayed in the guest /proc/cpuinfo but will not change the size of > t

Re: [Qemu-devel] [PATCH V9 00/15] monitor: support sub command group in auto completion and help

2013-08-27 Thread Luiz Capitulino
On Tue, 27 Aug 2013 20:39:37 +0800 Wenchao Xia wrote: > 于 2013-8-27 9:43, Wenchao Xia 写道: > > 于 2013-8-26 23:55, Luiz Capitulino 写道: > >> On Fri, 23 Aug 2013 16:17:52 +0800 > >> Wenchao Xia wrote: > >> > >>> This series make auto completion and help functions works normal for sub > >>> command,

Re: [Qemu-devel] [PATCH V9 00/15] monitor: support sub command group in auto completion and help

2013-08-27 Thread Wenchao Xia
于 2013-8-27 9:43, Wenchao Xia 写道: 于 2013-8-26 23:55, Luiz Capitulino 写道: On Fri, 23 Aug 2013 16:17:52 +0800 Wenchao Xia wrote: This series make auto completion and help functions works normal for sub command, by using reentrant functions. In order to do that, global variables are not directly

Re: [Qemu-devel] pvpanic plans?

2013-08-27 Thread Richard W.M. Jones
On Tue, Aug 27, 2013 at 04:08:12PM +0300, Ronen Hod wrote: > So the right solution is to send a heart-beat to a management > application (using qemu-ga or whatever), and let it decide how to > handle it. Agreed. The qemu watchdog lets you do this already. You can (using the qemu monitor, or libv

Re: [Qemu-devel] KVM guest cpu L3 cache and cpufreq

2013-08-27 Thread Gleb Natapov
On Tue, Aug 27, 2013 at 04:17:56PM +0300, Gleb Natapov wrote: > On Tue, Aug 27, 2013 at 03:18:16PM +0200, Benoît Canet wrote: > > > > Hello Eduardo, > > > > I read a bit about caches on wikipedia. > > > > If I understand correctly changing the CPUID L3 cache infos in QEMU will > > change > > th

  1   2   3   >