[Qemu-devel] [PULL 1/1] block/nvme: fix Coverity reports

2018-02-28 Thread Fam Zheng
From: Paolo Bonzini 1) string not null terminated in sysfs_find_group_file 2) NULL pointer dereference and dead local variable in nvme_init. Signed-off-by: Paolo Bonzini Signed-off-by: Fam Zheng Message-Id: <20180213015240.9352-1-f...@redhat.com> Signed-off-by: Fam Zheng --- block/nvme.c

[Qemu-devel] [PULL 0/1] Block patches 2018-03-01

2018-02-28 Thread Fam Zheng
The following changes since commit 6697439794f72b3501ee16bb95d16854f9981421: Merge remote-tracking branch 'remotes/kraxel/tags/usb-20180227-pull-request' into staging (2018-02-27 17:50:46 +) are available in the Git repository at: git://github.com/famz/qemu.git tags/staging-pull-request

Re: [Qemu-devel] [PATCH 1/1] s390/kvm: implement clearing part of IPL clear

2018-02-28 Thread Christian Borntraeger
On 03/01/2018 04:58 AM, Thomas Huth wrote: > On 28.02.2018 20:53, Christian Borntraeger wrote: >> When a guests reboots with diagnose 308 subcode 3 it requests the memory >> to be cleared. We did not do it so far. This does not only violate the >> architecture, it also misses the chance to free u

Re: [Qemu-devel] [PATCH v8 09/21] null: Switch to .bdrv_co_block_status()

2018-02-28 Thread Vladimir Sementsov-Ogievskiy
26.02.2018 17:05, Kevin Wolf wrote: Am 24.02.2018 um 00:38 hat Eric Blake geschrieben: On 02/23/2018 11:05 AM, Kevin Wolf wrote: Am 23.02.2018 um 17:43 hat Eric Blake geschrieben: OFFSET_VALID | DATA might be excusable because I can see that it's convenient that a protocol driver refers to its

Re: [Qemu-devel] [PATCH v2] iotests: Test creating overlay when guest running

2018-02-28 Thread Fam Zheng
On Wed, 02/14 09:26, Fam Zheng wrote: > Ping? Ping?

[Qemu-devel] [PATCH] use g_path_get_basename instead of basename

2018-02-28 Thread Julia Suvorova via Qemu-devel
basename(3) and dirname(3) modify their argument and may return pointers to statically allocated memory which may be overwritten by subsequent calls. g_path_get_basename and g_path_get_dirname have no such issues, and therefore more preferable. Signed-off-by: Julia Suvorova --- fsdev/virtfs-prox

Re: [Qemu-devel] [PATCH v3 00/16] block/mirror: Add active-sync mirroring

2018-02-28 Thread Fam Zheng
On Wed, 02/28 19:04, Max Reitz wrote: > v3: [Fam] > - Patch 5: Drop shadowing ret declaration > - Patch 11: Added > - Patch 12: Add comment on how @iter is modified by > bdrv_dirty_iter_next_area() > - Patch 14: > - Squashed old patch 12 into this one > - Don't forget write_zeroes a

Re: [Qemu-devel] [PATCH] migration: Fix block failure cases

2018-02-28 Thread Peter Xu
On Wed, Feb 28, 2018 at 04:49:37PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > This fixes a couple of cases where the block migration capability > doesn't get cleared when a migration failed. > > 1) When block migration is compiled out: > (qemu) migrate -d -

Re: [Qemu-devel] [PATCH v3 11/16] test-hbitmap: Add non-advancing iter_next tests

2018-02-28 Thread Fam Zheng
On Wed, 02/28 19:05, Max Reitz wrote: > Add a function that wraps hbitmap_iter_next() and always calls it in > non-advancing mode first, and in advancing mode next. The result should > always be the same. > > By using this function everywhere we called hbitmap_iter_next() before, > we should get

[Qemu-devel] [Bug 1658141] Re: QEMU's default msrs handling causes Windows 10 64 bit to crash

2018-02-28 Thread Samuel Delarosbil
It appears this bug affects me too with very similar symptons, but this time, it's while launching the recently released game "Puyo Poyo Tetris" using Steam in the guest VM. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs

Re: [Qemu-devel] [PATCH 14/14] qio/chardev: specify gcontext for TLS handshake

2018-02-28 Thread Peter Xu
On Wed, Feb 28, 2018 at 01:22:37PM +, Daniel P. Berrangé wrote: > On Wed, Feb 28, 2018 at 01:06:33PM +0800, Peter Xu wrote: > > We allow the TLS code to be run with non-default gcontext by providing a > > new qio_channel_tls_handshake_full() API. > > > > With the new API, we can re-setup the T

[Qemu-devel] [PATCH] hw/ppc/spapr, e500: Use new property "stdout-path" for boot console

2018-02-28 Thread Nikunj A Dadhania
Linux kernel commit 2a9d832cc9aae21ea827520fef635b6c49a06c6d (of: Add bindings for chosen node, stdout-path) deprecated chosen property "linux,stdout-path" and "stdout". Introduce the new property "stdout-path" and continue supporting the older property to remain compatible with existing/older fir

[Qemu-devel] [PATCH] hw/arm: Use more CONFIG switches to decide which object files should be linked

2018-02-28 Thread Thomas Huth
A lot of ARM object files are linked into the executable unconditionally, even though we have corresponding CONFIG switches like CONFIG_PXA2XX or CONFIG_OMAP. We should make sure to use these switches in the Makefile so that the users can disable certain unwanted boards and devices more easily. Als

[Qemu-devel] Fwd: Outreachy/GSOC Aspirant for Vulkan-ize_virgl Project

2018-02-28 Thread Anusha Srivastava
Hi, Is it possible to take this project up now for Outreachy/GSOC 2018 ? Regards, Anusha Srivastava -- Forwarded message -- From: Anusha Srivastava Date: 28 February 2018 at 23:10 Subject: Re: Outreachy 2017-DecemberMarch Aspirant for Vulkan-ize_virgl Project To: Stefan Hajnoc

Re: [Qemu-devel] [PATCH 04/14] migration: let incoming side use thread context

2018-02-28 Thread Peter Xu
On Wed, Feb 28, 2018 at 09:10:58AM +, Daniel P. Berrangé wrote: > On Wed, Feb 28, 2018 at 01:06:23PM +0800, Peter Xu wrote: > > The old incoming migration is running in main thread and default > > gcontext. With the new qio_channel_add_watch_full() we can now let it > > run in the thread's own

Re: [Qemu-devel] [PATCH qemu v2] qmp: Add qom-list-properties to list QOM object properties

2018-02-28 Thread David Gibson
On Mon, Feb 26, 2018 at 07:22:59PM +1100, Alexey Kardashevskiy wrote: > There is already 'device-list-properties' which does most of the job, > however it does not handle everything returned by qom-list-types such > as machines as they inherit directly from TYPE_OBJECT and not TYPE_DEVICE. > It doe

Re: [Qemu-devel] [PATCHv3 00/12] macio: remove legacy macio_init() function

2018-02-28 Thread David Gibson
On Wed, Feb 28, 2018 at 08:32:31PM +, Mark Cave-Ayland wrote: > This patchset eliminates the legacy macio_init() function used to setup the > ESCC and PIC memory regions and instead allows the macio device to be > instantiated directly via qdev, wiring up the ESCC internally using sysbus > MMI

Re: [Qemu-devel] [PATCH 1/1] s390/kvm: implement clearing part of IPL clear

2018-02-28 Thread Thomas Huth
On 28.02.2018 20:53, Christian Borntraeger wrote: > When a guests reboots with diagnose 308 subcode 3 it requests the memory > to be cleared. We did not do it so far. This does not only violate the > architecture, it also misses the chance to free up that memory on > reboot, which would help on hos

Re: [Qemu-devel] [PATCH] vfio-ccw: license text should indicate GPL v2 or later

2018-02-28 Thread Dong Jia Shi
* Cornelia Huck [2018-02-27 18:32:51 +0100]: > The license text currently specifies "any version" of the GPL. It > is unlikely that GPL v1 was ever intended; change this to the > standard "or any later version" text. > > Cc: Dong Jia Shi > Cc: Xiao Feng Ren > Cc: Pierre Morel > Signed-off-by:

Re: [Qemu-devel] [PATCH 04/14] migration: let incoming side use thread context

2018-02-28 Thread Peter Xu
On Wed, Feb 28, 2018 at 05:43:50PM +, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > The old incoming migration is running in main thread and default > > gcontext. With the new qio_channel_add_watch_full() we can now let it > > run in the thread's own gcontext (if th

Re: [Qemu-devel] [PATCH v2 05/16] block/mirror: Convert to coroutines

2018-02-28 Thread Fam Zheng
On Wed, 02/28 18:07, Max Reitz wrote: > On 2018-02-28 15:13, Max Reitz wrote: > > On 2018-02-27 08:44, Fam Zheng wrote: > >> On Mon, 01/22 23:07, Max Reitz wrote: > >>> @@ -101,7 +105,7 @@ static BlockErrorAction > >>> mirror_error_action(MirrorBlockJob *s, bool read, > >>> } > >>> } > >>>

Re: [Qemu-devel] [PATCH v4] tap: setting error appropriately when calling net_init_tap_one()

2018-02-28 Thread Zhoujian (jay)
Ping ... > -Original Message- > From: Zhoujian (jay) > Sent: Tuesday, February 06, 2018 8:54 PM > To: qemu-devel@nongnu.org > Cc: jasow...@redhat.com; m...@redhat.com; imamm...@redhat.com; Huangweidong > (C) > ; wangxin (U) ; Gonglei > (Arei) ; Zhoujian (jay) > Subject: [PATCH v4] tap: s

Re: [Qemu-devel] [PATCH v2 0/4] vl: introduce vm_shutdown()

2018-02-28 Thread Fam Zheng
On Wed, 02/28 18:19, Stefan Hajnoczi wrote: > v2: > * Tackle the .ioeventfd_stop() vs vq handler race by removing the ioeventfd >from a BH in the IOThread [Fam] > > There are several race conditions in virtio-blk/virtio-scsi dataplane code. > This patch series addresses them, see the commit d

[Qemu-devel] [PATCH] iotests: Skip test for ENOMEM error

2018-02-28 Thread Fam Zheng
The AFL image is to exercise the code validating image size, which doesn't work on 32 bit or when out of memory (there is a large allocation before the interesting point). So check that and skip the test, instead of faking the result. Signed-off-by: Fam Zheng --- tests/qemu-iotests/059 | 5 ++---

Re: [Qemu-devel] [PATCH v3] iotests: Fix CID for VMDK afl image

2018-02-28 Thread Fam Zheng
On Wed, 02/28 18:50, Max Reitz wrote: > On 2018-02-02 06:23, Fam Zheng wrote: > > This reverts commit 76bf133c4 which updated the reference output, and > > fixed the reference image, because the code path we want to exercise is > > actually the invalid image size. > > > > The descriptor block in t

Re: [Qemu-devel] [PATCH 05/16] translate-all: iterate over TBs in a page with PAGE_FOR_EACH_TB

2018-02-28 Thread Richard Henderson
On 02/28/2018 02:50 PM, Emilio G. Cota wrote: > Is this any better? > > #define TB_FOR_EACH_TAGGED(head, tb, n, field) \ > for (n = (head) & 1, tb = (TranslationBlock *)((head) & ~1);\ > tb; tb = (TranslationBlock *)tb->field[n], n = (uintptr_t)tb & 1,

Re: [Qemu-devel] [PATCH 05/16] translate-all: iterate over TBs in a page with PAGE_FOR_EACH_TB

2018-02-28 Thread Emilio G. Cota
On Wed, Feb 28, 2018 at 13:40:15 -0800, Richard Henderson wrote: > On 02/26/2018 09:39 PM, Emilio G. Cota wrote: > > +/* list iterators for lists of tagged pointers in TranslationBlock */ > > +#define TB_FOR_EACH_TAGGED(head, tb, n, field) \ > > +for (n = (head) & 1,

[Qemu-devel] [PATCH v2 3/5] hw/gpio: Add the xlnx-pmu-iomod-gpo device

2018-02-28 Thread Alistair Francis
Signed-off-by: Alistair Francis --- include/hw/gpio/xlnx-pmu-iomod-gp.h | 52 + hw/gpio/xlnx-pmu-iomod-gp.c | 150 hw/gpio/Makefile.objs | 2 + 3 files changed, 204 insertions(+) create mode 100644 include/hw/gpio/xlnx-pm

[Qemu-devel] [PATCH v2 4/5] hw/gpio: Add support for the xlnx-pmu-iomod-gpi device

2018-02-28 Thread Alistair Francis
Add support for setting the device and either input or output. Signed-off-by: Alistair Francis --- include/hw/gpio/xlnx-pmu-iomod-gp.h | 7 - hw/gpio/xlnx-pmu-iomod-gp.c | 55 - 2 files changed, 60 insertions(+), 2 deletions(-) diff --git a/incl

[Qemu-devel] [PATCH v2 0/5] Add and connect the PMU IOModule devices

2018-02-28 Thread Alistair Francis
V2: - Add the GPO and GPI devices as well Alistair Francis (5): timer: Initial commit of xlnx-pmu-iomod-pit device xlnx-zynqmp-pmu: Connect the PMU IOMOD PIT devices hw/gpio: Add the xlnx-pmu-iomod-gpo device hw/gpio: Add support for the xlnx-pmu-iomod-gpi device xlnx-zynqmp-pmu: Conne

[Qemu-devel] [PATCH v2 5/5] xlnx-zynqmp-pmu: Connect the IOMOD GPI/GPO devices

2018-02-28 Thread Alistair Francis
Signed-off-by: Alistair Francis --- hw/microblaze/xlnx-zynqmp-pmu.c | 77 +++-- 1 file changed, 75 insertions(+), 2 deletions(-) diff --git a/hw/microblaze/xlnx-zynqmp-pmu.c b/hw/microblaze/xlnx-zynqmp-pmu.c index 35a2314ffb..fa5f0bfcf1 100644 --- a/hw/microb

[Qemu-devel] [PATCH v2 2/5] xlnx-zynqmp-pmu: Connect the PMU IOMOD PIT devices

2018-02-28 Thread Alistair Francis
Signed-off-by: Alistair Francis --- hw/microblaze/xlnx-zynqmp-pmu.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/hw/microblaze/xlnx-zynqmp-pmu.c b/hw/microblaze/xlnx-zynqmp-pmu.c index 999a5657cf..35a2314ffb 100644 --- a/hw/microblaze/xlnx-zynqmp-pmu.c

[Qemu-devel] [PATCH v2 1/5] timer: Initial commit of xlnx-pmu-iomod-pit device

2018-02-28 Thread Alistair Francis
Signed-off-by: Alistair Francis --- V2: - Use UINT32_MAX and uint64_t in xlnx_iomod_pit_ctr_pr() - Name frequency varaible frequency_hz - Shorten R_MAX #define include/hw/timer/xlnx-pmu-iomod-pit.h | 58 hw/timer/xlnx-pmu-iomod-pit.c | 241 ++

Re: [Qemu-devel] [PATCH v2 00/11] linux-user support for target/xtensa

2018-02-28 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180228221609.11265-1-jcmvb...@gmail.com Subject: [Qemu-devel] [PATCH v2 00/11] linux-user support for target/xtensa === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 tot

Re: [Qemu-devel] [PATCH 07/16] translate-all: remove hole in PageDesc

2018-02-28 Thread Richard Henderson
On 02/26/2018 09:39 PM, Emilio G. Cota wrote: > Groundwork for supporting parallel TCG generation. > > Move the hole to the end of the struct, so that a u32 > field can be added there without bloating the struct. > > Signed-off-by: Emilio G. Cota > --- > accel/tcg/translate-all.c | 2 +- > 1 fi

Re: [Qemu-devel] [PATCH 08/16] translate-all: work page-by-page in tb_invalidate_phys_range_1

2018-02-28 Thread Richard Henderson
On 02/26/2018 09:39 PM, Emilio G. Cota wrote: > So that we pass a same-page range to tb_invalidate_phys_page_range, > instead of always passing an end address that could be on a different > page. > > As discussed with Peter Maydell on the list [1], tb_invalidate_phys_page_range > doesn't actually

Re: [Qemu-devel] [PATCH 09/16] translate-all: move tb_invalidate_phys_page_range up in the file

2018-02-28 Thread Richard Henderson
On 02/26/2018 09:39 PM, Emilio G. Cota wrote: > This greatly simplifies next commit's diff. > > Signed-off-by: Emilio G. Cota > --- > accel/tcg/translate-all.c | 77 > --- > 1 file changed, 39 insertions(+), 38 deletions(-) Reviewed-by: Richard Hende

Re: [Qemu-devel] [patches] Re: [PULL] RISC-V QEMU Port Submission

2018-02-28 Thread Emilio G. Cota
On Wed, Feb 28, 2018 at 13:09:11 +1300, Michael Clark wrote: > BTW somewhat coincidentally, the binary translator I wrote; RV8, which is > practicaly twice as fast as QEMU only supports privileged ISA v1.9.1 and I > personally want to keep binary compatiblity with it. (snip) > - https://rv8.io/ > -

[Qemu-devel] [PATCH v2 11/11] MAINTAINERS: fix W: address for xtensa

2018-02-28 Thread Max Filippov
Signed-off-by: Max Filippov --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index a334a25e5df0..33c4ef0935dc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -279,7 +279,7 @@ T: git git://github.com/ehabkost/qemu.git x86-next Xtensa M

Re: [Qemu-devel] [PATCH v2 3/5] target/i386: Add support for CPUID_8000_001E for AMD

2018-02-28 Thread Moger, Babu
> -Original Message- > From: Radim Krčmář [mailto:rkrc...@redhat.com] > Sent: Wednesday, February 28, 2018 12:24 PM > To: Moger, Babu > Cc: pbonz...@redhat.com; r...@twiddle.net; ehabk...@redhat.com; > mtosa...@redhat.com; qemu-devel@nongnu.org; k...@vger.kernel.org; > p...@polepetko.eu;

[Qemu-devel] [PATCH v2 05/11] linux-user: fix mmap/munmap/mprotect/mremap/shmat

2018-02-28 Thread Max Filippov
In linux-user QEMU that runs for a target with TARGET_ABI_BITS bigger than L1_MAP_ADDR_SPACE_BITS an assertion in page_set_flags fires when mmap, munmap, mprotect, mremap or shmat is called for an address outside the guest address space. mmap and mprotect should return ENOMEM in such case. Introdu

[Qemu-devel] [PATCH v2 09/11] target/xtensa: add linux-user support

2018-02-28 Thread Max Filippov
Import list of syscalls from the kernel source. Conditionalize code/data that is only used with softmmu. Implement exception handlers. Implement signal hander (only the core registers for now, no coprocessors or TIE). Cc: Riku Voipio Cc: Laurent Vivier Signed-off-by: Max Filippov --- Changes v1

[Qemu-devel] [PATCH v2 10/11] qemu-binfmt-conf.sh: add qemu-xtensa

2018-02-28 Thread Max Filippov
Register qemu-xtensa and qemu-xtensaeb for transparent linux userspace emulation. Cc: Riku Voipio Cc: Laurent Vivier Signed-off-by: Max Filippov --- scripts/qemu-binfmt-conf.sh | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scrip

[Qemu-devel] [PATCH v2 03/11] target/xtensa: use correct number of registers in gdbstub

2018-02-28 Thread Max Filippov
System emulation should provide access to all registers, userspace emulation should only provide access to unprivileged registers. Record register flags from GDB register map definition, calculate both num_regs and num_core_regs if either is zero. Use num_regs in system emulation, num_core_regs in

[Qemu-devel] [PATCH v2 07/11] linux-user: fix target_mprotect/target_munmap error return values

2018-02-28 Thread Max Filippov
target_mprotect/target_munmap return value goes through get_errno at the call site, thus the functions must either set errno to host error code and return -1 or return negative guest error code. Do the latter. Cc: qemu-sta...@nongnu.org Cc: Riku Voipio Cc: Laurent Vivier Signed-off-by: Max Filip

[Qemu-devel] [PATCH v2 08/11] linux-user: drop unused target_msync function

2018-02-28 Thread Max Filippov
target_msync is not used, remove its declaration and implementation. Cc: Riku Voipio Cc: Laurent Vivier Signed-off-by: Max Filippov --- linux-user/mmap.c | 17 - linux-user/qemu.h | 1 - 2 files changed, 18 deletions(-) diff --git a/linux-user/mmap.c b/linux-user/mmap.c index

[Qemu-devel] [PATCH v2 01/11] target/xtensa: dump correct physical registers

2018-02-28 Thread Max Filippov
xtensa_cpu_dump_state outputs CPU physical registers as is, without synchronization from current window. That may result in different values printed for the current window and corresponding physical registers. Synchronize physical registers from window before dumping. Cc: qemu-sta...@nongnu.org Si

[Qemu-devel] [PATCH v2 02/11] target/xtensa: mark register windows in the dump

2018-02-28 Thread Max Filippov
Add arrows that mark beginning of register windows and position of the current window in the windowed register file. Signed-off-by: Max Filippov --- target/xtensa/translate.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/tr

[Qemu-devel] [PATCH v2 04/11] target/xtensa: support MTTCG

2018-02-28 Thread Max Filippov
- emit TCG barriers for MEMW, EXTW, S32RI and L32AI; - do atomic_cmpxchg_i32 for S32C1I. Cc: Emilio G. Cota Signed-off-by: Max Filippov --- configure | 1 + target/xtensa/cpu.h | 3 +++ target/xtensa/translate.c | 46 +++--- 3 file

[Qemu-devel] [PATCH v2 06/11] linux-user: fix assertion in shmdt

2018-02-28 Thread Max Filippov
shmdt fails to call mmap_lock/mmap_unlock around page_set_flags, resulting in the following assertion: page_set_flags: Assertion `have_mmap_lock()' failed. Wrap shmdt internals into mmap_lock/mmap_unlock. Cc: qemu-sta...@nongnu.org Cc: Riku Voipio Cc: Laurent Vivier Signed-off-by: Max Filippo

[Qemu-devel] [PATCH v2 00/11] linux-user support for target/xtensa

2018-02-28 Thread Max Filippov
Hello, this series adds linux-user support for target/xtensa. It starts with a small cleanup for xtensa registers dumping. It adds support for debugging linux-user process with xtensa-linux-gdb (as opposed to xtensa-elf-gdb), which can only access unprivileged registers. It then enables MTTCG for

Re: [Qemu-devel] [PATCH 06/16] translate-all: make l1_map lockless

2018-02-28 Thread Richard Henderson
On 02/26/2018 09:39 PM, Emilio G. Cota wrote: > Groundwork for supporting parallel TCG generation. > > We never remove entries from the radix tree, so we can use cmpxchg > to implement lockless insertions. > > Signed-off-by: Emilio G. Cota > --- > accel/tcg/translate-all.c | 24 ++

Re: [Qemu-devel] [PATCH v10 00/29] x86: Secure Encrypted Virtualization (AMD)

2018-02-28 Thread Brijesh Singh
Please ignore the cover letters patch count (00/29), the series contains 28 patches. thanks On 2/28/18 3:10 PM, Brijesh Singh wrote: > This patch series provides support for AMD's new Secure Encrypted > Virtualization (SEV) feature. > > SEV is an extension to the AMD-V architecture which support

[Qemu-devel] [PATCH v10 28/28] tests/qmp-test: blacklist sev specific qmp commands

2018-02-28 Thread Brijesh Singh
Blacklist the following commands to fix the 'make check' failure. query-sev-launch-measure: it returns meaninful data only when we launch SEV guest otherwise the command returns an error. query-sev: it return an error when SEV is not available on host (e.g non X86 platform or KVM is disabled at t

[Qemu-devel] [PATCH v10 27/28] sev/i386: add sev_get_capabilities()

2018-02-28 Thread Brijesh Singh
The function can be used to get the current SEV capabilities. The capabilities include platform diffie-hellman key (pdh) and certificate chain. The key can be provided to the external entities which wants to establish a trusted channel between SEV firmware and guest owner. Cc: Paolo Bonzini Cc: R

Re: [Qemu-devel] [PATCH 05/16] translate-all: iterate over TBs in a page with PAGE_FOR_EACH_TB

2018-02-28 Thread Richard Henderson
On 02/26/2018 09:39 PM, Emilio G. Cota wrote: > +/* list iterators for lists of tagged pointers in TranslationBlock */ > +#define TB_FOR_EACH_TAGGED(head, tb, n, field) \ > +for (n = (head) & 1,\ > + tb = (TranslationBlock *)(

Re: [Qemu-devel] [PATCH 00/11] linux-user support for target/xtensa

2018-02-28 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180228210616.2756-1-jcmvb...@gmail.com Subject: [Qemu-devel] [PATCH 00/11] linux-user support for target/xtensa === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$

[Qemu-devel] [PATCH v10 25/28] cpu/i386: populate CPUID 0x8000_001F when SEV is active

2018-02-28 Thread Brijesh Singh
When SEV is enabled, CPUID 0x8000_001F should provide additional information regarding the feature (such as which page table bit is used to mark the pages as encrypted etc). The details for memory encryption CPUID is available in AMD APM (https://support.amd.com/TechDocs/24594.pdf) Section E.4.17

[Qemu-devel] [PATCH v10 23/28] qmp: add query-sev-launch-measure command

2018-02-28 Thread Brijesh Singh
The command can be used by libvirt to retrieve the measurement of SEV guest. This measurement is a signature of the memory contents that was encrypted through the LAUNCH_UPDATE_DATA. Cc: "Daniel P. Berrangé" Cc: "Dr. David Alan Gilbert" Cc: Markus Armbruster Signed-off-by: Brijesh Singh --- m

[Qemu-devel] [PATCH v10 18/28] sev/i386: add support to LAUNCH_MEASURE command

2018-02-28 Thread Brijesh Singh
During machine creation we encrypted the guest bios image, the LAUNCH_MEASURE command can be used to retrieve the measurement of the encrypted memory region. This measurement is a signature of the memory contents that can be sent to the guest owner as an attestation that the memory was encrypted co

[Qemu-devel] [PATCH v10 21/28] sev/i386: add debug encrypt and decrypt commands

2018-02-28 Thread Brijesh Singh
KVM_SEV_DBG_DECRYPT and KVM_SEV_DBG_ENCRYPT commands are used for decrypting and encrypting guest memory region. The command works only if the guest policy allows the debugging. Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Brijesh Singh --- accel/kvm/kvm-all.c

[Qemu-devel] [PATCH v10 17/28] target/i386: encrypt bios rom

2018-02-28 Thread Brijesh Singh
SEV requires that guest bios must be encrypted before booting the guest. Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Brijesh Singh --- hw/i386/pc_sysfw.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/i386/pc_sysf

[Qemu-devel] [PATCH v10 16/28] sev/i386: add command to encrypt guest memory region

2018-02-28 Thread Brijesh Singh
The KVM_SEV_LAUNCH_UPDATE_DATA command is used to encrypt a guest memory region using the VM Encryption Key created using LAUNCH_START. Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Brijesh Singh --- accel/kvm/kvm-all.c | 2 ++ stubs/sev.c | 5

[Qemu-devel] [PATCH v10 15/28] sev/i386: add command to create launch memory encryption context

2018-02-28 Thread Brijesh Singh
The KVM_SEV_LAUNCH_START command creates a new VM encryption key (VEK). The encryption key created with the command will be used for encrypting the bootstrap images (such as guest bios). Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Brijesh Singh --- target/i386/s

[Qemu-devel] [PATCH v10 14/28] hmp: add 'info sev' command

2018-02-28 Thread Brijesh Singh
The command can be used to show the SEV information when memory encryption is enabled on AMD platform. Cc: Eric Blake Cc: "Daniel P. Berrangé" Cc: "Dr. David Alan Gilbert" Cc: Markus Armbruster Reviewed-by: "Dr. David Alan Gilbert" Signed-off-by: Brijesh Singh --- Hi Dave, I updated the pa

[Qemu-devel] [PATCH v10 11/28] sev/i386: add command to initialize the memory encryption context

2018-02-28 Thread Brijesh Singh
When memory encryption is enabled, KVM_SEV_INIT command is used to initialize the platform. The command loads the SEV related persistent data from non-volatile storage and initializes the platform context. This command should be first issued before invoking any other guest commands provided by the

Re: [Qemu-devel] [PATCH v2 1/5] target/i386: Fix a minor typo found while reviwing

2018-02-28 Thread Moger, Babu
> -Original Message- > From: Radim Krčmář [mailto:rkrc...@redhat.com] > Sent: Wednesday, February 28, 2018 11:38 AM > To: Moger, Babu > Cc: pbonz...@redhat.com; r...@twiddle.net; ehabk...@redhat.com; > mtosa...@redhat.com; qemu-devel@nongnu.org; k...@vger.kernel.org; > p...@polepetko.eu;

[Qemu-devel] [PATCH v10 13/28] kvm: introduce memory encryption APIs

2018-02-28 Thread Brijesh Singh
Inorder to integerate the Secure Encryption Virtualization (SEV) support add few high-level memory encryption APIs which can be used for encrypting the guest memory region. Cc: Paolo Bonzini Cc: k...@vger.kernel.org Signed-off-by: Brijesh Singh --- accel/kvm/kvm-all.c| 30 ++

[Qemu-devel] [PATCH v10 08/28] target/i386: add Secure Encrypted Virtulization (SEV) object

2018-02-28 Thread Brijesh Singh
Add a new memory encryption object 'sev-guest'. The object will be used to create enrypted VMs on AMD EPYC CPU. The object provides the properties to pass guest owner's public Diffie-hellman key, guest policy and session information required to create the memory encryption context within the SEV fi

[Qemu-devel] [PATCH v10 22/28] target/i386: clear C-bit when walking SEV guest page table

2018-02-28 Thread Brijesh Singh
In SEV-enabled guest the pte entry will have C-bit set, we need to clear the C-bit when walking the page table. Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Brijesh Singh --- target/i386/helper.c | 31 +-- target/i386/monitor.c | 68 +

[Qemu-devel] [PATCH v10 07/28] docs: add AMD Secure Encrypted Virtualization (SEV)

2018-02-28 Thread Brijesh Singh
Create a documentation entry to describe the AMD Secure Encrypted Virtualization (SEV) feature. Cc: Paolo Bonzini Signed-off-by: Brijesh Singh --- docs/amd-memory-encryption.txt | 92 ++ 1 file changed, 92 insertions(+) create mode 100644 docs/amd-memory

[Qemu-devel] [PATCH v10 24/28] sev/i386: add migration blocker

2018-02-28 Thread Brijesh Singh
SEV guest migration is not implemented yet. Signed-off-by: Brijesh Singh Reviewed-by: Dr. David Alan Gilbert --- target/i386/sev.c | 13 + 1 file changed, 13 insertions(+) diff --git a/target/i386/sev.c b/target/i386/sev.c index 23c2b6183f33..ad94eeace1b0 100644 --- a/target/i386/s

[Qemu-devel] [PATCH 09/11] target/xtensa: add linux-user support

2018-02-28 Thread Max Filippov
Import list of syscalls from the kernel source. Conditionalize code/data that is only used with softmmu. Implement exception handlers. Implement signal hander (only the core registers for now, no coprocessors or TIE). Signed-off-by: Max Filippov --- default-configs/xtensa-linux-user.mak | 1

[Qemu-devel] [PATCH v10 04/28] monitor/i386: use debug APIs when accessing guest memory

2018-02-28 Thread Brijesh Singh
Updates HMP commands to use the debug version of APIs when accessing the guest memory. Cc: Paolo Bonzini Cc: Peter Crosthwaite Cc: Richard Henderson Cc: "Dr. David Alan Gilbert" Cc: Markus Armbruster Cc: Eduardo Habkost Reviewed-by: "Dr. David Alan Gilbert" Signed-off-by: Brijesh Singh ---

[Qemu-devel] [PATCH v10 20/28] hw/i386: set ram_debug_ops when memory encryption is enabled

2018-02-28 Thread Brijesh Singh
When memory encryption is enabled, the guest RAM and boot flash ROM will contain the encrypted data. By setting the debug ops allow us to invoke encryption APIs when accessing the memory for the debug purposes. Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: "Michael S. Tsirkin"

Re: [Qemu-devel] [PATCH v2 1/5] target/i386: Fix a minor typo found while reviwing

2018-02-28 Thread Moger, Babu
> -Original Message- > From: Eric Blake [mailto:ebl...@redhat.com] > Sent: Wednesday, February 28, 2018 12:49 PM > To: Radim Krčmář ; Moger, Babu > > Cc: ehabk...@redhat.com; k...@vger.kernel.org; mtosa...@redhat.com; > Hook, Gary ; qemu-devel@nongnu.org; > pbonz...@redhat.com; p...@polep

[Qemu-devel] [PATCH 11/11] MAINTAINERS: fix W: address for xtensa

2018-02-28 Thread Max Filippov
Signed-off-by: Max Filippov --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index a334a25e5df0..33c4ef0935dc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -279,7 +279,7 @@ T: git git://github.com/ehabkost/qemu.git x86-next Xtensa M

[Qemu-devel] [PATCH v10 05/28] machine: add -memory-encryption property

2018-02-28 Thread Brijesh Singh
When CPU supports memory encryption feature, the property can be used to specify the encryption object to use when launching an encrypted guest. Cc: Paolo Bonzini Cc: Eduardo Habkost Cc: Marcel Apfelbaum Cc: Stefan Hajnoczi Signed-off-by: Brijesh Singh --- hw/core/machine.c | 22 ++

[Qemu-devel] [PATCH v10 12/28] sev/i386: register the guest memory range which may contain encrypted data

2018-02-28 Thread Brijesh Singh
When SEV is enabled, the hardware encryption engine uses a tweak such that the two identical plaintext at different location will have a different ciphertexts. So swapping or moving a ciphertexts of two guest pages will not result in plaintexts being swapped. Hence relocating a physical backing pag

[Qemu-devel] [PATCH v10 26/28] qmp: add query-sev-capabilities command

2018-02-28 Thread Brijesh Singh
The command can be used by libvirt to query the SEV capabilities. Cc: "Daniel P. Berrangé" Cc: "Dr. David Alan Gilbert" Cc: Markus Armbruster Signed-off-by: Brijesh Singh --- monitor.c | 7 +++ qapi-schema.json | 42 ++ target/i386

[Qemu-devel] [PATCH 10/11] qemu-binfmt-conf.sh: add qemu-xtensa

2018-02-28 Thread Max Filippov
Register qemu-xtensa and qemu-xtensaeb for transparent linux userspace emulation. Cc: Riku Voipio Cc: Laurent Vivier Signed-off-by: Max Filippov --- scripts/qemu-binfmt-conf.sh | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scrip

[Qemu-devel] [PATCH v10 02/28] exec: add ram_debug_ops support

2018-02-28 Thread Brijesh Singh
Currently, the guest memory access for the debug purpose is performed using the memcpy(). Lets extend the 'struct MemoryRegion' to include ram_debug_ops callbacks. The ram_debug_ops can be used to override memcpy() with something else. The feature can be used by encrypted guest -- which can regist

[Qemu-devel] [PATCH v10 10/28] include: add psp-sev.h header file

2018-02-28 Thread Brijesh Singh
The header file provide the ioctl command and structure to communicate with /dev/sev device. Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Brijesh Singh --- linux-headers/linux/psp-sev.h | 142 ++ 1 file changed, 142 inserti

[Qemu-devel] [PATCH v10 19/28] sev/i386: finalize the SEV guest launch flow

2018-02-28 Thread Brijesh Singh
SEV launch flow requires us to issue LAUNCH_FINISH command before guest is ready to run. Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Brijesh Singh --- target/i386/sev.c| 29 + target/i386/trace-events | 1 + 2 files changed,

[Qemu-devel] [PATCH 08/11] linux-user: drop unused target_msync function

2018-02-28 Thread Max Filippov
target_msync is not used, remove its declaration and implementation. Cc: Riku Voipio Cc: Laurent Vivier Signed-off-by: Max Filippov --- linux-user/mmap.c | 17 - linux-user/qemu.h | 1 - 2 files changed, 18 deletions(-) diff --git a/linux-user/mmap.c b/linux-user/mmap.c index

[Qemu-devel] [PATCH v10 03/28] exec: add debug version of physical memory read and write API

2018-02-28 Thread Brijesh Singh
Adds the following new APIs - cpu_physical_memory_read_debug - cpu_physical_memory_write_debug - cpu_physical_memory_rw_debug - ldl_phys_debug - ldq_phys_debug Cc: Paolo Bonzini Cc: Peter Crosthwaite Cc: Richard Henderson Signed-off-by: Brijesh Singh Reviewed-by: Paolo Bonzini --- exec.c

[Qemu-devel] [PATCH v10 06/28] kvm: update kvm.h to include memory encryption ioctls

2018-02-28 Thread Brijesh Singh
Updates kmv.h to include memory encryption ioctls and SEV commands. Cc: Christian Borntraeger Cc: Cornelia Huck Cc: Paolo Bonzini Signed-off-by: Brijesh Singh --- linux-headers/linux/kvm.h | 90 +++ 1 file changed, 90 insertions(+) diff --git a/lin

[Qemu-devel] [PATCH v10 09/28] qmp: add query-sev command

2018-02-28 Thread Brijesh Singh
The QMP query command can used to retrieve the SEV information when memory encryption is enabled on AMD platform. Cc: Eric Blake Cc: "Daniel P. Berrangé" Cc: "Dr. David Alan Gilbert" Cc: Markus Armbruster Signed-off-by: Brijesh Singh --- monitor.c | 7 ++ qapi-schema.json

[Qemu-devel] [PATCH 06/11] linux-user: fix assertion in shmdt

2018-02-28 Thread Max Filippov
shmdt fails to call mmap_lock/mmap_unlock around page_set_flags, resulting in the following assertion: page_set_flags: Assertion `have_mmap_lock()' failed. Wrap shmdt internals into mmap_lock/mmap_unlock. Cc: qemu-sta...@nongnu.org Cc: Riku Voipio Cc: Laurent Vivier Signed-off-by: Max Filippo

[Qemu-devel] [PATCH v10 01/28] memattrs: add debug attribute

2018-02-28 Thread Brijesh Singh
Extend the MemTxAttrs to include 'debug' flag. The flag can be used as general indicator that operation was triggered by the debugger. Later in the patch series we set the debug=1 when issuing a memory access from the gdbstub or HMP commands. This patch is prerequisite to support debugging the enc

[Qemu-devel] [PATCH v10 00/29] x86: Secure Encrypted Virtualization (AMD)

2018-02-28 Thread Brijesh Singh
This patch series provides support for AMD's new Secure Encrypted Virtualization (SEV) feature. SEV is an extension to the AMD-V architecture which supports running multiple VMs under the control of a hypervisor. The SEV feature allows the memory contents of a virtual machine (VM) to be transpare

[Qemu-devel] [PATCH 05/11] linux-user: fix mmap/munmap/mprotect/mremap/shmat

2018-02-28 Thread Max Filippov
In linux-user QEMU that runs for a target with TARGET_ABI_BITS bigger than L1_MAP_ADDR_SPACE_BITS an assertion in page_set_flags fires when mmap, munmap, mprotect, mremap or shmat is called for an address outside the guest address space. mmap and mprotect should return ENOMEM in such case. Introdu

[Qemu-devel] [PATCH 04/11] target/xtensa: support MTTCG

2018-02-28 Thread Max Filippov
- emit TCG barriers for MEMW, EXTW, S32RI and L32AI; - do atomic_cmpxchg_i32 for S32C1I. Cc: Emilio G. Cota Signed-off-by: Max Filippov --- configure | 1 + target/xtensa/cpu.h | 3 +++ target/xtensa/translate.c | 46 +++--- 3 file

[Qemu-devel] [PATCH 02/11] target/xtensa: mark register windows in the dump

2018-02-28 Thread Max Filippov
Add arrows that mark beginning of register windows and position of the current window in the windowed register file. Signed-off-by: Max Filippov --- target/xtensa/translate.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/tr

[Qemu-devel] [PATCH 07/11] linux-user: fix target_mprotect/target_munmap error return values

2018-02-28 Thread Max Filippov
target_mprotect/target_munmap return value goes through get_errno at the call site, thus the functions must either set errno to host error code and return -1 or return negative guest error code. Do the latter. Cc: qemu-sta...@nongnu.org Cc: Riku Voipio Cc: Laurent Vivier Signed-off-by: Max Filip

[Qemu-devel] [PATCH 00/11] linux-user support for target/xtensa

2018-02-28 Thread Max Filippov
Hello, this series adds linux-user support for target/xtensa. It starts with a small cleanup for xtensa registers dumping. It adds support for debugging linux-user process with xtensa-linux-gdb (as opposed to xtensa-elf-gdb), which can only access unprivileged registers. It then enables MTTCG for

[Qemu-devel] [PATCH 03/11] target/xtensa: use correct number of registers in gdbstub

2018-02-28 Thread Max Filippov
System emulation should provide access to all registers, userspace emulation should only provide access to unprivileged registers. Record register flags from GDB register map definition, calculate both num_regs and num_core_regs if either is zero. Use num_regs in system emulation, num_core_regs in

[Qemu-devel] [PATCH 01/11] target/xtensa: dump correct physical registers

2018-02-28 Thread Max Filippov
xtensa_cpu_dump_state outputs CPU physical registers as is, without synchronization from current window. That may result in different values printed for the current window and corresponding physical registers. Synchronize physical registers from window before dumping. Cc: qemu-sta...@nongnu.org Si

Re: [Qemu-devel] [PATCHv3 00/12] macio: remove legacy macio_init() function

2018-02-28 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180228203243.1413-1-mark.cave-ayl...@ilande.co.uk Subject: [Qemu-devel] [PATCHv3 00/12] macio: remove legacy macio_init() function === TEST SCRIPT BEGIN === #!/bin/bash BA

[Qemu-devel] [Bug 1738283] Re: 'Less than' (<), 'more than' (>), and 'pipe' (|) can't be typed via VNC

2018-02-28 Thread Cole Robinson
FYI this seems to be fixed with qemu.git master, I didn't track down the specific commit but there were several keymap related changes. so qemu 2.12 will be fixed ** Changed in: qemu Status: New => Fix Committed -- You received this bug notification because you are a member of qemu- devel

  1   2   3   4   >