Re: [Qemu-devel] [Qemu-trivial] [PATCH] qemu-options.hx: fix typo about l2tpv3

2014-08-13 Thread Michael Tokarev
Applied to -trivial, thank you! /mjt

[Qemu-devel] [PATCH] qemu-options.hx: fix typo about l2tpv3

2014-08-13 Thread arei.gonglei
From: Gonglei two duplicate destport description. s/destport/srcport/, s/destination/source/ Signed-off-by: Gonglei --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index 96516c1..ebdffeb 100644 --- a/qemu-options.hx +++

Re: [Qemu-devel] [PATCH] mlock: fix bug when mlockall called before mbind

2014-08-13 Thread zhanghailiang
On 2014/8/13 19:50, Michael S. Tsirkin wrote: On Wed, Aug 13, 2014 at 07:21:57PM +0800, zhanghailiang wrote: If we configure qemu with realtime-mlock-on and memory-node-bind at the same time, Qemu will fail to start, and mbind() fails with message "Input/output error". > From man page: int mbi

[Qemu-devel] [PATCH 3/3] virtio-net: Remove checking vm state in virtio_net_can_receive

2014-08-13 Thread zhanghailiang
We will check vm-running state in the generic net layer. Also we have to flush queues in nic_vmstate_change_handler() when vm state changes to run. The check here will prevent the flushing process, because we will check the return value of virtio_net_can_receive in nic_vmstate_change_handler, When

[Qemu-devel] [PATCH 1/3] net: Forbid dealing with packets when VM is not running

2014-08-13 Thread zhanghailiang
For all NICs(except virtio-net) emulated by qemu, Such as e1000, rtl8139, pcnet and ne2k_pci, Qemu can still receive packets when VM is not running. If this happened in *migration's* last PAUSE VM stage, The new dirty RAM related to the packets will be missed, And this will lead serious network fa

[Qemu-devel] [PATCH 2/3] net: Flush queues when runstate changes back to running

2014-08-13 Thread zhanghailiang
When the runstate changes back to running, we definitely need to flush queues to get packets flowing again. Here we implement this in the net layer: (1) add a member 'VMChangeStateEntry *vmstate' to struct NICState, Which will listen for VM runstate changes. (2) Register a handler function for VMs

[Qemu-devel] [RFC V2 7/8] throttle: Add throttle group support

2014-08-13 Thread Benoît Canet
The throttle group support use a cooperative round robin scheduling algorithm. The principle of the algorithm are simple: - Each BDS of the group is used as a token in a circular way. - The active BDS compute if a wait must be done and arm the right timer. - If a wait must be done the token timer

[Qemu-devel] [RFC V2 3/8] throttle: Add throttle group infrastructure tests

2014-08-13 Thread Benoît Canet
Signed-off-by: Benoit Canet --- tests/test-throttle.c | 51 +++ 1 file changed, 51 insertions(+) diff --git a/tests/test-throttle.c b/tests/test-throttle.c index 66e4982..50e6655 100644 --- a/tests/test-throttle.c +++ b/tests/test-throttle.c @@ -14

[Qemu-devel] [RFC V2 6/8] throttle: Add a way to fire one of the timers asap like a bottom half

2014-08-13 Thread Benoît Canet
This will be needed by the group throttling algorithm. Signed-off-by: Benoit Canet --- include/qemu/throttle.h | 2 ++ util/throttle.c | 11 +++ 2 files changed, 13 insertions(+) diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h index 3a16c48..3b9d1b8 100644 --- a/

[Qemu-devel] QEMU, self-modifying code, and Windows 7 64-bit (no KVM)

2014-08-13 Thread Hulin, Patrick - 0559 - MITLL
Hi QEMU devs, QEMU 2.10 does not currently run Windows 7 64-bit without KVM. There have been a few threads about this over the past few years (such as  https://bugs.launchpad.net/qemu/+bug/921208 and  http://lists.gnu.org/archive/html/qemu-devel/2012-09/msg02603.html), but the problem was never

[Qemu-devel] [RFC V2 1/8] throttle: Extract timers from ThrottleState into a separate ThrottleTimers structure

2014-08-13 Thread Benoît Canet
Group throttling will share ThrottleState between multiple bs. As a consequence the ThrottleState will be accessed by multiple aio context. Timers are tied to their aio context so they must go out of the ThrottleState structure. This commit pave the way for each bs of a common ThrottleState to h

[Qemu-devel] [RFC V2 8/8] throttle: Update throttle infrastructure copyright

2014-08-13 Thread Benoît Canet
Signed-off-by: Benoit Canet --- include/qemu/throttle.h | 4 ++-- tests/test-throttle.c | 4 ++-- util/throttle.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h index 3b9d1b8..8abd94d 100644 --- a/include/qemu/t

[Qemu-devel] [RFC V2 5/8] throttle: Add a way to know if throttle_schedule_timer had armed a timer

2014-08-13 Thread Benoît Canet
This will be needed by the group throttling patches for the algorithm to be accurate. Signed-off-by: Benoit Canet --- block.c | 7 +-- include/qemu/throttle.h | 3 ++- util/throttle.c | 12 +++- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a

[Qemu-devel] [RFC V2 4/8] throttle: Prepare to have multiple timers for one ThrottleState

2014-08-13 Thread Benoît Canet
This patch transform the timer_pending call into two boolean values in the ThrottleState structure. This way we are sure that when multiple timers will be used only one can be armed at a time. Signed-off-by: Benoit Canet --- block.c | 2 ++ include/qemu/throttle.h | 3 +++ uti

[Qemu-devel] [RFC V2 2/8] throttle: Add throttle group infrastructure

2014-08-13 Thread Benoît Canet
The throttle_group_incref increment the refcount of a throttle group given it's name and return the associated throttle state. The throttle_group_unref is the mirror function for cleaning up. Signed-off-by: Benoit Canet --- block/Makefile.objs | 1 + block/throttle-groups.c

[Qemu-devel] [RFC V2 0/8] Throttle group cooperative round robin scheduling

2014-08-13 Thread Benoît Canet
Hi, Here is my current wip on the throttle group support. For the user interface I implemented Stefanha's idea proposed in Stuttgart. For the throttling algorithm I use a cooperative round robin scheduler. Classical round robin works with a fixed HZ ticks and it's totaly incompatible with the t

[Qemu-devel] [PATCH 1/1] add loopback for virtio-net

2014-08-13 Thread Hengjinxiao
Sometimes it is necessary to test whether virtio-net can send and receive packets normally, just as e1000 does. This patch adds loopback for virtio-net, when the command 'VIRTIO_NET_CTRL_LOOPBACK_SET' is sent from front-end driver(such as virtio-net driver in linux.git), virtio-net goes into loop

Re: [Qemu-devel] Bug#757927: [qemu-kvm] TRIM (discard=unmap) broken in 2.1

2014-08-13 Thread Roman Mamedov
On Wed, 13 Aug 2014 10:05:51 +0400 Michael Tokarev wrote: > BTW, I found a system here with an SSD which supports discard, and tried my > guests against it -- everything works fine when I use sata/ahci, but it breaks > indeed when using the default IDE interface. Hello, Thanks for working on th

[Qemu-devel] [PATCH 1/1] add loopback for virtio-net

2014-08-13 Thread Hengjinxiao
Sometimes it is necessary to test whether virtio-net can send and receive packets normally, just as e1000 does. This patch adds loopback for virtio-net, when the command 'VIRTIO_NET_CTRL_LOOPBACK_SET' is sent from front-end driver(such as virtio-net driver in linux.git), virtio-net goes into loop

[Qemu-devel] [PATCH 0/3] forbid dealing with net packets when VM is not running

2014-08-13 Thread zhanghailiang
Hi, For all NICs (except virtio-net) emulated by qemu,such as e1000, rtl8139, pcnet and ne2k_pci, Qemu can still receive packets when VM is not running. If this happened in *migration's* last PAUSE VM stage, The new dirty RAM related to the packets will be missed, And this will lead serious netw

Re: [Qemu-devel] [PATCH] spapr: Make machine naming conventions closer to those for PC

2014-08-13 Thread David Gibson
On Wed, Aug 13, 2014 at 03:10:02PM +0200, Andreas Färber wrote: > Hi, > > Am 13.08.2014 03:23, schrieb David Gibson: > > As of qemu-2.1, spapr/pseries, has a set of versioned machine classes to > > represent the machine type as it appeared to the guest in different qemu > > versions. This allows

Re: [Qemu-devel] Microcheckpointing: Memory-VCPU / Disk State consistency

2014-08-13 Thread Michael R. Hines
On 08/13/2014 10:03 PM, Walid Nouri wrote: While looking to find some ideas for approaches to replicating block devices I have read the paper about the Remus implementation. I think MC can take a similar approach for local disk. I agree. Here are the main facts that I have understood: L

[Qemu-devel] [PATCH v3 2/2] memory: remove object_property_add_child_array

2014-08-13 Thread Peter Crosthwaite
Obsoleted by automatic object_property_add arrayification. Reviewed-by: Paolo Bonzini Signed-off-by: Peter Crosthwaite --- memory.c | 30 +- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/memory.c b/memory.c index 64d7176..5272bf9 100644 --- a/memory

[Qemu-devel] [PATCH v3 1/2] qom: object_property_add: Add automatic arrayification

2014-08-13 Thread Peter Crosthwaite
If "[*]" is given as the last part of a QOM property name, treat that as an array property. The added property is given the first available name, replacing the * with a decimal number counting from 0. First add with name "foo[*]" will be "foo[0]". Second "foo[1]" and so on. Callers may inspect th

Re: [Qemu-devel] [PATCH] spapr: Make machine naming conventions closer to those for PC

2014-08-13 Thread David Gibson
On Wed, Aug 13, 2014 at 01:14:23PM +0200, Markus Armbruster wrote: > David Gibson writes: > > > As of qemu-2.1, spapr/pseries, has a set of versioned machine classes to > > represent the machine type as it appeared to the guest in different qemu > > versions. This allows for safe migration of gu

Re: [Qemu-devel] The status about vhost-net on kvm-arm?

2014-08-13 Thread Li Liu
On 2014/8/13 19:25, Nikolay Nikolaev wrote: > On Wed, Aug 13, 2014 at 12:10 PM, Nikolay Nikolaev > wrote: >> On Tue, Aug 12, 2014 at 6:47 PM, Nikolay Nikolaev >> wrote: >>> >>> Hello, >>> >>> >>> On Tue, Aug 12, 2014 at 5:41 AM, Li Liu wrote: Hi all, Is anyone there can tel

Re: [Qemu-devel] disk image: self-organized format or raw file

2014-08-13 Thread Xingbo Wu
On Wed, Aug 13, 2014 at 5:04 PM, Xingbo Wu wrote: > On Wed, Aug 13, 2014 at 2:32 PM, Kevin Wolf wrote: >> Am 13.08.2014 um 18:38 hat Xingbo Wu geschrieben: >>> On Wed, Aug 13, 2014 at 11:54 AM, Kevin Wolf wrote: >>> > Am 12.08.2014 um 01:38 hat 吴兴博 geschrieben: >>> >> Hello, >>> >> >>> >> The

Re: [Qemu-devel] [PATCH qom v2 1/2] qom: object_property_add: Add automatic arrayification

2014-08-13 Thread Peter Crosthwaite
On Tue, Aug 12, 2014 at 9:36 PM, Andreas Färber wrote: > Am 04.08.2014 07:08, schrieb Peter Crosthwaite: >> If "[*]" is given as the last part of a QOM property name, treat that >> as an array property. The added property is given the first available >> name, replacing the * with a decimal number

Re: [Qemu-devel] [v5][PATCH 0/4] xen: introduce new machine for IGD passthrough

2014-08-13 Thread Chen, Tiejun
Michael, Any further comments to this revision? Thanks Tiejun On 2014/8/12 17:49, Tiejun Chen wrote: v5: * Simplify to make sure its really inherited from the standard one in patch #3 * Then drop the original patch #3 v4: * Rebase on latest tree * Drop patch #2 * Regenerate patches after Mi

Re: [Qemu-devel] [PATCH v1] test-coroutine: test cost introduced by coroutine

2014-08-13 Thread Ming Lei
On Wed, Aug 13, 2014 at 10:27 PM, Benoît Canet wrote: > The Wednesday 13 Aug 2014 à 18:08:47 (+0800), Ming Lei wrote : >> This test runs dummy function with coroutine by using >> two enter and one yield since which is a common usage. >> >> So we can see the cost introduced by corouting for running

[Qemu-devel] wiki account

2014-08-13 Thread Choonho Son
Hello, I wish to propose dynamic rebase of disk image, and upload some ideas. Can someone create me an account? Regards, Choonho Son

Re: [Qemu-devel] [PATCH v5] implementing victim TLB for QEMU system emulated TLB

2014-08-13 Thread Xin Tong
someone please reviews the patch when have time. Thanks a lot, Xin On Mon, Aug 4, 2014 at 8:37 PM, Xin Tong wrote: > Sorry for the absence. Forgot the patch in submission till then. I rebased > the patch to the newest QEMU git repository and retook the performance > improvement data. Please re

Re: [Qemu-devel] [PATCH] x86: Reset MTRR on vCPU reset

2014-08-13 Thread Laszlo Ersek
On 08/14/14 01:17, Laszlo Ersek wrote: > - With KVM, the lack of loading MTRR state from KVM, combined with the > (partial) storing of MTRR state to KVM, has two consequences: > - migration invalidates (loses) MTRR state, I'll concede that migration *already* loses MTRR state (on KVM), even b

Re: [Qemu-devel] [PATCH] x86: Reset MTRR on vCPU reset

2014-08-13 Thread Laszlo Ersek
On 08/14/14 00:06, Alex Williamson wrote: > On Wed, 2014-08-13 at 22:33 +0200, Laszlo Ersek wrote: >> a number of comments -- feel free to address or ignore each as you see fit: >> >> On 08/13/14 21:09, Alex Williamson wrote: >>> mappings which are now stale after reset. The result is that OVMF >

Re: [Qemu-devel] [PATCH] x86: Reset MTRR on vCPU reset

2014-08-13 Thread Alex Williamson
On Wed, 2014-08-13 at 22:33 +0200, Laszlo Ersek wrote: > a number of comments -- feel free to address or ignore each as you see fit: > > On 08/13/14 21:09, Alex Williamson wrote: > > The SDM specifies (June 2014 Vol3 11.11.5): > > > > On a hardware reset, the P6 and more recent processors cle

Re: [Qemu-devel] [PATCH v4 07/11] libqos: Added basic virtqueue support to virtio implementation

2014-08-13 Thread Marc Marí
El Wed, 13 Aug 2014 18:27:40 +0100 Stefan Hajnoczi escribió: > > +void qvring_init(const QGuestAllocator *alloc, QVirtQueue *vq, > > uint64_t addr) +{ > > +int i; > > + > > +vq->desc = addr; > > +vq->avail = vq->desc + vq->size*sizeof(QVRingDesc); > > +vq->used = (uint64_t)((vq->av

[Qemu-devel] [PATCH v3 27/32] ahci: Add test_pci_spec to ahci-test.

2014-08-13 Thread John Snow
Adds a specification adherence test for AHCI where the boot-up values for the PCI configuration space are compared against the AHCI 1.3 specification. This test does not itself attempt to engage the device. Signed-off-by: John Snow --- tests/ahci-test.c | 305 +++

[Qemu-devel] [PATCH v3 30/32] ahci: Add test_hba_spec to ahci-test.

2014-08-13 Thread John Snow
Add a test routine that checks the boot-up values of the HBA configuration memory space against the AHCI 1.3 specification and Intel ICH9 data sheet (for Q35 machines) for adherence and sane values. The HBA is not yet engaged or put into the idle state. Signed-off-by: John Snow --- tests/ahci-t

[Qemu-devel] [PATCH v3 32/32] ahci: Add test_identify case to ahci-test.

2014-08-13 Thread John Snow
Utilizing all of the bring-up code in pci_enable and hba_enable, this test issues a simple IDENTIFY command via the HBA and retrieves the response via the PIO receive mechanisms of the HBA. Bugs: The DPS interrupt (Descriptor Processed Status) does not currently get set. This will need to be adjus

[Qemu-devel] [PATCH v3 28/32] ahci: add test_pci_enable to ahci-test.

2014-08-13 Thread John Snow
This adds a test wherein we engage the PCI AHCI device and ensure that the memory region for the HBA functionality is now accessible. Under Q35 environments, additional PCI configuration is performed to ensure that the HBA functionality will become usable. Signed-off-by: John Snow --- tests/ahc

[Qemu-devel] [PATCH v3 26/32] ahci: MSI capability should be at 0x80, not 0x50.

2014-08-13 Thread John Snow
In the Intel ICH9 data sheet, the MSI capability offset in the PCI configuration space for ICH9 AHCI devices is specified to be 0x80. Further, the PCI capability pointer should always point to 0x80 in ICH9 devices, despite the fact that AHCI 1.3 specifies that it should be pointing to PMCAP (Which

[Qemu-devel] [PATCH v3 29/32] ahci: properly shadow the TFD register

2014-08-13 Thread John Snow
In a real AHCI device, several S/ATA registers are mirrored or shadowed within the AHCI register set. These registers are not updated synchronously for each read access, but rather after a Device-to-Host Register FIS packet is received, which contains the values from these registers on the device.

[Qemu-devel] [PATCH v3 25/32] ahci: Adding basic functionality qtest.

2014-08-13 Thread John Snow
Currently, there is no qtest to test the functionality of the AHCI functionality present within the Q35 machine type. This patch adds a skeleton for an AHCI test suite, and adds a simple sanity-check test case where we identify that the AHCI device is present, then disengage the virtual machine.

[Qemu-devel] [PATCH v3 31/32] ahci: Add test_hba_enable to ahci-test.

2014-08-13 Thread John Snow
This test engages the HBA functionality and initializes values to sane defaults to allow for minimal HBA functionality. Buffers are allocated and pointers are updated to allow minimal I/O commands to complete as expected. Error registers and responses are sanity checked for specification adherence

[Qemu-devel] [PATCH v3 00/32] AHCI test suite framework v3

2014-08-13 Thread John Snow
This submission does not re-send patches 1-24, which are identical to the v2 submission and have already been pulled onto stefanha's block staging branch. This patch series introduces a number of small fixes and tweaks to help support an AHCI test suite that in the future I hope to expand to a ful

Re: [Qemu-devel] disk image: self-organized format or raw file

2014-08-13 Thread Eric Blake
On 08/13/2014 03:04 PM, Xingbo Wu wrote: >>> I read several messages from this thread: "[RFC] qed: Add QEMU >>> Enhanced Disk format". To my understanding, if the new format can be >>> acceptable to the community: >>> It needs to retain all the key features provided by qcow2, >>> especially for

[Qemu-devel] [PATCH 0/8] qcow2: Fix image repairing

2014-08-13 Thread Max Reitz
As can be seen in the final patch of this series, there are certain cases where the current repair implementation of qcow2 actually damages the image further because it allocates new clusters for the refcount structure which overlap with existing but according to the on-disk refcounts (which are as

[Qemu-devel] [PATCH 8/8] iotests: Add test for potentially damaging repairs

2014-08-13 Thread Max Reitz
There are certain cases where repairing a qcow2 image might actually damage it further (or rather, where repairing it has in fact damaged it further with the old qcow2 check implementation). This should not happen, so add a test for these cases. Signed-off-by: Max Reitz --- tests/qemu-iotests/10

[Qemu-devel] [PATCH 1/8] qcow2: Factor out refcount accounting for check

2014-08-13 Thread Max Reitz
Put the code for calculating the reference counts during qemu-img check into an own function. Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 202 + 1 file changed, 122 insertions(+), 80 deletions(-) diff --git a/block/qcow2-refcount.c b/blo

Re: [Qemu-devel] disk image: self-organized format or raw file

2014-08-13 Thread Xingbo Wu
On Wed, Aug 13, 2014 at 2:32 PM, Kevin Wolf wrote: > Am 13.08.2014 um 18:38 hat Xingbo Wu geschrieben: >> On Wed, Aug 13, 2014 at 11:54 AM, Kevin Wolf wrote: >> > Am 12.08.2014 um 01:38 hat 吴兴博 geschrieben: >> >> Hello, >> >> >> >> The introduction in the wiki page present several advantages of

[Qemu-devel] [PATCH 5/8] qcow2: Rebuild refcount structure during check

2014-08-13 Thread Max Reitz
The previous commit introduced the "rebuild" variable to qcow2's implementation of the image consistency check. Now make use of this by adding a function which creates a completely new refcount structure based solely on the in-memory information gathered before. The old refcount structure will be

[Qemu-devel] [PATCH 7/8] iotests: Fix test outputs

2014-08-13 Thread Max Reitz
039, 060 and 061 all create images with referenced clusters having a refcount of 0. Because previous commits changed handling of such errors, these tests now have a different output. Fix it. Furthermore, 060 created a refblock with a refcount greater than one which now results in having to rebuild

[Qemu-devel] [PATCH 4/8] qcow2: Do not perform potentially damaging repairs

2014-08-13 Thread Max Reitz
If a referenced cluster has a refcount of 0, increasing its refcount may result in clusters being allocated for the refcount structures. This may overwrite the referenced cluster, therefore we cannot simply increase the refcount then. In such cases, we can either try to replicate all the refcount

[Qemu-devel] [PATCH 6/8] qcow2: Clean up after refcount rebuild

2014-08-13 Thread Max Reitz
Because the old refcount structure will be leaked after having rebuilt it, we need to recalculate the refcounts and run a leak-fixing operation afterwards. Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 33 + 1 file changed, 33 insertions(+) diff --git a/b

[Qemu-devel] [PATCH 3/8] qcow2: Fix refcount blocks beyond image end

2014-08-13 Thread Max Reitz
If the qcow2 check function detects a refcount block located beyond the image end, grow the image appropriately. This cannot break anything and is the logical fix for such a case. Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 50 ++ 1 file

[Qemu-devel] [PATCH 2/8] qcow2: Factor out refcount comparison for check

2014-08-13 Thread Max Reitz
Put the code for comparing the calculated refcounts against the on-disk refcounts during qemu-img check into an own function. Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 91 -- 1 file changed, 52 insertions(+), 39 deletions(-) diff --git

Re: [Qemu-devel] [PATCH] x86: Reset MTRR on vCPU reset

2014-08-13 Thread Laszlo Ersek
a number of comments -- feel free to address or ignore each as you see fit: On 08/13/14 21:09, Alex Williamson wrote: > The SDM specifies (June 2014 Vol3 11.11.5): > > On a hardware reset, the P6 and more recent processors clear the > valid flags in variable-range MTRRs and clear the E fl

Re: [Qemu-devel] [PATCH v5 06/10] hw/vfio: create common module

2014-08-13 Thread Alex Williamson
On Tue, 2014-08-12 at 08:09 +0200, Eric Auger wrote: > On 08/11/2014 09:25 PM, Alex Williamson wrote: > > On Sat, 2014-08-09 at 15:25 +0100, Eric Auger wrote: > >> diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h > >> new file mode 100644 > >> index 000..4684ee5 > >> -

Re: [Qemu-devel] using virtio-net multiqueues

2014-08-13 Thread William Dauchy
On Wed, Aug 13, 2014 at 8:03 PM, William Dauchy wrote: > during qemu startup I see several queues in > /sys/devices/virtual/net/vifA.0/queues and it quickly disappears; at > the end I see only one rx and one tx. > Am I wrong on something? What can I do to help debug this situation? finally found

[Qemu-devel] qemu 9p mapped-xattr model does not translate d_type in readdir

2014-08-13 Thread Michael Tokarev
There's another bugreport filed against debian qemu package, http://bugs.debian.org/755738 . It talks about security_model=mapped-xattr case, where file type is stored elsewhere, and all files are turned into regular files. http://bugs.debian.org/755738#10 is the proposed patch. Thanks, /mjt

[Qemu-devel] [V3 PATCH 10/13] linux-user: Minimum Sig Handler Stack Size for PPC64 ELF V2

2014-08-13 Thread Tom Musta
The ELF V2 ABI for PPC64 defines MINSIGSTKSZ as 4096 bytes whereas it was 2048 previously. Signed-off-by: Tom Musta --- V2: Define and use TARGET_MINSIGSTKSZ constants from the various linux-user/$ARCH/syscall.h files (per Peter Maydell's review). linux-user/aarch64/syscall.h|1 + linux

[Qemu-devel] [PATCH] x86: Reset MTRR on vCPU reset

2014-08-13 Thread Alex Williamson
The SDM specifies (June 2014 Vol3 11.11.5): On a hardware reset, the P6 and more recent processors clear the valid flags in variable-range MTRRs and clear the E flag in the IA32_MTRR_DEF_TYPE MSR to disable all MTRRs. All other bits in the MTRRs are undefined. We currently do none

[Qemu-devel] [V3 PATCH 13/13] linux-user: writev Partial Writes

2014-08-13 Thread Tom Musta
Although not technically not required by POSIX, the writev system call will typically write out its buffers individually. That is, if the first buffer is written successfully, but the second buffer pointer is invalid, then the first chuck will be written and its size is returned. Signed-off-by: T

[Qemu-devel] [V3 PATCH 09/13] linux-user: Move get_ppc64_abi

2014-08-13 Thread Tom Musta
The get_ppc64_abi is used to determine the ELF ABI (i.e. V1 or V2). This routine is currently implemented in the linux-user/elfload.c file but is useful in other scenarios. Move the routine to a more generally available location (linux-user/ppc/target_cpu.h). Signed-off-by: Tom Musta --- V3: new

[Qemu-devel] [V3 PATCH 11/13] linux-user: clock_nanosleep errno Handling on PPC

2014-08-13 Thread Tom Musta
The clock_nanosleep syscall is unusual in that it returns positive numbers in error handling situations, versus returning -1 and setting errno, or returning a negative errno value. On POWER, the kernel will set the SO bit of CR0 to indicate failure in a syscall. QEMU has generic handling to do th

[Qemu-devel] [V3 PATCH 08/13] linux-user: Detect fault in sched_rr_get_interval

2014-08-13 Thread Tom Musta
Properly detect a fault when attempting to store into an invalid struct timespec pointer. Signed-off-by: Tom Musta Reviewed-by: Peter Maydell --- V2: Peter has observed that there are other call sites that may need to be fixed. I will address that in future patch(es). linux-user/syscall.c |

[Qemu-devel] [V3 PATCH 07/13] linux-user: Handle NULL sched_param argument to sched_*

2014-08-13 Thread Tom Musta
The sched_getparam, sched_setparam and sched_setscheduler system calls take a pointer argument to a sched_param structure. When this pointer is null, errno should be set to EINVAL. Signed-off-by: Tom Musta --- V2: Including sched_setscheduler in the changes per Peter Maydell's review. linux-us

[Qemu-devel] [V3 PATCH 06/13] linux-user: Detect Negative Message Sizes in msgsnd System Call

2014-08-13 Thread Tom Musta
The msgsnd system call takes an argument that describes the message size (msgsz) and is of type size_t. The system call should set errno to EINVAL in the event that a negative message size is passed. Signed-off-by: Tom Musta Reviewed-by: Peter Maydell --- linux-user/syscall.c |6 +- 1

[Qemu-devel] [V3 PATCH 04/13] linux-user: Make ipc syscall's third argument an abi_long

2014-08-13 Thread Tom Musta
For those target ABIs that use the ipc system call (e.g. POWER), the third argument is used in the shmat path as a pointer. It therefore must be declared as an abi_long (versus int) so that the address bits are not lost in truncation. In fact, all arguments to do_ipc should be declared as abit_lo

[Qemu-devel] [V3 PATCH 03/13] linux-user: Properly Handle semun Structure In Cross-Endian Situations

2014-08-13 Thread Tom Musta
The semun union used in the semctl system call contains both an int (val) and pointers. In cross-endian situations on 64 bit targets, the value passed to semctl is an 8 byte (abi_long) value and thus does not have the 4-byte val field in the correct location. In order to rectify this, the other h

[Qemu-devel] [V3 PATCH 05/13] linux-user: Conditionally Pass Attribute Pointer to mq_open()

2014-08-13 Thread Tom Musta
The mq_open system call takes an optional struct mq_attr pointer argument in the fourth position. This pointer is used when O_CREAT is specified in the flags (second) argument. It may be NULL, in which case the queue is created with implementation defined attributes. Change the code to properly

[Qemu-devel] [V3 PATCH 12/13] linux-user: Support target-to-host translation of mlockall argument

2014-08-13 Thread Tom Musta
The argument to the mlockall system call is not necessarily the same on all platforms and thus may require translation prior to passing to the host. For example, PowerPC 64 bit platforms define values for MCL_CURRENT (0x2000) and MCL_FUTURE (0x4000) which are different from Intel platforms (0x1 an

[Qemu-devel] [V3 PATCH 02/13] linux-user: Dereference Pointer Argument to ipc/semctl Sys Call

2014-08-13 Thread Tom Musta
When the ipc system call is used to wrap a semctl system call, the ptr argument to ipc needs to be dereferenced prior to passing it to the semctl handler. This is because the fourth argument to semctl is a union and not a pointer to a union. Signed-off-by: Tom Musta --- V2: This is unchanged fr

[Qemu-devel] [V3 PATCH 01/13] linux-user: PPC64 semid_ds Doesnt Include _unused1 and _unused2

2014-08-13 Thread Tom Musta
The 64 bit PowerPC platforms eliminate the _unused1 and _unused2 elements of the semid_ds structure from . So eliminate these from the target_semid_ds structure. Signed-off-by: Tom Musta --- linux-user/syscall.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/linux-

[Qemu-devel] [V3 PATCH 00/13] target-ppc: Linux-User Mode Bug Fixes for Power

2014-08-13 Thread Tom Musta
This series of patches is the result of executing the Linux Test Program (LTP) System Call bucket (https://github.com/linux-test-project/ltp) on the 64 bit big and little endian linux user mode targets for Power. Some of the changes are not technically unique to Power, but are effectively so. For

Re: [Qemu-devel] [PATCH 1/1] add loopback for virtio-net

2014-08-13 Thread Michael S. Tsirkin
On Wed, Aug 13, 2014 at 09:47:40PM +0800, Hengjinxiao wrote: > Sometimes it is necessary to test whether virtio-net can send and receive > packets > normally, just as e1000 does. This patch adds loopback for virtio-net, when > the > command 'VIRTIO_NET_CTRL_LOOPBACK_SET' is sent from front-end dr

Re: [Qemu-devel] using virtio-net multiqueues

2014-08-13 Thread William Dauchy
On Wed, Aug 13, 2014 at 8:03 PM, William Dauchy wrote: > Using qemu2.1 I'm starting a vm with this network interface: > > [netdev "vifA.0"] > type = "tap" > vhost = "on" > ifname = "vifA.0" > downscript = "no" > script = "no" > queues = "2" > > [device "vifA.0"] > driver = "virtio-ne

Re: [Qemu-devel] disk image: self-organized format or raw file

2014-08-13 Thread Kevin Wolf
Am 13.08.2014 um 18:38 hat Xingbo Wu geschrieben: > On Wed, Aug 13, 2014 at 11:54 AM, Kevin Wolf wrote: > > Am 12.08.2014 um 01:38 hat 吴兴博 geschrieben: > >> Hello, > >> > >> The introduction in the wiki page present several advantages of qcow2 > >> [1]. > >> But I'm a little confused. I really

Re: [Qemu-devel] [PATCHv2 3/3] qemu-nbd: fix indentation and coding style

2014-08-13 Thread Eric Blake
On 08/13/2014 11:20 AM, Peter Lieven wrote: > Signed-off-by: Peter Lieven > --- > qemu-nbd.c | 75 > +++- > 1 file changed, 39 insertions(+), 36 deletions(-) Reviewed-by: Eric Blake Thanks for splitting the trivia from the meat in 2/3.

[Qemu-devel] using virtio-net multiqueues

2014-08-13 Thread William Dauchy
Hello, Using qemu2.1 I'm starting a vm with this network interface: [netdev "vifA.0"] type = "tap" vhost = "on" ifname = "vifA.0" downscript = "no" script = "no" queues = "2" [device "vifA.0"] driver = "virtio-net-pci" netdev = "vifA.0" mac = "00:16:3e:1a:4e:11" mq = "on" v

Re: [Qemu-devel] [PATCH v4 09/11] libqos: Added test case for configuration changes in virtio-blk test

2014-08-13 Thread Stefan Hajnoczi
On Tue, Aug 12, 2014 at 01:41:54PM +0200, Marc Marí wrote: > @@ -349,7 +359,7 @@ int main(int argc, char **argv) > g_test_init(&argc, &argv, NULL); > > g_test_add_func("/virtio/blk/pci/basic", pci_basic); > -g_test_add_func("/virtio/blk/pci/indirect", pci_indirect); > +g_test_ad

[Qemu-devel] [PATCHv2 0/3] qemu-nbd: add option to set detect-zeroes mode

2014-08-13 Thread Peter Lieven
v1->v2: - state that relaxing the license for qapi-util.c to LGPLv2+ was intentional [Eric] - split the qemu-nbd patch into 2 pieces [Eric] Peter Lieven (3): rename parse_enum_option to qapi_enum_parse and make it public qemu-nbd: add option to set detect-zeroes mode qemu-n

[Qemu-devel] [PATCH v2] ide: Add resize callback to ide/core

2014-08-13 Thread John Snow
Currently, if the block device backing the IDE drive is resized, the information about the device as cached inside of the IDEState structure is not updated, thus when a guest OS re-queries the drive, it is unable to see the expanded size. This patch adds a resize callback that updates the IDENTIFY

[Qemu-devel] [PATCHv2 1/3] rename parse_enum_option to qapi_enum_parse and make it public

2014-08-13 Thread Peter Lieven
relaxing the license to LGPLv2+ is intentional. Suggested-by: Markus Armbruster Signed-off-by: Hu Tao Signed-off-by: Peter Lieven Reviewed-by: Eric Blake --- blockdev.c | 30 ++ include/qapi/util.h | 17 + qapi/Makefile.objs |2 +-

Re: [Qemu-devel] [PATCH v4 07/11] libqos: Added basic virtqueue support to virtio implementation

2014-08-13 Thread Stefan Hajnoczi
On Tue, Aug 12, 2014 at 01:41:52PM +0200, Marc Marí wrote: > +/* Check power of 2 */ > +aux = vq->size; > +while ((aux & 1) != 0) { > +aux = aux >> 1; > +} > +g_assert_cmpint(aux, !=, 1); Power of 2 can be tested like this without a while loop: g_assert_cmpint(vq->size

[Qemu-devel] [PATCHv2 2/3] qemu-nbd: add option to set detect-zeroes mode

2014-08-13 Thread Peter Lieven
Signed-off-by: Peter Lieven Reviewed-by: Eric Blake --- qemu-nbd.c | 25 + 1 file changed, 25 insertions(+) diff --git a/qemu-nbd.c b/qemu-nbd.c index 626e584..6ef8b10 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -18,11 +18,13 @@ #include "qemu-common.h" #include "b

[Qemu-devel] [PATCHv2 3/3] qemu-nbd: fix indentation and coding style

2014-08-13 Thread Peter Lieven
Signed-off-by: Peter Lieven --- qemu-nbd.c | 75 +++- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index 6ef8b10..9bc152e 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -39,10 +39,10 @@ #include #

Re: [Qemu-devel] [PATCH v4 04/11] libqos: Correct mask to align size to PAGE_SIZE in malloc-pc

2014-08-13 Thread Stefan Hajnoczi
On Tue, Aug 12, 2014 at 01:41:49PM +0200, Marc Marí wrote: > Reviewed-by: John Snow > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Paolo Bonzini > Signed-off-by: Marc Marí > --- > tests/libqos/malloc-pc.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks, applied to my block

Re: [Qemu-devel] [PATCH v4 06/11] virtio-blk: Correct bug in support for flexible descriptor layout

2014-08-13 Thread Stefan Hajnoczi
On Tue, Aug 12, 2014 at 01:41:51PM +0200, Marc Marí wrote: > Without this correction, only a three descriptor layout is accepted, and > requests with just two descriptors are not completed and no error message is > displayed. > > Signed-off-by: Stefan Hajnoczi > Signed-off-by: Marc Marí > --- >

Re: [Qemu-devel] [PATCH v4 03/11] libqtest: add QTEST_LOG for debugging qtest testcases

2014-08-13 Thread Stefan Hajnoczi
On Tue, Aug 12, 2014 at 01:41:48PM +0200, Marc Marí wrote: > Signed-off-by: Paolo Bonzini > Signed-off-by: Marc Marí > --- > tests/libqtest.c |7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan

Re: [Qemu-devel] [PATCH v4 05/11] libqos: Change free function called in malloc

2014-08-13 Thread Stefan Hajnoczi
On Tue, Aug 12, 2014 at 01:41:50PM +0200, Marc Marí wrote: > Reviewed-by: John Snow > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Marc Marí > --- > tests/libqos/malloc.h |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks, applied to my block tree: https://github.com/stefanha/q

Re: [Qemu-devel] [PATCH v4 02/11] tests: Add virtio device initialization

2014-08-13 Thread Stefan Hajnoczi
On Tue, Aug 12, 2014 at 01:41:47PM +0200, Marc Marí wrote: > +static uint64_t qvirtio_pci_config_readq(QVirtioDevice *d, void *addr) > +{ > +QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d; > +return qpci_io_readl(dev->pdev, addr) | qpci_io_readl(dev->pdev, addr+4); This is broken because it

Re: [Qemu-devel] [PATCH v4 01/11] tests: Functions bus_foreach and device_find from libqos virtio API

2014-08-13 Thread Stefan Hajnoczi
On Tue, Aug 12, 2014 at 01:41:46PM +0200, Marc Marí wrote: > Virtio header has been changed to compile and work with a real device. > Functions bus_foreach and device_find have been implemented for PCI. > Virtio-blk test case now opens a fake device. > > Signed-off-by: Marc Marí > --- > tests/Ma

Re: [Qemu-devel] [PATCH v4 03/11] libqtest: add QTEST_LOG for debugging qtest testcases

2014-08-13 Thread Stefan Hajnoczi
On Tue, Aug 12, 2014 at 01:41:48PM +0200, Marc Marí wrote: > Signed-off-by: Paolo Bonzini > Signed-off-by: Marc Marí > --- > tests/libqtest.c |7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi pgpP3YN3tB85y.pgp Description: PGP signature

Re: [Qemu-devel] disk image: self-organized format or raw file

2014-08-13 Thread Xingbo Wu
On Wed, Aug 13, 2014 at 11:54 AM, Kevin Wolf wrote: > Am 12.08.2014 um 01:38 hat 吴兴博 geschrieben: >> Hello, >> >> The introduction in the wiki page present several advantages of qcow2 [1]. >> But I'm a little confused. I really appreciate if any one can give me some >> help >> on this :). >> >>

Re: [Qemu-devel] [PATCH v2] target-sparc64: implement Short Floating-Point Store Instructions

2014-08-13 Thread Richard Henderson
On 08/12/2014 10:02 AM, Artyom Tarasenko wrote: > Implement Short Floating-Point Store Instructions as described > in the chapter 13.5.2 of UltraSPARC-IIi User's Manual. > > Particularly this instructions are used by NetBSD 4.0.1+ /sparc64 > > Signed-off-by: Artyom Tarasenko > Tested-by: Mark Ca

[Qemu-devel] [PATCH] hw/intc/arm_gic: honor target mask in gic_update()

2014-08-13 Thread Sergey Fedorov
Take IRQ target mask into account when determining the highest priority pending interrupt. Signed-off-by: Sergey Fedorov --- hw/intc/arm_gic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c index 1532ef9..a5ad7b9 100644 --- a/hw/intc/a

Re: [Qemu-devel] disk image: self-organized format or raw file

2014-08-13 Thread Kevin Wolf
Am 12.08.2014 um 01:38 hat 吴兴博 geschrieben: > Hello, > >   The introduction in the wiki page present several advantages of qcow2 [1]. > But I'm a little confused. I really appreciate if any one can give me some > help > on this :). > >  (1) Currently the raw format doesn't support COW. In other

[Qemu-devel] [PATCH v3] block.curl: timeout option

2014-08-13 Thread Daniel Henrique Barboza
Changes in v3: - changed option name from 'curltimeout' to 'timeout' Changes in v2: - remove double quote from the int value in qemu-options.hx Daniel Henrique Barboza (1): block.curl: adding 'timeout' option block/curl.c| 13 - qemu-options.hx | 10 -- 2 files changed

[Qemu-devel] [PATCH v3] block.curl: adding 'timeout' option

2014-08-13 Thread Daniel Henrique Barboza
The curl hardcoded timeout (5 seconds) sometimes is not long enough depending on the remote server configuration and network traffic. The user should be able to set how much long he is willing to wait for the connection. Adding a new option to set this timeout gives the user this flexibility. The

  1   2   >