[Qemu-devel] [PATCH v5 2/4] tests: add qmp/object-add-without-props test

2018-08-30 Thread Marc-André Lureau
test_object_add_without_props() tests a bug in qmp_object_add() we fixed in commit e64c75a975. Sadly, we don't have systematic object-add tests. This lone test can go into qmp-cmd-test for want of a better home. Signed-off-by: Marc-André Lureau --- tests/qmp-cmd-test.c | 18 ++

[Qemu-devel] [PATCH] slirp: Propagate host TCP RST packet to the guest after socket disconnected

2018-08-30 Thread Gavin Grant via Qemu-devel
[PATCH] slirp: Propagate host TCP RST packet to the guest after socket disconnected Please bear with me, since this is my first correspondence with the qemu-devel mailing list (or any public devel mailing list for that matter!). I believe I have witnessed a discrepancy between SLIRP TCP and

Re: [Qemu-devel] [PATCH] slirp: Propagate host TCP RST packet to the guest after socket disconnected

2018-08-30 Thread Samuel Thibault
Hello, The principle seems sane, I'll have a look. Thanks, Samuel Gavin Grant, le jeu. 30 août 2018 16:57:57 +0100, a ecrit: > Commit 27d92ebc5ed1bb0b518d0ebc4c609182ad20a799 handled the case where the TCP > connection is abruptly closed via a RST packet, by checking for the ECONNRESET > errno.

Re: [Qemu-devel] [PATCH v2 2/2] hw/arm: Add Arm Enterprise machine type

2018-08-30 Thread Peter Maydell
On 30 August 2018 at 14:29, Ard Biesheuvel wrote: > How exactly the firmware figures out how many CPUs and how much memory > we are running with is out of scope for this, and so I don't think > there is a need to build something from scratch here: DT will do just > fine, given that both EDK2 and

Re: [Qemu-devel] [PULL 00/20] Migration pull requset

2018-08-30 Thread Dr. David Alan Gilbert
* Cornelia Huck (coh...@redhat.com) wrote: > On Fri, 24 Aug 2018 18:05:03 +0100 > Peter Maydell wrote: > > > On 22 August 2018 at 13:00, Juan Quintela wrote: > > > The following changes since commit > > > 13b7b188501d419a7d63c016e00065bcc693b7d4: > > > > > > Merge remote-tracking branch > >

Re: [Qemu-devel] [PATCH 8/8] qcow2: Read outside array bounds in qcow2_pre_write_overlap_check()

2018-08-30 Thread Eric Blake
On 08/30/2018 10:47 AM, Liam Merwick wrote: The commit for 0e4e4318eaa5 increments QCOW2_OL_MAX_BITNR but does not add an array entry for QCOW2_OL_BITMAP_DIRECTORY_BITNR to metadata_ol_names[]. As a result, an array dereference of metadata_ol_names[8] in qcow2_pre_write_overlap_check() could

Re: [Qemu-devel] [PATCH v2 4/9] s390x/tcg: support flags for instructions

2018-08-30 Thread Richard Henderson
On 08/30/2018 05:27 AM, David Hildenbrand wrote: > Storing flags for instructions allows us to efficiently verify certain > properties at a central point. Examples might later be handling if > AFP is disabled in CR0, we are not in problem state, or if vector > instructions are disabled in CR0. >

[Qemu-devel] [PATCH v4 6/9] target/mips: Add MXU instruction D16MUL

2018-08-30 Thread Craig Janeczek via Qemu-devel
Adds support for emulating the D16MUL instruction. Signed-off-by: Craig Janeczek --- v1 - initial patch v2 - changed bitfield usage to extract32 - used sextract_tl instructions instead of shift and ext v3 - Split gen_mxu function into command specific gen_mxu_ functions v4

[Qemu-devel] [PATCH v4 9/9] target/mips: Add MXU instructions S32LDD and S32LDDR

2018-08-30 Thread Craig Janeczek via Qemu-devel
Adds support for emulating the S32LDD and S32LDDR MXU instructions. Signed-off-by: Craig Janeczek --- v1 - initial patch v2 - changed bitfield usage to extract32 v3 - Split gen_mxu function into command specific gen_mxu_ functions v4 - Add check for MXUEN

[Qemu-devel] [PATCH v4 2/9] target/mips: Add all MXU opcodes

2018-08-30 Thread Craig Janeczek via Qemu-devel
Adds all MXU opcodes to the opcode enum. Signed-off-by: Craig Janeczek --- v1 - NA v2 - NA v3 - Initial patch, split out from prior first patch v4 - separate MXU opcodes into their own enum target/mips/translate.c | 60 + 1 file

Re: [Qemu-devel] [PATCH v2 7/9] s390x/tcg: handle privileged instructions via flags

2018-08-30 Thread Richard Henderson
On 08/30/2018 05:27 AM, David Hildenbrand wrote: > Let's check this also at a central place. > > Signed-off-by: David Hildenbrand > --- > target/s390x/insn-data.def | 138 ++--- > target/s390x/translate.c | 83 ++ > 2 files changed, 76

Re: [Qemu-devel] [PATCH v2 9/9] s390x/tcg: refactor specification checking

2018-08-30 Thread Richard Henderson
On 08/30/2018 05:27 AM, David Hildenbrand wrote: > We can fit this nicely into less LOC, without harming readability. > > Signed-off-by: David Hildenbrand > --- > target/s390x/translate.c | 34 ++ > 1 file changed, 6 insertions(+), 28 deletions(-) Reviewed-by:

Re: [Qemu-devel] [PATCH v2 2/9] s390x/tcg: factor out and fix DATA exception injection

2018-08-30 Thread Richard Henderson
On 08/30/2018 05:27 AM, David Hildenbrand wrote: > The DXC is to be stored in the low core, and only in the FPC in case AFP > is enabled in CR0. Stub is not required in current code, but this way > we never run into problems. > > Signed-off-by: David Hildenbrand > --- > target/s390x/cpu.h

[Qemu-devel] [PATCH v4 5/9] target/mips: Add MXU instruction S8LDD

2018-08-30 Thread Craig Janeczek via Qemu-devel
Adds support for emulating the S8LDD MXU instruction. Signed-off-by: Craig Janeczek --- v1 - initial patch v2 - changed bitfield usage to extract32 - used deposit_tl instructions instead of shift and bitmask v3 - Split gen_mxu function into command specific gen_mxu_ functions

[Qemu-devel] [Bug 1788665] Re: Low 2D graphics performance with Windows 10 (1803) VGA passthrough VM using "Spectre" protection

2018-08-30 Thread Heiko Sieger
> If you disable Spectre protection in the Windows VM, then it is not protected from Spectre. The hypervisor protects itself, and exposes the CPU feature(s) that enable the guest to activate its own protection. The hypervisor won't protect the guest directly - it just gives it the tools needed to

Re: [Qemu-devel] [PATCH V5 4/4] target-i386: add i440fx 0xcf8 port as coalesced_pio

2018-08-30 Thread Eduardo Habkost
On Thu, Aug 30, 2018 at 11:50:16PM +0800, Peng Hao wrote: > Signed-off-by: Peng Hao > Reviewed-by: Eduardo Habkost There has been a misunderstanding. I never sent a Reviewed-by line for this patch. -- Eduardo

Re: [Qemu-devel] [PATCH] hostmem: no need to check for host_memory_backend_mr_inited() in alloc()

2018-08-30 Thread Eduardo Habkost
On Thu, Aug 30, 2018 at 07:50:19PM +0200, Marc-André Lureau wrote: > memfd_backend_memory_alloc/file_backend_memory_alloc both needlessly > are are calling host_memory_backend_mr_inited() which creates an > illusion that alloc could be called multiple times but it isn't, it's > called once from

Re: [Qemu-devel] [PATCH v2 6/9] s390x/tcg: check for AFP-register, BFP and DFP data exceptions

2018-08-30 Thread Richard Henderson
On 08/30/2018 05:27 AM, David Hildenbrand wrote: > With the annotated functions, we can now easily check this at a central > place. > > DXC 1 is to be injected if an AFP register is used (for a HFP instruction) > when AFP is disabled. > DXC 2 is to be injected if a BFP instruction is used when

[Qemu-devel] [PATCH v4 3/9] target/mips: Split mips instruction handling

2018-08-30 Thread Craig Janeczek via Qemu-devel
Splits the instruction handling switch statement from the original legacy code. Signed-off-by: Craig Janeczek --- v1 - NA v2 - NA v3 - NA v4 - Initial patch target/mips/mips-defs.h | 1 + target/mips/translate.c | 28 +++- 2 files changed, 28

Re: [Qemu-devel] [PATCH v3 2/9] jobs: canonize Error object

2018-08-30 Thread Eric Blake
On 08/29/2018 08:57 PM, John Snow wrote: Jobs presently use both an Error object in the case of the create job, and char strings in the case of generic errors elsewhere. Unify the two paths as just j->err, and remove the extra argument from job_completed. The integer error code for

Re: [Qemu-devel] [PATCH v3 4/8] target/mips: Add MXU instruction S8LDD

2018-08-30 Thread Richard Henderson
On 08/28/2018 06:00 AM, Craig Janeczek via Qemu-devel wrote: > +case 6: /* XRa = {{8{sign of tmp8}}, tmp8, {8{sign of tmp8}}, tmp8} */ > +tcg_gen_qemu_ld_tl(t1, t0, ctx->mem_idx, MO_SB); > +tcg_gen_mov_tl(t0, t1); > +tcg_gen_andi_tl(t0, t0, 0xFF00); > +

Re: [Qemu-devel] [PATCH v2 1/9] s390x: move tcg_s390_program_interrupt() into TCG code and mark it noreturn

2018-08-30 Thread Richard Henderson
On 08/30/2018 05:27 AM, David Hildenbrand wrote: > Move it into TCG-only code and provide a stub. Turn it into noreturn. > > As Richard noted, we currently don't log the psw.addr before restoring > the state, fix that by moving (duplicating) the qemu_log_mask in the > tcg/kvm handlers. > >

[Qemu-devel] [PATCH v4 1/9] target/mips: Introduce MXU registers

2018-08-30 Thread Craig Janeczek via Qemu-devel
Define and initialize the 16 MXU registers. Signed-off-by: Craig Janeczek --- v1 - NA v2 - NA v3 - Initial patch, split out from prior first patch v4 - fixed reg name alignment - added braces around init for loop - Split mxu_CR out of the mxu_gpr array

[Qemu-devel] [PATCH v4 7/9] target/mips: Add MXU instruction D16MAC

2018-08-30 Thread Craig Janeczek via Qemu-devel
Adds support for emulating the D16MAC instruction. Signed-off-by: Craig Janeczek --- v1 - initial patch v2 - changed bitfield usage to extract32 - used sextract_tl instructions instead of shift and ext v3 - Split gen_mxu function into command specific gen_mxu_ functions v4

Re: [Qemu-devel] [PATCH v2 8/9] s390x/tcg: fix FP register pair checks

2018-08-30 Thread Richard Henderson
On 08/30/2018 05:27 AM, David Hildenbrand wrote: > Valid register pairs are 0/2, 1/3, 4/6, 5/7, 8/10, 9/11, 12/14, 13/15. > > R1/R2 always selects the lower number, so the current checks are not > correct as e.g. 2/4 could be selected as a pair. > > Signed-off-by: David Hildenbrand > --- >

[Qemu-devel] [PATCH v4 0/9] Add limited MXU instruction support

2018-08-30 Thread Craig Janeczek via Qemu-devel
This patch set begins to add MXU instruction support for mips emulation. Craig Janeczek (9): target/mips: Introduce MXU registers target/mips: Add all MXU opcodes target/mips: Split mips instruction handling target/mips: Add MXU instructions S32I2M and S32M2I target/mips: Add MXU

[Qemu-devel] [PATCH 2/2] HACK: test blockdev-backup instead of drive-backup

2018-08-30 Thread John Snow
This is just a real chainsaw job on 124 to prove that we can indeed use blockdev-backup interchangeably with drive-backup for incremental backups. A nicer test will follow once I refactor this a bit to look a little less like the Texas Chainsaw Massacre. Signed-off-by: John Snow ---

[Qemu-devel] [PATCH 1/2] blockdev-backup: add bitmap argument

2018-08-30 Thread John Snow
It is only an oversight that we don't allow incremental backup with blockdev-backup. Add the bitmap argument which enables this. Signed-off-by: John Snow --- blockdev.c | 16 +++- qapi/block-core.json | 7 ++- 2 files changed, 21 insertions(+), 2 deletions(-) diff

[Qemu-devel] [PATCH 0/2] block: add 'bitmap' argument to blockdev-backup

2018-08-30 Thread John Snow
Eric brought to my attention that we don't currently allow incremental backups made to a node. There's no reason we can't, though, so enable this. A better test in en-route, this is mostly a PoC chainsaw job on the second patch to see if patchew knows something I don't. --js John Snow (2):

[Qemu-devel] [PATCH v4 8/9] target/mips: Add MXU instructions Q8MUL and Q8MULSU

2018-08-30 Thread Craig Janeczek via Qemu-devel
Adds support for emulating the Q8MUL and Q8MULSU instructions. Signed-off-by: Craig Janeczek --- v1 - initial patch v2 - changed bitfield usage to extract32 v3 - Split gen_mxu function into command specific gen_mxu_ functions v4 - Add check for MXUEN target/mips/translate.c

[Qemu-devel] [PATCH v4 4/9] target/mips: Add MXU instructions S32I2M and S32M2I

2018-08-30 Thread Craig Janeczek via Qemu-devel
This commit makes the MXU registers and the utility functions for reading/writing to them. This is required for full MXU instruction support. Adds support for emulating the S32I2M and S32M2I MXU instructions. Signed-off-by: Craig Janeczek --- v1 - initial patch v2 - Fix checkpatch.pl

Re: [Qemu-devel] [PATCH v2 5/9] s390x/tcg: add instruction flags for floating point instructions

2018-08-30 Thread Richard Henderson
On 08/30/2018 05:27 AM, David Hildenbrand wrote: > These flags allow us to later on detect if a DATA program interrupt > is to be injected, and which DXC (1,2,3) is to be used. > > Interestingly, some support FP instructions are considered as HFP > instructions (I assume simply because they were

[Qemu-devel] [PATCH 2/8] job: Fix off-by-one accesses to JobSTT and JobVerbTable

2018-08-30 Thread Liam Merwick
In the array dereference of JobVerbTable[verb] in job_apply_verb() the check of the index, verb, allows an overrun because an index equal to the array size is permitted. Similarly, in the array dereference of JobSTT[s0][s1] with index s1 in job_state_transition(), an off-by-one overrun is

[Qemu-devel] [PATCH 3/8] block: Null pointer dereference in blk_root_get_parent_desc()

2018-08-30 Thread Liam Merwick
The dev_id returned by the call to blk_get_attached_dev_id() in blk_root_get_parent_desc() can be NULL (an internal call to object_get_canonical_path may have returned NULL) so it should be checked before dereferencing. Signed-off-by: Liam Merwick Reviewed-by: Darren Kenny Reviewed-by: Mark

Re: [Qemu-devel] [PATCH 1/5] nvme: PCI/e configuration from specification

2018-08-30 Thread Daniel Verkamp
Hi Shimi, On Sun, Aug 26, 2018 at 2:50 PM Gersner wrote: > > Hi Daniel, > Thanks for taking a look. Comments are inline. > > Gersner. > > On Sun, Jul 15, 2018 at 9:21 AM Daniel Verkamp wrote: >> >> On Fri, Jun 22, 2018 at 4:22 AM, Shimi Gersner wrote: >> > PCI/e configuration currently does

[Qemu-devel] [PATCH v5 3/4] tests: add qmp/qom-set-without-value test

2018-08-30 Thread Marc-André Lureau
test_qom_set_without_value() is about a bug in infrastructure used by the QMP core, fixed in commit c489780203. We covered the bug in infrastructure unit tests (commit bce3035a44). I wrote that test earlier, to cover QMP level as well, the test could go into qmp-test. Signed-off-by: Marc-André

[Qemu-devel] [PATCH] slirp: Propagate host TCP RST packet to the guest after socket disconnected

2018-08-30 Thread Gavin Grant via Qemu-devel
Commit 27d92ebc5ed1bb0b518d0ebc4c609182ad20a799 handled the case where the TCP connection is abruptly closed via a RST packet, by checking for the ECONNRESET errno. However it does not consider the case where the connection has been half-closed by the host (FIN/ACK), then the host socket is

Re: [Qemu-devel] [PATCH v3 2/3] kvm: Add support to KVM_GET_MSR_FEATURE_INDEX_LIST and KVM_GET_MSRS system ioctl

2018-08-30 Thread Eduardo Habkost
On Thu, Aug 30, 2018 at 12:22:10PM +0800, Robert Hoo wrote: > On Thu, 2018-08-23 at 14:11 -0300, Eduardo Habkost wrote: > > On Thu, Aug 23, 2018 at 02:28:28PM +0800, Robert Hoo wrote: > > > On Sat, 2018-08-18 at 12:05 -0300, Eduardo Habkost wrote: > > [...] > > > > We don't want QEMU to refuse to

Re: [Qemu-devel] [PATCH V5 3/4] target-i386: add rtc 0x70 port as coalesced_pio

2018-08-30 Thread Eduardo Habkost
On Thu, Aug 30, 2018 at 11:50:15PM +0800, Peng Hao wrote: > Signed-off-by: Peng Hao > Reviewed-by: Eduardo Habkost There has been a misunderstanding. I never sent a Reviewed-by line for this patch. -- Eduardo

Re: [Qemu-devel] [PATCH V5 1/4] target-i386: introduce coalesced_pio kvm header update

2018-08-30 Thread Eduardo Habkost
On Thu, Aug 30, 2018 at 11:50:13PM +0800, Peng Hao wrote: > add coalesced_pio's struct and KVM_CAP_COALESCED_PIO header. > > Signed-off-by: Peng Hao > Reviewed-by: Eduardo Habkost I think there was a misunderstanding. I never sent a Reviewed-by line for this patch, because we need to get the

Re: [Qemu-devel] [PATCH v4 06/10] tests: add qmp/object-add-without-props test

2018-08-30 Thread Marc-André Lureau
Hi On Thu, Aug 30, 2018 at 3:01 PM Markus Armbruster wrote: > > Marc-André Lureau writes: > > > test_object_add_without_props() tests a bug in qmp_object_add() we > > fixed in commit e64c75a975. Sadly, we don't have systematic > > object-add tests. This lone test can go into qmp-cmd-test for

Re: [Qemu-devel] [PATCH v4 07/10] tests: add qmp/qom-set-without-value test

2018-08-30 Thread Marc-André Lureau
Hi On Thu, Aug 30, 2018 at 3:05 PM Markus Armbruster wrote: > > Marc-André Lureau writes: > > > test_qom_set_without_value() is about a bug in infrastructure used by > > the QMP core, fixed in commit c489780203. We covered the bug in > > infrastructure unit tests (commit bce3035a44). I wrote

Re: [Qemu-devel] [PATCH] qga: ignore non present cpus when handling qmp_guest_get_vcpus()

2018-08-30 Thread Laszlo Ersek
+Drew On 08/30/18 14:08, Igor Mammedov wrote: > If VM has VCPUs plugged sparselly (for example a VM started with > 3 VCPUs (cpu0, cpu1 and cpu2) and then cpu1 was hotunplugged so > only cpu0 and cpu2 are present), QGA will rise a error > error: internal error: unable to execute QEMU agent

Re: [Qemu-devel] [PATCH 6/8] block: dump_qlist() may dereference a Null pointer

2018-08-30 Thread Eric Blake
On 08/30/2018 10:47 AM, Liam Merwick wrote: A NULL 'list' passed into function dump_qlist() isn't correctly validated and can be passed to qlist_first() where it is dereferenced. But dump_qlist() is static, and it is easy to prove that it will never be called with a NULL 'list' parameter

Re: [Qemu-devel] [PATCH] i386: clarify that the Q35 machine type implements a P35 chipset

2018-08-30 Thread Eduardo Habkost
On Thu, Aug 30, 2018 at 11:57:57AM +0100, Daniel P. Berrangé wrote: [...] > diff --git a/include/hw/pci/pci_ids.h b/include/hw/pci/pci_ids.h > index 63acc722a9..eeb33018ad 100644 > --- a/include/hw/pci/pci_ids.h > +++ b/include/hw/pci/pci_ids.h > @@ -255,7 +255,7 @@ > #define

[Qemu-devel] [PATCH 6/8] block: dump_qlist() may dereference a Null pointer

2018-08-30 Thread Liam Merwick
A NULL 'list' passed into function dump_qlist() isn't correctly validated and can be passed to qlist_first() where it is dereferenced. This could be resolved by checking if the list is NULL in dump_qlist() and returning immediately. However, the general case can be handled by adding a NULL arg

[Qemu-devel] [PATCH 0/8] off-by-one and NULL pointer accesses detected by static analysis

2018-08-30 Thread Liam Merwick
Below are a number of fixes to some off-by-one, read outside array bounds, and NULL pointer accesses detected by an internal Oracle static analysis tool (Parfait). https://labs.oracle.com/pls/apex/f?p=labs:49:P49_PROJECT_ID:13 I have also included a patch to add a command-line option to

[Qemu-devel] [PATCH 7/8] io: file descriptor not initialized in qio_channel_command_new_spawn()

2018-08-30 Thread Liam Merwick
Incorrect checking of flags could result in uninitialized file descriptor being used. Signed-off-by: Liam Merwick Reviewed-by: Darren Kenny Reviewed-by: Mark Kanda --- io/channel-command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/io/channel-command.c

[Qemu-devel] [PATCH 8/8] qcow2: Read outside array bounds in qcow2_pre_write_overlap_check()

2018-08-30 Thread Liam Merwick
The commit for 0e4e4318eaa5 increments QCOW2_OL_MAX_BITNR but does not add an array entry for QCOW2_OL_BITMAP_DIRECTORY_BITNR to metadata_ol_names[]. As a result, an array dereference of metadata_ol_names[8] in qcow2_pre_write_overlap_check() could result in a read outside of the array bounds.

Re: [Qemu-devel] [RFC V1] hw/pci/pci_example.c : Added a new pci device

2018-08-30 Thread Yoni Bettan
On 8/29/18 2:40 PM, Cornelia Huck wrote: On Tue, 28 Aug 2018 10:24:26 +0300 Yoni Bettan wrote: Thanks you for your review! - this is a simple example of how to write a pci device that supports portio, mmio, irq and dma Do you also plan to add example code for MSI(-X)? [Not

[Qemu-devel] [PATCH 1/8] configure: Provide option to explicitly disable AVX2

2018-08-30 Thread Liam Merwick
The configure script detects if the compiler has AVX2 support and automatically sets avx2_opt="yes" which in turn defines CONFIG_AVX2_OPT. There is no way of explicitly overriding this setting so this commit adds two command-line options: --enable-avx2 and --disable-avx2. The default behaviour,

[Qemu-devel] [PATCH v5 0/4] tests: add a few QMP-related tests

2018-08-30 Thread Marc-André Lureau
Hi, The test patches from "[PATCH v4 00/10] monitor: various code simplification and fixes" series. v5: - add "tests: add qmp_assert_error_class()" patch - commit message tweaks, TODO Marc-André Lureau (4): tests: add qmp_assert_error_class() tests: add qmp/object-add-without-props test

[Qemu-devel] [PATCH] hostmem: no need to check for host_memory_backend_mr_inited() in alloc()

2018-08-30 Thread Marc-André Lureau
memfd_backend_memory_alloc/file_backend_memory_alloc both needlessly are are calling host_memory_backend_mr_inited() which creates an illusion that alloc could be called multiple times but it isn't, it's called once from UserCreatable complete(). Suggested-by: Igor Mammedov Signed-off-by:

Re: [Qemu-devel] [PATCH 2/8] job: Fix off-by-one accesses to JobSTT and JobVerbTable

2018-08-30 Thread Eric Blake
On 08/30/2018 10:47 AM, Liam Merwick wrote: In the array dereference of JobVerbTable[verb] in job_apply_verb() the check of the index, verb, allows an overrun because an index equal to the array size is permitted. Similarly, in the array dereference of JobSTT[s0][s1] with index s1 in

Re: [Qemu-devel] [PATCH 2/9] chardev: mark the calls that allow an implicit mux monitor

2018-08-30 Thread Marc-André Lureau
Hi On Thu, Aug 30, 2018 at 4:58 PM Markus Armbruster wrote: > > Marc-André Lureau writes: > > > This is mostly for readability of the code. Let's make it clear which > > callers can create an implicit monitor when the chardev is muxed. > > > > This will also enforce a safer behaviour, as we

Re: [Qemu-devel] [PATCH v9 1/6] hw/i386: add pc-i440fx-3.1 & pc-q35-3.1

2018-08-30 Thread Eduardo Habkost
On Fri, Aug 10, 2018 at 05:32:18PM +0200, Marc-André Lureau wrote: > The following patch is going to add compatiblity parameters. > > Signed-off-by: Marc-André Lureau > --- > include/hw/compat.h | 4 +++- > include/hw/i386/pc.h | 5 - > hw/i386/pc_piix.c| 13 - >

Re: [Qemu-devel] [RFC 2/6] tap: Add support for bpf ioctls

2018-08-30 Thread Eric Blake
On 08/30/2018 09:27 AM, Sameeh Jubran wrote: From: Sameeh Jubran Starting from kernel v4.16 tun device supports TUNSETSTEERINGEBPF and TUNSETFILTEREBPF. Signed-off-by: Sameeh Jubran --- +++ b/qapi/net.json @@ -692,3 +692,14 @@ ## { 'event': 'NIC_RX_FILTER_CHANGED', 'data': {

[Qemu-devel] [PATCH 4/8] qemu-img: potential Null pointer deref in img_commit()

2018-08-30 Thread Liam Merwick
The function block_job_get() may return NULL so before dereferencing the 'job' pointer in img_commit() it should be checked. Signed-off-by: Liam Merwick Reviewed-by: Darren Kenny Reviewed-by: Mark Kanda --- qemu-img.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qemu-img.c

Re: [Qemu-devel] [PATCH 7/8] io: file descriptor not initialized in qio_channel_command_new_spawn()

2018-08-30 Thread Eric Blake
On 08/30/2018 10:47 AM, Liam Merwick wrote: Incorrect checking of flags could result in uninitialized file descriptor being used. Signed-off-by: Liam Merwick Reviewed-by: Darren Kenny Reviewed-by: Mark Kanda --- io/channel-command.c | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [Qemu-devel] [PATCH 4/9] char: update the mux hanlders in class callback

2018-08-30 Thread Marc-André Lureau
Hi On Thu, Aug 30, 2018 at 4:58 PM Markus Armbruster wrote: > > Marc-André Lureau writes: > > > Instead of handling mux chardev in a special way in > > qemu_chr_fe_set_handlers(), we may use the chr_update_read_handler > > class callback instead. > > > > Signed-off-by: Marc-André Lureau > > In

Re: [Qemu-devel] [PATCH] RISC-V - Dynamic parameterization of RISC-V memory map

2018-08-30 Thread Michael Eager
Corrected patch attached. On 08/29/2018 05:48 PM, Michael Eager wrote: Whoops.  I just noticed that this patch is against the riscv-qemu repo on github, not the qemu.org repo.  I will rework it for the qemu.org repo.  Meanwhile, I welcome any comments. On 08/29/2018 05:21 PM, Michael Eager

Re: [Qemu-devel] [PATCH] input-linux: toggle for lock keys

2018-08-30 Thread Ryan El Kochta via Qemu-devel
On August 30, 2018 6:51 AM, Gerd Hoffmann wrote: > On Mon, Aug 27, 2018 at 01:49:22PM +, Ryan El Kochta wrote: > > > I personally use the Scroll Lock key. On Linux, Scroll Lock (along > > with all the other lock keys) is easy to disable with an xmodmap > > command. On Windows (or, I'd

[Qemu-devel] [PATCH] migration/rdma: Fix uninitialised rdma_return_path

2018-08-30 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Clang correctly errors out moaning that rdma_return_path is used uninitialised in the earlier error paths. Make it NULL so that the error path ignores it. Fixes: 55cc1b5937a8e709e4c102e74b206281073aab82 Signed-off-by: Dr. David Alan Gilbert Reprorted by: Cornelia

[Qemu-devel] [Bug 1788665] Re: Low 2D graphics performance with Windows 10 (1803) VGA passthrough VM using "Spectre" protection

2018-08-30 Thread Heiko Sieger
>The possibilities left are that either your Windows guest is lacking software updates that could perhaps improve its performance, or that 2D graphics really is that awful in combination with spectre/meltdown fixes. Thanks Daniel. There are two problems with this explanation: 1. A native "bare

[Qemu-devel] [PATCH v5 1/4] tests: add qmp_assert_error_class()

2018-08-30 Thread Marc-André Lureau
This helper will simplify a bunch of code checking for QMP errors and can be shared by various tests. Note that test-qga does check for error description as well, so don't replace the code there for now. Signed-off-by: Marc-André Lureau --- tests/libqtest.h | 9 ++

[Qemu-devel] [PATCH v5 4/4] tests: add a qmp success-response test

2018-08-30 Thread Marc-André Lureau
Verify the usage of this schema feature and the API behaviour. This should be the only case where qmp_dispatch() returns NULL. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster --- tests/test-qmp-cmds.c | 17 +

Re: [Qemu-devel] [PATCH 5/9] char-fe: set_handlers() needs an associted chardev

2018-08-30 Thread Marc-André Lureau
Hi On Thu, Aug 30, 2018 at 4:58 PM Markus Armbruster wrote: > > Marc-André Lureau writes: > > > It is futile to call qemu_chr_fe_set_handlers() without an associated > > chardev, because the function is doing nothing in that case, not even > > reporting an error, it would likely be a

Re: [Qemu-devel] [PATCH v2 2/2] hw/arm: Add Arm Enterprise machine type

2018-08-30 Thread Ard Biesheuvel
On 30 August 2018 at 18:36, Peter Maydell wrote: > On 30 August 2018 at 14:29, Ard Biesheuvel wrote: >> How exactly the firmware figures out how many CPUs and how much memory >> we are running with is out of scope for this, and so I don't think >> there is a need to build something from scratch

[Qemu-devel] [PATCH 5/8] block: Fix potential Null pointer dereferences in vvfat.c

2018-08-30 Thread Liam Merwick
The calls to bdrv_new_open_driver(), find_mapping_for_cluster(), and array_get_next() may return NULL but it isn't always checked for before dereferencing the value returned. Signed-off-by: Liam Merwick Reviewed-by: Darren Kenny Reviewed-by: Mark Kanda --- block/vvfat.c | 56

[Qemu-devel] [Bug 1788665] Re: Low 2D graphics performance with Windows 10 (1803) VGA passthrough VM using "Spectre" protection

2018-08-30 Thread Daniel Berrange
There is always a performance differential between bare metal & VMs. The actual amount varies depending on alot of different factors and meltdown/spectre have had an effect here - the actual perf hit depends on the CPU models & virtual hardware and more besides - ranging anywhere from 0% to 40%

[Qemu-devel] [PATCH] libvhost-user: fix clang enum-conversion warning

2018-08-30 Thread Marc-André Lureau
Now that the VhostUserMsg.request field is used for both master & slave requests, since commit d84599f56c820d8c1ac9928a76500dcdfbbf194d: contrib/libvhost-user/libvhost-user.c:953:20: error: implicit conversion from enumeration type 'enum VhostUserSlaveRequest' to different enumeration type

Re: [Qemu-devel] [PATCH] hostmem-memfd: honour share=on/off property

2018-08-30 Thread Marc-André Lureau
Hi On Thu, Aug 30, 2018 at 10:20 AM Igor Mammedov wrote: > > On Wed, 29 Aug 2018 14:36:00 +0200 > Marc-André Lureau wrote: > > > Hi > > > > On Wed, Aug 29, 2018 at 10:50 AM Igor Mammedov wrote: > > > > > > On Tue, 28 Aug 2018 18:55:35 +0200 > > > Marc-André Lureau wrote: > > > > > > > On Tue,

Re: [Qemu-devel] [PATCH v9 1/6] hw/i386: add pc-i440fx-3.1 & pc-q35-3.1

2018-08-30 Thread Eduardo Habkost
On Thu, Aug 30, 2018 at 09:54:05AM -0400, Stefan Berger wrote: > On 08/28/2018 10:05 AM, Marc-André Lureau wrote: > > ping > > On Fri, Aug 10, 2018 at 5:34 PM Marc-André Lureau > > wrote: > > > The following patch is going to add compatiblity parameters. > > > > > > Signed-off-by: Marc-André

Re: [Qemu-devel] [PATCH V5 1/4] target-i386: introduce coalesced_pio kvm headerupdate

2018-08-30 Thread peng.hao2
>On Thu, Aug 30, 2018 at 11:50:13PM +0800, Peng Hao wrote: >> add coalesced_pio's struct and KVM_CAP_COALESCED_PIO header. >> >> Signed-off-by: Peng Hao >> Reviewed-by: Eduardo Habkost >I think there was a misunderstanding. I never sent a Reviewed-by >line for this patch, because we need to

[Qemu-devel] [PATCH V5 2/4] target-i386:add coalesced_pio API

2018-08-30 Thread Peng Hao
Signed-off-by: Peng Hao Reviewed-by: Eduardo Habkost --- accel/kvm/kvm-all.c | 57 +++ include/exec/memory.h | 4 ++-- memory.c | 4 ++-- 3 files changed, 57 insertions(+), 8 deletions(-) diff --git a/accel/kvm/kvm-all.c

[Qemu-devel] [PATCH V5 4/4] target-i386: add i440fx 0xcf8 port as coalesced_pio

2018-08-30 Thread Peng Hao
Signed-off-by: Peng Hao --- hw/pci-host/piix.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c index 0e60834..da73743 100644 --- a/hw/pci-host/piix.c +++ b/hw/pci-host/piix.c @@ -327,6 +327,10 @@ static void i440fx_pcihost_realize(DeviceState *dev,

[Qemu-devel] [PATCH V5 0/4] introduce coalesced pio support

2018-08-30 Thread Peng Hao
Coalesced pio is base on coalesced mmio and can be used for some port like rtc port, pci-host config port, virtio-pci config port and so on. Specially in case of rtc as coalesced pio, some versions of windows guest access rtc frequently because of rtc as system tick. guest access rtc like this:

Re: [Qemu-devel] [PATCH V4 4/4] target-i386: add i440fx 0xcf8 portascoalesced_pio

2018-08-30 Thread Michael S. Tsirkin
On Mon, Aug 27, 2018 at 11:17:49PM +0800, peng.h...@zte.com.cn wrote: > >On Mon, Aug 27, 2018 at 04:25:00PM +0800, peng.h...@zte.com.cn wrote: > >> >> On 25 Aug 2018, at 15:19, Peng Hao wrote: > >> >> > >> >> diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c > >> >> index 0e60834..da73743

[Qemu-devel] [Bug 1790018] [NEW] Assertion failure (or segmentation fault) running 32-bit x86 Linux guest on 64-bit PowerPC host

2018-08-30 Thread A. Wilcox
Public bug reported: Qemu 2.12.1 (also tried 2.12.0) Linux gwyn 4.14.48-mc8-easy #1 SMP Sat Jun 30 23:29:01 CDT 2018 ppc64 GNU/Linux gcc (Adelie 6.4.0-r9) 6.4.0 GNU assembler (GNU Binutils) 2.30 musl libc (powerpc64) Version 1.1.19 64-bit, 64-thread (16-core) POWER9 server in Big endian mode:

Re: [Qemu-devel] [PATCH] migration/rdma: Fix uninitialised rdma_return_path

2018-08-30 Thread Philippe Mathieu-Daudé
On 8/30/18 2:36 PM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Clang correctly errors out moaning that rdma_return_path > is used uninitialised in the earlier error paths. > Make it NULL so that the error path ignores it. > > Fixes:

Re: [Qemu-devel] [PATCH v4 00/10] monitor: various code simplification and fixes

2018-08-30 Thread Michael Roth
Quoting Markus Armbruster (2018-08-30 09:21:11) > Marc-André Lureau writes: > > > Hi, > > > > This series is a rebased subset of "[PATCH v3 00/38] RFC: monitor: add > > asynchronous command type". > > PATCH 01-04 are core monitor work Peter will need to make progress. > Queued. >

[Qemu-devel] [Bug 1448985] Re: llvmpipe i386 crashes when running on qemu64 cpu

2018-08-30 Thread Stefan Bader
Since we no longer produce i386 images, this would be hard to reproduce. I could imagine the issue still exists but nobody is or will care. Essentially a difference of what features are reported via cpuid and what actually is implemented in the cpu emulation. Will close at least the Ubuntu side.

[Qemu-devel] [PATCH V5 3/4] target-i386: add rtc 0x70 port as coalesced_pio

2018-08-30 Thread Peng Hao
Signed-off-by: Peng Hao --- hw/timer/mc146818rtc.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818rtc.c index 6f1f723..b19ef51 100644 --- a/hw/timer/mc146818rtc.c +++ b/hw/timer/mc146818rtc.c @@ -70,6 +70,7 @@ typedef struct RTCState {

[Qemu-devel] [PATCH V5 1/4] target-i386: introduce coalesced_pio kvm header update

2018-08-30 Thread Peng Hao
add coalesced_pio's struct and KVM_CAP_COALESCED_PIO header. Signed-off-by: Peng Hao --- accel/kvm/kvm-all.c | 4 ++-- linux-headers/linux/kvm.h | 11 +-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index

[Qemu-devel] [Bug 1495380] Re: Invalid parameter 'queues'. multi-queue vhost-user backends does not work.

2018-08-30 Thread Thomas Huth
Looking through old bug tickets... can you still reproduce this issue with the latest version of QEMU? Or could we close this ticket nowadays? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is

[Qemu-devel] [Bug 1448985] Re: llvmpipe i386 crashes when running on qemu64 cpu

2018-08-30 Thread Thomas Huth
Looking through old bug tickets... can you still reproduce this issue with the latest upstream version of QEMU? Or could we close this ticket nowadays? ** Changed in: qemu Status: New => Incomplete ** Changed in: llvm-toolchain-3.6 (Ubuntu) Status: New => Incomplete ** Changed

[Qemu-devel] [Bug 721825] Re: VDI block driver bugs

2018-08-30 Thread Thomas Huth
** Changed in: qemu Importance: Undecided => Low -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/721825 Title: VDI block driver bugs Status in QEMU: Triaged Bug description: Chunqiang Tang

Re: [Qemu-devel] [PATCH v2 1/2] qemu-error: add {error, warn}_report_once_cond

2018-08-30 Thread Markus Armbruster
Cornelia Huck writes: > Add two functions to print an error/warning report once depending > on a passed-in condition variable and flip it if printed. This is > useful if you want to print a message not once-globally, but e.g. > once-per-device. > > Inspired by warn_once() in hw/vfio/ccw.c, which

Re: [Qemu-devel] [PATCH v5 2/4] tests: add qmp/object-add-without-props test

2018-08-30 Thread Thomas Huth
On 2018-08-30 17:58, Marc-André Lureau wrote: > test_object_add_without_props() tests a bug in qmp_object_add() we > fixed in commit e64c75a975. Sadly, we don't have systematic > object-add tests. This lone test can go into qmp-cmd-test for want of > a better home. > > Signed-off-by: Marc-André

[Qemu-devel] [Bug 1787505] Re: Solaris host: no network connection, mouse pointer mismatch

2018-08-30 Thread Michele Denber
Anyone? I'm still trying to get my networking working. On this page: https://en.wikibooks.org/wiki/QEMU/Networking#User_mode_networking, it says "The guest OS will see an E1000 NIC with a virtual DHCP server on 10.0.2.2 and will be allocated an address starting from 10.0.2.15. A virtual DNS

Re: [Qemu-devel] [resend][PATCH] qga-win: add support for qmp_guest_fsfreeze_freeze_list

2018-08-30 Thread Chen Hanxiao
At 2018-08-24 04:22:08, "Michael Roth" wrote: >Quoting Chen Hanxiao (2018-08-09 20:13:48) >> From: Chen Hanxiao >> >> This patch add support for freeze specified fs. >> >> The valid mountpoints list member are [1]: >> >> The path of a mounted folder, for example, Y:\MountX\ >> A drive

Re: [Qemu-devel] [PATCH] target/ppc: add external PID support

2018-08-30 Thread David Gibson
On Tue, Aug 14, 2018 at 06:59:54PM +0200, Roman Kapl wrote: > External PID is a mechanism present on BookE 2.06 that enables application to > store/load data from different address spaces. There are special version of > some > instructions, which operate on alternate address space, which is

Re: [Qemu-devel] [PATCH v5 1/4] tests: add qmp_assert_error_class()

2018-08-30 Thread Thomas Huth
On 2018-08-30 17:58, Marc-André Lureau wrote: > This helper will simplify a bunch of code checking for QMP errors and > can be shared by various tests. Note that test-qga does check for > error description as well, so don't replace the code there for now. > > Signed-off-by: Marc-André Lureau >

Re: [Qemu-devel] [PATCH V5 2/4] target-i386:add coalesced_pio API

2018-08-30 Thread Michael S. Tsirkin
On Fri, Aug 31, 2018 at 05:05:03PM +0800, Peng Hao wrote: > Signed-off-by: Peng Hao > Reviewed-by: Eduardo Habkost > --- > accel/kvm/kvm-all.c | 57 > +++ > include/exec/memory.h | 4 ++-- > memory.c | 4 ++-- > 3 files changed,

[Qemu-devel] [PATCH 2/2] sun4u: implement custom FWPathProvider

2018-08-30 Thread Mark Cave-Ayland
This enables the correct generation of bootdevice fw paths for in-built IDE and virtio-pci-blk devices suitable for OpenBIOS. Note we also set the MachineClass ignore_boot_device_suffixes property to true to allow the correct customisation of the disk node names as required. Signed-off-by: Mark

[Qemu-devel] [PATCH 1/2] sabre: generate correct fw path for sabre PCI host bridge

2018-08-30 Thread Mark Cave-Ayland
Set the fw_name property to "pci" and also set an explicit OFW address using the value of the special_base property. Signed-off-by: Mark Cave-Ayland --- hw/pci-host/sabre.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/pci-host/sabre.c b/hw/pci-host/sabre.c index

[Qemu-devel] [PATCH 0/2] sun4u: generate correct fw paths for cmd646 IDE and virtio-blk-pci devices

2018-08-30 Thread Mark Cave-Ayland
This patchset is the QEMU counterpart to the patches posted on the OpenBIOS list at https://mail.coreboot.org/pipermail/openbios/2018-August/010422.html which generate correct fw paths for the sun4u machine. With these patches applied QEMU generates the correct fw paths for both the in-built

[Qemu-devel] [PATCH V5 2/4] target-i386:add coalesced_pio API

2018-08-30 Thread Peng Hao
Signed-off-by: Peng Hao Reviewed-by: Eduardo Habkost --- accel/kvm/kvm-all.c | 57 +++ include/exec/memory.h | 4 ++-- memory.c | 4 ++-- 3 files changed, 57 insertions(+), 8 deletions(-) diff --git a/accel/kvm/kvm-all.c

[Qemu-devel] [PATCH V5 3/4] target-i386: add rtc 0x70 port as coalesced_pio

2018-08-30 Thread Peng Hao
Signed-off-by: Peng Hao Reviewed-by: Eduardo Habkost --- hw/timer/mc146818rtc.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/timer/mc146818rtc.c b/hw/timer/mc146818rtc.c index 6f1f723..b19ef51 100644 --- a/hw/timer/mc146818rtc.c +++ b/hw/timer/mc146818rtc.c @@ -70,6 +70,7 @@

[Qemu-devel] [PATCH V5 0/4] introduce coalesced pio support

2018-08-30 Thread Peng Hao
Coalesced pio is base on coalesced mmio and can be used for some port like rtc port, pci-host config port, virtio-pci config port and so on. Specially in case of rtc as coalesced pio, some versions of windows guest access rtc frequently because of rtc as system tick. guest access rtc like this:

  1   2   >