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

2018-09-12 Thread Richard Henderson
On 08/31/2018 06:39 AM, Aleksandar Markovic wrote: >> +gen_load_mxu_cr(t0); >> +tcg_gen_andi_tl(t0, t0, MXUEN); >> +tcg_gen_brcondi_tl(TCG_COND_NE, t0, MXUEN, l0); >> + >> +gen_load_gpr(t0, rb); >> +tcg_gen_addi_tl(t0, t0, (int8_t)s8); > > I am not sure if this works as

Re: [Qemu-devel] [PATCH] Fix breakpoints in nios2 user-mode emulation.

2018-09-12 Thread Sandra Loosemore
On 09/12/2018 12:39 PM, Alex Bennée wrote: Richard Henderson writes: On 09/11/2018 02:29 PM, Sandra Loosemore wrote: Without this patch, QEMU exits immediately when it execution stops at a breakpoint, instead of reporting it to GDB. Signed-off-by: Sandra Loosemore ---

Re: [Qemu-devel] [PATCH] Fix breakpoints in nios2 user-mode emulation.

2018-09-12 Thread Alex Bennée
Richard Henderson writes: > On 09/11/2018 02:29 PM, Sandra Loosemore wrote: >> Without this patch, QEMU exits immediately when it execution stops at >> a breakpoint, instead of reporting it to GDB. >> >> Signed-off-by: Sandra Loosemore >> --- >> linux-user/nios2/cpu_loop.c | 3 +++ >> 1 file

[Qemu-devel] [PATCH v8 1/6] linux-headers: linux header updates for AP support

2018-09-12 Thread Tony Krowiak
Updates the linux header files in preparation for introduction of the VFIO AP device: * Added a feature ID to indicate AP facilities are installed * Added device attributes to the KVM_S390_VM_CRYPTO group to indicate whether AP instructions are to be interpreted * Added VFIO device

[Qemu-devel] [PATCH v8 3/6] s390x/kvm: enable/disable AP instruction interpretation for guest

2018-09-12 Thread Tony Krowiak
From: Tony Krowiak Let's use the KVM_SET_DEVICE_ATTR ioctl to enable or disable hardware interpretation of AP instructions executed on the guest. If the S390_FEAT_AP feature is installed, AP instructions will be interpreted by default; otherwise, they will be intercepted. This attribute setting

Re: [Qemu-devel] Debugging PCI Enhanced Allocation - IOMMU of a bridge?

2018-09-12 Thread Alex Williamson
On Wed, 12 Sep 2018 13:38:59 -0400 "Michael S. Tsirkin" wrote: > On Wed, Sep 12, 2018 at 05:30:29PM +, Alexander von Gluck IV wrote: > > Good morning! > > > > I'm working through adding support (or at least ignoring) PCI Enhance > > Allocation devices under Haiku. > > We run into one of

Re: [Qemu-devel] [PATCH 2/6] x86_iommu/amd: Prepare for interrupt remap support

2018-09-12 Thread Brijesh Singh
On 09/11/2018 10:52 PM, Peter Xu wrote: On Tue, Sep 11, 2018 at 11:49:45AM -0500, Brijesh Singh wrote: static AddressSpace *amdvi_host_dma_iommu(PCIBus *bus, void *opaque, int devfn) { AMDVIState *s = opaque; @@ -1055,6 +1151,12 @@ static AddressSpace *amdvi_host_dma_iommu(PCIBus

Re: [Qemu-devel] [PATCH 4/6] i386: acpi: add IVHD device entry for IOAPIC

2018-09-12 Thread Brijesh Singh
On 09/12/2018 11:35 AM, Igor Mammedov wrote: ... +/* + * When interrupt remapping is enabled, Linux IOMMU driver also checks + * for special IVHD device (type IO-APIC), which is typically presented + * as PCI device 14:00.0. Probably it shouldn't be a 'typically' device

Re: [Qemu-devel] [PATCH 7/8] hw: sun4c: add read memory region callback

2018-09-12 Thread Artyom Tarasenko
Please correct the typo in the subject. I was scared that someone dug out the sun4c zombie emulation. In the particular case of sun4u, I think the proper way is not to have the read callback, but throw an 'Unassigned memory access' exception Regards, Artyom On Wed, Sep 12, 2018 at 6:09 PM Li

Re: [Qemu-devel] [PATCH v3 0/2] 40p: fix PCI interrupt routing

2018-09-12 Thread Hervé Poussineau
Le 10/09/2018 à 22:46, Mark Cave-Ayland a écrit : According to the PReP specification section 6.1.6 "System Interrupt Assignments", all PCI interrupts are routed via IRQ 15. In the case of the 40p machine this isn't quite true in that it has a routing quirk: the LSI SCSI device is always routed

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

2018-09-12 Thread Gersner
Hi Daniel, Sorry for the long round-trips, we had a busy month. We have implemented all the changes. Waiting for a final clarification. Should the new patches be posted on this thread or a new one? Thanks for you time. Gersner. On Thu, Aug 30, 2018 at 6:45 PM Daniel Verkamp wrote: > Hi

Re: [Qemu-devel] [PATCH 3/6] x86_iommu/amd: Add interrupt remap support when VAPIC is not enabled

2018-09-12 Thread Brijesh Singh
Thanks for the quick review feedback. On 09/11/2018 10:37 PM, Peter Xu wrote: On Tue, Sep 11, 2018 at 11:49:46AM -0500, Brijesh Singh wrote: Emulate the interrupt remapping support when guest virtual APIC is not enabled. See IOMMU spec: https://support.amd.com/TechDocs/48882_IOMMU.pdf

[Qemu-devel] [PATCH v8 0/6] s390x: vfio-ap: guest dedicated crypto adapters

2018-09-12 Thread Tony Krowiak
From: Tony Krowiak This patch series is the QEMU counterpart to the KVM/kernel support for guest dedicated crypto adapters. The KVM/kernel model is built on the VFIO mediated device framework and provides the infrastructure for granting exclusive guest access to crypto devices installed on

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

2018-09-12 Thread Richard Henderson
On 08/30/2018 12:30 PM, Craig Janeczek via Qemu-devel wrote: > +/* S32I2M XRa, rb - Register move from GRF to XRF */ > +static void gen_mxu_s32i2m(DisasContext *ctx, uint32_t opc) > +{ > +TCGv t0; > +uint32_t xra, rb; > + > +t0 = tcg_temp_new(); > + > +xra = extract32(ctx->opcode,

[Qemu-devel] [PATCH v8 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-09-12 Thread Tony Krowiak
From: Tony Krowiak Introduces the base object model for virtualizing AP devices. Signed-off-by: Tony Krowiak --- MAINTAINERS | 12 +++ hw/s390x/Makefile.objs |2 + hw/s390x/ap-bridge.c | 76 ++

[Qemu-devel] [PATCH v8 2/6] s390x/cpumodel: Set up CPU model for AP device support

2018-09-12 Thread Tony Krowiak
A new CPU model feature and two new CPU model facilities are introduced to support AP devices for a KVM guest. CPU model features: 1. The KVM_S390_VM_CPU_FEAT_AP CPU model feature indicates that AP facilities are installed. This feature will be enabled by the kernel only if the AP

Re: [Qemu-devel] [PATCH] memory region: check the old.mmio.read status

2018-09-12 Thread Li Qiang
Peter Maydell 于2018年9月13日周四 上午8:31写道: > On 12 September 2018 at 18:43, Laszlo Ersek wrote: > > On 09/12/18 14:54, Peter Maydell wrote: > >> There's patches on-list which drop the old_mmio field from the > MemoryRegion > >> struct entirely, so I think this patch as it stands is obsolete. > >> >

Re: [Qemu-devel] [PATCH] memory region: check the old.mmio.read status

2018-09-12 Thread Peter Maydell
On 12 September 2018 at 18:43, Laszlo Ersek wrote: > On 09/12/18 14:54, Peter Maydell wrote: >> There's patches on-list which drop the old_mmio field from the MemoryRegion >> struct entirely, so I think this patch as it stands is obsolete. >> >> Currently our semantics are "you must provide both

Re: [Qemu-devel] What kind of situation to use internal or external snapshot?

2018-09-12 Thread lampahome
> > In general, we've spent more resources developing external snapshots. So > if you want the most support and the fastest response on resolving any > issues that you may encounter, external snapshots are the way to go. > > So internal snapshot is hard to use than external snapshot? Is that

Re: [Qemu-devel] [PATCH 0/8] Add missed read callback for some memory region

2018-09-12 Thread Li Qiang
Philippe Mathieu-Daudé 于2018年9月13日周四 上午1:12写道: > Hi Li, > > On 9/12/18 6:01 PM, Li Qiang wrote: > > From: Li Qiang > > > > This patch set try to add the missed read callback for memory region. > > Without this patchset, when the guest reads the IO port/memory, it will > > cause an

Re: [Qemu-devel] [PATCH 6/6] x86_iommu/amd: Enable Guest virtual APIC support

2018-09-12 Thread Brijesh Singh
On 09/11/2018 11:52 PM, Peter Xu wrote: ... diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 5c2c638..1cbc8ba 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -2565,7 +2565,8 @@ build_amd_iommu(GArray *table_data, BIOSLinker *linker)

Re: [Qemu-devel] [PATCH v3 2/2] 40p: add fixed IRQ routing for LSI SCSI device

2018-09-12 Thread David Gibson
On Mon, Sep 10, 2018 at 09:46:31PM +0100, Mark Cave-Ayland wrote: > Whilst the PReP specification describes how all PCI IRQs are routed via IRQ > 15 on the interrupt controller, the real 40p machine has a routing quirk in > that the LSI SCSI device is routed directly to IRQ 13. > > Enable the

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

2018-09-12 Thread Eric Blake
On 9/12/18 2:53 PM, Gersner wrote: Hi Daniel, Sorry for the long round-trips, we had a busy month. We have implemented all the changes. Waiting for a final clarification. Should the new patches be posted on this thread or a new one? Best to post a v2 as a new top-level thread (our CI tools

Re: [Qemu-devel] [PATCH] vmdk: align end of file to a sector boundary

2018-09-12 Thread yuchenlin via Qemu-devel
On 2018-09-12 19:54, Fam Zheng wrote: On Tue, 08/28 11:17, yuchen...@synology.com wrote: From: yuchenlin There is a rare case which the size of last compressed cluster is larger than the cluster size, which will cause the file is not aligned at the sector boundary. Signed-off-by: yuchenlin

Re: [Qemu-devel] [PATCH v3 2/2] 40p: add fixed IRQ routing for LSI SCSI device

2018-09-12 Thread Mark Cave-Ayland
On 13/09/18 01:24, David Gibson wrote: > On Mon, Sep 10, 2018 at 09:46:31PM +0100, Mark Cave-Ayland wrote: >> Whilst the PReP specification describes how all PCI IRQs are routed via IRQ >> 15 on the interrupt controller, the real 40p machine has a routing quirk in >> that the LSI SCSI device is

Re: [Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-09-12 Thread Tian, Kevin
> From: Alex Williamson > Sent: Thursday, September 13, 2018 2:10 AM > > On Wed, 12 Sep 2018 13:29:33 -0400 > "Michael S. Tsirkin" wrote: > > > On Wed, Sep 12, 2018 at 11:15:32AM -0600, Alex Williamson wrote: > > > On Wed, 12 Sep 2018 12:44:15 -0400 > > > "Michael S. Tsirkin" wrote: > > > > >

[Qemu-devel] [PATCH] spapr_pci: add an extra 'nr_msis' argument to spapr_populate_pci_dt

2018-09-12 Thread Cédric Le Goater
So that we don't have to call qdev_get_machine() to get the machine class and the sPAPRIrq backend holding the number of MSIs. Signed-off-by: Cédric Le Goater --- include/hw/pci-host/spapr.h | 5 ++--- hw/ppc/spapr.c | 2 +- hw/ppc/spapr_pci.c | 9 +++-- 3 files

Re: [Qemu-devel] [qemu-s390x] [PATCH v8 3/6] s390x/kvm: enable/disable AP instruction interpretation for guest

2018-09-12 Thread Thomas Huth
On 2018-09-12 22:08, Tony Krowiak wrote: > From: Tony Krowiak > > Let's use the KVM_SET_DEVICE_ATTR ioctl to enable or disable > hardware interpretation of AP instructions executed on the guest. > If the S390_FEAT_AP feature is installed, AP instructions will > be interpreted by default;

Re: [Qemu-devel] [PATCH v2] vmdk: align end of file to a sector boundary

2018-09-12 Thread Fam Zheng
On Thu, 09/13 10:31, yuchen...@synology.com wrote: > From: yuchenlin > > There is a rare case which the size of last compressed cluster > is larger than the cluster size, which will cause the file is > not aligned at the sector boundary. The code looks good to me. Can you also explain why it is

Re: [Qemu-devel] [PATCH 2/6] x86_iommu/amd: Prepare for interrupt remap support

2018-09-12 Thread Peter Xu
On Wed, Sep 12, 2018 at 01:59:06PM -0500, Brijesh Singh wrote: [...] > > > } > > > return _as[devfn]->as; > > > } > > > @@ -1172,6 +1274,10 @@ static void amdvi_realize(DeviceState *dev, Error > > > **err) > > > return; > > > } > > > +/* Pseudo address space

[Qemu-devel] Can I only commit from active image to corresponding range of its backing file by qemu cmd?

2018-09-12 Thread lampahome
I split data to 3 chunks and save it in 3 independent backing files like below: img.000 <-- img.001 <-- img.002 img.000 is the backing file of img.001 and 001 is the backing file of 002. img.000 saves the 1st chunk of data and img.001 saves the 2nd chunk of data, and img.002 saves the 3rd chunk of

Re: [Qemu-devel] [PATCH] memory region: check the old.mmio.read status

2018-09-12 Thread Mark Cave-Ayland
On 13/09/18 01:31, Peter Maydell wrote: > On 12 September 2018 at 18:43, Laszlo Ersek wrote: >> On 09/12/18 14:54, Peter Maydell wrote: >>> There's patches on-list which drop the old_mmio field from the MemoryRegion >>> struct entirely, so I think this patch as it stands is obsolete. >>> >>>

[Qemu-devel] [PATCH V12-fix 01/19] filter-rewriter: Add TCP state machine and fix memory leak in connection_track_table

2018-09-12 Thread Zhang Chen
We add almost full TCP state machine in filter-rewriter, except TCPS_LISTEN and some simplify in VM active close FIN states. The reason for this simplify job is because guest kernel will track the TCP status and wait 2MSL time too, if client resend the FIN packet, guest will resend the last ACK,

Re: [Qemu-devel] [qemu-s390x] [RFC 08/15] s390-bios: Map low core memory

2018-09-12 Thread Thomas Huth
On 2018-09-10 16:17, Jason J. Herne wrote: > On 07/17/2018 02:10 PM, Thomas Huth wrote: >> On 05.07.2018 19:25, Jason J. Herne wrote: >>> From: "Jason J. Herne" >>> >>> Create a new header for basic architecture specific definitions and >>> add a >>> mapping of low core memory. This mapping will

[Qemu-devel] [PATCH v2] vmdk: align end of file to a sector boundary

2018-09-12 Thread yuchenlin--- via Qemu-devel
From: yuchenlin There is a rare case which the size of last compressed cluster is larger than the cluster size, which will cause the file is not aligned at the sector boundary. Signed-off-by: yuchenlin --- v1 -> v2: * Add more detail comment. * Add QEMU_ALIGN_UP to show the intention more

Re: [Qemu-devel] [PATCH V12 00/19] COLO: integrate colo frame with block replication and COLO proxy

2018-09-12 Thread Zhang Chen
On Wed, Sep 12, 2018 at 3:50 PM Jason Wang wrote: > > > On 2018年09月10日 16:16, Zhang Chen wrote: > > Hi All. > > Have any comments? > > Ping... > > > > Thanks > > Zhang Chen > > I've queued them with some tweaks on the commit log. > > Please refer the comment of patch 1 and send me a patch on top

Re: [Qemu-devel] [PATCH V12 01/19] filter-rewriter: Add TCP state machine and fix memory leak in connection_track_table

2018-09-12 Thread Zhang Chen
On Wed, Sep 12, 2018 at 3:36 PM Jason Wang wrote: > > > On 2018年09月03日 12:38, Zhang Chen wrote: > > We add almost full TCP state machine in filter-rewriter, except > > TCPS_LISTEN and some simplify in VM active close FIN states. > > Need to explain why it can be simplified. > OK, I will note

Re: [Qemu-devel] [PATCH 3/6] x86_iommu/amd: Add interrupt remap support when VAPIC is not enabled

2018-09-12 Thread Peter Xu
On Wed, Sep 12, 2018 at 01:50:34PM -0500, Brijesh Singh wrote: [...] > > > + */ > > > +if (sid == X86_IOMMU_SID_INVALID) { > > > +sid = AMDVI_SB_IOAPIC_ID; > > > +} > > > + > > > +amdvi_get_dte(iommu, sid, dte); > > > > Mind to check the return value? > > > > After all

Re: [Qemu-devel] [PATCH v2 1/2] spapr: introduce a spapr_irq class 'nr_msis' attribute

2018-09-12 Thread David Gibson
On Tue, Sep 11, 2018 at 09:56:06AM +0200, Cédric Le Goater wrote: > On 09/11/2018 09:34 AM, Greg Kurz wrote: > > On Tue, 11 Sep 2018 07:55:02 +0200 > > Cédric Le Goater wrote: > > > >> The number of MSI interrupts a sPAPR machine can allocate is in direct > >> relation with the number of

Re: [Qemu-devel] [PATCH v2 1/2] spapr: introduce a spapr_irq class 'nr_msis' attribute

2018-09-12 Thread David Gibson
On Tue, Sep 11, 2018 at 07:55:02AM +0200, Cédric Le Goater wrote: > The number of MSI interrupts a sPAPR machine can allocate is in direct > relation with the number of interrupts of the sPAPRIrq backend. Define > statically this value at the sPAPRIrq class level and use it for the >

Re: [Qemu-devel] [PATCH v3 0/1] ppc/pnv: Add model for Power8 PHB3 PCIe Host bridge

2018-09-12 Thread David Gibson
On Wed, Sep 12, 2018 at 10:04:05AM +0200, Cédric Le Goater wrote: > On 07/30/2018 07:17 PM, Cédric Le Goater wrote: > > This is a model of the PCIe Host Bridge (PHB3) controller found on a > > Power8 processor. The Power8 processor comes in different flavors: > > Venice, Murano, Naple, each having

Re: [Qemu-devel] [PATCH] memory region: check the old.mmio.read status

2018-09-12 Thread Peter Maydell
On 13 September 2018 at 05:31, Mark Cave-Ayland wrote: > This sounds familiar to me. I remember whilst working on the Mac > uninorth patches I couldn't quite figure out why a simple change to the > PCI bridge IO address space started to cause some accesses to fail: it > was because the guest was

Re: [Qemu-devel] [PATCH 4/6] i386: acpi: add IVHD device entry for IOAPIC

2018-09-12 Thread Peter Xu
On Wed, Sep 12, 2018 at 02:11:10PM -0500, Brijesh Singh wrote: > > > On 09/11/2018 11:35 PM, Peter Xu wrote: > > On Tue, Sep 11, 2018 at 11:49:47AM -0500, Brijesh Singh wrote: > > > When interrupt remapping is enabled, add a special IVHD device > > > (type IOAPIC) -- which is typically PCI

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

2018-09-12 Thread David Gibson
On Tue, Sep 11, 2018 at 01:34:51PM +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 v2 2/2] spapr: increase the size of the IRQ number space

2018-09-12 Thread David Gibson
On Tue, Sep 11, 2018 at 07:55:03AM +0200, Cédric Le Goater wrote: > The new layout using static IRQ number does not leave much space to > the dynamic MSI range, only 0x100 IRQ numbers. Increase the total > number of IRQS for newer machines and introduce a legacy XICS backend > for pre-3.1 machines

Re: [Qemu-devel] [qemu-s390x] [PATCH v8 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-09-12 Thread Thomas Huth
On 2018-09-12 22:08, Tony Krowiak wrote: > From: Tony Krowiak > > Introduces the base object model for virtualizing AP devices. > > Signed-off-by: Tony Krowiak > --- [...] > diff --git a/hw/s390x/ap-bridge.c b/hw/s390x/ap-bridge.c > new file mode 100644 > index 000..4f10425 > --- /dev/null

[Qemu-devel] Can I convert backing file to internal snapshot?

2018-09-12 Thread lampahome
I have two qcow2 A & B, and A is backing file of B. Can I convert both A to one image and containing data of both? ex: one new image will contain data of A and B. When I check it by qemu-img info, I can see one snapshot in the new image. thanks

Re: [Qemu-devel] [PATCH] util/async: use qemu_aio_coroutine_enter in co_schedule_bh_cb

2018-09-12 Thread Fam Zheng
On Wed, 09/05 11:33, Sergio Lopez wrote: > AIO Coroutines shouldn't by managed by an AioContext different than the > one assigned when they are created. aio_co_enter avoids entering a > coroutine from a different AioContext, calling aio_co_schedule instead. > > Scheduled coroutines are then

Re: [Qemu-devel] virtio-net sporadic error with QNX 7.0 guest: virtio-net ctrl missing headers

2018-09-12 Thread Jason Wang
On 2018年09月12日 16:01, Claudio wrote: Hello Michael, Jason and all, I am currently using latest mainline QEMU on x86_64 to run a QNX 7 guest. QNX 7 is not free software anymore unfortunately, with the the last open source versions in the 6.x range. I am using the official virtio-net guest

Re: [Qemu-devel] [PATCH] vmdk: align end of file to a sector boundary

2018-09-12 Thread Fam Zheng
On Tue, 08/28 11:17, yuchen...@synology.com wrote: > From: yuchenlin > > There is a rare case which the size of last compressed cluster > is larger than the cluster size, which will cause the file is > not aligned at the sector boundary. > > Signed-off-by: yuchenlin > --- > block/vmdk.c | 18

Re: [Qemu-devel] [PATCH] vmdk: align end of file to a sector boundary

2018-09-12 Thread Fam Zheng
On Wed, 09/12 17:52, yuchenlin wrote: > > Fam Zheng 於 2018-09-12 17:34 寫道: > > On Tue, 08/28 11:17, yuchen...@synology.com wrote: > From: yuchenlin > > > > There is a rare case which the size of last > > compressed cluster > is larger than the cluster size, which will cause the > > file is >

Re: [Qemu-devel] [PATCH v0 2/2] block: postpone the coroutine executing if the BDS's is drained

2018-09-12 Thread Denis Plotnikov
On 10.09.2018 15:41, Kevin Wolf wrote: Am 29.06.2018 um 14:40 hat Denis Plotnikov geschrieben: Fixes the problem of ide request appearing when the BDS is in the "drained section". Without the patch the request can come and be processed by the main event loop, as the ide requests are

Re: [Qemu-devel] [PATCH 2/2] virtio-scsi/virtio-blk: Disable poll handlers when stopping vq handler

2018-09-12 Thread Paolo Bonzini
On 12/09/2018 03:31, Fam Zheng wrote: >>> >>> ctx is qemu_aio_context here, so there's no interaction with IOThread. >> In this case, it should be okay to have the reentrancy, what is the bug >> that this patch is fixing? > The same symptom as in the previous patch: virtio_scsi_handle_cmd_vq

[Qemu-devel] [PATCH] sdl2: show console #0 unconditionally

2018-09-12 Thread Gerd Hoffmann
Otherwise sdl2 will show no window in case no graphical display device is present. Reproducer: qemu -nodefaults -display sdl -serial vc Signed-off-by: Gerd Hoffmann --- ui/sdl2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index

Re: [Qemu-devel] [PATCH 2/2] virtio-scsi/virtio-blk: Disable poll handlers when stopping vq handler

2018-09-12 Thread Fam Zheng
On Wed, 09/12 13:11, Paolo Bonzini wrote: > On 12/09/2018 03:31, Fam Zheng wrote: > >>> > >>> ctx is qemu_aio_context here, so there's no interaction with IOThread. > >> In this case, it should be okay to have the reentrancy, what is the bug > >> that this patch is fixing? > > The same symptom as

[Qemu-devel] [PATCH] usb-hub: clear suspend on detach

2018-09-12 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/usb/dev-hub.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c index 5d9743ef93..dc368179d1 100644 --- a/hw/usb/dev-hub.c +++ b/hw/usb/dev-hub.c @@ -191,6 +191,10 @@ static void usb_hub_detach(USBPort *port1)

[Qemu-devel] [PATCH] serial: fix DLL writes

2018-09-12 Thread Paolo Bonzini
Commit 0147883450fe84bb8de2d4a58381881f4262ce9b tries to handle word-sized writes to DLL/DLH, but due to a typo, this patch is causing tracebacks in all Linux kernels running the PXA serial driver, due to an unexpected DLL register value. Here is the surrounding code from drivers/tty/serial/pxa.c:

Re: [Qemu-devel] [PATCH] change get_image_size return type to int64_t

2018-09-12 Thread Richard Henderson
On 09/12/2018 02:14 AM, Li Zhijian wrote: > @@ -838,7 +838,8 @@ static void load_linux(PCMachineState *pcms, > FWCfgState *fw_cfg) > { > uint16_t protocol; > -int setup_size, kernel_size, initrd_size = 0, cmdline_size; > +int setup_size, kernel_size,

Re: [Qemu-devel] [PATCH] memory region: check the old.mmio.read status

2018-09-12 Thread Li Qiang
Peter Maydell 于2018年9月12日周三 下午8:55写道: > On 12 September 2018 at 13:32, Li Qiang wrote: > > To avoid NULL-deref for the devices without read callbacks > > > > Signed-off-by: Li Qiang > > --- > > memory.c | 4 > > 1 file changed, 4 insertions(+) > > > > diff --git a/memory.c b/memory.c > >

Re: [Qemu-devel] [PATCH V1 RESEND 1/6] hmat acpi: Build Memory Subsystem Address Range Structure(s) in ACPI HMAT

2018-09-12 Thread Eric Blake
On 7/16/18 6:54 AM, Igor Mammedov wrote: + +#include "unistd.h" +#include "fcntl.h" +#include "qemu/osdep.h" +#include "sysemu/numa.h" +#include "hw/i386/pc.h" +#include "hw/i386/acpi-build.h" +#include "hw/acpi/acpi.h" +#include "hw/acpi/hmat.h" +#include "hw/acpi/aml-build.h" +#include

Re: [Qemu-devel] What kind of situation to use internal or external snapshot?

2018-09-12 Thread Eric Blake
On 9/11/18 8:32 PM, lampahome wrote: as title, I know there're two snapshots in qemu, but I don't know when to use them well. What I know is internal snapshot will save the info of L1 and L2 table in the end of image but external snapshot won't because external snapshot create new file to save

[Qemu-devel] [PATCH] memory region: check the old.mmio.read status

2018-09-12 Thread Li Qiang
To avoid NULL-deref for the devices without read callbacks Signed-off-by: Li Qiang --- memory.c | 4 1 file changed, 4 insertions(+) diff --git a/memory.c b/memory.c index 9b73892768..48d025426b 100644 --- a/memory.c +++ b/memory.c @@ -406,6 +406,10 @@ static MemTxResult

[Qemu-devel] [PATCH 2/3] display/edid: add region helper.

2018-09-12 Thread Gerd Hoffmann
Create a io region for an EDID data block. Signed-off-by: Gerd Hoffmann --- include/hw/display/edid.h | 4 hw/display/edid-region.c | 33 + hw/display/Makefile.objs | 1 + 3 files changed, 38 insertions(+) create mode 100644 hw/display/edid-region.c

Re: [Qemu-devel] virtio-net sporadic error with QNX 7.0 guest: virtio-net ctrl missing headers

2018-09-12 Thread Michael S. Tsirkin
On Wed, Sep 12, 2018 at 10:01:34AM +0200, Claudio wrote: > Hello Michael, Jason and all, > > I am currently using latest mainline QEMU on x86_64 to run a QNX 7 guest. > > QNX 7 is not free software anymore unfortunately, with the > the last open source versions in the 6.x range. > > I am using

Re: [Qemu-devel] [PATCH v3 00/13] i386 + x86_64 mttcg

2018-09-12 Thread Paolo Bonzini
On 11/09/2018 22:28, Emilio G. Cota wrote: > v2: https://lists.gnu.org/archive/html/qemu-devel/2018-09/msg01122.html > > Changes since v2: > > - Add rth's R-b tag to the last patch > - Drop v2's first 10 patches, since Paolo already picked those up > - Move TCG temps + x86_64_hregs to

Re: [Qemu-devel] [PATCH 2/2] block/rbd: Attempt to parse legacy filenames

2018-09-12 Thread Jeff Cody
On Wed, Sep 12, 2018 at 08:42:15AM -0400, Jeff Cody wrote: > On Wed, Sep 12, 2018 at 12:38:56PM +0200, Kevin Wolf wrote: > > Am 11.09.2018 um 20:37 hat Jeff Cody geschrieben: > > > On Tue, Sep 11, 2018 at 02:22:31PM -0400, John Snow wrote: > > > > Once we load the image, will the header get

Re: [Qemu-devel] [PATCH v4 0/4] block/rbd: enable filename parsing on open

2018-09-12 Thread Jeff Cody
On Tue, Sep 11, 2018 at 06:32:29PM -0400, Jeff Cody wrote: > Changes from v3: > > > Patch 4: Typo fixed [Eric] > Added examples [Eric] > > Changes from v2: > = > > Patch 4: New, document deprecation. [Eric] > Patch 3,2: Add r-b's > > > Changes from

[Qemu-devel] [PATCH 3/9] qdev: move qdev_prop_register_global_list() to tests

2018-09-12 Thread Marc-André Lureau
The function is only used by a test, move it there. Signed-off-by: Marc-André Lureau --- include/hw/qdev-properties.h | 1 - hw/core/qdev-properties.c | 9 - tests/test-qdev-global-props.c | 18 ++ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git

[Qemu-devel] [PATCH 9/9] hostmem-ram: use whole path for memory region name with >= 3.1

2018-09-12 Thread Marc-André Lureau
hostmem-file and hostmem-memfd use the whole object path for the memory region name, but hostname-ram uses only the path component (the basename): qemu -m 1024 -object memory-backend-ram,id=mem,size=1G -numa node,memdev=mem -monitor stdio (qemu) info ramblock Block NamePSize

[Qemu-devel] [PATCH 5/9] qom/globals: generalize object_property_set_globals()

2018-09-12 Thread Marc-André Lureau
Handle calls of object_property_set_globals() with any object type, but only apply globals to TYPE_DEVICE & TYPE_USER_CREATABLE. Signed-off-by: Marc-André Lureau --- qom/globals.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/qom/globals.c

[Qemu-devel] [PULL 0/4] Block patches

2018-09-12 Thread Jeff Cody
The following changes since commit 19b599f7664b2ebfd0f405fb79c14dd241557452: Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2018-08-27-v2' into staging (2018-08-27 16:44:20 +0100) are available in the Git repository at: git://github.com/codyprime/qemu-kvm-jtc.git

[Qemu-devel] [PULL 4/4] block/rbd: add deprecation documentation for filename keyvalue pairs

2018-09-12 Thread Jeff Cody
Signed-off-by: Jeff Cody Message-id: 647f5b5ab7efd8bf567a504c832b1d2d6f719b23.1536704901.git.jc...@redhat.com Signed-off-by: Jeff Cody --- qemu-deprecated.texi | 15 +++ 1 file changed, 15 insertions(+) diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index

[Qemu-devel] [PULL 2/4] block/rbd: Attempt to parse legacy filenames

2018-09-12 Thread Jeff Cody
When we converted rbd to get rid of the older key/value-centric encoding format, we broke compatibility with image files with backing file strings encoded in the old format. This leaves a bit of an ugly conundrum, and a hacky solution. If the initial attempt to parse the "proper" options fails,

[Qemu-devel] [PULL 1/4] block/rbd: pull out qemu_rbd_convert_options

2018-09-12 Thread Jeff Cody
Code movement to pull the conversion from Qdict to BlockdevOptionsRbd into a helper function. Reviewed-by: Eric Blake Reviewed-by: John Snow Signed-off-by: Jeff Cody Message-id: 5b49a980f2cde6610ab1df41bb0277d00b5db893.1536704901.git.jc...@redhat.com Signed-off-by: Jeff Cody --- block/rbd.c

Re: [Qemu-devel] [PATCH 2/2] block/rbd: Attempt to parse legacy filenames

2018-09-12 Thread Jeff Cody
On Wed, Sep 12, 2018 at 12:38:56PM +0200, Kevin Wolf wrote: > Am 11.09.2018 um 20:37 hat Jeff Cody geschrieben: > > On Tue, Sep 11, 2018 at 02:22:31PM -0400, John Snow wrote: > > > Once we load the image, will the header get rewritten into a compliant > > > format? > > > > Hmm - I think in some

[Qemu-devel] virtio-net sporadic error with QNX 7.0 guest: virtio-net ctrl missing headers

2018-09-12 Thread Claudio
Hello Michael, Jason and all, I am currently using latest mainline QEMU on x86_64 to run a QNX 7 guest. QNX 7 is not free software anymore unfortunately, with the the last open source versions in the 6.x range. I am using the official virtio-net guest driver from QNX 7. During initialization I

[Qemu-devel] [PATCH] qom/object: add some interface asserts

2018-09-12 Thread Marc-André Lureau
An interface can't have any instance size or callback, or itself implement other interfaces (this is unsupported). Signed-off-by: Marc-André Lureau --- qom/object.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/qom/object.c b/qom/object.c index

[Qemu-devel] [PATCH 2/9] accel: register global_props like machine globals

2018-09-12 Thread Marc-André Lureau
global_props is only used for Xen xen_compat_props. It's a static array of GlobalProperty, like machine globals in SET_MACHINE_COMPAT(). Let's register the globals the same way, without extra copy allocation. Signed-off-by: Marc-André Lureau --- include/hw/qdev-properties.h | 29

[Qemu-devel] [PATCH 7/9] tests: add user-creatable test to test-qdev-global-props

2018-09-12 Thread Marc-André Lureau
Add a TYPE_USER_CREATABLE object global property check. Rename the test, since it is no longer QDev-specific. Signed-off-by: Marc-André Lureau --- ...dev-global-props.c => test-global-props.c} | 128 -- tests/Makefile.include| 4 +- 2 files changed,

[Qemu-devel] [PATCH 8/9] hw/i386: add pc-i440fx-3.1 & pc-q35-3.1

2018-09-12 Thread Marc-André Lureau
The following patch is going to add compatiblity parameters. Signed-off-by: Marc-André Lureau --- include/hw/i386/pc.h | 5 - hw/i386/pc_piix.c| 15 --- hw/i386/pc_q35.c | 13 +++-- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v0 2/2] block: postpone the coroutine executing if the BDS's is drained

2018-09-12 Thread Kevin Wolf
Am 12.09.2018 um 14:03 hat Denis Plotnikov geschrieben: > On 10.09.2018 15:41, Kevin Wolf wrote: > > Am 29.06.2018 um 14:40 hat Denis Plotnikov geschrieben: > > > Fixes the problem of ide request appearing when the BDS is in > > > the "drained section". > > > > > > Without the patch the request

[Qemu-devel] [PULL 3/4] block/rbd: add iotest for rbd legacy keyvalue filename parsing

2018-09-12 Thread Jeff Cody
This is a small test that will check for the ability to parse both legacy and modern options for rbd. The way the test is set up is for failure to occur, but without having to wait to timeout on a non-existent rbd server. The error messages in the success path show that the arguments were

Re: [Qemu-devel] [PATCH] fw_cfg_mem: add read memory region callback

2018-09-12 Thread Li Qiang
Hi Laszlo, Laszlo Ersek 于2018年9月12日周三 下午6:36写道: > On 09/12/18 10:02, Li Qiang wrote: > > Hi, > > > > Marc-André Lureau 于2018年9月12日周三 下午3:16写道: > > > >> Hi > >> > >> On Wed, Sep 12, 2018 at 9:22 AM Li Qiang wrote: > >>> > >>> The write/read should be paired, this can avoid the > >>> NULL-deref

[Qemu-devel] [PATCH 1/3] display/edid: add edid generator to qemu.

2018-09-12 Thread Gerd Hoffmann
EDID is a metadata format to describe monitors. On physical hardware the monitor has an eeprom with that data block which can be read over i2c bus. On a linux system you can usually find the EDID data block in /sys/class/drm/$card/$connector/edid. xorg ships a edid-decode utility which you can

[Qemu-devel] [PATCH 3/3] display/stdvga: add edid support.

2018-09-12 Thread Gerd Hoffmann
This patch adds edid support to the qemu stdvga. It is turned off by default and can be enabled with the new edid property. The patch also adds xres and yres properties to specify the video mode you want the guest use. Works only with edid enabled and updated guest driver. The mmio bar of the

Re: [Qemu-devel] [PATCH 2/2] virtio-scsi/virtio-blk: Disable poll handlers when stopping vq handler

2018-09-12 Thread Paolo Bonzini
On 12/09/2018 13:50, Fam Zheng wrote: >> I think it's okay if it is invoked. The sequence is first you stop the >> vq, then you drain the BlockBackends, then you switch AioContext. All >> that matters is the outcome when virtio_scsi_dataplane_stop returns. > Yes, but together with vIOMMU, it

Re: [Qemu-devel] [PATCH] memory region: check the old.mmio.read status

2018-09-12 Thread Peter Maydell
On 12 September 2018 at 13:32, Li Qiang wrote: > To avoid NULL-deref for the devices without read callbacks > > Signed-off-by: Li Qiang > --- > memory.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/memory.c b/memory.c > index 9b73892768..48d025426b 100644 > --- a/memory.c > +++

[Qemu-devel] [PATCH 0/9] hostmem-ram: use whole path for region name with >= 3.1

2018-09-12 Thread Marc-André Lureau
Hi, The migration code expects the RAM block name to match between the source and destination. However the backend type may change, so it is possible (so far) to migrate from a hostmem-file to a hostmem-memfd for example. However, hostmem backends use inconsistent RAM naming, which can cause a

[Qemu-devel] [PATCH 4/9] qom/globals: move qdev globals to qom

2018-09-12 Thread Marc-André Lureau
Move the global properties handling to QOM. For now, this is just a simple moving & renaming and the globals are only applied to TYPE_DEVICE. The following patches will generalize the global handling to other object types. Signed-off-by: Marc-André Lureau --- include/hw/qdev-core.h | 20

[Qemu-devel] [PATCH 1/9] qom/user-creatable: add a few helper macros

2018-09-12 Thread Marc-André Lureau
Improve a bit code readability. Signed-off-by: Marc-André Lureau --- include/qom/object_interfaces.h | 4 qom/object.c| 4 ++-- qom/object_interfaces.c | 9 +++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/qom/object_interfaces.h

[Qemu-devel] [PATCH 6/9] qom/object: set globals when initializing object

2018-09-12 Thread Marc-André Lureau
Set globals for all objects, although only TYPE_DEVICE & TYPE_USER_CREATABLE can have globals for now. Signed-off-by: Marc-André Lureau --- hw/core/qdev.c | 6 -- qom/object.c | 2 ++ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index

Re: [Qemu-devel] [PATCH] vmdk: align end of file to a sector boundary

2018-09-12 Thread yuchenlin via Qemu-devel
Fam Zheng 於 2018-09-12 17:34 寫道: > On Tue, 08/28 11:17, yuchen...@synology.com wrote: > From: yuchenlin > > > There is a rare case which the size of last > compressed cluster > is larger than the cluster size, which will cause the > file is > not aligned at the sector boundary. I don't

Re: [Qemu-devel] [PATCH] util/async: use qemu_aio_coroutine_enter in co_schedule_bh_cb

2018-09-12 Thread Kevin Wolf
Am 12.09.2018 um 09:41 hat Fam Zheng geschrieben: > On Wed, 09/05 11:33, Sergio Lopez wrote: > > AIO Coroutines shouldn't by managed by an AioContext different than the > > one assigned when they are created. aio_co_enter avoids entering a > > coroutine from a different AioContext, calling

Re: [Qemu-devel] [RFC PATCH 3/4] linux-user/nios2: bump min uname to 4.16.0 [!HACK]

2018-09-12 Thread Alex Bennée
Marek Vasut writes: > On 09/11/2018 05:08 PM, Alex Bennée wrote: >> >> Marek Vasut writes: >> >>> On 09/11/2018 04:14 PM, Laurent Vivier wrote: Le 11/09/2018 à 16:06, Alex Bennée a écrit: >> >> I don't think so - it's an artefact of the way the buildroot toolchain >> is built. But the

Re: [Qemu-devel] [PATCH] fw_cfg_mem: add read memory region callback

2018-09-12 Thread Laszlo Ersek
On 09/12/18 10:02, Li Qiang wrote: > Hi, > > Marc-André Lureau 于2018年9月12日周三 下午3:16写道: > >> Hi >> >> On Wed, Sep 12, 2018 at 9:22 AM Li Qiang wrote: >>> >>> The write/read should be paired, this can avoid the >>> NULL-deref while the guest reads the fw_cfg port. >>> >>> Signed-off-by: Li Qiang

Re: [Qemu-devel] [PATCH 2/2] block/rbd: Attempt to parse legacy filenames

2018-09-12 Thread Kevin Wolf
Am 11.09.2018 um 20:37 hat Jeff Cody geschrieben: > On Tue, Sep 11, 2018 at 02:22:31PM -0400, John Snow wrote: > > Once we load the image, will the header get rewritten into a compliant > > format? > > Hmm - I think in some code paths, but not all. I don't think the answer is > 'yes'

Re: [Qemu-devel] [PATCH V12 00/19] COLO: integrate colo frame with block replication and COLO proxy

2018-09-12 Thread Jason Wang
On 2018年09月10日 16:16, Zhang Chen wrote: Hi All. Have any comments? Ping... Thanks Zhang Chen I've queued them with some tweaks on the commit log. Please refer the comment of patch 1 and send me a patch on top for a better comment. Thanks

[Qemu-devel] [PATCH v6 21/25] replay: replay BH for IDE trim operation

2018-09-12 Thread Pavel Dovgalyuk
This patch makes IDE trim BH deterministic, because it affects the device state. Therefore its invocation should be replayed instead of running at the random moment. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Paolo Bonzini --- hw/ide/core.c |3 ++- 1 file changed, 2 insertions(+), 1

Re: [Qemu-devel] [PATCH] vmdk: align end of file to a sector boundary

2018-09-12 Thread Fam Zheng
On Tue, 08/28 11:17, yuchen...@synology.com wrote: > From: yuchenlin > > There is a rare case which the size of last compressed cluster > is larger than the cluster size, which will cause the file is > not aligned at the sector boundary. I don't understand. Doesn't it mean that if you force the

<    1   2