Re: [Qemu-devel] [PATCH v5 5/7] vfio-pci: pass the aer error to guest

2015-04-15 Thread Alex Williamson
On Wed, 2015-04-15 at 18:30 +0800, Chen Fan wrote: > On 04/08/2015 11:36 PM, Alex Williamson wrote: > > On Wed, 2015-04-08 at 16:59 +0800, Chen Fan wrote: > >> On 04/01/2015 11:46 PM, Alex Williamson wrote: > >>> On Wed, 2015-04-01 at 12:12 +0800, Chen Fan wrote: > On 03/25/2015 10:41 AM, Alex

Re: [Qemu-devel] [Spice-devel] [PATCH] spice: fix simple display on bigendian hosts

2015-04-15 Thread Gerd Hoffmann
On Mi, 2015-04-15 at 15:55 +0300, Denis Kirjanov wrote: > On 4/15/15, Gerd Hoffmann wrote: > > On Di, 2015-04-14 at 17:47 +0300, Denis Kirjanov wrote: > >> On 4/14/15, Denis Kirjanov wrote: > >> > On 4/14/15, Denis Kirjanov wrote: > >> >> On 4/14/15, Gerd Hoffmann wrote: > >> >>> Denis Kirjanov

[Qemu-devel] [PATCH] tpm: fix coding style

2015-04-15 Thread Stefan Berger
Fix coding style in one instance. Signed-off-by: Stefan Berger --- hw/tpm/tpm_tis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c index 4b6d601..b8235d5 100644 --- a/hw/tpm/tpm_tis.c +++ b/hw/tpm/tpm_tis.c @@ -842,7 +842,7 @@ static v

Re: [Qemu-devel] [Qemu-block] [PATCH 1/6] block: keep a list of block jobs

2015-04-15 Thread Max Reitz
On 08.04.2015 16:43, Alberto Garcia wrote: 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 everytime

Re: [Qemu-devel] [PATCH v5 3/6] Qemu-Xen-vTPM: Xen frontend driver infrastructure

2015-04-15 Thread Stefan Berger
On 04/10/2015 02:59 AM, Quan Xu wrote: This patch adds infrastructure for xen front drivers living in qemu, so drivers don't need to implement common stuff on their own. It's mostly xenbus management stuff: some functions to access XenStore, setting up XenStore watches, callbacks on device disco

Re: [Qemu-devel] [PATCH v5 4/6] Qemu-Xen-vTPM: Qemu vTPM xenstubdoms backen.

2015-04-15 Thread Stefan Berger
On 04/10/2015 02:59 AM, Quan Xu wrote: This Patch provides the glue for the TPM_TIS(Qemu frontend) to Xen stubdom vTPM domain that provides the actual TPM functionality. It sends data and TPM commends with xen_vtpm_frontend. It is similar as another two vTPM backens: *vTPM passthrough backen S

Re: [Qemu-devel] [PATCH v5 6/6] Qemu-Xen-vTPM: Add a parameter indicating whether the command that was a selftest

2015-04-15 Thread Stefan Berger
On 04/12/2015 10:15 PM, Xu, Quan wrote: -Original Message- From: Stefan Berger [mailto:stef...@linux.vnet.ibm.com] Sent: Monday, April 13, 2015 4:50 AM To: Xu, Quan; stefano.stabell...@eu.citrix.com; ebl...@redhat.com Cc: pbonz...@redhat.com; qemu-devel@nongnu.org; aligu...@amazon.com;

[Qemu-devel] [PATCH] qmp: Give saner messages related to qmp_capabilities misuse

2015-04-15 Thread Eric Blake
Pretending that QMP doesn't understand a command merely because we are not in the right mode doesn't help first-time users figure out what to do to correct things. Although the documentation for QMP calls out capabilities negotiation, we should also make it clear in our error messages what we were

Re: [Qemu-devel] [Qemu-block] [PATCH 2/6] block: allow block jobs in any arbitrary node

2015-04-15 Thread Max Reitz
On 08.04.2015 16:43, Alberto Garcia wrote: 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

Re: [Qemu-devel] [Qemu-block] [PATCH 3/6] block: never cancel a streaming job without running stream_complete()

2015-04-15 Thread Max Reitz
On 08.04.2015 16:43, Alberto Garcia wrote: We need to call stream_complete() in order to do all the necessary clean-ups, even if there's an early failure. At the moment it's only useful to make sure that s->backing_file_str is not leaked, Which is important enough on its own. but it will beco

[Qemu-devel] [PATCH v3 10/16] hw/intc/arm_gic: Implement Non-secure view of RPR

2015-04-15 Thread Greg Bellows
From: Fabian Aggeler For GICs with Security Extensions Non-secure reads have a restricted view on the current running priority. Signed-off-by: Fabian Aggeler Signed-off-by: Greg Bellows --- hw/intc/arm_gic.c | 17 - hw/intc/gic_internal.h | 1 + 2 files changed, 17 inser

[Qemu-devel] [PATCH v3 13/16] hw/intc/arm_gic: Change behavior of IAR writes

2015-04-15 Thread Greg Bellows
From: Fabian Aggeler Grouping (GICv2) and Security Extensions change the behavior of IAR reads. Acknowledging Group0 interrupts is only allowed from Secure state and acknowledging Group1 interrupts from Secure state is only allowed if AckCtl bit is set. Signed-off-by: Fabian Aggeler Signed-off-

[Qemu-devel] [PATCH v3 00/16] target-arm: Add GICv1/SecExt and GICv2/Grouping

2015-04-15 Thread Greg Bellows
This patch series adds ARM GICv1 and GICv2 security extension support. As a result GIC interrupt grouping and FIQ enablement have also been added. FIQ enablement is limited to ARM the ARM vexpress and virt machines. At the current moment, the security extension capability is not enabled as it de

[Qemu-devel] [PATCH v3 09/16] hw/intc/arm_gic: Make ICCBPR/GICC_BPR banked

2015-04-15 Thread Greg Bellows
From: Fabian Aggeler This register is banked in GICs with Security Extensions. Storing the non-secure copy of BPR in the abpr, which is an alias to the non-secure copy for secure access. ABPR itself is only accessible from secure state if the GIC implements Security Extensions. Signed-off-by: Fa

[Qemu-devel] [PATCH v3 02/16] hw/arm/vexpress.c: Wire FIQ between CPU <> GIC

2015-04-15 Thread Greg Bellows
From: Fabian Aggeler Connect FIQ output of the GIC CPU interfaces to the CPUs. Signed-off-by: Fabian Aggeler Signed-off-by: Greg Bellows --- hw/arm/vexpress.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c index 3989bc5..c2602a2 100644 --- a/hw/arm

[Qemu-devel] [PATCH v3 06/16] hw/intc/arm_gic: Add Interrupt Group Registers

2015-04-15 Thread Greg Bellows
From: Fabian Aggeler Interrupt Group Registers (previously called Interrupt Security Registers) as defined in GICv1 with Security Extensions or GICv2 allow to configure interrupts as Secure (Group0) or Non-secure (Group1). In GICv2 these registers are implemented independent of the existence of S

[Qemu-devel] [PATCH v3 03/16] hw/arm/virt.c: Wire FIQ between CPU <> GIC

2015-04-15 Thread Greg Bellows
Connect FIQ output of the GIC CPU interfaces to the CPUs. Signed-off-by: Greg Bellows --- hw/arm/virt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 565f573..f3326cf 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -386,6 +386,8 @@ static uint32_t cr

[Qemu-devel] [PATCH v3 01/16] hw/intc/arm_gic: Request FIQ sources

2015-04-15 Thread Greg Bellows
From: Fabian Aggeler Preparing for FIQ lines from GIC to CPUs, which is needed for GIC Security Extensions. Signed-off-by: Fabian Aggeler Signed-off-by: Greg Bellows --- hw/intc/arm_gic.c| 3 +++ include/hw/intc/arm_gic_common.h | 1 + 2 files changed, 4 insertions(+) diff --

[Qemu-devel] [PATCH v3 04/16] hw/intc/arm_gic: Add Security Extensions property

2015-04-15 Thread Greg Bellows
From: Fabian Aggeler The existing implementation does not support Security Extensions mentioned in the GICv1 and GICv2 architecture specification. Security Extensions are not available on all GICs. This property makes it possible to enable Security Extensions. It also makes GICD_TYPER/ICDICTR.S

[Qemu-devel] [PATCH v3 12/16] hw/intc/arm_gic: Change behavior of EOIR writes

2015-04-15 Thread Greg Bellows
From: Fabian Aggeler Grouping (GICv2) and Security Extensions change the behavior of EOIR writes. Completing Group0 interrupts is only allowed from Secure state and completing Group1 interrupts from Secure state is only allowed if AckCtl bit is set. Signed-off-by: Fabian Aggeler Signed-off-by:

[Qemu-devel] [PATCH v3 07/16] hw/intc/arm_gic: Make ICDDCR/GICD_CTLR banked

2015-04-15 Thread Greg Bellows
From: Fabian Aggeler ICDDCR/GICD_CTLR is banked in GICv1 implementations with Security Extensions or in GICv2 in independent from Security Extensions. This makes it possible to enable forwarding of interrupts from Distributor to the CPU interfaces for Group0 and Group1. EnableGroup0 (Bit [1]) in

[Qemu-devel] [PATCH v3 08/16] hw/intc/arm_gic: Make ICCICR/GICC_CTLR banked

2015-04-15 Thread Greg Bellows
From: Fabian Aggeler ICCICR/GICC_CTLR is banked in GICv1 implementations with Security Extensions or in GICv2 in independent from Security Extensions. This makes it possible to enable forwarding of interrupts from the CPU interfaces to the connected processors for Group0 and Group1. We also allo

[Qemu-devel] [PATCH v3 11/16] hw/intc/arm_gic: Handle grouping for GICC_HPPIR

2015-04-15 Thread Greg Bellows
From: Fabian Aggeler Grouping (GICv2) and Security Extensions change the behaviour of reads of the highest priority pending interrupt register (ICCHPIR/GICC_HPPIR). Signed-off-by: Fabian Aggeler Signed-off-by: Greg Bellows --- hw/intc/arm_gic.c | 29 - hw/intc

[Qemu-devel] [PATCH v3 05/16] hw/intc/arm_gic: Add ns_access() function

2015-04-15 Thread Greg Bellows
From: Fabian Aggeler Security Extensions for GICv1 and GICv2 use register banking to provide transparent access to seperate Secure and Non-secure copies of GIC configuration registers. This function will later be replaced by code determining the security state of a read/write access to a register

Re: [Qemu-devel] [PATCH] qmp: Give saner messages related to qmp_capabilities misuse

2015-04-15 Thread Kashyap Chamarthy
On Wed, Apr 15, 2015 at 09:19:23AM -0600, Eric Blake wrote: > Pretending that QMP doesn't understand a command merely because > we are not in the right mode doesn't help first-time users figure > out what to do to correct things. Although the documentation for > QMP calls out capabilities negotiat

Re: [Qemu-devel] [RFC PATCH] vl.c: add -semihosting-config "arg" sub-argument

2015-04-15 Thread Liviu Ionescu
> On 15 Apr 2015, at 15:49, Leon Alrae wrote: > > ... If there aren't any objections for the proposed solution, then let's > just cook up the patch. the changes related to moving --semihosting-cmdline to the end of the line are in: git://git.code.sf.net/p/gnuarmeclipse/qemu gnuarmeclipse-qe

[Qemu-devel] [PATCH v3 14/16] hw/intc/arm_gic: Restrict priority view

2015-04-15 Thread Greg Bellows
From: Fabian Aggeler GICs with Security Extensions restrict the non-secure view of the interrupt priority and priority mask registers. Signed-off-by: Fabian Aggeler Signed-off-by: Greg Bellows --- hw/intc/arm_gic.c | 66 +- hw/intc/gic_inte

[Qemu-devel] [PATCH v3 15/16] hw/intc/arm_gic: Break out gic_update() function

2015-04-15 Thread Greg Bellows
From: Fabian Aggeler Prepare to split gic_update() in two functions, one for GICs with interrupt grouping and one without grouping (existing). Signed-off-by: Fabian Aggeler Signed-off-by: Greg Bellows --- hw/intc/arm_gic.c | 11 --- hw/intc/gic_internal.h | 1 + 2 files changed,

[Qemu-devel] [PATCH v3 16/16] hw/intc/arm_gic: add gic_update() for grouping

2015-04-15 Thread Greg Bellows
From: Fabian Aggeler GICs with grouping (GICv2 or GICv1 with Security Extensions) have a different exception generation model which is more complicated than without interrupt grouping. We add a new function to handle this model. Signed-off-by: Fabian Aggeler Signed-off-by: Greg Bellows --- v

Re: [Qemu-devel] [Qemu-block] [PATCH 4/6] block: Support streaming to an intermediate layer

2015-04-15 Thread Max Reitz
On 08.04.2015 16:43, Alberto Garcia wrote: This makes sure that the image we are steaming into is open in read-write mode during the operation. Operation blockers are also set in all intermediate nodes, since they will be removed from the chain afterwards. Finally, this also unblocks the stream

Re: [Qemu-devel] [Qemu-block] [PATCH 5/6] block: Add QMP support for streaming to an intermediate layer

2015-04-15 Thread Max Reitz
On 08.04.2015 16:43, Alberto Garcia wrote: This patch makes the 'device' paramater of the 'block-stream' command allow a node name as well as a device name. s/allow/accept/ In addition to that, operation blockers will be checked in all intermediate nodes between the top and the base node. Si

Re: [Qemu-devel] [Qemu-block] [PATCH 6/6] docs: Document how to stream to an intermediate layer

2015-04-15 Thread Max Reitz
On 08.04.2015 16:43, Alberto Garcia wrote: Signed-off-by: Alberto Garcia --- docs/live-block-ops.txt | 32 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/docs/live-block-ops.txt b/docs/live-block-ops.txt index a257087..5e969fd 100644 --- a/doc

Re: [Qemu-devel] [Qemu-block] [PATCH v3 0/6] Support streaming to an intermediate layer

2015-04-15 Thread Max Reitz
On 08.04.2015 16:43, Alberto Garcia wrote: There's only one change in this series: there's now a list of block jobs that is updated everytime a new one is created or destroyed. This way we can iterate the list directly, rather than searching all BlockDriverStates for the ones that own a block jo

Re: [Qemu-devel] [PATCH] qmp: Give saner messages related to qmp_capabilities misuse

2015-04-15 Thread Paulo Ricardo Paz Vital
Reviewed-by: Paulo Vital On Wed, 2015-04-15 at 09:19 -0600, Eric Blake wrote: > Pretending that QMP doesn't understand a command merely because > we are not in the right mode doesn't help first-time users figure > out what to do to correct things. Although the documentation for > QMP calls out c

Re: [Qemu-devel] [PATCH] qmp: Give saner messages related to qmp_capabilities misuse

2015-04-15 Thread John Snow
On 04/15/2015 11:19 AM, Eric Blake wrote: Pretending that QMP doesn't understand a command merely because we are not in the right mode doesn't help first-time users figure out what to do to correct things. Although the documentation for QMP calls out capabilities negotiation, we should also ma

Re: [Qemu-devel] [PATCH] qmp: Give saner messages related to qmp_capabilities misuse

2015-04-15 Thread Eric Blake
On 04/15/2015 12:13 PM, John Snow wrote: > > > On 04/15/2015 11:19 AM, Eric Blake wrote: >> Pretending that QMP doesn't understand a command merely because >> we are not in the right mode doesn't help first-time users figure >> out what to do to correct things. Although the documentation for >>

Re: [Qemu-devel] [PATCH] qmp: Give saner messages related to qmp_capabilities misuse

2015-04-15 Thread John Snow
On 04/15/2015 02:31 PM, Eric Blake wrote: On 04/15/2015 12:13 PM, John Snow wrote: On 04/15/2015 11:19 AM, Eric Blake wrote: Pretending that QMP doesn't understand a command merely because we are not in the right mode doesn't help first-time users figure out what to do to correct things. A

[Qemu-devel] [Bug 1444081] Re: x86_64 heavy crash on PPC 64 host

2015-04-15 Thread luigiburdo
Confirm the rc3 is working :) i will check other softmmu too in this last rc. small OT because i dont know where ask... One day will be possible have one emulated core for every host thread like now do WinUae with qemu core? Example: 64 power8 cpus emulate 64 x86 cpus in one virtual machine

Re: [Qemu-devel] [PATCH v5 3/6] Qemu-Xen-vTPM: Xen frontend driver infrastructure

2015-04-15 Thread Daniel De Graaf
On 04/15/2015 10:44 AM, Stefan Berger wrote: On 04/10/2015 02:59 AM, Quan Xu wrote: This patch adds infrastructure for xen front drivers living in qemu, so drivers don't need to implement common stuff on their own. It's mostly xenbus management stuff: some functions to access XenStore, setting

[Qemu-devel] [PATCH v2 0/3] tpm: Upgrade TPM TIS for support of a TPM 2

2015-04-15 Thread Stefan Berger
After the previous upgrade of the TPM TIS to version 1.3, we now upgrade it to support a TPM 2 in the backend. Stefan Berger (3): Extend TPM TIS interface to support TPM 2 tpm: Probe for connected TPM 1.2 or TPM 2 TPM2 ACPI table support backends/tpm.c | 14 + hw/i386/ac

[Qemu-devel] [PATCH v2 2/3] tpm: Probe for connected TPM 1.2 or TPM 2

2015-04-15 Thread Stefan Berger
In the TPM passthrough backend driver, modify the probing code so that we can check whether a TPM 1.2 or TPM 2 is being used and adapt the behavior of the TPM TIS accordingly. Move the code that tested for a TPM 1.2 into tpm_utils.c and extend it with test for probing for TPM 2. Have the function

[Qemu-devel] [PATCH v2 3/3] TPM2 ACPI table support

2015-04-15 Thread Stefan Berger
Add a TPM2 ACPI table if a TPM 2 is used in the backend. Rename tpm_find() to tpm_get_version() and have this function return the version of the TPM found, TPMVersion_Unspec if no TPM is found. Use the version number to build version specific ACPI tables. Signed-off-by: Stefan Berger --- hw/i38

[Qemu-devel] [PATCH v2 1/3] Extend TPM TIS interface to support TPM 2

2015-04-15 Thread Stefan Berger
Following the recent upgrade to version 1.3, extend the TPM TIS interface with capabilities introduced for support of a TPM 2. TPM TIS for TPM 2 introduced the following extensions beyond the TPM TIS 1.3 (used for TPM 1.2): - A new 32bit interface Id register was introduced. - New flags for the s

[Qemu-devel] [PATCH 2/5] Support Physical Presence Interface Spec

2015-04-15 Thread Stefan Berger
For automated management of a TPM device, implement the TCG Physical Presence Interface Specification that allows a root user on Linux (for example) to set an opcode for a sequence of TPM operations that the BIOS is supposed to execute upon reboot of the physical or virtual machine. A sequence of o

[Qemu-devel] [PATCH 4/5] Introduce condition in TPM backend for notification

2015-04-15 Thread Stefan Berger
TPM backends will suspend independently of the frontends. Also here we need to be able to wait for the TPM command to have been completely processed. Signed-off-by: Stefan Berger --- hw/tpm/tpm_passthrough.c | 20 1 file changed, 20 insertions(+) diff --git a/hw/tpm/tpm_pas

[Qemu-devel] [PATCH 5/5] Add support for VM suspend/resume for TPM TIS

2015-04-15 Thread Stefan Berger
Extend the TPM TIS code to support suspend/resume. In case a command is being processed by the external TPM when suspending, wait for the command to complete to catch the result. In case the bottom half did not run, run the one function the bottom half is supposed to run. This then makes the resume

[Qemu-devel] [PATCH 0/5] Extend TPM support with a QEMU-external TPM

2015-04-15 Thread Stefan Berger
The following series of patches extends TPM support with an external TPM that offers a Linux CUSE (character device in userspace) interface. This TPM lets each VM access its own private vTPM. The CUSE TPM supports suspend/resume and migration. Much out-of-band functionality necessary to control the

[Qemu-devel] [PATCH 1/5] Provide support for the CUSE TPM

2015-04-15 Thread Stefan Berger
Rather than integrating TPM functionality into QEMU directly using the TPM emulation of libtpms, we now integrate an external emulated TPM device. This device is expected to implement a Linux CUSE interface (CUSE = character device in userspace). QEMU talks to the CUSE TPM using much functionality

[Qemu-devel] [PATCH 3/5] Introduce condition to notifiy waiters of completed command

2015-04-15 Thread Stefan Berger
Introduce a lock and a condition to notify anyone waiting for the completion of the execution of a TPM command by the backend (thread). The backend uses the condition to signal anyone waiting for command completion. We need to place the condition in two locations: one is invoked by the backend thre

Re: [Qemu-devel] [PATCH v5 3/6] Qemu-Xen-vTPM: Xen frontend driver infrastructure

2015-04-15 Thread Xu, Quan
> -Original Message- > From: Daniel De Graaf [mailto:dgde...@tycho.nsa.gov] > Sent: Wednesday, April 15, 2015 11:07 PM > To: Stefan Berger; Xu, Quan > Cc: stefano.stabell...@eu.citrix.com; ebl...@redhat.com; wei.l...@citrix.com; > qemu-devel@nongnu.org; xen-de...@lists.xen.org; aligu...@a

Re: [Qemu-devel] [PATCH v5 6/6] Qemu-Xen-vTPM: Add a parameter indicating whether the command that was a selftest

2015-04-15 Thread Xu, Quan
> -Original Message- > From: Stefan Berger [mailto:stef...@linux.vnet.ibm.com] > Sent: Wednesday, April 15, 2015 10:56 PM > To: Xu, Quan; stefano.stabell...@eu.citrix.com; ebl...@redhat.com > Cc: wei.l...@citrix.com; qemu-devel@nongnu.org; xen-de...@lists.xen.org; > aligu...@amazon.com; p

Re: [Qemu-devel] [PATCH v5 4/6] Qemu-Xen-vTPM: Qemu vTPM xenstubdoms backen.

2015-04-15 Thread Xu, Quan
> -Original Message- > From: Stefan Berger [mailto:stef...@linux.vnet.ibm.com] > Sent: Wednesday, April 15, 2015 10:50 PM > To: Xu, Quan; stefano.stabell...@eu.citrix.com; ebl...@redhat.com > Cc: wei.l...@citrix.com; qemu-devel@nongnu.org; xen-de...@lists.xen.org; > aligu...@amazon.com; p

Re: [Qemu-devel] virtio-blk and virtio-scsi performance comparison

2015-04-15 Thread Fam Zheng
On Wed, 04/15 11:17, Konstantin Krotov wrote: > Hello list! > > I performed tests with fio and obtained results: > > *** virtio-scsi with cache=none, io=threads, blok device is md-device from > mdadm raid1, random r/w, 32 thread from guest (debian, kernel 3.16): > > fio fio1 > readtest: (g=0): r

[Qemu-devel] [PATCH v4 2/4] apic: convert ->busdev.qdev casts to DEVICE() casts

2015-04-15 Thread Zhu Guihua
Use DEVICE() casts to avoid accessing ICCDevice's qdev field directly. Signed-off-by: Zhu Guihua --- hw/intc/apic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/intc/apic.c b/hw/intc/apic.c index 0f97b47..00ae0ec 100644 --- a/hw/intc/apic.c +++ b/hw/intc/apic.c @@

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

2015-04-15 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 v4 0/4] remove icc bus/bridge

2015-04-15 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. v4: -add wrapper to get root memory

[Qemu-devel] [PATCH v4 1/4] apic: move apic mmio register to each apic realizefn

2015-04-15 Thread Zhu Guihua
From: Chen Fan Due to local apic address is in view of CPU's address space, so able to move apic mapping to each apic realizefn. Signed-off-by: Chen Fan Signed-off-by: Zhu Guihua --- exec.c| 5 + hw/i386/pc.c | 7 --- hw/intc/apic_common.c | 14 -

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

2015-04-15 Thread Zhu Guihua
From: Chen Fan ICC bus was invented only to provide hotplug capability to CPU and APIC because at the time being hotplug was available only for BUS attached devices. Now this patch is to drop ICC bus impl, and switch to bus-less CPU+APIC hotplug, handling them in the same manner as pc-dimm. and

[Qemu-devel] [PATCH v3 0/7] aio: Support epoll by introducing qemu_poll abstraction

2015-04-15 Thread Fam Zheng
v3: Rebase to master for 2.4. Although epoll_pwait1 syscall is still being worked on [1], the QEMU part (if any) will base on this, so let's merge it first. That part is not included in this version because I'm still evaluating by comparing epoll_pwait1 with epoll+timerfd as wi

[Qemu-devel] [PATCH v3 1/7] poll: Introduce QEMU Poll API

2015-04-15 Thread Fam Zheng
This is abstract of underlying poll implementation. A glib implementation is included. Signed-off-by: Fam Zheng --- Makefile.objs | 2 +- include/qemu/poll.h | 40 +++ include/qemu/typedefs.h | 4 +- poll-glib.c | 130 +++

[Qemu-devel] [PATCH v3 3/7] poll: Add epoll implementation for qemu_poll

2015-04-15 Thread Fam Zheng
This implements qemu_poll with ppoll + epoll. The only complex part is qemu_poll_set_fds, which will sync up epollfd with epoll_ctl by computing the symmetric difference of previous and new fds. The ppoll is used to retain ns precision of timeout. Signed-off-by: Fam Zheng --- Makefile.objs |

[Qemu-devel] [PATCH v3 2/7] posix-aio: Use QEMU poll interface

2015-04-15 Thread Fam Zheng
The AIO handler list is only modified by aio_set_fd_handler, so we can easily add del poll fd there. Initialize a QEMUPoll and keep track of all the fds, so we don't need to rebuild a GPollFD array for g_poll in aio_poll. Signed-off-by: Fam Zheng --- aio-posix.c | 52

[Qemu-devel] [PATCH v3 4/7] main-loop: Replace qemu_poll_ns with qemu_poll

2015-04-15 Thread Fam Zheng
qemu_poll_set_fds + qemu_poll does the same, and when epoll is available, it is faster. Signed-off-by: Fam Zheng --- include/qemu/timer.h | 13 - main-loop.c | 35 ++- qemu-timer.c | 28 3 files changed, 30

[Qemu-devel] [PATCH v3 6/7] poll-glib: Support ppoll

2015-04-15 Thread Fam Zheng
Signed-off-by: Fam Zheng --- poll-glib.c | 29 ++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/poll-glib.c b/poll-glib.c index 64fde69..23d528d 100644 --- a/poll-glib.c +++ b/poll-glib.c @@ -14,6 +14,9 @@ #include "qemu-common.h" #include "qemu/timer

[Qemu-devel] [PATCH v3 7/7] poll-linux: Add timerfd support

2015-04-15 Thread Fam Zheng
In qemu_poll_timerfd, we arm the timerfd with timeout_ns. The timerfd is also watched by epollfd, so that when there is no other events, epoll_wait will still return on time, even though we pass -1 (wait infinitely). Signed-off-by: Fam Zheng --- poll-linux.c | 84

[Qemu-devel] [PATCH v3 5/7] tests: Add test case for qemu_poll

2015-04-15 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/Makefile| 2 + tests/test-poll.c | 272 ++ 2 files changed, 274 insertions(+) create mode 100644 tests/test-poll.c diff --git a/tests/Makefile b/tests/Makefile index 55aa745..d152bf5 100644 --- a/tests/

<    1   2