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

2019-08-14 Thread Palmer Dabbelt
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: > Add support for loading initrd with "-initrd " > to the sifive_u machine. This lets us boo

Re: [Qemu-devel] [PATCH] virtio-pci: Add Function Level Reset support

2019-08-14 Thread Julia Suvorova
On Fri, Aug 9, 2019 at 6:35 PM Michael S. Tsirkin wrote: > > On Wed, Aug 07, 2019 at 10:22:41AM +0200, Julia Suvorova wrote: > > Using FLR becomes convenient in cases where resetting the bus is > > impractical, for example, when debugging the behavior of individual > > functions. > > > > Signed-of

Re: [Qemu-devel] [PATCH 1/2] memory: Align and add helper for comparing MemoryRegionSections

2019-08-14 Thread Dr. David Alan Gilbert
* Philippe Mathieu-Daudé (phi...@redhat.com) wrote: > Hi David, > > On 8/13/19 12:29 PM, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > MemoryRegionSection includes an Int128 'size' field; > > on some platforms the compiler causes an alignment of this to > > a 128

Re: [Qemu-devel] [PATCH 1/2] memory: Align and add helper for comparing MemoryRegionSections

2019-08-14 Thread Philippe Mathieu-Daudé
On 8/14/19 7:25 PM, Dr. David Alan Gilbert wrote: > * Philippe Mathieu-Daudé (phi...@redhat.com) wrote: >> Hi David, >> >> On 8/13/19 12:29 PM, Dr. David Alan Gilbert (git) wrote: >>> From: "Dr. David Alan Gilbert" >>> >>> MemoryRegionSection includes an Int128 'size' field; >>> on some platforms

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

2019-08-14 Thread Thomas Huth
On 8/14/19 9:23 AM, David Hildenbrand wrote: > 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(),

Re: [Qemu-devel] [PATCH 1/2] memory: Align and add helper for comparing MemoryRegionSections

2019-08-14 Thread Dr. David Alan Gilbert
* Philippe Mathieu-Daudé (phi...@redhat.com) wrote: > On 8/14/19 7:25 PM, Dr. David Alan Gilbert wrote: > > * Philippe Mathieu-Daudé (phi...@redhat.com) wrote: > >> Hi David, > >> > >> On 8/13/19 12:29 PM, Dr. David Alan Gilbert (git) wrote: > >>> From: "Dr. David Alan Gilbert" > >>> > >>> MemoryR

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

2019-08-14 Thread Thomas Huth
On 8/14/19 9:23 AM, David Hildenbrand wrote: > 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_

[Qemu-devel] Question about libvhost-user and vhost-user-bridge.c

2019-08-14 Thread William Tu
Hi, I'm using libvhost-user.a to write a vhost backend, in order to receive and send packets from/to VMs from OVS. I started by reading the vhost-user-bridge.c. I can now pass the initialization stage, seeing .queue_set_started get invoked. However, I am stuck at receiving the packet from VM. So

[Qemu-devel] [PATCH v2 2/3] memory: Provide an equality function for MemoryRegionSections

2019-08-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Provide a comparison function that checks all the fields are the same. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Philippe Mathieu-Daudé --- include/exec/memory.h | 12 1 file changed, 12 insertions(+) diff --git a/include/exec/memory.h b/i

[Qemu-devel] [PATCH v2 0/3] Fix MemoryRegionSection alignment and comparison

2019-08-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" This fixes a symptom I've seen on vhost-user on aarch64 where the daemon would be falsely notified of memory region changes that didn't exist. The underlying problem was me memcmp'ing MemoryRegionSections even though they had padding in. (Discovered while getting v

[Qemu-devel] [PATCH v2 1/3] memory: Align MemoryRegionSections fields

2019-08-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" MemoryRegionSection includes an Int128 'size' field; on some platforms the compiler causes an alignment of this to a 128bit boundary, leaving 8 bytes of dead space. This deadspace can be filled with junk. Move the size field to the top avoiding unnecessary alignmen

[Qemu-devel] [PATCH v2 3/3] vhost: Fix memory region section comparison

2019-08-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Using memcmp to compare structures wasn't safe, as I found out on ARM when I was getting falce miscompares. Use the helper function for comparing the MRSs. Fixes: ade6d081fc33948e56e6 Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/vhost.c | 9 +++-- 1

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

2019-08-14 Thread Thomas Huth
On 8/14/19 9:23 AM, David Hildenbrand wrote: > 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

Re: [Qemu-devel] [PATCH-4.2 v2 5/5] target/riscv: Fix Floating Point register names

2019-08-14 Thread Palmer Dabbelt
On Tue, 13 Aug 2019 10:06:58 PDT (-0700), alistai...@gmail.com wrote: On Mon, Aug 12, 2019 at 4:08 PM Palmer Dabbelt wrote: On Tue, 30 Jul 2019 16:35:34 PDT (-0700), Alistair Francis wrote: > From: Atish Patra > > As per the RISC-V spec, Floating Point registers are named as f0..f31 > so lets

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

2019-08-14 Thread David Hildenbrand
On 14.08.19 20:01, Thomas Huth wrote: > On 8/14/19 9:23 AM, David Hildenbrand wrote: >> 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 ++

Re: [Qemu-devel] [PATCH v2] RISC-V: Ignore the S and U letters when formatting ISA strings

2019-08-14 Thread Alistair Francis
On Tue, Aug 13, 2019 at 3:54 PM Palmer Dabbelt wrote: > > The ISA strings we're providing from QEMU aren't actually legal RISC-V > ISA strings, as both S and U cannot exist as single-letter extensions > and must instead be multi-letter strings. We're still using the ISA > strings inside QEMU to t

Re: [Qemu-devel] [RFC] dirty-bitmaps: add block-dirty-bitmap-persist command

2019-08-14 Thread John Snow
On 8/13/19 8:08 PM, Eric Blake wrote: > On 8/13/19 5:44 PM, John Snow wrote: >> This is for the purpose of toggling on/off persistence on a bitmap. >> This enables you to save a bitmap that was not persistent, but may >> have already accumulated valuable data. >> >> This is simply a QOL enhancem

Re: [Qemu-devel] bitmaps branch rebase

2019-08-14 Thread John Snow
On 8/14/19 9:26 AM, Vladimir Sementsov-Ogievskiy wrote: > 08.08.2019 0:45, John Snow wrote: >> FYI: I rebased jsnow/bitmaps on top of kwolf/block-next, itself based on >> top of v4.1.0-rc4. >> >> I'll post this along with the eventual pull request, but here's the >> diffstat against the publishe

Re: [Qemu-devel] bitmaps branch rebase

2019-08-14 Thread John Snow
On 8/14/19 3:03 PM, John Snow wrote: > > If you'd like to optimize this, I'll invite you to, as a patch. > Ah, looks like you're a step ahead of me :) --js

Re: [Qemu-devel] [PATCH 1/2] qapi: deprecate drive-mirror and drive-backup

2019-08-14 Thread John Snow
On 8/14/19 6:07 AM, Vladimir Sementsov-Ogievskiy wrote: > It's hard and not necessary to maintain outdated versions of these > commands. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > qemu-deprecated.texi | 4 > qapi/block-core.json | 4 > qapi/transaction.json | 2 +-

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

2019-08-14 Thread John Snow
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 | 7 +++ > qapi/block-core.json | 6 -- > include

[Qemu-devel] [PATCH v2] tests/libqos: Make generic virtio code independent from global_qtest

2019-08-14 Thread Thomas Huth
The libqos library functions should never depend on global_qtest, since these functions might be used in tests that track multiple test states. Pass around a pointer to the QTestState instead. Signed-off-by: Thomas Huth --- v2: Adjust indentations as suggested by Eric tests/libqos/virtio.c

[Qemu-devel] [PATCH 01/13] block-crypto: misc refactoring

2019-08-14 Thread Maxim Levitsky
* rename the write_func to create_write_func, and init_func to create_init_func this is preparation for other write_func that will be used to update the encryption keys. No functional changes Signed-off-by: Maxim Levitsky --- block/crypto.c | 15 --- 1 file changed, 8 inserti

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

2019-08-14 Thread Maxim Levitsky
Hi! This patch series implements key management for luks based encryption It supports both raw luks images and qcow2 encrypted images. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1731898 There are still several issues that need to be figured out, on which the feedback is very welcome,

[Qemu-devel] [PATCH 07/13] block: add manage-encryption command (qmp and blockdev)

2019-08-14 Thread Maxim Levitsky
This adds: * x-blockdev-update-encryption and x-blockdev-erase-encryption qmp commands Both commands take the QCryptoKeyManageOptions the x-blockdev-update-encryption is meant for non destructive addition of key slots / whatever the encryption driver supports in the future x-blockdev-eras

[Qemu-devel] [PATCH 06/13] qcrypto-luks: implement more rigorous header checking

2019-08-14 Thread Maxim Levitsky
Check that keyslots don't overlap with the data, and check that keyslots don't overlap with each other. (this is done using naive O(n^2) nested loops, but since there are just 8 keyslots, this doens't really matter. Signed-off-by: Maxim Levitsky --- crypto/block-luks.c | 42 +

[Qemu-devel] [PATCH 02/13] qcrypto-luks: misc refactoring

2019-08-14 Thread Maxim Levitsky
This is also a preparation for key read/write/erase functions * use master key len from the header * prefer to use crypto params in the QCryptoBlockLUKS over passing them as function arguments * define QCRYPTO_BLOCK_LUKS_DEFAULT_ITER_TIME * Add comments to various crypto parameters in the QCrypt

[Qemu-devel] [PATCH 03/13] qcrypto-luks: refactoring: extract load/store/check/parse header functions

2019-08-14 Thread Maxim Levitsky
With upcoming key management, the header will need to be stored after the image is created. Extracting load header isn't strictly needed, but do this anyway for the symmetry. Also I extracted a function that does basic sanity checks on the just read header, and a function which parses all the cry

[Qemu-devel] [PATCH 08/13] qcrypto: add the plumbing for encryption management

2019-08-14 Thread Maxim Levitsky
This adds qcrypto_block_manage_encryption, which is thin wrapper around manage_encryption of the crypto driver which is also added Signed-off-by: Maxim Levitsky --- crypto/block.c | 29 + crypto/blockpriv.h | 9 + include/crypto/block.h | 27 +++

[Qemu-devel] [PATCH 04/13] qcrypto-luks: refactoring: simplify the math used for keyslot locations

2019-08-14 Thread Maxim Levitsky
Signed-off-by: Maxim Levitsky --- crypto/block-luks.c | 64 +++-- 1 file changed, 38 insertions(+), 26 deletions(-) diff --git a/crypto/block-luks.c b/crypto/block-luks.c index 6bb369f3b4..e1a4df94b7 100644 --- a/crypto/block-luks.c +++ b/crypto/block-luks

[Qemu-devel] [PATCH 10/13] block/crypto: implement the encryption key management

2019-08-14 Thread Maxim Levitsky
This implements the encryption key management using the generic code in qcrypto layer This code adds another 'write_func' because the initialization write_func works directly on the underlying file, because during the creation, there is no open instance of the luks driver, but during regular use,

[Qemu-devel] [PATCH 11/13] block/qcow2: implement the encryption key managment

2019-08-14 Thread Maxim Levitsky
This is the main purpose of the patchset, to enaable us to manage luks like header, embedded in the qcow2 image, which standard cryptosetup tools don't support. Signed-off-by: Maxim Levitsky --- block/qcow2.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/block/

[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 +++ b/crypto/block-luks.

[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 inser

[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 415b6db041..2fcdf

[Qemu-devel] [PATCH 13/13] iotests : add tests for encryption key management

2019-08-14 Thread Maxim Levitsky
Signed-off-by: Maxim Levitsky --- tests/qemu-iotests/257 | 197 ++ tests/qemu-iotests/257.out | 96 +++ tests/qemu-iotests/258 | 95 +++ tests/qemu-iotests/258.out | 30 + tests/qemu-iotests/259 |

[Qemu-devel] [RFC v2] hw/sd/aspeed_sdhci: New device

2019-08-14 Thread Eddie James
The Aspeed SOCs have two SD/MMC controllers. Add a device that encapsulates both of these controllers and models the Aspeed-specific registers and behavior. Tested by reading from mmcblk0 in Linux: qemu-system-arm -machine romulus-bmc -nographic -serial mon:stdio \ -drive file=_tmp/flash-romulus,

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] [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 a/block/rep

[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 r

[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 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 @@ -145,35

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 fir

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 > slot

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 Memory

Re: [Qemu-devel] [PATCH v3] ppc: Add support for 'mffsl' instruction

2019-08-14 Thread David Gibson
On Wed, Aug 14, 2019 at 11:34:13AM -0500, Paul Clarke wrote: > Should these 'checkpatch' ERRORs be addressed, even if it will diverge the > code style from the existing, surrounding code? > > On 8/14/19 11:30 AM, no-re...@patchew.org wrote: > > This series seems to have some coding style problems

Re: [Qemu-devel] [RFC PATCH v2 16/39] target/i386: introduce instruction operand infrastructure

2019-08-14 Thread Jan Bobek
On 8/13/19 2:07 AM, Richard Henderson wrote: > On 8/10/19 5:12 AM, Jan Bobek wrote: >> +#define INSNOP_INIT(opT, init_stmt)\ >> +static int insnop_init(opT)(CPUX86State *env, DisasContext *s, \ >> +int modrm, insnop_t(opT) *op)

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] [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 d

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] 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 with

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 pa

Re: [Qemu-devel] [RFC PATCH v2 21/39] target/i386: introduce insn.h

2019-08-14 Thread Jan Bobek
On 8/13/19 2:00 AM, Richard Henderson wrote: > On 8/10/19 5:12 AM, Jan Bobek wrote: >> 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

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: > >>

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 Jul

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

2019-08-14 Thread Tao Xu
On 8/15/2019 5:29 AM, Dan Williams wrote: 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 [...] +for (i = 0; i < machine->num

[Qemu-devel] [RFC PATCH v3 00/46] rewrite MMX/SSE/SSE2/SSE3 instruction translation

2019-08-14 Thread Jan Bobek
The previous version can be found at [1]. Changes compared to v2: - Expanded the instruction operand infrastructure a bit; I am now fairly confident that it is powerful enough to accommodate for all the use cases I will need. It's still a bit clunky to work with at times, but I am ha

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

2019-08-14 Thread Jan Bobek
From: Richard Henderson Treat this value the same as we do for rex_b and rex_x. Signed-off-by: Richard Henderson --- target/i386/translate.c | 85 + 1 file changed, 44 insertions(+), 41 deletions(-) diff --git a/target/i386/translate.c b/target/i386/tra

[Qemu-devel] [RFC PATCH v3 03/46] target/i386: reduce scope of variable aflag

2019-08-14 Thread Jan Bobek
The variable aflag is not used in most of disas_insn; make this clear by explicitly reducing its scope to the block where it is used. Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Jan Bobek --- target/i386/translate.c | 6 +- 1 file changed, 5 insertions(+),

[Qemu-devel] [RFC PATCH v3 10/46] target/i386: add vector register file alignment constraints

2019-08-14 Thread Jan Bobek
gvec operations require that all vectors be aligned on 16-byte boundary; make sure the MM/XMM/YMM/ZMM register file is aligned as neccessary. Reviewed-by: Richard Henderson Signed-off-by: Jan Bobek --- target/i386/cpu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t

[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 d74dbfd

[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 d

[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 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 insertions(+),

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

2019-08-14 Thread Jan Bobek
The variable pc_start is already a member of DisasContext. Remove the superfluous local variable. Reviewed-by: Richard Henderson Signed-off-by: Jan Bobek --- target/i386/translate.c | 131 1 file changed, 65 insertions(+), 66 deletions(-) diff --git a/t

[Qemu-devel] [RFC PATCH v3 08/46] target/i386: make variable b1 const

2019-08-14 Thread Jan Bobek
The variable b1 does not change value once assigned. Make this fact explicit by marking it const. Reviewed-by: Richard Henderson Signed-off-by: Jan Bobek --- target/i386/translate.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/target/i386/translate.c b/tar

[Qemu-devel] [RFC PATCH v3 22/46] target/i386: introduce operands for decoding modrm fields

2019-08-14 Thread Jan Bobek
The old code uses bitshifts and bitwise-and all over the place for decoding ModR/M fields. Avoid doing that by introducing proper decoding operands. Signed-off-by: Jan Bobek --- target/i386/translate.c | 62 + 1 file changed, 62 insertions(+) diff --git a

[Qemu-devel] [RFC PATCH v3 14/46] target/i386: introduce mnemonic aliases for several gvec operations

2019-08-14 Thread Jan Bobek
It is helpful to introduce aliases for some general gvec operations as it makes a couple of instruction code generators simpler (added later). Reviewed-by: Richard Henderson Signed-off-by: Jan Bobek --- target/i386/translate.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/target/i3

[Qemu-devel] [RFC PATCH v3 09/46] target/i386: make variable is_xmm const

2019-08-14 Thread Jan Bobek
The variable is_xmm does not change value after assignment, so make this fact explicit by marking it const. Reviewed-by: Richard Henderson Signed-off-by: Jan Bobek --- target/i386/translate.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/target/i386/tran

[Qemu-devel] [RFC PATCH v3 17/46] target/i386: introduce generic operand alias

2019-08-14 Thread Jan Bobek
It turns out it is useful to be able to declare operand name aliases. Introduce a macro to capture this functionality. 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

[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 a/target/i3

[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 1006

[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 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 --- a

[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 b/target/i386/translate.c

[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 6296a02991..0cffa2226b

[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 b/target/

[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 --- a/targ

[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 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 23/46] target/i386: introduce operand for direct-only r/m field

2019-08-14 Thread Jan Bobek
Many operands can only decode successfully if the ModR/M byte has the direct form (i.e. MOD=3). Capture this common aspect by introducing a special direct-only r/m field operand. Signed-off-by: Jan Bobek --- target/i386/translate.c | 37 + 1 file changed, 37 i

[Qemu-devel] [RFC PATCH v3 16/46] target/i386: introduce instruction operand infrastructure

2019-08-14 Thread Jan Bobek
insnop_arg_t, insnop_ctxt_t and init, prepare and finalize functions form the basis of instruction operand decoding. Introduce macros for defining a generic instruction operand; use cases for operand decoding will be introduced later. Signed-off-by: Jan Bobek --- target/i386/translate.c | 28 +++

[Qemu-devel] [PATCH v5 03/10] accel: collecting JIT statistics

2019-08-14 Thread vandersonmr
If a TB has a TBS (TBStatistics) with the TB_JIT_STATS enabled then we collect statistics of its translation processes and code translation. Collecting the number of host instructions seems to be not simple as it would imply in having to modify several target source files. So, for now, we are only

[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 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 25/46] target/i386: introduce Ib (immediate) operand

2019-08-14 Thread Jan Bobek
Introduce the immediate-byte operand, which loads a byte from the instruction stream and passes its value as the operand. Signed-off-by: Jan Bobek --- target/i386/translate.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.c

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

2019-08-14 Thread Jan Bobek
In this context, "code generators" are functions that receive decoded instruction operands and emit TCG ops implementing the correct instruction functionality. Introduce the naming macros first, actual generator macros will be added later. Signed-off-by: Jan Bobek --- target/i386/translate.c | 3

[Qemu-devel] [PATCH v5 05/10] accel: adding TB_JIT_TIME and full replacing CONFIG_PROFILER

2019-08-14 Thread vandersonmr
Replace all others CONFIG_PROFILER statistics and migrate it to TBStatistics system. However, TCGProfiler still exists and can be use to store global statistics and times. All TB related statistics goes to TBStatistics. Signed-off-by: Vanderson M. do Rosario --- accel/tcg/tb-stats.c | 95 +

[Qemu-devel] [RFC PATCH v3 27/46] target/i386: introduce G*, R*, E* (general register) operands

2019-08-14 Thread Jan Bobek
These address the general-purpose register file. The corresponding 32-bit or 64-bit register is passed as the operand value. Signed-off-by: Jan Bobek --- target/i386/translate.c | 78 + 1 file changed, 78 insertions(+) diff --git a/target/i386/translate.c

[Qemu-devel] [RFC PATCH v3 26/46] target/i386: introduce M* (memptr) operands

2019-08-14 Thread Jan Bobek
The memory-pointer operand decodes the indirect form of ModR/M byte, loads the effective address into a register and passes that register as the operand. Signed-off-by: Jan Bobek --- target/i386/translate.c | 36 1 file changed, 36 insertions(+) diff --git a

[Qemu-devel] [PATCH v5 07/10] monitor: adding tb_stats hmp command

2019-08-14 Thread vandersonmr
Adding tb_stats [start|pause|stop|filter] command to hmp. This allows controlling the collection of statistics. It is also possible to set the level of collection: all, jit, or exec. tb_stats filter allow to only collect statistics for the TB in the last_search list. The goal of this command is t

[Qemu-devel] [RFC PATCH v3 29/46] target/i386: introduce H*, V*, U*, W* (SSE/AVX) operands

2019-08-14 Thread Jan Bobek
These address the SSE/AVX-technology register file. Offset of the entire corresponding register is passed as the operand value, regardless of operand-size suffix. Signed-off-by: Jan Bobek --- target/i386/translate.c | 117 1 file changed, 117 insertions(+

[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 --- ta

[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 --- ta

[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 +++ b/linux-us

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

2019-08-14 Thread Jan Bobek
Code generators defined using these macros rely on a helper function (as emitted by gen_helper_*). Signed-off-by: Jan Bobek --- target/i386/translate.c | 106 1 file changed, 106 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.

Re: [Qemu-devel] [PATCH v2 0/3] Fix MemoryRegionSection alignment and comparison

2019-08-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190814175535.2023-1-dgilb...@redhat.com/ Hi, This series failed build test on s390x host. Please find the details below. === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to a commit that h

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

2019-08-14 Thread Jan Bobek
Define code generators required for MMX instructions. Signed-off-by: Jan Bobek --- target/i386/translate.c | 111 1 file changed, 111 insertions(+) diff --git a/target/i386/translate.c b/target/i386/translate.c index 4fecb0d240..a02e9cd0d2 100644 --- a/t

[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 deleti

<    1   2   3   >