Re: [PATCH Kernel v20 4/8] vfio iommu: Add ioctl definition for dirty pages tracking

2020-05-19 Thread Cornelia Huck
On Tue, 19 May 2020 09:53:56 -0600 Alex Williamson wrote: > On Tue, 19 May 2020 17:35:07 +0200 > Cornelia Huck wrote: > > > On Fri, 15 May 2020 23:05:24 +0530 > > Kirti Wankhede wrote: > > > > > On 5/15/2020 4:29 PM, Cornelia Huck wrote: > > > > On Fri, 15 May 2020 02:07:43 +0530 > > >

[PATCH RISU 0/4] Add patterns for SVE2

2020-05-19 Thread Stephen Long
I'm working with Richard on SVE2 support for QEMU. I added some patterns to risu so we can start testing our implementation. I'm not sure I'm doing it correctly, so it would be great to get some eyes on it. I sent Peter and Richard v1 of this patch series, but I think I should be sending these to

[PATCH RISU 1/4] sve2.risu: Add patterns for floating-point pairwise ops

2020-05-19 Thread Stephen Long
Signed-off-by: Stephen Long --- sve2.risu | 14 ++ 1 file changed, 14 insertions(+) create mode 100755 sve2.risu diff --git a/sve2.risu b/sve2.risu new file mode 100755 index 000..eb1d75a --- /dev/null +++ b/sve2.risu @@ -0,0 +1,14 @@ +# Input file for risugen defining AArch64 S

Re: [RFC PATCH 0/3] block: Synchronous bdrv_*() from coroutine in different AioContext

2020-05-19 Thread Eric Blake
On 5/19/20 10:48 AM, Vladimir Sementsov-Ogievskiy wrote: The other options is doing what you suggested. There is nothing in the qcow2 on-disk format that would prevent this, but we would have to extend the qcow2 driver to allow I/O to inactive L1 tables. This sounds like a non-trivial amount of

[PATCH RISU 2/4] sve2.risu: Add patterns for integer multiply (unpredicated)

2020-05-19 Thread Stephen Long
Signed-off-by: Stephen Long --- sve2.risu | 11 +++ 1 file changed, 11 insertions(+) diff --git a/sve2.risu b/sve2.risu index eb1d75a..ccdb19f 100755 --- a/sve2.risu +++ b/sve2.risu @@ -1,6 +1,17 @@ # Input file for risugen defining AArch64 SVE2 instructions .mode arm.aarch64 +# inte

[PATCH RISU 3/4] sve2.risu: Add patterns for integer (predicated) ops

2020-05-19 Thread Stephen Long
Signed-off-by: Stephen Long --- sve2.risu | 55 +++ 1 file changed, 55 insertions(+) diff --git a/sve2.risu b/sve2.risu index ccdb19f..9e48e1e 100755 --- a/sve2.risu +++ b/sve2.risu @@ -12,6 +12,61 @@ PMULA64_V0100 size:2 1 zm:5

[PATCH RISU 4/4] sve2.risu: Add patterns for widening integer arithmetic

2020-05-19 Thread Stephen Long
Signed-off-by: Stephen Long --- sve2.risu | 62 +++ 1 file changed, 62 insertions(+) diff --git a/sve2.risu b/sve2.risu index 9e48e1e..a4d5312 100755 --- a/sve2.risu +++ b/sve2.risu @@ -67,6 +67,68 @@ USQADD A64_V01000100 size:2 011 10

[PULL v2 0/7] bitmaps patches for 2020-05-18

2020-05-19 Thread Eric Blake
The following changes since commit f2465433b43fb87766d79f42191607dac4aed5b4: Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2020-05-19 13:42:58 +0100) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git tags/pull-bitmaps-2020-05-1

[PULL v2 7/7] qemu-img: Add bitmap sub-command

2020-05-19 Thread Eric Blake
Include actions for --add, --remove, --clear, --enable, --disable, and --merge (note that --clear is a bit of fluff, because the same can be accomplished by removing a bitmap and then adding a new one in its place, but it matches what QMP commands exist). Listing is omitted, because it does not re

[PATCH] arm/aspeed: Rework NIC attachment

2020-05-19 Thread Cédric Le Goater
The AST2400 and AST2500 SoCs have two MACs but only the first MAC0 is active on the Aspeed machines using these SoCs. The AST2600 has four MACs. The AST2600 EVB machine activates MAC1, MAC2 and MAC3 and the Tacoma BMC machine activates MAC2. Introduce a bit-field property "macs-mask" under the Asp

Re: [PULL 0/1] machine queue, 2020-05-13

2020-05-19 Thread Eduardo Habkost
On Thu, May 14, 2020 at 10:58:16AM +0100, Peter Maydell wrote: > On Wed, 13 May 2020 at 15:23, Eduardo Habkost wrote: > > > > Peter, note that my PGP key had expired 2 weeks ago, so you'll > > probably see a few signature check warnings. > > I couldn't find your updated key on the keyservers -- w

Re: [PATCH v3 00/10] vhost-user: Lift Max Ram Slots Limitation

2020-05-19 Thread no-reply
Patchew URL: https://patchew.org/QEMU/1588473683-27067-1-git-send-email-raphael.norw...@nutanix.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

[PULL 04/10] softfloat: Name rounding mode enum

2020-05-19 Thread Richard Henderson
Give the previously unnamed enum a typedef name. Use the packed attribute so that we do not affect the layout of the float_status struct. Use it in the prototypes of relevant functions. Adjust switch statements as necessary to avoid compiler warnings. Reviewed-by: Alex Bennée Reviewed-by: Phil

[PULL 00/10] softfloat misc cleanups

2020-05-19 Thread Richard Henderson
The following changes since commit f2465433b43fb87766d79f42191607dac4aed5b4: Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2020-05-19 13:42:58 +0100) are available in the Git repository at: https://github.com/rth7680/qemu.git tags/pull-fp

[PULL 08/10] softfloat: Inline float128 compare specializations

2020-05-19 Thread Richard Henderson
Replace the float128 compare specializations with inline functions that call the standard float128_compare{,_quiet} functions. Use bool as the return type. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/fpu/softfloat.h | 49 +++-- fpu/softfloat.c | 238 --

[PULL 06/10] softfloat: Inline float32 compare specializations

2020-05-19 Thread Richard Henderson
Replace the float32 compare specializations with inline functions that call the standard float32_compare{,_quiet} functions. Use bool as the return type. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/fpu/softfloat.h | 49 +++-- fpu/softfloat.c | 216

[PULL 01/10] softfloat: Use post test for floatN_mul

2020-05-19 Thread Richard Henderson
The existing f{32,64}_addsub_post test, which checks for zero inputs, is identical to f{32,64}_mul_fast_test. Which means we can eliminate the fast_test/fast_op hooks in favor of reusing the same post hook. This means we have one fewer test along the fast path for multiply. Tested-by: Alex Benné

[PULL 02/10] softfloat: Replace flag with bool

2020-05-19 Thread Richard Henderson
We have had this on the to-do list for quite some time. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/fpu/softfloat-helpers.h | 14 +-- include/fpu/softfloat-macros.h | 24 ++-- include/fpu/softfloat-types.h | 14 +-- include/fp

Re: [RISU v2 03/17] Hoist trace file opening

2020-05-19 Thread Alex Bennée
Richard Henderson writes: > We will want to share this code with --dump. > > Reviewed-by: Peter Maydell > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée > --- > risu.c | 37 + > 1 file changed, 17 insertions(+), 20 deletions(-) > > diff --git

[PULL 05/10] softfloat: Name compare relation enum

2020-05-19 Thread Richard Henderson
Give the previously unnamed enum a typedef name. Use it in the prototypes of compare functions. Use it to hold the results of the compare functions. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/fpu/softfloat.h | 25

[PULL 03/10] softfloat: Change tininess_before_rounding to bool

2020-05-19 Thread Richard Henderson
Slightly tidies the usage within softfloat.c and the representation in float_status. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/fpu/softfloat-helpers.h | 8 ++--- include/fpu/softfloat-types.h | 8 ++--- fpu/softfloat.c | 54 ---

[PULL 10/10] softfloat: Return bool from all classification predicates

2020-05-19 Thread Richard Henderson
This includes *_is_any_nan, *_is_neg, *_is_inf, etc. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/fpu/softfloat.h| 66 +- fpu/softfloat-specialize.inc.c | 16 - 2 files changed, 41 inse

Re: [PATCH v2 5/9] block/io: expand in_flight inc/dec section: simple cases

2020-05-19 Thread Vladimir Sementsov-Ogievskiy
19.05.2020 17:33, Kevin Wolf wrote: Am 19.05.2020 um 16:01 hat Vladimir Sementsov-Ogievskiy geschrieben: 19.05.2020 14:25, Vladimir Sementsov-Ogievskiy wrote: 19.05.2020 14:16, Kevin Wolf wrote: Am 19.05.2020 um 13:06 hat Vladimir Sementsov-Ogievskiy geschrieben: 19.05.2020 13:52, Kevin Wolf

[PULL 07/10] softfloat: Inline float64 compare specializations

2020-05-19 Thread Richard Henderson
Replace the float64 compare specializations with inline functions that call the standard float64_compare{,_quiet} functions. Use bool as the return type. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/fpu/softfloat.h | 49 ++-- fpu/softfloat.c | 2

[PULL 09/10] softfloat: Inline floatx80 compare specializations

2020-05-19 Thread Richard Henderson
Replace the floatx80 compare specializations with inline functions that call the standard floatx80_compare{,_quiet} functions. Use bool as the return type. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- include/fpu/softfloat.h | 49 ++-- fpu/softfloat.c | 257 ---

Re: [PATCH Kernel v22 0/8] Add UAPIs to support migration for VFIO devices

2020-05-19 Thread Alex Williamson
Hi folks, My impression is that we're getting pretty close to a workable implementation here with v22 plus respins of patches 5, 6, and 8. We also have a matching QEMU series and a proposal for a new i40e consumer, as well as I assume GVT-g updates happening internally at Intel. I expect all of

Re: [PATCH] Provide a NetBSD specific aarch64 cpu_signal_handler

2020-05-19 Thread Richard Henderson
On 5/17/20 3:15 AM, Nick Hudson wrote: > Fix qemu build on NetBSD/evbarm-aarch64 by providing a NetBSD specific > cpu_signal_handler. > > Signed-off-by: Nick Hudson > --- > accel/tcg/user-exec.c | 26 ++ > 1 file changed, 26 insertions(+) Reviewed-by: Richard Henderson

[PATCH 1/7] block/nvme: poll queues without q->lock

2020-05-19 Thread Stefan Hajnoczi
A lot of CPU time is spent simply locking/unlocking q->lock during polling. Check for completion outside the lock to make q->lock disappear from the profile. Signed-off-by: Stefan Hajnoczi --- block/nvme.c | 12 1 file changed, 12 insertions(+) diff --git a/block/nvme.c b/block/nvm

[PATCH 2/7] block/nvme: drop tautologous assertion

2020-05-19 Thread Stefan Hajnoczi
nvme_process_completion() explicitly checks cid so the assertion that follows is always true: if (cid == 0 || cid > NVME_QUEUE_SIZE) { ... continue; } assert(cid <= NVME_QUEUE_SIZE); Signed-off-by: Stefan Hajnoczi --- block/nvme.c | 1 - 1 file changed, 1 deletion(-) diff --g

[PATCH 0/7] block/nvme: support nested aio_poll()

2020-05-19 Thread Stefan Hajnoczi
This series allows aio_poll() to work from I/O request completion callbacks. QEMU block drivers are supposed to support this because some code paths rely on this behavior. There was no measurable performance difference with nested aio_poll() support. This patch series also contains cleanups that

[PATCH 5/7] block/nvme: clarify that free_req_queue is protected by q->lock

2020-05-19 Thread Stefan Hajnoczi
Existing users access free_req_queue under q->lock. Document this. Signed-off-by: Stefan Hajnoczi --- block/nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/nvme.c b/block/nvme.c index 3ad4f27e1c..e32bff26ff 100644 --- a/block/nvme.c +++ b/block/nvme.c @@ -57,7 +5

[PATCH 3/7] block/nvme: don't access CQE after moving cq.head

2020-05-19 Thread Stefan Hajnoczi
Do not access a CQE after incrementing q->cq.head and releasing q->lock. It is unlikely that this causes problems in practice but it's a latent bug. The reason why it should be safe at the moment is that completion processing is not re-entrant and the CQ doorbell isn't written until the end of nvm

[PATCH 4/7] block/nvme: switch to a NVMeRequest freelist

2020-05-19 Thread Stefan Hajnoczi
There are three issues with the current NVMeRequest->busy field: 1. The busy field is accidentally accessed outside q->lock when request submission fails. 2. Waiters on free_req_queue are not woken when a request is returned early due to submission failure. 2. Finding a free request involves

[PATCH 6/7] block/nvme: keep BDRVNVMeState pointer in NVMeQueuePair

2020-05-19 Thread Stefan Hajnoczi
Passing around both BDRVNVMeState and NVMeQueuePair is unwiedly. Reduce the number of function arguments by keeping the BDRVNVMeState pointer in NVMeQueuePair. This will come in handly when a BH is introduced in a later patch and only one argument can be passed to it. Signed-off-by: Stefan Hajnocz

[PATCH 7/7] block/nvme: support nested aio_poll()

2020-05-19 Thread Stefan Hajnoczi
QEMU block drivers are supposed to support aio_poll() from I/O completion callback functions. This means completion processing must be re-entrant. The standard approach is to schedule a BH during completion processing and cancel it at the end of processing. If aio_poll() is invoked by a callback f

[PATCH 0/2] Update use_goto_tb() in hppa and rx targets

2020-05-19 Thread Ahmed Karaman
Greetings to all QEMU developers! First of all, I want to say I'm really honored that I will be working with you on the Google Summer of Code project "TCG Continuous Benchmarking" this June, July and August. This is my first set of patches sent to the QEMU mailing list, that came up as a result o

[PATCH 2/2] target/rx: Check for page crossings in use_goto_tb()

2020-05-19 Thread Ahmed Karaman
Add the page crossings check when using system mode. If this fix is not applied, a number of bugs may occasionally occur during target rx system mode emulation. Rename parameter dc of type DisasContext* to the more common name ctx, to keep consistency with other targets. Signed-off-by: Ahmed Kara

[PATCH 1/2] target/hppa: Check page crossings in use_goto_tb() only in system mode

2020-05-19 Thread Ahmed Karaman
Restrict page crossing check to system mode only. By doing this, the hppa target performance in user mode improves by up to 6.93%. Of course, the amount of performance improvement will vary depending on the nature of the hppa executable being emulated by QEMU. While doing this correction, this pat

Re: [virtio-dev] Re: Fwd: Qemu Support for Virtio Video V4L2 driver

2020-05-19 Thread Nicolas Dufresne
Le mardi 19 mai 2020 à 17:37 +0900, Keiichi Watanabe a écrit : > Hi Nicolas, > > On Fri, May 15, 2020 at 8:38 AM Nicolas Dufresne < > nico...@ndufresne.ca > > wrote: > > Le lundi 11 mai 2020 à 20:49 +0900, Keiichi Watanabe a écrit : > > > Hi, > > > > > > Thanks Saket for your feedback. As Dmitry

Re: [PATCH v2 0/9] drop unallocated_blocks_are_zero

2020-05-19 Thread Vladimir Sementsov-Ogievskiy
Ping The whole series reviewed by Eric, with only one grammar fix needed in 02 commit message (and possible drop of ret2, up to maintainer). 07.05.2020 11:47, Vladimir Sementsov-Ogievskiy wrote: Hi all! v2 (by Eric's review): 01: moved to the start of the series, add Eric's r-b 02: new 03-04

[Bug 1879531] Re: Stack-overflow in _eth_get_rss_ex_dst_addr

2020-05-19 Thread Alexander Bulekov
>From Prasad:  struct ip6_ext_hdr { uint8_t ip6r_nxt; /* next header */ uint8_t ip6r_len; /* length in units of 8 octets */ }; struct ip6_ext_hdr_routing { uint8_t nxt; uint8_t len; uint8_t rtype; uint8_t segleft; uint8_t rsvd[4]; };  Yes, it looks like because 'struct ip6_ext_hdr' type st

Re: [PATCH 2/2] target/i386: fix IEEE x87 floating-point exception raising

2020-05-19 Thread Richard Henderson
On 5/15/20 2:21 PM, Joseph Myers wrote: > +uint8_t new_flags = get_float_exception_flags(&env->fp_status); > +float_raise(old_flags, &env->fp_status); > +fpu_set_exception(env, > + ((new_flags & float_flag_invalid ? FPUS_IE : 0) | > + (new_flag

Re: [PATCH for-5.1] qcow2: Don't open images with a backing file and the data-file-raw bit

2020-05-19 Thread Alberto Garcia
ping On Wed 15 Apr 2020 09:02:07 PM CEST, Alberto Garcia wrote: > Although we cannot create these images with qemu-img it is still > possible to do it using an external tool. QEMU should refuse to open > them until the data-file-raw bit is cleared with 'qemu-img check'. > > Signed-off-by: Alberto

Re: [PATCH v2] xen: fix build without pci passthrough

2020-05-19 Thread Roger Pau Monné
On Tue, May 19, 2020 at 04:52:58PM +0100, Anthony PERARD wrote: > On Tue, May 19, 2020 at 04:31:01PM +0200, Roger Pau Monne wrote: > > has_igd_gfx_passthru is only available when QEMU is built with > > CONFIG_XEN_PCI_PASSTHROUGH, and hence shouldn't be used in common > > code without checking if it

Re: [PULL v2 7/7] qemu-img: Add bitmap sub-command

2020-05-19 Thread Eric Blake
On 5/19/20 11:18 AM, Eric Blake wrote: Include actions for --add, --remove, --clear, --enable, --disable, and --merge (note that --clear is a bit of fluff, because the same can be +case 'g': +granularity = cvtnum(optarg); +if (granularity < 0) { +

[PULL v3 0/7] bitmaps patches for 2020-05-18

2020-05-19 Thread Eric Blake
The following changes since commit f2465433b43fb87766d79f42191607dac4aed5b4: Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2020-05-19 13:42:58 +0100) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git tags/pull-bitmaps-2020-05-1

Re: [PATCH QEMU v22 10/18] vfio: Add load state functions to SaveVMHandlers

2020-05-19 Thread Dr. David Alan Gilbert
* Kirti Wankhede (kwankh...@nvidia.com) wrote: > Sequence during _RESUMING device state: > While data for this device is available, repeat below steps: > a. read data_offset from where user application should write data. > b. write data of data_size to migration region from data_offset. > c. write

Question: How do I discard any changes for the device which is set by blockdev option?

2020-05-19 Thread Masayoshi Mizuma
Hello, I would like to discard any changes while the qemu guest OS is done. I can do that with snapshot and drive option. However, snapshot option doesn't work for the device which set by blockdev option like as: $QEMU --enable-kvm \ -m 1024 \ -nographic \ -serial mon:stdio \

[PULL v3 7/7] qemu-img: Add bitmap sub-command

2020-05-19 Thread Eric Blake
Include actions for --add, --remove, --clear, --enable, --disable, and --merge (note that --clear is a bit of fluff, because the same can be accomplished by removing a bitmap and then adding a new one in its place, but it matches what QMP commands exist). Listing is omitted, because it does not re

[PATCH v2] block: Factor out bdrv_run_co()

2020-05-19 Thread Vladimir Sementsov-Ogievskiy
We have a few bdrv_*() functions that can either spawn a new coroutine and wait for it with BDRV_POLL_WHILE() or use a fastpath if they are alreeady running in a coroutine. All of them duplicate basically the same code. Factor the common code into a new function bdrv_run_co(). Signed-off-by: Kevi

[Bug 1879531] [NEW] Stack-overflow in _eth_get_rss_ex_dst_addr

2020-05-19 Thread Alexander Bulekov
Public bug reported: Hello, While fuzzing, I found a 1-byte stack-overflow (read) through the e1000e. ==10318==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffdb76c16c2 at pc 0x55594f1a69e1 bp 0x7ffdb76c15a0 sp 0x7ffdb76c1598 READ of size 1 at 0x7ffdb76c16c2 thread T0 #0 0x55

Re: [PATCH 0/2] Update use_goto_tb() in hppa and rx targets

2020-05-19 Thread Richard Henderson
On 5/19/20 9:21 AM, Ahmed Karaman wrote: > The issue arose because the page crossings check in use_goto_tb() > function is required only in the system mode. Checking it in both modes > causes an unnecessary overhead in the user mode. It is not only required in system mode. You can see failures in

Re: [PATCH 1/4] target/i386: fix floating-point load-constant rounding

2020-05-19 Thread Richard Henderson
On 5/13/20 4:49 PM, Joseph Myers wrote: > The implementations of the fldl2t, fldl2e, fldpi, fldlg2 and fldln2 > instructions load fixed constants independent of the rounding mode. > Fix them to load a value correctly rounded for the current rounding > mode (but always rounded to 64-bit precision in

Re: [PATCH 2/2] target/i386: fix IEEE x87 floating-point exception raising

2020-05-19 Thread Joseph Myers
On Tue, 19 May 2020, Richard Henderson wrote: > To retain the hard float fast path, we need to leave float_flag_invalid set > when the accrued exception bit is set. To me this suggests keep all of the > FPUS_* bits in fp_status and only convert to FPUS_* when we read the fp status > word. There

Re: [PATCH v2 2/9] target/riscv: Don't overwrite the reset vector

2020-05-19 Thread Alistair Francis
On Sat, May 16, 2020 at 2:03 AM Bin Meng wrote: > > On Sat, May 16, 2020 at 3:51 AM Alistair Francis wrote: > > > > On Thu, May 14, 2020 at 9:54 PM Bin Meng wrote: > > > > > > On Fri, May 15, 2020 at 5:51 AM Alistair Francis > > > wrote: > > > > > > > > On Thu, May 14, 2020 at 10:54 AM Philipp

[PATCH v6 1/5] hw/nvram/fw_cfg: Add the FW_CFG_DATA_GENERATOR interface

2020-05-19 Thread Philippe Mathieu-Daudé
The FW_CFG_DATA_GENERATOR allow any object to product blob of data consumable by the fw_cfg device. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/nvram/fw_cfg.h | 49 +++ hw/nvram/fw_cfg.c | 30 2 files changed, 79 inser

[PATCH v6 2/5] softmmu/vl: Let -fw_cfg option take a 'blob_id' argument

2020-05-19 Thread Philippe Mathieu-Daudé
The 'blob_id' argument refers to a QOM object able to produce data consumable by the fw_cfg device. The producer object must implement the FW_CFG_DATA_GENERATOR interface. Signed-off-by: Philippe Mathieu-Daudé --- softmmu/vl.c | 17 + 1 file changed, 13 insertions(+), 4 deletions

[PATCH v6 5/5] crypto/tls-cipher-suites: Product fw_cfg consumable blob

2020-05-19 Thread Philippe Mathieu-Daudé
Since our format is consumable by the fw_cfg device, we can implement the FW_CFG_DATA_GENERATOR interface. Signed-off-by: Philippe Mathieu-Daudé --- crypto/tls-cipher-suites.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/crypto/tls-cipher-suites.c b/crypto/tls-cipher-

[PATCH v6 0/5] fw_cfg: Add FW_CFG_DATA_GENERATOR; crypto: Add tls-cipher-suites

2020-05-19 Thread Philippe Mathieu-Daudé
Hi, This series has two parts: - First we add the ability to QOM objects to produce data consumable by the fw_cfg device, - Then we add the tls-cipher-suites object, and let it implement the FW_CFG_DATA_GENERATOR interface. This is required by EDK2 'HTTPS Boot' feature [*] to tell the guest

[PATCH v6 4/5] crypto: Add tls-cipher-suites object

2020-05-19 Thread Philippe Mathieu-Daudé
Example of use to dump: $ qemu-system-x86_64 -S \ -object tls-cipher-suites,id=mysuite,priority=@SYSTEM,verbose=yes Cipher suites for @SYSTEM: - TLS_AES_256_GCM_SHA3840x13, 0x02 TLS1.3 - TLS_CHACHA20_POLY1305_SHA256 0x13, 0x

Re: [RISU v2 05/17] Use EXIT_FAILURE, EXIT_SUCCESS

2020-05-19 Thread Alex Bennée
Richard Henderson writes: > Some of the time we exit via the return value from main. > This can make it easier to tell what it is we're returning. > > Reviewed-by: Peter Maydell > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 2/2] target/i386: fix IEEE x87 floating-point exception raising

2020-05-19 Thread Richard Henderson
On 5/19/20 11:12 AM, Joseph Myers wrote: > On Tue, 19 May 2020, Richard Henderson wrote: > >> To retain the hard float fast path, we need to leave float_flag_invalid set >> when the accrued exception bit is set. To me this suggests keep all of the >> FPUS_* bits in fp_status and only convert to F

[RFC PATCH v6 3/5] softmmu/vl: Allow -fw_cfg 'blob_id' option to set any file pathname

2020-05-19 Thread Philippe Mathieu-Daudé
This is to silent: $ qemu-system-x86_64 \ -object tls-cipher-suites,id=ciphersuite0,priority=@SYSTEM \ -fw_cfg name=etc/edk2/https/ciphers,blob_id=ciphersuite0 qemu-system-x86_64: -fw_cfg name=etc/edk2/https/ciphers,blob_id=ciphersuite0: warning: externally provided fw_cfg item names

Re: [RFC PATCH v6 3/5] softmmu/vl: Allow -fw_cfg 'blob_id' option to set any file pathname

2020-05-19 Thread Philippe Mathieu-Daudé
On 5/19/20 8:20 PM, Philippe Mathieu-Daudé wrote: This is to silent: $ qemu-system-x86_64 \ -object tls-cipher-suites,id=ciphersuite0,priority=@SYSTEM \ -fw_cfg name=etc/edk2/https/ciphers,blob_id=ciphersuite0 qemu-system-x86_64: -fw_cfg name=etc/edk2/https/ciphers,blob_id=cipher

Re: [PATCH v3] block: make BlockConf.*_size properties 32-bit

2020-05-19 Thread Roman Kagan
On Tue, May 19, 2020 at 04:08:26PM +0200, Kevin Wolf wrote: > Am 29.04.2020 um 11:18 hat Roman Kagan geschrieben: > > Devices (virtio-blk, scsi, etc.) and the block layer are happy to use > > 32-bit for logical_block_size, physical_block_size, and min_io_size. > > However, the properties in BlockCo

Re: [RISU v2 06/17] Make some risu.c symbols static

2020-05-19 Thread Alex Bennée
Richard Henderson writes: > These are unused in other translation units. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PULL v2 7/7] qemu-img: Add bitmap sub-command

2020-05-19 Thread Eric Blake
On 5/19/20 12:52 PM, Eric Blake wrote: On 5/19/20 11:18 AM, Eric Blake wrote: Include actions for --add, --remove, --clear, --enable, --disable, and --merge (note that --clear is a bit of fluff, because the same can be +    case 'g': +    granularity = cvtnum(optarg); +   

Re: [PATCH v2] block: Factor out bdrv_run_co()

2020-05-19 Thread Eric Blake
On 5/19/20 12:56 PM, Vladimir Sementsov-Ogievskiy wrote: We have a few bdrv_*() functions that can either spawn a new coroutine and wait for it with BDRV_POLL_WHILE() or use a fastpath if they are alreeady running in a coroutine. All of them duplicate basically the already same code. Factor

Re: [RISU v2 04/17] Adjust tracefile open for write

2020-05-19 Thread Alex Bennée
Richard Henderson writes: > Truncate the new output file. Rely on umask to remove > group+other file permissions, if desired. > > Reviewed-by: Peter Maydell > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée > --- > risu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH 2/2] target/i386: fix IEEE x87 floating-point exception raising

2020-05-19 Thread Joseph Myers
On Tue, 19 May 2020, Richard Henderson wrote: > > Note that another bug in the x87 emulation is the lack of setting C1 for > > most instructions with inexact results based on the direction of rounding > > (which will require a new feature to be added to the softfloat code to > > record that inf

Re: [PATCH] es1370: check total frame count against current frame

2020-05-19 Thread P J P
+-- On Fri, 15 May 2020, P J P wrote --+ | From: Prasad J Pandit | | A guest user may set channel frame count via es1370_write() | such that, in es1370_transfer_audio(), total frame count | 'size' is lesser than the number of frames that are processed | 'cnt'. | | int cnt = d->frame_cnt >> 1

Re: [PATCH 0/2] Update use_goto_tb() in hppa and rx targets

2020-05-19 Thread Alex Bennée
Richard Henderson writes: > On 5/19/20 9:21 AM, Ahmed Karaman wrote: >> The issue arose because the page crossings check in use_goto_tb() >> function is required only in the system mode. Checking it in both modes >> causes an unnecessary overhead in the user mode. > > It is not only required in

Re: [RISU v2 07/17] Add enum RisuOp

2020-05-19 Thread Alex Bennée
Richard Henderson writes: > Formalize the set of defines, plus -1, into an enum. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: Question: How do I discard any changes for the device which is set by blockdev option?

2020-05-19 Thread Eric Blake
On 5/19/20 12:56 PM, Masayoshi Mizuma wrote: Hello, I would like to discard any changes while the qemu guest OS is done. I can do that with snapshot and drive option. However, snapshot option doesn't work for the device which set by blockdev option like as: $QEMU --enable-kvm \ -m 1024 \

Re: tst-arm-mte bug: PSTATE.TCO is cleared on exceptions

2020-05-19 Thread Richard Henderson
On 5/18/20 5:59 AM, Szabolcs Nagy wrote: > i got some time to create a reproducer (with public code), Thanks. I've grabbed it. I'll try it out soon. r~

Re: [PATCH 0/2] Update use_goto_tb() in hppa and rx targets

2020-05-19 Thread Richard Henderson
On 5/19/20 11:38 AM, Alex Bennée wrote: > > Richard Henderson writes: > >> On 5/19/20 9:21 AM, Ahmed Karaman wrote: >>> The issue arose because the page crossings check in use_goto_tb() >>> function is required only in the system mode. Checking it in both modes >>> causes an unnecessary overhead

[PATCH 0/2] linux-user: mmap/mprotect prot values

2020-05-19 Thread Richard Henderson
The new validation hook will give me a place to add extra hooks to handle BTI and MTE. But in the meantime, we can adjust the host page protections to make PROT_EXEC reliable. r~ Richard Henderson (2): linux-user: Validate mmap/mprotect prot value linux-user: Adjust guest page protection f

[PATCH 1/2] linux-user: Validate mmap/mprotect prot value

2020-05-19 Thread Richard Henderson
The kernel will return -EINVAL for bits set in the prot argument that are unknown or invalid. Previously we were simply cropping out the bits that we care about. Introduce validate_prot_to_pageflags to perform this check in a single place between the two syscalls. Differentiate between the targe

[PATCH 2/2] linux-user: Adjust guest page protection for the host

2020-05-19 Thread Richard Henderson
Executable guest pages are never directly executed by the host, but do need to be readable for translation. Signed-off-by: Richard Henderson --- linux-user/mmap.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/linux-user/mmap.c b/linux-user/mmap.c index 36fd1e2250..8466

Re: [PATCH QEMU v22 08/18] vfio: Register SaveVMHandlers for VFIO device

2020-05-19 Thread Dr. David Alan Gilbert
* Kirti Wankhede (kwankh...@nvidia.com) wrote: > Define flags to be used as delimeter in migration file stream. > Added .save_setup and .save_cleanup functions. Mapped & unmapped migration > region from these functions at source during saving or pre-copy phase. > Set VFIO device state depending on

Re: [RISU v2 08/17] Add enum RisuResult

2020-05-19 Thread Alex Bennée
Richard Henderson writes: > Formalize the random set of numbers into an enum. Doing this > makes it easy to see that one of the responses in > recv_and_compare_register_info was inconsistent. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH QEMU v22 04/18] vfio: Add save and load functions for VFIO PCI devices

2020-05-19 Thread Dr. David Alan Gilbert
* Kirti Wankhede (kwankh...@nvidia.com) wrote: > These functions save and restore PCI device specific data - config > space of PCI device. > Tested save and restore with MSI and MSIX type. I don't think my comments from v16 on 26th March were addressed/replied to: > Signed-off-by: Kirti Wankhede

Re: [PATCH QEMU v22 04/18] vfio: Add save and load functions for VFIO PCI devices

2020-05-19 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > * Kirti Wankhede (kwankh...@nvidia.com) wrote: > > These functions save and restore PCI device specific data - config > > space of PCI device. > > Tested save and restore with MSI and MSIX type. > > I don't think my comments from v16 on 26th

Re: [PATCH v16 QEMU 05/16] vfio: Add migration region initialization and finalize function

2020-05-19 Thread Dr. David Alan Gilbert
* Kirti Wankhede (kwankh...@nvidia.com) wrote: > > > On 3/26/2020 11:22 PM, Dr. David Alan Gilbert wrote: > > * Kirti Wankhede (kwankh...@nvidia.com) wrote: > > > - Migration functions are implemented for VFIO_DEVICE_TYPE_PCI device in > > > this > > >patch series. > > > - VFIO device suppor

[PATCH 0/2] linux-user: Load a vdso for x86_64

2020-05-19 Thread Richard Henderson
The subject of AT_SYSINFO came up on launchpad recently. There is definite room for improvement in all of this: (1) We could build the vdso binary into qemu instead of really loading it from the file system. This would obviate the several problems of locating the .so file. It would also

[PATCH 2/2] linux-user: Load a VDSO for x86-64.

2020-05-19 Thread Richard Henderson
From: Richard Henderson Signed-off-by: Richard Henderson --- linux-user/elfload.c | 203 +-- 1 file changed, 198 insertions(+), 5 deletions(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 01a9323a63..d70e27cb62 100644 --- a/linux-user/e

[PATCH 1/2] linux-user: Build vdso for x64.

2020-05-19 Thread Richard Henderson
From: Richard Henderson ... Well, sortof. The Makefile bits are broken. Patch to load the vdso into the running program to follow. Signed-off-by: Richard Henderson --- Makefile | 4 +- pc-bios/Makefile | 5 ++ pc-bios/vdso-linux-x64.S | 115 +

Re: [PATCH QEMU v22 04/18] vfio: Add save and load functions for VFIO PCI devices

2020-05-19 Thread Alex Williamson
On Tue, 19 May 2020 20:28:13 +0100 "Dr. David Alan Gilbert" wrote: > * Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > > * Kirti Wankhede (kwankh...@nvidia.com) wrote: > > > These functions save and restore PCI device specific data - config > > > space of PCI device. > > > Tested save and

[PATCH v2 0/5] fix & merge block_status_above and is_allocated_above

2020-05-19 Thread Vladimir Sementsov-Ogievskiy
Hi all! v2: 01: wording, grammar, keep comment 02-03: add Kevin's r-bs 05: test-output rebased on compression type qcow2 extension = I wanted to understand, what is the real difference between bdrv_block_status_above and bdrv_is_allocated_above, IMHO bdrv_is_allocated_above should work thro

[PATCH v2 1/5] block/io: fix bdrv_co_block_status_above

2020-05-19 Thread Vladimir Sementsov-Ogievskiy
bdrv_co_block_status_above has several problems with handling short backing files: 1. With want_zeros=true, it may return ret with BDRV_BLOCK_ZERO but without BDRV_BLOCK_ALLOCATED flag, when actually short backing file which produces these after-EOF zeros is inside requested backing sequence. 2.

[PATCH v2 3/5] block/io: bdrv_common_block_status_above: support bs == base

2020-05-19 Thread Vladimir Sementsov-Ogievskiy
We are going to reuse bdrv_common_block_status_above in bdrv_is_allocated_above. bdrv_is_allocated_above may be called with include_base == false and still bs == base (for ex. from img_rebase()). So, support this corner case. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf -

[PATCH v2 4/5] block/io: fix bdrv_is_allocated_above

2020-05-19 Thread Vladimir Sementsov-Ogievskiy
bdrv_is_allocated_above wrongly handles short backing files: it reports after-EOF space as UNALLOCATED which is wrong, as on read the data is generated on the level of short backing file (if all overlays has unallocated area at that place). Reusing bdrv_common_block_status_above fixes the issue an

[PATCH v2 5/5] iotests: add commit top->base cases to 274

2020-05-19 Thread Vladimir Sementsov-Ogievskiy
These cases are fixed by previous patches around block_status and is_allocated. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/274 | 20 tests/qemu-iotests/274.out | 65 ++ 2 files changed, 85 insertions(+) diff --git a/te

[PATCH v2 2/5] block/io: bdrv_common_block_status_above: support include_base

2020-05-19 Thread Vladimir Sementsov-Ogievskiy
In order to reuse bdrv_common_block_status_above in bdrv_is_allocated_above, let's support include_base parameter. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- block/io.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/block/io

[PATCH 0/7] Latest COLO tree queued patches

2020-05-19 Thread Zhang Chen
From: Zhang Chen Hi Jason, this series include latest COLO related patches. I have finish basic test and review. If no other comments, please check and merge this series. Derek Su (1): colo-compare: Fix memory leak in packet_enqueue() Lukas Straub (6): net/colo-compare.c: Create event_bh wi

[PATCH 6/7] net/colo-compare.c, softmmu/vl.c: Check that colo-compare is active

2020-05-19 Thread Zhang Chen
From: Lukas Straub If the colo-compare object is removed before failover and a checkpoint happens, qemu crashes because it tries to lock the destroyed event_mtx in colo_notify_compares_event. Fix this by checking if everything is initialized by introducing a new variable colo_compare_active whic

[PATCH 2/7] net/colo-compare.c: Create event_bh with the right AioContext

2020-05-19 Thread Zhang Chen
From: Lukas Straub qemu_bh_new will set the bh to be executed in the main loop. This causes crashes as colo_compare_handle_event assumes that it has exclusive access the queues, which are also concurrently accessed in the iothread. Create the bh with the AioContext of the iothread to fulfill the

[PATCH 3/7] chardev/char.c: Use qemu_co_sleep_ns if in coroutine

2020-05-19 Thread Zhang Chen
From: Lukas Straub This will be needed in the next patch. Signed-off-by: Lukas Straub Reviewed-by: Marc-André Lureau Reviewed-by: Zhang Chen Signed-off-by: Zhang Chen --- chardev/char.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/chardev/char.c b/chardev/char.c

[PATCH 7/7] net/colo-compare.c: Correct ordering in complete and finalize

2020-05-19 Thread Zhang Chen
From: Lukas Straub In colo_compare_complete, insert CompareState into net_compares only after everything has been initialized. In colo_compare_finalize, remove CompareState from net_compares before anything is deinitialized. Signed-off-by: Lukas Straub Reviewed-by: Zhang Chen Signed-off-by: Zh

[PATCH 4/7] net/colo-compare.c: Fix deadlock in compare_chr_send

2020-05-19 Thread Zhang Chen
From: Lukas Straub The chr_out chardev is connected to a filter-redirector running in the main loop. qemu_chr_fe_write_all might block here in compare_chr_send if the (socket-)buffer is full. If another filter-redirector in the main loop want's to send data to chr_pri_in it might also block if th

<    1   2   3   4   >