[Qemu-devel] [RFC v2 0/8] pass aer error to guest for vfio device

2015-01-28 Thread Chen Fan
. Chen Fan (8): pcie_aer: fix typos in pcie_aer_inject_error comment vfio-pci: add aer capability support pcie_aer: expose pcie_aer_msg() interface vfio-pci: pass the aer error to guest pcie_aer: fix a trivial typo in PCIEAERMsg comments vfio_pci: fix a wrong check in vfio_pci_reset

[Qemu-devel] [RFC v2 7/8] vfio_pci: change vfio device features bit macro to enum definition

2015-01-28 Thread Chen Fan
Signed-off-by: Chen Fan --- hw/vfio/pci.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 54eb6b4..65247ee 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -134,6 +134,12 @@ typedef struct VFIOMSIXInfo { void *mmap

[Qemu-devel] [RFC v2 1/8] pcie_aer: fix typos in pcie_aer_inject_error comment

2015-01-28 Thread Chen Fan
Refer to "PCI Express Base Spec3.0", this comments can't fit the description in spec, so we should fix them. Signed-off-by: Chen Fan --- hw/pci/pcie_aer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/pci/pcie_aer.c b/hw/pci/pcie_aer.c index 1

[Qemu-devel] [RFC v2 2/8] vfio-pci: add aer capability support

2015-01-28 Thread Chen Fan
if we detect the aer capability in vfio device, then we should initialize the vfio device aer rigister bits. so guest OS can set this bits as needed. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 72 +++ 1 file changed, 72 insertions

[Qemu-devel] [RFC v2 5/8] pcie_aer: fix a trivial typo in PCIEAERMsg comments

2015-01-28 Thread Chen Fan
Signed-off-by: Chen Fan --- include/hw/pci/pcie_aer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/pci/pcie_aer.h b/include/hw/pci/pcie_aer.h index 648df73..6c4bf3b 100644 --- a/include/hw/pci/pcie_aer.h +++ b/include/hw/pci/pcie_aer.h @@ -51,7 +51,7 @@ struct

[Qemu-devel] [RFC v2 4/8] vfio-pci: pass the aer error to guest

2015-01-28 Thread Chen Fan
-off-by: Chen Fan --- hw/vfio/pci.c | 34 -- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 2072261..8c81bb3 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3141,18 +3141,40 @@ static void vfio_put_device

[Qemu-devel] [RFC v2 8/8] vfio-pci: add VFIO_FEATURE_ENABLE_AER_CAP feature

2015-01-28 Thread Chen Fan
for old machine types, we should disable aercap feature. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 13 ++--- include/hw/compat.h | 4 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 65247ee..0d830e6 100644 --- a/hw/vfio

Re: [Qemu-devel] [RFC PATCH 4/4] vfio-pci: pass the aer error to guest

2015-01-28 Thread Chen Fan
On 01/12/2015 11:24 PM, Alex Williamson wrote: On Mon, 2015-01-12 at 11:04 +0800, Chen Fan wrote: when the vfio device encounters an uncorrectable error in host, the vfio_pci driver will signal the eventfd registered by this vfio device, the results in the qemu eventfd handler getting

Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough

2015-01-28 Thread Chen, Tiejun
On 2015/1/28 19:12, Wei Liu wrote: On Wed, Jan 28, 2015 at 08:42:56AM +0800, Chen, Tiejun wrote: On 2015/1/27 22:40, Ian Jackson wrote: Chen, Tiejun writes ("Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough"): On 2015/1/23 8:43, Ch

Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough

2015-01-29 Thread Chen, Tiejun
On 2015/1/29 18:50, Wei Liu wrote: On Thu, Jan 29, 2015 at 08:41:24AM +0800, Chen, Tiejun wrote: On 2015/1/28 19:12, Wei Liu wrote: On Wed, Jan 28, 2015 at 08:42:56AM +0800, Chen, Tiejun wrote: On 2015/1/27 22:40, Ian Jackson wrote: Chen, Tiejun writes ("Re: [Qemu-devel] [RFC][PATC

Re: [Qemu-devel] [RFC][PATCH 1/1] libxl: add one machine property to support IGD GFX passthrough

2015-02-01 Thread Chen, Tiejun
On 2015/1/30 20:26, Wei Liu wrote: On Fri, Jan 30, 2015 at 08:56:48AM +0800, Chen, Tiejun wrote: [...] Just remember to handle old option in libxl if your old option is already released by some older version of QEMUs. I just drop that old option, -gfx_passthru, if we're under qemu ups

[Qemu-devel] [v2][PATCH] libxl: add one machine property to support IGD GFX passthrough

2015-02-01 Thread Tiejun Chen
When we're working to support IGD GFX passthrough with qemu upstream, instead of "-gfx_passthru" we'd like to make that a machine option, "-machine xxx,-igd-passthru=on". This need to bring a change on tool side. Signed-off-by: Tiejun Chen --- v2: * Based on some

Re: [Qemu-devel] [v2][PATCH] libxl: add one machine property to support IGD GFX passthrough

2015-02-02 Thread Chen, Tiejun
On 2015/2/2 19:08, Ian Campbell wrote: On Mon, 2015-02-02 at 09:17 +0800, Tiejun Chen wrote: When we're working to support IGD GFX passthrough with qemu upstream, instead of "-gfx_passthru" we'd like to make that a machine option, "-machine xxx,-igd-passthru=on".

Re: [Qemu-devel] [v2][PATCH] libxl: add one machine property to support IGD GFX passthrough

2015-02-02 Thread Chen, Tiejun
On 2015/2/2 20:19, Wei Liu wrote: On Mon, Feb 02, 2015 at 09:17:23AM +0800, Tiejun Chen wrote: When we're working to support IGD GFX passthrough with qemu upstream, instead of "-gfx_passthru" we'd like to make that a machine option, "-machine xxx,-igd-passthru=on"

Re: [Qemu-devel] [v2][PATCH] libxl: add one machine property to support IGD GFX passthrough

2015-02-02 Thread Chen, Tiejun
On 2015/2/2 20:54, Ian Jackson wrote: Wei Liu writes ("Re: [v2][PATCH] libxl: add one machine property to support IGD GFX passthrough"): On Mon, Feb 02, 2015 at 09:17:23AM +0800, Tiejun Chen wrote: When we're working to support IGD GFX passthrough with qemu upstr

Re: [Qemu-devel] [v2][PATCH] libxl: add one machine property to support IGD GFX passthrough

2015-02-03 Thread Chen, Tiejun
On 2015/2/3 18:19, Wei Liu wrote: On Tue, Feb 03, 2015 at 09:01:53AM +0800, Chen, Tiejun wrote: On 2015/2/2 20:19, Wei Liu wrote: On Mon, Feb 02, 2015 at 09:17:23AM +0800, Tiejun Chen wrote: When we're working to support IGD GFX passthrough with qemu upstream, instead of "-gfx_pass

Re: [Qemu-devel] [v2][PATCH] libxl: add one machine property to support IGD GFX passthrough

2015-02-03 Thread Chen, Tiejun
On 2015/2/3 19:07, Ian Campbell wrote: On Tue, 2015-02-03 at 09:04 +0800, Chen, Tiejun wrote: On 2015/2/2 20:54, Ian Jackson wrote: Wei Liu writes ("Re: [v2][PATCH] libxl: add one machine property to support IGD GFX passthrough"): On Mon, Feb 02, 2015 at 09:17:23AM +0800, Tiejun

Re: [Qemu-devel] [RFC v2 6/8] vfio_pci: fix a wrong check in vfio_pci_reset

2015-02-04 Thread Chen Fan
On 02/03/2015 04:16 AM, Alex Williamson wrote: On Wed, 2015-01-28 at 16:37 +0800, Chen Fan wrote: when vfio device support FLR, then when device reset, we call VFIO_DEVICE_RESET ioctl to reset the device first, at kernel side, we also can see the order of reset: 3330 rc = pcie_flr(dev

Re: [Qemu-devel] [v2][PATCH] libxl: add one machine property to support IGD GFX passthrough

2015-02-04 Thread Chen, Tiejun
On 2015/2/4 18:41, Ian Campbell wrote: On Wed, 2015-02-04 at 09:34 +0800, Chen, Tiejun wrote: "-machine xxx,igd-passthru=on", to enable/disable that feature. And we also remove that old option, "-gfx_passthru", just from the case of LIBXL_DEVICE_MO

Re: [Qemu-devel] [Xen-devel] [v2][PATCH] libxl: add one machine property to support IGD GFX passthrough

2015-02-05 Thread Chen, Tiejun
On 2015/2/5 17:52, Ian Campbell wrote: On Thu, 2015-02-05 at 09:22 +0800, Chen, Tiejun wrote: Indeed this is not something workaround, and I think in any type of VGA devices, we'd like to diminish this sort of thing gradually, right? This mightn't come true in real world :) It&#x

[Qemu-devel] [RFC][PATCH] virtio: uniform virtio device IDs

2015-02-05 Thread Tiejun Chen
Actually we define these device IDs in virtio standard, so we'd better put them into one common place to manage conveniently. Here I also add VIRTIO_ID_RESERVE according to virtio spec. Signed-off-by: Tiejun Chen --- hw/9pfs/virtio-9p.h| 2 -- include/hw/virtio/virtio-ball

Re: [Qemu-devel] [PATCH v3 6/7] cpu: add device_add foo-x86_64-cpu support

2015-02-05 Thread Chen Fan
build the srat table for preboot cpus before resume all cpu on destination. Thanks, Chen Regards, Andreas

Re: [Qemu-devel] [RFC][PATCH] virtio: uniform virtio device IDs

2015-02-05 Thread Chen, Tiejun
Sorry please ignore this to review another revision. Thanks Tiejun On 2015/2/6 13:24, Tiejun Chen wrote: Actually we define these device IDs in virtio standard, so we'd better put them into one common place to manage conveniently. Here I also add VIRTIO_ID_RESERVE according to virtio

[Qemu-devel] [v2][RFC][PATCH] virtio: uniform virtio device IDs

2015-02-05 Thread Tiejun Chen
Actually we define these device IDs in virtio standard, so we'd better put them into one common place to manage conveniently. Here I also add VIRTIO_ID_RESERVE according to virtio spec. Signed-off-by: Tiejun Chen --- hw/9pfs/virtio-9p.h| 2 -- include/hw/virtio/virtio-ball

Re: [Qemu-devel] [RFC v2 2/8] vfio-pci: add aer capability support

2015-02-05 Thread Chen Fan
On 02/03/2015 04:15 AM, Alex Williamson wrote: On Wed, 2015-01-28 at 16:37 +0800, Chen Fan wrote: if we detect the aer capability in vfio device, then we should initialize the vfio device aer rigister bits. so guest OS can set this bits as needed. s/rigister/register/ Signed-off-by: Chen

Re: [Qemu-devel] [RFC v2 4/8] vfio-pci: pass the aer error to guest

2015-02-05 Thread Chen Fan
On 02/03/2015 04:16 AM, Alex Williamson wrote: On Wed, 2015-01-28 at 16:37 +0800, Chen Fan wrote: when the vfio device encounters an uncorrectable error in host, the vfio_pci driver will signal the eventfd registered by this vfio device, the results in the qemu eventfd handler getting invoked

Re: [Qemu-devel] [Xen-devel] [v2][PATCH] libxl: add one machine property to support IGD GFX passthrough

2015-02-08 Thread Chen, Tiejun
On 2015/2/6 9:01, Chen, Tiejun wrote: On 2015/2/5 17:52, Ian Campbell wrote: On Thu, 2015-02-05 at 09:22 +0800, Chen, Tiejun wrote: Indeed this is not something workaround, and I think in any type of VGA devices, we'd like to diminish this sort of thing gradually, right? This mightn&#

Re: [Qemu-devel] [v2][RFC][PATCH] virtio: uniform virtio device IDs

2015-02-08 Thread Chen, Tiejun
On 2015/2/6 20:14, Cornelia Huck wrote: On Fri, 6 Feb 2015 13:41:26 +0800 Tiejun Chen wrote: Actually we define these device IDs in virtio standard, so we'd better put them into one common place to manage conveniently. Here I also add VIRTIO_ID_RESERVE according to virtio spec. Signe

Re: [Qemu-devel] [v2][RFC][PATCH] virtio: uniform virtio device IDs

2015-02-08 Thread Chen, Tiejun
On 2015/2/7 0:28, Stefan Hajnoczi wrote: On Fri, Feb 06, 2015 at 01:41:26PM +0800, Tiejun Chen wrote: Actually we define these device IDs in virtio standard, so we'd better put them into one common place to manage conveniently. Here I also add VIRTIO_ID_RESERVE according to virtio spec. S

Re: [Qemu-devel] [v2][RFC][PATCH] virtio: uniform virtio device IDs

2015-02-08 Thread Chen, Tiejun
On 2015/2/8 18:48, Michael S. Tsirkin wrote: On Fri, Feb 06, 2015 at 01:14:46PM +0100, Cornelia Huck wrote: On Fri, 6 Feb 2015 13:41:26 +0800 Tiejun Chen wrote: Actually we define these device IDs in virtio standard, so we'd better put them into one common place to manage conveniently.

Re: [Qemu-devel] [v2][RFC][PATCH] virtio: uniform virtio device IDs

2015-02-08 Thread Chen, Tiejun
On 2015/2/9 15:02, Michael S. Tsirkin wrote: On Mon, Feb 09, 2015 at 03:01:15PM +0800, Chen, Tiejun wrote: On 2015/2/8 18:48, Michael S. Tsirkin wrote: On Fri, Feb 06, 2015 at 01:14:46PM +0100, Cornelia Huck wrote: On Fri, 6 Feb 2015 13:41:26 +0800 Tiejun Chen wrote: Actually we define

Re: [Qemu-devel] [PATCH v3 2/7] qom/cpu: move register_vmstate to common CPUClass.realizefn

2015-02-09 Thread Chen Fan
differ from alias id. we can use apic_id + maxcpus as the instance_id. so during migration we can find the corresponding cpu with instance_id regardless new/old scheme. I has made a patch and test migrating from old version to new version. it seems work fine. pls have a look at the attach file.

[Qemu-devel] [RFC v3 02/10] aer: fix a wrong init PCI_ERR_COR_STATUS w1cmask type register

2015-02-09 Thread Chen Fan
>From pcie spec, the bits attributes are RW1CS in Correctable Error Status Register, so this patch fix a wrong definition for PCI_ERR_COR_STATUS register with w1cmask type. Signed-off-by: Chen Fan --- hw/pci/pcie_aer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/

[Qemu-devel] [RFC v3 00/10] pass aer error to guest for vfio device

2015-02-09 Thread Chen Fan
SERR# for bridge control register in firmware. 2. initilize aer capability for vfio device. 3. fix some trivial bug. Chen Fan (10): pcie_aer: fix typos in pcie_aer_inject_error comment aer: fix a wrong init PCI_ERR_COR_STATUS w1cmask type register aer: introduce pcie_aer_setup to setup

[Qemu-devel] [RFC v3 01/10] pcie_aer: fix typos in pcie_aer_inject_error comment

2015-02-09 Thread Chen Fan
Refer to "PCI Express Base Spec3.0", this comments can't fit the description in spec, so we should fix them. Signed-off-by: Chen Fan --- hw/pci/pcie_aer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/pci/pcie_aer.c b/hw/pci/pcie_aer.c index 1

[Qemu-devel] [RFC v3 03/10] aer: introduce pcie_aer_setup to setup aer related bits

2015-02-09 Thread Chen Fan
because function pcie_aer_init() is for adding a new aer capability, but for vfio device, we only need to capture the aer capability from vfio device configuration space, so here we introduce pcie_aer_setup() to init all raw devices. Signed-off-by: Chen Fan --- hw/pci/pcie_aer.c | 63

[Qemu-devel] [RFC v3 06/10] piix: disable all vfio device aercap property

2015-02-09 Thread Chen Fan
because at i440FX platform, all pcie device don't support aer capability, so for all vfio device, we don't need to expose the aer capability. Signed-off-by: Chen Fan --- hw/i386/pc_piix.c | 16 1 file changed, 16 insertions(+) diff --git a/hw/i386/pc_piix.c b/hw/i386

[Qemu-devel] [RFC v3 10/10] pcie_aer: fix a trivial typo in PCIEAERMsg comments

2015-02-09 Thread Chen Fan
Signed-off-by: Chen Fan --- include/hw/pci/pcie_aer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/pci/pcie_aer.h b/include/hw/pci/pcie_aer.h index 15ede17..227427e 100644 --- a/include/hw/pci/pcie_aer.h +++ b/include/hw/pci/pcie_aer.h @@ -51,7 +51,7 @@ struct

[Qemu-devel] [RFC v3 07/10] vfio_pci: change vfio device features bit macro to enum definition

2015-02-09 Thread Chen Fan
Introduce an independent enum structure to define the features bitmap, it would be good for adding new features definition. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 75c932b..bf314a1

[Qemu-devel] [RFC v3 08/10] vfio-pci: add VFIO_FEATURE_ENABLE_AER_CAP feature

2015-02-09 Thread Chen Fan
add a new "aercap" feature in vfio device, for controlling whether expose aer capability. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index bf314a1..c21b40b 100644 --- a/hw/

[Qemu-devel] [RFC v3 09/10] vfio-pci: pass the aer error to guest

2015-02-09 Thread Chen Fan
-off-by: Chen Fan --- hw/vfio/pci.c | 35 +-- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index c21b40b..5ba4e52 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3165,18 +3165,41 @@ static void vfio_put_device

[Qemu-devel] [RFC v3 04/10] vfio: add pcie extanded capability support

2015-02-09 Thread Chen Fan
when we detect extanded capability in vfio device, then we should initialize the vfio device corresponding feature register bits. so guest OS can find it and set those bits as needed. and initialize aer capability. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 85

[Qemu-devel] [RFC v3 05/10] pcie_aer: expose pcie_aer_msg() interface

2015-02-09 Thread Chen Fan
For vfio device, we need to propagate the aer error to Guest OS. we use the pcie_aer_msg() to send aer error to guest. Signed-off-by: Chen Fan --- hw/pci/pcie_aer.c | 2 +- include/hw/pci/pcie_aer.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/pci/pcie_aer.c b

Re: [Qemu-devel] [PATCH v3] Execute _start and reach to the first function call successfully

2015-03-17 Thread Chen Gang
On 3/16/15 23:31, Richard Henderson wrote: > On 03/13/2015 11:03 PM, Chen Gang wrote: >> +static void decode_rrr_1_opcode_y0(struct DisasContext *dc, >> + tilegx_bundle_bits bundle) >> +{ >> +switch (get_RRROpcodeExtension

Re: [Qemu-devel] [PATCH v3] Execute _start and reach to the first function call successfully

2015-03-17 Thread Chen Gang
On 3/16/15 23:37, Richard Henderson wrote: > On 03/15/2015 04:57 PM, Chen Gang wrote: >> OK, thanks. And next, I shall try to send the whole tilegx patches again >> (it is about 6-8 patches), within 2015-03-18. > > When you do so, make sure it's against the *current* ma

Re: [Qemu-devel] [PATCH 1/2] cpu/apic: drop icc bus/bridge/

2015-03-17 Thread Chen Fan
On 03/17/2015 06:39 PM, Andreas Färber wrote: Am 17.03.2015 um 10:08 schrieb 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

Re: [Qemu-devel] [v2][PATCH 2/2] libxl: introduce gfx_passthru_kind

2015-03-18 Thread Chen, Tiejun
I think the _libxl_ message needs to be just "Unable to detect graphics passthru kind". i.e. it can't/shouldn't reference anything to do with xl config options etc (which would make no sense if libvirt was being used). That's not very user friendly though, so you may want to consider adding a new

[Qemu-devel] [v7][PATCH 00/10] xen: add Intel IGD passthrough support

2015-03-18 Thread Tiejun Chen
test.img -m 2560 -boot c -machine pc As we discussed we need to create a separate machine to support current IGD passthrough. Michael S. Tsirkin (1): i440fx: make types configurable at run-time Tiejun Chen (9): pc_init1: pass pa

[Qemu-devel] [v7][PATCH 01/10] i440fx: make types configurable at run-time

2015-03-18 Thread Tiejun Chen
From: "Michael S. Tsirkin" IGD passthrough wants to supply a different pci and host devices, inheriting i440fx devices. Make types configurable. Signed-off-by: Michael S. Tsirkin Signed-off-by: Tiejun Chen --- hw/i386/pc_piix.c| 4 +++- hw/pci-host/piix.c | 9 - inclu

[Qemu-devel] [v7][PATCH 06/10] xen, gfx passthrough: retrieve VGA BIOS to work

2015-03-18 Thread Tiejun Chen
Now we retrieve VGA bios like kvm stuff in qemu but we need to fix Device Identification in case if its not matched with the real IGD device since Seabios is always trying to compare this ID to work out VGA BIOS. Signed-off-by: Tiejun Chen --- hw/xen/xen_pt.c | 10 ++ hw/xen

[Qemu-devel] [v7][PATCH 05/10] xen, gfx passthrough: basic graphics passthrough support

2015-03-18 Thread Tiejun Chen
basic gfx passthrough support: - add a vga type for gfx passthrough - register/unregister legacy VGA I/O ports and MMIOs for passthrough GFX Signed-off-by: Tiejun Chen Signed-off-by: Yang Zhang --- hw/core/machine.c| 20 hw/xen/Makefile.objs | 1 + hw/xen/xen

[Qemu-devel] [v7][PATCH 08/10] xen, gfx passthrough: register a isa bridge

2015-03-18 Thread Tiejun Chen
Currently we just register this isa bridge when we use IGD passthrough in Xen side. Signed-off-by: Tiejun Chen --- hw/xen/xen_pt.c | 18 ++ include/hw/xen/xen.h | 1 + 2 files changed, 19 insertions(+) diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index fcc9f1c..2d5cebb

[Qemu-devel] [v7][PATCH 07/10] igd gfx passthrough: create a isa bridge

2015-03-18 Thread Tiejun Chen
bably don't matter to the Gfx driver, but obviously any difference in display port connections will so it should be fine with any PCH in case of passthrough. So currently use one PCH version, 0x8c4e, to cover all HSW(Haswell) scenarios, 0x9cc3 for BDW(Broadwell). Signed-off-by: Tiejun Che

[Qemu-devel] [v7][PATCH 03/10] piix: create host bridge to passthrough

2015-03-18 Thread Tiejun Chen
Implement a pci host bridge specific to passthrough. Actually this just inherits the standard one. And we also just expose a minimal real host bridge pci configuration subset. Signed-off-by: Tiejun Chen --- hw/pci-host/piix.c | 82 include

[Qemu-devel] [v7][PATCH 02/10] pc_init1: pass parameters just with types

2015-03-18 Thread Tiejun Chen
Pass types to configure pc_init1(). Signed-off-by: Tiejun Chen --- hw/i386/pc_piix.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 07faec9..cea3a5c 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c

[Qemu-devel] [v7][PATCH 10/10] xen, gfx passthrough: add opregion mapping

2015-03-18 Thread Tiejun Chen
The OpRegion shouldn't be mapped 1:1 because the address in the host can't be used in the guest directly. This patch traps read and write access to the opregion of the Intel GPU config space (offset 0xfc). The original patch is from Jean Guyader Signed-off-by: Tiejun Chen Signed-of

[Qemu-devel] [v7][PATCH 09/10] xen, gfx passthrough: register host bridge specific to passthrough

2015-03-18 Thread Tiejun Chen
Just register that pci host bridge specific to passthrough. Signed-off-by: Tiejun Chen --- hw/i386/pc_piix.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 8fbfc09..eae2d20 100644 --- a/hw/i386/pc_piix.c +++ b

[Qemu-devel] [v7][PATCH 04/10] hw/pci-assign: split pci-assign.c

2015-03-18 Thread Tiejun Chen
We will try to reuse assign_dev_load_option_rom in xen side, and especially its a good beginning to unify pci assign codes both on kvm and xen in the future. Signed-off-by: Tiejun Chen --- hw/i386/Makefile.objs | 1 + hw/i386/kvm/pci-assign.c | 82

[Qemu-devel] [PATCH 0/6 v6] tilegx: Firstly add tilegx feature for linux-user

2015-03-18 Thread Chen Gang
After load elf64 binary, qemu tilegx can finish executing the first system call (uname) successfully in _dl_discover_osversion(), and return to __libc_start_main(). Chen Gang (6): target-tilegx: Firstly add TILE-Gx with minimized features linux-user: tilegx: Firstly add architecture related

[Qemu-devel] [PATCH 1/6 v6] target-tilegx: Firstly add TILE-Gx with minimized features

2015-03-18 Thread Chen Gang
It is the configure and build system support for TILE-Gx (tilegx will be used in configure and real sub-directory name). At present, it is linux-user only, and can finish the first system call (uname) execution in __libc_start_main(). Signed-off-by: Chen Gang --- configure

[Qemu-devel] [PATCH 2/6 v6] linux-user: tilegx: Firstly add architecture related features

2015-03-18 Thread Chen Gang
They are based on Linux kernel tilegx architecture for 64 bit binary, also based on tilegx ABI reference document. Signed-off-by: Chen Gang --- linux-user/tilegx/syscall.h| 80 linux-user/tilegx/syscall_nr.h | 278 linux-user/tilegx

[Qemu-devel] [PATCH 3/6 v6] linux-user: tilegx: Add target features support within qemu

2015-03-18 Thread Chen Gang
They are for target features within qemu which independent from outside. Signed-off-by: Chen Gang --- linux-user/tilegx/target_cpu.h | 35 +++ linux-user/tilegx/target_signal.h | 28 ++ linux-user/tilegx/target_structs.h | 48

[Qemu-devel] [PATCH 4/6 v6] linux-user: Support tilegx architecture in syscall

2015-03-18 Thread Chen Gang
Add tilegx architecture in "syscall_defs.h", all related features (ioctrl, and stat) are based on Linux kernel tilegx 64-bit implementation. Signed-off-by: Chen Gang --- linux-user/syscall_defs.h | 38 ++ 1 file changed, 34 insertions(+), 4 deletion

[Qemu-devel] [PATCH 5/6 v6] linux-user: Support tilegx architecture in linux-user

2015-03-18 Thread Chen Gang
Add main working flow feature, system call processing feature, and elf64 tilegx binary loading feature, based on Linux kernel tilegx 64-bit implementation. Signed-off-by: Chen Gang --- include/elf.h| 2 ++ linux-user/elfload.c | 23 ++ linux-user/main.c| 86

[Qemu-devel] [PATCH 6/6 v6] linux-user/syscall.c: conditionalize syscalls which are not defined in tilegx

2015-03-18 Thread Chen Gang
For tilegx, several syscall macros are not supported, so switch them to avoid building break. Signed-off-by: Chen Gang --- linux-user/syscall.c | 50 +- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux

Re: [Qemu-devel] [v7][PATCH 03/10] piix: create host bridge to passthrough

2015-03-18 Thread Chen, Tiejun
On 2015/3/18 18:21, Gerd Hoffmann wrote: On Mi, 2015-03-18 at 17:06 +0800, Tiejun Chen wrote: Implement a pci host bridge specific to passthrough. Actually this just inherits the standard one. And we also just expose a minimal real host bridge pci configuration subset. +/* Here we just

Re: [Qemu-devel] [PATCH v5 4/7] pcie_aer: expose pcie_aer_msg() interface

2015-03-18 Thread Chen Fan
On 03/18/2015 09:29 PM, Michael S. Tsirkin wrote: On Thu, Mar 12, 2015 at 06:23:56PM +0800, Chen Fan wrote: For vfio device, we need to propagate the aer error to Guest OS. we use the pcie_aer_msg() to send aer error to guest. Signed-off-by: Chen Fan Interesting. pcie_aer_inject_error was

Re: [Qemu-devel] [PATCH 1/6 v6] target-tilegx: Firstly add TILE-Gx with minimized features

2015-03-18 Thread Chen Gang
On 3/19/15 04:06, Richard Henderson wrote: > On 03/18/2015 09:34 AM, Chen Gang wrote: >> +static void gen_fnop(void) >> +{ >> +qemu_log_mask(CPU_LOG_TB_IN_ASM, "(f)nop\n"); >> +} >> + >> +static void gen_cmpltui(struct DisasContext *dc, >&

Re: [Qemu-devel] [v2][PATCH 2/2] libxl: introduce gfx_passthru_kind

2015-03-18 Thread Chen, Tiejun
This duplicates the code from above. I think this would be best done as: static int libxl__detect_gfx_passthru_kind(libxl__gc *gc, guest_config) { if (b_info->u.hvm.gfx_passthru_kind != LIBXL_GFX_PASSTHRU_KIND_DEFAULT) return 0; if (libxl__is_igd_vga_passthru(gc, guest_config)

Re: [Qemu-devel] [PATCH 1/2] cpu/apic: drop icc bus/bridge/

2015-03-19 Thread Chen Fan
On 03/17/2015 06:39 PM, Andreas Färber wrote: Am 17.03.2015 um 10:08 schrieb 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

Re: [Qemu-devel] [PATCH 1/2] cpu/apic: drop icc bus/bridge/

2015-03-19 Thread Chen Fan
On 03/18/2015 12:29 AM, Igor Mammedov wrote: On Tue, 17 Mar 2015 17:08:30 +0800 Chen Fan wrote: 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

Re: [Qemu-devel] [v2][PATCH 2/2] libxl: introduce gfx_passthru_kind

2015-03-19 Thread Chen, Tiejun
On 2015/3/19 18:44, Ian Campbell wrote: On Thu, 2015-03-19 at 10:07 +0800, Chen, Tiejun wrote: This duplicates the code from above. I think this would be best done as: static int libxl__detect_gfx_passthru_kind(libxl__gc *gc, guest_config) { if (b_info->u.hvm.gfx_passthru_k

Re: [Qemu-devel] [v2][PATCH 2/2] libxl: introduce gfx_passthru_kind

2015-03-20 Thread Chen, Tiejun
+case LIBXL_GFX_PASSTHRU_KIND_DEFAULT: +LOG(ERROR, "unable to detect required gfx_passthru_kind"); In this case you will now have logged twice. I'd suggest logging only here and not in the helper. +default: And this case is subtly different to LIBXL_GF

Re: [Qemu-devel] [v2][PATCH 2/2] libxl: introduce gfx_passthru_kind

2015-03-20 Thread Chen, Tiejun
On 2015/3/20 18:11, Ian Campbell wrote: On Fri, 2015-03-20 at 18:08 +0800, Chen, Tiejun wrote: +if (!xlu_cfg_get_string(config, "gfx_passthru_kind", &buf, 0)) { +if (libxl_gfx_passthru_kind_from_string(buf, + &b_info->u.hvm.gfx_passthru_kind)) { +

[Qemu-devel] [PATCH 0/6 v7] tilegx: Firstly add tilegx feature for linux-user

2015-03-20 Thread Chen Gang
After load elf64 binary, qemu tilegx can finish executing the first system call (uname) successfully in _dl_discover_osversion(), and return to __libc_start_main(). Chen Gang (6): target-tilegx: Firstly add TILE-Gx with minimized features linux-user: tilegx: Firstly add architecture related

[Qemu-devel] [PATCH 1/6 v7] target-tilegx: Firstly add TILE-Gx with minimized features

2015-03-20 Thread Chen Gang
It is the configure and build system support for TILE-Gx (tilegx will be used in configure and real sub-directory name). At present, it is linux-user only, and can finish the first system call (uname) execution in __libc_start_main(). Signed-off-by: Chen Gang --- configure

[Qemu-devel] [PATCH 2/6 v7] linux-user: tilegx: Firstly add architecture related features

2015-03-20 Thread Chen Gang
They are based on Linux kernel tilegx architecture for 64 bit binary, also based on tilegx ABI reference document. Signed-off-by: Chen Gang --- linux-user/tilegx/syscall.h| 80 linux-user/tilegx/syscall_nr.h | 278 linux-user/tilegx

[Qemu-devel] [PATCH 3/6 v7] linux-user: tilegx: Add target features support within qemu

2015-03-20 Thread Chen Gang
They are for target features within qemu which independent from outside. Signed-off-by: Chen Gang --- linux-user/tilegx/target_cpu.h | 35 +++ linux-user/tilegx/target_signal.h | 28 ++ linux-user/tilegx/target_structs.h | 48

[Qemu-devel] [PATCH 4/6 v7] linux-user: Support tilegx architecture in syscall

2015-03-20 Thread Chen Gang
Add tilegx architecture in "syscall_defs.h", all related features (ioctrl, and stat) are based on Linux kernel tilegx 64-bit implementation. Signed-off-by: Chen Gang --- linux-user/syscall_defs.h | 38 ++ 1 file changed, 34 insertions(+), 4 deletion

[Qemu-devel] [PATCH 5/6 v7] linux-user: Support tilegx architecture in linux-user

2015-03-20 Thread Chen Gang
Add main working flow feature, system call processing feature, and elf64 tilegx binary loading feature, based on Linux kernel tilegx 64-bit implementation. Signed-off-by: Chen Gang --- include/elf.h| 2 ++ linux-user/elfload.c | 23 ++ linux-user/main.c| 86

[Qemu-devel] [PATCH 6/6 v7] linux-user/syscall.c: conditionalize syscalls which are not defined in tilegx

2015-03-20 Thread Chen Gang
For tilegx, several syscall macros are not supported, so switch them to avoid building break. Signed-off-by: Chen Gang --- linux-user/syscall.c | 50 +- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux

[Qemu-devel] [PATCH 0/6 v7] tilegx: Firstly add tilegx feature for linux-user

2015-03-20 Thread Chen Gang
After load elf64 binary, qemu tilegx can finish executing the first system call (uname) successfully in _dl_discover_osversion(), and return to __libc_start_main(). Chen Gang (6): target-tilegx: Firstly add TILE-Gx with minimized features linux-user: tilegx: Firstly add architecture related

Re: [Qemu-devel] [PATCH 0/6 v7] tilegx: Firstly add tilegx feature for linux-user

2015-03-20 Thread Chen Gang
Sorry, I sent send the mail by my another mail address (it is incorrect). I should send them again by my xili_gchen_5...@hotmail.com. Thanks. On 3/20/15 23:18, Chen Gang wrote: > After load elf64 binary, qemu tilegx can finish executing the first > system call (uname) successfu

Re: [Qemu-devel] [PATCH 1/6 v7] target-tilegx: Firstly add TILE-Gx with minimized features

2015-03-20 Thread Chen Gang
On 3/21/15 01:48, Peter Maydell wrote: > On 20 March 2015 at 15:25, Chen Gang wrote: >> It is the configure and build system support for TILE-Gx (tilegx will be >> used in configure and real sub-directory name). >> >> At present, it is linux-user only, and can f

Re: [Qemu-devel] [PATCH 1/6 v6] target-tilegx: Firstly add TILE-Gx with minimized features

2015-03-20 Thread Chen Gang
On 3/21/15 01:03, Richard Henderson wrote: > On 03/18/2015 07:04 PM, Chen Gang wrote: >> For me, I am not quite sure about it, the related functional description >> is: >> >> rf[Dest] = signExtend32 ((int32_t) rf[SrcA] * (int32_t) rf[SrcB]); >> >> Do y

Re: [Qemu-devel] [PATCH 1/6 v7] target-tilegx: Firstly add TILE-Gx with minimized features

2015-03-20 Thread Chen Gang
On 3/21/15 01:45, Richard Henderson wrote: > On 03/20/2015 08:25 AM, Chen Gang wrote: >> +/* >> + * The related functional description for bfextu in isa document: >> + * >> + * uint64_t mask = 0; >> + * mask = (-1ULL) ^ ((-1ULL << ((BFEnd - BFStart

Re: [Qemu-devel] [PATCH 1/6 v7] target-tilegx: Firstly add TILE-Gx with minimized features

2015-03-20 Thread Chen Gang
On 3/21/15 07:30, Peter Maydell wrote: > On 20 March 2015 at 22:52, Chen Gang wrote: >> On 3/21/15 01:48, Peter Maydell wrote: >>> On 20 March 2015 at 15:25, Chen Gang wrote: >>>> 10 files changed, 3523 insertions(+) >>> >>> If you have any p

[Qemu-devel] [PATCH 00/12 v8] tilegx: Firstly add tilegx feature for linux-user

2015-03-21 Thread Chen Gang
After load elf64 binary, qemu tilegx can finish executing the first system call (uname) successfully in _dl_discover_osversion(), and return to __libc_start_main(). Chen Gang (12): linux-user: tilegx: Firstly add architecture related features linux-user: tilegx: Add target features support

[Qemu-devel] [PATCH 01/12 v8] linux-user: tilegx: Firstly add architecture related features

2015-03-21 Thread Chen Gang
They are based on Linux kernel tilegx architecture for 64 bit binary, also based on tilegx ABI reference document. Signed-off-by: Chen Gang --- linux-user/tilegx/syscall.h| 80 linux-user/tilegx/syscall_nr.h | 278 linux-user/tilegx

[Qemu-devel] [PATCH 02/12 v8] linux-user: tilegx: Add target features support within qemu

2015-03-21 Thread Chen Gang
They are for target features within qemu which independent from outside. Signed-off-by: Chen Gang --- linux-user/tilegx/target_cpu.h | 35 +++ linux-user/tilegx/target_signal.h | 28 ++ linux-user/tilegx/target_structs.h | 48

[Qemu-devel] [PATCH 03/12 v8] linux-user: Support tilegx architecture in syscall

2015-03-21 Thread Chen Gang
Add tilegx architecture in "syscall_defs.h", all related features (ioctrl, and stat) are based on Linux kernel tilegx 64-bit implementation. Signed-off-by: Chen Gang --- linux-user/syscall_defs.h | 38 ++ 1 file changed, 34 insertions(+), 4 deletion

[Qemu-devel] [PATCH 04/12 v8] linux-user: Support tilegx architecture in linux-user

2015-03-21 Thread Chen Gang
Add main working flow feature, system call processing feature, and elf64 tilegx binary loading feature, based on Linux kernel tilegx 64-bit implementation. Signed-off-by: Chen Gang --- include/elf.h| 2 ++ linux-user/elfload.c | 23 ++ linux-user/main.c| 86

[Qemu-devel] [PATCH 05/12 v8] linux-user/syscall.c: conditionalize syscalls which are not defined in tilegx

2015-03-21 Thread Chen Gang
For tilegx, several syscall macros are not supported, so switch them to avoid building break. Signed-off-by: Chen Gang --- linux-user/syscall.c | 50 +- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux

[Qemu-devel] [PATCH 06/12 v8] target-tilegx: Add TILE-Gx building files

2015-03-21 Thread Chen Gang
Add related configuration, make files for tilegx. Signed-off-by: Chen Gang --- configure | 3 +++ default-configs/tilegx-linux-user.mak | 1 + target-tilegx/Makefile.objs | 1 + 3 files changed, 5 insertions(+) create mode 100644 default-configs/tilegx

[Qemu-devel] [PATCH 07/12 v8] target-tilegx: Add cpu basic features for linux-user

2015-03-21 Thread Chen Gang
It implements minimized cpu features for linux-user. Signed-off-by: Chen Gang --- target-tilegx/cpu-qom.h | 73 target-tilegx/cpu.c | 149 target-tilegx/cpu.h | 94 ++ 3 files changed

[Qemu-devel] [PATCH 08/12 v8] target-tilegx: Add helper features for linux-user

2015-03-21 Thread Chen Gang
For supporting linux-user system call, tilegx need support exception helper features for it. Signed-off-by: Chen Gang --- target-tilegx/helper.c | 31 +++ target-tilegx/helper.h | 1 + 2 files changed, 32 insertions(+) create mode 100644 target-tilegx/helper.c

[Qemu-devel] [PATCH 09/12 v8] target-tilegx: Add opcode basic implementation for tilegx

2015-03-21 Thread Chen Gang
It is from Tilera Corporation, and copied from Linux kernel "arch/tile/ include/uapi/arch/opcode_tilegx.h". Signed-off-by: Chen Gang --- target-tilegx/opcode_tilegx.h | 1406 + 1 file changed, 1406 insertions(+) create mode 100644 tar

[Qemu-devel] [PATCH 10/12 v8] target-tilegx: Finish processing bundle and preparing decoding pipes

2015-03-21 Thread Chen Gang
Finish processing tilegx bundle, and reach to related pipes. At present, the qemu tilegx can pass building. Signed-off-by: Chen Gang --- target-tilegx/translate.c | 515 ++ 1 file changed, 515 insertions(+) create mode 100644 target-tilegx

[Qemu-devel] [PATCH 11/12 v8] target-tilegx: Decoding pipes to support finish running 1st system call

2015-03-21 Thread Chen Gang
For the instructions which need tcg generation, the decoding functions return directly, or they will direct to the exception. Signed-off-by: Chen Gang --- target-tilegx/translate.c | 704 ++ 1 file changed, 704 insertions(+) diff --git a/target

[Qemu-devel] [PATCH 12/12 v8] target-tilegx: Generate tcg instructions to execute to 1st system call

2015-03-21 Thread Chen Gang
Generate related tcg instructions, and qemu tilegx can run to 1st system call (uname) successfully in _dl_discover_osversion(), and return to __libc_start_main(). Signed-off-by: Chen Gang --- target-tilegx/translate.c | 543 ++ 1 file changed, 543

<    1   2   3   4   5   6   7   8   9   10   >