Re: [Qemu-devel] [PATCH 3/3] virtio-pmem: Add virtio pmem driver

2018-09-12 Thread Pankaj Gupta
Hi Luiz, Thanks for the review. > > > This patch adds virtio-pmem driver for KVM guest. > > > > Guest reads the persistent memory range information from > > Qemu over VIRTIO and registers it on nvdimm_bus. It also > > creates a nd_region object with the persistent memory > > range information

Re: [Qemu-devel] [PATCH 1/3] aio-posix: fix concurrent access to poll_disable_cnt

2018-09-12 Thread Fam Zheng
On Wed, 09/12 19:10, Paolo Bonzini wrote: > It is valid for an aio_set_fd_handler to happen concurrently with > aio_poll. In that case, poll_disable_cnt can change under the heels > of aio_poll, and the assertion on poll_disable_cnt can fail in > run_poll_handlers. > > Therefore, this patch simpl

Re: [Qemu-devel] [RFC PATCH v2 4/7] tcg: add instrumenting module

2018-09-12 Thread Pavel Dovgalyuk
> From: Alex Bennée [mailto:alex.ben...@linaro.org] > Pavel Dovgalyuk writes: > > > From: Pavel Dovgalyuk > > > > This is a samples of the instrumenting interface and implementation > > of some instruction tracing tasks. > > > > Signed-off-by: Pavel Dovgalyuk > > --- > > accel/tcg/translator.c

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

2018-09-12 Thread David Gibson
On Thu, Sep 13, 2018 at 07:16:05AM +0200, Cédric Le Goater wrote: > 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 Applied, thanks. > --- > include/hw/pci-host/spapr.h | 5 ++--

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

2018-09-12 Thread David Gibson
On Tue, Sep 11, 2018 at 06:41:24AM +0200, Cédric Le Goater wrote: > On 09/11/2018 03:48 AM, David Gibson wrote: > > On Mon, Sep 10, 2018 at 01:02:20PM +0200, Cédric Le Goater wrote: > > 11;rgb://> The number of MSI interrupts a sPAPR machine can > > allocate is in direct > >> relation

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

2018-09-12 Thread Zhang Chen
On Thu, Sep 13, 2018 at 11:10 AM Zhang Chen wrote: > > > 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 l

Re: [Qemu-devel] [PATCH] hw/arm/virt-acpi-build: Add a check for memory-less NUMA nodes

2018-09-12 Thread Andrew Jones
On Tue, Sep 11, 2018 at 07:26:43PM +0800, Shannon Zhao wrote: > From: Shannon Zhao > > Like commit 16b4226(hw/acpi-build: Add a check for memory-less NUMA node > ), it also needs to check memory length for NUMA nodes on ARM. > > Signed-off-by: Shannon Zhao > --- > hw/arm/virt-acpi-build.c | 10

Re: [Qemu-devel] [RFC PATCH v2 2/7] Add plugin support

2018-09-12 Thread Pavel Dovgalyuk
> From: Alex Bennée [mailto:alex.ben...@linaro.org] > Pavel Dovgalyuk writes: > > > This patch adds support for dynamically loaded plugins. > > Every plugin is a dynamic library with a set of optional exported > > functions that will be called from QEMU. > > > > Signed-off-by: Pavel Dovgalyuk >

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

2018-09-12 Thread Christian Borntraeger
On 09/13/2018 08:29 AM, Christian Borntraeger wrote: >>> +++ b/hw/s390x/ap-bridge.c >> [...] >>> +void s390_init_ap(void) >>> +{ >>> +DeviceState *dev; >>> + >>> +/* Create bridge device */ >>> +dev = qdev_create(NULL, TYPE_AP_BRIDGE); >>> +object_property_add_child(qdev_get_mach

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

2018-09-12 Thread Christian Borntraeger
On 09/13/2018 07:48 AM, Thomas Huth wrote: > 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 fi

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

2018-09-12 Thread Greg Kurz
On Thu, 13 Sep 2018 07:16:05 +0200 Cédric Le Goater wrote: > 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 > --- Reviewed-by: Greg Kurz > include/hw/pci-host/spapr.h | 5 ++

Re: [Qemu-devel] [qemu-s390x] [PATCH v8 6/6] s390: doc: detailed specifications for AP virtualization

2018-09-12 Thread Thomas Huth
On 2018-09-12 22:08, Tony Krowiak wrote: > This patch provides documentation describing the AP architecture and > design concepts behind the virtualization of AP devices. It also > includes an example of how to configure AP devices for exclusive > use of KVM guests. > > Signed-off-by: Tony Krowiak

[Qemu-devel] [Bug 588691] Re: QEMU is not correctly detecting host CDs

2018-09-12 Thread Thomas Huth
OK, thanks for the confirmation, John, so seems like this bug has been fixed in the past and we can close it now. ** Changed in: qemu Status: Incomplete => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://b

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 14:42, Paolo Bonzini wrote: > 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

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

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; otherwis

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

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 b

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

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

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 i

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. >>> >>> Curr

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 ro

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 descri

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] [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 interrup

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 > "ibm,pe-total-

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

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

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 &iommu_as[devfn]->as; > > > } > > > @@ -1172,6 +1274,10 @@ static void amdvi_realize(DeviceState *dev, Error > > > **err) > > > return; > > > } > > > +/* Pseudo address spa

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 her

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

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

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

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 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 NULL-dereferen

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 becaus

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 r

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 exte

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 do

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) build_append_int_nopref

Re: [Qemu-devel] [PATCH v2] target/mips: Initial support for MIPS R5900

2018-09-12 Thread Maciej W. Rozycki
Hi Fredrik, > Aleksandar, Aurelien, Maciej -- are you happy with this initial v2 patch? I have been more thorough on this occasion, and I do hope I have caught everything. See the notes below, in addition to what the others wrote. Please apply to v3 accordingly; I started writing this befo

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 desired

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

2018-09-12 Thread Richard Henderson
On 08/30/2018 12:30 PM, Craig Janeczek via Qemu-devel wrote: > +gen_load_mxu_cr(t0); > +tcg_gen_andi_tl(t0, t0, MXUEN); > +tcg_gen_brcondi_tl(TCG_COND_NE, t0, MXUEN, l0); Probably MXUEN should be included in env->hflags, and therefore tested via ctx->hflags. (Which also means ending a

[Qemu-devel] [PATCH v8 6/6] s390: doc: detailed specifications for AP virtualization

2018-09-12 Thread Tony Krowiak
This patch provides documentation describing the AP architecture and design concepts behind the virtualization of AP devices. It also includes an example of how to configure AP devices for exclusive use of KVM guests. Signed-off-by: Tony Krowiak --- MAINTAINERS |1 + docs/vfio-ap.txt |

[Qemu-devel] [PATCH v8 5/6] s390x/vfio: ap: Introduce VFIO AP device

2018-09-12 Thread Tony Krowiak
Introduces a VFIO based AP device. The device is defined via the QEMU command line by specifying: -device vfio-ap,sysfsdev= There may be only one vfio-ap device configured for a guest. The mediated matrix device is created by the VFIO AP device driver by writing a UUID to a sysfs attribute f

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

[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 ++ hw/s390x/ap-devic

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

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

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

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, 6

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

2018-09-12 Thread Richard Henderson
On 08/30/2018 12:30 PM, Craig Janeczek via Qemu-devel wrote: > +static const char * const mxuregnames[] = { > +"XR1", "XR2", "XR3", "XR4", "XR5", "XR6", "XR7", "XR8", > +"XR9", "XR10", "XR11", "XR12", "XR13", "XR14", "XR15", "XR16", > +}; XR16 is unused. Otherwise, Reviewed-by: Rich

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 Shimi

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 --- linux-user/nios2/cp

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 Qian

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

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

2018-09-12 Thread Brijesh Singh
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 device 14:0.0. Linux IOMMU driver checks for this special device. Cc: "Michael S. Tsir

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 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 (secti

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

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 thes

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

2018-09-12 Thread Alex Williamson
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: > > > > > On Wed, Sep 12, 2018 at 10:34:43AM -0600, Alex Williamson wrote: > > > > On Wed,

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

2018-09-12 Thread Sandra Loosemore
On 09/12/2018 11:49 AM, Richard Henderson wrote: 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 fil

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

2018-09-12 Thread Richard Henderson
On 09/12/2018 05:36 AM, Gerd Hoffmann wrote: > +static struct edid_mode { > +uint32_t xres; > +uint32_t yres; > +uint32_t byte; > +uint32_t xtra3; > +uint32_t bit; > +} modes[] = { static const? r~

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

2018-09-12 Thread Richard Henderson
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 changed, 3 insertions(+) > > diff --g

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

2018-09-12 Thread Laszlo Ersek
On 09/12/18 16:28, Li Qiang wrote: > 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(+) >>> >

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

2018-09-12 Thread Laszlo Ersek
On 09/12/18 14:54, Peter Maydell wrote: > 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 9b7

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

2018-09-12 Thread Michael S. Tsirkin
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 these devices, and crash at boot due to attempting to read > an invalid address.

[Qemu-devel] [Bug 1792193] [NEW] AMD Athlon(tm) X2 Dual-Core QL-64 bug

2018-09-12 Thread Kirill Bugaev
Public bug reported: I upgrade my qemu 2.12.0-2 => 3.0.0-1. After that I can't load virtual machine with "-cpu host" option. Full command line is qemu-system-x86_64 \ -monitor stdio \ -enable-kvm \ -cpu host \ -smp cpus=2 \ -m 1G \ -vga virtio \

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

2018-09-12 Thread Alexander von Gluck IV
Good morning! I'm working through adding support (or at least ignoring) PCI Enhance Allocation devices under Haiku. We run into one of these devices, and crash at boot due to attempting to read an invalid address. Our testing showed that with a USB C dongle plugged in, we don't crash. Without

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

2018-09-12 Thread Michael S. Tsirkin
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: > > > On Wed, Sep 12, 2018 at 10:34:43AM -0600, Alex Williamson wrote: > > > On Wed, 12 Sep 2018 12:14:44 -0400 > > > "Michael S. Tsirkin" wrote: > > > > > > > O

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 07:12:58PM +0200, Claudio wrote: > Hi Michael, > > On 09/12/2018 05:31 PM, Michael S. Tsirkin wrote: > > On Wed, Sep 12, 2018 at 05:16:38PM +0200, Claudio wrote: > >> Thank you both for your responses, > >> > >> and ciao Paolo, > >> > >> On 09/12/2018 02:37 PM, Michael S. T

Re: [Qemu-devel] [PATCH] linux-user: don't short-circuit read with zero length

2018-09-12 Thread Richard Henderson
On 09/11/2018 05:03 AM, Andreas Schwab wrote: > +if (!(p = lock_user(VERIFY_WRITE, arg2, arg3, 0))) > +goto efault; The goto should not compile on head, after 2852aafd9d05. r~

Re: [Qemu-devel] [PATCH 2/2] hw/vfio/display: add ramfb support

2018-09-12 Thread Alex Williamson
On Tue, 11 Sep 2018 06:38:43 +0200 Gerd Hoffmann wrote: > Hi, > > > > type_register_static(&vfio_pci_dev_info); > > > +type_register_static(&vfio_pci_ramfb_dev_info); > > > My concern here is still all of the extra tooling that needs to be > > added to management layers above QEMU

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

2018-09-12 Thread Claudio
Hi Michael, On 09/12/2018 05:31 PM, Michael S. Tsirkin wrote: > On Wed, Sep 12, 2018 at 05:16:38PM +0200, Claudio wrote: >> Thank you both for your responses, >> >> and ciao Paolo, >> >> On 09/12/2018 02:37 PM, Michael S. Tsirkin wrote: >>> On Wed, Sep 12, 2018 at 10:01:34AM +0200, Claudio wrote:

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

2018-09-12 Thread Alex Williamson
On Wed, 12 Sep 2018 12:44:15 -0400 "Michael S. Tsirkin" wrote: > On Wed, Sep 12, 2018 at 10:34:43AM -0600, Alex Williamson wrote: > > On Wed, 12 Sep 2018 12:14:44 -0400 > > "Michael S. Tsirkin" wrote: > > > > > On Wed, Sep 12, 2018 at 04:04:00PM +0800, Tiwei Bie wrote: > > > > On Mon, Jul 3

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

2018-09-12 Thread Philippe Mathieu-Daudé
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 NULL-dereference issue. For example, add > "-device isa-debug-exit" to comma

[Qemu-devel] [PATCH 2/3] aio-posix: compute timeout before polling

2018-09-12 Thread Paolo Bonzini
This is a preparation for the next patch, and also a very small optimization. Compute the timeout only once, before invoking try_poll_mode, and adjust it in run_poll_handlers. The adjustment is the polling time when polling fails, or zero (non-blocking) if polling succeeds. Fixes: 70232b5253a3c4

[Qemu-devel] [PATCH 3/3] aio-posix: do skip system call if ctx->notifier polling succeeds

2018-09-12 Thread Paolo Bonzini
Commit 70232b5253 ("aio-posix: Don't count ctx->notifier as progress when 2018-08-15), by not reporting progress, causes aio_poll to execute the system call when polling succeeds because of ctx->notifier. This introduces latency before the call to aio_bh_poll() and negates the advantages of pollin

[Qemu-devel] [PATCH 1/3] aio-posix: fix concurrent access to poll_disable_cnt

2018-09-12 Thread Paolo Bonzini
It is valid for an aio_set_fd_handler to happen concurrently with aio_poll. In that case, poll_disable_cnt can change under the heels of aio_poll, and the assertion on poll_disable_cnt can fail in run_poll_handlers. Therefore, this patch simply checks the counter on every polling iteration. Ther

[Qemu-devel] [PATCH 0/3] aio-posix: polling mode bug fixes

2018-09-12 Thread Paolo Bonzini
Patch 1 fixes a too-strict assertion that could fire when aio_poll is called in parallel with aio_set_fd_handler. Patch 2 and 3 reinstate the performance benefits of polling, which were essentially disabled by commit 70232b5253 ("aio-posix: Don't count ctx->notifier as progress when polling", 2018

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

2018-09-12 Thread Denis V. Lunev
On 09/12/2018 04:15 PM, Kevin Wolf wrote: > 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". >>

Re: [Qemu-devel] [PATCH] qemu: Add virtio pmem device

2018-09-12 Thread Luiz Capitulino
On Fri, 31 Aug 2018 19:00:19 +0530 Pankaj Gupta wrote: > This patch adds virtio-pmem Qemu device. > > This device presents memory address range information to guest > which is backed by file backend type. It acts like persistent > memory device for KVM guest. Guest can perform read and > p

Re: [Qemu-devel] [PATCH 3/3] virtio-pmem: Add virtio pmem driver

2018-09-12 Thread Luiz Capitulino
On Fri, 31 Aug 2018 19:00:18 +0530 Pankaj Gupta wrote: > This patch adds virtio-pmem driver for KVM guest. > > Guest reads the persistent memory range information from > Qemu over VIRTIO and registers it on nvdimm_bus. It also > creates a nd_region object with the persistent memory > range infor

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

2018-09-12 Thread Eric Blake
On 9/12/18 7:33 AM, Li Qiang wrote: Do you have a reproducer and/or a backtrace? memory_region_dispatch_write() checks if ops->write != NULL. FWIW, looking at the codebase, there's a good number of static MemoryRegionOps structures for which the "read_with_attrs" and "read" members are defau

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

2018-09-12 Thread Eric Blake
On 9/12/18 11:01 AM, Li Qiang wrote: From: Li Qiang Signed-off-by: Li Qiang This commit message doesn't state why. The cover letter does, but that doesn't get checked into git. A year from now, if someone lands on this commit during a bisect, it would help if the commit message told them

Re: [Qemu-devel] [libvirt] [PATCH v7 1/2] vl.c deprecate incorrect CPUs topology

2018-09-12 Thread Eric Blake
On 9/12/18 11:19 AM, Igor Mammedov wrote: -smp [cpus],sockets/cores/threads[,maxcpus] should describe topology so that total number of logical CPUs [sockets * cores * threads] would be equal to [maxcpus], however historically we didn't have such check in QEMU and it is possible to start VM with a

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

2018-09-12 Thread Michael S. Tsirkin
On Wed, Sep 12, 2018 at 10:34:43AM -0600, Alex Williamson wrote: > On Wed, 12 Sep 2018 12:14:44 -0400 > "Michael S. Tsirkin" wrote: > > > On Wed, Sep 12, 2018 at 04:04:00PM +0800, Tiwei Bie wrote: > > > On Mon, Jul 30, 2018 at 12:30:58PM +0300, Michael S. Tsirkin wrote: > > > [...] > > > > > >

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

2018-09-12 Thread Eric Blake
On 9/12/18 11:19 AM, 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 then. Exiting checks are neither reachable } else if (sockets * cores * threads < cpus) { o

Re: [Qemu-devel] [PATCH] target/xtensa: fix s32c1i TCGMemOp flags

2018-09-12 Thread Richard Henderson
On 09/10/2018 06:32 PM, Max Filippov wrote: > s32c1i must load and store value with target endianness, not host. > This results in an infinite loop in atomic cmpxchg sequences when target > endianness doesn't match host endianness. > > Fixes: 9fb40342d4b3 ("target/xtensa: support MTTCG") > Cc: qem

Re: [Qemu-devel] [PATCH v2 00/12] qht improvements for 3.1

2018-09-12 Thread Richard Henderson
On 09/10/2018 11:58 AM, Emilio G. Cota wrote: > v1: https://github.com/cota/qemu/tree/qht-for-3.1-v2 > > Changes since v1: > > - Added Alex's R-b tags to patches 1-6 > - Added a patch to drop *ht from qht_iter and qht_iter_remove, > as suggested by Alex. > - Added some constification patches >

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

2018-09-12 Thread Igor Mammedov
On Tue, 11 Sep 2018 11:49:49 -0500 Brijesh Singh wrote: > Now that amd-iommu support interrupt remapping, enable the GASup in IVRS > table and GASup in extended feature register to indicate that IOMMU > support guest virtual APIC mode. > > Note that the GAMSup is set to zero to indicate that Gu

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

2018-09-12 Thread Igor Mammedov
On Tue, 11 Sep 2018 11:49:47 -0500 Brijesh Singh wrote: > When interrupt remapping is enabled, add a special IVHD device > (type IOAPIC) -- which is typically PCI device 14:0.0. Linux IOMMU driver > checks for this special device. > > Cc: "Michael S. Tsirkin" > Cc: Paolo Bonzini > Cc: Richard

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

2018-09-12 Thread Alex Williamson
On Wed, 12 Sep 2018 12:14:44 -0400 "Michael S. Tsirkin" wrote: > On Wed, Sep 12, 2018 at 04:04:00PM +0800, Tiwei Bie wrote: > > On Mon, Jul 30, 2018 at 12:30:58PM +0300, Michael S. Tsirkin wrote: > > [...] > > > > > > I generally wonder how are restarts of the backend handled > > > with this a

[Qemu-devel] [PATCH v7 0/2] deprecate incorrect CPUs topolog

2018-09-12 Thread Igor Mammedov
Changelog since v5: * add(v6) and then remove(v7) Notes section to/from deprication doc (Eduardo Habkost ) * fix up wording and math formating in deprication doc (Eduardo Habkost ) * drop !socket check as it always evaluates to true at that point (Eduardo Habkost ) Changelog

  1   2   3   >