Re: [Qemu-devel] [PATCH-for-4.2 v9 00/12] ARM virt: ACPI memory hotplug support

2019-08-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190813210539.31164-1-shameerali.kolothum.th...@huawei.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN

Re: [Qemu-devel] [PATCH] pc-bios/s390-ccw/net: fix a possible memory leak in get_uuid()

2019-08-14 Thread Thomas Huth
On 8/14/19 8:14 AM, luoyi...@cmss.chinamobile.com wrote: > There is a possible memory leak in get_uuid(). Should free allocated mem > before > return NULL. > > Signed-off-by: Yifan Luo > --- > pc-bios/s390-ccw/netmain.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git

[Qemu-devel] [PATCH v4 3/3] hw/gpio: Add in AST2600 specific implementation

2019-08-14 Thread Rashmica Gupta
The AST2600 has the same sets of 3.6v gpios as the AST2400 plus an addtional two sets of 1.8V gpios. Signed-off-by: Rashmica Gupta --- hw/gpio/aspeed_gpio.c | 188 -- slirp | 2 +- 2 files changed, 184 insertions(+), 6 deletions(-) diff

[Qemu-devel] [PATCH v4 0/3] Add Aspeed GPIO controller model

2019-08-14 Thread Rashmica Gupta
v4: - proper interupt handling thanks to Andrew - switch statements for reading and writing suggested by Peter - some small cleanups suggested by Alexey v3: - didn't have each gpio set up as an irq - now can't access set AC on ast2400 (only exists on ast2500) - added ast2600 implementation

[Qemu-devel] [PATCH-for-4.2 v2 4/6] s390x/mmu: Trace the right value if setting/getting the storage key fails

2019-08-14 Thread David Hildenbrand
We want to trace the actual return value, not "0". Reviewed-by: Cornelia Huck Signed-off-by: David Hildenbrand --- target/s390x/mmu_helper.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c index

Re: [Qemu-devel] [PATCH v2 1/4] block: introduce aio task pool

2019-08-14 Thread Vladimir Sementsov-Ogievskiy
13.08.2019 23:47, Max Reitz wrote: > On 30.07.19 16:18, Vladimir Sementsov-Ogievskiy wrote: >> Common interface for aio task loops. To be used for improving >> performance of synchronous io loops in qcow2, block-stream, >> copy-on-read, and may be other places. >> >> Signed-off-by: Vladimir

[Qemu-devel] [patch-for-4.2 PATCH v11 5/6] ppc: spapr: Handle "ibm, nmi-register" and "ibm, nmi-interlock" RTAS calls

2019-08-14 Thread Aravinda Prasad
This patch adds support in QEMU to handle "ibm,nmi-register" and "ibm,nmi-interlock" RTAS calls and sets the default value of SPAPR_CAP_FWNMI_MCE to SPAPR_CAP_ON for machine type 4.2. The machine check notification address is saved when the OS issues "ibm,nmi-register" RTAS call. This patch also

[Qemu-devel] [patch-for-4.2 PATCH v11 2/6] ppc: spapr: Introduce FWNMI capability

2019-08-14 Thread Aravinda Prasad
Introduce the KVM capability KVM_CAP_PPC_FWNMI so that the KVM causes guest exit with NMI as exit reason when it encounters a machine check exception on the address belonging to a guest. Without this capability enabled, KVM redirects machine check exceptions to guest's 0x200 vector. This patch

[Qemu-devel] [PATCH-for-4.2 v2 3/6] s390x/tcg: Flush the TLB of all CPUs on SSKE and RRBE

2019-08-14 Thread David Hildenbrand
Whenever we modify a storage key, we shuld flush the TLBs of all CPUs, so the MMU fault handling code can properly consider the changed storage key (to e.g., properly set the reference and change bit on the next accesses). These functions are barely used in modern Linux guests, so the performance

[Qemu-devel] [PATCH-for-4.2 v2 5/6] s390x/mmu: Better storage key reference and change bit handling

2019-08-14 Thread David Hildenbrand
Any access sets the reference bit. In case we have a read-fault, we should not allow writes to the TLB entry if the change bit was not already set. This is a preparation for proper storage-key reference/change bit handling in TCG and a fix for KVM whereby read accesses would set the change bit

[Qemu-devel] [patch-for-4.2 PATCH v11 3/6] target/ppc: Handle NMI guest exit

2019-08-14 Thread Aravinda Prasad
Memory error such as bit flips that cannot be corrected by hardware are passed on to the kernel for handling. If the memory address in error belongs to guest then the guest kernel is responsible for taking suitable action. Patch [1] enhances KVM to exit guest with exit reason set to KVM_EXIT_NMI

[Qemu-devel] [patch-for-4.2 PATCH v11 6/6] migration: Include migration support for machine check handling

2019-08-14 Thread Aravinda Prasad
This patch includes migration support for machine check handling. Especially this patch blocks VM migration requests until the machine check error handling is complete as (i) these errors are specific to the source hardware and is irrelevant on the target hardware, (ii) these errors cause data

Re: [Qemu-devel] [PATCH v3 3/3] hw/gpio: Add in AST2600 specific implementation

2019-08-14 Thread Rashmica Gupta
Thanks for the feedback! I fixed up all the things you mentioned in v4. On Tue, 2019-08-13 at 17:31 +1000, Alexey Kardashevskiy wrote: > > On 30/07/2019 15:45, Rashmica Gupta wrote: > > The AST2600 has the same sets of 3.6v gpios as the AST2400 plus an > > addtional two sets of 1.8V gpios. > >

Re: [Qemu-devel] [PATCH] pc-bios/s390-ccw/net: fix a possible memory leak in get_uuid()

2019-08-14 Thread Cornelia Huck
On Wed, 14 Aug 2019 14:14:26 +0800 wrote: > There is a possible memory leak in get_uuid(). Should free allocated mem > before > return NULL. > > Signed-off-by: Yifan Luo > --- > pc-bios/s390-ccw/netmain.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/pc-bios/s390-ccw/netmain.c

[Qemu-devel] [patch-for-4.2 PATCH v11 1/6] Wrapper function to wait on condition for the main loop mutex

2019-08-14 Thread Aravinda Prasad
Introduce a wrapper function to wait on condition for the main loop mutex. This function atomically releases the main loop mutex and causes the calling thread to block on the condition. This wrapper is required because qemu_global_mutex is a static variable. Signed-off-by: Aravinda Prasad

[Qemu-devel] [patch-for-4.2 PATCH v11 0/6] target-ppc/spapr: Add FWNMI support in QEMU for PowerKVM guests

2019-08-14 Thread Aravinda Prasad
This patch set adds support for FWNMI in PowerKVM guests. System errors such as SLB multihit and memory errors that cannot be corrected by hardware is passed on to the kernel for handling by raising machine check exception (an NMI). Upon such machine check exceptions, if the address in error

[Qemu-devel] [patch-for-4.2 PATCH v11 4/6] target/ppc: Build rtas error log upon an MCE

2019-08-14 Thread Aravinda Prasad
Upon a machine check exception (MCE) in a guest address space, KVM causes a guest exit to enable QEMU to build and pass the error to the guest in the PAPR defined rtas error log format. This patch builds the rtas error log, copies it to the rtas_addr and then invokes the guest registered machine

Re: [Qemu-devel] [PATCH 1/2] block/raw-format: switch to BDRV_BLOCK_DATA with BDRV_BLOCK_RECURSE

2019-08-14 Thread Vladimir Sementsov-Ogievskiy
13 авг. 2019 г. 19:32 пользователь Vladimir Sementsov-Ogievskiy написал: 13.08.2019 19:08, Kevin Wolf wrote: > Am 13.08.2019 um 17:54 hat Vladimir Sementsov-Ogievskiy geschrieben: >> 13.08.2019 18:41, Kevin Wolf wrote: >>> Am 13.08.2019 um 16:43 hat Max Reitz geschrieben: On 13.08.19

Re: [Qemu-devel] [qemu-s390x] [PATCH-for-4.2 v1 5/6] s390x/mmu: Better storage key reference and change bit handling

2019-08-14 Thread David Hildenbrand
On 13.08.19 16:54, Cornelia Huck wrote: > On Mon, 12 Aug 2019 13:27:36 +0200 > David Hildenbrand wrote: > >> Any access sets the reference bit. In case we have a read-fault, we >> should not allow writes to the TLB entry if the change bit was not >> already set. >> >> This is a preparation for

Re: [Qemu-devel] [PATCH v3 1/3] hw/gpio: Add basic Aspeed GPIO model for AST2400 and AST2500

2019-08-14 Thread Rashmica Gupta
On Tue, 2019-08-06 at 14:57 +0100, Peter Maydell wrote: > On Tue, 30 Jul 2019 at 06:45, Rashmica Gupta > wrote: > > GPIO pins are arranged in groups of 8 pins labeled > > A,B,..,Y,Z,AA,AB,AC. > > (Note that the ast2400 controller only goes up to group AB). > > A set has four groups (except set AC

[Qemu-devel] [PATCH-for-4.2 v2 6/6] s390x/mmu: Factor out storage key handling

2019-08-14 Thread David Hildenbrand
Factor it out, add a comment how it all works, and also use it in the REAL MMU. Reviewed-by: Cornelia Huck Signed-off-by: David Hildenbrand --- target/s390x/mmu_helper.c | 113 +++--- 1 file changed, 69 insertions(+), 44 deletions(-) diff --git

[Qemu-devel] [PATCH v4 1/3] hw/gpio: Add basic Aspeed GPIO model for AST2400 and AST2500

2019-08-14 Thread Rashmica Gupta
GPIO pins are arranged in groups of 8 pins labeled A,B,..,Y,Z,AA,AB,AC. (Note that the ast2400 controller only goes up to group AB). A set has four groups (except set AC which only has one) and is referred to by the groups it is composed of (eg ABCD,EFGH,...,YZAAAB). Each set is accessed and

[Qemu-devel] [PATCH v4 2/3] aspeed: add a GPIO controller to the SoC

2019-08-14 Thread Rashmica Gupta
Signed-off-by: Rashmica Gupta --- hw/arm/aspeed_soc.c | 17 + include/hw/arm/aspeed_soc.h | 3 +++ 2 files changed, 20 insertions(+) diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c index c6fb3700f2..ff422c8ad1 100644 --- a/hw/arm/aspeed_soc.c +++

[Qemu-devel] [PATCH-for-4.2 v2 2/6] s390x/tcg: Rework MMU selection for instruction fetches

2019-08-14 Thread David Hildenbrand
Instructions are always fetched from primary address space, except when in home address mode. Perform the selection directly in cpu_mmu_index(). get_mem_index() is only used to perform data access, instructions are fetched via cpu_lduw_code(), which translates to cpu_mmu_index(env, true). We

[Qemu-devel] [PATCH-for-4.2 v2 1/6] s390x/mmu: ASC selection in s390_cpu_get_phys_page_debug()

2019-08-14 Thread David Hildenbrand
Let's select the ASC before calling the function. This is a prepararion to remove the ASC magic depending on the access mode from mmu_translate. There is currently no way to distinguish if we have code or data access. For now, we were using code access, because especially when debugging with the

[Qemu-devel] [PATCH-for-4.2 v2 0/6] s390x/mmu: Storage key reference and change bit handling

2019-08-14 Thread David Hildenbrand
The first two patches are modified patches from: [PATCH-for-4.2 v1 0/9] s390x: MMU changes and extensions This series primarily fixes minor things in the storage key handling code in the MMU and implements fairly reliable reference and change bit handling for TCG. To track the reference and

Re: [Qemu-devel] [PATCH 0/6] Fix multifd with big number of channels

2019-08-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190814020218.1868-1-quint...@redhat.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash make

[Qemu-devel] [PATCH v4] scsi: lsi: exit infinite loop while executing script (CVE-2019-12068)

2019-08-14 Thread P J P
From: Prasad J Pandit When executing script in lsi_execute_script(), the LSI scsi adapter emulator advances 's->dsp' index to read next opcode. This can lead to an infinite loop if the next opcode is empty. Exit such loop after 10k iterations. Reported-by: Bugs SysSec Signed-off-by: Prasad J

Re: [Qemu-devel] [PATCH] xhci: Add No Op Command

2019-08-14 Thread Gerd Hoffmann
On Sat, Jul 20, 2019 at 03:04:27PM +0900, hikaru...@gmail.com wrote: > From: Hikaru Nishida > > This commit adds No Op Command (23) to xHC for verifying the operation > of the Command Ring mechanisms. > No Op Command is defined in XHCI spec (4.6.2) and just reports Command > Completion Event

Re: [Qemu-devel] [PATCH 4/4] configure: Log the libssh version detected

2019-08-14 Thread Richard W.M. Jones
The series seems fine, so: Acked-by: Richard W.M. Jones If it was me I'd be inclined to file a bug against Ubuntu and get them to fix their broken package instead :-) Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and

Re: [Qemu-devel] [PATCH v4] migration: do not rom_reset() during incoming migration

2019-08-14 Thread Paolo Bonzini
On 14/08/19 12:40, Catherine Ho wrote: > Hi Paolo > Ping, is any other comment I hadn't addressed? No, I queued the patch now. Paolo > Cheers > Catherine > > On Thu, 6 Jun 2019 at 02:31, Dr. David Alan Gilbert > wrote: > > Paolo, can you take this one please.

Re: [Qemu-devel] [RFC PATCH 1/4] configure: Improve libssh check

2019-08-14 Thread Pino Toscano
On Wednesday, 14 August 2019 14:15:24 CEST Philippe Mathieu-Daudé wrote: > The libssh pkg-config is not complete, the libraries required to > link with libssh are not returned. For example on Ubuntu 18.04: > > $ dpkg -l|fgrep libssh > ii libssh-4:arm64 0.8.0~20170825.94fa1e38-1ubuntu0.2 arm64

Re: [Qemu-devel] [PATCH 2/4] configure: Avoid using libssh deprecated API

2019-08-14 Thread Pino Toscano
On Wednesday, 14 August 2019 14:15:25 CEST Philippe Mathieu-Daudé wrote: > The libssh packaged by a distribution can predate version 0.8, > but still provides the newer API introduced after version 0.7. > > Using the deprecated API leads to build failure, as on Ubuntu 18.04: > > CC

Re: [Qemu-devel] [PATCH v2 6/7] target/riscv: rationalise softfloat includes

2019-08-14 Thread Alex Bennée
Palmer Dabbelt writes: > On Fri, 09 Aug 2019 18:55:42 PDT (-0700), alistai...@gmail.com wrote: >> On Fri, Aug 9, 2019 at 2:22 AM Alex Bennée wrote: >>> >>> We should avoid including the whole of softfloat headers in cpu.h and >>> explicitly include it only where we will be calling softfloat

Re: [Qemu-devel] [PATCH v2] riscv: rv32: Root page table address can be larger than 32-bit

2019-08-14 Thread Bin Meng
Hi Palmer, On Sat, Aug 10, 2019 at 9:49 AM Alistair Francis wrote: > > On Wed, Aug 7, 2019 at 7:50 PM Bin Meng wrote: > > > > For RV32, the root page table's PPN has 22 bits hence its address > > bits could be larger than the maximum bits that target_ulong is > > able to represent. Use hwaddr

Re: [Qemu-devel] [PATCH-for-4.2 v2 3/6] s390x/tcg: Flush the TLB of all CPUs on SSKE and RRBE

2019-08-14 Thread David Hildenbrand
On 14.08.19 12:06, Alex Bennée wrote: > > David Hildenbrand writes: > >> Whenever we modify a storage key, we shuld flush the TLBs of all CPUs, >> so the MMU fault handling code can properly consider the changed storage >> key (to e.g., properly set the reference and change bit on the next >>

Re: [Qemu-devel] [PATCH v3 1/2] scsi: lsi: exit infinite loop while executing script (CVE-2019-12068)

2019-08-14 Thread Paolo Bonzini
On 14/08/19 12:25, P J P wrote: > +-- On Tue, 13 Aug 2019, Paolo Bonzini wrote --+ > | After the first instruction is processed, "again" is only reached if > | s->waiting == LSI_NOWAIT. Therefore, we could move the Windows hack to the > | beginning and remove the s->waiting condition. The only

Re: [Qemu-devel] [PATCH 1/6] migration: Add traces for multifd terminate threads

2019-08-14 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert and queued > --- > migration/ram.c| 4 > migration/trace-events | 2 ++ > 2 files changed, 6 insertions(+) > > diff --git a/migration/ram.c b/migration/ram.c > index

Re: [Qemu-devel] [PATCH 1/1] x86: add CPU flags supported inside libvirt

2019-08-14 Thread Jiri Denemark
On Thu, Jul 18, 2019 at 16:45:37 +0300, Denis V. Lunev wrote: > There are the following flags available in libvirt inside cpu_map.xm > > > > > > > We have faced the problem that QEMU does not start once these flags are > present in the domain.xml. Libvirt should

Re: [Qemu-devel] [PATCH] usbredir: fix buffer-overflow on vmload

2019-08-14 Thread Gerd Hoffmann
On Wed, Aug 07, 2019 at 12:40:48PM +0400, Marc-André Lureau wrote: > If interface_count is NO_INTERFACE_INFO, let's not access the arrays > out-of-bounds. > > ==994==ERROR: AddressSanitizer: heap-buffer-overflow on address > 0x625000243930 at pc 0x5642068086a8 bp 0x7f0b6f9ffa50 sp 0x7f0b6f9ffa40

Re: [Qemu-devel] [PATCH v3 1/2] scsi: lsi: exit infinite loop while executing script (CVE-2019-12068)

2019-08-14 Thread P J P
+-- On Wed, 14 Aug 2019, Paolo Bonzini wrote --+ | On 14/08/19 12:25, P J P wrote: | > Should I send a revised patch? (with above change) | | Yes, please. Sent v4. Thank you. -- Prasad J Pandit / Red Hat Product Security Team 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F

Re: [Qemu-devel] [PATCH 1/1] usb-redir: merge interrupt packets

2019-08-14 Thread Gerd Hoffmann
On Wed, Jul 24, 2019 at 02:58:59PM +0200, Martin Cerveny wrote: > Interrupt packets (limited by wMaxPacketSize) should be buffered and merged > by algorithm described in USB spec. > (see usb_20.pdf/5.7.3 Interrupt Transfer Packet Size Constraints). Added to usb patch queue. thanks, Gerd

[Qemu-devel] [PATCH 0/4] configure: Fix libssh on Ubuntu 18.04

2019-08-14 Thread Philippe Mathieu-Daudé
Since a long time occured between libssh 0.7 and libssh 0.8, distributions went cherry-picking improvments from the trunk branch into their 0.7 branch, leading to packages versioned as 0.7 but having 0.8 features. This series fixes the oddest combination found so far, packaged with Ubuntu 18.04.

[Qemu-devel] [PATCH 3/4] configure: Improve checking libssh version is 0.8

2019-08-14 Thread Philippe Mathieu-Daudé
To figure out which libssh version is installed, checking for ssh_get_server_publickey() is not sufficient. ssh_get_server_publickey() has been introduced in libssh commit bbd052202 (predating 0.8) but distributions also backported other pre-0.8 patches, such libssh commit 963c46e4f which

[Qemu-devel] [PATCH 2/4] configure: Avoid using libssh deprecated API

2019-08-14 Thread Philippe Mathieu-Daudé
The libssh packaged by a distribution can predate version 0.8, but still provides the newer API introduced after version 0.7. Using the deprecated API leads to build failure, as on Ubuntu 18.04: CC block/ssh.o block/ssh.c: In function 'check_host_key_hash': block/ssh.c:444:5: error:

[Qemu-devel] [RFC PATCH 1/4] configure: Improve libssh check

2019-08-14 Thread Philippe Mathieu-Daudé
The libssh pkg-config is not complete, the libraries required to link with libssh are not returned. For example on Ubuntu 18.04: $ dpkg -l|fgrep libssh ii libssh-4:arm64 0.8.0~20170825.94fa1e38-1ubuntu0.2 arm64 tiny C SSH library (OpenSSL flavor) ii libssh-dev

[Qemu-devel] [PATCH 4/4] configure: Log the libssh version detected

2019-08-14 Thread Philippe Mathieu-Daudé
Log wether the version is 0.7 or 0.8 to better understand user reports. Signed-off-by: Philippe Mathieu-Daudé --- configure | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 040aa8eb6c..d06cee0ba0 100755 --- a/configure +++ b/configure @@

Re: [Qemu-devel] [PATCH v4 1/3] hw/gpio: Add basic Aspeed GPIO model for AST2400 and AST2500

2019-08-14 Thread Cédric Le Goater
On 14/08/2019 09:14, Rashmica Gupta wrote: > GPIO pins are arranged in groups of 8 pins labeled A,B,..,Y,Z,AA,AB,AC. > (Note that the ast2400 controller only goes up to group AB). > A set has four groups (except set AC which only has one) and is > referred to by the groups it is composed of (eg

Re: [Qemu-devel] [PATCH v4 2/3] aspeed: add a GPIO controller to the SoC

2019-08-14 Thread Cédric Le Goater
On 14/08/2019 09:14, Rashmica Gupta wrote: > Signed-off-by: Rashmica Gupta > --- > hw/arm/aspeed_soc.c | 17 + > include/hw/arm/aspeed_soc.h | 3 +++ > 2 files changed, 20 insertions(+) > > diff --git a/hw/arm/aspeed_soc.c b/hw/arm/aspeed_soc.c > index

Re: [Qemu-devel] [PATCH v4 3/3] hw/gpio: Add in AST2600 specific implementation

2019-08-14 Thread Cédric Le Goater
On 14/08/2019 09:14, Rashmica Gupta wrote: > The AST2600 has the same sets of 3.6v gpios as the AST2400 plus an > addtional two sets of 1.8V gpios. > > Signed-off-by: Rashmica Gupta > --- > hw/gpio/aspeed_gpio.c | 188 -- > slirp | 2 +-

Re: [Qemu-devel] [PATCH] test-bitmap: test set 1 bit case for bitmap_set

2019-08-14 Thread Paolo Bonzini
On 14/08/19 02:27, Wei Yang wrote: > All current bitmap_set test cases set range across word, while the > handle of a range within one word is different from that. > > Add case to set 1 bit as a represent for set range within one word. > > Signed-off-by: Wei Yang > > --- > Thanks for Paolo's

Re: [Qemu-devel] [PATCH 3/4] configure: Improve checking libssh version is 0.8

2019-08-14 Thread Pino Toscano
On Wednesday, 14 August 2019 14:15:26 CEST Philippe Mathieu-Daudé wrote: > To figure out which libssh version is installed, checking for > ssh_get_server_publickey() is not sufficient. > > ssh_get_server_publickey() has been introduced in libssh > commit bbd052202 (predating 0.8) but

Re: [Qemu-devel] [Qemu-block] [PATCH 2/2] qapi: deprecate implicit filters

2019-08-14 Thread Maxim Levitsky
On Wed, 2019-08-14 at 15:27 -0400, John Snow wrote: > > On 8/14/19 6:07 AM, Vladimir Sementsov-Ogievskiy wrote: > > To get rid of implicit filters related workarounds in future let's > > deprecate them now. > > > > Signed-off-by: Vladimir Sementsov-Ogievskiy > > --- > > qemu-deprecated.texi

[Qemu-devel] [RFC PATCH v3 05/46] target/i386: use prefix from DisasContext

2019-08-14 Thread Jan Bobek
Reduce scope of the local variable prefixes to enforce use of prefix from DisasContext instead. Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Jan Bobek --- target/i386/translate.c | 113 1 file changed, 57 insertions(+),

[Qemu-devel] [RFC PATCH v3 15/46] target/i386: introduce function ck_cpuid

2019-08-14 Thread Jan Bobek
Introduce a helper function to take care of instruction CPUID checks. Signed-off-by: Jan Bobek --- target/i386/translate.c | 48 + 1 file changed, 48 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.c index

[Qemu-devel] [RFC PATCH v3 45/46] target/i386: introduce SSE3 code generators

2019-08-14 Thread Jan Bobek
Introduce code generators required by SSE3 instructions. Signed-off-by: Jan Bobek --- target/i386/translate.c | 64 + 1 file changed, 64 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.c index c72138014a..9da3fbb611 100644 ---

[Qemu-devel] [RFC PATCH v3 20/46] target/i386: introduce tcg_temp operands

2019-08-14 Thread Jan Bobek
TCG temporary operands allocate a 32-bit or 64-bit TCG temporary, and later automatically free it. Signed-off-by: Jan Bobek --- target/i386/translate.c | 44 + 1 file changed, 44 insertions(+) diff --git a/target/i386/translate.c

[Qemu-devel] [PATCH v1 2/2] tb-stats: adding TBStatistics info into perf dump

2019-08-14 Thread vandersonmr
Adding TBStatistics information to linux perf TB's symbol names. This commit depends on the following PATCH: [PATCH v5 00/10] Measure Tiny Code Generation Quality Signed-off-by: Vanderson M. do Rosario --- accel/tcg/perf/jitdump.c | 15 ++- 1 file changed, 14 insertions(+), 1

[Qemu-devel] [PATCH v5 01/10] accel: introducing TBStatistics structure

2019-08-14 Thread vandersonmr
To store statistics for each TB, we created a TBStatistics structure which is linked with the TBs. TBStatistics can stay alive after tb_flush and be relinked to a regenerated TB. So the statistics can be accumulated even through flushes. The goal is to have all present and future qemu/tcg

[Qemu-devel] [RFC PATCH v3 32/46] target/i386: introduce gvec-based code generator macros

2019-08-14 Thread Jan Bobek
Code generators defined using these macros rely on a gvec operation (i.e. tcg_gen_gvec_*). Signed-off-by: Jan Bobek --- target/i386/translate.c | 13 + 1 file changed, 13 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.c index b28d651b82..75652afb45

Re: [Qemu-devel] [PATCH 00/13] RFC: luks/encrypted qcow2 key management

2019-08-14 Thread Eric Blake
On 8/14/19 3:22 PM, Maxim Levitsky wrote: > This is an issue that was raised today on IRC with Kevin Wolf. Really thanks > for the idea! > > We agreed that this new qmp interface should take the same options as > blockdev-create does, however since we want to be able to edit the encryption >

[Qemu-devel] [RFC PATCH v3 11/46] target/i386: introduce gen_(ld, st)d_env_A0

2019-08-14 Thread Jan Bobek
Similar in spirit to the already present gen_(ld,st)(q,o)_env_A0, it will prove useful in later commits for smaller-sized vector loads. Reviewed-by: Richard Henderson Signed-off-by: Jan Bobek --- target/i386/translate.c | 12 1 file changed, 12 insertions(+) diff --git

[Qemu-devel] [RFC PATCH v3 35/46] target/i386: introduce MMX translators

2019-08-14 Thread Jan Bobek
Use the translator macros to define instruction translators required by MMX instructions. Signed-off-by: Jan Bobek --- target/i386/translate.c | 16 1 file changed, 16 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.c index 76c27d0380..4fecb0d240

[Qemu-devel] [RFC PATCH v3 28/46] target/i386: introduce P*, N*, Q* (MMX) operands

2019-08-14 Thread Jan Bobek
These address the MMX-technology register file; the corresponding cpu_env offset is passed as the operand value. Notably, offset of the entire register is pased at all times, regardless of the operand-size suffix. Signed-off-by: Jan Bobek --- target/i386/translate.c | 79

[Qemu-devel] [PATCH v5 10/10] linux-user: dumping hot TBs at the end of the execution

2019-08-14 Thread vandersonmr
dumps, in linux-user mode, the hottest TBs if -d tb_stats is used. Signed-off-by: Vanderson M. do Rosario --- linux-user/exit.c | 4 1 file changed, 4 insertions(+) diff --git a/linux-user/exit.c b/linux-user/exit.c index bdda720553..7226104959 100644 --- a/linux-user/exit.c +++

[Qemu-devel] [RFC PATCH v3 34/46] target/i386: introduce instruction translator macros

2019-08-14 Thread Jan Bobek
Instruction "translators" are responsible for decoding and loading instruction operands, calling the passed-in code generator, and storing the operands back (if applicable). Once a translator returns, the instruction has been translated to TCG ops, hence the name. Signed-off-by: Jan Bobek ---

[Qemu-devel] [RFC PATCH v3 33/46] target/i386: introduce sse-opcode.inc.h

2019-08-14 Thread Jan Bobek
This header is intended to eventually list all supported instructions along with some useful details (e.g. mnemonics, opcode, operands etc.) It shall be used (along with some preprocessor magic) anytime we need to automatically generate code for every instruction. Signed-off-by: Jan Bobek ---

[Qemu-devel] [PATCH v5 08/10] Adding info [tbs|tb|coverset] commands to HMP. These commands allow the exploration of TBs generated by the TCG. Understand which one hotter, with more guest/host instruc

2019-08-14 Thread vandersonmr
The goal of this command is to allow the dynamic exploration of TCG behavior and code quality. Therefore, for now, a corresponding QMP command is not worthwhile. Signed-off-by: Vanderson M. do Rosario --- accel/tcg/tb-stats.c | 398 ++-

[Qemu-devel] [PATCH v5 04/10] accel: replacing part of CONFIG_PROFILER with TBStats

2019-08-14 Thread vandersonmr
We add some of the statistics collected in the TCGProfiler into the TBStats, having the statistics not only for the whole emulation but for each TB. Then, we removed these stats from TCGProfiler and reconstruct the information for the "info jit" using the sum of all TBStats statistics. The goal

[Qemu-devel] [PATCH v5 00/10] Measure Tiny Code Generation Quality

2019-08-14 Thread vandersonmr
This patch is part of Google Summer of Code (GSoC) 2019. More about the project can be found in: https://wiki.qemu.org/Internships/ProjectIdeas/TCGCodeQuality The goal of this patch is to add infrastructure to collect execution and JIT statistics during the emulation with accel/TCG. The

Re: [Qemu-devel] [PATCH v9 05/11] numa: Extend CLI to provide initiator information for numa nodes

2019-08-14 Thread Dan Williams
On Tue, Aug 13, 2019 at 10:14 PM Tao Xu wrote: > > On 8/14/2019 10:39 AM, Dan Williams wrote: > > On Tue, Aug 13, 2019 at 8:00 AM Igor Mammedov wrote: > >> > >> On Fri, 9 Aug 2019 14:57:25 +0800 > >> Tao wrote: > >> > >>> From: Tao Xu > >>> > >>> In ACPI 6.3 chapter 5.2.27 Heterogeneous

Re: [Qemu-devel] [PATCH 1/3] riscv: sifive_u: Add support for loading initrd

2019-08-14 Thread Bin Meng
Hi Palmer, On Thu, Aug 15, 2019 at 1:06 AM Palmer Dabbelt wrote: > > On Mon, 12 Aug 2019 16:48:00 PDT (-0700), bmeng...@gmail.com wrote: > > Hi Palmer, > > > > On Tue, Aug 13, 2019 at 6:45 AM Palmer Dabbelt wrote: > >> > >> On Fri, 19 Jul 2019 06:40:43 PDT (-0700), li...@roeck-us.net wrote: >

[Qemu-devel] [RFC PATCH v3 02/46] target/i386: Push rex_w into DisasContext

2019-08-14 Thread Jan Bobek
From: Richard Henderson Treat this the same as we already do for other rex bits. Signed-off-by: Richard Henderson --- target/i386/translate.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index

[Qemu-devel] [RFC PATCH v3 04/46] target/i386: use dflag from DisasContext

2019-08-14 Thread Jan Bobek
There already is a variable dflag in DisasContext, so reduce the scope of the local variable dflag to enforce use of the one in DisasContext. Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Jan Bobek --- target/i386/translate.c | 184

[Qemu-devel] [RFC PATCH v3 13/46] target/i386: disable unused function warning temporarily

2019-08-14 Thread Jan Bobek
Some functions added later are generated by preprocessor macros and end up being unused (e.g. not all operands can serve as a destination operand). Disable unused function warnings for the new code until I figure out how I want to solve this particular issue. Note: This changeset is intended for

[Qemu-devel] [RFC PATCH v3 12/46] target/i386: introduce gen_sse_ng

2019-08-14 Thread Jan Bobek
This function serves as the point-of-intercept for all newly implemented instructions. If no new implementation exists, fall back to gen_sse. Reviewed-by: Richard Henderson Signed-off-by: Jan Bobek --- target/i386/translate.c | 29 - 1 file changed, 28

[Qemu-devel] [RFC PATCH v3 19/46] target/i386: introduce generic load-store operand

2019-08-14 Thread Jan Bobek
This operand attempts to capture the "indirect" or "memory" operand in a generic way. It significatly reduces the amount code that needs to be written in order to read operands from memory to temporary storage and write them back. Signed-off-by: Jan Bobek --- target/i386/translate.c | 54

[Qemu-devel] [RFC PATCH v3 24/46] target/i386: introduce operand vex_v

2019-08-14 Thread Jan Bobek
This operand yields value of the VEX. field. Signed-off-by: Jan Bobek --- target/i386/translate.c | 20 1 file changed, 20 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.c index c918065b96..4562a097fa 100644 --- a/target/i386/translate.c +++

[Qemu-devel] [RFC PATCH v3 37/46] target/i386: introduce MMX instructions to sse-opcode.inc.h

2019-08-14 Thread Jan Bobek
Add all MMX instruction entries to sse-opcode.inc.h. Signed-off-by: Jan Bobek --- target/i386/sse-opcode.inc.h | 131 +++ 1 file changed, 131 insertions(+) diff --git a/target/i386/sse-opcode.inc.h b/target/i386/sse-opcode.inc.h index c5e81a6a80..36963e5a7c

[Qemu-devel] [RFC PATCH v3 40/46] target/i386: introduce SSE instructions to sse-opcode.inc.h

2019-08-14 Thread Jan Bobek
Add all the SSE instruction entries to sse-opcode.inc.h. Signed-off-by: Jan Bobek --- target/i386/sse-opcode.inc.h | 158 +++ 1 file changed, 158 insertions(+) diff --git a/target/i386/sse-opcode.inc.h b/target/i386/sse-opcode.inc.h index 36963e5a7c..39947aeb51

[Qemu-devel] [RFC PATCH v3 41/46] target/i386: introduce SSE2 translators

2019-08-14 Thread Jan Bobek
Use the translator macros to define translators required by SSE2 instructions. Signed-off-by: Jan Bobek --- target/i386/translate.c | 33 + 1 file changed, 33 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.c index

[Qemu-devel] [PATCH 09/13] qcrypto-luks: implement the encryption key management

2019-08-14 Thread Maxim Levitsky
Signed-off-by: Maxim Levitsky --- crypto/block-luks.c | 374 +++- 1 file changed, 373 insertions(+), 1 deletion(-) diff --git a/crypto/block-luks.c b/crypto/block-luks.c index 1997e92fe1..2c33643b52 100644 --- a/crypto/block-luks.c +++

[Qemu-devel] [PATCH 05/13] qcrypto-luks: clear the masterkey and password before freeing them always

2019-08-14 Thread Maxim Levitsky
While there are other places where these are still stored in memory, this is still one less key material area that can be sniffed with various side channel attacks Signed-off-by: Maxim Levitsky --- crypto/block-luks.c | 52 ++--- 1 file changed, 44

[Qemu-devel] [PATCH 12/13] qemu-img: implement key management

2019-08-14 Thread Maxim Levitsky
Signed-off-by: Maxim Levitsky --- block/crypto.c | 16 ++ block/crypto.h | 3 + qemu-img-cmds.hx | 13 + qemu-img.c | 140 +++ 4 files changed, 172 insertions(+) diff --git a/block/crypto.c b/block/crypto.c index

[Qemu-devel] [PATCH 3/3] Document the qmp commands for continious replication

2019-08-14 Thread Lukas Straub
Signed-off-by: Lukas Straub --- docs/COLO-FT.txt | 185 +++ 1 file changed, 138 insertions(+), 47 deletions(-) diff --git a/docs/COLO-FT.txt b/docs/COLO-FT.txt index ad24680d13..c08bfbd3a8 100644 --- a/docs/COLO-FT.txt +++ b/docs/COLO-FT.txt @@

[Qemu-devel] [RFC PATCH] ati-vga: Implement dummy VBlank IRQ

2019-08-14 Thread BALATON Zoltan
The MacOS driver exits if the card does not have an interrupt. If we set PCI_INTERRUPT_PIN to 1 then it enables VBlank interrupts and it boots but the mouse poniter can not be moved. This patch implements a dummy VBlank interrupt by a timer triggered at 60 Hz to test if it helps. Unfortunately it

Re: [Qemu-devel] [PATCH v9 00/11] Build ACPI Heterogeneous Memory Attribute Table (HMAT)

2019-08-14 Thread Tao Xu
On 8/15/2019 4:57 AM, Eduardo Habkost wrote: On Tue, Aug 13, 2019 at 04:53:33PM +0800, Tao Xu wrote: Hi Igor and Eduardo, I am wondering if there are more comments about patch 1/11~4/11? Because these 4 patch are independent and the patch series are big and pushing for a long time. Could the

[Qemu-devel] current QEMU can't start pc-q35-2.12 SEV guest

2019-08-14 Thread Bruce Rogers
Hi, I ran into a case where a guest on a SEV capable host, which was enabled to use SEV and using an older machine type was no longer able to run when the QEMU version had been updated. Specifically, when the guest was installed and running under a v2.12 QEMU, set up for SEV (ok it was v2.11

Re: [Qemu-devel] [RFC PATCH v2 23/39] target/i386: introduce instruction translator macros

2019-08-14 Thread Jan Bobek
On 8/13/19 2:30 AM, Richard Henderson wrote: > On 8/10/19 5:12 AM, Jan Bobek wrote: >> +#define CASES_LEG_NP_0F_W0(opcode) \ >> +case opcode | M_0F | W_0: >> +#define CASES_LEG_NP_0F_W1(opcode) \ >> +case opcode | M_0F | W_1: >> +#define CASES_LEG_F3_0F_W0(opcode)

[Qemu-devel] [RFC PATCH v3 21/46] target/i386: introduce modrm operand

2019-08-14 Thread Jan Bobek
This permits the ModR/M byte to be passed raw into the code generator, effectively allowing to short-circuit the operand decoding mechanism and do the decoding work manually in the code generator. Signed-off-by: Jan Bobek --- target/i386/translate.c | 20 1 file changed, 20

[Qemu-devel] [RFC PATCH v3 06/46] target/i386: Simplify gen_exception arguments

2019-08-14 Thread Jan Bobek
From: Richard Henderson We can compute cur_eip from values present within DisasContext. Signed-off-by: Richard Henderson --- target/i386/translate.c | 89 - 1 file changed, 44 insertions(+), 45 deletions(-) diff --git a/target/i386/translate.c

[Qemu-devel] [RFC PATCH v3 46/46] target/i386: introduce SSE3 instructions to sse-opcode.inc.h

2019-08-14 Thread Jan Bobek
Add all the SSE3 instruction entries to sse-opcode.inc.h. Signed-off-by: Jan Bobek --- target/i386/sse-opcode.inc.h | 20 1 file changed, 20 insertions(+) diff --git a/target/i386/sse-opcode.inc.h b/target/i386/sse-opcode.inc.h index efa67b7ce2..0cfe6fbe31 100644 ---

[Qemu-devel] [RFC PATCH v3 18/46] target/i386: introduce generic either-or operand

2019-08-14 Thread Jan Bobek
The either-or operand attempts to decode one operand, and if it fails, it falls back to a second operand. It is unifying, meaning that insnop_arg_t of the second operand must be implicitly castable to insnop_arg_t of the first operand. Signed-off-by: Jan Bobek --- target/i386/translate.c | 46

[Qemu-devel] [RFC PATCH v3 43/46] target/i386: introduce SSE2 instructions to sse-opcode.inc.h

2019-08-14 Thread Jan Bobek
Add all the SSE2 instruction entries to sse-opcode.inc.h. Signed-off-by: Jan Bobek --- target/i386/sse-opcode.inc.h | 323 ++- 1 file changed, 322 insertions(+), 1 deletion(-) diff --git a/target/i386/sse-opcode.inc.h b/target/i386/sse-opcode.inc.h index

[Qemu-devel] [PATCH v5 02/10] accel: collecting TB execution count

2019-08-14 Thread vandersonmr
If a TB has a TBS (TBStatistics) with the TB_EXEC_STATS enabled, then we instrument the start code of this TB to atomically count the number of times it is executed. We count both the number of "normal" executions and atomic executions of a TB. The execution count of the TB is stored in its

[Qemu-devel] [PATCH 0/3] colo: Add support for continious replication

2019-08-14 Thread Lukas Straub
Hello Everyone, These Patches add support for continious replication to colo. Please review. Regards, Lukas Straub Lukas Straub (3): Replication: Ignore requests after failover net/filter.c: Add Options to insert filters anywhere in the filter list Document the qmp commands for continious

[Qemu-devel] [PATCH 2/3] net/filter.c: Add Options to insert filters anywhere in the filter list

2019-08-14 Thread Lukas Straub
To switch the Secondary to Primary, we need to insert new filters before the filter-rewriter. Add the necessary options to insert filters anywhere in the filter list. Signed-off-by: Lukas Straub --- include/net/filter.h | 2 ++ net/filter.c | 73

[Qemu-devel] [PATCH 1/3] Replication: Ignore requests after failover

2019-08-14 Thread Lukas Straub
After failover, the Secondary side of replication shouldn't change state. Add the necessary checks to ignore requests after failover. Signed-off-by: Lukas Straub --- block/replication.c | 31 +++ 1 file changed, 27 insertions(+), 4 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v9 00/11] Build ACPI Heterogeneous Memory Attribute Table (HMAT)

2019-08-14 Thread Eduardo Habkost
On Tue, Aug 13, 2019 at 04:53:33PM +0800, Tao Xu wrote: > Hi Igor and Eduardo, > > I am wondering if there are more comments about patch 1/11~4/11? Because > these 4 patch are independent and the patch series are big and pushing for a > long time. Could the patch 1/11~4/11 be ready for queuing

Re: [Qemu-devel] [PATCH 1/3] riscv: sifive_u: Add support for loading initrd

2019-08-14 Thread Palmer Dabbelt
On Wed, 14 Aug 2019 18:30:59 PDT (-0700), bmeng...@gmail.com wrote: Hi Palmer, On Thu, Aug 15, 2019 at 1:06 AM Palmer Dabbelt wrote: On Mon, 12 Aug 2019 16:48:00 PDT (-0700), bmeng...@gmail.com wrote: > Hi Palmer, > > On Tue, Aug 13, 2019 at 6:45 AM Palmer Dabbelt wrote: >> >> On Fri, 19

  1   2   3   >