Re: [Qemu-devel] [PATCH v3 2/5] Extract some reusable vGIC code

2015-07-14 Thread Pavel Fedin
Hi! > /local/augere/LINARO/QEMU/qemu/hw/intc/arm_gic_kvm.c:565:5: error: > passing argument 2 of 'qdev_init_gpio_in' from incompatible pointer type > [-Werror] > qdev_init_gpio_in(dev, kvm_arm_gic_set_irq, i); > > also > > /local/augere/LINARO/QEMU/qemu/hw/intc/arm_gic_kvm.c:90:13: error:

Re: [Qemu-devel] [PATCH qemu 1/5] vfio: Switch from TARGET_PAGE_MASK to qemu_real_host_page_mask

2015-07-14 Thread Alexey Kardashevskiy
On 07/14/2015 06:32 AM, Peter Crosthwaite wrote: On Sun, Jul 12, 2015 at 11:15 PM, David Gibson wrote: On Fri, Jul 10, 2015 at 08:43:44PM +1000, Alexey Kardashevskiy wrote: These started switching from TARGET_PAGE_MASK (hardcoded as 4K) to a real host page size: 4e51361d7 "cpu-all: complete "r

Re: [Qemu-devel] vm internal snapshot deletes only delete first disk's snapshots

2015-07-14 Thread Marcus
Ok, I seem to have fixed it. I can submit a patch, but some input would be appreciated. In savevm.c, we have two functions: void hmp_delvm(Monitor *mon, const QDict *qdict), which my libvirt is using static int del_existing_snapshots(Monitor *mon, const char *name) These look to have the same

[Qemu-devel] (no subject)

2015-07-14 Thread Pankaj Gupta
Subject: [PATCH 0/2 v2] virtio-rng: Avoid uncessary timer trigger to bump up quota value Timer was added in virtio-rng to rate limit the entropy. It used to trigger at regular intervals to bump up the quota value. The value of quota and timer is used to ensure single guest should not use up all

[Qemu-devel] [PATCH 1/2 v2] virtio-rng: Bump up quota value only when guest requests entropy

2015-07-14 Thread Pankaj Gupta
This patch triggers timer only when guest requests for entropy. As soon as first request from guest for entropy comes we set the timer. Timer bumps up the quota value when it gets triggered. Signed-off-by: Pankaj Gupta --- hw/virtio/virtio-rng.c | 15 --- include/hw/virtio

[Qemu-devel] [PATCH 2/2 v2] virtio-rng: Serve pending request if any after timer bumps up quota.

2015-07-14 Thread Pankaj Gupta
We are arming timer when we get first request from guest. Even if guest pulls all the data we will be serving guest only when timer bumps up new quota. When timer expires we check if we have a pending request from guest, we serve it and rearm the timer else we don't do any thing. This patch als

[Qemu-devel] [PATCH 0/2 v2] virtio-rng: Avoid uncessary timer trigger to bump up quota value

2015-07-14 Thread Pankaj Gupta
Timer was added in virtio-rng to rate limit the entropy. It used to trigger at regular intervals to bump up the quota value. The value of quota and timer is used to ensure single guest should not use up all the entropy from the host. This resulted in triggering of timer even when quota is not exha

Re: [Qemu-devel] [PATCH v3 14/16] acpi: Add a way for devices to add ACPI tables

2015-07-14 Thread Igor Mammedov
On Mon, 13 Jul 2015 16:55:29 -0500 Corey Minyard wrote: > On 07/09/2015 03:25 AM, Igor Mammedov wrote: > > On Wed, 8 Jul 2015 22:39:24 +0200 > > Paolo Bonzini wrote: > > > >> > >> On 08/07/2015 21:26, Igor Mammedov wrote: > This was suggested by Michael, so I think you should read the revie

Re: [Qemu-devel] [PATCH for-2.4 1/2] core: reset handler for bus-less devices

2015-07-14 Thread Cornelia Huck
On Mon, 13 Jul 2015 18:06:45 +0200 Andreas Färber wrote: > Found it. So the problem *is* different from what I understood! It's not > directly attached to /machine by s390x code, but rather instantiated via > -device by the user. > > Peter C. suggested you to do it in realize, which affects all

[Qemu-devel] [PATCH for-2.4 04/12] usbnet: Drop usbnet_can_receive

2015-07-14 Thread Fam Zheng
usbnet_receive already drops packet if rndis_state is not RNDIS_DATA_INITIALIZED, and queues packet if in buffer is not available. The only difference is s->dev.config but that is similar to rndis_state. Drop usbnet_can_receive and move these checks to usbnet_receive, so that we don't need to expl

[Qemu-devel] [PATCH for-2.4 00/12] hw/net: Fix .can_receive() for NICs

2015-07-14 Thread Fam Zheng
Since a90a742 "tap: Drop tap_can_send", all nics that returns false from .can_receive() are required to explicitly flush the incoming queue when the status of it is changing back to true, otherwise the backend will sop processing more rx packets. The purpose of this callback is to tell the peer ba

[Qemu-devel] [PATCH for-2.4 05/12] etsec: Move etsec_can_receive into etsec_receive

2015-07-14 Thread Fam Zheng
When etsec_reset returns 0, peer would queue the packet as if .can_receive returns false. Drop etsec_can_receive and let etsec_receive carry the semantics. Signed-off-by: Fam Zheng --- hw/net/fsl_etsec/etsec.c | 11 +-- hw/net/fsl_etsec/etsec.h | 2 +- hw/net/fsl_etsec/rings.c | 14

[Qemu-devel] [PATCH for-2.4 01/12] xgmac: Drop packets with eth_can_rx is false.

2015-07-14 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/net/xgmac.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/net/xgmac.c b/hw/net/xgmac.c index b068f3a..15fb681 100644 --- a/hw/net/xgmac.c +++ b/hw/net/xgmac.c @@ -312,10 +312,8 @@ static const MemoryRegionOps enet_mem_ops = { .

[Qemu-devel] [PATCH v4 0/5] vGICv3 support

2015-07-14 Thread Pavel Fedin
This series introduces support for GICv3 by KVM. Software emulation is currently not supported. Differences from v3: - Fixed stupid build breakage in patch 0002 - Rebased on top of current master, patch 0003 adjusted according to kvm_irqchip_create() changes - Added assertion against uninitializ

[Qemu-devel] [PATCH for-2.4 07/12] mcf_fec: Drop mcf_fec_can_receive

2015-07-14 Thread Fam Zheng
The semantics of .can_receive requires us to flush the queue explicitly when s->rx_enabled becomes true after it returns 0, but the packet being queued is not meaningful since the guest hasn't activated the card. Let's just drop the packet in this case. Signed-off-by: Fam Zheng --- hw/net/mcf_fe

[Qemu-devel] [PATCH for-2.4 11/12] dp8393x: Flush packets when link comes up

2015-07-14 Thread Fam Zheng
.can_receive callback changes semantics that once return 0, backend will try sending again until explicitly flushed, change the device to meet that. dp8393x_can_receive checks SONIC_CR_RXEN bit in SONIC_CR register and SONIC_ISR_RBE bit in SONIC_ISR register, try flushing the queue when either bit

[Qemu-devel] [PATCH for-2.4 02/12] pcnet: Drop pcnet_can_receive

2015-07-14 Thread Fam Zheng
pcnet_receive already checks the conditions and drop packets if false. Due to the new semantics since 6e99c63 ("net/socket: Drop net_socket_can_send"), having .can_receive returning 0 requires us to explicitly flush the queued packets when the conditions are becoming true, but queuing the packets w

[Qemu-devel] [PATCH v4 1/5] Implement GIC-500 base class

2015-07-14 Thread Pavel Fedin
From: Shlomo Pongratz This class is to be used by both software and KVM implementations of GICv3 Signed-off-by: Shlomo Pongratz Signed-off-by: Pavel Fedin --- hw/intc/Makefile.objs | 1 + hw/intc/arm_gicv3_common.c | 216 + hw/intc/gi

[Qemu-devel] [PATCH for-2.4 09/12] mipsnet: Flush queued packets when receiving is enabled

2015-07-14 Thread Fam Zheng
Drop .can_receive and move the semantics to mipsnet_receive, by returning 0. After 0 is returned, we must flush the queue explicitly to restart it: Call qemu_flush_queued_packets when s->busy or s->rx_count is being updated. Signed-off-by: Fam Zheng --- hw/net/mipsnet.c | 9 +++-- 1 file ch

[Qemu-devel] [PATCH v4 3/5] Introduce irqchip type specification for KVM

2015-07-14 Thread Pavel Fedin
This patch introduces kernel_irqchip_type member in Machine class, which it passed to kvm_arch_irqchip_create. It allows machine models to specify correct GIC type during KVM capability verification. The variable is defined as int in order to be architecture-agnostic for potential future uses by ot

[Qemu-devel] [PATCH for-2.4 03/12] eepro100: Drop nic_can_receive

2015-07-14 Thread Fam Zheng
nic_receive already checks the conditions and drop packets if false. Due to the new semantics since 6e99c63 ("net/socket: Drop net_socket_can_send"), having .can_receive returning 0 requires us to explicitly flush the queued packets when the conditions are becoming true, but queuing the packets whe

[Qemu-devel] [PATCH v4 2/5] Extract some reusable vGIC code

2015-07-14 Thread Pavel Fedin
These functions are useful also for vGICv3 implementation. Make them accessible from within other modules. Actually kvm_dist_get() and kvm_dist_put() could also be made reusable, but they would require two extra parameters (s->dev_fd and s->num_cpu) as well as lots of typecasts of 's' to DeviceSta

[Qemu-devel] [PATCH for-2.4 06/12] etsec: Flush queue when rx buffer is consumed

2015-07-14 Thread Fam Zheng
The BH will be scheduled when etsec->rx_buffer_len is becoming 0, which is the condition of queuing. Signed-off-by: Fam Zheng --- hw/net/fsl_etsec/etsec.c | 9 + hw/net/fsl_etsec/etsec.h | 2 ++ hw/net/fsl_etsec/rings.c | 1 + 3 files changed, 12 insertions(+) diff --git a/hw/net/fsl_et

[Qemu-devel] [PATCH v4 4/5] Initial implementation of vGICv3

2015-07-14 Thread Pavel Fedin
Get/put routines are missing, live migration is not possible. Signed-off-by: Pavel Fedin --- hw/intc/Makefile.objs | 3 + hw/intc/arm_gicv3_kvm.c | 192 2 files changed, 195 insertions(+) create mode 100644 hw/intc/arm_gicv3_kvm.c diff --git

[Qemu-devel] [PATCH for-2.4 10/12] stellaris_enet: Flush queued packets when read done

2015-07-14 Thread Fam Zheng
If s->np reaches 31, the queue will be disabled by peer when it sees stellaris_enet_can_receive() returns false, until we explicitly flushes it which notifies the peer. Do this when guest is done reading all existing data. Move the semantics to stellaris_enet_receive, by returning 0 when the buffe

[Qemu-devel] [PATCH for-2.4 12/12] axienet: Flush queued packets when rx is done

2015-07-14 Thread Fam Zheng
eth_can_rx checks s->rxsize and returns false if it is non-zero. Because of the .can_receive semantics change, this will make the incoming queue disabled by peer, until it is explicitly flushed. So we should flush it when s->rxsize is becoming zero. Do it by adding a BH that calls qemu_flush_queue

Re: [Qemu-devel] Qemu-devel Digest, Vol 148, Issue 574

2015-07-14 Thread Ouyang, Changchun
> -Original Message- > From: qemu-devel-bounces+changchun.ouyang=intel@nongnu.org > [mailto:qemu-devel-bounces+changchun.ouyang=intel@nongnu.org] > On Behalf Of qemu-devel-requ...@nongnu.org > Sent: Monday, July 13, 2015 11:28 PM > To: qemu-devel@nongnu.org > Subject: Qemu-devel D

[Qemu-devel] [PATCH for-2.4 08/12] milkymist-minimac2: Flush queued packets when link comes up

2015-07-14 Thread Fam Zheng
Drop .can_receive and move the semantics into minimac2_rx, by returning 0. That is once minimac2_rx returns 0, incoming packets will be queued until the queue is explicitly flushed. We do this when s->regs[R_STATE0] or s->regs[R_STATE1] is changed in minimac2_write. Signed-off-by: Fam Zheng ---

[Qemu-devel] [PATCH v4 5/5] Add gicversion option to virt machine

2015-07-14 Thread Pavel Fedin
Set kernel_irqchip_type according to value of the option and pass it around where necessary. Instantiate devices and fdt nodes according to the choice. mac_cpus for virt machine increased to 64. GICv2 compatibility check happens inside arm_gic_common_realize(). Signed-off-by: Pavel Fedin --- hw

[Qemu-devel] Patches

2015-07-14 Thread Peter Crosthwaite
Hi Stefan, Peter, Is patches down? I don't see any patches for the last 3 days and there is definitely new things on list: $ ./patches fetch http://vmsplice.net/~patches/patches.json Fetched info on 689 patch series Fetching mboxes... $ ./patches list | more Message-id: 1436556159-3002-1-git-send

[Qemu-devel] [PATCH v2] pci_add_capability: remove duplicate comments

2015-07-14 Thread Chen Hanxiao
Signed-off-by: Chen Hanxiao --- hw/pci/pci.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 442f822..a017614 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -2101,12 +2101,10 @@ static void pci_del_option_rom(PCIDevice *pdev) } /* -

Re: [Qemu-devel] [PATCH v3 05/15] backup: Extract dirty bitmap handling as a separate function

2015-07-14 Thread Stefan Hajnoczi
On Fri, Jul 10, 2015 at 11:46:42AM +0800, Fam Zheng wrote: > This will be reused by the coming new transactional completion code. > > Signed-off-by: Fam Zheng > --- > block/backup.c | 26 -- > 1 file changed, 16 insertions(+), 10 deletions(-) > > diff --git a/block/backu

Re: [Qemu-devel] [PATCH] ide: coverity touchups

2015-07-14 Thread Paolo Bonzini
On 13/07/2015 21:41, John Snow wrote: >>> >> s->ports should never exceed 32, but coverity doesn't know that. >>> >> ncq_tfs->sector_count should also never exceed 64K. >> > >> > Personally I tend to mark that kind of thing as a false >> > positive in the coverity UI and move on... >> > >> > --

[Qemu-devel] User space vs kernel space instructions distribution.

2015-07-14 Thread Shlomo Pongratz
Hi, I'm running aarm64 QEMU and I'm counting the number of instructions which "belong" to user space vs kernel space. My measurements shows that 99 percent of instructions are in kernel space. I've used both the address of the instructions and the EL just to be sure. I also added an option to disa

Re: [Qemu-devel] [PATCH for-2.4 00/12] hw/net: Fix .can_receive() for NICs

2015-07-14 Thread Wen Congyang
On 07/14/2015 03:53 PM, Fam Zheng wrote: > Since a90a742 "tap: Drop tap_can_send", all nics that returns false from > .can_receive() are required to explicitly flush the incoming queue when the > status of it is changing back to true, otherwise the backend will sop > processing more rx packets. >

Re: [Qemu-devel] [PATCH v3 06/15] blockjob: Add .txn_commit and .txn_abort transaction actions

2015-07-14 Thread Stefan Hajnoczi
On Fri, Jul 10, 2015 at 11:46:43AM +0800, Fam Zheng wrote: > They will be called if the job is part of a transaction, after all jobs in a > transaction are completed or cancelled, before calling job->cb(). > > Signed-off-by: Fam Zheng > --- > include/block/blockjob.h | 12 > 1 file

Re: [Qemu-devel] [v9][PATCH 08/10] xen, gfx passthrough: register a isa bridge

2015-07-14 Thread Chen, Tiejun
diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h index 4356af4..703148e 100644 --- a/include/hw/xen/xen.h +++ b/include/hw/xen/xen.h @@ -51,4 +51,5 @@ void xen_register_framebuffer(struct MemoryRegion *mr); # define HVM_MAX_VCPUS 32 #endif +extern void igd_passthrough_isa_bridge_crea

Re: [Qemu-devel] User space vs kernel space instructions distribution.

2015-07-14 Thread Peter Maydell
On 14 July 2015 at 09:32, Shlomo Pongratz wrote: > Hi, > > I'm running aarm64 QEMU and I'm counting the number of instructions which > "belong" to user space vs kernel space. My measurements shows that 99 > percent of instructions are in kernel space. > I've used both the address of the instructio

Re: [Qemu-devel] [v9][PATCH 08/10] xen, gfx passthrough: register a isa bridge

2015-07-14 Thread Michael S. Tsirkin
On Tue, Jul 14, 2015 at 04:42:44PM +0800, Chen, Tiejun wrote: > >>>diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h > >>>index 4356af4..703148e 100644 > >>>--- a/include/hw/xen/xen.h > >>>+++ b/include/hw/xen/xen.h > >>>@@ -51,4 +51,5 @@ void xen_register_framebuffer(struct MemoryRegion *mr

[Qemu-devel] [PATCH 0/2] vmxnet3: Fix RX TCP/UDP checksum of partially summed packets

2015-07-14 Thread Shmulik Ladkani
In case csum offloaded packet, vmxnet3 implementation always passes an RxCompDesc with the "Checksum calculated and found correct" notification to the OS. This emulates the observed ESXi behavior. Therefore, if packet has the NEEDS_CSUM bit set, we must calculate and place a fully computed checksu

[Qemu-devel] [PATCH 1/2] net/vmxnet3: Refactor 'vmxnet_rx_pkt_attach_data'

2015-07-14 Thread Shmulik Ladkani
Separate RX packet protocol parsing out of 'vmxnet_rx_pkt_attach_data'. Signed-off-by: Shmulik Ladkani --- hw/net/vmxnet3.c | 1 + hw/net/vmxnet_rx_pkt.c | 12 +--- hw/net/vmxnet_rx_pkt.h | 11 +++ 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/hw/net/vmxn

[Qemu-devel] [PATCH 2/2] net/vmxnet3: Fix RX TCP/UDP checksum on partially summed packets

2015-07-14 Thread Shmulik Ladkani
From: Dana Rubin Convert partially summed packets to be fully checksummed. In case csum offloaded packet, vmxnet3 implementation always passes an RxCompDesc with the "Checksum calculated and found correct" notification to the OS. This emulates the observed ESXi behavior. Therefore, if packet ha

[Qemu-devel] [Bug 1474263] [NEW] "Image format was not specified" warning should be suppressed for the vvfat (and probably nbd) driver

2015-07-14 Thread felix
Public bug reported: Running qemu -drive file.driver=vvfat,file.dir=. displays WARNING: Image format was not specified for 'json:{"dir": ".", "driver": "vvfat"}' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will

Re: [Qemu-devel] [PATCH v7 31/42] Page request: Process incoming page request

2015-07-14 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > On receiving MIG_RPCOMM_REQ_PAGES look up the address and > queue the page. > > Signed-off-by: Dr. David Alan Gilbert > migrate_fd_cleanup_src_rp(s); > > +/* This queue generally should be empty - but in the

[Qemu-devel] [PATCH] hid: clarify hid_keyboard_process_keycode

2015-07-14 Thread Paolo Bonzini
Coverity thinks the fallthroughs are smelly. They are correct, but everything else in this function is like "wut?". Refer explicitly to bits 8 and 9 of hs->kbd.modifiers instead of shifting right first and using (1 << 7). Document what the scancode is when hid_code is 0xe0. And add plenty of co

Re: [Qemu-devel] [PATCH 2/2] net/vmxnet3: Fix RX TCP/UDP checksum on partially summed packets

2015-07-14 Thread Dmitry Fleytman
> On Jul 14, 2015, at 11:55, Shmulik Ladkani > wrote: > > From: Dana Rubin > > Convert partially summed packets to be fully checksummed. > > In case csum offloaded packet, vmxnet3 implementation always passes an > RxCompDesc with the "Checksum calculated and found correct" notification > to

Re: [Qemu-devel] [PATCH 1/2] net/vmxnet3: Refactor 'vmxnet_rx_pkt_attach_data'

2015-07-14 Thread Dmitry Fleytman
> On Jul 14, 2015, at 11:55, Shmulik Ladkani > wrote: > > Separate RX packet protocol parsing out of 'vmxnet_rx_pkt_attach_data'. > Ack > Signed-off-by: Shmulik Ladkani > --- > hw/net/vmxnet3.c | 1 + > hw/net/vmxnet_rx_pkt.c | 12 +--- > hw/net/vmxnet_rx_pkt.h | 11 ++

Re: [Qemu-devel] [PATCH v3 06/15] blockjob: Add .txn_commit and .txn_abort transaction actions

2015-07-14 Thread Fam Zheng
On Tue, 07/14 09:35, Stefan Hajnoczi wrote: > On Fri, Jul 10, 2015 at 11:46:43AM +0800, Fam Zheng wrote: > > They will be called if the job is part of a transaction, after all jobs in a > > transaction are completed or cancelled, before calling job->cb(). > > > > Signed-off-by: Fam Zheng > > ---

Re: [Qemu-devel] [PATCH for-2.4 05/12] etsec: Move etsec_can_receive into etsec_receive

2015-07-14 Thread Jason Wang
On 07/14/2015 03:53 PM, Fam Zheng wrote: > When etsec_reset returns 0, peer would queue the packet as if > .can_receive returns false. Drop etsec_can_receive and let etsec_receive > carry the semantics. > > Signed-off-by: Fam Zheng > --- > hw/net/fsl_etsec/etsec.c | 11 +-- > hw/net/fsl

Re: [Qemu-devel] [PATCH for-2.4 06/12] etsec: Flush queue when rx buffer is consumed

2015-07-14 Thread Jason Wang
On 07/14/2015 03:53 PM, Fam Zheng wrote: > The BH will be scheduled when etsec->rx_buffer_len is becoming 0, which > is the condition of queuing. > > Signed-off-by: Fam Zheng I suggest to squash this into patch 05/12 to unbreak bisection. And can we do this without a bh? Otherwise, we may need

[Qemu-devel] [PATCH v4 2/2] QOM: object_property_add() performance improvement

2015-07-14 Thread Pavel Fedin
Avoid repetitive lookup of every property in array starting from 0 by adding one more property which caches last used index. Every time an array is expanded the index is picked up from this cache. The property is a uint32_t and its name is name of the array plus '#' ('name#'). It has getter functi

[Qemu-devel] [PATCH v4 1/2] QOM: Introduce object_property_add_single()

2015-07-14 Thread Pavel Fedin
Refactoring of object_property_add() before performance optimization of the array expansion code Signed-off-by: Pavel Fedin Reviewed-by: Peter Crosthwaite --- qom/object.c | 67 1 file changed, 40 insertions(+), 27 deletions(-) diff

[Qemu-devel] [PATCH v4 0/2] QOM: object_property_add() performance improvement

2015-07-14 Thread Pavel Fedin
The function originally behaves very badly when adding properties with "[*]" suffix. Normally these are used for numbering IRQ pins. In order to find the correct starting number the function started from zero and checked for duplicates. This takes incredibly long time with large number of CPUs beca

Re: [Qemu-devel] [PATCH v7 32/42] Page request: Consume pages off the post-copy queue

2015-07-14 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > When transmitting RAM pages, consume pages that have been queued by > MIG_RPCOMM_REQPAGE commands and send them ahead of normal page scanning. > > Note: > a) After a queued page the linear walk carries on from after the

[Qemu-devel] [PATCH for-2.4] virtio-net: Flush incoming queues when DRIVER_OK is being set

2015-07-14 Thread Fam Zheng
This patch fixes network hang after "stop" then "cont", while network packets keep arriving. Tested both manually (tap, host pinging guest) and with Jason's qtest series (plus his "[PATCH 2.4] socket: pass correct size in net_socket_send()" fix). As virtio_net_set_status is called when guest driv

Re: [Qemu-devel] RFC: guest-side retrieval of fw_cfg file

2015-07-14 Thread Richard W.M. Jones
On Mon, Jul 13, 2015 at 04:09:37PM -0400, Gabriel L. Somlo wrote: > 3. I'm currently only handling x86 and I/O ports. I could drop the >fw_cfg_dmi_whitelist and just check the signature, using mmio where >appropriate, but I don't have a handy-dandy set of VMs for those >architectures on

Re: [Qemu-devel] [PATCH for-2.4 06/12] etsec: Flush queue when rx buffer is consumed

2015-07-14 Thread Fam Zheng
On Tue, 07/14 17:33, Jason Wang wrote: > > > On 07/14/2015 03:53 PM, Fam Zheng wrote: > > The BH will be scheduled when etsec->rx_buffer_len is becoming 0, which > > is the condition of queuing. > > > > Signed-off-by: Fam Zheng > > I suggest to squash this into patch 05/12 to unbreak bisection.

Re: [Qemu-devel] [PATCH for-2.4 05/12] etsec: Move etsec_can_receive into etsec_receive

2015-07-14 Thread Fam Zheng
On Tue, 07/14 17:30, Jason Wang wrote: > > > On 07/14/2015 03:53 PM, Fam Zheng wrote: > > When etsec_reset returns 0, peer would queue the packet as if > > .can_receive returns false. Drop etsec_can_receive and let etsec_receive > > carry the semantics. > > > > Signed-off-by: Fam Zheng > > --- >

Re: [Qemu-devel] Patches

2015-07-14 Thread Peter Maydell
On 14 July 2015 at 09:12, Peter Crosthwaite wrote: > Hi Stefan, Peter, > > Is patches down? I don't see any patches for the last 3 days and there > is definitely new things on list: > > $ ./patches fetch http://vmsplice.net/~patches/patches.json > Fetched info on 689 patch series > Fetching mboxes

Re: [Qemu-devel] [PATCH v3 09/15] blockjob: Move BlockJobDeferToMainLoopData into BlockJob

2015-07-14 Thread Stefan Hajnoczi
On Fri, Jul 10, 2015 at 11:46:46AM +0800, Fam Zheng wrote: > diff --git a/blockjob.c b/blockjob.c > index 11b48f5..e057dd5 100644 > --- a/blockjob.c > +++ b/blockjob.c > @@ -92,6 +92,10 @@ void block_job_completed(BlockJob *job, int ret) > assert(!job->completed); > job->completed = true;

Re: [Qemu-devel] [PATCH v7 33/42] postcopy_ram.c: place_page and helpers

2015-07-14 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > postcopy_place_page (etc) provide a way for postcopy to place a page > into guests memory atomically (using the copy ioctl on the ufd). > > Signed-off-by: Dr. David Alan Gilbert > --- a/include/migration/postcopy-ram.h >

[Qemu-devel] [PATCH] target-mips: fix resource leak reported by Coverity

2015-07-14 Thread Leon Alrae
UHI assert and link operations call lock_user_string() twice to obtain two strings pointed by gpr[4] and gpr[5]. If the second lock_user_string() fails, then the first one won't get freed. Fix this by introducing another macro responsible for obtaining two strings and handling allocation failure.

[Qemu-devel] [PATCH] target-mips: fix logically dead code reported by Coverity

2015-07-14 Thread Leon Alrae
Make use of CMPOP in floating-point compare instructions. Signed-off-by: Leon Alrae --- target-mips/translate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target-mips/translate.c b/target-mips/translate.c index 7302857..4a1ffdb 100644 --- a/target-mips/translate.c +++ b/target-mips/t

Re: [Qemu-devel] [PATCH for-2.4] virtio-net: Flush incoming queues when DRIVER_OK is being set

2015-07-14 Thread Michael S. Tsirkin
On Tue, Jul 14, 2015 at 05:41:04PM +0800, Fam Zheng wrote: > This patch fixes network hang after "stop" then "cont", while network > packets keep arriving. > > Tested both manually (tap, host pinging guest) and with Jason's qtest > series (plus his "[PATCH 2.4] socket: pass correct size in > net_s

[Qemu-devel] [PATCH] target-mips: correct DERET instruction

2015-07-14 Thread Leon Alrae
Fix Debug Mode flag clearing, and when DERET is placed between LL and SC do not make SC fail. Signed-off-by: Leon Alrae --- target-mips/op_helper.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index 2a9ddff..d461ad8 10064

Re: [Qemu-devel] [PATCH for-2.4] virtio-net: Flush incoming queues when DRIVER_OK is being set

2015-07-14 Thread Fam Zheng
On Tue, 07/14 13:09, Michael S. Tsirkin wrote: > On Tue, Jul 14, 2015 at 05:41:04PM +0800, Fam Zheng wrote: > > This patch fixes network hang after "stop" then "cont", while network > > packets keep arriving. > > > > Tested both manually (tap, host pinging guest) and with Jason's qtest > > series

Re: [Qemu-devel] [PATCH v3 10/15] block: add block job transactions

2015-07-14 Thread Stefan Hajnoczi
On Fri, Jul 10, 2015 at 11:46:47AM +0800, Fam Zheng wrote: > From: Stefan Hajnoczi Please take authorship, most of the code is yours. > +static void block_job_completed_txn(BlockJobTxn *txn, BlockJob *job, int ret) > +{ > +AioContext *ctx; > +BlockJob *other_job, *next; > +if (ret <

Re: [Qemu-devel] [PATCH] hw/arm/boot: Increase fdt alignment

2015-07-14 Thread Peter Maydell
On 13 July 2015 at 17:50, Alexander Graf wrote: > The Linux kernel on aarch64 creates a page table entry at early bootup > that spans the 2MB range on memory spanning the fdt start address: > > [ ALIGN_DOWN(fdt, 2MB) ... ALIGN_DOWN(fdt, 2MB) + 2MB ] > > This means that when our current 4k alignm

Re: [Qemu-devel] [PATCH v3 12/15] block/backup: support block job transactions

2015-07-14 Thread Stefan Hajnoczi
On Fri, Jul 10, 2015 at 11:46:49AM +0800, Fam Zheng wrote: > static BlockErrorAction backup_error_action(BackupBlockJob *job, > @@ -444,7 +462,7 @@ static void coroutine_fn backup_run(void *opaque) > qemu_co_rwlock_wrlock(&job->flush_rwlock); > qemu_co_rwlock_unlock(&job->flush_rwlock);

Re: [Qemu-devel] [PATCH v3 09/15] blockjob: Move BlockJobDeferToMainLoopData into BlockJob

2015-07-14 Thread Fam Zheng
On Tue, 07/14 11:03, Stefan Hajnoczi wrote: > On Fri, Jul 10, 2015 at 11:46:46AM +0800, Fam Zheng wrote: > > diff --git a/blockjob.c b/blockjob.c > > index 11b48f5..e057dd5 100644 > > --- a/blockjob.c > > +++ b/blockjob.c > > @@ -92,6 +92,10 @@ void block_job_completed(BlockJob *job, int ret) > >

Re: [Qemu-devel] [PULL v3 05/22] cpu: Convert cpu_index into a bitmap

2015-07-14 Thread Bharata B Rao
On Thu, Jul 09, 2015 at 03:23:55PM +0200, Andreas Färber wrote: > From: Bharata B Rao > > Currently CPUState::cpu_index is monotonically increasing and a newly > created CPU always gets the next higher index. The next available > index is calculated by counting the existing number of CPUs. This i

Re: [Qemu-devel] [PATCH for-2.4 08/12] milkymist-minimac2: Flush queued packets when link comes up

2015-07-14 Thread Michael Walle
Am 2015-07-14 09:53, schrieb Fam Zheng: Drop .can_receive and move the semantics into minimac2_rx, by returning 0. That is once minimac2_rx returns 0, incoming packets will be queued until the queue is explicitly flushed. We do this when s->regs[R_STATE0] or s->regs[R_STATE1] is changed in min

Re: [Qemu-devel] [RFC 0/6] vSMMU initialization

2015-07-14 Thread Will Deacon
On Tue, Jul 14, 2015 at 03:21:03AM +0100, Varun Sethi wrote: > Hi Will, Hi Varun, > > On Fri, Jun 12, 2015 at 03:20:04PM +0100, Baptiste Reynal wrote: > > > The ARM SMMU has support for 2-stages address translations, allowing a > > > virtual address to be translated at two levels: > > > - Stage 1

Re: [Qemu-devel] [PATCH for-2.4 08/12] milkymist-minimac2: Flush queued packets when link comes up

2015-07-14 Thread Fam Zheng
On Tue, 07/14 13:02, Michael Walle wrote: > Am 2015-07-14 09:53, schrieb Fam Zheng: > >Drop .can_receive and move the semantics into minimac2_rx, by returning > >0. > > > >That is once minimac2_rx returns 0, incoming packets will be queued > >until the queue is explicitly flushed. We do this when s

[Qemu-devel] [PATCH] virtio-input: fix segfault in virtio_input_hid_properties

2015-07-14 Thread Lin Ma
commit 5cce173 introduced virtio-input segfault, This patch fixes it. Signed-off-by: Lin Ma --- hw/input/virtio-input-hid.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/input/virtio-input-hid.c b/hw/input/virtio-input-hid.c index 616a815..4d85dad 100644 --- a/hw/input/virtio-input-hid.

Re: [Qemu-devel] RFC: guest-side retrieval of fw_cfg file

2015-07-14 Thread Laszlo Ersek
On 07/13/15 22:09, Gabriel L. Somlo wrote: > Hi, > > A while ago I was pondering on the options available for retrieving > a fw_cfg blob from the guest-side (now that we can insert fw_cfg > files on the host-side command line, see commit 81b2b8106). > > So over the last couple of weekends I cooke

Re: [Qemu-devel] [Xen-devel] [PATCH RFC 1 6/8] xen/pt: Make xen_pt_unregister_device idempotent

2015-07-14 Thread Stefano Stabellini
On Thu, 2 Jul 2015, Konrad Rzeszutek Wilk wrote: > > > @@ -858,15 +863,20 @@ static void xen_pt_unregister_device(PCIDevice *d) > > > machine_irq, errno); > > > } > > > } > > > +s->machine_irq = 0; > > > } > > > > > > /* delete a

Re: [Qemu-devel] [PULL v3 05/22] cpu: Convert cpu_index into a bitmap

2015-07-14 Thread Igor Mammedov
On Tue, 14 Jul 2015 16:08:54 +0530 Bharata B Rao wrote: > On Thu, Jul 09, 2015 at 03:23:55PM +0200, Andreas Färber wrote: > > From: Bharata B Rao > > > > Currently CPUState::cpu_index is monotonically increasing and a newly > > created CPU always gets the next higher index. The next available >

[Qemu-devel] unable to auth to vnc with qemu 2.4.0-rc0

2015-07-14 Thread Vasiliy Tolstov
vncviewer can't auto to qemu vnc with plain auth: Client sock=23 ws=0 auth=2 subauth=0 New client on socket 23 vnc_set_share_mode/23: undefined -> connecting Write Plain: Pending output 0x7fc8eba5dbe0 size 1036 offset 12. Wait SSF 0 Wrote wire 0x7fc8eba5dbe0 12 -> 12 Read plain (nil) size 0 offset

[Qemu-devel] [PATCH] memory: fix refcount leak in memory_region_present

2015-07-14 Thread Paolo Bonzini
memory_region_present() leaks a reference to a MemoryRegion in the case "mr == container". While fixing it, avoid reference counting altogether for memory_region_present(), by using RCU only. Reported-by: Peter Maydell Signed-off-by: Paolo Bonzini --- memory.c | 44

Re: [Qemu-devel] unable to auth to vnc with qemu 2.4.0-rc0

2015-07-14 Thread Paolo Bonzini
On 14/07/2015 13:58, Vasiliy Tolstov wrote: > vncviewer can't auto to qemu vnc with plain auth: > Client sock=23 ws=0 auth=2 subauth=0 > New client on socket 23 > vnc_set_share_mode/23: undefined -> connecting > Write Plain: Pending output 0x7fc8eba5dbe0 size 1036 offset 12. Wait SSF 0 > Wrote wire

Re: [Qemu-devel] unable to auth to vnc with qemu 2.4.0-rc0

2015-07-14 Thread Vasiliy Tolstov
2015-07-14 15:01 GMT+03:00 Paolo Bonzini : > Can you send the config.log and config-host.mak file from the build > directory? i can send only jenkins build log =(, may be it helps: http://cdn.selfip.ru/public/qemu.log -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru

Re: [Qemu-devel] [PATCH] more check for replaced node

2015-07-14 Thread Stefan Hajnoczi
On Mon, Jul 13, 2015 at 10:41:53AM +0800, Wen Congyang wrote: > On 07/02/2015 10:48 PM, Stefan Hajnoczi wrote: > > On Wed, Jul 01, 2015 at 04:49:40PM +0800, Wen Congyang wrote: > >> On 07/01/2015 04:39 PM, Stefan Hajnoczi wrote: > >>> On Thu, Jun 25, 2015 at 02:55:10PM +0800, Wen Congyang wrote: >

Re: [Qemu-devel] [RFC PATCH qemu v2 1/5] vfio: Switch from TARGET_PAGE_MASK to qemu_real_host_page_mask

2015-07-14 Thread Alexey Kardashevskiy
On 07/14/2015 04:58 PM, Alexey Kardashevskiy wrote: On 07/14/2015 05:13 AM, Alex Williamson wrote: On Tue, 2015-07-14 at 00:56 +1000, Alexey Kardashevskiy wrote: These started switching from TARGET_PAGE_MASK (hardcoded as 4K) to a real host page size: 4e51361d7 "cpu-all: complete "real" host pa

Re: [Qemu-devel] [PATCH v2] net: Flush queued packets when guest resumes

2015-07-14 Thread Stefan Hajnoczi
On Fri, Jul 10, 2015 at 05:03:22PM +0800, Fam Zheng wrote: > On Tue, 07/07 12:19, Michael S. Tsirkin wrote: > > On Tue, Jul 07, 2015 at 05:09:09PM +0800, Fam Zheng wrote: > > > On Tue, 07/07 11:13, Michael S. Tsirkin wrote: > > > > On Tue, Jul 07, 2015 at 09:21:07AM +0800, Fam Zheng wrote: > > > >

[Qemu-devel] [PATCH RFC for-2.4] hw: set DIRTY_MEMORY_VGA on RAM that can be used for the framebuffer

2015-07-14 Thread Paolo Bonzini
The pxa2xx_lcd, omap_lcdc, pl110 and milkymist-vgafb devices use framebuffer.c to render an image from a shared memory framebuffer. With KVM, DIRTY_MEMORY_VGA always had to be enabled explicitly on RAM memory regions that can be used for the framebuffer, and the 2.4 changes to dirty bitmap handling

[Qemu-devel] [RFC PATCH qemu v3 4/4] vfio: spapr: Add SPAPR IOMMU v2 support (DMA memory preregistering)

2015-07-14 Thread Alexey Kardashevskiy
This makes use of the new "memory registering" feature. The idea is to provide the userspace ability to notify the host kernel about pages which are going to be used for DMA. Having this information, the host kernel can pin them all once per user process, do locked pages accounting (once) and not s

[Qemu-devel] [RFC PATCH qemu v3 2/4] vfio: Use different page size for different IOMMU types

2015-07-14 Thread Alexey Kardashevskiy
The existing memory listener is called on RAM or PCI address space which implies potentially different page size. Instead of guessing what page size should be used, this replaces a single IOMMU memory listener by two, one per supported IOMMU type; listener callbacks call the existing helpers with a

[Qemu-devel] [RFC PATCH qemu v3 3/4] vfio: Store IOMMU type in container

2015-07-14 Thread Alexey Kardashevskiy
So far we were managing not to have an IOMMU type stored anywhere but since we are going to implement different behavior for different IOMMU types in the same memory listener, we need to know IOMMU type after initialization. This adds an IOMMU type into VFIOContainer and initializes it. This adds

[Qemu-devel] [RFC PATCH qemu v3 1/4] memory: Add reporting of supported page sizes

2015-07-14 Thread Alexey Kardashevskiy
Every IOMMU has some granularity which MemoryRegionIOMMUOps::translate uses when translating, however this information is not available outside the translate context for various checks. This adds a get_page_sizes callback to MemoryRegionIOMMUOps and a wrapper for it so IOMMU users (such as VFIO) c

[Qemu-devel] [RFC PATCH qemu v3 0/4] vfio: SPAPR IOMMU v2 (memory preregistration support)

2015-07-14 Thread Alexey Kardashevskiy
Yet another try, reworked the whole patchset. Here are few patches to prepare an existing listener for handling memory preregistration for SPAPR guests running on POWER8. This used to be a part of DDW patchset but now is separated as requested. Please comment. Thanks! Changes: v3: * removed in

Re: [Qemu-devel] [Qemu-block] [PATCH 1/3] blockjob: Introduce block_job_relax_cpu

2015-07-14 Thread Stefan Hajnoczi
On Fri, Jul 10, 2015 at 05:42:48AM +0200, Alexandre DERUMIER wrote: > >>By the way, why did you choose 10 milliseconds? That is quite long. > >> > >>If this function is called once per 10 ms disk I/O operations then we > >>lose 50% utilization. 1 ms or less would be reasonable. > > From my tests

Re: [Qemu-devel] [PATCH v7 34/42] Postcopy: Use helpers to map pages during migration

2015-07-14 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > In postcopy, the destination guest is running at the same time > as it's receiving pages; as we receive new pages we must put > them into the guests address space atomically to avoid a running > CPU accessing a partially w

Re: [Qemu-devel] [PATCH v7 35/42] Don't sync dirty bitmaps in postcopy

2015-07-14 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > Once we're in postcopy the source processors are stopped and memory > shouldn't change any more, so there's no need to look at the dirty > map. > > There are two notes to this: > 1) If we do resync and a page had changed

Re: [Qemu-devel] [Qemu-block] [PATCH 0/3] mirror: Fix guest responsiveness during bitmap scan

2015-07-14 Thread Stefan Hajnoczi
On Mon, Jul 13, 2015 at 01:08:37PM +0800, Fam Zheng wrote: > On Fri, 07/10 14:16, Alexandre DERUMIER wrote: > > So, I think patch 3/3 is enough. (could be great to have it for qemu 2.4) > > Stefan, are you happy with this series? I'll take Patch 3 for QEMU 2.4. This series should go via Jeff Cod

Re: [Qemu-devel] [PATCH v2] net: Flush queued packets when guest resumes

2015-07-14 Thread Michael S. Tsirkin
On Tue, Jul 14, 2015 at 01:20:03PM +0100, Stefan Hajnoczi wrote: > On Fri, Jul 10, 2015 at 05:03:22PM +0800, Fam Zheng wrote: > > On Tue, 07/07 12:19, Michael S. Tsirkin wrote: > > > On Tue, Jul 07, 2015 at 05:09:09PM +0800, Fam Zheng wrote: > > > > On Tue, 07/07 11:13, Michael S. Tsirkin wrote: >

[Qemu-devel] [PATCH] vnc: fix vnc client authentication

2015-07-14 Thread Wolfgang Bumiller
Commit 800567a61 updated the code to the generic crypto API and mixed up encrypt and decrypt functions in procotol_client_auth_vnc. (Used to be: deskey(key, EN0) which encrypts, and was changed to qcrypto_cipher_decrypt in 800567a61.) Changed it to qcrypto_cipher_encrypt now. Signed-off-by: Wolfga

Re: [Qemu-devel] [PATCH v4 4/7] pc: fix QEMU crashing when more than ~50 memory hotplugged

2015-07-14 Thread Igor Mammedov
On Mon, 13 Jul 2015 23:14:37 +0300 "Michael S. Tsirkin" wrote: > On Mon, Jul 13, 2015 at 08:55:13PM +0200, Igor Mammedov wrote: > > On Mon, 13 Jul 2015 09:55:18 +0300 > > "Michael S. Tsirkin" wrote: > > > > > On Fri, Jul 10, 2015 at 12:12:36PM +0200, Igor Mammedov wrote: > > > > On Thu, 9 Jul 2

Re: [Qemu-devel] [PATCH v7 35/42] Don't sync dirty bitmaps in postcopy

2015-07-14 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > "Dr. David Alan Gilbert (git)" wrote: > > From: "Dr. David Alan Gilbert" > > > > Once we're in postcopy the source processors are stopped and memory > > shouldn't change any more, so there's no need to look at the dirty > > map. > > > > There are two

Re: [Qemu-devel] [PATCH v4 4/7] pc: fix QEMU crashing when more than ~50 memory hotplugged

2015-07-14 Thread Michael S. Tsirkin
On Tue, Jul 14, 2015 at 03:02:44PM +0200, Igor Mammedov wrote: > On Mon, 13 Jul 2015 23:14:37 +0300 > "Michael S. Tsirkin" wrote: > > > On Mon, Jul 13, 2015 at 08:55:13PM +0200, Igor Mammedov wrote: > > > On Mon, 13 Jul 2015 09:55:18 +0300 > > > "Michael S. Tsirkin" wrote: > > > > > > > On Fri,

  1   2   3   >