Re: [Qemu-devel] [Crucial bug] Qemu-2.0.0 do not support virtio-net hot plug/unplug exceed two times

2014-05-12 Thread Andreas Färber
Am 06.05.2014 17:02, schrieb Andreas Färber: > Am 06.05.2014 16:08, schrieb Gonglei (Arei): >>> -Original Message- >>> From: Andreas Färber [mailto:afaer...@suse.de] >>> Sent: Tuesday, May 06, 2014 9:58 PM >>> To: Gonglei (Arei) >>> Cc: Markus Armbruster; Hani Benhabiles; Peter Maydell; Pao

[Qemu-devel] [PATCH v3] cirrus_vga: adding sanity check for vram size

2014-05-12 Thread arei.gonglei
From: Gonglei when configure a invalid vram size for cirrus card, such as less 2 MB, which will crash qemu. Follow the real hardware, the cirrus card has 4 MB video memory. Also for backward compatibility, accept 8 MB and 16 MB vram size. Signed-off-by: Gonglei --- v3: - fix logic bug pointed

Re: [Qemu-devel] [PATCH v2 1/8] kvm: reset state from the CPU's reset method

2014-05-12 Thread Andreas Färber
Am 02.05.2014 16:33, schrieb Paolo Bonzini: > Now that we have a CPU object with a reset method, it is better to > keep the KVM reset close to the CPU reset. Using qemu_register_reset > as we do now keeps them far apart. > > With this patch, PPC no longer calls the kvm_arch_ function, so > it can

Re: [Qemu-devel] [PATCH RFC V2] virtio-net: announce self by guest

2014-05-12 Thread Michael S. Tsirkin
On Fri, Apr 11, 2014 at 10:54:47AM +0800, Jason Wang wrote: > It's hard to track all mac addresses and their configurations (e.g > vlan or ipv6) in qemu. Without those informations, it's impossible to > build proper garp packet after migration. The only possible solution > to this is let guest (who

Re: [Qemu-devel] [PATCH v2 4/8] target-i386: preserve FPU and MSR state on INIT

2014-05-12 Thread Andreas Färber
Am 02.05.2014 16:33, schrieb Paolo Bonzini: > Most MSRs, plus the FPU, MMX, MXCSR, XMM and YMM registers should not > be zeroed on INIT (Table 9-1 in the Intel SDM). Copy them out of > CPUX86State and back in, instead of special casing env->pat. > > The relevant fields are already consecutive exc

Re: [Qemu-devel] My OS hangup in KVM for some reasons, how can I debug?

2014-05-12 Thread Thomas Huth
On Sun, 11 May 2014 21:09:44 +0800 Jun Koi wrote: > On Fri, May 9, 2014 at 11:24 AM, Jun Koi wrote: > > > > > > > > > On Thu, May 8, 2014 at 4:28 PM, Jun Koi wrote: > > > >> Hi, > >> > >> I have an weird OS that I am trying to boot in KVM. however, it just hang > >> in the middle, without a go

Re: [Qemu-devel] [PATCH] kvm: Fix enable_cap helpers on older gcc

2014-05-12 Thread Thomas Huth
On Sun, 11 May 2014 18:11:04 +0200 Alexander Graf wrote: > Commit 40f1ee27aa1 introduced handy helpers for enable_cap calls on > vcpu and vm level. Unfortunately some older gcc versions (4.7.1, 4.6) > seem to choke on signedness detection in inline created variables: > > target-ppc/kvm.c: In fun

Re: [Qemu-devel] [PATCH v3 4/4] sclp-s390: Add memory hotplug SCLPs

2014-05-12 Thread Christian Borntraeger
On 07/05/14 20:05, Matthew Rosato wrote: > Add memory information to read SCP info and add handlers for > Read Storage Element Information, Attach Storage Element, > Assign Storage and Unassign Storage. > > Signed-off-by: Matthew Rosato > --- > hw/s390x/sclp.c| 245 > ++

Re: [Qemu-devel] [PATCH v2 5/8] apic: do not accept SIPI on the bootstrap processor

2014-05-12 Thread Andreas Färber
Am 02.05.2014 16:33, schrieb Paolo Bonzini: > SIPI interrupts are ignored on the bootstrap. Never accept one. > > Cc: Andreas Färber > Cc: Michael S. Tsirkin > Signed-off-by: Paolo Bonzini > --- > hw/intc/apic_common.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/

Re: [Qemu-devel] [PATCH v3 3/4] virtio-ccw: Include standby memory when calculating storage increment

2014-05-12 Thread Christian Borntraeger
On 07/05/14 20:05, Matthew Rosato wrote: > When determining the memory increment size, use the maxmem size if > it was specified. > > Signed-off-by: Matthew Rosato > --- > hw/s390x/s390-virtio-ccw.c | 44 > > target-s390x/cpu.h |3 +++ >

Re: [Qemu-devel] [PATCH v3 0/4] s390: Support for Hotplug of Standby Memory

2014-05-12 Thread Christian Borntraeger
On 07/05/14 20:05, Matthew Rosato wrote: > This patchset adds support in s390 for a pool of standby memory, > which can be set online/offline by the guest (ie, via chmem). > New options, maxmem and slots, are added to the QEMU command line > memory parameter to specify the total amount of memory av

Re: [Qemu-devel] [PATCH v2 6/8] cpu: make CPU_INTERRUPT_RESET available on all targets

2014-05-12 Thread Andreas Färber
Am 02.05.2014 16:33, schrieb Paolo Bonzini: > On the x86, some devices need access to the CPU reset pin (INIT#). > Provide a generic service to do this, using one of the internal > cpu_interrupt targets. Generalize the PPC-specific code for > CPU_INTERRUPT_RESET to other targets. > > Since PPC do

Re: [Qemu-devel] [PATCH v2 7/8] pc: port 92 reset requires a low->high transition

2014-05-12 Thread Andreas Färber
Am 02.05.2014 16:33, schrieb Paolo Bonzini: > The PIIX datasheet says that "before another INIT pulse can be > generated via [port 92h], [bit 0] must be written back to a > zero. > > This bug is masked right now because a full reset will clear the > value of port 92h. But once we implement soft r

Re: [Qemu-devel] [PATCH v2 8/8] x86: correctly implement soft reset

2014-05-12 Thread Andreas Färber
Am 02.05.2014 16:33, schrieb Paolo Bonzini: > Do not do a hard reset for port 92h, keyboard controller, or cf9h soft reset. > These only reset the CPU. > > Reviewed-by: Anthony Liguori > Signed-off-by: Paolo Bonzini Apart from the question of whether cpu_soft_reset() is the right API for this:

[Qemu-devel] [PATCH] rewamp/simplify option parsing

2014-05-12 Thread Michael Tokarev
Main change is to allow get_opt_name() to accept a set of delimiters (string) instead of a single delimiter (char). This way it is easier to search for the next (sub)option in an option string, so other code using get_opt_name() can be simplified. Signed-off-by: Michael Tokarev --- This is an ol

Re: [Qemu-devel] [PATCH v2 3/8] target-i386: fix set of registers zeroed on reset

2014-05-12 Thread Andreas Färber
Am 02.05.2014 16:33, schrieb Paolo Bonzini: > BND0-3, BNDCFGU, BNDCFGS, BNDSTATUS were not zeroed on reset, but they > should be (Intel Instruction Set Extensions Programming Reference > 319433-015, pages 9-4 and 9-6). Same for YMM. > > XCR0 should be reset to 1. > > TSC and TSC_RESET were zeroe

Re: [Qemu-devel] [PATCH v2 2/8] kvm: forward INIT signals coming from the chipset

2014-05-12 Thread Andreas Färber
Am 02.05.2014 16:33, schrieb Paolo Bonzini: > Reviewed-by: Gleb Natapov > Signed-off-by: Paolo Bonzini > --- > target-i386/helper.c | 4 > target-i386/kvm.c | 36 +--- > target-i386/kvm_i386.h | 1 + > 3 files changed, 30 insertions(+), 11 deletions(

Re: [Qemu-devel] [PATCH v5 1/4] s390x: split flic into kvm and non-kvm parts

2014-05-12 Thread Christian Borntraeger
On 08/05/14 15:03, Cornelia Huck wrote: > Introduce a common parent class for both cases, where kvm and non-kvm > can hook up callbacks. This will be used by follow-on patches for > adapter registration and mapping. > > We now always have a flic, regardless of whether we use kvm; the > non-kvm imp

[Qemu-devel] [Bug 1318474] [NEW] QEMU update causes Windows reactivation

2014-05-12 Thread Dan C
Public bug reported: After updating QEMU the guest OS's detect new hardware. As a result any Windows OS sees it as a significant change in hardware and require a reactivation. Host OS: Ubuntu 14.04 64-bit Guest OS's: Windows Server 2003 R2 Enterprise Windows Server 2008 R2 Enterprise Windows Ser

Re: [Qemu-devel] [Crucial bug] Qemu-2.0.0 do not support virtio-net hot plug/unplug exceed two times

2014-05-12 Thread Gonglei (Arei)
Hi, > -Original Message- > From: Andreas Färber [mailto:afaer...@suse.de] > Sent: Monday, May 12, 2014 3:09 PM > To: Gonglei (Arei) > Cc: qemu-devel@nongnu.org > Subject: Re: [Qemu-devel] [Crucial bug] Qemu-2.0.0 do not support virtio-net > hot plug/unplug exceed two times > > Am 06.05.20

Re: [Qemu-devel] [PATCH v5 1/4] s390x: split flic into kvm and non-kvm parts

2014-05-12 Thread Cornelia Huck
On Mon, 12 May 2014 10:01:31 +0200 Christian Borntraeger wrote: > On 08/05/14 15:03, Cornelia Huck wrote: > > Introduce a common parent class for both cases, where kvm and non-kvm > > can hook up callbacks. This will be used by follow-on patches for > > adapter registration and mapping. > > > >

Re: [Qemu-devel] [PATCH v5 1/4] s390x: split flic into kvm and non-kvm parts

2014-05-12 Thread Christian Borntraeger
On 12/05/14 10:09, Cornelia Huck wrote: > On Mon, 12 May 2014 10:01:31 +0200 > Christian Borntraeger wrote: > >> On 08/05/14 15:03, Cornelia Huck wrote: >>> Introduce a common parent class for both cases, where kvm and non-kvm >>> can hook up callbacks. This will be used by follow-on patches for

[Qemu-devel] [PATCH memory v1 1/1] memory: Simplify mr_add_subregion() if-else

2014-05-12 Thread Peter Crosthwaite
This if else is not needed. The previous call to memory_region_add (whether _overlap or not) will always set priority and may_overlap to desired values. And its not possible to get here without having called memory_region_add_subregion due to the null guard on parent. So we can just directly call m

Re: [Qemu-devel] [PATCH] kvm: Fix enable_cap helpers on older gcc

2014-05-12 Thread Cornelia Huck
On Mon, 12 May 2014 09:33:39 +0200 Thomas Huth wrote: > On Sun, 11 May 2014 18:11:04 +0200 > Alexander Graf wrote: > > > Commit 40f1ee27aa1 introduced handy helpers for enable_cap calls on > > vcpu and vm level. Unfortunately some older gcc versions (4.7.1, 4.6) > > seem to choke on signedness

Re: [Qemu-devel] [PATCH] migration: cache memory region ram ptr

2014-05-12 Thread Peter Lieven
Am 12.05.2014 08:09, schrieb Paolo Bonzini: > Il 10/05/2014 18:32, Peter Lieven ha scritto: >> What about XEN? >> > > You're right, Xen wouldn't work. Your original patch would not break it just > because Xen doesn't use migration (but the code would be broken). > > You would have to cache qemu_g

Re: [Qemu-devel] [PATCH v5 3/4] s390x/virtio-ccw: reference-counted indicators

2014-05-12 Thread Christian Borntraeger
On 08/05/14 15:03, Cornelia Huck wrote: > Make code using the same indicators point to a single allocated structure > that is freed when the last user goes away. > > This will be used by the irqfd code to unmap addresses after the last user > is gone. > > Reviewed-by: Thomas Huth > Signed-off-by

Re: [Qemu-devel] [PATCH v5 2/4] s390x: Add I/O adapter registration.

2014-05-12 Thread Christian Borntraeger
On 08/05/14 15:03, Cornelia Huck wrote: > Register an I/O adapter interrupt source for when virtio-ccw devices start > using adapter interrupts. > > Reviewed-by: Thomas Huth > Signed-off-by: Cornelia Huck Reviewed-by: Christian Borntraeger > --- > hw/intc/s390_flic.c | 16 +++

[Qemu-devel] [PATCH] migration: show average throughput when migration finishes

2014-05-12 Thread Peter Lieven
currently the value of the throughput field contains whatever was the last calculated throughput shortly before the migration finished. This patch updates the post migration contents of the field to the average throughput. Signed-off-by: Peter Lieven diff --git a/migration.c b/migration.c index

[Qemu-devel] [PATCH] spapr_iommu: Replace @instance_id with LIOBN for migration

2014-05-12 Thread Alexey Kardashevskiy
SPAPR IOMMU is a bus-less device and therefore its only ID in migration stream is an instance id which is not reliable ID as it depends on the command line parameters order. Since libvirt may change the order, we need something better than that. This removes VMSD descriptor from the class definiti

Re: [Qemu-devel] [Crucial bug] Qemu-2.0.0 do not support virtio-net hot plug/unplug exceed two times

2014-05-12 Thread Andreas Färber
Hello, Am 12.05.2014 10:06, schrieb Gonglei (Arei): >> -Original Message- >> From: Andreas Färber [mailto:afaer...@suse.de] >> Sent: Monday, May 12, 2014 3:09 PM >> To: Gonglei (Arei) >> Cc: qemu-devel@nongnu.org >> Subject: Re: [Qemu-devel] [Crucial bug] Qemu-2.0.0 do not support virtio-n

Re: [Qemu-devel] [PATCH v5 4/4] s390x/virtio-ccw: Wire up irq routing and irqfds.

2014-05-12 Thread Christian Borntraeger
On 08/05/14 15:03, Cornelia Huck wrote: > Make use of the new s390 adapter irq routing support to enable real > in-kernel irqfds for virtio-ccw with adapter interrupts. > > Note that s390 doesn't provide the common KVM_CAP_IRQCHIP capability, but > rather needs KVM_CAP_S390_IRQCHIP to be enabled.

Re: [Qemu-devel] [PATCH 1/2] CAN bus simple SJA1000 PCI card emulation for QEMU

2014-05-12 Thread Peter Crosthwaite
Hi Pavel, On Sat, May 10, 2014 at 4:14 AM, Pavel Pisa wrote: > The work is based on Jin Yang GSoC 2013 work funded > by Google and mentored in frame of RTEMS project GSoC > slot donated to QEMU. > > Update from QEMU-1.4 version and architecture cleanup > by Pavel Pisa (Czech Technical University

Re: [Qemu-devel] [Xen-devel] [PATCH v4] Hvmloader: Modify ACPI to only supply _EJ0 methods for PCIslots that support hotplug by runtime patching

2014-05-12 Thread Ian Campbell
On Fri, 2014-05-09 at 13:32 -0400, Ross Philipson wrote: > On 05/09/2014 12:34 PM, Paul Durrant wrote: > >> -Original Message- > >> From: Ian Campbell > >> Sent: 09 May 2014 17:12 > >> To: Konrad Rzeszutek Wilk > >> Cc: Ross Philipson; ke...@koconnor.net; Huangweidong (C); Hanweidong > >> (

Re: [Qemu-devel] [PATCH v3] cirrus_vga: adding sanity check for vram size

2014-05-12 Thread Andreas Färber
Am 12.05.2014 09:10, schrieb arei.gong...@huawei.com: > From: Gonglei > > when configure a invalid vram size for cirrus card, such as less > 2 MB, which will crash qemu. Follow the real hardware, the cirrus > card has 4 MB video memory. Also for backward compatibility, accept > 8 MB and 16 MB vra

[Qemu-devel] [PATCH] virtio: allow mapping up to max queue size

2014-05-12 Thread Michael S. Tsirkin
It's a loop from i < num_sg and the array is VIRTQUEUE_MAX_SIZE - so it's OK if the value read is VIRTQUEUE_MAX_SIZE. Not a big problem in practice as people don't use such big queues, but it's inelegant. Reported-by: "Dr. David Alan Gilbert" Cc: qemu-sta...@nongnu.org Signed-off-by: Michael S.

Re: [Qemu-devel] [PATCH v2 8/8] x86: correctly implement soft reset

2014-05-12 Thread Paolo Bonzini
Il 12/05/2014 09:53, Andreas Färber ha scritto: > Do not do a hard reset for port 92h, keyboard controller, or cf9h soft reset. > These only reset the CPU. > > Reviewed-by: Anthony Liguori > Signed-off-by: Paolo Bonzini Apart from the question of whether cpu_soft_reset() is the right API for t

Re: [Qemu-devel] QEMU build broken

2014-05-12 Thread Markus Armbruster
Brad Smith writes: > On 10/05/14 3:07 AM, Paolo Bonzini wrote: >> Il 10/05/2014 08:45, Brad Smith ha scritto: Having your feature in-tree is a privilege, not a right. You earn it by helping to maintain it. "it's not really maintained right now" means it has not been earning

Re: [Qemu-devel] [Xen-devel] [PATCH v4] Hvmloader: Modify ACPI to only supply _EJ0 methods for PCIslots that support hotplug by runtime patching

2014-05-12 Thread Jan Beulich
>>> On 12.05.14 at 11:05, wrote: > Given that there are 32 PCI slots we would be talking about a total of > 4k of space in hvmloader to provide a precompiled SSDT for each slot, > which can be inserted at runtime depending on each slots configuration. 32 slots only? Are we unable to have anything

[Qemu-devel] KVM call agenda for 2014-05-13

2014-05-12 Thread Juan Quintela
Hi Please, send any topic that you are interested in covering. - QOMifying both Memory regions and GPIOs and attaching them via QOM links (Peter Crosthwaite) Thanks, Juan. Call details: 15:00 CEST 13:00 UTC 09:00 EDT Every two weeks If you need phone number details, contact me privately.

Re: [Qemu-devel] [PATCH 1/2] CAN bus simple SJA1000 PCI card emulation for QEMU

2014-05-12 Thread Andreas Färber
Am 12.05.2014 11:01, schrieb Peter Crosthwaite: > On Sat, May 10, 2014 at 4:14 AM, Pavel Pisa wrote: >> The work is based on Jin Yang GSoC 2013 work funded >> by Google and mentored in frame of RTEMS project GSoC >> slot donated to QEMU. Should/can that be recorded in form of his Signed-off-by be

Re: [Qemu-devel] [Xen-devel] [PATCH v4] Hvmloader: Modify ACPI to only supply _EJ0 methods for PCIslots that support hotplug by runtime patching

2014-05-12 Thread Ian Campbell
On Mon, 2014-05-12 at 10:14 +0100, Jan Beulich wrote: > >>> On 12.05.14 at 11:05, wrote: > > Given that there are 32 PCI slots we would be talking about a total of > > 4k of space in hvmloader to provide a precompiled SSDT for each slot, > > which can be inserted at runtime depending on each slots

Re: [Qemu-devel] [PATCH] libcacard: remove useless initializers

2014-05-12 Thread Markus Armbruster
Michael Tokarev writes: > 11.05.2014 11:58, Alon Levy wrote: >> On 05/08/2014 08:19 PM, Michael Tokarev wrote: >>> libcacard has many functions which initializes local variables >>> at declaration time, which are always assigned some values later >>> (often right after declaration). Clean up the

Re: [Qemu-devel] [RFC] vhost: Can we change synchronize_rcu to call_rcu in vhost_set_memory() in vhost kernel module?

2014-05-12 Thread Gonglei (Arei)
Hi, > -Original Message- > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Friday, May 09, 2014 5:54 PM > To: Gonglei (Arei); qemu-devel@nongnu.org > Cc: m...@redhat.com; Herongguang (Stephen); Huangweidong (C) > Subject: Re: [RFC] vhost: Can we change synchronize_rcu to call_rcu

Re: [Qemu-devel] [PATCH] spice: return unspecified address according to protocol

2014-05-12 Thread Gerd Hoffmann
Hi, > info->has_host = true; > -info->host = g_strdup(addr ? addr : "*"); > +info->host = g_strdup(addr ? addr : (qemu_opt_get_bool(opts, > + "ipv6", 0) > + ? "::" : "0.0.0.0")); "ipv6

Re: [Qemu-devel] [PATCH v2 6/8] cpu: make CPU_INTERRUPT_RESET available on all targets

2014-05-12 Thread Peter Maydell
On 12 May 2014 08:47, Andreas Färber wrote: > Am 02.05.2014 16:33, schrieb Paolo Bonzini: >> On the x86, some devices need access to the CPU reset pin (INIT#). >> Provide a generic service to do this, using one of the internal >> cpu_interrupt targets. Generalize the PPC-specific code for >> CPU_

Re: [Qemu-devel] KVM call agenda for 2014-05-13

2014-05-12 Thread Peter Maydell
On 12 May 2014 10:10, Juan Quintela wrote: > Please, send any topic that you are interested in covering. > > - QOMifying both Memory regions and GPIOs and attaching them via QOM > links (Peter Crosthwaite) Is there some further useful material on-list on this subject, or are we just going to ha

[Qemu-devel] [PATCH 2/2 v2] ppc-e500: implement PCI INTx routing

2014-05-12 Thread Bharat Bhushan
This patch adds pci pin to irq_num routing callback. This callback is called from pci_device_route_intx_to_irq to find which pci device maps to which irq. This fix is required for pci-device passthrough using vfio. Also without this patch we gets below prints " PCI: Bug - unimplemented PCI INTx

[Qemu-devel] [PATCH 0/2 v2] ppc-e500: Adding pci-pin to irq callback and some cleanup

2014-05-12 Thread Bharat Bhushan
First patch is doing some cleanup and second patch adds PCI-PIN (INT[A-D]) to its interrupt number mapping callback. This is required to support pci device passthrough using VFIO. Bharat Bhushan (2): ppc-e500: some pci related cleanup ppc-e500: implement PCI INTx routing hw/pci-host/ppce500.

[Qemu-devel] [PATCH v2] kvm: Fix enable_cap helpers on older gcc

2014-05-12 Thread Alexander Graf
Commit 40f1ee27aa1 introduced handy helpers for enable_cap calls on vcpu and vm level. Unfortunately some older gcc versions (4.7.1, 4.6) seem to choke on signedness detection in inline created variables: target-ppc/kvm.c: In function 'kvmppc_booke_watchdog_enable': target-ppc/kvm.c:1302:21: error

Re: [Qemu-devel] [PATCH v2] kvm: Fix enable_cap helpers on older gcc

2014-05-12 Thread Thomas Huth
On Mon, 12 May 2014 11:51:37 +0200 Alexander Graf wrote: > Commit 40f1ee27aa1 introduced handy helpers for enable_cap calls on > vcpu and vm level. Unfortunately some older gcc versions (4.7.1, 4.6) > seem to choke on signedness detection in inline created variables: > > target-ppc/kvm.c: In fun

Re: [Qemu-devel] [RFC] vhost: Can we change synchronize_rcu to call_rcu in vhost_set_memory() in vhost kernel module?

2014-05-12 Thread Paolo Bonzini
Il 12/05/2014 11:28, Gonglei (Arei) ha scritto: From previous discussion: https://lists.gnu.org/archive/html/qemu-devel/2014-03/msg04925.html we know that you are going to replace RCU in KVM_SET_GSI_ROUTING with SRCU. Though SRCU is quite better than originally RCU, in our test case this cannot

[Qemu-devel] [PATCH 1/2 v2] ppc-e500: some pci related cleanup

2014-05-12 Thread Bharat Bhushan
- Use PCI_NUM_PINS rather than hardcoding - use "pin" wherever possible Signed-off-by: Bharat Bhushan --- v1->v2: - No Change hw/pci-host/ppce500.c | 14 +++--- hw/ppc/e500.c | 12 +++- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/hw/pci-host/p

Re: [Qemu-devel] [RFC PATCH] migration: reintroduce skipped zero pages

2014-05-12 Thread Juan Quintela
Peter Lieven wrote: > commit f1c72795a introduced skipping of all zero pages during > bulk phase of ram migration. In theory this should have worked, > however the underlying assumption that the memory of target VM > is totally empty (zeroed) was wrong. Altough qemu accepts an incoming > migration

Re: [Qemu-devel] [PATCH] spice: return unspecified address according to protocol

2014-05-12 Thread Amos Kong
On Mon, May 12, 2014 at 11:34:18AM +0200, Gerd Hoffmann wrote: > Hi, > > > info->has_host = true; > > -info->host = g_strdup(addr ? addr : "*"); > > +info->host = g_strdup(addr ? addr : (qemu_opt_get_bool(opts, > > + "ipv6",

Re: [Qemu-devel] [RFC] vhost: Can we change synchronize_rcu to call_rcu in vhost_set_memory() in vhost kernel module?

2014-05-12 Thread Michael S. Tsirkin
On Mon, May 12, 2014 at 11:57:32AM +0200, Paolo Bonzini wrote: > Il 12/05/2014 11:28, Gonglei (Arei) ha scritto: > >From previous discussion: > >https://lists.gnu.org/archive/html/qemu-devel/2014-03/msg04925.html > >we know that you are going to replace RCU in KVM_SET_GSI_ROUTING with SRCU. > >Tho

Re: [Qemu-devel] [RFC PATCH] migration: reintroduce skipped zero pages

2014-05-12 Thread Peter Lieven
Am 12.05.2014 12:02, schrieb Juan Quintela: > Peter Lieven wrote: >> commit f1c72795a introduced skipping of all zero pages during >> bulk phase of ram migration. In theory this should have worked, >> however the underlying assumption that the memory of target VM >> is totally empty (zeroed) was w

Re: [Qemu-devel] [RFC] vhost: Can we change synchronize_rcu to call_rcu in vhost_set_memory() in vhost kernel module?

2014-05-12 Thread Paolo Bonzini
Il 12/05/2014 12:08, Michael S. Tsirkin ha scritto: On Mon, May 12, 2014 at 11:57:32AM +0200, Paolo Bonzini wrote: Perhaps we can check for cases where only the address is changing, and poke at an existing struct kvm_kernel_irq_routing_entry without doing any RCU synchronization? I suspect int

Re: [Qemu-devel] [PATCH v2] kvm: Fix enable_cap helpers on older gcc

2014-05-12 Thread Cornelia Huck
On Mon, 12 May 2014 11:51:37 +0200 Alexander Graf wrote: > Commit 40f1ee27aa1 introduced handy helpers for enable_cap calls on > vcpu and vm level. Unfortunately some older gcc versions (4.7.1, 4.6) > seem to choke on signedness detection in inline created variables: > > target-ppc/kvm.c: In fun

Re: [Qemu-devel] [PATCH v2] kvm: Fix enable_cap helpers on older gcc

2014-05-12 Thread Alexander Graf
On 12.05.14 12:15, Cornelia Huck wrote: On Mon, 12 May 2014 11:51:37 +0200 Alexander Graf wrote: Commit 40f1ee27aa1 introduced handy helpers for enable_cap calls on vcpu and vm level. Unfortunately some older gcc versions (4.7.1, 4.6) seem to choke on signedness detection in inline created va

Re: [Qemu-devel] [PATCH v3] cirrus_vga: adding sanity check for vram size

2014-05-12 Thread Gerd Hoffmann
On Mo, 2014-05-12 at 15:10 +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > when configure a invalid vram size for cirrus card, such as less > 2 MB, which will crash qemu. Follow the real hardware, the cirrus > card has 4 MB video memory. Also for backward compatibility, accept > 8 MB an

Re: [Qemu-devel] [PATCH] migration: catch unknown flags in ram_load

2014-05-12 Thread Juan Quintela
Peter Lieven wrote: > if a saved vm has unknown flags in the memory data qemu > currently simply ignores this flag and continues which > yields in an unpredictable result. > > this patch catches all unknown flags and > aborts the loading of the vm. > > CC: qemu-sta...@nongnu.org > Signed-off-by: P

Re: [Qemu-devel] [RFC] vhost: Can we change synchronize_rcu to call_rcu in vhost_set_memory() in vhost kernel module?

2014-05-12 Thread Michael S. Tsirkin
On Mon, May 12, 2014 at 12:14:25PM +0200, Paolo Bonzini wrote: > Il 12/05/2014 12:08, Michael S. Tsirkin ha scritto: > >On Mon, May 12, 2014 at 11:57:32AM +0200, Paolo Bonzini wrote: > >>Perhaps we can check for cases where only the address is changing, > >>and poke at an existing struct kvm_kernel

Re: [Qemu-devel] [RFC PATCH] migration: reintroduce skipped zero pages

2014-05-12 Thread Paolo Bonzini
Il 09/05/2014 01:45, Peter Lieven ha scritto: commit f1c72795a introduced skipping of all zero pages during bulk phase of ram migration. In theory this should have worked, however the underlying assumption that the memory of target VM is totally empty (zeroed) was wrong. Altough qemu accepts an i

Re: [Qemu-devel] [PATCH] migration: catch unknown flags in ram_load

2014-05-12 Thread Peter Lieven
Am 12.05.2014 12:19, schrieb Juan Quintela: > Peter Lieven wrote: >> if a saved vm has unknown flags in the memory data qemu >> currently simply ignores this flag and continues which >> yields in an unpredictable result. >> >> this patch catches all unknown flags and >> aborts the loading of the v

Re: [Qemu-devel] [RFC] vhost: Can we change synchronize_rcu to call_rcu in vhost_set_memory() in vhost kernel module?

2014-05-12 Thread Paolo Bonzini
Il 12/05/2014 12:18, Michael S. Tsirkin ha scritto: On Mon, May 12, 2014 at 12:14:25PM +0200, Paolo Bonzini wrote: Il 12/05/2014 12:08, Michael S. Tsirkin ha scritto: On Mon, May 12, 2014 at 11:57:32AM +0200, Paolo Bonzini wrote: Perhaps we can check for cases where only the address is changin

Re: [Qemu-devel] [PATCH] arch_init: Simplify code for load_xbzrle()

2014-05-12 Thread Juan Quintela
Chen Gang wrote: > For xbzrle_decode_buffer(), when decoding contents will exceed writing > buffer, it will return -1, so need not check the return value whether > large than writing buffer. > > And when failure occurs within load_xbzrle(), it always return -1 > without any resources which need re

Re: [Qemu-devel] KVM call agenda for 2014-05-13

2014-05-12 Thread Peter Crosthwaite
On Mon, May 12, 2014 at 7:44 PM, Peter Maydell wrote: > On 12 May 2014 10:10, Juan Quintela wrote: >> Please, send any topic that you are interested in covering. >> >> - QOMifying both Memory regions and GPIOs and attaching them via QOM >> links (Peter Crosthwaite) > > Is there some further use

Re: [Qemu-devel] [RFC PATCH] migration: reintroduce skipped zero pages

2014-05-12 Thread Peter Lieven
Am 12.05.2014 12:23, schrieb Paolo Bonzini: > Il 09/05/2014 01:45, Peter Lieven ha scritto: >> commit f1c72795a introduced skipping of all zero pages during >> bulk phase of ram migration. In theory this should have worked, >> however the underlying assumption that the memory of target VM >> is tot

Re: [Qemu-devel] [PATCH v2 6/8] cpu: make CPU_INTERRUPT_RESET available on all targets

2014-05-12 Thread Paolo Bonzini
Il 12/05/2014 11:41, Peter Maydell ha scritto: On 12 May 2014 08:47, Andreas Färber wrote: Am 02.05.2014 16:33, schrieb Paolo Bonzini: On the x86, some devices need access to the CPU reset pin (INIT#). Provide a generic service to do this, using one of the internal cpu_interrupt targets. Gene

Re: [Qemu-devel] [RFC] vhost: Can we change synchronize_rcu to call_rcu in vhost_set_memory() in vhost kernel module?

2014-05-12 Thread Michael S. Tsirkin
On Mon, May 12, 2014 at 11:57:32AM +0200, Paolo Bonzini wrote: > Il 12/05/2014 11:28, Gonglei (Arei) ha scritto: > >From previous discussion: > >https://lists.gnu.org/archive/html/qemu-devel/2014-03/msg04925.html > >we know that you are going to replace RCU in KVM_SET_GSI_ROUTING with SRCU. > >Tho

Re: [Qemu-devel] [PATCH] migration: catch unknown flags in ram_load

2014-05-12 Thread Peter Lieven
Am 12.05.2014 12:25, schrieb Peter Lieven: > Am 12.05.2014 12:19, schrieb Juan Quintela: >> Peter Lieven wrote: >>> if a saved vm has unknown flags in the memory data qemu >>> currently simply ignores this flag and continues which >>> yields in an unpredictable result. >>> >>> this patch catches a

Re: [Qemu-devel] [PATCH] Split ram_save_block

2014-05-12 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > ram_save_block is getting a bit too complicated, and does two separate > things: >1) Finds a page to send >2) Sends the page (dealing with compression etc) > > Split into 'ram_save_page' to send the page and deal w

Re: [Qemu-devel] [PATCH 002/124] savevm: Remove all the unneded version_minimum_id_old (usb)

2014-05-12 Thread Juan Quintela
Juan Quintela wrote: kraxel, could you ack this? And should this got it through my tree or yours? Thanks, Juan. > After previous Peter patch, they are redundant. This way we don't asign them > except when needed. Once there, there were lots of case where the ".fields" > indentation was wrong

Re: [Qemu-devel] [RFC] vhost: Can we change synchronize_rcu to call_rcu in vhost_set_memory() in vhost kernel module?

2014-05-12 Thread Michael S. Tsirkin
On Mon, May 12, 2014 at 12:25:35PM +0200, Paolo Bonzini wrote: > Il 12/05/2014 12:18, Michael S. Tsirkin ha scritto: > >On Mon, May 12, 2014 at 12:14:25PM +0200, Paolo Bonzini wrote: > >>Il 12/05/2014 12:08, Michael S. Tsirkin ha scritto: > >>>On Mon, May 12, 2014 at 11:57:32AM +0200, Paolo Bonzini

Re: [Qemu-devel] KVM call agenda for 2014-05-13

2014-05-12 Thread Peter Maydell
On 12 May 2014 11:30, Peter Crosthwaite wrote: > On Mon, May 12, 2014 at 7:44 PM, Peter Maydell > wrote: >> On 12 May 2014 10:10, Juan Quintela wrote: >>> Please, send any topic that you are interested in covering. >>> >>> - QOMifying both Memory regions and GPIOs and attaching them via QOM >>>

Re: [Qemu-devel] [PATCH 2/5] block: New bdrv_nb_sectors()

2014-05-12 Thread Kevin Wolf
Am 09.05.2014 um 11:48 hat Markus Armbruster geschrieben: > A call to retrieve the image size converts between bytes and sectors > several times: > > * BlockDriver method bdrv_getlength() returns bytes. > > * refresh_total_sectors() converts to sectors, rounding up, and stores > in total_sector

[Qemu-devel] [PATCH 00/18] migration: add static analysis tool to check vmstate compat between versions

2014-05-12 Thread Amit Shah
Hello, This series adds a static vmstate checker to check for breakage of live migration by analyzing the vmstate information between different QEMU versions. QEMU is modified to add a -dump-vmstate commandline option, which takes a filename as the argument. When invoked, QEMU dumps the vmstate

[Qemu-devel] [PATCH 01/18] migration: dump vmstate info as a json file for static analysis

2014-05-12 Thread Amit Shah
This commit adds a new command, '-dump-vmstate', that takes a filename as a parameter. When executed, QEMU will dump the vmstate information for the machine type it's invoked with to the file, and quit. The JSON-format output can then be used to compare the vmstate info for different QEMU version

[Qemu-devel] [PATCH 04/18] tests: vmstate static checker: incompat machine types

2014-05-12 Thread Amit Shah
This commit modifies the dump2 data to flag incompatibilities in the machine types being compared. Signed-off-by: Amit Shah --- tests/vmstate-static-checker-data/dump2.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vmstate-static-checker-data/dump2.json b/tests/v

[Qemu-devel] [PATCH 08/18] tests: vmstate static checker: remove a section

2014-05-12 Thread Amit Shah
Signed-off-by: Amit Shah --- tests/vmstate-static-checker-data/dump2.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vmstate-static-checker-data/dump2.json b/tests/vmstate-static-checker-data/dump2.json index 36a9b4b..4ccfd67 100644 --- a/tests/vmstate-static-check

[Qemu-devel] [PATCH 02/18] vmstate-static-checker: script to validate vmstate changes

2014-05-12 Thread Amit Shah
This script compares the vmstate dumps in JSON format as output by QEMU with the -dump-vmstate option. It flags various errors, like version mismatch, sections going away, size mismatches, etc. This script is tolerant of a few changes that do not change the on-wire format, like embedding a few fi

[Qemu-devel] [PATCH 16/18] tests: vmstate static checker: remove Subsections

2014-05-12 Thread Amit Shah
Signed-off-by: Amit Shah --- tests/vmstate-static-checker-data/dump2.json | 15 --- 1 file changed, 15 deletions(-) diff --git a/tests/vmstate-static-checker-data/dump2.json b/tests/vmstate-static-checker-data/dump2.json index 6f8a617..b5cb1aa 100644 --- a/tests/vmstate-static-check

[Qemu-devel] [PATCH 05/18] tests: vmstate static checker: add version error in main section

2014-05-12 Thread Amit Shah
Signed-off-by: Amit Shah --- tests/vmstate-static-checker-data/dump2.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vmstate-static-checker-data/dump2.json b/tests/vmstate-static-checker-data/dump2.json index 0a8b81d..f405534 100644 --- a/tests/vmstate-static-check

[Qemu-devel] [PATCH 13/18] tests: vmstate static checker: remove Description

2014-05-12 Thread Amit Shah
Signed-off-by: Amit Shah --- tests/vmstate-static-checker-data/dump2.json | 33 +--- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/tests/vmstate-static-checker-data/dump2.json b/tests/vmstate-static-checker-data/dump2.json index cc0aae3..66ac3bd 100644 ---

[Qemu-devel] [PATCH 10/18] tests: vmstate static checker: remove last field in a struct

2014-05-12 Thread Amit Shah
Signed-off-by: Amit Shah --- tests/vmstate-static-checker-data/dump2.json | 6 -- 1 file changed, 6 deletions(-) diff --git a/tests/vmstate-static-checker-data/dump2.json b/tests/vmstate-static-checker-data/dump2.json index f6b52d0..34bfbf6 100644 --- a/tests/vmstate-static-checker-data/dum

[Qemu-devel] [PATCH 06/18] tests: vmstate static checker: version mismatch inside a Description

2014-05-12 Thread Amit Shah
Signed-off-by: Amit Shah --- tests/vmstate-static-checker-data/dump2.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vmstate-static-checker-data/dump2.json b/tests/vmstate-static-checker-data/dump2.json index f405534..36a9b4b 100644 --- a/tests/vmstate-static-check

[Qemu-devel] [PATCH 15/18] tests: vmstate static checker: remove a subsection

2014-05-12 Thread Amit Shah
Signed-off-by: Amit Shah --- tests/vmstate-static-checker-data/dump2.json | 13 - 1 file changed, 13 deletions(-) diff --git a/tests/vmstate-static-checker-data/dump2.json b/tests/vmstate-static-checker-data/dump2.json index 05b8fce..6f8a617 100644 --- a/tests/vmstate-static-checker

[Qemu-devel] [PATCH 07/18] tests: vmstate static checker: minimum_version_id check

2014-05-12 Thread Amit Shah
Signed-off-by: Amit Shah --- tests/vmstate-static-checker-data/dump1.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vmstate-static-checker-data/dump1.json b/tests/vmstate-static-checker-data/dump1.json index 44200fb..786ca0b 100644 --- a/tests/vmstate-static-check

[Qemu-devel] [PATCH 17/18] tests: vmstate static checker: add substructure for usb-kbd for hid section

2014-05-12 Thread Amit Shah
This shows how the script deals with substructures added to vmstate descriptions that don't change the on-wire format. Signed-off-by: Amit Shah --- tests/vmstate-static-checker-data/dump2.json | 115 +++ 1 file changed, 64 insertions(+), 51 deletions(-) diff --git a/test

[Qemu-devel] [PATCH 09/18] tests: vmstate static checker: remove a field

2014-05-12 Thread Amit Shah
Signed-off-by: Amit Shah --- tests/vmstate-static-checker-data/dump2.json | 6 -- 1 file changed, 6 deletions(-) diff --git a/tests/vmstate-static-checker-data/dump2.json b/tests/vmstate-static-checker-data/dump2.json index 4ccfd67..f6b52d0 100644 --- a/tests/vmstate-static-checker-data/dum

[Qemu-devel] [PATCH 18/18] tests: vmstate static checker: add size mismatch inside substructure

2014-05-12 Thread Amit Shah
Signed-off-by: Amit Shah --- tests/vmstate-static-checker-data/dump2.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vmstate-static-checker-data/dump2.json b/tests/vmstate-static-checker-data/dump2.json index 45cccaf..75719f5 100644 --- a/tests/vmstate-static-check

[Qemu-devel] [PATCH 11/18] tests: vmstate static checker: change description name

2014-05-12 Thread Amit Shah
Signed-off-by: Amit Shah --- tests/vmstate-static-checker-data/dump2.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vmstate-static-checker-data/dump2.json b/tests/vmstate-static-checker-data/dump2.json index 34bfbf6..f69966d 100644 --- a/tests/vmstate-static-check

[Qemu-devel] [PATCH 12/18] tests: vmstate static checker: remove Fields

2014-05-12 Thread Amit Shah
Signed-off-by: Amit Shah --- tests/vmstate-static-checker-data/dump2.json | 114 +-- 1 file changed, 1 insertion(+), 113 deletions(-) diff --git a/tests/vmstate-static-checker-data/dump2.json b/tests/vmstate-static-checker-data/dump2.json index f69966d..cc0aae3 100644 --

[Qemu-devel] [PATCH 14/18] tests: vmstate static checker: remove Description inside Fields

2014-05-12 Thread Amit Shah
Signed-off-by: Amit Shah --- tests/vmstate-static-checker-data/dump2.json | 27 +-- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/tests/vmstate-static-checker-data/dump2.json b/tests/vmstate-static-checker-data/dump2.json index 66ac3bd..05b8fce 100644 ---

Re: [Qemu-devel] [RFC] vhost: Can we change synchronize_rcu to call_rcu in vhost_set_memory() in vhost kernel module?

2014-05-12 Thread Paolo Bonzini
Il 12/05/2014 13:07, Michael S. Tsirkin ha scritto: On Mon, May 12, 2014 at 12:25:35PM +0200, Paolo Bonzini wrote: Il 12/05/2014 12:18, Michael S. Tsirkin ha scritto: On Mon, May 12, 2014 at 12:14:25PM +0200, Paolo Bonzini wrote: Il 12/05/2014 12:08, Michael S. Tsirkin ha scritto: On Mon, May

Re: [Qemu-devel] [RFC] vhost: Can we change synchronize_rcu to call_rcu in vhost_set_memory() in vhost kernel module?

2014-05-12 Thread Michael S. Tsirkin
On Mon, May 12, 2014 at 01:46:19PM +0200, Paolo Bonzini wrote: > Il 12/05/2014 13:07, Michael S. Tsirkin ha scritto: > >On Mon, May 12, 2014 at 12:25:35PM +0200, Paolo Bonzini wrote: > >>Il 12/05/2014 12:18, Michael S. Tsirkin ha scritto: > >>>On Mon, May 12, 2014 at 12:14:25PM +0200, Paolo Bonzini

[Qemu-devel] [PATCH] usb: fix up post load checks

2014-05-12 Thread Michael S. Tsirkin
Correct post load checks: 1. dev->setup_len == sizeof(dev->data_buf) seems fine, no need to fail migration 2. When state is DATA, passing index > len will cause memcpy with negative length, resulting in heap overflow First of the issues was reported by dgilbert. Reported-by: "Dr. David

[Qemu-devel] [Bug 1308341] Re: Multiple CPUs causes blue screen on Windows guest

2014-05-12 Thread Serge Hallyn
** Also affects: qemu (Ubuntu) Importance: Undecided Status: New ** Also affects: qemu Importance: Undecided Status: New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1308341 Tit

[Qemu-devel] [PATCH] Add backing file option to qemu-img create help.

2014-05-12 Thread Mike Day
For the create subcommand the backing file (-b) option is documented on-line but not in the binary. Add it. Signed-off-by: Mike Day --- qemu-img-cmds.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx index d029609..7724709 100644 --- a

Re: [Qemu-devel] [PATCH 2/5] block: New bdrv_nb_sectors()

2014-05-12 Thread Markus Armbruster
Kevin Wolf writes: > Am 09.05.2014 um 11:48 hat Markus Armbruster geschrieben: >> A call to retrieve the image size converts between bytes and sectors >> several times: >> >> * BlockDriver method bdrv_getlength() returns bytes. >> >> * refresh_total_sectors() converts to sectors, rounding up, a

  1   2   3   >