Re: [Qemu-devel] [PATCH v5 01/17] migrate: Add gboolean return type to migrate_channel_process_incoming

2017-07-20 Thread Peter Xu
On Wed, Jul 19, 2017 at 04:01:10PM +0100, Dr. David Alan Gilbert wrote: > * Juan Quintela (quint...@redhat.com) wrote: > > Signed-off-by: Juan Quintela > > --- > > migration/channel.c | 3 ++- > > migration/channel.h | 2 +- > > migration/exec.c| 6 -- > > migration/socket.c | 12

[Qemu-devel] [PATCH qemu v4 3/3] spapr/iommu: Enable in-kernel TCE acceleration via VFIO KVM device

2017-07-20 Thread Alexey Kardashevskiy
This uses new kernel KVM_CAP_SPAPR_TCE_VFIO capability to enable in-kernel acceleration of TCE update requests which will go via the VFIO KVM device. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson --- target/ppc/kvm_ppc.h | 6 ++ hw/ppc/spapr_iommu.c | 4 target/ppc/kvm.

[Qemu-devel] [PATCH qemu v4 0/3] fio-pci, spapr: Allow in-kernel TCE ops acceleration

2017-07-20 Thread Alexey Kardashevskiy
This is my current working tree to support kernel's "powerpc/kvm/vfio: Enable in-kernel acceleration". Changes: v4: * rebased on the latest upstream with IOMMU MR QOM and VFIO initialization reordering v3: * fixed multiple architectures with respect to IOMMU MR * removed sPAPRIOMMUMemoryRegion v

Re: [Qemu-devel] [PATCH v3 12/43] tcg: convert tb->cflags reads to tb_cflags(tb)

2017-07-20 Thread Richard Henderson
On 07/19/2017 05:08 PM, Emilio G. Cota wrote: Convert all existing readers of tb->cflags to tb_cflags, so that we use atomic_read and therefore avoid undefined behaviour in C11. Note that the remaining setters/getters of the field are protected by tb_lock, and therefore do not need conversion.

[Qemu-devel] [PATCH qemu v4 1/3] spapr_iommu: Realloc guest visible TCE table when hot(un)plugging vfio-pci

2017-07-20 Thread Alexey Kardashevskiy
This replaces g_malloc() with spapr_tce_alloc_table() as this is the standard way of allocating tables and this allows moving the table back to KVM when unplugging a VFIO PCI device and VFIO TCE acceleration support is not present in the KVM. Although spapr_tce_alloc_table() is expected to fail wi

[Qemu-devel] [PATCH qemu v4 2/3] vfio/spapr: Add a notifier for PPC64 HV/PR KVM about new group attached to LIOBN

2017-07-20 Thread Alexey Kardashevskiy
This implements a notification for a new IOMMU group attached to sPAPR's logical IO bus (LIOBN) to enable in-kernel TCE acceleration. This extends the TYPE_SPAPR_IOMMU_MEMORY_REGION class with a get_fd() callback which returns KVM fd associated with LIOBN, the notifier uses it to establish link be

Re: [Qemu-devel] [PATCH v3 17/43] target/s390x: check CF_PARALLEL instead of parallel_cpus

2017-07-20 Thread Richard Henderson
On 07/19/2017 05:09 PM, Emilio G. Cota wrote: Thereby decoupling the resulting translated code from the current state of the system. Signed-off-by: Emilio G. Cota --- target/s390x/helper.h | 4 +++ target/s390x/mem_helper.c | 80 +-- target/s3

Re: [Qemu-devel] [PATCH v3 18/43] target/sh4: check CF_PARALLEL instead of parallel_cpus

2017-07-20 Thread Richard Henderson
On 07/19/2017 05:09 PM, Emilio G. Cota wrote: Thereby decoupling the resulting translated code from the current state of the system. Signed-off-by: Emilio G. Cota --- target/sh4/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH v3 16/43] target/m68k: check CF_PARALLEL instead of parallel_cpus

2017-07-20 Thread Richard Henderson
On 07/19/2017 05:09 PM, Emilio G. Cota wrote: Thereby decoupling the resulting translated code from the current state of the system. Signed-off-by: Emilio G. Cota --- target/m68k/helper.h| 1 + target/m68k/op_helper.c | 33 - target/m68k/translate.c | 12

Re: [Qemu-devel] [PATCH v3 35/43] tcg: dynamically allocate optimizer temps

2017-07-20 Thread Richard Henderson
On 07/19/2017 05:09 PM, Emilio G. Cota wrote: Groundwork for supporting multiple TCG contexts. While at it, also allocate temps_used directly as a bitmap of the required size, instead of having a bitmap of TCG_MAX_TEMPS via TCGTempSet. Performance-wise we lose about 2% in a translation-heavy wo

Re: [Qemu-devel] [PATCH v3 36/43] tcg: introduce **tcg_ctxs to keep track of all TCGContext's

2017-07-20 Thread Richard Henderson
On 07/19/2017 05:09 PM, Emilio G. Cota wrote: Groundwork for supporting multiple TCG contexts. Note that having n_tcg_ctxs is unnecessary. However, it is convenient to have it, since it will simplify iterating over the array: we'll have just a for loop instead of having to iterate over a NULL-te

Re: [Qemu-devel] [PATCH qemu v4 0/3] fio-pci, spapr: Allow in-kernel TCE ops acceleration

2017-07-20 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Message-id: 20170720072231.35054-1-...@ozlabs.ru Subject: [Qemu-devel] [PATCH qemu v4 0/3] fio-pci, spapr: Allow in-kernel TCE

Re: [Qemu-devel] [PATCH v3 39/43] osdep: introduce qemu_mprotect_rwx/none

2017-07-20 Thread Richard Henderson
On 07/19/2017 05:09 PM, Emilio G. Cota wrote: Signed-off-by: Emilio G. Cota --- include/qemu/osdep.h | 2 ++ util/osdep.c | 41 + 2 files changed, 43 insertions(+) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH v3 40/43] translate-all: use qemu_protect_rwx/none helpers

2017-07-20 Thread Richard Henderson
On 07/19/2017 05:09 PM, Emilio G. Cota wrote: The helpers require the address and size to be page-aligned, so do that before calling them. Signed-off-by: Emilio G. Cota --- accel/tcg/translate-all.c | 61 ++- 1 file changed, 13 insertions(+), 48 del

[Qemu-devel] [PATCH v2 01/10] qapi: Separate type QNull from QObject

2017-07-20 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Daniel P. Berrange --- include/qapi/qmp/qobject.h| 10 +++--- qapi/qobject-output-visitor.c | 2 +- qobject/json-parser.c | 2 +- qobject/qnull.c | 8 +--- target/i386/cpu.c |

[Qemu-devel] [PATCH v2 07/10] migration: Clean up around tls_creds, tls_hostname

2017-07-20 Thread Markus Armbruster
Optional MigrationParameters members tls_creds and tls_hostname can't actually be absent outside qmp_migrate_set_parameters() since commit 4af245d (v2.9.0). Note that commit 4af245d reverted the part of commit de63ab6 (v2.8.0) that made tls_creds and tls_hostname absent instead of "" in the value

[Qemu-devel] [PATCH v2 05/10] block: Use JSON null instead of "" to disable backing file

2017-07-20 Thread Markus Armbruster
BlockdevRef is an alternate of BlockdevOptions (inline definition) and str (reference to an existing block device by name). BlockdevRef value "" is special: "no block device should be referenced." It's actually interpreted that way in just one place: optional member @backing of COW formats. Sema

[Qemu-devel] [PULL 1/2] vnc: Clarify documentation of QMP command change

2017-07-20 Thread Gerd Hoffmann
From: Markus Armbruster QMP command { "execute": "change", "arguments": { "device": "vnc", "target": "password", "arg": PWD } } behaves just like { "execute": "change-vnc-password", "arguments": { "password", "arg": PWD } } Their documentation differs, however. According

[Qemu-devel] [PATCH v2 06/10] hmp: Clean up and simplify hmp_migrate_set_parameter()

2017-07-20 Thread Markus Armbruster
The bulk of hmp_migrate_set_parameter()'s code sets one member of MigrationParameters according to the command's arguments. It uses a string visitor for integer and boolean members, but not for string and size members. It calls visit_type_bool() right away, but delays visit_type_int() some. The

Re: [Qemu-devel] [PULL v1 0/7] MMIO Exec pull request

2017-07-20 Thread KONRAD Frederic
On 07/19/2017 06:25 PM, Peter Maydell wrote: On 19 July 2017 at 17:22, KONRAD Frederic wrote: Scary.. Yes your right. I still think it doesn't need to be migrated.. But how.. BTW taking a look at this I found the comment below which seems to implies that the content won't be migrated? That

[Qemu-devel] [PULL 2/2] keymaps: fr-ca: more fixups

2017-07-20 Thread Gerd Hoffmann
Fixes: https://bugs.launchpad.net/qemu/+bug/533613 Cc: Thomas Huth Suggested-by: Jérôme Poulin Signed-off-by: Gerd Hoffmann Message-id: 20170717133444.16743-1-kra...@redhat.com --- pc-bios/keymaps/fr-ca | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pc-bios/keymap

[Qemu-devel] [PATCH v2 10/10] migration: Use JSON null instead of "" to reset parameter to default

2017-07-20 Thread Markus Armbruster
migrate-set-parameters sets migration parameters according to is arguments like this: * Present means "set the parameter to this value" * Absent means "leave the parameter unchanged" * Except for parameters tls_creds and tls_hostname, "" means "reset the parameter to its default value The fir

Re: [Qemu-devel] [PULL v1 0/7] MMIO Exec pull request

2017-07-20 Thread KONRAD Frederic
On 07/19/2017 06:46 PM, Dr. David Alan Gilbert wrote: * KONRAD Frederic (frederic.kon...@adacore.com) wrote: On 07/19/2017 02:29 PM, Dr. David Alan Gilbert wrote: * KONRAD Frederic (frederic.kon...@adacore.com) wrote: On 07/17/2017 07:27 PM, Edgar E. Iglesias wrote: On Mon, Jul 17, 2017

[Qemu-devel] [PULL 0/2] Ui 20170720 patches

2017-07-20 Thread Gerd Hoffmann
The following changes since commit d4e59218ab80e86015753782fb5378767a51ccd0: Merge remote-tracking branch 'remotes/berrange/tags/pull-qcrypto-2017-07-18-2' into staging (2017-07-19 20:45:37 +0100) are available in the git repository at: git://git.kraxel.org/qemu tags/ui-201

[Qemu-devel] [PATCH v2 08/10] migration: Add TODO comments on duplication of QAPI_CLONE()

2017-07-20 Thread Markus Armbruster
qmp_query_migrate_parameters() and qmp_migrate_set_parameters() effectively duplicate QAPI_CLONE() inline. Add suitable TODO comments. Signed-off-by: Markus Armbruster Reviewed-by: Daniel P. Berrange Reviewed-by: Eric Blake --- migration/migration.c | 3 +++ 1 file changed, 3 insertions(+) d

Re: [Qemu-devel] [PATCH v2.5 0/5] (more) Updated Travis Queue

2017-07-20 Thread Fam Zheng
On Mon, 07/17 23:47, Philippe Mathieu-Daudé wrote: > Sorry I messed previous series... just updated last 5 patches of v2. Please do full respins and don't post as in-reply-to previous versions, this doesn't make things any easier for maintainers. Fam

[Qemu-devel] [PULL 0/2] Misc 20170720 patches

2017-07-20 Thread Gerd Hoffmann
The following changes since commit d4e59218ab80e86015753782fb5378767a51ccd0: Merge remote-tracking branch 'remotes/berrange/tags/pull-qcrypto-2017-07-18-2' into staging (2017-07-19 20:45:37 +0100) are available in the git repository at: git://git.kraxel.org/qemu tags/misc-201

[Qemu-devel] [PULL 1/2] add scripts/git.orderfile

2017-07-20 Thread Gerd Hoffmann
Based on a old patch by Laszlo. Time to get this in ... Signed-off-by: Gerd Hoffmann Reviewed-by: Eric Blake Reviewed-by: Emilio G. Cota Message-id: 20170717101632.23247-1-kra...@redhat.com --- scripts/git.orderfile | 29 + 1 file changed, 29 insertions(+) create m

[Qemu-devel] [PATCH v2 00/10] Correct two minor QMP interface design flaws

2017-07-20 Thread Markus Armbruster
blockdev-add and migrate-set-parameters overload empty strings to mean something entirely different. See my memo "qapi: Stop abusing "special" values for something entirely different" for details. Message-ID: <87379zhrhn@dusky.pond.sub.org> https://lists.gnu.org/archive/html/qemu-deve

[Qemu-devel] [PATCH v2 04/10] tests/test-qobject-input-visitor: Drop redundant test

2017-07-20 Thread Markus Armbruster
test_visitor_in_alternate() tests UserDefAlternate with inadmissible input. test_visitor_in_fail_alternate() does basically the same. Drop the former, keep the latter. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Daniel P. Berrange --- tests/test-qobject-input-visitor

[Qemu-devel] [PATCH v2 03/10] qapi: Introduce a first class 'null' type

2017-07-20 Thread Markus Armbruster
I expect the 'null' type to be useful mostly for members of alternate types. Signed-off-by: Markus Armbruster Reviewed-by: Daniel P. Berrange Reviewed-by: Eric Blake Signed-off-by: Markus Armbruster --- docs/devel/qapi-code-gen.txt| 10 ++ include/qapi/qmp/qobject.h

[Qemu-devel] [PATCH v2 02/10] qapi: Use QNull for a more regular visit_type_null()

2017-07-20 Thread Markus Armbruster
Make visit_type_null() take an @obj argument like its buddies. This helps keep the next commit simple. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Daniel P. Berrange --- hw/ppc/spapr_drc.c | 4 +++- include/qapi/visitor-impl.h | 3 ++- incl

Re: [Qemu-devel] [PATCH v3 42/43] tcg: introduce regions to split code_gen_buffer

2017-07-20 Thread Richard Henderson
On 07/19/2017 05:09 PM, Emilio G. Cota wrote: +/* We do not yet support multiple TCG contexts, so use one region for now */ +n_regions = 1; + +/* start on a page-aligned address */ +buf = QEMU_ALIGN_PTR_UP(buf, qemu_real_host_page_size); +g_assert(buf < tcg_init_ctx.code_gen_

[Qemu-devel] [PATCH v2 09/10] migration: Unshare MigrationParameters struct for now

2017-07-20 Thread Markus Armbruster
Commit de63ab6 "migrate: Share common MigrationParameters struct" reused MigrationParameters for the arguments of migrate-set-parameters, with the following rationale: It is rather verbose, and slightly error-prone, to repeat the same set of parameters for input (migrate-set-parameters)

[Qemu-devel] [PULL 2/2] add editorconfig

2017-07-20 Thread Gerd Hoffmann
Add a .editorconfig file for qemu. Specifies the indent and tab style for various files (C code and Makefiles for starters). Most popular editors support this either natively or via plugin. Check http://editorconfig.org/ for details. Signed-off-by: Gerd Hoffmann Message-id: 20170717101547.2229

Re: [Qemu-devel] [PATCH v5 10/17] migration: Create ram_multifd_page

2017-07-20 Thread Peter Xu
On Wed, Jul 19, 2017 at 08:02:39PM +0100, Dr. David Alan Gilbert wrote: > * Juan Quintela (quint...@redhat.com) wrote: > > The function still don't use multifd, but we have simplified > > ram_save_page, xbzrle and RDMA stuff is gone. We have added a new > > counter and a new flag for this type of

[Qemu-devel] [PATCH] vmxcap: Fix output formatting

2017-07-20 Thread Stefan Fritsch
From: Stefan Fritsch One string is longer than 40 chars. Set the field width to 50. Signed-off-by: Stefan Fritsch --- scripts/kvm/vmxcap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/kvm/vmxcap b/scripts/kvm/vmxcap index d9a6db0bb7..19506f45bf 100755 --- a/scr

Re: [Qemu-devel] [PATCH v3 43/43] tcg: enable multiple TCG contexts in softmmu

2017-07-20 Thread Richard Henderson
On 07/19/2017 05:09 PM, Emilio G. Cota wrote: +#ifdef CONFIG_SOFTMMU +/* + * It is likely that some vCPUs will translate more code than others, so we + * first try to set more regions than smp_cpus, with those regions being of + * reasonable size. If that's not possible we make do by evenly divid

[Qemu-devel] [PATCH 0/8] usb-ccid: Misc fixes and T=1 support

2017-07-20 Thread Stefan Fritsch
From: Stefan Fritsch This set of changes contains fixes and extensions to allow to use ccid card passthru with a physical smartcard using the T=1 protocol. Unfortunately, our vscard client program ist not public, therefore it is difficult for other people to test the functionality. But maybe you

[Qemu-devel] [PATCH 1/8] usb-ccid: Add support to dump all USB packets

2017-07-20 Thread Stefan Fritsch
From: Stefan Fritsch The dump can be activated by the debug command line option for the device like this "qemu ... -dev usb,ccid,debug=5" While there move the short read debug message to a higher debug level. It triggers very often and makes debug output unreadable. Signed-off-by: Stefan Fritsc

[Qemu-devel] [PATCH 7/8] usb-ccid: Increase ccid max APDU size

2017-07-20 Thread Stefan Fritsch
From: Stefan Fritsch The emulated ccid smartcard reader has a fixed limit for APDUs from the card. Increase this to 1024. We have seen software that tries to use 768 byte APDUs. Signed-off-by: Stefan Fritsch --- hw/usb/dev-smartcard-reader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

[Qemu-devel] [PATCH 4/8] usb-ccid: Fix ATR parsing

2017-07-20 Thread Stefan Fritsch
From: Stefan Fritsch - The number of parameter set TA_i...TD_i is unlimited. The list ends if TD_i is not present or the high nibble is zero. - If at least one protocol in any of the TD bytes is non-zero, the ATR must have a checksum. - Add a missing length check before accessing TD. - Fixup

[Qemu-devel] [PATCH 2/8] usb-ccid: Fix USB packet generation for 64-Bytes sized packets.

2017-07-20 Thread Stefan Fritsch
From: Stefan Fritsch An USB transfer must be terminated by a packet that is shorter than the maximum USB packet size (usually 64Byte) reported by the device in its descriptor(s). Thus if the last packet of a transfer is exactly 64-Bytes long, we must send an additional zero length packet. Fix th

[Qemu-devel] [PATCH 3/8] usb-ccid: Set protocol parameters based on card ATR

2017-07-20 Thread Stefan Fritsch
From: Stefan Fritsch For the ATR interface bytes encoding see ISO/IEC 7816-3. For the interpretation of the protocol parameter block see the CCID specification. - Values that are not present in the ATR default to zero. - TA_1 is used to fill bmFindexDindex. - The high nibble of bmTCCKST0 must be

[Qemu-devel] [PATCH 8/8] usb-ccid: Reduce logging at level WARN

2017-07-20 Thread Stefan Fritsch
From: Stefan Fritsch Change all DPRINTF()s using (1 == WARN) to use symbolic constants. Most of these DPRINTFs are now only logging at higher log levels. This allows to use ccid's debug level 1 == WARN in normal operation. Signed-off-by: Stefan Fritsch --- hw/usb/dev-smartcard-reader.c | 37 +

[Qemu-devel] [PATCH 6/8] usb-ccid: Fix chaining fields in CCID USB messages

2017-07-20 Thread Stefan Fritsch
From: Stefan Fritsch Incoming packets should never need chaining (bChainParamter => 0). If they ever do we will have to fix this later. Zero is still better than an uninitialized value. Warn if outgoing packets try to use chaining (wLevelParameter != 0). As we are doing APDU level exchanges, the

[Qemu-devel] [PATCH 5/8] usb-ccid: Fix USB descriptor

2017-07-20 Thread Stefan Fritsch
From: Stefan Fritsch - We want to support both T=0 and T=1. Additionally, note that all fields in USB descriptors are little endian and the supported protocols are in the lowest byte the of the 32-Bit dwProtocols field. - We want APDU level exchanges. This saves us from PPS exchanges and from

[Qemu-devel] [Bug 1333216] Re: Xen 4.4 with qemu 1.6.2 VGA passthru NVIDIA

2017-07-20 Thread Thomas Huth
Thanks for the answer! So I'm closing this bug ticket now... ** Changed in: qemu Status: Incomplete => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1333216 Title: Xen 4.4 with qemu

Re: [Qemu-devel] Question for iotests 188, 189 and 087

2017-07-20 Thread Jing Liu
Hi Cleber Rosa, On 2017/7/19 上午5:22, Cleber Rosa wrote: On 07/18/2017 02:07 PM, John Snow wrote: On 07/17/2017 11:01 PM, Jing Liu wrote: [...] I see issues here: 1) The qemu-iotests "runner", that is, "./check", understands that a file number is a test. No further granularity is (curren

[Qemu-devel] [PULL 1/1] usb: Fix build with newer gcc

2017-07-20 Thread Gerd Hoffmann
From: Eric Blake gcc 7 is pickier about our sources: hw/usb/bus.c: In function ‘usb_port_location’: hw/usb/bus.c:410:66: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size between 0 and 15 [-Werror=format-truncation=] snprintf(downstream

Re: [Qemu-devel] [PATCH v3 11/43] tcg: define CF_PARALLEL and use it for TB hashing

2017-07-20 Thread Richard Henderson
On 07/19/2017 05:08 PM, Emilio G. Cota wrote: @@ -225,31 +226,27 @@ static void cpu_exec_nocache(CPUState *cpu, int max_cycles, static void cpu_exec_step(CPUState *cpu) { CPUClass *cc = CPU_GET_CLASS(cpu); -CPUArchState *env = (CPUArchState *)cpu->env_ptr; TranslationBlock *t

[Qemu-devel] [PULL 0/1] Usb 20170720 patches

2017-07-20 Thread Gerd Hoffmann
The following changes since commit d4e59218ab80e86015753782fb5378767a51ccd0: Merge remote-tracking branch 'remotes/berrange/tags/pull-qcrypto-2017-07-18-2' into staging (2017-07-19 20:45:37 +0100) are available in the git repository at: git://git.kraxel.org/qemu tags/usb-201

Re: [Qemu-devel] [PATCH v5 01/17] migrate: Add gboolean return type to migrate_channel_process_incoming

2017-07-20 Thread Daniel P. Berrange
On Thu, Jul 20, 2017 at 03:00:23PM +0800, Peter Xu wrote: > On Wed, Jul 19, 2017 at 04:01:10PM +0100, Dr. David Alan Gilbert wrote: > > * Juan Quintela (quint...@redhat.com) wrote: > > > Signed-off-by: Juan Quintela > > > --- > > > migration/channel.c | 3 ++- > > > migration/channel.h | 2 +- >

Re: [Qemu-devel] [PATCH 0/8] usb-ccid: Misc fixes and T=1 support

2017-07-20 Thread no-reply
Hi, This series failed build test on s390x host. Please find the details below. Subject: [Qemu-devel] [PATCH 0/8] usb-ccid: Misc fixes and T=1 support Type: series Message-id: 1500539123-23884-1-git-send-email...@sfritsch.de === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked

Re: [Qemu-devel] Can I mount encrypt qcow2?

2017-07-20 Thread Daniel P. Berrange
On Thu, Jul 20, 2017 at 10:43:53AM +0800, 陳培泓 wrote: > Can I mount encrypt qcow2 file through qemu-nbd? What encryption format are you referring to ? The old AES encrypt, or the new LUKS encrypt ? The latter is the only one people should be using, and you can expose it with qemu-nbd --object

[Qemu-devel] [PATCH v2 2/8] usb-ccid: Fix USB packet generation for 64-Bytes sized packets.

2017-07-20 Thread Stefan Fritsch
From: Stefan Fritsch An USB transfer must be terminated by a packet that is shorter than the maximum USB packet size (usually 64Byte) reported by the device in its descriptor(s). Thus if the last packet of a transfer is exactly 64-Bytes long, we must send an additional zero length packet. Fix th

[Qemu-devel] [PATCH v2 0/8] usb-ccid: Misc fixes and T=1 support

2017-07-20 Thread Stefan Fritsch
From: Stefan Fritsch Sorry, I have accidentally sent an old patchset that was missing one fix. This set of changes contains fixes and extensions to allow to use ccid card passthru with a physical cardos smartcard using the T=1 protocol. Unfortunately, our vscard client program ist not public, t

[Qemu-devel] [PATCH v2 4/8] usb-ccid: Fix ATR parsing

2017-07-20 Thread Stefan Fritsch
From: Stefan Fritsch - The number of parameter set TA_i...TD_i is unlimited. The list ends if TD_i is not present or the high nibble is zero. - If at least one protocol in any of the TD bytes is non-zero, the ATR must have a checksum. - Add a missing length check before accessing TD. - Fixup

[Qemu-devel] [PATCH v2 8/8] usb-ccid: Reduce logging at level WARN

2017-07-20 Thread Stefan Fritsch
From: Stefan Fritsch Change all DPRINTF()s using (1 == WARN) to use symbolic constants. Most of these DPRINTFs are now only logging at higher log levels. This allows to use ccid's debug level 1 == WARN in normal operation. Signed-off-by: Stefan Fritsch --- hw/usb/dev-smartcard-reader.c | 37 +

[Qemu-devel] [PATCH v2 7/8] usb-ccid: Increase ccid max APDU size

2017-07-20 Thread Stefan Fritsch
From: Stefan Fritsch The emulated ccid smartcard reader has a fixed limit for APDUs from the card. Increase this to 1024. We have seen software that tries to use 768 byte APDUs. Signed-off-by: Stefan Fritsch --- hw/usb/dev-smartcard-reader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

[Qemu-devel] [PATCH v2 1/8] usb-ccid: Add support to dump all USB packets

2017-07-20 Thread Stefan Fritsch
From: Stefan Fritsch The dump can be activated by the debug command line option for the device like this "qemu ... -dev usb,ccid,debug=5" While there move the short read debug message to a higher debug level. It triggers very often and makes debug output unreadable. Signed-off-by: Stefan Fritsc

Re: [Qemu-devel] [PULL 0/8] target/alpha cleanups

2017-07-20 Thread Peter Maydell
On 19 July 2017 at 22:52, Richard Henderson wrote: > On 07/19/2017 06:57 AM, Peter Maydell wrote: >> >> On 19 July 2017 at 05:45, Richard Henderson wrote: >>> >>> The new title holder for perf top is helper_lookup_tb_ptr. >>> Those targets that have a complicated cpu_get_tb_cpu_state >>> function

Re: [Qemu-devel] Can I mount encrypt qcow2?

2017-07-20 Thread 陳培泓
oh~ I don't know can expose the LUKS encryption. I'm sure the older(AES) can't be mounted by qemu-nbd. If I encrypt by the command you recommended: > qemu-nbd --object secret,id=sec0,file=passwd.txt,format=raw \ > --image-opts driver=qcow2,file.filename= > demo.qcow2,encrypt.format=l

[Qemu-devel] [PATCH v2 6/8] usb-ccid: Fix chaining fields in CCID USB messages

2017-07-20 Thread Stefan Fritsch
From: Stefan Fritsch Incoming packets should never need chaining (bChainParamter => 0). If they ever do we will have to fix this later. Zero is still better than an uninitialized value. Warn if outgoing packets try to use chaining (wLevelParameter != 0). As we are doing APDU level exchanges, the

[Qemu-devel] [PATCH v2 5/8] usb-ccid: Fix USB descriptor

2017-07-20 Thread Stefan Fritsch
From: Stefan Fritsch - We want to support both T=0 and T=1. Additionally, note that all fields in USB descriptors are little endian and the supported protocols are in the lowest byte the of the 32-Bit dwProtocols field. - We want APDU level exchanges. This saves us from PPS exchanges and from

[Qemu-devel] [PATCH v2 3/8] usb-ccid: Set protocol parameters based on card ATR

2017-07-20 Thread Stefan Fritsch
From: Stefan Fritsch For the ATR interface bytes encoding see ISO/IEC 7816-3. For the interpretation of the protocol parameter block see the CCID specification. - Values that are not present in the ATR default to zero. - TA_1 is used to fill bmFindexDindex. - The high nibble of bmTCCKST0 must be

Re: [Qemu-devel] Can I mount encrypt qcow2?

2017-07-20 Thread Daniel P. Berrange
On Thu, Jul 20, 2017 at 05:07:49PM +0800, 陳培泓 wrote: > oh~ I don't know can expose the LUKS encryption. I'm sure the older(AES) > can't be mounted by qemu-nbd. It can be mounted, with current git master (all the commands I show below are for git master btw). You should, however, *never* use the o

Re: [Qemu-devel] [PATCH 1/5] qapi: Further enhance visitor virtual walk doc example

2017-07-20 Thread Markus Armbruster
Eric Blake writes: > Markus pointed out that the example given for virtual walks did > not discuss how to do a virtual walk of an alternate type. It > turns out that for output, we don't need to visit an alternate > (just directly visit the type that we want); and for input, > visit_start_altern

[Qemu-devel] [PATCH v3 0/3] scripts/qemu.py small fixes

2017-07-20 Thread Amador Pahim
First commit fixes the 'is_running()' method, which is not working currently. Second commit includes the qemu command line and its output when there's an exception during the launch() and the VM is not started. Last commit renames self._args to self.args. The leading underscore represents that th

[Qemu-devel] [PATCH v3 2/3] qemu.py: include debug information on launch error

2017-07-20 Thread Amador Pahim
When launching a VM, if an exception happens and the VM is not initiated, it is useful to see the qemu command line that was executed and the output of that command. Before the patch: >>> VM = qemu.QEMUMachine('../aarch64-softmmu/qemu-system-aarch64') >>> VM.launch() Traceback (most r

[Qemu-devel] [PATCH v3 3/3] qemu.py: make 'args' public

2017-07-20 Thread Amador Pahim
Let's make args public so users can extend it without feeling like abusing the internal API. Signed-off-by: Amador Pahim Reviewed-by: Fam Zheng --- scripts/qemu.py | 13 +++-- tests/qemu-iotests/iotests.py | 18 +- 2 files changed, 16 insertions(+), 15 dele

[Qemu-devel] [PATCH v3 1/3] qemu.py: fix is_running()

2017-07-20 Thread Amador Pahim
Current implementation is broken. It does not really test if the child process is running. The Popen.returncode will only be set after by a poll(), wait() or communicate(). If the Popen fails to launch a VM, the Popen.returncode will not turn to None by itself. Instead of using Popen.returncode,

[Qemu-devel] [PATCH] acpi: Add emulated sleep button

2017-07-20 Thread Stefan Fritsch
From: Stefan Fritsch Add an ACPI sleep button and QMP/HMP commands to trigger it. A sleep button is a so called "fixed hardware feature", which makes it more suitable for putting the system to sleep than a laptop lid, for example. The sleep button is disabled by default (Bit 5 in the FACP flags

Re: [Qemu-devel] [PATCH v5 09/17] migration: Start of multiple fd work

2017-07-20 Thread Peter Xu
On Mon, Jul 17, 2017 at 03:42:30PM +0200, Juan Quintela wrote: [...] > int multifd_load_setup(void) > { > int thread_count; > -uint8_t i; > > if (!migrate_use_multifd()) { > return 0; > } > thread_count = migrate_multifd_threads(); > multifd_recv_state =

Re: [Qemu-devel] [PATCH v2 3/8] usb-ccid: Set protocol parameters based on card ATR

2017-07-20 Thread Marc-André Lureau
On Thu, Jul 20, 2017 at 11:11 AM Stefan Fritsch wrote: > From: Stefan Fritsch > > For the ATR interface bytes encoding see ISO/IEC 7816-3. For the > interpretation of the protocol parameter block see the CCID > specification. > > - Values that are not present in the ATR default to zero. > - TA_1

Re: [Qemu-devel] [PATCH v2 4/8] usb-ccid: Fix ATR parsing

2017-07-20 Thread Marc-André Lureau
On Thu, Jul 20, 2017 at 11:05 AM Stefan Fritsch wrote: > From: Stefan Fritsch > > - The number of parameter set TA_i...TD_i is unlimited. The list ends > if TD_i is not present or the high nibble is zero. > - If at least one protocol in any of the TD bytes is non-zero, the > ATR must have a

Re: [Qemu-devel] [PULL v1 0/7] MMIO Exec pull request

2017-07-20 Thread Peter Maydell
On 17 July 2017 at 19:58, Dr. David Alan Gilbert wrote: > * Edgar E. Iglesias (edgar.igles...@gmail.com) wrote: >> Is there a way we can prevent migration of the RAMBlock? > > Not yet, I think we'd have to: >a) Add a flag to the RAMBlock >b) Set it/clear it on registration >c) Have a R

Re: [Qemu-devel] [PATCH 0/3] Fix NetBSD build (don't build ivshmem tools)

2017-07-20 Thread Peter Maydell
Ping for review? It would be nice to get the NetBSD host into the build-test rotation... thanks -- PMM On 14 July 2017 at 09:33, Peter Maydell wrote: > This patchset fixes the build on NetBSD by making sure we only > build the ivshmem-client and ivshmem-server tools if the host OS > actually sup

Re: [Qemu-devel] [PATCH v2 5/8] usb-ccid: Fix USB descriptor

2017-07-20 Thread Marc-André Lureau
On Thu, Jul 20, 2017 at 11:09 AM Stefan Fritsch wrote: > From: Stefan Fritsch > > - We want to support both T=0 and T=1. Additionally, note that all > fields in USB descriptors are little endian and the supported > protocols are in the lowest byte the of the 32-Bit dwProtocols field. > - We

Re: [Qemu-devel] [PATCH v5 11/17] migration: Really use multiple pages at a time

2017-07-20 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We now send several pages at a time each time that we wakeup a thread. > > Signed-off-by: Juan Quintela > > -- > > Use iovec's insead of creating the equivalent. > --- > migration/ram.c | 46 -- > 1 file

Re: [Qemu-devel] [PATCH v5 11/17] migration: Really use multiple pages at a time

2017-07-20 Thread Peter Xu
On Mon, Jul 17, 2017 at 03:42:32PM +0200, Juan Quintela wrote: [...] > static int multifd_send_page(uint8_t *address) > { > -int i; > +int i, j; > MultiFDSendParams *p = NULL; /* make happy gcc */ > +static multifd_pages_t pages; > +static bool once; > + > +if (!once) {

Re: [Qemu-devel] [PATCH v2 8/8] usb-ccid: Reduce logging at level WARN

2017-07-20 Thread Marc-André Lureau
On Thu, Jul 20, 2017 at 11:04 AM Stefan Fritsch wrote: > From: Stefan Fritsch > > Change all DPRINTF()s using (1 == WARN) to use symbolic > constants. Most of these DPRINTFs are now only logging at higher log > levels. > > This allows to use ccid's debug level 1 == WARN in normal operation. > >

Re: [Qemu-devel] [PATCH 2/5] tests: Enhance qobject output to cover partial visit

2017-07-20 Thread Markus Armbruster
Eric Blake writes: > Add a test that proves (at least when run under valgrind) that > we are correctly handling allocated memory even when a visit > is aborted in the middle for whatever other reason. > > See commit f24582d "qapi: fix double free in > qmp_output_visitor_cleanup()" for a fix that

Re: [Qemu-devel] [PULL v1 0/7] MMIO Exec pull request

2017-07-20 Thread KONRAD Frederic
On 07/20/2017 11:42 AM, Peter Maydell wrote: On 17 July 2017 at 19:58, Dr. David Alan Gilbert wrote: * Edgar E. Iglesias (edgar.igles...@gmail.com) wrote: Is there a way we can prevent migration of the RAMBlock? Not yet, I think we'd have to: a) Add a flag to the RAMBlock b) Set it

Re: [Qemu-devel] [PATCH v5 12/17] migration: Send the fd number which we are going to use for this page

2017-07-20 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We are still sending the page through the main channel, that would > change later in the series > > Signed-off-by: Juan Quintela > --- > migration/ram.c | 13 +++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/migrati

Re: [Qemu-devel] [PATCH] replace struct ucontext with ucontext_t type

2017-07-20 Thread Peter Maydell
On 19 July 2017 at 02:06, Eric Blake wrote: > On 06/29/2017 08:18 AM, Daniel P. Berrange wrote: >> On Thu, Jun 29, 2017 at 10:05:13AM +0100, Peter Maydell wrote: >>> On 28 June 2017 at 21:44, Khem Raj wrote: The ucontext_t type had a tag struct ucontext until now but newer glibc will dr

Re: [Qemu-devel] [PATCH 3/5] qapi: Visitor documentation tweak

2017-07-20 Thread Markus Armbruster
Eric Blake writes: > Make it clear that the name parameter to visit_start_struct() > has the same semantics as for visit_start_int(). > > Signed-off-by: Eric Blake > --- > include/qapi/visitor.h | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/include/qapi

Re: [Qemu-devel] [PULL v1 0/7] MMIO Exec pull request

2017-07-20 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On 17 July 2017 at 19:58, Dr. David Alan Gilbert wrote: > > * Edgar E. Iglesias (edgar.igles...@gmail.com) wrote: > >> Is there a way we can prevent migration of the RAMBlock? > > > > Not yet, I think we'd have to: > >a) Add a flag to the RAM

Re: [Qemu-devel] [PATCH 4/5] qtest: Avoid passing raw strings through hmp()

2017-07-20 Thread Markus Armbruster
Eric Blake writes: > The next patch will add __attribute__((__format__)) to hmp(), which > in turn causes gcc to warn about non-literal format strings. Rather > than risk an arbitrary string containing % being mis-handled, always > pass variable strings along with a %s format. More importantly

[Qemu-devel] [PATCH] char-fd: remove useless chr pointer

2017-07-20 Thread Marc-André Lureau
Apparently unused since it was introduced in commit a29753f8aa79a34a324afebe340182a51a5aef11. Now, it can be trivially accessed by CHARDEV() of self. Signed-off-by: Marc-André Lureau --- include/chardev/char-fd.h | 2 +- chardev/char-fd.c | 1 - 2 files changed, 1 insertion(+), 2 deletio

Re: [Qemu-devel] [PATCH v5 11/17] migration: Really use multiple pages at a time

2017-07-20 Thread Peter Xu
On Thu, Jul 20, 2017 at 05:49:47PM +0800, Peter Xu wrote: > On Mon, Jul 17, 2017 at 03:42:32PM +0200, Juan Quintela wrote: > > [...] > > > static int multifd_send_page(uint8_t *address) > > { > > -int i; > > +int i, j; > > MultiFDSendParams *p = NULL; /* make happy gcc */ > > +

Re: [Qemu-devel] [PATCH 5/5] qtest: Document calling conventions

2017-07-20 Thread Markus Armbruster
Eric Blake writes: > We have two flavors of vararg usage in qtest; make it clear that > qmp() has different semantics than hmp(), and let the compiler > enforce that hmp() is used correctly. Since qmp() only accepts > a subset of printf flags (namely, those that our JSON parser > understands), I

Re: [Qemu-devel] [PATCH v5 13/17] migration: Create thread infrastructure for multifd recv side

2017-07-20 Thread Peter Xu
On Mon, Jul 17, 2017 at 03:42:34PM +0200, Juan Quintela wrote: [...] > struct MultiFDRecvParams { > +/* not changed */ > uint8_t id; > QemuThread thread; > QIOChannel *c; > +QemuSemaphore ready; > QemuSemaphore sem; > QemuMutex mutex; > +/* proteced by param

Re: [Qemu-devel] [PATCH] vhost: fix a migration failed because ofvhost region merge

2017-07-20 Thread peng.hao2
发件人: 收件人: 抄送人: 彭浩10096742王业超10154425 日 期 :2017年07月19日 23:53 主 题 :Re: [Qemu-devel] [PATCH] vhost: fix a migration failed because ofvhost region merge On Wed, Jul 19, 2017 at 03:24:27PM +0200, Igor Mammedov wrote: > On Wed, 19 Jul 2017 12:46:13 +0100 > "Dr. David Alan Gilbert" wrote: >

Re: [Qemu-devel] [PATCH v5 13/17] migration: Create thread infrastructure for multifd recv side

2017-07-20 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We make the locking and the transfer of information specific, even if we > are still receiving things through the main thread. > > Signed-off-by: Juan Quintela > --- > migration/ram.c | 68 > ++---

Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26

2017-07-20 Thread Daniel P. Berrange
On Fri, Apr 07, 2017 at 03:38:47PM +0100, Dr. David Alan Gilbert wrote: > Hi, >Fedora 26 has gcc 7.0.1 which has the normal compliment > of new fussy warnings; so far I've posted : > > tests/check-qdict: Fix missing brackets > slirp/smb: Replace constant strings by glib string > > that fix on

Re: [Qemu-devel] [PATCH v5 14/17] migration: Delay the start of reception on main channel

2017-07-20 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > When we start multifd, we will want to delay the main channel until > the others are created. > > Signed-off-by: Juan Quintela > --- > migration/migration.c | 23 ++- > 1 file changed, 14 insertions(+), 9 deletions(-) > > diff -

Re: [Qemu-devel] [PULL v2 00/14] tcg-next patch queue

2017-07-20 Thread Peter Maydell
On 20 July 2017 at 00:34, Richard Henderson wrote: > This edition is a real mix: > * Code gen improvement for mips64 host (Jiang) > * Build fix for ppc-linux (Philippe) > * Runtime fix for tci (Philippe) > * Fix atomic helper names in debugging dumps (rth) > > * Cross-target tcg code gen

[Qemu-devel] unrecognized option --object

2017-07-20 Thread 陳培泓
I build qemu from the https://github.com/qemu/qemu, and it didn't show any errors. I tried qemu-nbd --object secret,id=sec0... but it shows unrecognized option '--object ' how to solve it?

Re: [Qemu-devel] [PATCH v5 14/17] migration: Delay the start of reception on main channel

2017-07-20 Thread Peter Xu
On Mon, Jul 17, 2017 at 03:42:35PM +0200, Juan Quintela wrote: > When we start multifd, we will want to delay the main channel until > the others are created. > > Signed-off-by: Juan Quintela > --- > migration/migration.c | 23 ++- > 1 file changed, 14 insertions(+), 9 deleti

  1   2   3   4   >