Re: [Qemu-devel] [PATCH qemu REPOST] spapr/rtas: Force big endian compile for rtas

2019-06-12 Thread David Gibson
On Wed, Jun 12, 2019 at 12:07:23PM +1000, Alexey Kardashevskiy wrote: > At the moment the rtas's Makefile uses generic QEMU rules which means > that when QEMU is compiled on a little endian system, the spapr-rtas.bin > is compiled as little endian too which is incorrect as it is always > executed

Re: [Qemu-devel] [RFC PATCH v4 5/5] target/ppc: support single stepping with KVM HV

2019-06-12 Thread Alexey Kardashevskiy
Are you reposting this any time soon? In meanwhile I hit a problem when I cannot step over the "stdu" instruction. I basically put this: stdur1,-368(r1) and "ni" in gdb does not stop on the next instruction which is quite confusing. Ideas? On 20/03/2019 12:42, Alexey Kardashevskiy wrote:

Re: [Qemu-devel] [PATCH v12 2/7] virtio-pmem: Add virtio pmem driver

2019-06-12 Thread Cornelia Huck
Hi Pankaj, On Tue, 11 Jun 2019 23:34:50 -0400 (EDT) Pankaj Gupta wrote: > Hi Cornelia, > > > On Tue, 11 Jun 2019 22:07:57 +0530 > > Pankaj Gupta wrote: > > > + err1 = virtqueue_kick(vpmem->req_vq); > > > + spin_unlock_irqrestore(>pmem_lock, flags); > > > + /* > > > + * virtqueue_add_sgs

[Qemu-devel] [PATCH v4] vfio/common: Introduce vfio_set_irq_signaling helper

2019-06-12 Thread Eric Auger
The code used to assign an interrupt index/subindex to an eventfd is duplicated many times. Let's introduce an helper that allows to set/unset the signaling for an ACTION_TRIGGER, ACTION_MASK or ACTION_UNMASK action. Signed-off-by: Eric Auger --- v3 -> v4: - renamed irq_to_str into

Re: [Qemu-devel] [PATCH v3 8/8] multifd: rest of zlib compression

2019-06-12 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> This is still a work in progress, but get everything sent as expected >> and it is faster than the code that is already there. >> >> Signed-off-by: Juan Quintela >> --- >> migration/ram.c | 106

[Qemu-devel] [PATCH v10 2/6] ppc: spapr: Introduce FWNMI capability

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

[Qemu-devel] [PULL 05/13] spapr: Clean up dt creation for PCI buses

2019-06-12 Thread David Gibson
Device nodes for PCI bridges (both host and P2P) describe both the bridge device itself and the bus hanging off it, handling of this is a bit of a mess. spapr_dt_pci_device() has a few things it only adds for non-bridges, but always adds #address-cells and #size-cells which should only appear for

[Qemu-devel] [PULL 06/13] spapr: Clean up spapr_drc_populate_dt()

2019-06-12 Thread David Gibson
This makes some minor cleanups to spapr_drc_populate_dt(), renaming it to the shorter and more idiomatic spapr_dt_drc() along the way. Signed-off-by: David Gibson Reviewed-by: Greg Kurz Acked-by: Michael S. Tsirkin --- hw/ppc/spapr.c | 7 +++ hw/ppc/spapr_drc.c | 13

Re: [Qemu-devel] spapr_pci: Advertise BAR reallocation capability

2019-06-12 Thread David Gibson
On Thu, Jun 06, 2019 at 02:09:19PM +1000, Alexey Kardashevskiy wrote: > The pseries guests do not normally allocate PCI resouces and rely on > the system firmware doing so. Furthermore at least at some point in > the past the pseries guests won't even be allowed to change BARs, probably > it is

Re: [Qemu-devel] [PATCH v4] vfio/common: Introduce vfio_set_irq_signaling helper

2019-06-12 Thread Auger Eric
Hi Li, On 6/12/19 10:24 AM, Li Qiang wrote: > Eric Auger 于2019年6月12日周三 下午4:14写道: > >> The code used to assign an interrupt index/subindex to an >> eventfd is duplicated many times. Let's introduce an helper that >> allows to set/unset the signaling for an ACTION_TRIGGER, >> ACTION_MASK or

[Qemu-devel] [PATCH v3 0/9] Introduce cpu die topology and enable CPUID.1F for i386

2019-06-12 Thread Like Xu
Multi-chip packaging technology allows integration of multi-cores in one die and multi-dies in one single package, for example Intel CLX-AP or AMD EPYC. This patch series extend the CPU topology to the socket/dies/core/thread model, allowing the setting of dies number per one socket on -smp qemu

[Qemu-devel] [PATCH v3 1/9] i386: Add die-level cpu topology to x86CPU on PCMachine

2019-06-12 Thread Like Xu
The die-level as the first PC-specific cpu topology is added to the leagcy cpu topology model, which has one die per package implicitly and only the numbers of sockets/cores/threads are configurable. In the new model with die-level support, the total number of logical processors (including

[Qemu-devel] [PATCH v3 6/9] i386/cpu: Add CPUID.1F generation support for multi-dies PCMachine

2019-06-12 Thread Like Xu
The CPUID.1F as Intel V2 Extended Topology Enumeration Leaf would be exposed if guests want to emulate multiple software-visible die within each package. Per Intel's SDM, the 0x1f is a superset of 0xb, thus they can be generated by almost same code as 0xb except die_offset setting. If the number

[Qemu-devel] [PATCH v3 5/9] tests/x86-cpuid: Update testcases in test_topo_bits() with multiple dies

2019-06-12 Thread Like Xu
The corresponding topo_bits tests are updated to support die configurations. Signed-off-by: Like Xu --- tests/test-x86-cpuid.c | 84 ++ 1 file changed, 45 insertions(+), 39 deletions(-) diff --git a/tests/test-x86-cpuid.c b/tests/test-x86-cpuid.c index

[Qemu-devel] [PATCH v10 6/6] ppc: spapr: Handle "ibm, nmi-register" and "ibm, nmi-interlock" RTAS calls

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

[Qemu-devel] [PULL 10/13] spapr: Allow hot plug/unplug of PCI bridges and devices under PCI bridges

2019-06-12 Thread David Gibson
The pseries machine type already allows PCI hotplug and unplug via the PAPR mechanism, but only on the root bus of each PHB. This patch extends this to allow PCI to PCI bridges to be hotplugged, and devices to be hotplugged or unplugged under P2P bridges. For now we disallow hot unplugging P2P

[Qemu-devel] [PATCH v10 5/6] migration: Include migration support for machine check handling

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

Re: [Qemu-devel] [PATCH v3] vfio/common: Introduce vfio_set_irq_signaling helper

2019-06-12 Thread Auger Eric
Hi Alex, On 6/11/19 9:48 PM, Alex Williamson wrote: > On Tue, 11 Jun 2019 17:47:25 +0200 > Eric Auger wrote: > >> The code used to assign an interrupt index/subindex to an >> eventfd is duplicated many times. Let's introduce an helper that >> allows to set/unset the signaling for an

[Qemu-devel] [PATCH v2.1 02.5/11] monitor: Restrict use of Monitor member qmp to actual QMP monitors

2019-06-12 Thread Markus Armbruster
From: Kevin Wolf We currently use Monitor member qmp even in HMP monitors. Harmless, but it's in the next commit's way. Restrict its use to QMP monitors. Several functions have a tacit "is a QMP monitor" precondition. Add explicit assertions there. The next commit will replace most of them

[Qemu-devel] [PATCH v2.1 03/11] monitor: Make MonitorQMP a child class of Monitor

2019-06-12 Thread Markus Armbruster
From: Kevin Wolf Currently, struct Monitor mixes state that is only relevant for HMP, state that is only relevant for QMP, and some actually shared state. In particular, a MonitorQMP field is present in the state of any monitor, even if it's not a QMP monitor and therefore doesn't use the state.

Re: [Qemu-devel] [PATCH] i386: Don't print warning if phys-bits was set automatically

2019-06-12 Thread Dr. David Alan Gilbert
* Eduardo Habkost (ehabk...@redhat.com) wrote: > If cpu->host_phys_bits_limit is set, QEMU will make > cpu->phys_bits be lower than host_phys_bits on some cases. This > triggers a warning that was supposed to be printed only if > phys-bits was explicitly set in the command-line. > > Reorder the

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

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

[Qemu-devel] [PATCH v10 3/6] target/ppc: Handle NMI guest exit

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

Re: [Qemu-devel] [PATCH v2] net: cadence_gem: fix compilation error when debug is on

2019-06-12 Thread Philippe Mathieu-Daudé
On 6/11/19 4:55 PM, Ramon Fried wrote: > defining CADENCE_GEM_ERR_DEBUG causes compilation > errors, fix that. > > Signed-off-by: Ramon Fried > --- > v2: change %lx to HWADDR_PRIx and %lx to %zdx > > hw/net/cadence_gem.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff

Re: [Qemu-devel] [PATCH v2 02/11] monitor: Split monitor_init in HMP and QMP function

2019-06-12 Thread Markus Armbruster
Markus Armbruster writes: [...] > Much clearer overall. Forgot: Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH v2 01/11] monitor: Remove unused password prompting fields

2019-06-12 Thread Markus Armbruster
Kevin Wolf writes: > Commit 788cf9f8c removed the code for password prompting from the > monitor. Since then, the Monitor fields password_completion_cb and > password_opaque have been unused. Remove them. > > Signed-off-by: Kevin Wolf > Reviewed-by: Dr. David Alan Gilbert > --- > monitor.c |

Re: [Qemu-devel] [RFC] virtio-rng: add a watchdog

2019-06-12 Thread Amit Shah
On Tue, 2019-06-11 at 19:20 +0200, Laurent Vivier wrote: > The virtio-rng linux driver can be stuck in virtio_read() on a > wait_for_completion_killable() call if the virtio-rng device in QEMU > doesn't provide data. > > It's a problem, because virtio_read() is called from rng_get_data() > with >

Re: [Qemu-devel] [PATCH v2 03/11] monitor: Make MonitorQMP a child class of Monitor

2019-06-12 Thread Markus Armbruster
Kevin Wolf writes: > Currently, struct Monitor mixes state that is only relevant for HMP, > state that is only relevant for QMP, and some actually shared state. > In particular, a MonitorQMP field is present in the state of any > monitor, even if it's not a QMP monitor and therefore doesn't use

[Qemu-devel] [PATCH v3 4/9] i386: Update new x86_apicid parsing rules with die_offset support

2019-06-12 Thread Like Xu
In new sockets/dies/cores/threads model, the apicid of logical cpu could imply die level info of guest cpu topology thus x86_apicid_from_cpu_idx() need to be refactored with #dies value, so does apicid_*_offset(). To keep semantic compatibility, the legacy pkg_offset which helps to generate

[Qemu-devel] [PATCH v3 9/9] vl.c: Add -smp, dies=* command line support and update doc

2019-06-12 Thread Like Xu
For PC target, users could configure the number of dies per one package via command line with this patch, such as "-smp dies=2,cores=4". The parsing rules of new cpu-topology model obey the same restrictions/logic as the legacy socket/core/thread model especially on missing values computing.

Re: [Qemu-devel] [PATCH v2 02/11] monitor: Split monitor_init in HMP and QMP function

2019-06-12 Thread Markus Armbruster
Kevin Wolf writes: > Instead of mixing HMP and QMP monitors in the same function, separate > the monitor creation function for both. > > Signed-off-by: Kevin Wolf > Reviewed-by: Dr. David Alan Gilbert > --- > monitor.c | 86 +++ > 1 file

Re: [Qemu-devel] ?==?utf-8?q? ?==?utf-8?q? [PATCH 0/8] Optimize emulation of ten Altivec instructions:?==?utf-8?q? lvsl,

2019-06-12 Thread Stefan Brankovic
> > > Original Message > Subject: Re: [Qemu-devel] [PATCH 0/8] Optimize emulation of ten Altivec > instructions: lvsl, > Date: Thursday, June 6, 2019 19:13 CEST > From: Richard Henderson > To: Stefan Brankovic , qemu-devel@nongnu.org > CC: da...@gibson.dropbear.id.au >

Re: [Qemu-devel] [PATCH v2] net: cadence_gem: fix compilation error when debug is on

2019-06-12 Thread Laurent Vivier
Le 12/06/2019 à 06:27, Ramon Fried a écrit : > > > On Tue, Jun 11, 2019 at 7:21 PM Laurent Vivier > wrote: > > Le 11/06/2019 à 16:55, Ramon Fried a écrit : > > defining CADENCE_GEM_ERR_DEBUG causes compilation > > errors, fix that. > > > >

Re: [Qemu-devel] [PATCH 06/19] aspeed: introduce a configurable number of CPU per machine

2019-06-12 Thread Cédric Le Goater
On 12/06/2019 03:32, Joel Stanley wrote: > On Sat, 25 May 2019 at 15:13, Cédric Le Goater wrote: >> >> The current models of the Aspeed SoCs only have one CPU but future >> ones will support SMP. Introduce a way to configure the maximum number >> of CPU per machine. SMP support will be activated

Re: [Qemu-devel] [PATCH v4] vfio/common: Introduce vfio_set_irq_signaling helper

2019-06-12 Thread Li Qiang
Eric Auger 于2019年6月12日周三 下午4:14写道: > The code used to assign an interrupt index/subindex to an > eventfd is duplicated many times. Let's introduce an helper that > allows to set/unset the signaling for an ACTION_TRIGGER, > ACTION_MASK or ACTION_UNMASK action. > > Signed-off-by: Eric Auger > >

[Qemu-devel] [PATCH v3 8/9] machine: Refactor smp_parse() in vl.c as MachineClass::smp_parse()

2019-06-12 Thread Like Xu
To make smp_parse() more flexible and expansive, a smp_parse function pointer is added to MachineClass that machine types could override. The generic smp_parse() code in vl.c is moved to hw/core/machine.c, and become the default implementation of MachineClass::smp_parse. A PC-specific function

[Qemu-devel] [PATCH v3 2/9] hw/i386: Adjust nr_dies with configured smp_dies for PCMachine

2019-06-12 Thread Like Xu
To support multiple dies configuration on PCMachine, the best place to set CPUX86State->nr_dies with requested PCMachineState->smp_dies is in pc_new_cpu() and pc_cpu_pre_plug(). Refactoring pc_new_cpu() is applied and redundant parameter "const char *typename" would be removed. Suggested-by:

[Qemu-devel] [PATCH v3 7/9] target/i386: Support multi-dies when host doesn't support CPUID.1F

2019-06-12 Thread Like Xu
In guest CPUID generation process, the cpuid_min_level would be adjusted to the maximum passed value for basic CPUID configuration and it should not be restricted by the limited value returned from cpu_x86_cpuid(). After the basic cpu_x86_cpuid() loop is finished, the cpuid_0_entry.eax needs to be

[Qemu-devel] [PATCH v3 3/9] i386/cpu: Consolidate die-id validity in smp context

2019-06-12 Thread Like Xu
The field die_id (default as 0) and has_die_id are introduced to X86CPU. Following the legacy smp check rules, the die_id validity is added to the same contexts as leagcy smp variables such as hmp_hotpluggable_cpus(), machine_set_cpu_numa_node(), cpu_slot_to_string() and pc_cpu_pre_plug().

Re: [Qemu-devel] [PATCH for-4.1 v2] q35: Revert to kernel irqchip

2019-06-12 Thread Daniel P . Berrangé
On Mon, Jun 03, 2019 at 10:06:06AM +0200, Paolo Bonzini wrote: > On 29/05/19 05:30, Michael S. Tsirkin wrote: > > On Tue, May 14, 2019 at 02:14:41PM -0600, Alex Williamson wrote: > >> Commit b2fc91db8447 ("q35: set split kernel irqchip as default") changed > >> the default for the pc-q35-4.0

[Qemu-devel] [PATCH v10 4/6] target/ppc: Build rtas error log upon an MCE

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

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

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

[Qemu-devel] [QEMU] [PATCH 6/8] bootdevice: Refactor get_boot_devices_list

2019-06-12 Thread Sam Eiderman
Move device name construction to a separate function. We will reuse this function in the following commit to pass logical CHS parameters through fw_cfg much like we currently pass bootindex. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- bootdevice.c | 61

Re: [Qemu-devel] [PATCH v2] migration/xbzrle: update cache and current_data in one place

2019-06-12 Thread Juan Quintela
Wei Yang wrote: > When we are not in the last_stage, we need to update the cache if page > is not the same. > > Currently this procedure is scattered in two places and mixed with > encoding status check. > > This patch extract this general step out to make the code a little bit > easy to read. >

[Qemu-devel] [PULL 2/8] migration-test: rename parameter to parameter_int

2019-06-12 Thread Juan Quintela
We would need _str ones on the next patch. Signed-off-by: Juan Quintela Reviewed-by: Wei Yang Signed-off-by: Juan Quintela --- tests/migration-test.c | 55 +- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/tests/migration-test.c

[Qemu-devel] [PULL 7/8] migration/multifd: sync packet_num after all thread are done

2019-06-12 Thread Juan Quintela
From: Wei Yang Notification from recv thread is not ordered, which means we may be notified by one MultiFDRecvParams but adjust packet_num for another. Move the adjustment after we are sure each recv thread are sync-ed. Signed-off-by: Wei Yang Reviewed-by: Juan Quintela Reviewed-by: Peter Xu

[Qemu-devel] [PULL 3/8] migration-test: Add migration multifd test

2019-06-12 Thread Juan Quintela
We set multifd-channels. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Thomas Huth Tested-by: Wei Yang Signed-off-by: Juan Quintela --- tests/migration-test.c | 48 ++ 1 file changed, 48 insertions(+) diff --git

[Qemu-devel] [PATCH v4 5/6] migration: Make no compression operations into its own structure

2019-06-12 Thread Juan Quintela
It will be used later. Signed-off-by: Juan Quintela --- Move setup of ->ops helper to proper place (wei) Rename s/none/nocomp/ (dave) --- migration/migration.c | 9 ++ migration/migration.h | 1 + migration/ram.c | 188 -- 3 files changed, 190

[Qemu-devel] [QEMU] [PATCH v2 7/8] bootdevice: FW_CFG interface for LCHS values

2019-06-12 Thread Sam Eiderman
Using fw_cfg, supply logical CHS values directly from QEMU to the BIOS. Non-standard logical geometries break under QEMU. A virtual disk which contains an operating system which depends on logical geometries (consistent values being reported from BIOS INT13 AH=08) will most likely break under

Re: [Qemu-devel] [QEMU] [PATCH 7/8] bootdevice: FW_CFG interface for LCHS values

2019-06-12 Thread Laszlo Ersek
On 06/12/19 11:42, Sam Eiderman wrote: > Using fw_cfg, supply logical CHS values directly from QEMU to the BIOS. > > Non-standard logical geometries break under QEMU. > > A virtual disk which contains an operating system which depends on > logical geometries (consistent values being reported

Re: [Qemu-devel] [PATCH v2 08/11] monitor: Create monitor_int.h with common definitions

2019-06-12 Thread Markus Armbruster
One more nit... Kevin Wolf writes: > Before we can split monitor.c, we need to create a header file that monitor/misc.c > contains the common definitions that will be used by multiple source > files. > > Signed-off-by: Kevin Wolf > Reviewed-by: Dr. David Alan Gilbert

Re: [Qemu-devel] [PATCH v2 08/11] monitor: Create monitor_int.h with common definitions

2019-06-12 Thread Markus Armbruster
Kevin Wolf writes: > Before we can split monitor.c, we need to create a header file that > contains the common definitions that will be used by multiple source > files. > > Signed-off-by: Kevin Wolf > Reviewed-by: Dr. David Alan Gilbert > --- > monitor/monitor_int.h | 148

[Qemu-devel] [QEMU] [PATCH 0/8] Add Qemu to SeaBIOS LCHS interface

2019-06-12 Thread Sam Eiderman
Non-standard logical geometries break under QEMU. A virtual disk which contains an operating system which depends on logical geometries (consistent values being reported from BIOS INT13 AH=08) will most likely break under QEMU/SeaBIOS if it has non-standard logical geometries - for example 56 SPT

Re: [Qemu-devel] [PATCH v2 04/11] monitor: Create MonitorHMP with readline state

2019-06-12 Thread Peter Xu
On Wed, Jun 12, 2019 at 11:07:01AM +0200, Markus Armbruster wrote: [...] > > +struct MonitorHMP { > > +Monitor common; > > +/* > > + * State used only in the thread "owning" the monitor. > > + * If @use_io_thread, this is @mon_iothread. > > + * Else, it's the main thread. > >

Re: [Qemu-devel] [PATCH 1/2] cutils: remove one unnecessary pointer operation

2019-06-12 Thread Juan Quintela
Wei Yang wrote: > Since we will not operate on the next address pointed by out, it is not > necessary to do addition on it. > > After removing the operation, the function size reduced 16/18 bytes. > > Signed-off-by: Wei Yang Reviewed-by: Juan Quintela Included. I agree with David that the

Re: [Qemu-devel] [SeaBIOS] [QEMU] [PATCH 0/8] Add Qemu to SeaBIOS LCHS interface

2019-06-12 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190612094237.47462-1-shmuel.eider...@oracle.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN ===

Re: [Qemu-devel] [PULL v2 00/12] Miscellaneous patches for 2019-06-11

2019-06-12 Thread Peter Maydell
On Tue, 11 Jun 2019 at 19:31, Markus Armbruster wrote: > > The following changes since commit a578cdfbdd8f9beff5ced52b7826ddb1669abbbf: > > Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20190610' into > staging (2019-06-10 16:09:19 +0100) > > are available in the Git repository at: >

[Qemu-devel] [PATCH v4 0/6] Multifd compression support

2019-06-12 Thread Juan Quintela
v4: - improve the code left and right - use the MIGRATION_FLAG_SYNC - use qerrors properly - pass errors everywhere (no more printfs) - create cleanup/save operations - merged zlib patches into one - general patches alreody on the migration pull request. - commented all the methods. ToDo: Didn't

[Qemu-devel] [PATCH v5] vfio/common: Introduce vfio_set_irq_signaling helper

2019-06-12 Thread Eric Auger
The code used to assign an interrupt index/subindex to an eventfd is duplicated many times. Let's introduce an helper that allows to set/unset the signaling for an ACTION_TRIGGER, ACTION_MASK or ACTION_UNMASK action. In the error message, we now use errno in case of any VFIO_DEVICE_SET_IRQS ioctl

Re: [Qemu-devel] [PATCH 0/2] ui/cocoa: Fix input device issues on Mojave

2019-06-12 Thread Chen Zhang via Qemu-devel
Thank you and best regards. > On Jun 12, 2019, at 6:39 PM, Peter Maydell wrote: > > On Tue, 4 Jun 2019 at 10:34, Chen Zhang wrote: >> >> The following patches fixed issues of absolute and relative input devices >> on macOS Mojave. >> >> Chen Zhang (2): >> ui/cocoa: Fix absolute input device

[Qemu-devel] [PULL 5/8] migration/xbzrle: update cache and current_data in one place

2019-06-12 Thread Juan Quintela
From: Wei Yang When we are not in the last_stage, we need to update the cache if page is not the same. Currently this procedure is scattered in two places and mixed with encoding status check. This patch extract this general step out to make the code a little bit easy to read. Signed-off-by:

[Qemu-devel] [PULL 4/8] migration/multifd: call multifd_send_sync_main when sending RAM_SAVE_FLAG_EOS

2019-06-12 Thread Juan Quintela
From: Wei Yang On receiving RAM_SAVE_FLAG_EOS, multifd_recv_sync_main() is called to synchronize receive threads. Current synchronization mechanism is to wait for each channel's sem_sync semaphore. This semaphore is triggered by a packet with MULTIFD_FLAG_SYNC flag. While in current

[Qemu-devel] [PULL 0/8] Migration patches

2019-06-12 Thread Juan Quintela
The following changes since commit 219dca61ebf41625831d4f96a720852baf44b762: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' into staging (2019-06-11 16:02:07 +0100) are available in the Git repository at: https://github.com/juanquintela/qemu.git

[Qemu-devel] [PATCH v2] qapi: report the default CPU type for each machine

2019-06-12 Thread Daniel P . Berrangé
When user doesn't request any explicit CPU model with libvirt or QEMU, a machine type specific CPU model is picked. Currently there is no way to determine what this QEMU built-in default is, so libvirt cannot report this back to the user in the XML config. This extends the "query-machines" QMP

[Qemu-devel] [QEMU] [PATCH v2 3/8] bootdevice: Add interface to gather LCHS

2019-06-12 Thread Sam Eiderman
Add an interface to provide direct logical CHS values for boot devices. We will use this interface in the next commits. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- bootdevice.c| 55 +

Re: [Qemu-devel] [PATCH v5] vfio-ccw: support async command subregion

2019-06-12 Thread Cornelia Huck
On Tue, 11 Jun 2019 15:33:59 -0400 Farhan Ali wrote: > On 06/07/2019 10:53 AM, Cornelia Huck wrote: > > A vfio-ccw device may provide an async command subregion for > > issuing halt/clear subchannel requests. If it is present, use > > it for sending halt/clear request to the device; if not, fall

[Qemu-devel] [QEMU] [PATCH 1/8] block: Refactor macros - fix tabbing

2019-06-12 Thread Sam Eiderman
Fixing tabbing in block related macros. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- hw/ide/qdev.c| 2 +- include/hw/block/block.h | 16 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/ide/qdev.c

[Qemu-devel] [QEMU] [PATCH 2/8] block: Support providing LCHS from user

2019-06-12 Thread Sam Eiderman
Add logical geometry variables to BlockConf. A user can now supply "lcyls", "lheads" & "lsecs" for any HD device that supports CHS ("cyls", "heads", "secs"). These devices include: * ide-hd * scsi-hd * virtio-blk-pci In future commits we will use the provided LCHS and pass it to the

Re: [Qemu-devel] [PATCH v2 04/11] monitor: Create MonitorHMP with readline state

2019-06-12 Thread Kevin Wolf
Am 12.06.2019 um 11:07 hat Markus Armbruster geschrieben: > Cc: Peter for a monitor I/O thread question. > > Kevin Wolf writes: > > > The ReadLineState in Monitor is only used for HMP monitors. Create > > MonitorHMP and move it there. > > > > Signed-off-by: Kevin Wolf > > Reviewed-by: Dr.

Re: [Qemu-devel] [PATCH] migration/multifd: call multifd_send_sync_main when sending RAM_SAVE_FLAG_EOS

2019-06-12 Thread Juan Quintela
Wei Yang wrote: > On receiving RAM_SAVE_FLAG_EOS, multifd_recv_sync_main() is called to > synchronize receive threads. Current synchronization mechanism is to wait > for each channel's sem_sync semaphore. This semaphore is triggered by a > packet with MULTIFD_FLAG_SYNC flag. While in current

[Qemu-devel] [PULL 6/8] cutils: remove one unnecessary pointer operation

2019-06-12 Thread Juan Quintela
From: Wei Yang Since we will not operate on the next address pointed by out, it is not necessary to do addition on it. After removing the operation, the function size reduced 16/18 bytes. Signed-off-by: Wei Yang Reviewed-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Message-Id:

[Qemu-devel] [PATCH v4 4/6] migration: Add multifd-compress parameter

2019-06-12 Thread Juan Quintela
Signed-off-by: Juan Quintela --- Rename it to NONE Fix typos (dave) We don't need to chek values returned by visit_type_MultifdCompress (markus) Fix yet more typos (wei) --- hmp.c| 13 + hw/core/qdev-properties.c| 13 +

[Qemu-devel] [QEMU] [PATCH v2 8/8] hd-geo-test: Add tests for lchs override

2019-06-12 Thread Sam Eiderman
Add QTest tests to check the logical geometry override option. The tests in hd-geo-test are out of date - they only test IDE and do not test interesting MBRs. I added a few helper functions which will make adding more tests easier. QTest's fw_cfg helper functions support only legacy fw_cfg, so

[Qemu-devel] [QEMU] [PATCH v2 5/8] bootdevice: Gather LCHS from all relevant devices

2019-06-12 Thread Sam Eiderman
Relevant devices are: * ide-hd (and ide-cd, ide-drive) * scsi-hd (and scsi-cd, scsi-disk, scsi-block) * virtio-blk-pci We do not call del_boot_device_lchs() for ide-* since we don't need to - IDE block devices do not support unplugging. Reviewed-by: Karl Heubaum Reviewed-by: Arbel

[Qemu-devel] [QEMU] [PATCH v2 4/8] scsi: Propagate unrealize() callback to scsi-hd

2019-06-12 Thread Sam Eiderman
We will need to add LCHS removal logic to scsi-hd's unrealize() in the next commit. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- hw/scsi/scsi-bus.c | 15 +++ include/hw/scsi/scsi.h | 1 + 2 files changed, 16 insertions(+) diff --git

[Qemu-devel] [QEMU] [PATCH v2 0/8] Add Qemu to SeaBIOS LCHS interface

2019-06-12 Thread Sam Eiderman
v1: Non-standard logical geometries break under QEMU. A virtual disk which contains an operating system which depends on logical geometries (consistent values being reported from BIOS INT13 AH=08) will most likely break under QEMU/SeaBIOS if it has non-standard logical geometries - for example

[Qemu-devel] [QEMU] [PATCH v2 6/8] bootdevice: Refactor get_boot_devices_list

2019-06-12 Thread Sam Eiderman
Move device name construction to a separate function. We will reuse this function in the following commit to pass logical CHS parameters through fw_cfg much like we currently pass bootindex. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- bootdevice.c | 61

Re: [Qemu-devel] [PATCH 0/4] add failover feature for assigned network devices

2019-06-12 Thread Jens Freimann
On Wed, Jun 12, 2019 at 11:11:23AM +0200, Daniel P. Berrangé wrote: On Tue, Jun 11, 2019 at 11:42:54AM -0400, Laine Stump wrote: On 5/17/19 8:58 AM, Jens Freimann wrote: > > Command line example: > > qemu-system-x86_64 -enable-kvm -m 3072 -smp 3 \ > -machine q35,kernel-irqchip=split

[Qemu-devel] [QEMU] [PATCH 4/8] scsi: Propagate unrealize() callback to scsi-hd

2019-06-12 Thread Sam Eiderman
We will need to add LCHS removal logic to scsi-hd's unrealize() in the next commit. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- hw/scsi/scsi-bus.c | 15 +++ include/hw/scsi/scsi.h | 1 + 2 files changed, 16 insertions(+) diff --git

[Qemu-devel] [QEMU] [PATCH 5/8] bootdevice: Gather LCHS from all relevant devices

2019-06-12 Thread Sam Eiderman
Relevant devices are: * ide-hd (and ide-cd, ide-drive) * scsi-hd (and scsi-cd, scsi-disk, scsi-block) * virtio-blk-pci We do not call del_boot_device_lchs() for ide-* since we don't need to - IDE block devices do not support unplugging. Reviewed-by: Karl Heubaum Reviewed-by: Arbel

Re: [Qemu-devel] [PATCH 2/2] migration/xbzrle: make xbzrle_encode_buffer little easier to read

2019-06-12 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Wei Yang (richardw.y...@linux.intel.com) wrote: >> The encoding process could be described below: >> >> for [content] >> get length of a run >> encode this run >> >> By refactoring the code with this logic, it maybe a little easier to >>

[Qemu-devel] [PATCH v4 1/6] migration-test: introduce functions to handle string parameters

2019-06-12 Thread Juan Quintela
Signed-off-by: Juan Quintela --- tests/migration-test.c | 37 + 1 file changed, 37 insertions(+) diff --git a/tests/migration-test.c b/tests/migration-test.c index 36d4910192..c7c311e02c 100644 --- a/tests/migration-test.c +++ b/tests/migration-test.c @@

Re: [Qemu-devel] [PATCH v12 2/7] virtio-pmem: Add virtio pmem driver

2019-06-12 Thread Pankaj Gupta
> > Hi Pankaj, > > On Tue, 11 Jun 2019 23:34:50 -0400 (EDT) > Pankaj Gupta wrote: > > > Hi Cornelia, > > > > > On Tue, 11 Jun 2019 22:07:57 +0530 > > > Pankaj Gupta wrote: > > > > > > + err1 = virtqueue_kick(vpmem->req_vq); > > > > + spin_unlock_irqrestore(>pmem_lock, flags);

[Qemu-devel] [PATCH v4 6/6] migration: Add zlib compression multifd support

2019-06-12 Thread Juan Quintela
Signed-off-by: Juan Quintela --- hw/core/qdev-properties.c | 2 +- migration/ram.c | 262 ++ qapi/migration.json | 2 +- tests/migration-test.c| 6 + 4 files changed, 270 insertions(+), 2 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v2 05/11] monitor: Move cmd_table to MonitorHMP

2019-06-12 Thread Markus Armbruster
Kevin Wolf writes: > Monitor.cmd_table contains the handlers for HMP commands, so there is no > reason to keep it in the state shared with QMP. Move it to MonitorHMP. > > Signed-off-by: Kevin Wolf > Reviewed-by: Dr. David Alan Gilbert > --- > monitor.c | 23 +++ > 1 file

[Qemu-devel] [QEMU] [PATCH v2 1/8] block: Refactor macros - fix tabbing

2019-06-12 Thread Sam Eiderman
Fixing tabbing in block related macros. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- hw/ide/qdev.c| 2 +- include/hw/block/block.h | 16 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/ide/qdev.c

Re: [Qemu-devel] [PATCH] build: use $(DESTDIR)x instead of $(DESTDIR)/x

2019-06-12 Thread Stefan Hajnoczi
On Tue, May 21, 2019 at 03:53:18PM +0100, Stefan Hajnoczi wrote: > The GNU make manual[1] demonstrates $(DESTDIR)$(bindir)/foo and QEMU > mostly follows that. There are just a few instances of > $(DESTDIR)/$(bindir)/foo. Fix these inconsistencies. > > [1]

[Qemu-devel] [QEMU] [PATCH 8/8] hd-geo-test: Add tests for lchs override

2019-06-12 Thread Sam Eiderman
Add QTest tests to check the logical geometry override option. The tests in hd-geo-test are out of date - they only test IDE and do not test interesting MBRs. I added a few helper functions which will make adding more tests easier. QTest's fw_cfg helper functions support only legacy fw_cfg, so

[Qemu-devel] [QEMU] [PATCH 3/8] bootdevice: Add interface to gather LCHS

2019-06-12 Thread Sam Eiderman
Add an interface to provide direct logical CHS values for boot devices. We will use this interface in the next commits. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- bootdevice.c| 55 +

Re: [Qemu-devel] [SeaBIOS] [QEMU] [PATCH 0/8] Add Qemu to SeaBIOS LCHS interface

2019-06-12 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190612094237.47462-1-shmuel.eider...@oracle.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [SeaBIOS] [QEMU] [PATCH 0/8] Add Qemu to SeaBIOS LCHS interface Type: series Message-id:

Re: [Qemu-devel] [PATCH 0/2] ui/cocoa: Fix input device issues on Mojave

2019-06-12 Thread Peter Maydell
On Tue, 4 Jun 2019 at 10:34, Chen Zhang wrote: > > The following patches fixed issues of absolute and relative input devices > on macOS Mojave. > > Chen Zhang (2): > ui/cocoa: Fix absolute input device grabbing issue on Mojave > ui/cocoa: Fix mouse grabbing in fullscreen mode for relative

[Qemu-devel] [PATCH v4 2/6] migration: Make multifd_save_setup() get an Error parameter

2019-06-12 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/migration.c | 2 +- migration/ram.c | 2 +- migration/ram.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 2865ae3fa9..0ac504be3c 100644 --- a/migration/migration.c

[Qemu-devel] [PULL v2 00/52] testing, gdbstub and cputlb fixes

2019-06-12 Thread Alex Bennée
The following changes since commit 219dca61ebf41625831d4f96a720852baf44b762: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' into staging (2019-06-11 16:02:07 +0100) are available in the Git repository at: https://github.com/stsquad/qemu.git

[Qemu-devel] [QEMU] [PATCH v2 2/8] block: Support providing LCHS from user

2019-06-12 Thread Sam Eiderman
Add logical geometry variables to BlockConf. A user can now supply "lcyls", "lheads" & "lsecs" for any HD device that supports CHS ("cyls", "heads", "secs"). These devices include: * ide-hd * scsi-hd * virtio-blk-pci In future commits we will use the provided LCHS and pass it to the

Re: [Qemu-devel] [PATCH v2 06/11] Move monitor.c to monitor/misc.c

2019-06-12 Thread Markus Armbruster
Kevin Wolf writes: > Create a new monitor/ subdirectory and move monitor.c there. As the plan > is to move the monitor core into separate files, use the chance to > rename it to misc.c. I figure we'll want to move most of (all of?) monitor/misc.c out. Not a job this series must finish, of

Re: [Qemu-devel] [PATCH v3 6/8] migration: Make none operations into its own structure

2019-06-12 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> It will be used later. > > 'none' is confusing - I think this is no-compression specifically - > right? > I'd be happy with something abbreviated like 'nocomp' I don't care too much, I can change, but when you are

[Qemu-devel] [QEMU] [PATCH 7/8] bootdevice: FW_CFG interface for LCHS values

2019-06-12 Thread Sam Eiderman
Using fw_cfg, supply logical CHS values directly from QEMU to the BIOS. Non-standard logical geometries break under QEMU. A virtual disk which contains an operating system which depends on logical geometries (consistent values being reported from BIOS INT13 AH=08) will most likely break under

[Qemu-devel] [PULL 8/8] migratioin/ram.c: reset complete_round when we gets a queued page

2019-06-12 Thread Juan Quintela
From: Wei Yang In case we gets a queued page, the order of block is interrupted. We may not rely on the complete_round flag to say we have already searched the whole blocks on the list. Signed-off-by: Wei Yang Reviewed-by: Juan Quintela Message-Id:

[Qemu-devel] [PULL 1/8] migration: fix multifd_recv event typo

2019-06-12 Thread Juan Quintela
It uses num in multifd_send(). Make it coherent. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Wei Yang Signed-off-by: Juan Quintela --- migration/trace-events | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/trace-events

[Qemu-devel] [PATCH v4 3/6] migration: Make multifd_load_setup() get an Error parameter

2019-06-12 Thread Juan Quintela
We need to change the full chain to pass the Error parameter. Signed-off-by: Juan Quintela --- migration/migration.c | 10 +- migration/migration.h | 2 +- migration/ram.c | 2 +- migration/ram.h | 2 +- migration/rdma.c | 2 +- 5 files changed, 9 insertions(+), 9

  1   2   3   >