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

2015-04-10 Thread Chen Gang
On 4/11/15 05:56, Peter Maydell wrote: > On 10 April 2015 at 22:28, Chen Gang wrote: >> On 4/10/15 06:19, Peter Maydell wrote: >>> On 27 March 2015 at 11:07, Chen Gang wrote: >>>> +/* >>>> + * The related functional description for bfextu in isa doc

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

2015-04-10 Thread Chen Gang
On 4/11/15 05:51, Peter Maydell wrote: > On 10 April 2015 at 21:41, Chen Gang wrote: >> On 4/10/15 05:31, Peter Maydell wrote: >>> On 27 March 2015 at 10:49, Chen Gang wrote: >>>> +typedef struct target_sigaltstack { >>>> +abi_ulong ss_sp; >&

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

2015-04-15 Thread Chen Fan
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 Williamson wrote: On Wed, 2015-03-25 at 09:53 +0800, Chen Fan

[Qemu-devel] [RFC 2/7] qemu: add guest init event callback to do the initialize work for guest

2015-04-17 Thread Chen Fan
Signed-off-by: Chen Fan --- src/qemu/qemu_domain.h | 7 +++ src/qemu/qemu_driver.c | 32 src/qemu/qemu_process.c | 22 ++ 3 files changed, 61 insertions(+) diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 3225abb

[Qemu-devel] [RFC 1/7] qemu-agent: add agent init callback when detecting guest setup

2015-04-17 Thread Chen Fan
sometimes, we want to do some initialize work in guest when guest startup, but currently, qemu-agent doesn't support that. so here we add an init callback, when guest startup, notify libvirt it has been up, then libvirt can do some work for guest. Signed-off-by: Chen Fan --- src

[Qemu-devel] [RFC 0/7] Live Migration with Pass-through Devices proposal

2015-04-17 Thread Chen Fan
we should consider bonding driver to support add interfaces dynamically. This is an example on how this might work, so I want to hear some voices about this scenario. Thanks, Chen Chen Fan (7): qemu-agent: add agent init callback when detecting guest setup qemu: add guest init event cal

[Qemu-devel] [RFC 5/7] hostdev: add parse ip and route for bond configure

2015-04-17 Thread Chen Fan
bond device always need to configure the ip address and route way address. so here we add the interface. xml like: Signed-off-by: Chen Fan --- docs/schemas/domaincommon.rng | 21 +++ src/conf/domain_conf.c| 87

[Qemu-devel] [RFC 0/3] add support migration with passthrough device

2015-04-17 Thread Chen Fan
the patches is for libvirt to support migration with passthrough device using existing feacture. Chen Fan (3): qemu-agent: add guest-network-set-interface command qemu-agent: add guest-network-delete-interface command qemu-agent: add notify for qemu-ga boot configure| 16

[Qemu-devel] [RFC 4/7] qemu-agent: add qemuAgentCreateBond interface

2015-04-17 Thread Chen Fan
via initialize callback to create bond device. Signed-off-by: Chen Fan --- src/qemu/qemu_agent.c | 118 src/qemu/qemu_agent.h | 10 src/qemu/qemu_domain.c | 70 src/qemu/qemu_domain.h | 7 +++ src/qemu

[Qemu-devel] [RFC 3/7] hostdev: add a 'bond' type element in element

2015-04-17 Thread Chen Fan
this 'bond' element is to create bond device when guest startup, the xml like: Signed-off-by: Chen Fan --- docs/schemas/basictypes.rng | 6 ++ docs/schemas/domaincommon.rng | 16 ++ src/conf/domain_conf.c

[Qemu-devel] [RFC 3/3] qemu-agent: add notify for qemu-ga boot

2015-04-17 Thread Chen Fan
Signed-off-by: Chen Fan --- qga/main.c | 13 + 1 file changed, 13 insertions(+) diff --git a/qga/main.c b/qga/main.c index 9939a2b..f011ce0 100644 --- a/qga/main.c +++ b/qga/main.c @@ -1170,6 +1170,19 @@ int main(int argc, char **argv) g_critical("failed to initialize

[Qemu-devel] [RFC 6/7] migrate: hot remove hostdev at perform phase for bond device

2015-04-17 Thread Chen Fan
For bond device, we can support the migrate, we can simple to hot remove the device from source side, and after migration end, we hot add the new device at destination side. Signed-off-by: Chen Fan --- src/qemu/qemu_driver.c| 57 +++ src/qemu

[Qemu-devel] [RFC 7/7] migrate: add hostdev migrate status to support hostdev migration

2015-04-17 Thread Chen Fan
we add a migrate status for hostdev to specify the device don't need to initialze when VM startup, after migration end, we add the migrate status hostdev, so can support hostdev migration. Signed-off-by: Chen Fan --- src/conf/domain_conf.c| 3 ++ src/conf/domain_conf.h| 7

[Qemu-devel] [RFC 1/3] qemu-agent: add guest-network-set-interface command

2015-04-17 Thread Chen Fan
"bond" interface. the active-backup mode can be used for an automatic switch. so this patch is adding a guest-network-set-interface command for creating bond device. so the management can easy to create a bond device dynamically when guest running. Signed-off-by: Chen Fan --- configure

[Qemu-devel] [RFC 2/3] qemu-agent: add guest-network-delete-interface command

2015-04-17 Thread Chen Fan
Add a corresponding command to guest-network-set-interface. Signed-off-by: Chen Fan --- qga/commands-posix.c | 51 +++ qga/commands-win32.c | 6 ++ qga/qapi-schema.json | 11 +++ 3 files changed, 68 insertions(+) diff --git a/qga

[Qemu-devel] [Bug 1446726] [NEW] qemu stable 2.0 crashes during loadvm

2015-04-21 Thread Liang Chen
Public bug reported: Qemu output: 2015-03-06 01:06:54.255+: starting up LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin QEMU_AUDIO_DRV=none /usr/bin/qemu-system-x86_64 -name instance-462a -S -machine pc-i440fx-trusty,accel=kvm,usb=off -cpu Westmere,+erms,+sm

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

2015-04-21 Thread Chen Gang
On 4/11/15 05:28, Chen Gang wrote: > On 4/10/15 06:19, Peter Maydell wrote: >> On 27 March 2015 at 11:07, Chen Gang wrote: >>> +} >>> + >>> +static void gen_cmpltui(struct DisasContext *dc, >>> +uint8_t rdst, uint8_t rsr

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

2015-04-21 Thread Chen Gang
On 4/22/15 05:15, Peter Maydell wrote: > On 21 April 2015 at 22:01, Chen Gang wrote: >> On 4/11/15 05:28, Chen Gang wrote: >>> On 4/10/15 06:19, Peter Maydell wrote: >>>> On 27 March 2015 at 11:07, Chen Gang wrote: >>>>> +} >>>>&

Re: [Qemu-devel] [libvirt] [RFC 0/7] Live Migration with Pass-through Devices proposal

2015-04-21 Thread Chen Fan
Hi Laine, Thanks for your review for my patches. and do you know that solarflare's patches have made some update version since https://www.redhat.com/archives/libvir-list/2012-November/msg01324.html ? if not, I hope to go on to complete this work. ;) Thanks, Chen On 04/20/2015 06:

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

2015-04-22 Thread Chen Gang
On 4/22/15 05:31, Peter Maydell wrote: > On 21 April 2015 at 22:23, Chen Gang wrote: >> On 4/22/15 05:15, Peter Maydell wrote: >>> will work in place of both of the above (and does this CPU >>> really only have two kinds of compare-immediate? Some of the >>>

Re: [Qemu-devel] [libvirt] [RFC 0/7] Live Migration with Pass-through Devices proposal

2015-04-23 Thread Chen Fan
On 04/20/2015 06:29 AM, Laine Stump wrote: On 04/17/2015 04:53 AM, Chen Fan wrote: backgrond: Live migration is one of the most important features of virtualization technology. With regard to recent virtualization techniques, performance of network I/O is critical. Current network I/O

[Qemu-devel] [Consult] tilegx: Is it a qemu's system bug?

2015-04-25 Thread Chen Gang
==ts->val_type: 0. /* end: I add related printing log in tcg_reg_alloc_op() before assertion */ qemu-tilegx: /upstream/qemu/tcg/tcg.c:1982: tcg_reg_alloc_op: Assertion `ts->val_type == 1' failed. Welcome any ideas, suggestions and completions. Thanks. -- Chen Gang Open,

Re: [Qemu-devel] [Consult] tilegx: Is it a qemu's system bug?

2015-04-25 Thread Chen Gang
On 4/26/15 03:30, Richard Henderson wrote: > On 04/25/2015 05:12 AM, Chen Gang wrote: >> Hello All: >> >> I want to consult an issue I met below for the latest master branch, is >> it a qemu's bug? (it is about ctz/cnttz instruction for tilegx) &g

[Qemu-devel] [Consult] About SPRs information

2015-04-27 Thread Chen Gang
on qemu before trying to make a case for it internally, though. > Hello all: Now, I am blocked at SPRs: "mtspr SPR_CMPEXCH_VALUE %r12", and trying to solve it. And welcome any ideas, suggestions and completions for it. Thanks. > On 2/15/2015 10:40 PM, Chen Gang S wrote: >

Re: [Qemu-devel] [Consult] About SPRs information

2015-04-28 Thread Chen Gang
On 4/28/15 06:04, Richard Henderson wrote: > On 04/27/2015 02:12 PM, Chen Gang wrote: >> Now, I am blocked at SPRs: "mtspr SPR_CMPEXCH_VALUE %r12", and trying to >> solve it. > > SPR_CMPEXCH_VALUE should be present in your cpu structure, should be a TCGv > lik

Re: [Qemu-devel] [Consult] About SPRs information

2015-04-28 Thread Chen Gang
On 4/29/15 04:19, Chen Gang wrote: > On 4/28/15 06:04, Richard Henderson wrote: >> On 04/27/2015 02:12 PM, Chen Gang wrote: >>> Now, I am blocked at SPRs: "mtspr SPR_CMPEXCH_VALUE %r12", and trying to >>> solve it. >> >> SPR_CMPEXCH_VALUE should b

[Qemu-devel] [PATCH RFC v6 11/11] vfio: add bus reset notifier for host bus reset

2015-04-29 Thread Chen Fan
add host secondary bus reset for vfio when AER occurs, if reset failed, we should stop vm. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 151 +- 1 file changed, 138 insertions(+), 13 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c

[Qemu-devel] [PATCH RFC v6 02/11] aer: impove pcie_aer_init to support vfio device

2015-04-29 Thread Chen Fan
pcie_aer_init was used to emulate an aer capability for pcie device, but for vfio device, the aer config space size is mutable and is not always equal to PCI_ERR_SIZEOF(0x48). it depends on where the TLP Prefix register required, so here we add a size argument. Signed-off-by: Chen Fan --- hw

[Qemu-devel] [PATCH RFC v6 04/11] pcie_aer: expose pcie_aer_msg() interface

2015-04-29 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

[Qemu-devel] [PATCH RFC v6 00/11] vfio-pci: pass the aer error to guest

2015-04-29 Thread Chen Fan
e extended capabilities. v2-v3: 1. refactor vfio device to parse extended capability. 2. add global property for piix4 to disable vfio aer cap. v1-v2: 1. turn on SERR# for bridge control register in firmware. 2. initilize aer capability for vfio device. 3. fix some trivial bug. Ch

[Qemu-devel] [PATCH RFC v6 01/11] vfio: add pcie extanded capability support

2015-04-29 Thread Chen Fan
For vfio pcie device, we could expose the extended capability on PCIE bus. in order to avoid config space broken, we introduce a copy config for parsing extended caps. and rebuild the pcie extended config space. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 73

[Qemu-devel] [PATCH RFC v6 06/11] vfio: add 'aer' property to expose aercap

2015-04-29 Thread Chen Fan
add 'aer' property to let user able to decide whether expose the aer capability. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index cdd8f24..c306efc 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c

[Qemu-devel] [PATCH RFC v6 03/11] vfio: add aer support for vfio device

2015-04-29 Thread Chen Fan
Calling pcie_aer_init to initilize aer related registers for vfio device, then reload physical related registers to expose device capability. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 47 ++- 1 file changed, 46 insertions(+), 1 deletion(-) diff

[Qemu-devel] [PATCH RFC v6 08/11] vfio: extract vfio_get_hot_reset_info as a single function

2015-04-29 Thread Chen Fan
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 | 69 --- 1 file changed, 47 insertions(+), 22 deletions(-) diff --git a/hw/vfio/pci.c b

[Qemu-devel] [PATCH RFC v6 05/11] vfio-pci: pass the aer error to guest

2015-04-29 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 5069141..cdd8f24 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3248,18 +3248,40 @@ static void vfio_put_device

[Qemu-devel] [PATCH RFC v6 07/11] pc: add HW_COMPAT_2_2 to disable aercap for vifo device

2015-04-29 Thread Chen Fan
for piix4 chipset, we don't need to expose aer, so introduce HW_COMPAT_2_2 to disable aercap for all lower than 2.3. Signed-off-by: Chen Fan --- hw/i386/pc_q35.c| 4 include/hw/compat.h | 8 2 files changed, 12 insertions(+) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_

[Qemu-devel] [PATCH RFC v6 09/11] qdev: add bus reset_notifiers callbacks for host bus reset

2015-04-29 Thread Chen Fan
when recovery AER, we always need to reset the host bus to recovery the devices under the bus, so add pci bus callbacks to reset host bus when vfio support AER. Signed-off-by: Chen Fan --- hw/pci/pci.c | 6 ++ hw/pci/pci_bridge.c | 3 +++ include/hw/pci/pci.h | 2

[Qemu-devel] [PATCH RFC v6 10/11] vfio: squeeze out vfio_pci_do_hot_reset for support bus reset

2015-04-29 Thread Chen Fan
squeeze out vfio_pci_do_hot_reset to do host bus reset when AER recovery. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 75 +++ 1 file changed, 44 insertions(+), 31 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index b42c2a4

Re: [Qemu-devel] [Consult] About SPRs information

2015-04-29 Thread Chen Gang
On 4/29/15 05:43, Peter Maydell wrote: > On 28 April 2015 at 22:32, Chen Gang wrote: >> The related information for cmpexch instruction: >> >> Description >> >> Compare the 8-byte contents of the CmpValue SPR with the 8-byte >> value in memory

Re: [Qemu-devel] [PATCH RFC v6 11/11] vfio: add bus reset notifier for host bus reset

2015-04-29 Thread Chen Fan
On 04/30/2015 01:32 AM, Alex Williamson wrote: On Wed, 2015-04-29 at 16:48 +0800, Chen Fan wrote: add host secondary bus reset for vfio when AER occurs, if reset failed, we should stop vm. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 151

Re: [Qemu-devel] [PATCH 09/10 v10] target-tilegx: Generate tcg instructions to execute to _init_malloc in glib

2015-05-14 Thread Chen Gang
On 5/12/15 00:55, Richard Henderson wrote: > On 05/10/2015 03:45 PM, Chen Gang wrote: >> > +static void gen_cmpltsi(struct DisasContext *dc, >> > +uint8_t rdst, uint8_t rsrc, int8_t imm8) >> > +{ >> > +qemu_log_mask(CPU

Re: [Qemu-devel] [PATCH 09/10 v10] target-tilegx: Generate tcg instructions to execute to _init_malloc in glib

2015-05-14 Thread Chen Gang
On 5/12/15 00:55, Richard Henderson wrote: > On 05/10/2015 03:45 PM, Chen Gang wrote: >> > +static void gen_cmpltsi(struct DisasContext *dc, >> > +uint8_t rdst, uint8_t rsrc, int8_t imm8) >> > +{ >> > +qemu_log_mask(CPU

Re: [Qemu-devel] [PATCH 09/10 v10] target-tilegx: Generate tcg instructions to execute to _init_malloc in glib

2015-05-14 Thread Chen Gang
On 5/12/15 00:55, Richard Henderson wrote: > On 05/10/2015 03:45 PM, Chen Gang wrote: >> > +static void gen_cmpltsi(struct DisasContext *dc, >> > +uint8_t rdst, uint8_t rsrc, int8_t imm8) >> > +{ >> > +qemu_log_mask(CPU

Re: [Qemu-devel] [PATCH 09/10 v10] target-tilegx: Generate tcg instructions to execute to _init_malloc in glib

2015-05-14 Thread Chen Gang
On 5/12/15 00:55, Richard Henderson wrote: > On 05/10/2015 03:45 PM, Chen Gang wrote: >>> +static void gen_cmpltsi(struct DisasContext *dc, >>> +uint8_t rdst, uint8_t rsrc, int8_t imm8) >>> +{ >>> +qemu_log_mask(CPU

Re: [Qemu-devel] [PATCH 05/10 v10] target-tilegx/opcode_tilegx.h: Modify it to fit qemu using

2015-05-18 Thread Chen Gang
Hello All: I also found another bug: I did not set the system call error number to r1 register, which will cause new_heap() fail although mmap64 succeed. Hope it is my last bug for printing "Hello world" executable binary. Thanks. On 05/12/2015 07:16 PM, Chen Gang wrote: > On 05/

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

2015-05-18 Thread Chen Fan
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, 46 insertions(+), 17 deletions(-) diff --git a/hw/vfio/pci.c b

[Qemu-devel] [RFC v7 02/11] vfio: squeeze out vfio_pci_do_hot_reset for support bus reset

2015-05-18 Thread Chen Fan
squeeze out vfio_pci_do_hot_reset to do host bus reset when AER recovery. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 75 +++ 1 file changed, 44 insertions(+), 31 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index fe4963f

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

2015-05-18 Thread Chen Fan
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. Signed-off-by: Chen Fan --- hw/pci/pci.c | 6

[Qemu-devel] [RFC v7 09/11] pcie_aer: expose pcie_aer_msg() interface

2015-05-18 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

[Qemu-devel] [RFC v7 08/11] vfio: add aer support for vfio device

2015-05-18 Thread Chen Fan
Calling pcie_aer_init to initilize aer related registers for vfio device, then reload physical related registers to expose device capability. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 49 - 1 file changed, 48 insertions(+), 1 deletion(-) diff

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

2015-05-18 Thread Chen Fan
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 +++ 1 file changed, 83

[Qemu-devel] [RFC v7 00/11] vfio-pci: pass the aer error to guest

2015-05-18 Thread Chen Fan
capability for vfio device. 3. fix some trivial bug. Chen Fan (11): vfio: extract vfio_get_hot_reset_info as a single function vfio: squeeze out vfio_pci_do_hot_reset for support bus reset qdev: add bus reset_notifiers callbacks for host bus reset vfio: add check host bus reset is supp

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

2015-05-18 Thread Chen Fan
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/vfio-common.h | 1 - 2 files changed, 11 insertions(+), 2 deletions

[Qemu-devel] [RFC v7 06/11] vfio: add pcie extanded capability support

2015-05-18 Thread Chen Fan
For vfio pcie device, we could expose the extended capability on PCIE bus. in order to avoid config space broken, we introduce a copy config for parsing extended caps. and rebuild the pcie extended config space. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 73

[Qemu-devel] [RFC v7 07/11] aer: impove pcie_aer_init to support vfio device

2015-05-18 Thread Chen Fan
pcie_aer_init was used to emulate an aer capability for pcie device, but for vfio device, the aer config space size is mutable and is not always equal to PCI_ERR_SIZEOF(0x48). it depends on where the TLP Prefix register required, so here we add a size argument. Signed-off-by: Chen Fan --- hw

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

2015-05-18 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 61a348e..f2fc5d6 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3296,18 +3296,40 @@ static void vfio_put_device

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

2015-05-18 Thread Chen Fan
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. Signed-off-by: Chen Fan --- hw/i386/pc_q35.c| 4 +++ hw/vfio/pci.c

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 prev

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

2015-05-20 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: 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

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

2015-05-20 Thread Chen, Tiejun
On 2015/3/26 16:15, Michael S. Tsirkin wrote: On Thu, Mar 26, 2015 at 03:57:18PM +0800, Chen, Tiejun wrote: Michael and Gerd, I don't see any more comments for this revision, so what's next that I should do? Thanks Tiejun On 2015/3/19 9:01, Chen, Tiejun wrote: It's only been

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

2015-05-20 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: 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

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

2015-05-20 Thread Chen Fan
On 05/21/2015 02:47 AM, Alex Williamson wrote: On Wed, 2015-05-20 at 11:43 +0800, Chen Fan wrote: 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

Re: [Qemu-devel] [PATCH 05/10 v10] target-tilegx/opcode_tilegx.h: Modify it to fit qemu using

2015-05-21 Thread Chen Gang
After fix additional 3 bugs (one for mnz, one for mz, one for v1cmpeqi), at present, tilegx linux user can print "Hello World"! :-) I shall reconstruct/prepare the code and send patch v11 for review within this month. Thanks. On 5/19/15 10:47, Chen Gang wrote: > Hello All: >

Re: [Qemu-devel] [PATCH 05/10 v10] target-tilegx/opcode_tilegx.h: Modify it to fit qemu using

2015-05-21 Thread Chen Gang
On 05/22/2015 07:40 AM, Chris Metcalf wrote: > Congratulations! > Again, really thank all of you very much!! :-) >> On May 21, 2015, at 4:58 PM, Chen Gang wrote: >> >> >> After fix additional 3 bugs (one for mnz, one for mz, one for v1cmpeqi), >> at

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

2015-05-22 Thread Chen Fan
On 05/20/2015 10:53 PM, Igor Mammedov wrote: On Wed, 20 May 2015 10:40:48 +0800 Zhu Guihua wrote: 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

Re: [Qemu-devel] [PATCH 05/10 v10] target-tilegx/opcode_tilegx.h: Modify it to fit qemu using

2015-05-24 Thread Chen Gang
For "Hello world" with shared glibc, it needs to implement additional instructions and fix one additional bug (it is about syscall_nr.h: need stat64 and fstatat64). I shall send patch v11 within this month. :-) Thanks. On 5/22/15 09:48, Chen Gang wrote: > On 05/22/2015 07:40 AM,

[Qemu-devel] [RFC v8 01/13] vfio: extract vfio_get_hot_reset_info as a single function

2015-05-25 Thread Chen Fan
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 | 67 +++ 1 file changed, 49 insertions(+), 18 deletions(-) diff --git a/hw/vfio/pci.c b

[Qemu-devel] [RFC v8 03/13] vfio: add pcie extanded capability support

2015-05-25 Thread Chen Fan
For vfio pcie device, we could expose the extended capability on PCIE bus. in order to avoid config space broken, we introduce a copy config for parsing extended caps. and rebuild the pcie extended config space. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 73

[Qemu-devel] [RFC v8 00/13] vfio-pci: pass the aer error to guest

2015-05-25 Thread Chen Fan
ge control register in firmware. 2. initilize aer capability for vfio device. 3. fix some trivial bug. Chen Fan (13): vfio: extract vfio_get_hot_reset_info as a single function vfio: squeeze out vfio_pci_do_hot_reset for support bus reset vfio: add pcie extanded capability support a

[Qemu-devel] [RFC v8 02/13] vfio: squeeze out vfio_pci_do_hot_reset for support bus reset

2015-05-25 Thread Chen Fan
squeeze out vfio_pci_do_hot_reset to do host bus reset when AER recovery. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 75 +++ 1 file changed, 44 insertions(+), 31 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 9c05304

[Qemu-devel] [RFC v8 04/13] aer: impove pcie_aer_init to support vfio device

2015-05-25 Thread Chen Fan
pcie_aer_init was used to emulate an aer capability for pcie device, but for vfio device, the aer config space size is mutable and is not always equal to PCI_ERR_SIZEOF(0x48). it depends on where the TLP Prefix register required, so here we add a size argument. Signed-off-by: Chen Fan --- hw

[Qemu-devel] [RFC v8 10/13] vfio: do hot bus reset when do virtual secondary bus reset

2015-05-25 Thread Chen Fan
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 | 8 1 file changed, 8 insertions(+) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 94ff4e1..29a2b12 100644

[Qemu-devel] [RFC v8 08/13] pci: add bus reset_notifiers callbacks for host bus reset

2015-05-25 Thread Chen Fan
Particularly, For vfio devices, 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. Cc: Michael S. Tsirkin Signed-off-by: Chen Fan --- hw/pci

[Qemu-devel] [RFC v8 12/13] vfio-pci: pass the aer error to guest

2015-05-25 Thread Chen Fan
-off-by: Chen Fan --- hw/vfio/pci.c | 42 -- 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 29a2b12..b297d7c 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3348,18 +3348,48 @@ static void vfio_put_device

[Qemu-devel] [RFC v8 05/13] vfio: add aer support for vfio device

2015-05-25 Thread Chen Fan
Calling pcie_aer_init to initilize aer related registers for vfio device, then reload physical related registers to expose device capability. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 83 ++- 1 file changed, 82 insertions(+), 1 deletion

[Qemu-devel] [RFC v8 06/13] vfio: add check host bus reset is support or not

2015-05-25 Thread Chen Fan
we introduce a has_bus_reset capability to sign the vfio devices if support host bus reset. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 113 ++ 1 file changed, 113 insertions(+) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index f4e7855

[Qemu-devel] [RFC v8 07/13] vfio: add check for vfio devices which enable aer should support bus reset

2015-05-25 Thread Chen Fan
Signed-off-by: Chen Fan --- hw/vfio/pci.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 15f182c..6de268d 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3791,6 +3791,32 @@ out: g_free(info); } +static void

[Qemu-devel] [RFC v8 13/13] vfio: add 'aer' property to expose aercap

2015-05-25 Thread Chen Fan
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. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/vfio/pci.c b/hw/

[Qemu-devel] [RFC v8 09/13] vfio: add sec_bus_reset notifier to notify physical bus reset is needed

2015-05-25 Thread Chen Fan
Signed-off-by: Chen Fan --- hw/vfio/pci.c | 17 + 1 file changed, 17 insertions(+) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 6de268d..94ff4e1 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -156,6 +156,7 @@ typedef struct VFIOPCIDevice { PCIHostDeviceAddress host

[Qemu-devel] [RFC v8 11/13] pcie_aer: expose pcie_aer_msg() interface

2015-05-25 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 05/10 v10] target-tilegx/opcode_tilegx.h: Modify it to fit qemu using

2015-05-25 Thread Chen Gang
ses which I can find, and begin make patches for tilegx, next. Welcome any ideas, suggestions and completions (e.g. for test cases). If no additional reply, I shall send patches for tilegx within 4 days. Thanks. On 5/25/15 06:03, Chen Gang wrote: > > For "Hello world" with

Re: [Qemu-devel] [PATCH 09/10 v10] target-tilegx: Generate tcg instructions to execute to _init_malloc in glib

2015-05-26 Thread Chen Gang
On 5/12/15 05:26, Chen Gang wrote: >>> >> +} >>> >> + >>> >> +/* >>> >> + * Functional Description >>> >> + * >>> >> + *uint64_t output = 0; >>> >

[Qemu-devel] [RFC v8.1 00/13] vfio-pci: pass the aer error to guest

2015-05-26 Thread Chen Fan
y for vfio device. 3. fix some trivial bug. Chen Fan (13): vfio: extract vfio_get_hot_reset_info as a single function vfio: squeeze out vfio_pci_do_hot_reset for support bus reset vfio: add pcie extanded capability support aer: impove pcie_aer_init to support vfio device vfio: add a

[Qemu-devel] [RFC v8.1 03/13] vfio: add pcie extanded capability support

2015-05-26 Thread Chen Fan
For vfio pcie device, we could expose the extended capability on PCIE bus. in order to avoid config space broken, we introduce a copy config for parsing extended caps. and rebuild the pcie extended config space. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 73

[Qemu-devel] [RFC v8.1 01/13] vfio: extract vfio_get_hot_reset_info as a single function

2015-05-26 Thread Chen Fan
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 | 67 +++ 1 file changed, 49 insertions(+), 18 deletions(-) diff --git a/hw/vfio/pci.c b

[Qemu-devel] [RFC v8.1 04/13] aer: impove pcie_aer_init to support vfio device

2015-05-26 Thread Chen Fan
pcie_aer_init was used to emulate an aer capability for pcie device, but for vfio device, the aer config space size is mutable and is not always equal to PCI_ERR_SIZEOF(0x48). it depends on where the TLP Prefix register required, so here we add a size argument. Signed-off-by: Chen Fan --- hw

[Qemu-devel] [RFC v8.1 06/13] vfio: add check host bus reset is support or not

2015-05-26 Thread Chen Fan
we introduce a has_bus_reset capability to sign the vfio devices if support host bus reset. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 123 ++ 1 file changed, 123 insertions(+) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index f4e7855

[Qemu-devel] [RFC v8.1 05/13] vfio: add aer support for vfio device

2015-05-26 Thread Chen Fan
Calling pcie_aer_init to initilize aer related registers for vfio device, then reload physical related registers to expose device capability. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 83 ++- 1 file changed, 82 insertions(+), 1 deletion

[Qemu-devel] [RFC v8.1 07/13] vfio: add check for vfio devices which enable aer should support bus reset

2015-05-26 Thread Chen Fan
Signed-off-by: Chen Fan --- hw/vfio/pci.c | 32 1 file changed, 32 insertions(+) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 5934fd7..91ad9ad 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3801,6 +3801,33 @@ out: g_free(info); } +static void

[Qemu-devel] [RFC v8.1 10/13] vfio: do hot bus reset when do virtual secondary bus reset

2015-05-26 Thread Chen Fan
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 | 75 +++ 1 file changed, 75 insertions(+) diff --git a/hw/vfio

[Qemu-devel] [RFC v8.1 08/13] pci: add bus reset_notifiers callbacks for host bus reset

2015-05-26 Thread Chen Fan
Particularly, For vfio devices, 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. Signed-off-by: Chen Fan --- hw/pci/pci.c | 16

[Qemu-devel] [RFC v8.1 11/13] pcie_aer: expose pcie_aer_msg() interface

2015-05-26 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

[Qemu-devel] [RFC v8.1 09/13] vfio: add sec_bus_reset notifier to notify physical bus reset is needed

2015-05-26 Thread Chen Fan
Signed-off-by: Chen Fan --- hw/vfio/pci.c | 17 + 1 file changed, 17 insertions(+) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 91ad9ad..a8c5988 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -156,6 +156,7 @@ typedef struct VFIOPCIDevice { PCIHostDeviceAddress host

[Qemu-devel] [RFC v8.1 13/13] vfio: add 'aer' property to expose aercap

2015-05-26 Thread Chen Fan
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. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/vfio/pci.c b/hw/

Re: [Qemu-devel] [RFC v8 00/13] vfio-pci: pass the aer error to guest

2015-05-26 Thread Chen Fan
multi in-use when call hot reset. meantime I have sent the new v8.1 version out. please ignore this patches. Thanks, Chen On 05/25/2015 06:06 PM, Chen Fan wrote: For now, for vfio pci passthough devices when qemu receives an error from host aer report, there just terminate the guest, but

[Qemu-devel] [RFC v8.1 12/13] vfio-pci: pass the aer error to guest

2015-05-26 Thread Chen Fan
-off-by: Chen Fan --- hw/vfio/pci.c | 42 -- 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index b05ccdf..855a0a6 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3348,18 +3348,48 @@ static void vfio_put_device

[Qemu-devel] [PATCH] docs/writing-qmp-commands: fix a typo

2015-05-29 Thread Chen Hanxiao
s/interation/iteration Signed-off-by: Chen Hanxiao --- docs/writing-qmp-commands.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/writing-qmp-commands.txt b/docs/writing-qmp-commands.txt index f3df206..ab1fdd3 100644 --- a/docs/writing-qmp-commands.txt +++ b/docs

Re: [Qemu-devel] [PATCH 09/10 v10] target-tilegx: Generate tcg instructions to execute to _init_malloc in glib

2015-05-29 Thread Chen Gang
; ++count) { > extract_v1(tmp, vsrc, count); > tcg_gen_setcondi_i64(TCG_COND_EQ, tmp, tmp, imm8); > insert_v1(vdst, tmp, count); > } > It also needs "tcg_gen_movi_i64(vdst, 0);" or will generate assertion `ts->val_type == TEMP_VAL_REG' in debug mode. And I shall try to send patch within one day (sorry for a little late). Thanks. -- Chen Gang Open, share, and attitude like air, water, and life which God blessed

[Qemu-devel] [PATCH 00/10 v11] tilegx: Firstly add tilegx target for linux-user

2015-05-30 Thread Chen Gang
./tilegx-linux-user/qemu-tilegx /upstream/release-tile/test/test_static ./tilegx-linux-user/qemu-tilegx -d all /upstream/release-tile/test/test_static > /tmp/d.log Chen Gang (10): linux-user: tilegx: Firstly add architecture related features linux-user: Support tilegx architecture in li

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

2015-05-30 Thread Chen Gang
They are based on Linux kernel tilegx architecture for 64 bit binary, and also based on tilegx ABI reference document, and also reference from other targets implementations. Signed-off-by: Chen Gang --- linux-user/tilegx/syscall.h| 35 linux-user/tilegx/syscall_nr.h | 324

<    4   5   6   7   8   9   10   11   12   13   >