[Qemu-devel] [PATCH RFC v2 32/47] qapi-event: Convert to QAPISchemaVisitor, fixing data with base

2015-07-01 Thread Markus Armbruster
Fixes events whose data is struct with base to include the struct's base members. Test case is qapi-schema-test.json's event __org.qemu_x-command: { 'event': '__ORG.QEMU_X-EVENT', 'data': '__org.qemu_x-Struct' } { 'struct': '__org.qemu_x-Struct', 'base': '__org.qemu_x-Base', 'data'

[Qemu-devel] [PATCH RFC v2 13/47] tests/qapi-schema: Restore test case for flat union base bug

2015-07-01 Thread Markus Armbruster
Test case added in commit 2fc0043, and messed up in commit 5223070. Signed-off-by: Markus Armbruster --- tests/qapi-schema/qapi-schema-test.json | 5 +++-- tests/qapi-schema/qapi-schema-test.out | 8 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/qapi-schema/qapi-

[Qemu-devel] virtio-blk multiqueue support in qemu.

2015-07-01 Thread Naredula Janardhana Reddy
HI, I am trying to improve the throughput of virtio-blk for my kernel ( https://github.com/naredula-jana/Jiny-Kernel ) to make use of the multi-core using multi-queue. But I found the latest qemu does not support multiqueue for virtio-blk, The feature flag does not return multi-queue suppo

[Qemu-devel] [PATCH RFC v2 20/47] qapi: Rename class QAPISchema to QAPISchemaParser

2015-07-01 Thread Markus Armbruster
I want to name a new class QAPISchema. While there, make it a new-style class. Signed-off-by: Markus Armbruster --- scripts/qapi.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index bebaecc..390ccd0 100644 --- a/scripts/qapi.py +

[Qemu-devel] [PATCH RFC v2 00/47] qapi: QMP introspection

2015-07-01 Thread Markus Armbruster
Still RFC, because it has a couple of FIXMEs and TODOs. * PATCH 01-19 are preliminary fixes and cleanups. Not really RFC. * PATCH 20-38 basically replace the interemediate representation. The replacement isn't complete, but fully functional. See PATCH 21 for rationale and future work. * P

[Qemu-devel] [PATCH RFC v2 29/47] qapi: Replace dirty is_c_ptr() by method c_null()

2015-07-01 Thread Markus Armbruster
is_c_ptr() looks whether the end of the C text for the type looks like a pointer. Works, but is fragile. We now have a better tool: use QAPISchemaType method c_null(). The initializers for non-pointers become prettier: 0, false or the enumeration constant with the value 0 instead of {0}. One pl

[Qemu-devel] [PATCH RFC v2 05/47] qapi: Reject -p arguments that break qapi-event.py

2015-07-01 Thread Markus Armbruster
qapi-event.py breaks when you ask for a funny prefix like '@'. Protect it. Signed-off-by: Markus Armbruster --- scripts/qapi.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/scripts/qapi.py b/scripts/qapi.py index 2bbc8ff..ea94ce5 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@

[Qemu-devel] [PATCH RFC v2 02/47] qapi: Clean up cgen() and mcgen()

2015-07-01 Thread Markus Armbruster
Commit 05dfb26 added eatspace stripping to mcgen(). Move it to cgen(), just in case somebody gets tempted to use cgen() directly instead of via mcgen(). cgen() indents blank lines. No such lines get generated right now, but fix it anyway. We use triple-quoted strings for program text, like this

[Qemu-devel] [PATCH RFC v2 01/47] qapi: Clarify docs on including the same file multiple times

2015-07-01 Thread Markus Armbruster
It's idempotent. Signed-off-by: Markus Armbruster --- docs/qapi-code-gen.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-gen.txt index 61b5be4..17588c1 100644 --- a/docs/qapi-code-gen.txt +++ b/docs/qapi-code-gen.txt @@ -163,7 +163,

[Qemu-devel] [PATCH RFC v2 07/47] qapi: Generate a nicer struct for flat unions

2015-07-01 Thread Markus Armbruster
The struct generated for a flat union is weird: the members of its base are at the end, except for the union tag, which is renamed to 'kind' and put at the beginning. Example: qapi-schema-test.json has { 'struct': 'UserDefUnionBase', 'data': { 'string': 'str', 'enum1': 'EnumOne' } }

[Qemu-devel] [PATCH RFC v2 04/47] qapi-event: Clean up how name of enum QAPIEvent is made

2015-07-01 Thread Markus Armbruster
Use c_name() instead of ad hoc code. Doesn't upcase the -p prefix, which is an improvement in my book. Unbreaks prefix containing '.', but other funny characters remain broken. To be fixed next. Signed-off-by: Markus Armbruster --- scripts/qapi-event.py | 2 +- tests/test-qmp-event.c | 2 +-

[Qemu-devel] [PATCH RFC v2 14/47] qapi-tests: New tests for union, alternate command arguments

2015-07-01 Thread Markus Armbruster
A command's 'data' must be a struct type, given either as a dictionary, or as struct type name. Existing test case data-int.json covers simple type 'int'. Add test cases for type names referring to union and alternate types. The latter is caught (good), but the former is not (bug). Signed-off-b

[Qemu-devel] [PATCH RFC v2 03/47] qapi: Simplify guardname()

2015-07-01 Thread Markus Armbruster
The guards around built-in declarations lose their _H. It never made much sense anyway. Signed-off-by: Markus Armbruster --- scripts/qapi.py | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index 20383ef..2bbc8ff 100644 --- a/scrip

[Qemu-devel] [PATCH RFC v2 11/47] tests/qapi-schema: Document alternate's enum lacks visit function

2015-07-01 Thread Markus Armbruster
We generate a declaration, but no definition. The QMP schema has two: Qcow2OverlapChecks and BlockdevRef. Neither visit_type_Qcow2OverlapChecksKind() nor visit_type_BlockdevRefKind() is actually used. Signed-off-by: Markus Armbruster --- tests/qapi-schema/qapi-schema-test.json | 1 + 1 file ch

[Qemu-devel] [PATCH RFC v2 09/47] qapi-visit: Replace list implicit_structs by set

2015-07-01 Thread Markus Armbruster
Use set because that's what it is. While there, rename to implicit_structs_seen. Signed-off-by: Markus Armbruster --- scripts/qapi-visit.py | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/qapi-visit.py b/scripts/qapi-visit.py index b3a308f..9fc040e 100644 ---

[Qemu-devel] [PATCH RFC v2 12/47] tests/qapi-schema: Document events with with base don't work

2015-07-01 Thread Markus Armbruster
When event FOO's 'data' is a struct with a base, we consider only the struct's direct members, and ignore its base. The generated qapi_event_send_foo() doesn't take arguments for base members. No such events currently exist in the QMP schema. Signed-off-by: Markus Armbruster --- tests/qapi-sch

Re: [Qemu-devel] [PATCH] linux-user: Avoid compilation error with --disable-guest-base

2015-07-01 Thread Aurelien Jarno
On 2015-07-01 20:21, Laurent Vivier wrote: > > > Le 01/07/2015 15:15, Aurelien Jarno a écrit : > > On 2015-07-01 01:58, Laurent Vivier wrote: > >> > >> > >> Le 30/06/2015 19:20, Peter Maydell a écrit : > >>> On 30 June 2015 at 18:13, Laurent Vivier wrote: > > > Le 30/06/2015 18:45

Re: [Qemu-devel] [PATCH 1/1] block: update BlockDriverState's children in bdrv_set_backing_hd()

2015-07-01 Thread Alberto Garcia
On Wed 01 Jul 2015 06:05:32 PM CEST, Max Reitz wrote: >> @@ -1120,6 +1128,11 @@ void bdrv_set_backing_hd(BlockDriverState *bs, >> BlockDriverState *backing_hd) >> bs->backing_blocker = NULL; >> goto out; >> } >> + >> +bdrv_attach_child(bs, backing_hd, &child_backing

Re: [Qemu-devel] [RFC PATCH COLO v2 00/13] Block replication for continuous checkpoints

2015-07-01 Thread Michael R. Hines
On 06/30/2015 11:11 PM, Wen Congyang wrote: On 07/01/2015 11:09 AM, Michael R. Hines wrote: On 03/25/2015 04:36 AM, Wen Congyang wrote: Block replication is a very important feature which is used for continuous checkpoints(for example: COLO). Usage: Please refer to docs/block-replication.txt

Re: [Qemu-devel] [RFC PATCH COLO v2 00/13] Block replication for continuous checkpoints

2015-07-01 Thread Michael R. Hines
On 06/30/2015 11:11 PM, Wen Congyang wrote: On 07/01/2015 11:09 AM, Michael R. Hines wrote: On 03/25/2015 04:36 AM, Wen Congyang wrote: Block replication is a very important feature which is used for continuous checkpoints(for example: COLO). Usage: Please refer to docs/block-replication.txt

Re: [Qemu-devel] [Qemu-discuss] GRO not happening in VM with VxLAN

2015-07-01 Thread Santosh R
I am using 3.18 kernel. #uname -a Linux Indra.asicdesigners.com 3.18.0 #11 SMP Wed Jul 1 21:49:44 IST 2015 x86_64 x86_64 x86_64 GNU/Linux #cat /etc/issue Red Hat Enterprise Linux Server release 6.5 (Santiago) Kernel \r on an \m As mentioned in my initial post, this is how I am starting the VM. Ho

Re: [Qemu-devel] [Qemu-discuss] GRO not happening in VM with VxLAN

2015-07-01 Thread Vlad Yasevich
On 07/01/2015 02:50 PM, Santosh R wrote: > Since the vxlan UDP header checksum is 0, udp_tunnel_gro_complete (called > via vxlan_gro_complete) is setting SKB_GSO_UDP_TUNNEL in > skb_shinfo(skb)->gso_type. > Later when bridge interface tries to forward this packet to tap interface > (br_dev_queue_pu

[Qemu-devel] [PATCH v5] pci : Add pba_offset PCI quirk for Chelsio T5 devices

2015-07-01 Thread Gabriel Laupre
Fix pba_offset initialization value for Chelsio T5 Virtual Function device. The T5 hardware has a bug in it where it reports a Pending Interrupt Bit Array Offset of 0x8000 for its SR-IOV Virtual Functions instead of the 0x1000 that the hardware actually uses internally. As the hardware doesn't retu

Re: [Qemu-devel] [Qemu-discuss] GRO not happening in VM with VxLAN

2015-07-01 Thread Santosh R
Since the vxlan UDP header checksum is 0, udp_tunnel_gro_complete (called via vxlan_gro_complete) is setting SKB_GSO_UDP_TUNNEL in skb_shinfo(skb)->gso_type. Later when bridge interface tries to forward this packet to tap interface (br_dev_queue_push_xmit -> __dev_queue_xmit -> validate_xmit_skb) n

Re: [Qemu-devel] [Qemu-block] [PATCH COLO-Block v6 07/16] Add new block driver interface to connect/disconnect the remote target

2015-07-01 Thread Dr. David Alan Gilbert
* Wen Congyang (we...@cn.fujitsu.com) wrote: > On 07/01/2015 04:11 PM, Dr. David Alan Gilbert wrote: > > * Wen Congyang (we...@cn.fujitsu.com) wrote: > >> On 07/01/2015 03:01 AM, Dr. David Alan Gilbert wrote: > >>> * Wen Congyang (we...@cn.fujitsu.com) wrote: > On 06/27/2015 03:03 AM, Dr. Davi

Re: [Qemu-devel] [PATCH] qtest/ide: add another short PRDT test flavor

2015-07-01 Thread John Snow
On 07/01/2015 01:09 PM, Stefan Hajnoczi wrote: > The existing short PRDT test case does not transfer any data because the > first PRD is less than 1 sector. > > This patch adds another short PRDT test case where the first sector can > be read but the PRDT is still smaller than the requested numb

Re: [Qemu-devel] [Qemu-block] [RFC] ide: fix bmdma underflow code

2015-07-01 Thread John Snow
On 07/01/2015 01:10 PM, Stefan Hajnoczi wrote: > On Wed, Jul 1, 2015 at 4:49 PM, John Snow wrote: >> On 07/01/2015 06:18 AM, Stefan Hajnoczi wrote: >>> On Mon, Jun 29, 2015 at 04:16:06PM -0400, John Snow wrote: diff --git a/hw/ide/core.c b/hw/ide/core.c index 8c271cc..6bcf07c 100644 --

Re: [Qemu-devel] [PATCH v3] pci : Add pba_offset PCI quirk for Chelsio T5 devices

2015-07-01 Thread Bandan Das
Alex Williamson writes: ... >> */ >> if (vendor == PCI_VENDOR_ID_CHELSIO && (device & 0xff00) == 0x5800) { >> vdev->msix->pba_offset = 0x1000; >> } else { >> error_report("vfio: Hardware reports invalid configuration, " >> "

[Qemu-devel] [PATCH] qmp-shell: add documentation

2015-07-01 Thread John Snow
I should probably document the changes that were made. Signed-off-by: John Snow --- scripts/qmp/qmp-shell | 35 +++ 1 file changed, 35 insertions(+) diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index 65280d2..fa39bf0 100755 --- a/scripts/qmp/qmp-she

Re: [Qemu-devel] [PATCH RFC 4/6] xen: Print and use errno where applicable.

2015-07-01 Thread Konrad Rzeszutek Wilk
On Wed, Jul 01, 2015 at 02:01:07PM +0100, Stefano Stabellini wrote: > On Mon, 29 Jun 2015, Konrad Rzeszutek Wilk wrote: > > In Xen 4.6 commit cd2f100f0f61b3f333d52d1737dd73f02daee592 > > "libxc: Fix do_memory_op to return negative value on errors" > > made the libxc API less odd-ball: On errors, re

[Qemu-devel] [PATCH v2 1/1] Add support for PCI Enhanced Allocation "BARs"

2015-07-01 Thread Sean O. Stalley
PCI Enhanced Allocation is a new method of allocating MMIO & IO resources for PCI devices & bridges. It can be used instead of the traditional PCI method of using BARs. EA entries are hardware-initialized to a fixed address. Unlike BARs, regions described by EA are cannot be moved. Because of this

[Qemu-devel] [PATCH v2 0/1] Add support for PCI Enhanced Allocation "BARs"

2015-07-01 Thread Sean O. Stalley
Changes from v1: - added a cover letter with a change log - made spelling fixes throughout patch - no longer add unnecessary whitespace - removed brackets in return calls - only add 1 PCI device parameter instead of 2 - don't add definitions to import

Re: [Qemu-devel] [PATCH] linux-user: Avoid compilation error with --disable-guest-base

2015-07-01 Thread Laurent Vivier
Le 01/07/2015 15:15, Aurelien Jarno a écrit : > On 2015-07-01 01:58, Laurent Vivier wrote: >> >> >> Le 30/06/2015 19:20, Peter Maydell a écrit : >>> On 30 June 2015 at 18:13, Laurent Vivier wrote: Le 30/06/2015 18:45, Peter Maydell a écrit : > On 30 June 2015 at 17:19, Laurent

Re: [Qemu-devel] [PATCH v3] pci : Add pba_offset PCI quirk for Chelsio T5 devices

2015-07-01 Thread Alex Williamson
On Wed, 2015-07-01 at 18:10 +, Gabriel Laupre wrote: > > What you are suggesting is: > > If table_offset is not as expected, then check if it's a chelsio device. > > If it's not, then print a message. On the other hand, if it's a chelsio > > device, then let msix_init() catch the error. Why ?

Re: [Qemu-devel] [PATCH v3] pci : Add pba_offset PCI quirk for Chelsio T5 devices

2015-07-01 Thread Gabriel Laupre
> What you are suggesting is: > If table_offset is not as expected, then check if it's a chelsio device. > If it's not, then print a message. On the other hand, if it's a chelsio > device, then let msix_init() catch the error. Why ? And if we are sure that > msix_init will error out, what's the p

Re: [Qemu-devel] [PATCH v2] thread-win32: fix GetThreadContext() permanently fails

2015-07-01 Thread Stefan Weil
Am 01.07.2015 um 18:49 schrieb Paolo Bonzini: On 01/07/2015 17:48, Zavadovsky Yan wrote: Ping. Stefan, are you merging this? Paolo I can do so, but as the current code seems to fix the problems with multi-processor systems, too (even if it is unclear why), it does not look urgent. Fabien,

Re: [Qemu-devel] [PATCH v2 00/16] ahci: ncq cleanup, part 1

2015-07-01 Thread John Snow
On 06/22/2015 07:38 PM, John Snow wrote: > requires: 1434470575-21625-1-git-send-email-js...@redhat.com > [PATCH v2 0/4] ahci: misc fixes/tests for 2.4 > > This series adds a couple of tests to exercise the NCQ pathways > and establish a baseline for us. > > Most of these patches are

Re: [Qemu-devel] [PATCH v2 0/4] ahci: misc fixes/tests for 2.4

2015-07-01 Thread John Snow
(Staging as a pre-req for NCQ fixes, last chance to whine!) On 06/16/2015 12:02 PM, John Snow wrote: > This is a small handful of fixes for the ahci-tests/ahci device, > alongside two new tests. I have a larger series of NCQ patches > coming shortly, but these patches were unrelated so I cleaned t

[Qemu-devel] [PATCH v4 10/10] ui: convert VNC to use generic cipher API

2015-07-01 Thread Daniel P. Berrange
Switch the VNC server over to use the generic cipher API, this allows it to use the pluggable DES implementations, instead of being hardcoded to use QEMU's built-in impl. Signed-off-by: Daniel P. Berrange --- ui/vnc.c | 52 +--- 1 file changed, 41

[Qemu-devel] [PATCH v4 07/10] block: convert quorum blockdrv to use crypto APIs

2015-07-01 Thread Daniel P. Berrange
Get rid of direct use of gnutls APIs in quorum blockdrv in favour of using the crypto APIs. This avoids the need to do conditional compilation of the quorum driver. It can simply report an error at file open file instead if the required hash algorithm isn't supported by QEMU. Signed-off-by: Daniel

[Qemu-devel] [PATCH v4 09/10] block: convert qcow/qcow2 to use generic cipher API

2015-07-01 Thread Daniel P. Berrange
Switch the qcow/qcow2 block driver over to use the generic cipher API, this allows it to use the pluggable AES implementations, instead of being hardcoded to use QEMU's built-in impl. Signed-off-by: Daniel P. Berrange --- block/qcow.c | 102 +-

[Qemu-devel] [PATCH v4 06/10] crypto: add a nettle cipher implementation

2015-07-01 Thread Daniel P. Berrange
If we are linking to gnutls already and gnutls is built against nettle, then we should use nettle as a cipher backend in preference to our built-in backend. This will be used when linking against some GNUTLS 2.x versions and all GNUTLS 3.x versions. Signed-off-by: Daniel P. Berrange --- configu

[Qemu-devel] [PATCH v4 05/10] crypto: add a gcrypt cipher implementation

2015-07-01 Thread Daniel P. Berrange
If we are linking to gnutls already and gnutls is built against gcrypt, then we should use gcrypt as a cipher backend in preference to our built-in backend. This will be used when linking against GNUTLS 1.x and many GNUTLS 2.x versions. Signed-off-by: Daniel P. Berrange --- configure

[Qemu-devel] [PATCH v4 08/10] ui: convert VNC websockets to use crypto APIs

2015-07-01 Thread Daniel P. Berrange
Remove the direct use of gnutls for hash processing in the websockets code, in favour of using the crypto APIs. This allows the websockets code to be built unconditionally removing countless conditional checks from the VNC code. Signed-off-by: Daniel P. Berrange --- configure| 19 +--

[Qemu-devel] [PATCH v4 03/10] crypto: move built-in D3DES implementation into crypto/

2015-07-01 Thread Daniel P. Berrange
To prepare for a generic internal cipher API, move the built-in D3DES implementation into the crypto/ directory. This is not in fact a normal D3DES implementation, it is D3DES with double & triple length modes removed, and the key bytes in reversed bit order. IOW it is crippled specifically for th

[Qemu-devel] [PATCH v4 02/10] crypto: move built-in AES implementation into crypto/

2015-07-01 Thread Daniel P. Berrange
To prepare for a generic internal cipher API, move the built-in AES implementation into the crypto/ directory Signed-off-by: Daniel P. Berrange --- block/qcow.c | 2 +- block/qcow2.c | 1 - block/qcow2.h | 2 +- crypto/Makefile.objs |

[Qemu-devel] [PATCH v4 04/10] crypto: introduce generic cipher API & built-in implementation

2015-07-01 Thread Daniel P. Berrange
Introduce a generic cipher API and an implementation of it that supports only the built-in AES and DES-RFB algorithms. The test suite checks the supported algorithms + modes to validate that every backend implementation is actually correctly complying with the specs. Signed-off-by: Daniel P. Berr

[Qemu-devel] [PATCH v4 00/10] Consolidate crypto APIs & implementations

2015-07-01 Thread Daniel P. Berrange
This small series covers the crypto consolidation patches I previously posted: RFC: https://lists.nongnu.org/archive/html/qemu-devel/2015-04/msg02038.html v1: https://lists.nongnu.org/archive/html/qemu-devel/2015-05/msg04267.html v2: https://lists.nongnu.org/archive/html/qemu-devel/2015-06/msg00

[Qemu-devel] [PATCH v4 01/10] crypto: introduce new module for computing hash digests

2015-07-01 Thread Daniel P. Berrange
Introduce a new crypto/ directory that will (eventually) contain all the cryptographic related code. This initially defines a wrapper for initializing gnutls and for computing hashes with gnutls. The former ensures that gnutls is guaranteed to be initialized exactly once in QEMU regardless of CLI a

[Qemu-devel] [PATCH] qtest/ide: add another short PRDT test flavor

2015-07-01 Thread Stefan Hajnoczi
The existing short PRDT test case does not transfer any data because the first PRD is less than 1 sector. This patch adds another short PRDT test case where the first sector can be read but the PRDT is still smaller than the requested number of sectors. This exercises a different code path in ide

Re: [Qemu-devel] [PATCH for-2.3] Revert seccomp tests that allow it to be used on non-x86 architectures

2015-07-01 Thread Paul Moore
On Wednesday, July 01, 2015 02:07:49 PM Andrew Jones wrote: > On Tue, Jun 30, 2015 at 01:18:49PM -0400, Paul Moore wrote: > > On Tuesday, June 30, 2015 06:07:40 PM Peter Maydell wrote: > > > On 30 June 2015 at 18:01, Paul Moore wrote: > > > > I'm starting to wonder if the 32-bit ARM build system d

Re: [Qemu-devel] [PATCH v2] thread-win32: fix GetThreadContext() permanently fails

2015-07-01 Thread Liviu Ionescu
sorry for being partly off-topic, but the last time I checked the windows builds, there was a problem on win64, applications using timers (like Cortex-M SysTick) failed. the tests were performed both with my fork and with Stefan's official version, with the same results. I saw there were some

Re: [Qemu-devel] [PATCH v2] thread-win32: fix GetThreadContext() permanently fails

2015-07-01 Thread Paolo Bonzini
On 01/07/2015 17:48, Zavadovsky Yan wrote: > Ping. Stefan, are you merging this? Paolo > Patchwork: http://patchwork.ozlabs.org/patch/488073/ > > v1 > discussion: > http://lists.nongnu.org/archive/html/qemu-devel/2015-06/msg05791.html > and patchworks: http://patchwork.ozlabs.org/patch/48743

Re: [Qemu-devel] [PATCH 3/9] kvm: add hyper-v crash msrs values

2015-07-01 Thread Paolo Bonzini
On 01/07/2015 18:06, Peter Hornyack wrote: > If userspace is controlling the crash capabilities then > HV_X64_MSR_CRASH_CTL_CONTENTS is not needed. Actually you still need to: userspace cannot write anything but 0 or (1ULL << 63). However, the name makes less sense, so I'm in favor of removing

Re: [Qemu-devel] [PATCH 7/9] kvm/x86: added hyper-v crash data and ctl msr's get/set'ers

2015-07-01 Thread Paolo Bonzini
On 30/06/2015 13:33, Denis V. Lunev wrote: > +static int kvm_hv_msr_set_crash_ctl(struct kvm_vcpu *vcpu, u64 data, bool > host) > +{ > + struct kvm_hv *hv = &vcpu->kvm->arch.hyperv; > + > + if (host) > + hv->hv_crash_ctl = data; > + You need to check against HV_X64_MSR_CRASH

Re: [Qemu-devel] [PATCH v4 3/5] target-mips: improve exceptions handling

2015-07-01 Thread Aurelien Jarno
On 2015-06-29 10:23, Pavel Dovgalyuk wrote: > This patch improves exception handling in MIPS. > Instructions generate several types of exceptions. > When exception is generated, it breaks the execution of the current > translation > block. Implementation of the exceptions handling does not correct

Re: [Qemu-devel] [PATCH v3 2/3] target-mips: improve exceptions handling

2015-07-01 Thread Aurelien Jarno
On 2015-06-29 09:57, Pavel Dovgaluk wrote: > > From: Aurelien Jarno [mailto:aurel...@aurel32.net] > > On 2015-06-18 16:28, Pavel Dovgalyuk wrote: > > > This patch improves exception handling in MIPS. > > > Instructions generate several types of exceptions. > > > When exception is generated, it brea

Re: [Qemu-devel] [PATCH v4 2/5] cpu-exec: introduce loop exit with restore function

2015-07-01 Thread Aurelien Jarno
On 2015-06-29 10:23, Pavel Dovgalyuk wrote: > This patch introduces loop exit function, which also > restores guest CPU state according to the value of host > program counter. > > Signed-off-by: Pavel Dovgalyuk > --- > cpu-exec.c |9 + > include/exec/exec-all.h |1 +

Re: [Qemu-devel] [Qemu-block] [PATCH] block.c: fix real cdrom detection

2015-07-01 Thread Stefan Hajnoczi
On Wed, Jul 1, 2015 at 4:35 PM, Programmingkid wrote: > On Jun 26, 2015, at 4:01 PM, Stefan Hajnoczi wrote: >> On Fri, Jun 26, 2015 at 4:50 PM, Programmingkid >> wrote: >>> On Jun 26, 2015, at 5:34 AM, Stefan Hajnoczi wrote: On Thu, Jun 25, 2015 at 11:11:24AM -0400, Programmingkid wrote: >>>

[Qemu-devel] [PATCH v2 13/15] ahci: Do not map cmd_fis to generate response

2015-07-01 Thread John Snow
The Register D2H FIS should copy the current values of the registers instead of just parroting back the same values the guest sent back to it. In this case, the SECTOR COUNT variables are actually not generally meaningful in terms of standard commands (See ATA8-AC3 Section 9.2 Normal Outputs), so

Re: [Qemu-devel] [PATCH v3 1/3] softmmu: add helper function to pass through retaddr

2015-07-01 Thread Aurelien Jarno
On 2015-06-25 14:28, Pavel Dovgaluk wrote: > > From: Aurelien Jarno [mailto:aurel...@aurel32.net] > > On 2015-06-18 16:28, Pavel Dovgalyuk wrote: > > > This patch introduces several helpers to pass return address > > > which points to the TB. Correct return address allows correct > > > restoring of

[Qemu-devel] [PATCH v2 11/15] ahci: add get_cmd_header helper

2015-07-01 Thread John Snow
cur_cmd is an internal bookmark that points to the current AHCI Command Header being processed by the AHCI state machine. With NCQ needing to occasionally rely on some of the same AHCI helpers, we cannot use cur_cmd and will need to grab explicit pointers instead. In an attempt to begin relying on

[Qemu-devel] [PATCH v2 02/15] ahci: stash ncq command

2015-07-01 Thread John Snow
For migration and werror=stop/rerror=stop resume purposes, it will be convenient to have the command handy inside of ncq_tfs. Eventually, we'd like to avoid reading from the FIS entirely after the initial read, so this is a byte (hah!) sized step in that direction. Signed-off-by: John Snow ---

[Qemu-devel] [PATCH v2 15/15] ahci: fix sdb fis semantics

2015-07-01 Thread John Snow
There are two things to fix here: The first one is subtle: the PxSACT register in the AHCI HBA has different semantics from the field it is shadowing, the ACT field in the Set Device Bits FIS. In the HBA register, PxSACT acts as a bitfield indicating outstanding NCQ commands where a set bit indic

[Qemu-devel] [PATCH v2 14/15] qtest/ahci: halted ncq migration test

2015-07-01 Thread John Snow
Signed-off-by: John Snow --- tests/ahci-test.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index c30837b..87d7691 100644 --- a/tests/ahci-test.c +++ b/tests/ahci-test.c @@ -1269,13 +1269,13 @@ static void test_halt

[Qemu-devel] [PATCH v2 10/15] ahci: add cmd header to ncq transfer state

2015-07-01 Thread John Snow
While the rest of the AHCI device can rely on a single bookmarked pointer for the AHCI Command Header currently being processed, NCQ is asynchronous and may have many commands in flight simultaneously. Add a cmdh pointer to the ncq_tfs object and make the sglist prepare function take an AHCICmdHea

[Qemu-devel] [PATCH v2 08/15] ahci: correct ncq sector count

2015-07-01 Thread John Snow
uint16_t isn't enough to hold the real sector count, since a value of zero implies a full 64K sectors, so we need a uint32_t here. We *could* cheat and pretend that this value is 0-based and fit it in a uint16_t, but I'd rather waste 2 bytes instead of a future dev's 10 minutes when they forget to

[Qemu-devel] [PATCH v2 01/15] ide: add limit to .prepare_buf()

2015-07-01 Thread John Snow
prepare_buf should not always grab as many descriptors as it can, sometimes it should self-limit. For example, an NCQ transfer of 1 sector with a PRDT that describes 4GiB of data should not copy 4GiB of data, it should just transfer that first 512 bytes. PIO is not affected, because the dma_buf_r

[Qemu-devel] [PATCH v2 12/15] ahci: ncq migration

2015-07-01 Thread John Snow
Migrate the NCQ queue. This is solely for the benefit of halted commands, since anything else should have completed and had any relevant status flushed to the HBA registers already. Signed-off-by: John Snow --- hw/ide/ahci.c | 51 ++- 1 file change

[Qemu-devel] [PATCH v2 06/15] ahci: add rwerror=stop support for ncq

2015-07-01 Thread John Snow
Handle NCQ failures for cases where we want to halt the VM on IO errors. Upon a VM state change, retry the halted NCQ commands. Signed-off-by: John Snow --- hw/ide/ahci.c | 36 ++-- hw/ide/ahci.h | 1 + hw/ide/core.c | 7 +++ hw/ide/internal.h |

[Qemu-devel] [PATCH v2 00/15] ahci: ncq cleanup, part 2

2015-07-01 Thread John Snow
requires: 1434470575-21625-1-git-send-email-js...@redhat.com 1435016308-6150-1-git-send-email-js...@redhat.com [PATCH v2 0/4] ahci: misc fixes/tests for 2.4 [PATCH v2 00/16] ahci: ncq cleanup, part 1 This chunk gets NCQ migration and and resume support working. There

[Qemu-devel] [PATCH v2 07/15] ahci: correct types in NCQTransferState

2015-07-01 Thread John Snow
Signed-off-by: John Snow --- hw/ide/ahci.c | 10 +- hw/ide/ahci.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index d996f37..efd07ac 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -45,7 +45,7 @@ do { \ } while (0) static v

Re: [Qemu-devel] [PATCH v4 1/5] softmmu: add helper function to pass through retaddr

2015-07-01 Thread Aurelien Jarno
On 2015-06-29 10:23, Pavel Dovgalyuk wrote: > This patch introduces several helpers to pass return address > which points to the TB. Correct return address allows correct > restoring of the guest PC and icount. These functions should be used when > helpers embedded into TB invoke memory operations.

Re: [Qemu-devel] [PATCH] block/curl: Don't lose original error when a connection fails.

2015-07-01 Thread John Snow
On 06/25/2015 03:39 PM, Richard W.M. Jones wrote: > Currently if qemu is connected to a curl source (eg. web server), and > the web server fails / times out / dies, you always see a bogus EIO > "Input/output error". > > For example, choose a large file located on any local webserver which > you

[Qemu-devel] [PATCH v2 09/15] qtest/ahci: halted NCQ test

2015-07-01 Thread John Snow
Signed-off-by: John Snow --- tests/ahci-test.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 3f06fd9..c30837b 100644 --- a/tests/ahci-test.c +++ b/tests/ahci-test.c @@ -1200,13 +1200,13 @@ static void test_migr

[Qemu-devel] [PATCH v2 05/15] ahci: factor ncq_finish out of ncq_cb

2015-07-01 Thread John Snow
When we add werror=stop or rerror=stop support to NCQ, we'll want to take a codepath where we don't actually complete the command, so factor that out into a new routine. Signed-off-by: John Snow --- hw/ide/ahci.c | 32 +++- 1 file changed, 19 insertions(+), 13 deletio

[Qemu-devel] [PATCH v2 04/15] ahci: refactor process_ncq_command

2015-07-01 Thread John Snow
Split off execute_ncq_command so that we can call it separately later if we desire. Signed-off-by: John Snow --- hw/ide/ahci.c | 73 ++- 1 file changed, 42 insertions(+), 31 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 817

[Qemu-devel] [PATCH v2 03/15] ahci: assert is_ncq for process_ncq

2015-07-01 Thread John Snow
We already checked this in the handle_cmd phase, so just change this to an assertion and simplify the error logic. (Also, fix the switch indent, because checkpatch.pl yelled.) ((Sorry for churn.)) Signed-off-by: John Snow --- hw/ide/ahci.c | 60 ++

Re: [Qemu-devel] [PATCH] move QemuOpts from qemu/option.h to qemu/typedefs.h

2015-07-01 Thread Markus Armbruster
Gerd Hoffmann writes: > On Di, 2015-06-30 at 10:15 +0100, Peter Maydell wrote: >> On 30 June 2015 at 10:09, Gerd Hoffmann wrote: >> > Signed-off-by: Gerd Hoffmann >> > --- >> > include/qemu/option.h | 2 +- >> > include/qemu/typedefs.h | 1 + >> > 2 files changed, 2 insertions(+), 1 deletion

Re: [Qemu-devel] [v8][RESEND][PATCH 00/10] xen: add Intel IGD passthrough

2015-07-01 Thread Stefano Stabellini
Aside from a couple of really minor stylistic issues, I think the patch series can go in from my point of view. However it looks like you are still missing a few acked-by/reviewed-by on the non-xen patches. On Wed, 1 Jul 2015, Chen, Tiejun wrote: > Ping... > > Thanks > Tiejun > > On 2015/6/5 16:

Re: [Qemu-devel] [PATCH 3/9] kvm: add hyper-v crash msrs values

2015-07-01 Thread Peter Hornyack
If userspace is controlling the crash capabilities then HV_X64_MSR_CRASH_CTL_CONTENTS is not needed. On Wed, Jul 1, 2015 at 8:53 AM, Denis V. Lunev wrote: > On 01/07/15 18:00, Paolo Bonzini wrote: >> >> >> On 30/06/2015 13:33, Denis V. Lunev wrote: >>> >>> +#define HV_X64_MSR_CRASH_CTL_NOTIFY

Re: [Qemu-devel] [PATCH 1/1] block: update BlockDriverState's children in bdrv_set_backing_hd()

2015-07-01 Thread Max Reitz
On 01.07.2015 16:21, Alberto Garcia wrote: When a backing image is opened using bdrv_open_inherit(), it is added to the parent image's list of children. However there's no way to remove it from there. In particular, changing a BlockDriverState's backing image does not add the new one to the list

Re: [Qemu-devel] [Qemu-block] [PATCH] block/mirror: limit qiov to IOV_MAX elements

2015-07-01 Thread Stefan Hajnoczi
On Wed, Jul 1, 2015 at 4:03 PM, Paolo Bonzini wrote: > On 01/07/2015 16:59, Stefan Hajnoczi wrote: >> I found it annoying to write it backwards too, but it's for consistency: >> >> if (s->buf_free_count < nb_chunks + added_chunks) { >> trace_mirror_break_buf_busy(s, nb_chunks, s->in_flight

Re: [Qemu-devel] [PATCH] block/raw-posix: Don't think /dev/fd/ is a floppy drive.

2015-07-01 Thread Markus Armbruster
"Richard W.M. Jones" writes: > In libguestfs we use /dev/fd/ to pass pre-opened file descriptors > to qemu-img. Lately I've discovered that although this works, qemu > believes that these are floppy disk images. That in itself isn't much > of a problem, but now qemu prints a warning about host

Re: [Qemu-devel] [PATCH for-2.4 1/2] qom: Do not reuse errp after a possible error

2015-07-01 Thread Daniel P. Berrange
On Wed, Jul 01, 2015 at 05:47:03PM +0200, Markus Armbruster wrote: > The argument for an Error **errp parameter must point to a null > pointer. If it doesn't, and an error happens, error_set() fails its > assertion. > > Instead of > > foo(foos, errp); > bar(bars, errp); > > you need to

Re: [Qemu-devel] [v8][RESEND][PATCH 09/10] xen, gfx passthrough: register host bridge specific to passthrough

2015-07-01 Thread Stefano Stabellini
On Fri, 5 Jun 2015, Tiejun Chen wrote: > Just register that pci host bridge specific to passthrough. > > Signed-off-by: Tiejun Chen > --- > hw/i386/pc_piix.c | 27 +-- > 1 file changed, 25 insertions(+), 2 deletions(-) > > diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix

Re: [Qemu-devel] [v8][RESEND][PATCH 10/10] xen, gfx passthrough: add opregion mapping

2015-07-01 Thread Stefano Stabellini
On Fri, 5 Jun 2015, Tiejun Chen wrote: > The OpRegion shouldn't be mapped 1:1 because the address in the host > can't be used in the guest directly. > > This patch traps read and write access to the opregion of the Intel > GPU config space (offset 0xfc). > > The original patch is from Jean Guyade

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

2015-07-01 Thread Stefano Stabellini
On Fri, 5 Jun 2015, Tiejun Chen wrote: > Currently we just register this isa bridge when we use IGD > passthrough in Xen side. > > Signed-off-by: Tiejun Chen > --- > hw/xen/xen_pt.c | 18 ++ > include/hw/xen/xen.h | 1 + > 2 files changed, 19 insertions(+) > > diff --git a

Re: [Qemu-devel] [PATCH v3 0/9] HyperV equivalent of pvpanic driver

2015-07-01 Thread Denis V. Lunev
On 01/07/15 17:09, Paolo Bonzini wrote: On 30/06/2015 13:33, Denis V. Lunev wrote: Windows 2012 guests can notify hypervisor about occurred guest crash (Windows bugcheck(BSOD)) by writing specific Hyper-V msrs. This patch does handling of this MSR's by KVM and sending notification to user space

Re: [Qemu-devel] [v8][RESEND][PATCH 06/10] xen, gfx passthrough: retrieve VGA BIOS to work

2015-07-01 Thread Stefano Stabellini
On Fri, 5 Jun 2015, Tiejun Chen wrote: > Now we retrieve VGA bios like kvm stuff in qemu but we need to > fix Device Identification in case if its not matched with the > real IGD device since Seabios is always trying to compare this > ID to work out VGA BIOS. > > Signed-off-by: Tiejun Chen Acked

Re: [Qemu-devel] [PATCH 3/9] kvm: add hyper-v crash msrs values

2015-07-01 Thread Denis V. Lunev
On 01/07/15 18:00, Paolo Bonzini wrote: On 30/06/2015 13:33, Denis V. Lunev wrote: +#define HV_X64_MSR_CRASH_CTL_NOTIFY(1ULL << 63) +#define HV_X64_MSR_CRASH_CTL_CONTENTS \ + (HV_X64_MSR_CRASH_CTL_NOTIFY) Why is HV_X64_MSR_CRASH_CTL_CONTENTS needed? Can I just remov

Re: [Qemu-devel] [PATCH v3 2/2] virtio-blk: Use blk_drain() to drain IO requests

2015-07-01 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Mon, Jun 29, 2015 at 08:10:20AM +0200, Markus Armbruster wrote: >> Alexander Yarygin writes: >> > Markus Armbruster writes: >> > * Ignorant answer: I was told that the bdrv_drain_all()'s comment is >> > obsolete and we can use bdrv_drain(). Here is a link to the o

Re: [Qemu-devel] [PATCH v2] thread-win32: fix GetThreadContext() permanently fails

2015-07-01 Thread Zavadovsky Yan
Ping. Patchwork: http://patchwork.ozlabs.org/patch/488073/ v1 discussion: http://lists.nongnu.org/archive/html/qemu-devel/2015-06/msg05791.html and patchworks: http://patchwork.ozlabs.org/patch/487438/ http://patchwork.ozlabs.org/patch/487566/ On Wed, Jun 24, 2015 at 3:25 PM, Zavadovsky Yan wro

[Qemu-devel] [PATCH for-2.4 1/2] qom: Do not reuse errp after a possible error

2015-07-01 Thread Markus Armbruster
The argument for an Error **errp parameter must point to a null pointer. If it doesn't, and an error happens, error_set() fails its assertion. Instead of foo(foos, errp); bar(bars, errp); you need to do something like Error *err = NULL; foo(foos, &err); if (err) {

[Qemu-devel] [PATCH for-2.4 2/2] qom: Fix invalid error check in property_get_str()

2015-07-01 Thread Markus Armbruster
When a function returns a null pointer on error and only on error, you can do if (!foo(foos, errp)) { ... handle error ... } instead of the more cumbersome Error *err = NULL; if (!foo(foos, &err)) { error_propagate(errp, err); ... handle error ... }

[Qemu-devel] [PATCH for-2.4 0/2] qom: Fix misuse of Error API

2015-07-01 Thread Markus Armbruster
Most of the bugs are fairly old, and we may decide to let sleeping dogs lie this close to a release. Maintainer's discretion, tagging for-2.4 just to make sure the fixes are considered. Markus Armbruster (2): qom: Do not reuse errp after a possible error qom: Fix invalid error check in proper

Re: [Qemu-devel] [v8][RESEND][PATCH 05/10] xen, gfx passthrough: basic graphics passthrough support

2015-07-01 Thread Stefano Stabellini
On Fri, 5 Jun 2015, Tiejun Chen wrote: > basic gfx passthrough support: > - add a vga type for gfx passthrough > - register/unregister legacy VGA I/O ports and MMIOs for passthrough GFX > > Signed-off-by: Tiejun Chen > Signed-off-by: Yang Zhang Acked-by: Stefano Stabellini > hw/core/machine

Re: [Qemu-devel] [SeaBIOS] [PATCH v3 00/25] virtio: add version 1.0 support, move to 32bit

2015-07-01 Thread Kevin O'Connor
On Wed, Jul 01, 2015 at 04:40:45PM +0200, Gerd Hoffmann wrote: > Hi, > > This patch series adds virtio 1.0 support to the virtio blk and scsi > drivers in seabios. With this series applied seabios happily boots > in virtio 1.0 mode from both transitional and modern devices. This > series also

Re: [Qemu-devel] [PATCH] refresh filename after the node is replaced

2015-07-01 Thread Max Reitz
On 01.07.2015 03:08, Wen Congyang wrote: On 06/30/2015 09:17 PM, Max Reitz wrote: On 29.06.2015 03:16, Wen Congyang wrote: On 06/26/2015 11:16 PM, Max Reitz wrote: I see two solutions to this issue: Either, we do it right and that means, if there is a change in the BDS graph (e.g. because of

Re: [Qemu-devel] [PATCH 8/9] kvm/x86: add sending hyper-v crash notification to user space

2015-07-01 Thread Paolo Bonzini
On 30/06/2015 13:33, Denis V. Lunev wrote: > From: Andrey Smetanin > > Sending of notification is done by exiting vcpu to user space > if KVM_REQ_HV_CRASH is enabled for vcpu. kvm_run structure > will contains system_event with type KVM_SYSTEM_EVENT_CRASH > and flag KVM_SYSTEM_EVENT_FL_HV_CRASH

<    1   2   3   4   5   >