Re: [Qemu-devel] [RFC PATCH v1 10/22] sev: add SEV debug decrypt command

2016-09-14 Thread Michael S. Tsirkin
On Wed, Sep 14, 2016 at 08:45:25PM +0200, Paolo Bonzini wrote: > > > On 14/09/2016 20:15, Michael S. Tsirkin wrote: > > On Wed, Sep 14, 2016 at 06:53:22PM +0200, Paolo Bonzini wrote: > >> > >> > >> On 14/09/2016 17:02, Michael S. Tsirkin wrote: > >>> If you believe there are attackers that have

Re: [Qemu-devel] [PATCH 3/5] spapr_vio: convert to trace framework instead of DPRINTF

2016-09-14 Thread Eric Blake
On 09/14/2016 01:48 PM, Laurent Vivier wrote: > Signed-off-by: Laurent Vivier > --- > hw/ppc/spapr_vio.c | 17 +++-- > hw/ppc/trace-events | 5 + > 2 files changed, 8 insertions(+), 14 deletions(-) > > +++ b/hw/ppc/trace-events > @@ -66,6 +66,11 @@

Re: [Qemu-devel] [RFC PATCH v1 10/22] sev: add SEV debug decrypt command

2016-09-14 Thread Michael S. Tsirkin
On Wed, Sep 14, 2016 at 06:53:22PM +0200, Paolo Bonzini wrote: > > > On 14/09/2016 17:02, Michael S. Tsirkin wrote: > > If you believe there are attackers that have access to the > > monitor and nothing else, then a feature to disable debugging > > is a generally useful one. But once we merge

[Qemu-devel] [PATCH 0/5] spapr: convert SPAPR devices to trace framework

2016-09-14 Thread Laurent Vivier
Define and use trace_spapr_XXX functions instead of DPRINTF to trace some SPAPR devices: spapr_vio, spapr_drc, spapr_rtas, spapr_llan, spapr_vscsi. This allows to enable dynamically (instead of recompiling the source) the traces for these devices. Messages are close as possible as messages used

[Qemu-devel] [PATCH 4/5] spapr_llan: convert to trace framework instead of DPRINTF

2016-09-14 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- hw/net/spapr_llan.c | 61 ++--- hw/net/trace-events | 17 +++ 2 files changed, 42 insertions(+), 36 deletions(-) diff --git a/hw/net/spapr_llan.c b/hw/net/spapr_llan.c index

[Qemu-devel] [PATCH 1/5] spapr_drc: convert to trace framework instead of DPRINTF

2016-09-14 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- hw/ppc/spapr_drc.c | 54 - hw/ppc/trace-events | 22 ++ 2 files changed, 42 insertions(+), 34 deletions(-) diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c index

[Qemu-devel] [PATCH v7 0/2] qemu-qdisk: Implementation of grant copy operation.

2016-09-14 Thread Paulina Szubarczyk
Hi, It is a proposition for implementation of grant copy operation in qemu-qdisk and interface in libxc/libs. Changes since v6: qemu-qdisk: -removed blank lines -renamed functions free_buffers -> ioreq_free_copy_buffers, ioreq_copy -> ioreq_grant_copy -merged the if(ioreq_copy) with the

Re: [Qemu-devel] [PATCH v2 0/6] Prep changes for modular trace-events build

2016-09-14 Thread no-reply
Hi, Your 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. Type: series Message-id: 1473872922-23449-1-git-send-email-berra...@redhat.com Subject: [Qemu-devel] [PATCH v2 0/6] Prep

Re: [Qemu-devel] [RFC PATCH v1 10/22] sev: add SEV debug decrypt command

2016-09-14 Thread Paolo Bonzini
On 14/09/2016 21:24, Michael S. Tsirkin wrote: > Well limited protection is of a limited use :) Seriously, the point of > mitigation should be blocking classes of vulenrabilities not making > things more complex. No, not at all. The point of _mitigation_ is to _mitigate_ the danger from

Re: [Qemu-devel] [PATCH v7 00/16] cpu-exec: Safe work in quiescent state

2016-09-14 Thread Paolo Bonzini
On 14/09/2016 19:16, Richard Henderson wrote: > On 09/12/2016 04:12 AM, Paolo Bonzini wrote: >> In addition to fixing some of the issues found by Alex, safe work items >> need not run anymore with a mutex taken. Of course, cpu_exec_start/end >> and start_exclusive/end_exclusive are essentially

Re: [Qemu-devel] [RFC PATCH v1 10/22] sev: add SEV debug decrypt command

2016-09-14 Thread Paolo Bonzini
On 14/09/2016 20:15, Michael S. Tsirkin wrote: > On Wed, Sep 14, 2016 at 06:53:22PM +0200, Paolo Bonzini wrote: >> >> >> On 14/09/2016 17:02, Michael S. Tsirkin wrote: >>> If you believe there are attackers that have access to the >>> monitor and nothing else, then a feature to disable debugging

[Qemu-devel] [PATCH 2/5] spapr_rtas: convert to trace framework instead of DPRINTF

2016-09-14 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- hw/ppc/spapr_rtas.c | 30 -- hw/ppc/trace-events | 9 + 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index 27b5ad4..11cc3b9 100644 ---

[Qemu-devel] [PATCH v7 2/2] qdisk - hw/block/xen_disk: grant copy implementation

2016-09-14 Thread Paulina Szubarczyk
Copy data operated on during request from/to local buffers to/from the grant references. Before grant copy operation local buffers must be allocated what is done by calling ioreq_init_copy_buffers. For the 'read' operation, first, the qemu device invokes the read operation on local buffers and on

Re: [Qemu-devel] [PATCH 4/5] spapr_llan: convert to trace framework instead of DPRINTF

2016-09-14 Thread Eric Blake
On 09/14/2016 01:48 PM, Laurent Vivier wrote: > Signed-off-by: Laurent Vivier > --- > hw/net/spapr_llan.c | 61 > ++--- > hw/net/trace-events | 17 +++ > 2 files changed, 42 insertions(+), 36 deletions(-) > > +++

[Qemu-devel] [PATCH 3/5] spapr_vio: convert to trace framework instead of DPRINTF

2016-09-14 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- hw/ppc/spapr_vio.c | 17 +++-- hw/ppc/trace-events | 5 + 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c index 497028f..d68dd35 100644 --- a/hw/ppc/spapr_vio.c +++

Re: [Qemu-devel] [PATCH] target-i386: Fixed syscall posssible segfault

2016-09-14 Thread Paolo Bonzini
On 13/09/2016 15:23, Stanislav Shmarov wrote: > In user-mode emulation env->idt.base memory is > allocated in linux-user/main.c with > size 8*512 = 4096 (for 64-bit). > When fake interrupt EXCP_SYSCALL is thrown > do_interrupt_user checks destination privilege level > for this fake exception,

Re: [Qemu-devel] [RFC PATCH v1 06/22] sev: add initial SEV support

2016-09-14 Thread Brijesh Singh
Hi Michael, Yes policy is described in chapter 3, page 23. I am open to separate the fields. Let me know if something like this works sev-launch-rule,flags.ks=0,policy.dbg=0,policy.ks=0,policy.nosend=0,... My question is, does all of it have to be sev specific? For example, add a generic

[Qemu-devel] [Bug 1589923] Re: https websockets not working in 2.5 or 2.6

2016-09-14 Thread T. Huth
** Changed in: qemu Status: Confirmed => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1589923 Title: https websockets not working in 2.5 or 2.6 Status in QEMU: Fix Released

Re: [Qemu-devel] [PATCH 5/5] spapr_vscsi: convert to trace framework instead of DPRINTF

2016-09-14 Thread Thomas Huth
On 14.09.2016 20:48, Laurent Vivier wrote: > Signed-off-by: Laurent Vivier > --- > hw/scsi/spapr_vscsi.c | 89 > +-- > hw/scsi/trace-events | 27 > 2 files changed, 63 insertions(+), 53 deletions(-) > > diff

Re: [Qemu-devel] [PATCH v4 00/11] linux user: Fix assorted Qemu user mode issues

2016-09-14 Thread Aleksandar Markovic
OK, these patches will be removed in v5, which is pending. Thanks. Aleksandar From: Peter Maydell [peter.mayd...@linaro.org] Sent: Wednesday, September 14, 2016 12:15 PM To: Aleksandar Markovic Cc: QEMU Developers; Riku Voipio; Petar Jovanovic; Miodrag

Re: [Qemu-devel] [PATCH 5/5] spapr_vscsi: convert to trace framework instead of DPRINTF

2016-09-14 Thread Eric Blake
On 09/14/2016 01:48 PM, Laurent Vivier wrote: > Signed-off-by: Laurent Vivier > --- > hw/scsi/spapr_vscsi.c | 89 > +-- > hw/scsi/trace-events | 27 > 2 files changed, 63 insertions(+), 53 deletions(-) > >

[Qemu-devel] [PATCH v5 3/8] linux-user: Add support for sysfs() syscall

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode sysfs() syscall support. Syscall sysfs() involves returning information about the filesystem types currently present in the kernel, and can operate in three distinct flavors, depending on its first

[Qemu-devel] [PATCH v5 8/8] linux-user: Remove a duplicate item from strace.list

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic There is a duplicate item in strace.list. It is benign, but it shouldn't be there. It is the only duplicate in strace.list. This patch removes it. Signed-off-by: Aleksandar Markovic ---

[Qemu-devel] [PATCH v5 4/8] linux-user: Add support for ustat() syscall

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode ustat() syscall support. Syscall ustat() returns information about a mounted filesystem. The implementation is similar to the implementations of statfs(), fstatfs() and other related syscalls. It is

Re: [Qemu-devel] [RFC PATCH v1 06/22] sev: add initial SEV support

2016-09-14 Thread Michael S. Tsirkin
On Wed, Sep 14, 2016 at 01:46:09PM -0500, Brijesh Singh wrote: > 7) Guest owner validates the measurement. If measurement matches then we are > good to launch the guest. This should ensure that bootcode was not > compromised by hypervisor. As hypervisor can e.g. execute said code in any order

Re: [Qemu-devel] [RFC PATCH v1 22/22] loader: reload bios image on ROM reset in SEV-enabled guest

2016-09-14 Thread Brijesh Singh
On 09/13/2016 05:59 PM, Paolo Bonzini wrote: On 13/09/2016 16:50, Brijesh Singh wrote: In SEV-enabled mode we need to reload the BIOS image on loader reset, this will ensure that BIOS image gets encrypted and included as part of launch meausrement on guest reset. Just to check if I

Re: [Qemu-devel] [PATCH 05/10] block: Accept device model name for x-blockdev-insert-medium

2016-09-14 Thread Eric Blake
On 08/19/2016 11:50 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow qdev device names in all device related > commands. > > This converts x-blockdev-insert-medium to accept a qdev device name. > Since this command is

[Qemu-devel] [PATCH 2/4] exec: [tcg] Use multiple physical TB caches

2016-09-14 Thread Lluís Vilanova
The physical TB cache is split into 2^E caches, where E is the number of events with the "vcpu" and without the "disable" properties. The virtual TB cache on each vCPU uses a (potentially) different physical TB cache. This is later exploited to support different tracing event states on a

[Qemu-devel] [PATCH v5 1/8] linux-user: Add support for adjtimex() syscall

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode adjtimex() syscall support. Syscall adjtimex() reads and optionally sets parameters for a clock adjustment algorithm used in network synchonization or similar scenarios. The implementation is based

[Qemu-devel] [PATCH v5 0/8] linux user: Fix assorted Qemu user mode issues

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic v4->v5: - removed three cleanup patches v3->v4: - rebased to the latest code - added patch on clock_adjtime() support - minor commit messages improvements v2->v3: - rebased to the latest code - merged patches

[Qemu-devel] [PATCH 3/4] exec: [tcg] Switch physical TB cache based on vCPU tracing state

2016-09-14 Thread Lluís Vilanova
Uses the per-vCPU event state in CPUState->trace_dstate (a bitmap) as an index to a physical TB cache that will contain code specific to the set of dynamically enabled events. Two vCPUs tracing different events will execute code from different physical TB caches. Two vCPUs tracing the same events

Re: [Qemu-devel] [RFC PATCH v1 22/22] loader: reload bios image on ROM reset in SEV-enabled guest

2016-09-14 Thread Brijesh Singh
On 09/14/2016 03:38 PM, Paolo Bonzini wrote: On 14/09/2016 22:29, Brijesh Singh wrote: Does the guest have to check the measured data (e.g. with a hash) too, to check that it hasn't been tampered with outside the secure processor's control? Of course this would result in garbage written to

[Qemu-devel] [PATCH 0/4] trace: [tcg] Optimize per-vCPU tracing states with separate TB caches

2016-09-14 Thread Lluís Vilanova
Avoids generating TCG code to call guest code tracing events in vCPUs that are not dynamically tracing that event. Currently, events with the 'tcg' property always generate TCG code to trace that event at guest code execution time, when their dynamic tracing state is checked. This series adds a

[Qemu-devel] [PATCH 1/4] exec: [tcg] Refactor flush of per-CPU virtual TB cache

2016-09-14 Thread Lluís Vilanova
The function is reused in later patches. Signed-off-by: Lluís Vilanova --- cputlb.c|2 +- include/exec/exec-all.h |6 ++ translate-all.c |9 +++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/cputlb.c b/cputlb.c

Re: [Qemu-devel] [RFC PATCH v1 10/22] sev: add SEV debug decrypt command

2016-09-14 Thread Brijesh Singh
On 09/14/2016 03:44 PM, Paolo Bonzini wrote: On 14/09/2016 22:36, Michael S. Tsirkin wrote: Specifically with debug, if you have debug then clearly you can dump guest memory. This is what this feature is about. If we want a hypervisor that can not dump guest memory, let's add a flag like

[Qemu-devel] [PATCH 4/4] trace: [tcg] Do not generate TCG code to trace dinamically-disabled events

2016-09-14 Thread Lluís Vilanova
If an event is dynamically disabled, the TCG code that calls the execution-time tracer is not generated. Removes the overheads of execution-time tracers for dynamically disabled events. As a bonus, also avoids checking the event state when the execution-time tracer is called from TCG-generated

Re: [Qemu-devel] [Qemu-block] [PATCH 00/10] block: Accept qdev IDs in device level QMP commands

2016-09-14 Thread John Snow
On 09/14/2016 09:03 AM, Kevin Wolf wrote: Am 05.09.2016 um 17:55 hat Kevin Wolf geschrieben: Am 19.08.2016 um 18:50 hat Kevin Wolf geschrieben: In order to remove the necessity to use BlockBackend names in the external API, we already converted all block layer QMP commands on the node level

[Qemu-devel] [PATCH v5 7/8] linux-user: Fix syslog() syscall support

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic There are currently several problems related to syslog() support. For example, if the second argument "bufp" of target syslog() syscall is NULL, the current implementation always returns error code EFAULT. However, NULL is a perfectly

Re: [Qemu-devel] [PATCH 04/10] block: Accept device model name for blockdev-open/close-tray

2016-09-14 Thread Eric Blake
On 08/19/2016 11:50 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow qdev device names in all device related > commands. > > This converts blockdev-open/close-tray to accept a qdev device name. > > Signed-off-by: Kevin

Re: [Qemu-devel] [RFC PATCH v1 15/22] i386: sev: register RAM read/write ops for BIOS and PC.RAM region

2016-09-14 Thread Paolo Bonzini
On 14/09/2016 22:59, Brijesh Singh wrote: > I will look into hooking up the callback into ROM read/write ops. I was > thinking about adding a new argument in > cpu_physical_memory_write_rom_internal() > > void cpu_physical_memory_write_rom(AddressSpace *as, hwaddr addr, >

Re: [Qemu-devel] [PATCH qemu v2] tap: Allow specifying a bridge

2016-09-14 Thread Paolo Bonzini
On 13/09/2016 09:11, Alexey Kardashevskiy wrote: > The tap backend is already using qemu-bridge-helper to attach tap > interface to a bridge but (unlike the bridge backend) it always uses > the default bridge name - br0. > > This adds a "br" property support to the tap backend. > >

Re: [Qemu-devel] [RFC PATCH v1 22/22] loader: reload bios image on ROM reset in SEV-enabled guest

2016-09-14 Thread Paolo Bonzini
On 14/09/2016 23:09, Michael S. Tsirkin wrote: > > > > Does the guest have to check the measured data (e.g. with a hash) too, > > > > to check that it hasn't been tampered with outside the secure > > > > processor's control? Of course this would result in garbage written to > > > > the modified

Re: [Qemu-devel] [PATCH v2] scripts: Add a script to check for bug URLs in the git log

2016-09-14 Thread Eric Blake
On 09/14/2016 04:02 PM, Thomas Huth wrote: > Well, /bin/bash is also not really portable ... I've seen systems in the > past where bash was installed in another directory or not at all... True, but we already liberally use /bin/bash scripts elsewhere in qemu.git, so at least you wouldn't be the

Re: [Qemu-devel] [RFC PATCH v1 10/22] sev: add SEV debug decrypt command

2016-09-14 Thread Michael S. Tsirkin
On Wed, Sep 14, 2016 at 10:44:58PM +0200, Paolo Bonzini wrote: > > > On 14/09/2016 22:36, Michael S. Tsirkin wrote: > > Specifically with debug, if you have debug then clearly you > > can dump guest memory. This is what this feature is about. > > If we want a hypervisor that can not dump guest

Re: [Qemu-devel] [RFC PATCH v1 15/22] i386: sev: register RAM read/write ops for BIOS and PC.RAM region

2016-09-14 Thread Paolo Bonzini
On 14/09/2016 23:47, Brijesh Singh wrote: > > > On 09/14/2016 04:00 PM, Paolo Bonzini wrote: >> >> >> On 14/09/2016 22:59, Brijesh Singh wrote: >>> I will look into hooking up the callback into ROM read/write ops. I was >>> thinking about adding a new argument in >>>

[Qemu-devel] [PATCH v5 2/8] linux-user: Add support for clock_adjtime() syscall

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements Qemu user mode clock_adjtime() syscall support. The implementation is based on invocation of host's clock_adjtime(), and is very similar to the implementation of adjtimex() syscall support. The main difference is

[Qemu-devel] [PATCH v5 6/8] linux-user: Fix socketcall() syscall support

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic do_socketcall() function in Qemu's syscalls.c is implemented to mirror corespondant implementation of socketcall() in Linux kernel. (see kernel source file net/socket.c, definition of socketcall). However, error codes are wrong for the

[Qemu-devel] [PATCH v5 5/8] linux-user: Fix msgrcv() and msgsnd() syscalls support

2016-09-14 Thread Aleksandar Markovic
From: Aleksandar Markovic If syscalls msgrcv() and msgsnd() fail, they return E2BIG, EACCES, EAGAIN, EFAULT, EIDRM, EINTR, EINVAL, ENOMEM, or ENOMSG. By examining negative scenarios of these syscalls for Mips, it was established that ENOMSG does not have the same

Re: [Qemu-devel] [RFC PATCH v1 04/22] memattrs: add SEV debug attrs

2016-09-14 Thread Brijesh Singh
*/ #define MEMTXATTRS_UNSPECIFIED ((MemTxAttrs) { .unspecified = 1 }) +/* Access the guest memory for debug purposes */ +#define MEMTXATTRS_SEV_DEBUG ((MemTxAttrs) { .sev_debug = 1 }) #endif Just make it "debug" and MEMTXATTRS_DEBUG. Thanks, will fix in v2.

Re: [Qemu-devel] [RFC PATCH v1 10/22] sev: add SEV debug decrypt command

2016-09-14 Thread Michael S. Tsirkin
On Wed, Sep 14, 2016 at 09:58:25PM +0200, Paolo Bonzini wrote: > > > On 14/09/2016 21:24, Michael S. Tsirkin wrote: > > Well limited protection is of a limited use :) Seriously, the point of > > mitigation should be blocking classes of vulenrabilities not making > > things more complex. > > No,

[Qemu-devel] [Bug 1596009] Re: config/build problem due to libncursesw on Xenial

2016-09-14 Thread T. Huth
Closing according to comment #2. ** Changed in: qemu Status: New => 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/1596009 Title: config/build problem due to libncursesw on Xenial

Re: [Qemu-devel] [RFC PATCH v1 15/22] i386: sev: register RAM read/write ops for BIOS and PC.RAM region

2016-09-14 Thread Brijesh Singh
Hi Paolo, On 09/13/2016 06:05 PM, Paolo Bonzini wrote: On 13/09/2016 16:49, Brijesh Singh wrote: +/* Register SEV read/write ops for the guest RAM */ +if (kvm_sev_enabled()) +memory_region_set_ram_ops(ram, kvm_sev_get_ram_ops()); If you don't actually need this one except

Re: [Qemu-devel] [RFC PATCH v1 15/22] i386: sev: register RAM read/write ops for BIOS and PC.RAM region

2016-09-14 Thread Brijesh Singh
On 09/14/2016 04:00 PM, Paolo Bonzini wrote: On 14/09/2016 22:59, Brijesh Singh wrote: I will look into hooking up the callback into ROM read/write ops. I was thinking about adding a new argument in cpu_physical_memory_write_rom_internal() void cpu_physical_memory_write_rom(AddressSpace

Re: [Qemu-devel] [PATCH v2 1/6] trace: add trace event iterator APIs

2016-09-14 Thread Lluís Vilanova
Daniel P Berrange writes: > Currently methods which want to iterate over trace events, > do so using the trace_event_count() and trace_event_id() > methods. This leaks the concept of a single ID enum to > the callers. There is an alternative trace_event_pattern() > method which can be used in an

Re: [Qemu-devel] [v4 4/6] hw/iommu: AMD IOMMU interrupt remapping

2016-09-14 Thread David Kiarie
On Tue, Sep 13, 2016 at 10:38 AM, Peter Xu wrote: > On Mon, Sep 12, 2016 at 03:45:48PM +0300, David Kiarie wrote: > > > When we say cache here, we are mostly talking about GSI routes in > > > kernel, right? Since we still don't have other kind of interrupt > > > caches AFAIK.

Re: [Qemu-devel] [PATCH] memory: remove memory_region_destructor_rom_device

2016-09-14 Thread no-reply
Hi, Your 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. Type: series Message-id: 1473843994-16004-1-git-send-email-pbonz...@redhat.com Subject: [Qemu-devel] [PATCH] memory: remove

[Qemu-devel] [PATCH 0/2] scsi: Fixes around eject

2016-09-14 Thread Fam Zheng
The first patch fixes what Paolo noticed wrong earlier today. The second patch fixes a related crash with virtio-scsi data plane. It supersedes https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg02243.html Fam Zheng (2): scsi-disk: Cleaning up around tray open state virtio-scsi: Don't

[Qemu-devel] [PATCH 2/2] virtio-scsi: Don't abort when media is ejected

2016-09-14 Thread Fam Zheng
With an ejected block backend, blk_get_aio_context() would return qemu_aio_context. In this case don't assert. Signed-off-by: Fam Zheng --- hw/scsi/virtio-scsi.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/hw/scsi/virtio-scsi.c

[Qemu-devel] [PATCH 1/2] scsi-disk: Cleaning up around tray open state

2016-09-14 Thread Fam Zheng
Even if tray is not open, it can be empty (blk_is_inserted() == false). Handle both cases correctly by replacing the s->tray_open checks with blk_is_available(), which is an AND of the two. Also simplify successive checks of them into blk_is_available(), in a couple cases. Signed-off-by: Fam

Re: [Qemu-devel] [PATCH 0/2] scsi: Fixes around eject

2016-09-14 Thread Paolo Bonzini
On 14/09/2016 12:17, Fam Zheng wrote: > The first patch fixes what Paolo noticed wrong earlier today. > > The second patch fixes a related crash with virtio-scsi data plane. It > supersedes > > https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg02243.html > > Fam Zheng (2): >

Re: [Qemu-devel] [PATCH] memory: remove memory_region_destructor_rom_device

2016-09-14 Thread Fam Zheng
On Wed, 09/14 11:06, Paolo Bonzini wrote: > It is equivalent to memory_region_destructor_ram, use that one. > > Signed-off-by: Paolo Bonzini > --- > memory.c | 6 +- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/memory.c b/memory.c > index

Re: [Qemu-devel] [PATCH v2] build-sys: add make 'help' target

2016-09-14 Thread Paolo Bonzini
On 13/09/2016 16:20, Marc-André Lureau wrote: > Add a make 'help', to print a summary of the main Makefile targets. > The format is loosely inspired by Linux make 'help' output. > > Signed-off-by: Marc-André Lureau > --- > Makefile | 38

Re: [Qemu-devel] [PATCH v2] qom: Implement qom-get HMP command

2016-09-14 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > "Dr. David Alan Gilbert (git)" writes: > > > From: "Dr. David Alan Gilbert" > > > > This started off as Andreas Färber's implementation from > > March 2015, but after feedback from Paolo morphed into > >

Re: [Qemu-devel] [PATCH v2] scripts: Add a script to check for bug URLs in the git log

2016-09-14 Thread Thomas Huth
Erik, thanks a lot for your detailed review and comments ... I somewhat suspected that my shell-script-fu is crap, but now I also have the confirmation ;-) Anyway, some comments below... On 13.09.2016 18:06, Daniel P. Berrange wrote: > On Tue, Sep 13, 2016 at 10:48:46AM -0500, Eric Blake wrote:

Re: [Qemu-devel] [PATCH v2 0/3] Remove the obsolete non-blocking connect

2016-09-14 Thread Paolo Bonzini
On 14/09/2016 03:42, Cao jin wrote: > Hi Paolo, > > patch 1 seems conflicts with upstream when I rebase(conflicts with > 616018352, but very tiny). and patch 2 isn't in your pull request. Do > you want me to resend these two? No, they had bugs and Marc-André fixed them. They will be in my

Re: [Qemu-devel] [PATCH v2 4/6] trace: remove global 'uint16 dstate[]' array

2016-09-14 Thread Lluís Vilanova
Daniel P Berrange writes: > Instead of having a global dstate array, declare a single > 'uint16 TRACE_${EVENT_NAME}_DSTATE' variable for each > trace event. Record a pointer to this variable in the > TraceEvent struct too. > By turning trace_event_get_state_dynamic_by_id into a > macro, this

Re: [Qemu-devel] [PATCH v4 2/3] target-ppc: add flag in chech_tlb_flush()

2016-09-14 Thread David Gibson
On Wed, Sep 14, 2016 at 11:24:01AM +0530, Nikunj A Dadhania wrote: > We flush the qemu TLB lazily. check_tlb_flush is called whenever we hit > a context synchronizing event or instruction that requires a pending > flush to be performed. > > However, we fail to handle broadcast TLB flush

Re: [Qemu-devel] [PATCH 5/5] spapr_vscsi: convert to trace framework instead of DPRINTF

2016-09-14 Thread David Gibson
On Wed, Sep 14, 2016 at 03:09:31PM -0500, Eric Blake wrote: > On 09/14/2016 01:48 PM, Laurent Vivier wrote: > > Signed-off-by: Laurent Vivier > > --- > > hw/scsi/spapr_vscsi.c | 89 > > +-- > > hw/scsi/trace-events | 27

Re: [Qemu-devel] [PATCH] MAINTAINERS: add sPAPR tests

2016-09-14 Thread David Gibson
On Wed, Sep 14, 2016 at 01:23:57PM +0200, Greg Kurz wrote: > Signed-off-by: Greg Kurz Applied to ppc-for-2.8, thanks. > --- > MAINTAINERS |4 > 1 file changed, 4 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 13b882ba01ce..6552ccde3ee1 100644 > ---

Re: [Qemu-devel] [PATCH 5/5] spapr_vscsi: convert to trace framework instead of DPRINTF

2016-09-14 Thread David Gibson
On Wed, Sep 14, 2016 at 09:56:47PM +0200, Thomas Huth wrote: > On 14.09.2016 20:48, Laurent Vivier wrote: > > Signed-off-by: Laurent Vivier > > --- > > hw/scsi/spapr_vscsi.c | 89 > > +-- > > hw/scsi/trace-events | 27

Re: [Qemu-devel] [PATCH v4 3/3] target-ppc: tlbie/tlbivax should have global effect

2016-09-14 Thread David Gibson
On Wed, Sep 14, 2016 at 11:24:02AM +0530, Nikunj A Dadhania wrote: > tlbie (BookS) and tlbivax (BookE) plus the H_CALLs(pseries) should have > a global effect. > > Introduces TLB_NEED_GLOBAL_FLUSH flag. During lazy tlb flush, after > taking care of pending local flushes, check broadcast flush(at

Re: [Qemu-devel] [PATCH v4 1/3] target-ppc: add TLB_NEED_LOCAL_FLUSH flag

2016-09-14 Thread David Gibson
On Wed, Sep 14, 2016 at 11:24:00AM +0530, Nikunj A Dadhania wrote: You need some sort of commit message here. I'd ignore and apply anyway, except that there are some other things in later patches that will need a respin. > Signed-off-by: Nikunj A Dadhania > --- >

Re: [Qemu-devel] [PATCH 0/5] spapr: convert SPAPR devices to trace framework

2016-09-14 Thread David Gibson
On Wed, Sep 14, 2016 at 08:48:22PM +0200, Laurent Vivier wrote: > Define and use trace_spapr_XXX functions instead of > DPRINTF to trace some SPAPR devices: spapr_vio, spapr_drc, spapr_rtas, > spapr_llan, spapr_vscsi. > > This allows to enable dynamically (instead of recompiling the source) > the

Re: [Qemu-devel] [PATCH v5 2/4] adb.c: add support for QKeyCode

2016-09-14 Thread David Gibson
On Wed, Aug 17, 2016 at 10:27:48PM -0400, John Arbuckle wrote: > The old pc scancode translation is replaced with QEMU's QKeyCode. This is just > a mechanical substitution, which a number of broken mappings left in. > > Signed-off-by: John Arbuckle > --- > *v5 changes

[Qemu-devel] [PATCH] pc: apic: introduce APIC macro

2016-09-14 Thread Wanpeng Li
From: Wanpeng Li Introduce a new APIC macro to replace APIC_COMMON macro in hw/intc/apic.c in order to capture access LAPIC in qemu even if LAPIC is emulated in kvm. Suggested-by: Paolo Bonzini Cc: Paolo Bonzini Cc: Radim

Re: [Qemu-devel] [PATCH 0/5] ps2: fix keyboard set 3 and misc improvements

2016-09-14 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Type: series Message-id: 1473890265-3304-1-git-send-email-hpous...@reactos.org Subject: [Qemu-devel] [PATCH 0/5] ps2: fix keyboard set 3 and misc improvements === TEST SCRIPT BEGIN === #!/bin/bash

Re: [Qemu-devel] [PATCH RESEND v2 01/17] target-ppc: consolidate load operations

2016-09-14 Thread David Gibson
On Mon, Sep 12, 2016 at 12:11:30PM +0530, Nikunj A Dadhania wrote: > Implement macro to consolidate store operations using newer > tcg_gen_qemu_ld functions. s/store/load/, but I can fix that as I apply if I don't find anything else in the series which requires a respin. > > Signed-off-by:

Re: [Qemu-devel] [PATCH RESEND v2 00/17] POWER9 TCG enablements - part4

2016-09-14 Thread David Gibson
On Mon, Sep 12, 2016 at 12:11:29PM +0530, Nikunj A Dadhania wrote: > 1) Consolidate Load/Store operations using tcg_gen_qemu_ld/st functions > 2) This series contains 10 new instructions for POWER9 ISA3.0 >Use newer qemu load/store tcg helpers and optimize stxvw4x and lxvw4x. > > Patches: >

Re: [Qemu-devel] [PATCH RESEND v2 06/17] target-ppc: convert st[16, 32, 64]r to use new macro

2016-09-14 Thread David Gibson
On Mon, Sep 12, 2016 at 12:11:35PM +0530, Nikunj A Dadhania wrote: > Make byte-swap routines use the common GEN_QEMU_LOAD macro s/GEN_QEMU_LOAD/GEN_QEMU_STORE/ > Signed-off-by: Nikunj A Dadhania > --- > target-ppc/translate.c | 32 ++-- >

Re: [Qemu-devel] [RFC PATCH v1 22/22] loader: reload bios image on ROM reset in SEV-enabled guest

2016-09-14 Thread Paolo Bonzini
On 14/09/2016 22:29, Brijesh Singh wrote: >> Does the guest have to check the measured data (e.g. with a hash) too, >> to check that it hasn't been tampered with outside the secure >> processor's control? Of course this would result in garbage written to >> the modified page, but that might be

Re: [Qemu-devel] [RFC PATCH v1 10/22] sev: add SEV debug decrypt command

2016-09-14 Thread Paolo Bonzini
On 14/09/2016 22:36, Michael S. Tsirkin wrote: > Specifically with debug, if you have debug then clearly you > can dump guest memory. This is what this feature is about. > If we want a hypervisor that can not dump guest memory, let's > add a flag like that. Does everyone have to disable

Re: [Qemu-devel] [PATCH v2] scripts: Add a script to check for bug URLs in the git log

2016-09-14 Thread Thomas Huth
On 14.09.2016 16:44, Eric Blake wrote: > On 09/14/2016 05:35 AM, Thomas Huth wrote: >> Erik, > > It's Eric, but don't sweat it (you're not the first, and probably not > the last, to typo names) Oops, big sorry! I must have been confused by the German spelling of that name :-( > +while [ $#

Re: [Qemu-devel] [PATCH 06/10] block: Accept device model name for x-blockdev-remove-medium

2016-09-14 Thread Eric Blake
On 08/19/2016 11:50 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow qdev device names in all device related > commands. > > This converts x-blockdev-remove-medium to accept a qdev device name. > > Signed-off-by: Kevin

Re: [Qemu-devel] [PATCH 07/10] block: Accept device model name for eject

2016-09-14 Thread Eric Blake
On 08/19/2016 11:50 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow qdev device names in all device related > commands. > > This converts eject to accept a qdev device name. > > Signed-off-by: Kevin Wolf

Re: [Qemu-devel] [RFC PATCH v1 22/22] loader: reload bios image on ROM reset in SEV-enabled guest

2016-09-14 Thread Michael S. Tsirkin
On Wed, Sep 14, 2016 at 10:38:58PM +0200, Paolo Bonzini wrote: > > > On 14/09/2016 22:29, Brijesh Singh wrote: > >> Does the guest have to check the measured data (e.g. with a hash) too, > >> to check that it hasn't been tampered with outside the secure > >> processor's control? Of course this

Re: [Qemu-devel] [PATCH v2 5/6] trace: remove use of event ID enums from APIs

2016-09-14 Thread Lluís Vilanova
Daniel P Berrange writes: > Since there will shortly be multiple event groups allowed, > we can no longer use the TraceEventID and TraceEventVCPUID > enums in the trace control APIs. There will in fact be > multiple distinct enums, and the enum values will only be > required to be unique per

Re: [Qemu-devel] [PATCH v2 6/6] trace: use -1 instead of TRACE_VCPU_EVENT_COUNT as magic value

2016-09-14 Thread Lluís Vilanova
Daniel P Berrange writes: > The TraceEvent struct vcpu_id field uses the constant > TRACE_VCPU_EVENT_COUNT as a magic value to indicate this > is not a per-VCPU event. The max count value will be > different for each event group though, so this is no > longer suitable. Instead use the value

[Qemu-devel] [PATCH 1/5] ps2: reject unknown commands, instead of blindly accepting them

2016-09-14 Thread Hervé Poussineau
Signed-off-by: Hervé Poussineau --- hw/input/ps2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/input/ps2.c b/hw/input/ps2.c index a8aa36f..00a1792 100644 --- a/hw/input/ps2.c +++ b/hw/input/ps2.c @@ -290,7 +290,7 @@ void ps2_write_keyboard(void

[Qemu-devel] [PATCH 2/5] ps2: correctly handle 'get/set scancode' command

2016-09-14 Thread Hervé Poussineau
When getting scancode, current scancode must be preceded from reply ack. When setting scancode, we must reject invalid scancodes. Signed-off-by: Hervé Poussineau --- hw/input/ps2.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/input/ps2.c

Re: [Qemu-devel] [PATCH 10/10] qemu-iotests/118: Test media change with qdev name

2016-09-14 Thread Eric Blake
On 08/19/2016 11:50 AM, Kevin Wolf wrote: > We just added the option to use qdev device names in all device related > block QMP commands. This patch converts some of the test cases in 118 to > use qdev device names instead of BlockBackend names to cover the new > way. It converts cases for each of

[Qemu-devel] [PATCH 4/5] ps2: use QEMU qcodes instead of scancodes

2016-09-14 Thread Hervé Poussineau
This fixes problems with translated set 1, where most make code were wrong. This fixes problems with set 3 for extended keys (like arrows) and lot of other keys. Added a FIXME for set 3, where most keys must not (by default) deliver a break code. Detailed list of changes on untranslated set 2:

[Qemu-devel] [PATCH 0/5] ps2: fix keyboard set 3 and misc improvements

2016-09-14 Thread Hervé Poussineau
Hi, This patchset is a welcome cleanup of scancodes used in PS/2 keyboard emulation. - Patches 1 and 2 are fixes to let Linux use set 3 if instructed so. - Patch 3 makes scancodes untranslated by default and translates them if required, instead of receiving translated scancodes by default and

Re: [Qemu-devel] [PATCH 09/10] block: Accept device model name for block_set_io_throttle

2016-09-14 Thread Eric Blake
On 08/19/2016 11:50 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow qdev device names in all device related > commands. > > This converts block_set_io_throttle to accept a qdev device name. > > Signed-off-by: Kevin Wolf

Re: [Qemu-devel] [PATCH v2 2/6] trace: convert code to use event iterators

2016-09-14 Thread Lluís Vilanova
Daniel P Berrange writes: > This converts the HMP/QMP monitor API implementations > and some internal trace control methods to use the new > trace event iterator APIs. > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Daniel P. Berrange > --- >

[Qemu-devel] [PATCH 3/5] ps2: allow keycode translation for all scancode sets

2016-09-14 Thread Hervé Poussineau
Change ps2_put_keycode to get an untranslated scancode, which is translated if needed. As qemu_input_key_value_to_scancode() gives translated scancodes, untranslate them in ps2_keyboard_event first before giving them to ps2_put_keycode. Results are not changed, except for some keys in

[Qemu-devel] [PATCH 5/5] ps2: do not generate invalid key codes for unknown keys

2016-09-14 Thread Hervé Poussineau
Instead, print a warning message. Signed-off-by: Hervé Poussineau --- hw/input/ps2.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/hw/input/ps2.c b/hw/input/ps2.c index 3d7205d..5acd3ed 100644 --- a/hw/input/ps2.c +++

Re: [Qemu-devel] [PATCH 08/10] block: Accept device model name for blockdev-change-medium

2016-09-14 Thread Eric Blake
On 08/19/2016 11:50 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow qdev device names in all device related > commands. > > This converts blockdev-change-medium to accept a qdev device name. > > Signed-off-by: Kevin Wolf

Re: [Qemu-devel] [RFC PATCH v1 10/22] sev: add SEV debug decrypt command

2016-09-14 Thread Michael S. Tsirkin
On Wed, Sep 14, 2016 at 02:35:41PM -0300, Eduardo Habkost wrote: > On Wed, Sep 14, 2016 at 06:46:20PM +0300, Michael S. Tsirkin wrote: > > On Wed, Sep 14, 2016 at 04:06:33PM +0100, Daniel P. Berrange wrote: > > > On Wed, Sep 14, 2016 at 05:48:17PM +0300, Michael S. Tsirkin wrote: > > > > On Wed,

Re: [Qemu-devel] [RFC PATCH v1 15/22] i386: sev: register RAM read/write ops for BIOS and PC.RAM region

2016-09-14 Thread Brijesh Singh
On 09/14/2016 04:52 PM, Paolo Bonzini wrote: On 14/09/2016 23:47, Brijesh Singh wrote: On 09/14/2016 04:00 PM, Paolo Bonzini wrote: On 14/09/2016 22:59, Brijesh Singh wrote: I will look into hooking up the callback into ROM read/write ops. I was thinking about adding a new argument in

[Qemu-devel] [PATCH v4 1/3] target-ppc: add TLB_NEED_LOCAL_FLUSH flag

2016-09-14 Thread Nikunj A Dadhania
Signed-off-by: Nikunj A Dadhania --- target-ppc/cpu.h | 1 + target-ppc/helper_regs.h | 4 ++-- target-ppc/mmu-hash64.c | 4 ++-- target-ppc/mmu_helper.c | 6 +++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/target-ppc/cpu.h

<    1   2   3   4   5   >