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

2018-08-30 Thread Hongbo Zhang
On 29 August 2018 at 21:42, Andrew Jones wrote: > On Wed, Aug 29, 2018 at 05:17:20PM +0800, Hongbo Zhang wrote: >> On 17 August 2018 at 21:37, Peter Maydell wrote: >> > On 25 July 2018 at 06:30, Hongbo Zhang wrote: >> >> For the Aarch64, there is one machine 'virt', it is primarily meant to >> >

[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 @@ ty

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

[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 b/accel/k

[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 Reviewed-by: Eduardo Habkost --- 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/

[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 Reviewed-by: Eduardo Habkost --- 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_pcih

Re: [Qemu-devel] [PATCH] vl:c: make sure that sockets are calculated correctly in '-smp X' case

2018-08-30 Thread Igor Mammedov
On Wed, 29 Aug 2018 14:33:01 -0300 Eduardo Habkost wrote: > On Wed, Aug 29, 2018 at 04:32:01PM +0200, Igor Mammedov wrote: > > commit > > (5cdc9b76e3 vl.c: Remove dead assignment) > > removed sockets calculation when 'sockets' weren't provided on CLI > > since there wasn't any users for it back

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

2018-08-30 Thread Igor Mammedov
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, Aug 28, 2018 at 6:54 PM Marc-André Lureau > > > wrote: > > > > > > > > Hi >

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

2018-08-30 Thread Igor Mammedov
On Tue, 28 Aug 2018 17:38:40 +0200 Marc-André Lureau wrote: > The share=on/off property is used to modified mmap() MAP_SHARED > setting. Make it on by default for convenience and compatibility > reasons. > > Signed-off-by: Marc-André Lureau > --- > backends/hostmem-memfd.c | 4 +++- > qemu-opt

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

2018-08-30 Thread Leif Lindholm
On Thu, Aug 30, 2018 at 03:07:29PM +0800, Hongbo Zhang wrote: > >> Yes, I am working on the v3, with main changes: > >> - machine name "sbsa-ref" (good name?) > >> - a separate file sbsa-ref.c > >> - don't touch the acpi c file, acpi will be supplied by uefi > > > > I agree with the above three

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 09:31, Leif Lindholm wrote: > On Thu, Aug 30, 2018 at 03:07:29PM +0800, Hongbo Zhang wrote: >> @Ard, @Leif, is there any possibility to remove all the DT nodes? >> On real hardware, how does UEFI find the memory size and CPU number? > > Usually by asking some form of SCP/PMU.

Re: [Qemu-devel] [PATCH v2 01/20] memory-device: fix error message when hinted address is too small

2018-08-30 Thread Dr. David Alan Gilbert
* David Hildenbrand (da...@redhat.com) wrote: > The "at" should actually be a "before". > if (new_addr < address_space_start) > -> "can't add memory ... before... $address_space_start" > > So it looks similar to the other check > } else if ((new_addr + size) > address_space_end) >

Re: [Qemu-devel] [PATCH v2 02/20] memory-device: use memory device terminology in error messages

2018-08-30 Thread Dr. David Alan Gilbert
* David Hildenbrand (da...@redhat.com) wrote: > While we rephrased most error messages, we missed these. > > Signed-off-by: David Hildenbrand Reviewed-by: Dr. David Alan Gilbert > --- > hw/mem/memory-device.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/hw/m

Re: [Qemu-devel] [PATCH] vl:c: make sure that sockets are calculated correctly in '-smp X' case

2018-08-30 Thread Andrew Jones
On Thu, Aug 30, 2018 at 09:58:51AM +0200, Igor Mammedov wrote: > On Wed, 29 Aug 2018 14:33:01 -0300 > Eduardo Habkost wrote: > > > On Wed, Aug 29, 2018 at 04:32:01PM +0200, Igor Mammedov wrote: > > > commit > > > (5cdc9b76e3 vl.c: Remove dead assignment) > > > removed sockets calculation when '

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

2018-08-30 Thread Leif Lindholm
On Thu, Aug 30, 2018 at 09:39:33AM +0100, Peter Maydell wrote: > On 30 August 2018 at 09:31, Leif Lindholm wrote: > > On Thu, Aug 30, 2018 at 03:07:29PM +0800, Hongbo Zhang wrote: > >> @Ard, @Leif, is there any possibility to remove all the DT nodes? > >> On real hardware, how does UEFI find the m

Re: [Qemu-devel] [PATCH 7/9] block: Allow changing 'discard' on reopen

2018-08-30 Thread Alberto Garcia
On Wed 29 Aug 2018 01:39:10 PM CEST, Max Reitz wrote: > On 2018-08-26 16:09, Alberto Garcia wrote: >> 'discard' is one of the basic BlockdevOptions available for all >> drivers, but it's silently ignored by bdrv_reopen_prepare/commit(), so >> the user cannot change it and doesn't get an error expla

Re: [Qemu-devel] [PATCH 7/9] block: Allow changing 'discard' on reopen

2018-08-30 Thread Alberto Garcia
On Wed 29 Aug 2018 01:39:10 PM CEST, Max Reitz wrote: > On 2018-08-26 16:09, Alberto Garcia wrote: >> 'discard' is one of the basic BlockdevOptions available for all >> drivers, but it's silently ignored by bdrv_reopen_prepare/commit(), so >> the user cannot change it and doesn't get an error expla

[Qemu-devel] [Bug 1586613] Re: usb-hub can not be detached when detach usbdevice VM

2018-08-30 Thread Gerd Hoffmann
*** This bug is a duplicate of bug 1586611 *** https://bugs.launchpad.net/bugs/1586611 ** This bug has been marked a duplicate of bug 1586611 usb-hub can not be detached when detach usb device from VM -- You received this bug notification because you are a member of qemu- devel-ml, which

[Qemu-devel] [Bug 1586611] Re: usb-hub can not be detached when detach usb device from VM

2018-08-30 Thread Gerd Hoffmann
Use a newer libvirt version which manages usb addressing and assigns usb devices to usb ports. This is required to make sure the physical device tree is the same after vmsave/vmload or live migration. ** Changed in: qemu Status: New => Invalid -- You received this bug notification becaus

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

2018-08-30 Thread Gerd Hoffmann
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 assume, other guests), it requires third > party software, which is

[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
Whew, after some hurdles I managed to install a Linux Mint 19 guest (Ubuntu 18.04). After all updates, here the output: $ dmesg | grep microcode [0.036780] core: PEBS disabled due to CPU errata, please upgrade microcode So the microcode in the guest is not loaded! But see below: $ cat /proc/

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

2018-08-30 Thread Daniel P . Berrangé
The 'q35' machine type implements an Intel Series 3 chipset, of which there are several variants: https://www.intel.com/Assets/PDF/datasheet/316966.pdf The key difference between the 82P35 MCH ('p35', PCI device ID 0x29c0) and 82Q35 GMCH ('q35', PCI device ID 0x29b0) variants is that the latter

Re: [Qemu-devel] [PATCH] secondary-vga: unregister vram on unplug.

2018-08-30 Thread Gerd Hoffmann
Hi, > > Thanks for the feedback, after closer inspection, the secondary-vga > > refcount does, indeed, never reach 0. > > > > I noticed the bug was not present in v2.12.0 and had been visible since > > 93abfc88bd649de1933588bfc7175605331b3ea9 > > (https://lists.gnu.org/archive/html/qemu-devel/2

[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
Downloaded and ran the spectre-meltdown-checker.sh $ spectre-meltdown-checker.sh Spectre and Meltdown mitigation detection tool v0.39+ Checking for vulnerabilities on current system Kernel is Linux 4.15.0-33-generic #36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018 x86_64 CPU is Intel(R) Core(TM) i7-

[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
> Whew, after some hurdles I managed to install a Linux Mint 19 guest (Ubuntu > 18.04). After all updates, here the output: > > $ dmesg | grep microcode > [ 0.036780] core: PEBS disabled due to CPU errata, please upgrade microcode > > So the microcode in the guest is not loaded! But see below: As

Re: [Qemu-devel] [PATCH v4 05/10] json-lexer: make it safe to call destroy multiple times

2018-08-30 Thread Markus Armbruster
Marc-André Lureau writes: > We can easily avoid the burden of checking if the lexer was > initialized prior to calling destroy by the caller, let's do it. > > This allows simplification in state tracking in the qmp-async RFC > series, the patch "qmp: add QmpSession" can call qmp_session_destroy()

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

2018-08-30 Thread Igor Mammedov
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 command 'guest-get-vcpus': open("/sys/devices/system/cpu/cp

[Qemu-devel] [PATCH v2 0/9] s390x: instruction flags and AFP registers for TCG

2018-08-30 Thread David Hildenbrand
I wanted to add AFP-register control related checks for a long time. However, doing these checks in each and every relevant handler is ugly. As I will need similar checks for vector instructions (yes, I'm looking into that but it might take some time), I decided to introduce per-instruction flags,

[Qemu-devel] [PATCH v2 3/9] s390x/tcg: store in the TB flags if AFP is enabled

2018-08-30 Thread David Hildenbrand
We exit the TB when changing the control registers, so just like PSW bits, this should always be consistent for a TB. Using the PSW bit semantic makes things a lot easier compared to manually defining the spare, shifted bits. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand ---

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

2018-08-30 Thread David Hildenbrand
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 AFP is disabled. DXC § is to be injected if a DFP instruction is

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

2018-08-30 Thread David Hildenbrand
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 --- target/s390x/translate.c | 24 1 file change

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

2018-08-30 Thread David Hildenbrand
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 | 1 + target/s390x/excp_helper.c | 23 +

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

2018-08-30 Thread David Hildenbrand
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. Signed-off-by: David Hildenbrand --- target/s390x/insn-dat

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

2018-08-30 Thread David Hildenbrand
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. Signed-off-by: David Hildenbrand --- target/s390x/excp_helper.c | 1

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

2018-08-30 Thread David Hildenbrand
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(-) diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 5cc65

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

2018-08-30 Thread David Hildenbrand
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 available very early). Signed-off-by: David Hildenbrand --

Re: [Qemu-devel] [PATCH] vl:c: make sure that sockets are calculated correctly in '-smp X' case

2018-08-30 Thread Igor Mammedov
On Thu, 30 Aug 2018 11:08:53 +0200 Andrew Jones wrote: > On Thu, Aug 30, 2018 at 09:58:51AM +0200, Igor Mammedov wrote: > > On Wed, 29 Aug 2018 14:33:01 -0300 > > Eduardo Habkost wrote: > > > > > On Wed, Aug 29, 2018 at 04:32:01PM +0200, Igor Mammedov wrote: > > > > commit > > > > (5cdc9b

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

2018-08-30 Thread David Hildenbrand
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 insertions(+), 145 deletions(-) diff --git a/target/s390x/insn-data

Re: [Qemu-devel] [PATCH v3 0/8] Add limited MXU instruction support

2018-08-30 Thread Aleksandar Markovic
Hi, Craig, > From: Craig Janeczek > Sent: Tuesday, August 28, 2018 3:00 PM > > Subject: [PATCH v3 0/8] Add limited MXU instruction support > > This patch set begins to add MXU instruction support for mips emulation. Based on the info I have, I think a reasonable approach to integration of this

[Qemu-devel] [PATCH 1/1] spapr: Correct reference count on spapr-cpu-core

2018-08-30 Thread Sam Bobroff
spapr_init_cpus() currently creates spapr-cpu-core objects via object_new() and setting their realized property to true. This leaves their reference count at two, because object_new() adds an initial reference and the realization attaches them to a default parent object which also increments the re

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

2018-08-30 Thread Markus Armbruster
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 want of > a better home. > > Signed-off-by: Marc-André Lureau > --- > te

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

2018-08-30 Thread Markus Armbruster
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 that test > earlier, to cover QMP level as well, the test could go into qm

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 that

Re: [Qemu-devel] [PATCH v4 08/10] tests: add a qmp success-response test

2018-08-30 Thread Markus Armbruster
Marc-André Lureau writes: > Verify the usage of this schema feature and the API behaviour. This > should be the only case where qmp_dispatch() returns NULL without > error. Scratch "without error". > Signed-off-by: Marc-André Lureau With the commit message corrected: Reviewed-by: Markus Armb

Re: [Qemu-devel] [PATCH v3 0/8] Add limited MXU instruction support

2018-08-30 Thread Janeczek, Craig via Qemu-devel
That seems like a good plan to separate these tasks. I will implement this in the next patchset. Thank you -Original Message- From: Aleksandar Markovic Sent: Thursday, August 30, 2018 8:40 AM To: Janeczek, Craig ; qemu-devel@nongnu.org Cc: aurel...@aurel32.net; Petar Jovanovic ; Richard

Re: [Qemu-devel] [PATCH] char-pty: remove unnecessary #ifdef

2018-08-30 Thread Roman Bolshakov
On Wed, Aug 22, 2018 at 12:38:35PM +0200, Paolo Bonzini wrote: > For some reason __APPLE__ was not checked in pty code. However, the #ifdef > is redundant: this file is already compiled only if CONFIG_POSIX, same as > util/qemu-openpty.c which it uses. > Hi Paolo, Is it possible to apply the pa

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 12:02, Leif Lindholm wrote: > On Thu, Aug 30, 2018 at 09:39:33AM +0100, Peter Maydell wrote: >> On 30 August 2018 at 09:31, Leif Lindholm wrote: >> > On Thu, Aug 30, 2018 at 03:07:29PM +0800, Hongbo Zhang wrote: >> >> @Ard, @Leif, is there any possibility to remove all the DT

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

2018-08-30 Thread Stefan Berger
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é Lureau --- include/hw/compat.h | 4 +++- include/hw/i386/pc.h | 5 - hw/i386/pc_piix

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

2018-08-30 Thread Leif Lindholm
On Thu, Aug 30, 2018 at 03:29:02PM +0200, Ard Biesheuvel wrote: > On 30 August 2018 at 12:02, Leif Lindholm wrote: > > On Thu, Aug 30, 2018 at 09:39:33AM +0100, Peter Maydell wrote: > >> On 30 August 2018 at 09:31, Leif Lindholm wrote: > >> > On Thu, Aug 30, 2018 at 03:07:29PM +0800, Hongbo Zhang

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

2018-08-30 Thread Marc-André Lureau
Hi On Thu, Aug 30, 2018 at 3:54 PM 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é Lureau > >>

Re: [Qemu-devel] [PATCH v4 09/10] qga: process_event() simplification

2018-08-30 Thread Markus Armbruster
Marc-André Lureau writes: > Simplify the code around qmp_dispatch(): > - rely on qmp_dispatch/check_obj() for message checking > - have a single send_response() point > - constify send_response() argument > > It changes a couple of error messages: > > * When @req isn't a dictionary, from > In

Re: [Qemu-devel] [PATCH v6 03/13] qapi: remove error checks for event emission

2018-08-30 Thread Markus Armbruster
Markus Armbruster writes: > Peter Xu writes: > >> In the whole QAPI event emission code we're passing in an Error* object >> along the whole stack. That's never useful since it never fails after >> all. Remove that. > > This is the interesting part. We'll see below why it can't fail. > >> The

Re: [Qemu-devel] [PATCH] vl:c: make sure that sockets are calculated correctly in '-smp X' case

2018-08-30 Thread Eduardo Habkost
On Thu, Aug 30, 2018 at 09:58:51AM +0200, Igor Mammedov wrote: > On Wed, 29 Aug 2018 14:33:01 -0300 > Eduardo Habkost wrote: > > > On Wed, Aug 29, 2018 at 04:32:01PM +0200, Igor Mammedov wrote: > > > commit > > > (5cdc9b76e3 vl.c: Remove dead assignment) > > > removed sockets calculation when '

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

2018-08-30 Thread Markus Armbruster
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. http://repo.or.cz/qemu/armbru.git/shortlog/refs/heads/monitor-next PATCH 05 I'd li

Re: [Qemu-devel] [PATCH 1/9] char.h: fix gtk-doc comment style

2018-08-30 Thread Markus Armbruster
Marc-André Lureau writes: > Use the gtk-doc function comment style, as documented in: > https://developer.gnome.org/gtk-doc-manual/stable/documenting_symbols.html.en I'm no friend of this style, but these headers use it already, except they get it wrong in places. Your subject's "fix" expresses

[Qemu-devel] [RFC 5/6] virtio-net: steering mode: Implement rss support

2018-08-30 Thread Sameeh Jubran
From: Sameeh Jubran Signed-off-by: Sameeh Jubran --- hw/net/virtio-net.c | 122 1 file changed, 105 insertions(+), 17 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index e7c4ce6f66..4a52a6a1d0 100644 --- a/hw/net/virtio

[Qemu-devel] [PATCH] seccomp: check TSYNC host capability

2018-08-30 Thread Marc-André Lureau
Remove -sandbox option if the host is not capable of TSYNC, since the sandbox will fail at setup time otherwise. This will help libvirt, for ex, to figure out if -sandbox will work. Signed-off-by: Marc-André Lureau --- qemu-seccomp.c | 19 ++- vl.c | 4 ++-- 2 files ch

[Qemu-devel] [RFC 0/6] Virtio-net: Support RSS

2018-08-30 Thread Sameeh Jubran
From: Sameeh Jubran This series implements the Steering Mode feature which was introduced on the virtio-dev list a while ago, which can be found here: * https://lists.oasis-open.org/archives/virtio-dev/201805/msg00024.html The first three patches add some infrastructure support that is used in t

[Qemu-devel] [RFC 3/6] vhost-net: Expose vhost_net_get_fd

2018-08-30 Thread Sameeh Jubran
From: Sameeh Jubran Signed-off-by: Sameeh Jubran --- hw/net/vhost_net.c | 2 +- include/hw/virtio/virtio-net.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index e037db63a3..c0bff725c9 100644 --- a/hw/net/vhost_net.c +

[Qemu-devel] [RFC 4/6] virtio-net: implement steering mode feature

2018-08-30 Thread Sameeh Jubran
From: Sameeh Jubran Signed-off-by: Sameeh Jubran --- hw/net/virtio-net.c | 65 + include/hw/virtio/virtio-net.h | 3 ++ include/standard-headers/linux/virtio_net.h | 55 3 files changed, 116 insertions(+)

[Qemu-devel] [RFC 1/6] Add bpf support to qemu

2018-08-30 Thread Sameeh Jubran
From: Sameeh Jubran This commit adds the bpf header provided by Linux to Qemu. Signed-off-by: Sameeh Jubran --- MAINTAINERS | 5 + configure | 44 + scripts/update-linux-headers.sh | 8 ++-- 3 files cha

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

2018-08-30 Thread Sameeh Jubran
From: Sameeh Jubran Starting from kernel v4.16 tun device supports TUNSETSTEERINGEBPF and TUNSETFILTEREBPF. Signed-off-by: Sameeh Jubran --- include/net/net.h | 3 ++- net/tap-bsd.c | 5 + net/tap-linux.c | 29 - net/tap-linux.h | 3 ++- net/tap-solar

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

2018-08-30 Thread Markus Armbruster
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 your subject, s/hanlders/handlers/.

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

2018-08-30 Thread Markus Armbruster
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 don't really support > creating monitor anywhere/anytime at the moment. Add an

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

2018-08-30 Thread Markus Armbruster
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 programming error. Let's not > handle that hypothetical case. > > (fwiw, I introduce

[Qemu-devel] [PATCH v2 2/2] qemu-error: make use of {error, warn}_report_once_cond

2018-08-30 Thread Cornelia Huck
{error,warn}_report_once() are a special case of the new functions and can simply switch to them. Signed-off-by: Cornelia Huck --- include/qemu/error-report.h | 34 ++ 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/include/qemu/error-report.h b/in

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

2018-08-30 Thread Cornelia Huck
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 has been replaced with warn_report_

[Qemu-devel] [PATCH v2 0/2] qemu-error: advanced report_once handling

2018-08-30 Thread Cornelia Huck
[Markus: I've decided to not include your R-b, as I did too many changes to feel comfortable with that.] [Also note that I'm about to disappear on vacation, so don't expect quick responses. I just want to get it out before I forget about it.] Based on previous discussions, I wanted to enhance the

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': { '*name

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 wa

[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. Fi

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

[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 b/io/channel

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

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

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 not

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

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

[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] [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 b/qemu-img

[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, wh

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

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

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 t

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 comman

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

[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é L

[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 ++ tests/drive_del-te

[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 + tests/qapi-schema/qapi-schema-test.

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

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 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 don't

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 deletions(-)

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

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 wr

[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% per

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 h

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 A

  1   2   >