Re: [Qemu-devel] [PATCH v1 1/1] S390 pci infrastructure modeling

2015-05-19 Thread Hong Bo Li
On 5/12/2015 17:07, Cornelia Huck wrote: On Tue, 21 Apr 2015 13:29:01 +0800 Hong Bo Li wrote: Sorry, I sent the patch three times by accident. Please take this one as the formal patch. This is a followup to the discussion started by Frank Blaschka: Option 1: s390x/pci: Extend pci represen

Re: [Qemu-devel] [PATCH v5 13/13] block/mirror: Block "device IO" during mirror exit

2015-05-19 Thread Fam Zheng
On Wed, 05/20 08:32, Paolo Bonzini wrote: > > > On 20/05/2015 08:16, Fam Zheng wrote: > > > > static void mirror_exit(BlockJob *job, void *opaque) > > @@ -328,6 +330,8 @@ static void mirror_exit(BlockJob *job, void *opaque) > > MirrorExitData *data = opaque; > > AioContext *replace_a

Re: [Qemu-devel] [Qemu-block] [PATCH v3 00/13] main-loop: Get rid of fd_read_poll and qemu_set_fd_handler2

2015-05-19 Thread Fam Zheng
On Wed, 05/20 08:26, Paolo Bonzini wrote: > > > On 19/05/2015 17:02, Stefan Hajnoczi wrote: > > 1. Convert everything like you converted qemu-nbd.c. This is a > > conservative approach and we can be confident that behavior is > > unchanged. > > So, that means whenever you change receive_disab

[Qemu-devel] [RFC] Can we convert UTC time to local time in Qemu

2015-05-19 Thread Gonglei (Arei)
Hi, At present, Qemu use g_time_val_to_iso8601() to get the UTC added to error_report() (commit 5e2ac5191), TBH this way is very simply, we just need invoke standard glib functions to complete the job. But in the cloud computing and data center scenarios, there are many Other open source compo

Re: [Qemu-devel] [PATCH v5 13/13] block/mirror: Block "device IO" during mirror exit

2015-05-19 Thread Paolo Bonzini
On 20/05/2015 08:16, Fam Zheng wrote: > > static void mirror_exit(BlockJob *job, void *opaque) > @@ -328,6 +330,8 @@ static void mirror_exit(BlockJob *job, void *opaque) > MirrorExitData *data = opaque; > AioContext *replace_aio_context = NULL; > > +bdrv_op_unblock(s->common.bs

Re: [Qemu-devel] [Qemu-block] [PATCH v3 00/13] main-loop: Get rid of fd_read_poll and qemu_set_fd_handler2

2015-05-19 Thread Paolo Bonzini
On 19/05/2015 17:02, Stefan Hajnoczi wrote: > 1. Convert everything like you converted qemu-nbd.c. This is a > conservative approach and we can be confident that behavior is > unchanged. So, that means whenever you change receive_disabled you call a new callback on the peer? In addition, whe

[Qemu-devel] [PATCH v5 08/13] blockdev: Block device IO during internal snapshot transaction

2015-05-19 Thread Fam Zheng
Signed-off-by: Fam Zheng --- blockdev.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/blockdev.c b/blockdev.c index 5eaf77e..7f763d9 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1262,6 +1262,7 @@ typedef struct InternalSnapshotState { BlockDriverState *bs;

[Qemu-devel] [PATCH v5 12/13] block: Block "device IO" during bdrv_drain and bdrv_drain_all

2015-05-19 Thread Fam Zheng
We don't want new requests from guest, so block the operation around the nested poll. It also avoids looping forever when iothread is submitting a lot of requests. Signed-off-by: Fam Zheng --- block/io.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a

[Qemu-devel] [PATCH v5 09/13] blockdev: Block device IO during external snapshot transaction

2015-05-19 Thread Fam Zheng
Signed-off-by: Fam Zheng --- blockdev.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/blockdev.c b/blockdev.c index 7f763d9..923fc90 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1404,6 +1404,7 @@ typedef struct ExternalSnapshotState { BlockDriverStat

[Qemu-devel] [PATCH v5 07/13] nbd-server: Clear "can_read" when "device io" blocker is set

2015-05-19 Thread Fam Zheng
So that NBD export cannot submit IO during bdrv_drain_all(). Signed-off-by: Fam Zheng --- nbd.c | 24 1 file changed, 24 insertions(+) diff --git a/nbd.c b/nbd.c index 06b501b..b5026af 100644 --- a/nbd.c +++ b/nbd.c @@ -160,6 +160,8 @@ struct NBDExport { uint32_t n

[Qemu-devel] [PATCH v5 03/13] block-backend: Add blk_op_blocker_add_notifier

2015-05-19 Thread Fam Zheng
Forward the call to bdrv_op_blocker_add_notifier. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- block/block-backend.c | 6 ++ include/sysemu/block-backend.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/block/block-backend.c b/block/block-backend.c index 93e46f3..16e

[Qemu-devel] [PATCH v5 06/13] virtio-scsi-dataplane: Add "device IO" op blocker listener

2015-05-19 Thread Fam Zheng
When a disk is attached to scsi-bus, virtio_scsi_hotplug will take care of protecting the block device with op blockers. Currently we haven't enabled block jobs (like what's done in virtio_blk_data_plane_create), but it is necessary to honor "device IO" op blocker first before we do. This is useful

[Qemu-devel] [PATCH v5 13/13] block/mirror: Block "device IO" during mirror exit

2015-05-19 Thread Fam Zheng
When mirror should complete, the source and target are in sync. But we call bdrv_swap() only a while later in the main loop bh. If the guest writes something before that, target will not get the new data. Block "device IO" before bdrv_drain and unblock it after bdrw_swap(). Reported-by: Wen Cong

[Qemu-devel] [PATCH v5 11/13] blockdev: Block device IO during blockdev-backup transaction

2015-05-19 Thread Fam Zheng
Signed-off-by: Fam Zheng --- blockdev.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index ae52d27..bd28183 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1649,6 +1649,7 @@ typedef struct BlockdevBackupState { BlockDriverState *bs;

[Qemu-devel] [PATCH v5 02/13] block: Add op blocker notifier list

2015-05-19 Thread Fam Zheng
BDS users can register a notifier and get notified about op blocker changes. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- block.c | 35 +++ include/block/block.h | 8 include/block/block_int.h | 3 +++ 3 files changed, 46 i

[Qemu-devel] [PATCH v5 05/13] virtio-blk: Don't handle output when there is "device IO" op blocker

2015-05-19 Thread Fam Zheng
virtio-blk now listens to op blocker change of the associated block backend. Up on setting op blocker on BLOCK_OP_TYPE_DEVICE_IO: non-dataplane: 1) Set VirtIOBlock.paused 2) In virtio_blk_handle_output, do nothing if VirtIOBlock.paused dataplane: 1) Clear the host event notifier

[Qemu-devel] [PATCH v5 10/13] blockdev: Block device IO during drive-backup transaction

2015-05-19 Thread Fam Zheng
Signed-off-by: Fam Zheng --- blockdev.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index 923fc90..ae52d27 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1575,6 +1575,7 @@ typedef struct DriveBackupState { BlockDriverState *bs; AioCo

[Qemu-devel] [PATCH v5 01/13] block: Add op blocker type "device IO"

2015-05-19 Thread Fam Zheng
It blocks device IO. All bdrv_op_block_all/blk_op_block_all callers are taken care of: - virtio_blk_data_plane_create - virtio_scsi_hotplug Device creation, unblock it. - bdrv_set_backing_hd Backing hd is not used by device, so blocking is OK. - backup_start Blocking target when backup

[Qemu-devel] [PATCH v5 04/13] virtio-blk: Move complete_request to 'ops' structure

2015-05-19 Thread Fam Zheng
Should more ops be added to differentiate code between dataplane and non-dataplane, the new saved_ops approach will be cleaner than messing with N pointers. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- hw/block/dataplane/virtio-blk.c | 13 - hw/block/virtio-blk.c |

[Qemu-devel] [PATCH v5 00/13] Fix transactional snapshot with dataplane and NBD export

2015-05-19 Thread Fam Zheng
v5: Patch 13: set blocker before bdrv_drain(). v4: virtio-scsi-dataplane: Use assert in ctrl/event queue handler. [Paolo] Protect mirror complete in new patch 13. [Wen] Add Max's rev-by in 02, 03, 04. Fix 05, 06 per Max's comments. Reported by Paolo. Unlike the iohandler in main loop

[Qemu-devel] [RESEND PATCH v7 20/23] hw/acpi/aml-build: Add Unicode macro

2015-05-19 Thread Shannon Zhao
From: Shannon Zhao Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/acpi/aml-build.c | 17 + include/hw/acpi/aml-build.h | 1 + 2 files changed, 18 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 9a80b80..aa34d0a 100644 --- a/h

[Qemu-devel] [RESEND PATCH v7 22/23] ACPI: split CONFIG_ACPI into 4 pieces

2015-05-19 Thread Shannon Zhao
From: Shannon Zhao As core.c, piix4.c, ich9.c and pcihp.c are for x86, add CONFIG_ACPI_X86 to make it only for x86. ARM doesn't support cpu and memory hotplug, add CONFIG_ACPI_CPU_HOTPLUG and CONFIG_ACPI_MEMORY_HOTPLUG to exclude them for target-arm. Signed-off-by: Shannon Zhao Signed-off-by: S

[Qemu-devel] migration network requirements

2015-05-19 Thread Alexey Kardashevskiy
Hi! Recent bugreports from our testers at IBM about failed migration across USA (for example, from NY to TX) made me wonder - what are the actual basic requirements/expectations for migration? In what network is it normally tested (I use 1Gb/10Gb local network without routers)? Is there an

Re: [Qemu-devel] [Qemu-block] [PATCH v3 00/13] main-loop: Get rid of fd_read_poll and qemu_set_fd_handler2

2015-05-19 Thread Fam Zheng
On Tue, 05/19 16:02, Stefan Hajnoczi wrote: > On Tue, May 19, 2015 at 10:50:57AM +, Fam Zheng wrote: > > v3: Replace previous 13 with a simple return type conversion patch. > > Drop RFC. > > > > This carries out the mandate in the comment of qemu_set_fd_handler2 and > > removes > > fd_rea

[Qemu-devel] [RESEND PATCH 14/23] hw/acpi/aml-build: Add ToUUID macro

2015-05-19 Thread Shannon Zhao
From: Shannon Zhao Add ToUUID macro, this is useful for generating PCIe ACPI table. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao Reviewed-by: Igor Mammedov --- hw/acpi/aml-build.c | 112 include/hw/acpi/aml-build.h | 1 + 2 fi

[Qemu-devel] [RESEND PATCH 05/23] hw/acpi/aml-build: Add aml_interrupt() term

2015-05-19 Thread Shannon Zhao
From: Shannon Zhao Add aml_interrupt() for describing device interrupt in resource template. These can be used to generating DSDT table for ACPI on ARM. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/acpi/aml-build.c | 22 ++ include/hw/acpi/aml-bui

Re: [Qemu-devel] [PATCH v6 05/22] hw/acpi/aml-build: Add aml_interrupt() term

2015-05-19 Thread Shannon Zhao
On 2015/5/19 20:09, Igor Mammedov wrote: >> > Also, enum values must all be formatted like this: >> >UPPER_CASE > may be better not, for consistency with the rest of enums in this header. > Will add another patch to fix the enums of this header firstly. -- Shannon

[Qemu-devel] [PATCH 1/2] ich9: add TCO interface emulation

2015-05-19 Thread Paulo Alcantara
This interface is provides some registers within a 32-byte range and can be accessed through PCI-to-LPC bridge interface (PMBASE + 0x60). It's commonly used as a watchdog timer to detect system lockups through SMIs that are generated by it (if TCO_EN bit is enabled) on every timeout and then givin

Re: [Qemu-devel] [RFC v7 11/11] vfio: add 'aer' property to expose aercap

2015-05-19 Thread Chen Fan
On 05/20/2015 03:34 AM, Alex Williamson wrote: On Tue, 2015-05-19 at 12:42 +0800, Chen Fan wrote: add 'aer' property to let user able to decide whether expose the aer capability. by default we should disable aer feature, because it needs configuration restrictions. But the previous patch alrea

[Qemu-devel] [PATCH 2/2] tests: add testcase for TCO watchdog emulation

2015-05-19 Thread Paulo Alcantara
Signed-off-by: Paulo Alcantara --- tests/Makefile | 2 + tests/tco-test.c | 252 +++ 2 files changed, 254 insertions(+) create mode 100644 tests/tco-test.c diff --git a/tests/Makefile b/tests/Makefile index 729b969..43950d0 100644 --- a/te

Re: [Qemu-devel] [PATCH 00/23] userfaultfd v4

2015-05-19 Thread Richard Weinberger
On Tue, May 19, 2015 at 11:38 PM, Andrew Morton wrote: > On Thu, 14 May 2015 19:30:57 +0200 Andrea Arcangeli > wrote: > >> This is the latest userfaultfd patchset against mm-v4.1-rc3 >> 2015-05-14-10:04. > > It would be useful to have some userfaultfd testcases in > tools/testing/selftests/. Pa

Re: [Qemu-devel] [PATCH v4 4/4] spapr_pci: populate ibm,loc-code

2015-05-19 Thread Nikunj A Dadhania
Alexander Graf writes: > On 05/19/2015 11:58 AM, Nikunj A Dadhania wrote: >> Alexey Kardashevskiy writes: >> >>> On 05/19/2015 06:14 PM, Nikunj A Dadhania wrote: Alexey Kardashevskiy writes: > On 05/19/2015 04:56 PM, Nikunj A Dadhania wrote: >> Alexey Kardashevskiy writes: >>

[Qemu-devel] [PATCH v2 4/4] qmp/hmp: add rocker device support

2015-05-19 Thread sfeldma
From: Scott Feldman v2: Address review comments from Stefan Hajnoczi: - Add missing qapi/rocker.json file. - Use PRIx64 for print uint64 value - when CONFIG_ROCKER is not defined, build qmp-norocker.o stub using hw/net/Makefile.objs rather than in the top-level Makefile.target Change qap

[Qemu-devel] [PATCH v2 1/4] rocker: Add support for phys name

2015-05-19 Thread sfeldma
From: David Ahern v2: Review comment from Stefan Hajnoczi: - use private ROCKER_IFNAMSIZ = 16 to avoid breaking Windows build as Windows does not include v1: Add ROCKER_TLV_CMD_PORT_SETTINGS_PHYS_NAME to port settings. This attribute exports the port name to the guest OS allowing it to n

[Qemu-devel] [PATCH v2 0/4] rocker device updates

2015-05-19 Thread sfeldma
From: Scott Feldman v2: Address some review comments by Stefan Hajnoczi: see individual patches for v1->v2 changes. v1: Some rocker device updates we've been holding onto waiting for base rocker device to be pulled into 2.4. David added support for the device to return the physical port name,

[Qemu-devel] [PATCH v2 3/4] rocker: bring link up/down on PHY enable/disable

2015-05-19 Thread sfeldma
From: Scott Feldman When the OS driver enables/disables the port, go ahead and set the port's link status to up/down in response to the change. This more closely emulates real hardware when the PHY for the port is brought up/down and the PHY negotiates carrier (link status) with link partner. I

[Qemu-devel] [PATCH v2 2/4] rocker: update tests using hw-derived interface names

2015-05-19 Thread sfeldma
From: Scott Feldman With previous patch to support phy name attribute for each port, the OS can name port interfaces using the hw-derived name. So update rocker tests to use the new hw-derived interface names. Signed-off-by: Scott Feldman Reviewed-by: Stefan Hajnoczi --- tests/rocker/bridge

[Qemu-devel] [PATCH v6 3/4] cpu/apic: drop icc bus/bridge

2015-05-19 Thread Zhu Guihua
From: Chen Fan After CPU hotplug has been converted to BUS-less hot-plug infrastructure, the only function ICC bus performs is to propagate reset to LAPICs. However LAPIC could be reset by its parent (CPU) directly when CPU is being reset. Do so and drop ~200LOC of not needed anymore ICCBus relat

[Qemu-devel] [PATCH v6 0/4] remove icc bus/bridge

2015-05-19 Thread Zhu Guihua
ICC Bus was used for providing a hotpluggable bus for APIC and CPU, but now we use HotplugHandler to make hotplug. So ICC Bus is unnecessary. This code has passed the new pc-cpu-test. And I have tested with kvm along with kernel_irqchip=on/off, it works fine. This patch series is rebased on Eduar

[Qemu-devel] [PATCH v6 4/4] icc_bus: drop the unused files

2015-05-19 Thread Zhu Guihua
ICC bus impl has been droped, so all icc related files are not useful any more; delete them. Signed-off-by: Zhu Guihua --- default-configs/i386-softmmu.mak | 1 - default-configs/x86_64-softmmu.mak | 1 - hw/cpu/Makefile.objs | 1 - hw/cpu/icc_bus.c | 118

[Qemu-devel] [PATCH v6 2/4] apic: convert ->busdev.qdev casts to C casts

2015-05-19 Thread Zhu Guihua
Use C casts to avoid accessing ICCDevice's qdev field directly. Signed-off-by: Zhu Guihua --- hw/intc/apic.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/intc/apic.c b/hw/intc/apic.c index 0f97b47..77b639c 100644 --- a/hw/intc/apic.c +++ b/hw/intc/apic.c @@ -37

[Qemu-devel] [PATCH v6 1/4] apic: map APIC's MMIO region at each CPU's address space

2015-05-19 Thread Zhu Guihua
From: Chen Fan Replace mapping APIC at global system address space with mapping it at per-CPU address spaces. Signed-off-by: Chen Fan Signed-off-by: Zhu Guihua --- exec.c| 5 + hw/i386/pc.c | 7 --- hw/intc/apic_common.c | 14 -- include/exec/mem

Re: [Qemu-devel] [PATCH v4 13/13] block/mirror: Block "device IO" during mirror exit

2015-05-19 Thread Fam Zheng
On Tue, 05/19 12:57, Paolo Bonzini wrote: > > > On 19/05/2015 20:37, Fam Zheng wrote: > > On Tue, 05/19 10:49, Paolo Bonzini wrote: > >> > >> > >> On 19/05/2015 18:48, Fam Zheng wrote: > > > > This is too late. As a rule, the blocker must be established before > > calling bdrv_drain,

[Qemu-devel] [PATCH] hw/pci-bridge: Report an error when msi init fails

2015-05-19 Thread shannon . zhao
From: Shannon Zhao Notice user the reason for device initialization failure. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/pci-bridge/ioh3420.c| 2 ++ hw/pci-bridge/pci_bridge_dev.c | 2 ++ hw/pci-bridge/xio3130_downstream.c | 2 ++ hw/pci-bridge/xio3130_upstr

Re: [Qemu-devel] [PATCH 0/3] virtio-balloon: use alias property

2015-05-19 Thread Shannon Zhao
Ping... Have any maintainer picked up these patches? On 2015/5/11 17:34, shannon.z...@linaro.org wrote: > From: Shannon Zhao > > The wrappers of virtio-balloon are using object_property_add to add > properties and all have their own getters/setters which are duplicate of > those in virtio-ballo

Re: [Qemu-devel] [PATCH 0/6] Blank property cleanup

2015-05-19 Thread Shannon Zhao
Ping... On 2015/5/12 10:25, shannon.z...@linaro.org wrote: > From: Shannon Zhao > > After [1]"s390-virtio: use common features" and [2]"virtio: Move host > features to backends" applied, there are some Property arrays which only > contain the list terminator DEFINE_PROP_END_OF_LIST. This patchse

[Qemu-devel] GSoC 2015 (Mac OS 9 support) report, week 3

2015-05-19 Thread Alexander Graf
[This Week] - Investigate MOL device tree further - There is also an interesting dump of what seems to be a MOL tree at http://josejx.net/mol/mol-stable/mollib/oftrees/oftree.nw.old (which has a commented out entry for "AAPL,debug" set to -1). The interesting parts I see he

[Qemu-devel] [Bug 1456819] [NEW] OVMF, Hyper-V, virtio, Win7 incompatibility

2015-05-19 Thread Alex Williamson
Public bug reported: Host kernel: v4.1-rc4 QEMU: qemu.git tag v2.3.0 OVMF: edk2.git-ovmf-x64-0-20150518.b1004.g54ae9c0.noarch libvirt: 1.2.13.1-1.fc21.x86_64 Guest: en_windows_7_professional_with_sp1_x64_dvd_u_676939.iso If I attempt to use the above software versions to start a VM install, I hit

[Qemu-devel] [Bug 1456819] Re: OVMF, Hyper-V, virtio incompatibility

2015-05-19 Thread Alex Williamson
The problem also does not occur using OVMF with Windows 8.1 install media: en_windows_8.1_n_with_update_x64_dvd_4065114.iso ** Summary changed: - OVMF, Hyper-V, virtio incompatibility + OVMF, Hyper-V, virtio, Win7 incompatibility -- You received this bug notification because you are a member of

Re: [Qemu-devel] [PATCH v4 06/11] block: add refcount to Job object

2015-05-19 Thread John Snow
On 05/18/2015 11:45 AM, Stefan Hajnoczi wrote: > On Mon, May 11, 2015 at 07:04:21PM -0400, John Snow wrote: >> If we want to get at the job after the life of the job, >> we'll need a refcount for this object. >> >> This may occur for example if we wish to inspect the actions >> taken by a particu

Re: [Qemu-devel] [PATCH 00/23] userfaultfd v4

2015-05-19 Thread Andrew Morton
On Thu, 14 May 2015 19:30:57 +0200 Andrea Arcangeli wrote: > This is the latest userfaultfd patchset against mm-v4.1-rc3 > 2015-05-14-10:04. It would be useful to have some userfaultfd testcases in tools/testing/selftests/. Partly as an aid to arch maintainers when enabling this. And also as a

[Qemu-devel] [Bug 1456804] [NEW] kvm_irqchip_commit_routes: Assertion `ret == 0' failed.

2015-05-19 Thread Alex Williamson
Public bug reported: During win8.1 boot on qemu.git eba05e922e8e7f307bc5d4104a78797e55124e97, kernel 4.1-rc4, I get the following assert: qemu-system-x86_64: /net/gimli/home/alwillia/Work/qemu.git/kvm- all.c:1033: kvm_irqchip_commit_routes: Assertion `ret == 0' failed. Bisected to: commit 851c2

Re: [Qemu-devel] [PATCH] qapi: add dirty bitmap status

2015-05-19 Thread John Snow
On 05/12/2015 04:06 PM, Eric Blake wrote: > On 05/12/2015 01:53 PM, John Snow wrote: >> Bitmaps can be in a handful of different states with potentially >> more to come as we tool around with migration and persistence patches. >> >> Instead of having a bunch of boolean fields, it was suggested th

Re: [Qemu-devel] [RFC 0/2] macio: split out unaligned DMA access into separate functions

2015-05-19 Thread Mark Cave-Ayland
On 19/05/15 22:01, John Snow wrote: >> Thanks John. Even though you haven't managed to figure out the problem >> the patchset attempts to solve, were you at least able to reproduce the >> image corruption locally? >> >> That said, the patchset is still worth including just for the fact that >> it

Re: [Qemu-devel] [PATCH 0/1] ahci: do not remap clb/fis unconditionally

2015-05-19 Thread John Snow
On 05/18/2015 05:57 AM, Stefan Hajnoczi wrote: > On Tue, May 12, 2015 at 06:36:12PM -0400, John Snow wrote: >> This continues the IOMMU fix from 2.3, where we should not >> attempt to remap the CLB or FIS RX buffers if the AHCI device is >> currently running. >> >> The same applies to migration:

Re: [Qemu-devel] [RFC 0/2] macio: split out unaligned DMA access into separate functions

2015-05-19 Thread John Snow
On 05/19/2015 04:50 PM, Mark Cave-Ayland wrote: > On 18/05/15 20:54, John Snow wrote: > >> On 03/09/2015 06:24 PM, Mark Cave-Ayland wrote: >>> This patchset attempts to separate out the IDE/ATAPI logic from the >>> unaligned >>> DMA access logic for macio which provides the following benefits:

Re: [Qemu-devel] [PATCH 3/8] fdc: Introduce fdctrl->phase

2015-05-19 Thread Peter Maydell
On 19 May 2015 at 21:52, John Snow wrote: > Hmm, I think this is not purely derived state because the flags are not > necessarily sufficient for regenerating that state. Yeah, if there's genuinely an underlying state machine that's not completely visible in registers you need to actually model it

Re: [Qemu-devel] openbios.git mirror on git.qemu.org

2015-05-19 Thread Peter Maydell
On 19 May 2015 at 21:47, Mark Cave-Ayland wrote: > On 19/05/15 13:55, Andreas Färber wrote: > >> Am 19.05.2015 um 12:42 schrieb Stefan Hajnoczi: >>> Ping. Should we stick with an old mirror of OpenBIOS for QEMU 2.4 or >>> switch to the official upstream repo? >> >> I don't quite understand the qu

Re: [Qemu-devel] [PATCH 3/8] fdc: Introduce fdctrl->phase

2015-05-19 Thread John Snow
On 05/19/2015 04:44 PM, Peter Maydell wrote: > On 19 May 2015 at 16:35, Kevin Wolf wrote: >> The floppy controller spec describes three different controller phases, >> which are currently not explicitly modelled in our emulation. Instead, >> each phase is represented by a combination of flags in

Re: [Qemu-devel] [PATCH 4/8] fdc: Use phase in fdctrl_write_data()

2015-05-19 Thread Peter Maydell
On 19 May 2015 at 16:35, Kevin Wolf wrote: > Instead of relying on a flag in the MSR to distinguish controller phases, > use the explicit phase that we store now. Assertions of the right MSR > flags are added. > > Signed-off-by: Kevin Wolf > --- > hw/block/fdc.c | 67 > +

Re: [Qemu-devel] [RFC 0/2] macio: split out unaligned DMA access into separate functions

2015-05-19 Thread Mark Cave-Ayland
On 18/05/15 20:54, John Snow wrote: > On 03/09/2015 06:24 PM, Mark Cave-Ayland wrote: >> This patchset attempts to separate out the IDE/ATAPI logic from the unaligned >> DMA access logic for macio which provides the following benefits: >> >> 1) Reduced code complexity >> >> The existing macio IDE/

Re: [Qemu-devel] openbios.git mirror on git.qemu.org

2015-05-19 Thread Mark Cave-Ayland
On 19/05/15 13:55, Andreas Färber wrote: > Am 19.05.2015 um 12:42 schrieb Stefan Hajnoczi: >> On Fri, May 08, 2015 at 12:32:59PM +0100, Mark Cave-Ayland wrote: >>> I noticed last week that the openbios.git mirror on git.qemu.org hadn't >>> been updated after a commit I made to SVN trunk, and after

Re: [Qemu-devel] [PATCH 3/8] fdc: Introduce fdctrl->phase

2015-05-19 Thread Peter Maydell
On 19 May 2015 at 16:35, Kevin Wolf wrote: > The floppy controller spec describes three different controller phases, > which are currently not explicitly modelled in our emulation. Instead, > each phase is represented by a combination of flags in registers. > > This patch makes explicit in which p

Re: [Qemu-devel] [PATCH 7/8] fdc: Fix MSR.RQM flag

2015-05-19 Thread John Snow
On 05/19/2015 11:36 AM, Kevin Wolf wrote: > The RQM bit in MSR should be set whenever the guest is supposed to > access the FIFO, and it should be cleared in all other cases. This is > important so the guest can't continue writing/reading the FIFO beyond > the length that it's suppossed to access

Re: [Qemu-devel] [PATCH 8/8] fdc-test: Test state for existing cases more thoroughly

2015-05-19 Thread John Snow
On 05/19/2015 11:36 AM, Kevin Wolf wrote: > This just adds a few additional checks of the MSR and interrupt pin to > the already existing test cases. > > Signed-off-by: Kevin Wolf > --- > tests/fdc-test.c | 34 ++ > 1 file changed, 34 insertions(+) > > diff --g

Re: [Qemu-devel] [PATCH 6/8] fdc: Disentangle phases in fdctrl_read_data()

2015-05-19 Thread John Snow
On 05/19/2015 11:36 AM, Kevin Wolf wrote: > This commit makes similar improvements as have already been made to the > write function: Instead of relying on a flag in the MSR to distinguish > controller phases, use the explicit phase that we store now. Assertions > of the right MSR flags are added

Re: [Qemu-devel] [PATCH 5/8] fdc: Code cleanup in fdctrl_write_data()

2015-05-19 Thread John Snow
On 05/19/2015 11:35 AM, Kevin Wolf wrote: > Factor out a few common lines of code, reformat, improve comments. > > Signed-off-by: Kevin Wolf > --- > hw/block/fdc.c | 62 > +++--- > 1 file changed, 38 insertions(+), 24 deletions(-) > > diff

Re: [Qemu-devel] [PATCH 4/8] fdc: Use phase in fdctrl_write_data()

2015-05-19 Thread John Snow
On 05/19/2015 11:35 AM, Kevin Wolf wrote: > Instead of relying on a flag in the MSR to distinguish controller phases, > use the explicit phase that we store now. Assertions of the right MSR > flags are added. > > Signed-off-by: Kevin Wolf > --- > hw/block/fdc.c | 67 >

Re: [Qemu-devel] [PATCH 3/8] fdc: Introduce fdctrl->phase

2015-05-19 Thread John Snow
On 05/19/2015 11:35 AM, Kevin Wolf wrote: > The floppy controller spec describes three different controller phases, > which are currently not explicitly modelled in our emulation. Instead, > each phase is represented by a combination of flags in registers. > > This patch makes explicit in which

Re: [Qemu-devel] [PATCH 1/8] fdc: Rename fdctrl_reset_fifo() to fdctrl_to_command_phase()

2015-05-19 Thread John Snow
On 05/19/2015 11:35 AM, Kevin Wolf wrote: > What all callers of fdctrl_reset_fifo() really want to do is to start > the command phase, where writes to the data port initiate a new command. > > The function doesn't only clear the FIFO, but also sets up the state so > that a new command can be rec

Re: [Qemu-devel] [PATCH 2/8] fdc: Rename fdctrl_set_fifo() to fdctrl_to_result_phase()

2015-05-19 Thread John Snow
On 05/19/2015 11:35 AM, Kevin Wolf wrote: > What callers really do with this function is to switch from execution > phase (including data transfers) to result phase where the guest can > read out one or more status bytes from the FIFO (the number depends on > the command). > > Rename the functio

Re: [Qemu-devel] [PATCH 0/8] fdc: Clean up and fix command processing

2015-05-19 Thread John Snow
On 05/19/2015 11:35 AM, Kevin Wolf wrote: > This series fixes the real bug that caused CVE-2015-3456, and does some > cleanup in the FIFO access functions to make the command processing more > obvious. > > Kevin Wolf (8): > fdc: Rename fdctrl_reset_fifo() to fdctrl_to_command_phase() > fdc:

[Qemu-devel] [PATCH] virtio: Notice when the system doesn't support MSIx at all

2015-05-19 Thread Richard Henderson
And do not issue an error_report in that case. Signed-off-by: Richard Henderson --- hw/virtio/virtio-pci.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) -- This seems to be about the only sane way to test the value of msi_supported from here. Thoughts? r~ diff --g

Re: [Qemu-devel] virtio-pci msix error

2015-05-19 Thread Peter Maydell
On 19 May 2015 at 20:16, Michael S. Tsirkin wrote: > On Tue, May 19, 2015 at 08:54:36AM -0700, Richard Henderson wrote: >> Re patch c7ff5482. What's the point of this error? >> It's going to always appear for older targets that >> predate such new fangled things as msix. >> >> Obviously the patch

Re: [Qemu-devel] [RFC v7 01/11] vfio: extract vfio_get_hot_reset_info as a single function

2015-05-19 Thread Alex Williamson
On Tue, 2015-05-19 at 12:42 +0800, Chen Fan wrote: > the function is used to get affected devices by bus reset. > so here extract it, and can used for aer soon. > > Signed-off-by: Chen Fan > --- > hw/vfio/pci.c | 63 > +++ > 1 file changed

Re: [Qemu-devel] [RFC v7 04/11] vfio: add check host bus reset is support or not

2015-05-19 Thread Alex Williamson
On Tue, 2015-05-19 at 12:42 +0800, Chen Fan wrote: > when machine is done, we should check the all vfio devices > whether support host bus reset, then when need virtual secondary > bus reset, we should reset host bus. > > Signed-off-by: Chen Fan > --- > hw/vfio/pci.c | 83 >

Re: [Qemu-devel] [RFC v7 11/11] vfio: add 'aer' property to expose aercap

2015-05-19 Thread Alex Williamson
On Tue, 2015-05-19 at 12:42 +0800, Chen Fan wrote: > add 'aer' property to let user able to decide whether expose > the aer capability. by default we should disable aer feature, > because it needs configuration restrictions. But the previous patch already enabled it, so a bisect might get it enabl

Re: [Qemu-devel] [RFC v7 03/11] qdev: add bus reset_notifiers callbacks for host bus reset

2015-05-19 Thread Alex Williamson
On Tue, 2015-05-19 at 12:42 +0800, Chen Fan wrote: > Particularly, For vfio device, Once need to recovery devices > by bus reset such as AER, we always need to reset the host bus > to recovery the devices under the bus, so we need to add pci bus > callbacks to specify to do host bus reset. > > Sig

Re: [Qemu-devel] [RFC v7 05/11] vfio: do hot bus reset when do virtual secondary bus reset

2015-05-19 Thread Alex Williamson
On Tue, 2015-05-19 at 12:42 +0800, Chen Fan wrote: > when do virtual secondary bus reset, the vfio device under > this bus need to do host bus reset to reset the device. > so add this case. > > Signed-off-by: Chen Fan > --- > hw/vfio/pci.c | 12 +++- > include/hw/vfio/vfi

Re: [Qemu-devel] virtio-pci msix error

2015-05-19 Thread Michael S. Tsirkin
On Tue, May 19, 2015 at 08:54:36AM -0700, Richard Henderson wrote: > Re patch c7ff5482. What's the point of this error? > It's going to always appear for older targets that > predate such new fangled things as msix. > > Obviously the patch has been there a while, and it's > not actually causing a

Re: [Qemu-devel] [PATCH 11/31] qom: add object_property_add_const_link

2015-05-19 Thread Eduardo Habkost
On Mon, May 11, 2015 at 03:48:57PM +0200, Paolo Bonzini wrote: > Suggested-by: Eduardo Habkost > Signed-off-by: Paolo Bonzini Assuming that the whitespace warning Laszlo pointed out will be fixed: Reviewed-by: Eduardo Habkost -- Eduardo

Re: [Qemu-devel] [PATCH 08/10] Rework ram block hash

2015-05-19 Thread Dr. David Alan Gilbert
* Michael R. Hines (mrhi...@linux.vnet.ibm.com) wrote: > On 05/19/2015 01:55 PM, Dr. David Alan Gilbert wrote: > >>I would like to keep the ramblock list directly addressable by hash > >>on both sides, because, as I mentioned earlier, we want as much > >>flexibility in registering RAMBlock memory a

Re: [Qemu-devel] [PATCH 08/10] Rework ram block hash

2015-05-19 Thread Michael R. Hines
On 05/19/2015 01:55 PM, Dr. David Alan Gilbert wrote: I would like to keep the ramblock list directly addressable by hash on both sides, because, as I mentioned earlier, we want as much flexibility in registering RAMBlock memory as possible by being able to add or delete arbitrary blocks int the

Re: [Qemu-devel] [PATCH 04/10] Translate offsets to destination address space

2015-05-19 Thread Dr. David Alan Gilbert
* Michael R. Hines (mrhi...@linux.vnet.ibm.com) wrote: > On 05/19/2015 01:44 PM, Dr. David Alan Gilbert wrote: > >* Michael R. Hines (mrhi...@linux.vnet.ibm.com) wrote: > >>On 04/20/2015 10:57 AM, Dr. David Alan Gilbert (git) wrote: > >>>From: "Dr. David Alan Gilbert" > >>> > >>>The 'offset' field

Re: [Qemu-devel] [PATCH 08/10] Rework ram block hash

2015-05-19 Thread Dr. David Alan Gilbert
* Michael R. Hines (mrhi...@linux.vnet.ibm.com) wrote: > On 04/20/2015 10:57 AM, Dr. David Alan Gilbert (git) wrote: > >From: "Dr. David Alan Gilbert" > > > >RDMA uses a hash from block offset->RAM Block; this isn't needed > >on the destination, and now that the destination sorts the ramblock > >l

[Qemu-devel] [PATCH 00/14] Various EL3 support/cleanup patches

2015-05-19 Thread Peter Maydell
This patch series is basically the remaining patches from Greg's EL3-trapping series, cleaned up by me based on review comments and on various things I noticed as I went along. (In particular it has the reworking of when we should set exception.target_el &c that I mentioned in the comments on patch

Re: [Qemu-devel] [PATCH 04/10] Translate offsets to destination address space

2015-05-19 Thread Michael R. Hines
On 05/19/2015 01:44 PM, Dr. David Alan Gilbert wrote: * Michael R. Hines (mrhi...@linux.vnet.ibm.com) wrote: On 04/20/2015 10:57 AM, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" The 'offset' field in RDMACompress and 'current_addr' field in RDMARegister are commented as

[Qemu-devel] [PATCH 03/14] target-arm: Set correct syndrome for faults on MSR DAIF*, imm

2015-05-19 Thread Peter Maydell
If the SCTLR.UMA trap bit is set then attempts by EL0 to update the PSTATE DAIF bits via "MSR DAIFSet, imm" and "MSR DAIFClr, imm" instructions will raise an exception. We were failing to set the syndrome information for this exception, which meant that it would be reported as a repeat of whatever

Re: [Qemu-devel] [PATCH 10/10] Sanity check RDMA remote data

2015-05-19 Thread Michael R. Hines
On 04/20/2015 10:57 AM, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" Perform some basic (but probably not complete) sanity checking on requests from the RDMA source. Signed-off-by: Dr. David Alan Gilbert --- migration/rdma.c | 30 ++ 1 file

[Qemu-devel] [PATCH 02/14] target-arm: Extend helpers to route exceptions

2015-05-19 Thread Peter Maydell
From: Greg Bellows Updated the various helper routines to set the target EL as needed using a dedicated function. Signed-off-by: Greg Bellows Acked-by: Edgar E. Iglesias Message-id: 1429722561-12651-3-git-send-email-greg.bell...@linaro.org [PMM: Also set target_el in fault cases in access_chec

[Qemu-devel] [PATCH 14/14] target-arm: Add WFx instruction trap support

2015-05-19 Thread Peter Maydell
From: Greg Bellows Add support for trapping WFI and WFE instructions to the proper EL when SCTLR/SCR/HCR settings apply. Signed-off-by: Greg Bellows [PMM: removed unnecessary tweaking of syn_wfx() prototype; use raise_exception(); don't trap on WFE (and add comment explaining why not); remov

[Qemu-devel] [PATCH 11/14] target-arm: Extend FP checks to use an EL

2015-05-19 Thread Peter Maydell
From: Greg Bellows Extend the ARM disassemble context to take a target exception EL instead of a boolean enable. This change reverses the polarity of the check making a value of 0 indicate floating point enabled (no exception). Signed-off-by: Greg Bellows [PMM: Use a common TB flag field for AA

[Qemu-devel] [PATCH 04/14] target-arm: Move setting of exception info into tlb_fill

2015-05-19 Thread Peter Maydell
Move the code which sets exception information out of arm_cpu_handle_mmu_fault and into tlb_fill. tlb_fill is the only caller which wants to raise_exception() so it makes more sense for it to handle the whole of the exception setup. As part of this cleanup, move the user-mode-only implementation f

[Qemu-devel] [PATCH 06/14] target-arm: Make raise_exception() take syndrome and target EL

2015-05-19 Thread Peter Maydell
Rather than making every caller of raise_exception set the syndrome and target EL by hand, make these arguments to raise_exception() and have that do the job. Signed-off-by: Peter Maydell --- target-arm/op_helper.c | 68 +- 1 file changed, 28 inser

[Qemu-devel] [PATCH 12/14] target-arm: Move TB flags down to fill gap

2015-05-19 Thread Peter Maydell
Deleting the now-unused ARM_TBFLAG_CPACR_FPEN left a gap in the bit usage; move the following ARM_TBFLAG_XSCALE_CPAR and ARM_TBFLAG_NS_SHIFT down 3 bits to fill the gap. Signed-off-by: Peter Maydell --- target-arm/cpu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/targ

[Qemu-devel] [PATCH 09/14] target-arm: Add AArch64 CPTR registers

2015-05-19 Thread Peter Maydell
From: Greg Bellows Adds CPTR_EL2/3 system registers definitions and access function. Signed-off-by: Greg Bellows [PMM: merge CPTR_EL2 and HCPTR definitions into a single def using STATE_BOTH; don't use readfn/writefn to implement RAZ/WI registers; don't use accessfn for the no-EL2 CPTR_EL2;

Re: [Qemu-devel] [PATCH 09/10] Sort destination RAMBlocks to be the same as the source

2015-05-19 Thread Michael R. Hines
On 04/20/2015 10:57 AM, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" Use the order of incoming RAMBlocks from the source to record an index number; that then allows us to sort the destination local RAMBlock list to match the source. Now that the RAMBlocks are known to be

[Qemu-devel] [PATCH 13/14] target-arm: Don't halt on WFI unless we don't have any work

2015-05-19 Thread Peter Maydell
Just NOP the WFI instruction if we have work to do. This doesn't make much difference currently (though it does avoid jumping out to the top level loop and immediately restarting), but the distinction between "halt" and "don't halt" will become more important when the decision to halt requires us t

Re: [Qemu-devel] [PATCH 05/10] Rework ram_control_load_hook to hook during block load

2015-05-19 Thread Dr. David Alan Gilbert
* Michael R. Hines (mrhi...@linux.vnet.ibm.com) wrote: > On 04/20/2015 10:57 AM, Dr. David Alan Gilbert (git) wrote: > >From: "Dr. David Alan Gilbert" > > > >We need the names of RAMBlocks as they're loaded for RDMA, > >reuse an existing QEMUFile hook with some small mods. > > > >Signed-off-by: Dr

Re: [Qemu-devel] [PATCH 08/10] Rework ram block hash

2015-05-19 Thread Michael R. Hines
On 04/20/2015 10:57 AM, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" RDMA uses a hash from block offset->RAM Block; this isn't needed on the destination, and now that the destination sorts the ramblock list, is harder to maintain. Destination sorts the ramblock list? Is

  1   2   3   >