Re: [Qemu-devel] [PATCH] vl: Move cpu_synchronize_all_states() into qemu_system_reset()

2016-04-04 Thread Paolo Bonzini
On 04/04/2016 06:49, David Gibson wrote: > There are currently 3 calls to qemu_system_reset() in vl.c. Two of them > are immediately preceded by a cpu_synchronize_all_states9) and the > remaining one should be. > > The one which doesn't is the very first reset called directly from main(). > Wit

Re: [Qemu-devel] [PATCH for-2.6] nbd: don't request FUA on FLUSH

2016-04-04 Thread Paolo Bonzini
On 01/04/2016 18:08, Eric Blake wrote: > The NBD protocol does not clearly document what will happen > if a client sends NBD_CMD_FLAG_FUA on NBD_CMD_FLUSH. > Historically, both the qemu and upstream NBD servers silently > ignored that flag, but that feels a bit risky. Meanwhile, the > qemu NBD c

Re: [Qemu-devel] [PATCH] vl: Move cpu_synchronize_all_states() into qemu_system_reset()

2016-04-04 Thread David Gibson
On Mon, Apr 04, 2016 at 09:31:16AM +0200, Paolo Bonzini wrote: > > > On 04/04/2016 06:49, David Gibson wrote: > > There are currently 3 calls to qemu_system_reset() in vl.c. Two of them > > are immediately preceded by a cpu_synchronize_all_states9) and the > > remaining one should be. > > > > T

Re: [Qemu-devel] [PATCH 2/2] memory: hide mr->ram_addr from qemu_get_ram_ptr users

2016-04-04 Thread Paolo Bonzini
On 03/04/2016 15:49, Michael S. Tsirkin wrote: > I agree but I think we need a better name for this function. > qemu_ram_offset_to_ptr? What about qemu_map_ram_ptr? Paolo > Will also serve to make sure backporting patches across this > API change does not cause issues.

Re: [Qemu-devel] [PATCH] virtio-blk: assert on starting/stopping

2016-04-04 Thread Cornelia Huck
On Sun, 3 Apr 2016 23:13:28 +0200 Paolo Bonzini wrote: > On 03/04/2016 21:59, Christian Borntraeger wrote: > > Thread 1 (Thread 0x3ffad25bb90 (LWP 41685)): > > ---Type to continue, or q to quit--- > > #0 0x03ffab5be2c0 in raise () at /lib64/libc.so.6 > > #1 0x03ffab5bfc26 in abort ()

Re: [Qemu-devel] [PATCH v1 3/5] include/qemu/atomic.h: default to __atomic functions

2016-04-04 Thread Paolo Bonzini
On 01/04/2016 22:35, Pranith Kumar wrote:; barrier(); }) > I could not really understand why we need to wrap the fence with > barrier()'s. There are three parts to my confusion. Let me ask one after the > other. > > On x86, __atomic_thread_fence(__ATOMIC_SEQ_CST) will generate an mfence > instru

Re: [Qemu-devel] [PATCH] virtio-blk: assert on starting/stopping

2016-04-04 Thread Paolo Bonzini
On 04/04/2016 10:10, Cornelia Huck wrote: > > This will be fixed by Cornelia's rework, and is an example of why I > > think patch 1/9 is a good idea (IOW, assign=false is harmful). > > So what do we want to do for 2.6? The aio handler rework (without the > cleanup) is needed. Do we want to inclu

Re: [Qemu-devel] [PATCH] vl: Move cpu_synchronize_all_states() into qemu_system_reset()

2016-04-04 Thread Laurent Vivier
On 04/04/2016 06:49, David Gibson wrote: > There are currently 3 calls to qemu_system_reset() in vl.c. Two of them > are immediately preceded by a cpu_synchronize_all_states9) and the > remaining one should be. > > The one which doesn't is the very first reset called directly from main(). > Wit

Re: [Qemu-devel] [PATCH] virtio-blk: assert on starting/stopping

2016-04-04 Thread Cornelia Huck
On Mon, 4 Apr 2016 10:19:42 +0200 Paolo Bonzini wrote: > On 04/04/2016 10:10, Cornelia Huck wrote: > > > This will be fixed by Cornelia's rework, and is an example of why I > > > think patch 1/9 is a good idea (IOW, assign=false is harmful). > > > > So what do we want to do for 2.6? The aio hand

[Qemu-devel] [PATCH 1/2] seccomp: Whitelist cacheflush since 2.2.0 not 2.2.3

2016-04-04 Thread James Hogan
The cacheflush system call (found on MIPS and ARM) has been included in the libseccomp header since 2.2.0, so include include it back to that version. Previously it was only enabled since 2.2.3 since that is when it was enabled properly for ARM. This will allow seccomp support to be enabled for MI

[Qemu-devel] [PATCH 0/2] Enable seccomp on MIPS

2016-04-04 Thread James Hogan
These patches enable seccomp sandboxing on MIPS. libseccomp has supported MIPS since 2.2.0, but cacheflush isn't included in the whitelist until libseccomp 2.2.3 since thats when it was enabled for ARM. The first patch fixes that so that it will work with MIPS right back to 2.2.0. Finally the sec

[Qemu-devel] [PATCH 2/2] configure: Enable seccomp sandbox for MIPS

2016-04-04 Thread James Hogan
Enable seccomp on MIPS since libseccomp version 2.2.0 when MIPS support was first added. Signed-off-by: James Hogan Cc: Eduardo Otubo Cc: Aurelien Jarno --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure b/configure index 5db29f0245ae..f1c307bfc69c 100755 --- a/conf

Re: [Qemu-devel] [PATCH] vl: Move cpu_synchronize_all_states() into qemu_system_reset()

2016-04-04 Thread Paolo Bonzini
On 04/04/2016 09:54, David Gibson wrote: > > Acked-by: Paolo Bonzini > > Paolo / Peter, should I send this in a pull request for my tree, or > should it go through someone else's tree? Go ahead and send it. Paolo

Re: [Qemu-devel] [PATCH v1 2/2] include/qemu/atomic: add compile time asserts

2016-04-04 Thread Paolo Bonzini
On 01/04/2016 17:03, Alex Bennée wrote: > >> > To be safely portable no atomic access should be trying to do more than >> > the natural word width of the host. The most common abuse is trying to >> > atomically access 64 bit values on a 32 bit host. >> > >> > This patch adds some QEMU_BUILD_BUG_

Re: [Qemu-devel] [PATCH 2/2] memory: hide mr->ram_addr from qemu_get_ram_ptr users

2016-04-04 Thread Michael S. Tsirkin
On Mon, Apr 04, 2016 at 10:03:12AM +0200, Paolo Bonzini wrote: > > > On 03/04/2016 15:49, Michael S. Tsirkin wrote: > > I agree but I think we need a better name for this function. > > qemu_ram_offset_to_ptr? > > What about qemu_map_ram_ptr? > > Paolo OK but this seems to imply there's also an

Re: [Qemu-devel] [PATCH] virtio-blk: assert on starting/stopping

2016-04-04 Thread Michael S. Tsirkin
On Mon, Apr 04, 2016 at 10:25:34AM +0200, Cornelia Huck wrote: > On Mon, 4 Apr 2016 10:19:42 +0200 > Paolo Bonzini wrote: > > > On 04/04/2016 10:10, Cornelia Huck wrote: > > > > This will be fixed by Cornelia's rework, and is an example of why I > > > > think patch 1/9 is a good idea (IOW, assign

[Qemu-devel] Should we introduce a TranslationRegion with its own codegen buffer?

2016-04-04 Thread Alex Bennée
Hi, While reviewing the recent TB patching cleanup patches I wondered if there is a cleaner way of handling TB invalidation. Currently we have a single code generation buffer which slowly fills up with TBs as we execute code. These TBs are chained together if they exist in the same physical page (

Re: [Qemu-devel] [PATCH 2/2] acpi: tpm: Get the interrupt the device model is using

2016-04-04 Thread Michael S. Tsirkin
On Sun, Apr 03, 2016 at 09:37:56PM -0400, Stefan Berger wrote: > Get the interrupt the TPM device model is using. Do not activate > the interrupt in the ACPI description yet since the current > default value clashes with other devices. > > Signed-off-by: Stefan Berger Is this doing anything at a

Re: [Qemu-devel] Should we introduce a TranslationRegion with its own codegen buffer?

2016-04-04 Thread Paolo Bonzini
On 04/04/2016 10:54, Alex Bennée wrote: > Thoughts, objections? Discuss ;-) I think we're putting a lot of carts before the horse. We have like half a dozen subprojects and none are moving because there's no clear idea of what to do next and why. The first thing to do is to focus on fixing and

Re: [Qemu-devel] [PATCH 2/2] memory: hide mr->ram_addr from qemu_get_ram_ptr users

2016-04-04 Thread Paolo Bonzini
On 04/04/2016 10:38, Michael S. Tsirkin wrote: > > > I agree but I think we need a better name for this function. > > > qemu_ram_offset_to_ptr? > > > > What about qemu_map_ram_ptr? > > > > Paolo > > OK but this seems to imply there's also an unmap operation? Actually there is one, even though

Re: [Qemu-devel] [PATCH 1/2] acpi: tpm: Fix TPM ACPI description (BZ 1281413)

2016-04-04 Thread Michael S. Tsirkin
On Sun, Apr 03, 2016 at 09:37:55PM -0400, Stefan Berger wrote: > This patch addresses BZ 1281413. > > https://bugzilla.redhat.com/show_bug.cgi?id=1281413 > > Fix the APCI description to make it work on operating systems that are > more strict about the contents of the TPM's ACPI description than

Re: [Qemu-devel] [PATCH 0/2] acpi: tpm: Fix TPM ACPI description

2016-04-04 Thread Michael S. Tsirkin
On Sun, Apr 03, 2016 at 09:37:54PM -0400, Stefan Berger wrote: > This series of patches fixes some problems with the TPM's ACPI > description. Could you pls describe how does this interact with Igor's patch? > Stefan Berger (2): > acpi: tpm: Fix TPM ACPI description (BZ 1281413) > acpi: tpm:

Re: [Qemu-devel] [Xen-devel] [PATCH] xen: write information about supported backends

2016-04-04 Thread David Vrabel
On 30/03/16 15:10, Juergen Gross wrote: > Add a Xenstore directory for each supported pv backend. This will allow > Xen tools to decide which backend type to use in case there are > multiple possibilities. > > The information is added under > /local/domain//device-model//backends > before the "run

Re: [Qemu-devel] [Xen-devel] [PATCH] xen: write information about supported backends

2016-04-04 Thread Juergen Gross
On 04/04/16 11:18, David Vrabel wrote: > On 30/03/16 15:10, Juergen Gross wrote: >> Add a Xenstore directory for each supported pv backend. This will allow >> Xen tools to decide which backend type to use in case there are >> multiple possibilities. >> >> The information is added under >> /local/do

[Qemu-devel] [PATCH qemu v15 02/17] vmstate: Define VARRAY with VMS_ALLOC

2016-04-04 Thread Alexey Kardashevskiy
This allows dynamic allocation for migrating arrays. Already existing VMSTATE_VARRAY_UINT32 requires an array to be pre-allocated, however there are cases when the size is not known in advance and there is no real need to enforce it. This defines another variant of VMSTATE_VARRAY_UINT32 with WMS_

[Qemu-devel] [PATCH qemu v15 01/17] memory: Fix IOMMU replay base address

2016-04-04 Thread Alexey Kardashevskiy
Since a788f227 "memory: Allow replay of IOMMU mapping notifications" when new VFIO listener is added, all existing IOMMU mappings are replayed. However there is a problem that the base address of an IOMMU memory region (IOMMU MR) is ignored which is not a problem for the existing user (which is pse

[Qemu-devel] [PATCH qemu v15 03/17] vfio: Check that IOMMU MR translates to system address space

2016-04-04 Thread Alexey Kardashevskiy
At the moment IOMMU MR only translate to the system memory. However if some new code changes this, we will need clear indication why it is not working so here is the check. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson --- Changes: v15: * added some spaces v14: * new to the seri

[Qemu-devel] [PATCH qemu v15 13/17] vfio: Add host side DMA window capabilities

2016-04-04 Thread Alexey Kardashevskiy
There are going to be multiple IOMMUs per a container. This moves the single host IOMMU parameter set to a list of VFIOHostIOMMU. This should cause no behavioral change and will be used later by the SPAPR TCE IOMMU v2 which will also add a vfio_host_iommu_del() helper. Signed-off-by: Alexey Karda

[Qemu-devel] [PATCH qemu v15 09/17] spapr_pci: Reset DMA config on PHB reset

2016-04-04 Thread Alexey Kardashevskiy
LoPAPR dictates that during system reset all DMA windows must be removed and the default DMA32 window must be created so does the patch. At the moment there is just one window supported so no change in behaviour is expected. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson --- hw/

[Qemu-devel] [PATCH qemu v15 11/17] vfio: spapr: Add SPAPR IOMMU v2 support (DMA memory preregistering)

2016-04-04 Thread Alexey Kardashevskiy
This makes use of the new "memory registering" feature. The idea is to provide the userspace ability to notify the host kernel about pages which are going to be used for DMA. Having this information, the host kernel can pin them all once per user process, do locked pages accounting (once) and not s

[Qemu-devel] [PATCH qemu v15 15/17] spapr_pci: Get rid of dma_loibn

2016-04-04 Thread Alexey Kardashevskiy
We are going to have 2 DMA windows which LIOBNs are calculated from the PHB index and the window number using the SPAPR_PCI_LIOBN macro so there is no actual use for dma_liobn. This replaces dma_liobn with SPAPR_PCI_LIOBN. This marks it as unused in the migration stream. This renames dma_liobn to

[Qemu-devel] [PATCH qemu v15 04/17] spapr_iommu: Move table allocation to helpers

2016-04-04 Thread Alexey Kardashevskiy
At the moment presence of vfio-pci devices on a bus affect the way the guest view table is allocated. If there is no vfio-pci on a PHB and the host kernel supports KVM acceleration of H_PUT_TCE, a table is allocated in KVM. However, if there is vfio-pci and we do yet not KVM acceleration for these,

[Qemu-devel] [PATCH qemu v15 06/17] spapr_iommu: Finish renaming vfio_accel to need_vfio

2016-04-04 Thread Alexey Kardashevskiy
6a81dd17 "spapr_iommu: Rename vfio_accel parameter" renamed vfio_accel flag everywhere but one spot was missed. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson --- target-ppc/kvm_ppc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-ppc/kvm_ppc.h b/targe

[Qemu-devel] [PATCH qemu v15 12/17] spapr_pci: Add and export DMA resetting helper

2016-04-04 Thread Alexey Kardashevskiy
This will be later used by the "ibm,reset-pe-dma-window" RTAS handler which resets the DMA configuration to the defaults. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson --- hw/ppc/spapr_pci.c | 10 -- include/hw/pci-host/spapr.h | 2 ++ 2 files changed, 10 inser

[Qemu-devel] [PATCH qemu v15 05/17] spapr_iommu: Introduce "enabled" state for TCE table

2016-04-04 Thread Alexey Kardashevskiy
Currently TCE tables are created once at start and their sizes never change. We are going to change that by introducing a Dynamic DMA windows support where DMA configuration may change during the guest execution. This changes spapr_tce_new_table() to create an empty zero-size IOMMU memory region (

[Qemu-devel] [PATCH qemu v15 10/17] memory: Add reporting of supported page sizes

2016-04-04 Thread Alexey Kardashevskiy
Every IOMMU has some granularity which MemoryRegionIOMMUOps::translate uses when translating, however this information is not available outside the translate context for various checks. This adds a get_page_sizes callback to MemoryRegionIOMMUOps and a wrapper for it so IOMMU users (such as VFIO) c

[Qemu-devel] [PATCH qemu v15 16/17] vfio/spapr: Use VFIO_SPAPR_TCE_v2_IOMMU

2016-04-04 Thread Alexey Kardashevskiy
New VFIO_SPAPR_TCE_v2_IOMMU type supports dynamic DMA window management. This adds ability to VFIO common code to dynamically allocate/remove DMA windows in the host kernel when new VFIO container is added/removed. This adds VFIO_IOMMU_SPAPR_TCE_CREATE ioctl to vfio_listener_region_add and adds ju

[Qemu-devel] [PATCH qemu v15 07/17] spapr_iommu: Migrate full state

2016-04-04 Thread Alexey Kardashevskiy
The source guest could have reallocated the default TCE table and migrate bigger/smaller table. This adds reallocation in post_load() if the default table size is different on source and destination. This adds @bus_offset, @page_shift, @enabled to the migration stream. These cannot change without

[Qemu-devel] [PATCH qemu v15 14/17] spapr_iommu, vfio, memory: Notify IOMMU about starting/stopping being used by VFIO

2016-04-04 Thread Alexey Kardashevskiy
The sPAPR TCE tables manage 2 copies when VFIO is using an IOMMU - a guest view of the table and a hardware TCE table. If there is no VFIO presense in the address space, then just the guest view is used, if this is the case, it is allocated in the KVM. However since there is no support yet for VFIO

[Qemu-devel] [PATCH qemu v15 00/17] spapr: vfio: Enable Dynamic DMA windows (DDW)

2016-04-04 Thread Alexey Kardashevskiy
Each Partitionable Endpoint (IOMMU group) has an address range on a PCI bus where devices are allowed to do DMA. These ranges are called DMA windows. By default, there is a single DMA window, 1 or 2GB big, mapped at zero on a PCI bus. PAPR defines a DDW RTAS API which allows pseries guests queryin

[Qemu-devel] [PATCH qemu v15 08/17] spapr_iommu: Add root memory region

2016-04-04 Thread Alexey Kardashevskiy
We are going to have multiple DMA windows at different offsets on a PCI bus. For the sake of migration, we will have as many TCE table objects pre-created as many windows supported. So we need a way to map windows dynamically onto a PCI bus when migration of a table is completed but at this stage a

[Qemu-devel] [PATCH qemu v15 17/17] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW)

2016-04-04 Thread Alexey Kardashevskiy
This adds support for Dynamic DMA Windows (DDW) option defined by the SPAPR specification which allows to have additional DMA window(s) The "ddw" property is enabled by default on a PHB but for compatibility the pseries-2.5 machine and older disable it. This also creates a single DMA window for th

Re: [Qemu-devel] [PATCH 2/2] acpi: tpm: Get the interrupt the device model is using

2016-04-04 Thread Stefan Berger
On 04/04/2016 05:01 AM, Michael S. Tsirkin wrote: On Sun, Apr 03, 2016 at 09:37:56PM -0400, Stefan Berger wrote: Get the interrupt the TPM device model is using. Do not activate the interrupt in the ACPI description yet since the current default value clashes with other devices. Signed-off-by:

Re: [Qemu-devel] [PATCH 2/2] acpi: tpm: Get the interrupt the device model is using

2016-04-04 Thread Michael S. Tsirkin
On Mon, Apr 04, 2016 at 06:10:38AM -0400, Stefan Berger wrote: > On 04/04/2016 05:01 AM, Michael S. Tsirkin wrote: > >On Sun, Apr 03, 2016 at 09:37:56PM -0400, Stefan Berger wrote: > >>Get the interrupt the TPM device model is using. Do not activate > >>the interrupt in the ACPI description yet sin

[Qemu-devel] [PATCH for-2.7] hw/net/spapr_llan: Provide counter with dropped rx frames to the guest

2016-04-04 Thread Thomas Huth
The last 8 bytes of the receive buffer list page (that has been supplied by the guest with the H_REGISTER_LOGICAL_LAN call) contain a counter for frames that have been dropped because there was no suitable receive buffer available. This patch introduces code to use this field to provide the informa

Re: [Qemu-devel] [PATCH 1/2] acpi: tpm: Fix TPM ACPI description (BZ 1281413)

2016-04-04 Thread Stefan Berger
On 04/04/2016 05:04 AM, Michael S. Tsirkin wrote: On Sun, Apr 03, 2016 at 09:37:55PM -0400, Stefan Berger wrote: This patch addresses BZ 1281413. https://bugzilla.redhat.com/show_bug.cgi?id=1281413 Fix the APCI description to make it work on operating systems that are more strict about the con

[Qemu-devel] [PATCH] hw/mips_itu: fix off-by-one reported by Coverity

2016-04-04 Thread Leon Alrae
Fix off-by-one error in ITC Tag read. Remove the switch as we just want to check if index is in valid range rather than test against list of values. Signed-off-by: Leon Alrae --- hw/misc/mips_itu.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/hw/misc/mips_itu.

Re: [Qemu-devel] [PATCH 0/2] acpi: tpm: Fix TPM ACPI description

2016-04-04 Thread Stefan Berger
On 04/04/2016 05:04 AM, Michael S. Tsirkin wrote: On Sun, Apr 03, 2016 at 09:37:54PM -0400, Stefan Berger wrote: This series of patches fixes some problems with the TPM's ACPI description. Could you pls describe how does this interact with Igor's patch? Follow https://bugzilla.redhat.com/atta

Re: [Qemu-devel] [PATCH 2/3] ide: restart atapi dma by re-evaluating command packet

2016-04-04 Thread Pavel Butsykin
On 02.04.2016 00:01, John Snow wrote: On 04/01/2016 10:32 AM, Denis V. Lunev wrote: From: Pavel Butsykin ide_atapi_dma_restart() used to just complete the DMA with an error, under the assumption that there isn't enough information to restart it. However, as the contents of the ->io_buffer i

Re: [Qemu-devel] [PATCH 3/3] ide: really restart pending and in-flight atapi dma

2016-04-04 Thread Pavel Butsykin
On 02.04.2016 01:34, John Snow wrote: On 04/01/2016 10:32 AM, Denis V. Lunev wrote: From: Pavel Butsykin Restart of ATAPI DMA used to be unreachable, because the request to do so wasn't indicated in bus->error_status due to the lack of spare bits, and ide_restart_bh() would return early doin

Re: [Qemu-devel] Should we introduce a TranslationRegion with its own codegen buffer?

2016-04-04 Thread Sergey Fedorov
On 04/04/16 12:01, Paolo Bonzini wrote: > On 04/04/2016 10:54, Alex Bennée wrote: >> Thoughts, objections? Discuss ;-) > I think we're putting a lot of carts before the horse. > > We have like half a dozen subprojects and none are moving because > there's no clear idea of what to do next and why.

Re: [Qemu-devel] efi var store migration assert (bdrv_co_do_pwritev: Assertion `!(bs->open_flags & 0x0800)' failed.)

2016-04-04 Thread Paolo Bonzini
On 01/04/2016 19:58, Dr. David Alan Gilbert wrote: > In the continuing journeys of trying to migrate a q35 guest with ovmf, > I've just hit this assert: > > qemu-system-x86_64: /root/git/qemu/block/io.c:1297: bdrv_co_do_pwritev: > Assertion `!(bs->open_flags & 0x0800)' failed. > > This is just

Re: [Qemu-devel] PR KVM and TM issues

2016-04-04 Thread Anton Blanchard
Hi Alexey, > > I can't get an Ubuntu Wily guest to boot on an Ubuntu Wily host in > > PR KVM mode. The kernel in both cases is 4.2. To reproduce: > > > > wget -N > > https://cloud-images.ubuntu.com/wily/current/wily-server-cloudimg-ppc64el-disk1.img > > > > qemu-system-ppc64 -cpu POWER8 -enable-k

[Qemu-devel] [PATCH] fw_cfg: RQFN rules, documentation

2016-04-04 Thread Michael S. Tsirkin
This requires that all -fw_cfg command line users use names of the form opt/RQFN/: such names are compatible with QEMU 2.4 and 2.5 as well as future QEMU versions. As ability to insert fw_cfg entries in QEMU root is useful for firmware development, add a special prefix: unsupported/root/ that allo

Re: [Qemu-devel] [PATCH] block: forbid x-blockdev-del from acting on DriveInfo

2016-04-04 Thread Kevin Wolf
Am 31.03.2016 um 15:07 hat Paolo Bonzini geschrieben: > Failing on -drive/drive_add created BlockBackends was a > requirement for x-blockdev-del, but it sneaked through > the patch review. Let's fix it now. > > Example: > > $ x86_64-softmmu/qemu-system-x86_64 -drive if=none,file=null-co://,id=nu

Re: [Qemu-devel] [PATCH] acpi: Fix TPM ACPI description to make TPM usable on Windows

2016-04-04 Thread Marcel Apfelbaum
On 03/31/2016 05:07 PM, Igor Mammedov wrote: On Thu, 31 Mar 2016 00:03:57 -0400 Stefan Berger wrote: On 03/30/2016 09:33 AM, Igor Mammedov wrote: On Mon, 21 Mar 2016 10:21:11 -0400 Stefan Berger wrote: This patch addresses BZ 1281413. Fix the APCI description to make it work on Windows ag

[Qemu-devel] [PATCH] tci: Fix build with no '-DNDEBUG'

2016-04-04 Thread Sergey Fedorov
From: Sergey Fedorov assert() always evaluates its argument so there's no need to #ifdef the definitions which is only used for assert(). Actually, doing so generates a compilation warning which is treated as an error in QEMU build by default. Let compiler sort out and eliminate unnecessary local

Re: [Qemu-devel] [PATCH RFC 0/4] ARM SMMUv3 Emulation

2016-04-04 Thread Peter Maydell
On 17 February 2016 at 04:39, Prem Mallappa wrote: > Hi Peter, > > I have access till > "PRD03-GENC-010952 Version 11.0" updated 18/04/15. > > infocenter.arm.com has only SMMUv2 made public > > Please let me know if there is a new version available > - to public. > - through channels, I have to

[Qemu-devel] [PATCH] spapr: Don't set the TM ibm, pa-features bit in PR KVM mode

2016-04-04 Thread Anton Blanchard
We don't support transactional memory in PR KVM, so don't tell the OS that we do. Signed-off-by: Anton Blanchard --- diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index e7be21e..538bd87 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -696,6 +696,12 @@ static void spapr_populate_cpu_dt(CPUStat

[Qemu-devel] [PATCH] powerpc: Clear user CPU feature bits if TM is disabled at runtime

2016-04-04 Thread Anton Blanchard
In check_cpu_pa_features() we check a number of bits in the ibm,pa-features array and set and clear CPU features based on what we find. One of these bits is CPU_FTR_TM, the transactional memory feature bit. If this does disable TM at runtime, then we need to tell userspace about it by clearing the

Re: [Qemu-devel] [PATCH] spapr: Don't set the TM ibm, pa-features bit in PR KVM mode

2016-04-04 Thread Alexander Graf
> Am 04.04.2016 um 13:09 schrieb Anton Blanchard : > > We don't support transactional memory in PR KVM, so don't tell > the OS that we do. > > Signed-off-by: Anton Blanchard > --- > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > index e7be21e..538bd87 100644 > --- a/hw/ppc/spapr.c > +++ b/h

Re: [Qemu-devel] [V8 3/4] hw/core: Add AMD IOMMU to machine properties

2016-04-04 Thread Marcel Apfelbaum
On 04/01/2016 09:39 PM, David Kiarie wrote: Added a bool, subject to review to machine properties which it used to override iommu emulated from Intel to AMD. Hi David, The patch is looking good, thanks. One minor comment below. Signed-off-by: David Kiarie --- hw/core/machine.c | 32

Re: [Qemu-devel] Should we introduce a TranslationRegion with its own codegen buffer?

2016-04-04 Thread Alex Bennée
Sergey Fedorov writes: > On 04/04/16 12:01, Paolo Bonzini wrote: >> On 04/04/2016 10:54, Alex Bennée wrote: >>> Thoughts, objections? Discuss ;-) >> I think we're putting a lot of carts before the horse. It is a very valid objection. I don't want to add another major code change in while gettin

Re: [Qemu-devel] [V8 4/4] hw/pci-host: Emulate AMD IOMMU

2016-04-04 Thread Marcel Apfelbaum
On 04/01/2016 09:39 PM, David Kiarie wrote: Add AMD IOMMU emulation support to q35 chipset Signed-off-by: David Kiarie --- hw/pci-host/q35.c | 21 +++-- include/hw/i386/intel_iommu.h | 1 + 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/hw/pci-h

Re: [Qemu-devel] Should we introduce a TranslationRegion with its own codegen buffer?

2016-04-04 Thread Paolo Bonzini
On 04/04/2016 13:24, Alex Bennée wrote: > FWIW I've dropped the patch that moves tb_find_fast out of tb_lock in > the upcoming base-patches-v2 series because it: > - weirdly breaks the pxe tests I'm happy to take a look. > - is pretty ugly anyway What exactly makes it ugly? Paolo > This

Re: [Qemu-devel] [PATCH 1/2] acpi: tpm: Fix TPM ACPI description (BZ 1281413)

2016-04-04 Thread Igor Mammedov
On Mon, 4 Apr 2016 06:17:38 -0400 Stefan Berger wrote: > On 04/04/2016 05:04 AM, Michael S. Tsirkin wrote: > > On Sun, Apr 03, 2016 at 09:37:55PM -0400, Stefan Berger wrote: > >> This patch addresses BZ 1281413. > >> > >> https://bugzilla.redhat.com/show_bug.cgi?id=1281413 > >> > >> Fix the APCI

Re: [Qemu-devel] [PATCH] tci: Fix build with no '-DNDEBUG'

2016-04-04 Thread Stefan Weil
Am 04.04.2016 um 13:05 schrieb Sergey Fedorov: > From: Sergey Fedorov > > assert() always evaluates its argument so there's no need to #ifdef the > definitions which is only used for assert(). Actually, doing so > generates a compilation warning which is treated as an error in QEMU > build by defa

Re: [Qemu-devel] Should we introduce a TranslationRegion with its own codegen buffer?

2016-04-04 Thread Alex Bennée
Paolo Bonzini writes: > On 04/04/2016 13:24, Alex Bennée wrote: >> FWIW I've dropped the patch that moves tb_find_fast out of tb_lock in >> the upcoming base-patches-v2 series because it: >> - weirdly breaks the pxe tests > > I'm happy to take a look. Be my guest: https://github.com/stsquad/

Re: [Qemu-devel] [PATCH 2/2] acpi: tpm: Get the interrupt the device model is using

2016-04-04 Thread Igor Mammedov
On Sun, 3 Apr 2016 21:37:56 -0400 Stefan Berger wrote: > Get the interrupt the TPM device model is using. Do not activate > the interrupt in the ACPI description yet since the current > default value clashes with other devices. > > Signed-off-by: Stefan Berger > --- > hw/i386/acpi-build.c | 5

Re: [Qemu-devel] [PATCH 0/2] acpi: tpm: Fix TPM ACPI description

2016-04-04 Thread Igor Mammedov
On Mon, 4 Apr 2016 06:31:43 -0400 Stefan Berger wrote: > On 04/04/2016 05:04 AM, Michael S. Tsirkin wrote: > > On Sun, Apr 03, 2016 at 09:37:54PM -0400, Stefan Berger wrote: > >> This series of patches fixes some problems with the TPM's ACPI > >> description. > > Could you pls describe how does t

Re: [Qemu-devel] Should we introduce a TranslationRegion with its own codegen buffer?

2016-04-04 Thread Paolo Bonzini
On 04/04/2016 14:01, Alex Bennée wrote: > > > - is pretty ugly anyway > > > > What exactly makes it ugly? > > Subjective I guess but the use of tb_lock_recursive() and > tb_lock_reset() seem not as clean as they could be. Is this stuff Fred > re-introduced? I think tb_lock_recursive is mine, w

Re: [Qemu-devel] [PULL] slirp updates

2016-04-04 Thread Peter Maydell
On 1 April 2016 at 16:53, Samuel Thibault wrote: > The following changes since commit de1d099a448beb2ec39af4bd9ce4dd6452a18cb5: > > Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault-2' into > staging (2016-04-01 11:15:20 +0100) > > are available in the git repository at: > >

Re: [Qemu-devel] [Qemu-block] [RFC for-2.7 0/1] block/qapi: Add query-block-node-tree

2016-04-04 Thread Stefan Hajnoczi
On Fri, Apr 01, 2016 at 05:30:58PM +0200, Max Reitz wrote: > > Does it still serve its purpose if we warn the user that the > > graph structure can contain little surprises :)? > > As I replied to Berto, I think we can come up with some constraints > about what qemu may do and what it wil

Re: [Qemu-devel] [PATCH] add 1394 OHCI device

2016-04-04 Thread Sameeh Jubran
Hello All, I've tested windows live debugging using the Firewire device and it seems to be good. Test case scenario: Kernel-Mode Debugging over a 1394 as detailed in: https://msdn.microsoft.com/en-us/library/windows/hardware/ff556866(v=vs.85).aspx. Setup: Two separate VMs, both run

Re: [Qemu-devel] [PATCH] ui/cocoa.m: Add support for cdr files

2016-04-04 Thread Peter Maydell
On 30 March 2016 at 17:37, Programmingkid wrote: > Allow the user to select .cdr files in the file open dialog. > > Signed-off-by: John Arbuckle > --- > ui/cocoa.m | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/ui/cocoa.m b/ui/cocoa.m > index 6914714..60a7c07 100644 >

[Qemu-devel] sheepdog's "CoQueue overlapping_queue;"

2016-04-04 Thread Paolo Bonzini
I am curious about why overlapping_queue is required for sheepdog. Overlapping requests have unspecified outcome so the CoQueue is not necessary as long as the server doesn't crash or return an error. Hitoshi, could you clarify this point for me? Thanks, Paolo

Re: [Qemu-devel] [PATCH] fw_cfg: RQFN rules, documentation

2016-04-04 Thread Laszlo Ersek
On 04/04/16 12:51, Michael S. Tsirkin wrote: > This requires that all -fw_cfg command line users use names of the form > opt/RQFN/: such names are compatible with QEMU 2.4 and 2.5 as well as > future QEMU versions. I think "RQFN" is a typo; shouldn't it be RFQDN (reverse fully qualified domain nam

Re: [Qemu-devel] [PATCH RFC 0/4] ARM SMMUv3 Emulation

2016-04-04 Thread Prem Mallappa
Hi Peter, Thanks for following up. I got access to 16.0 version, I dont particularly see any difference in basic functionality. I had been in touch with Edger, We agreed upon making usable code b/w smmuv2 and smmuv3 for now. Currently the code is in working state. I also heard, there has been ta

Re: [Qemu-devel] [PATCH 1/2] softfloat: Enable run-time-configurable meaning of signaling NaN bit

2016-04-04 Thread Aleksandar Markovic
Hello, Richard. I truly appreciate your guidance, it is of tremendous help to me. I plan to address all issues you brought up in this mail in the V2 of my patch series. All is clear to me, except some subtleties regarding initialization of platforms. More specifically, for setting snan bit, I

Re: [Qemu-devel] [PATCH] tci: Fix build with no '-DNDEBUG'

2016-04-04 Thread Sergey Fedorov
On 04/04/16 14:56, Stefan Weil wrote: > Am 04.04.2016 um 13:05 schrieb Sergey Fedorov: >> From: Sergey Fedorov >> >> assert() always evaluates its argument so there's no need to #ifdef the >> definitions which is only used for assert(). Actually, doing so >> generates a compilation warning which i

Re: [Qemu-devel] [Nbd] [PATCH 2/2] NBD proto: add GET_LBA_STATUS extension

2016-04-04 Thread Markus Pargmann
Hi, back from my easter vacation. A bit surprised to find 200 mails in the NBD mailing list ;). On Friday 25 March 2016 09:49:29 Wouter Verhelst wrote: > On Thu, Mar 24, 2016 at 04:08:13PM -0600, Eric Blake wrote: > > On 03/23/2016 08:16 AM, Denis V. Lunev wrote: > > > From: Pavel Borzenkov > >

Re: [Qemu-devel] [Nbd] [PATCH 2/2] NBD proto: add GET_LBA_STATUS extension

2016-04-04 Thread Markus Pargmann
Hi, On Monday 28 March 2016 09:58:52 Eric Blake wrote: > On 03/25/2016 02:49 AM, Wouter Verhelst wrote: > > >> You may also want to add a rule that for all future extensions, any > >> command that requires data in the server response (other than the server > >> response to NBD_CMD_READ) must incl

Re: [Qemu-devel] [PATCH 1/2] softfloat: Enable run-time-configurable meaning of signaling NaN bit

2016-04-04 Thread Peter Maydell
On 4 April 2016 at 14:21, Aleksandar Markovic wrote: > B. arm - explicitely sets other fields of float_status, > explicit invocation of set_snan_bit_is_one(0) added We zero the float_status structs on reset, because they are earlier in the CPUARMState structure than the 'features' field (an

Re: [Qemu-devel] [RFC PATCH v1 1/2] target-arm: Update page size for aarch64

2016-04-04 Thread Peter Maydell
On 4 April 2016 at 14:39, wrote: > From: Vijay > > Set target page size to minimum 4K for aarch64. > This helps to reduce live migration downtime significantly. > > Signed-off-by: Vijaya Kumar K > --- > target-arm/cpu.h |7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/target-

[Qemu-devel] [PATCH v9 01/11] block: keep a list of block jobs

2016-04-04 Thread Alberto Garcia
The current way to obtain the list of existing block jobs is to iterate over all root nodes and check which ones own a job. Since we want to be able to support block jobs in other nodes as well, this patch keeps a list of jobs that is updated every time one is created or destroyed. Signed-off-by:

[Qemu-devel] [PATCH v9 10/11] qemu-iotests: test overlapping block-stream operations

2016-04-04 Thread Alberto Garcia
This test case checks that it's not possible to perform two block-stream operations if there are nodes involved in both. Signed-off-by: Alberto Garcia --- tests/qemu-iotests/030 | 60 ++ tests/qemu-iotests/030.out | 4 ++-- 2 files changed, 62 ins

[Qemu-devel] [PATCH v9 04/11] block: use the block job list in bdrv_close()

2016-04-04 Thread Alberto Garcia
bdrv_close_all() cancels all block jobs by iterating over all BlockDriverStates. This patch simplifies the code by iterating directly over the block jobs using block_job_next(). Signed-off-by: Alberto Garcia --- block.c | 25 ++--- 1 file changed, 6 insertions(+), 19 deletion

[Qemu-devel] [PATCH v9 11/11] qemu-iotests: test non-overlapping block-stream operations

2016-04-04 Thread Alberto Garcia
Even if there are no common nodes involved, we currently don't support several operations at the same time in the same backing chain. Signed-off-by: Alberto Garcia --- tests/qemu-iotests/030 | 21 + tests/qemu-iotests/030.out | 4 ++-- 2 files changed, 23 insertions(+),

[Qemu-devel] [PATCH v9 06/11] block: Support streaming to an intermediate layer

2016-04-04 Thread Alberto Garcia
This makes sure that the image we are steaming into is open in read-write mode during the operation. The block job is created on the destination image, but operation blockers are also set on the active layer. We do this in order to prevent other block jobs from running in parallel in the same chai

[Qemu-devel] [PATCH v9 08/11] docs: Document how to stream to an intermediate layer

2016-04-04 Thread Alberto Garcia
Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz Reviewed-by: Eric Blake --- docs/live-block-ops.txt | 31 --- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/docs/live-block-ops.txt b/docs/live-block-ops.txt index a257087..a05d869 100644 --- a/do

[Qemu-devel] [PATCH for-2.7 v9 00/11] Support streaming to an intermediate layer

2016-04-04 Thread Alberto Garcia
Hi! Half a year later :) here's the new version of the intermediate block streaming patches. Quick summary: the feature was already working since June but there were two problems that made it impossible to merge the patches. Here's the full description: https://lists.gnu.org/archive/html/qemu

[Qemu-devel] [PATCH v9 03/11] block: use the block job list in qmp_query_block_jobs()

2016-04-04 Thread Alberto Garcia
qmp_query_block_jobs() uses bdrv_next() to look for block jobs, but this function can only find those in top-level BlockDriverStates. This patch uses block_job_next() instead. Signed-off-by: Alberto Garcia --- blockdev.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-)

[Qemu-devel] [PATCH v9 09/11] qemu-iotests: test streaming to an intermediate layer

2016-04-04 Thread Alberto Garcia
This adds test_stream_intermediate(), similar to test_stream() but streams to the intermediate image instead. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz --- tests/qemu-iotests/030 | 18 +- tests/qemu-iotests/030.out | 4 ++-- 2 files changed, 19 insertions(+), 3 d

[Qemu-devel] [PATCH v9 07/11] block: Add QMP support for streaming to an intermediate layer

2016-04-04 Thread Alberto Garcia
This patch makes the 'device' parameter of the 'block-stream' command accept a node name as well as a device name. In addition to that, operation blockers will be checked in all intermediate nodes between the top and the base node. Since qmp_block_stream() now uses the error from bdrv_lookup_bs()

[Qemu-devel] [PATCH v9 05/11] block: allow block jobs in any arbitrary node

2016-04-04 Thread Alberto Garcia
Currently, block jobs can only be owned by root nodes. This patch allows block jobs to be in any arbitrary node, by making the following changes: - Block jobs can now be identified by the node name of their BlockDriverState in addition to the device name. Since both device and node names live

[Qemu-devel] [PATCH v9 02/11] block: use the block job list in bdrv_drain_all()

2016-04-04 Thread Alberto Garcia
bdrv_drain_all() pauses all block jobs by using bdrv_next() to iterate over all top-level BlockDriverStates. Therefore the code is unable to find block jobs in other nodes. This patch uses block_job_next() to iterate over all block jobs. Signed-off-by: Alberto Garcia --- block/io.c | 21 +++

Re: [Qemu-devel] [Nbd] [PATCH] doc: Flip bit sense for allowing trim during WRITE_ZEROES

2016-04-04 Thread Eric Blake
On 04/01/2016 03:29 PM, Eric Blake wrote: > Rather than requiring allocation by default and allowing trims > only on request during WRITE_ZEROES, it seems like a better > default is to allow server optimizations by default and require > full allocation by specific request. Since WRITE_ZEROES is >

Re: [Qemu-devel] [PATCH 1/4] target-arm: Correctly reset SCTLR_EL3 for 64-bit CPUs

2016-04-04 Thread Sergey Fedorov
On 31/03/16 17:49, Peter Maydell wrote: > The regdef for SCTRL_EL3 was incorrectly marked as being an > ARM_CP_ALIAS, with the remark that this was because the 32-bit > definition would take care of reset and migration. However the > intention for banked registers as documented in the comment in >

Re: [Qemu-devel] [PATCH 2/4] target-arm: Remove incorrect ALIAS tags from ESR_EL2 and ESR_EL3

2016-04-04 Thread Sergey Fedorov
On 31/03/16 17:49, Peter Maydell wrote: > The regdefs for the ESR_EL2 and ESR_EL3 system registers should not > be marked as ARM_CP_ALIAS, because these are the master copies; the > DFSR regdef in vmsa_pmsa_cp_reginfo[] is marked as an alias. > Remove the ALIAS tags so that these registers are corr

[Qemu-devel] [PATCH] doc: Allow NBD_CMD_FLAG_NO_HOLE during NBD_CMD_WRITE

2016-04-04 Thread Eric Blake
qemu already has an existing server implementation option that will explicitly search the payload of NBD_CMD_WRITE for large blocks of zeroes, and punch holes in the underlying file. For old clients that don't know how to use the new NBD_CMD_WRITE_ZEROES, this is a workaround to keep the server's

  1   2   3   >