[Qemu-devel] [PATCH 3/3] deal with guest panicked event

2012-05-20 Thread Wen Congyang
When the guest is panicked, it will write 0x1 to the port 0x505. So if qemu reads 0x1 from this port, we can do the folloing three things according to the parameter -onpanic: 1. emit QEVENT_GUEST_PANICKED only 2. emit QEVENT_GUEST_PANICKED and pause VM 3. emit QEVENT_GUEST_PANICKED and quit VM Not

[Qemu-devel] [PATCH 2/3] update linux headers

2012-05-20 Thread Wen Congyang
Signed-off-by: Wen Congyang --- linux-headers/linux/kvm_para.h |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/linux-headers/linux/kvm_para.h b/linux-headers/linux/kvm_para.h index 7bdcf93..5618758 100644 --- a/linux-headers/linux/kvm_para.h +++ b/linux-headers/lin

[Qemu-devel] [PATCH 1/3] start vm after reseting it

2012-05-20 Thread Wen Congyang
The guest should run after reseting it, but it does not run if its old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED. Signed-off-by: Wen Congyang --- vl.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 23ab3a3..7f5fed8 100644 --- a/vl.c +++ b/v

[Qemu-devel] [PATCH] kvm: notify host when guest panicked

2012-05-20 Thread Wen Congyang
We can know the guest is panicked when the guest runs on xen. But we do not have such feature on kvm. Another purpose of this feature is: management app(for example: libvirt) can do auto dump when the guest is panicked. If management app does not do auto dump, the guest's user can do dump by hand

Re: [Qemu-devel] ppc: CPU reset must flush translation buffer

2012-05-20 Thread Benjamin Herrenschmidt
On Mon, 2012-05-21 at 08:16 +0200, Alexander Graf wrote: > > On 21.05.2012, at 04:01, Benjamin Herrenschmidt > wrote: > > > Without that, reset from SLOF crashes in full emulation. > > > > Reported-by: Thomas Huth > > Signed-off-by: Benjamin Herrenschmidt > > --- > > target-ppc/translate_init

Re: [Qemu-devel] [PATCH 01/15] Openrisc: add target stub

2012-05-20 Thread Jia Liu
Hi Blue, On Sat, May 19, 2012 at 4:51 PM, Blue Swirl wrote: > On Thu, May 17, 2012 at 8:35 AM, Jia Liu wrote: >> add the openrisc target stub and basic implementation. >> >> Signed-off-by: Jia Liu >> --- >>  Makefile.target                  |    3 + >>  arch_init.c                      |    2 +

Re: [Qemu-devel] [PATCH 02/15] Openrisc: add MMU support

2012-05-20 Thread Jia Liu
Hi Blue, On Sat, May 19, 2012 at 3:41 PM, Blue Swirl wrote: > On Thu, May 17, 2012 at 8:35 AM, Jia Liu wrote: >> add the openrisc MMU support. >> >> Signed-off-by: Jia Liu >> --- >>  Makefile.target              |    2 + >>  hw/openrisc_cpudev.h         |   30 ++ >>  hw/openrisc_pic.c      

Re: [Qemu-devel] ppc: CPU reset must flush translation buffer

2012-05-20 Thread Alexander Graf
On 21.05.2012, at 04:01, Benjamin Herrenschmidt wrote: > Without that, reset from SLOF crashes in full emulation. > > Reported-by: Thomas Huth > Signed-off-by: Benjamin Herrenschmidt > --- > target-ppc/translate_init.c |1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --

[Qemu-devel] Weird iscsi/fd-event issue since recent merge of event system changes

2012-05-20 Thread ronnie sahlberg
List, Kevin, Since this merge : commit 1f8bcac09af61e58c5121aa0a932190700ad554d Merge: cb4c254 1042ec9 Author: Anthony Liguori Date: Mon Apr 23 14:27:04 2012 -0500 Merge remote-tracking branch 'kwolf/for-anthony' into staging * kwolf/for-anthony: (38 commits) qemu-iotests: Fix t

Re: [Qemu-devel] Memory Tracking API

2012-05-20 Thread Jaspal
On 05/18/2012 12:17 AM, Richard W.M. Jones wrote: On Thu, May 17, 2012 at 11:36:24PM +0530, Jaspal wrote: Hi , Is it possible to keep a count of reads / writes taking place in a vm using qemu ( using kvm as hypervisor ) ? Is there a api ( or any patch ) for it ? Memory reads and writes is sure

Re: [Qemu-devel] [PATCH 01/15] Openrisc: add target stub

2012-05-20 Thread Jia Liu
Hi Andreas, Thanks, I'm trying fix them all. On Thu, May 17, 2012 at 10:14 PM, Andreas Färber wrote: > Am 17.05.2012 10:35, schrieb Jia Liu: >> add the openrisc target stub and basic implementation. >> >> Signed-off-by: Jia Liu >> --- >> diff --git a/target-openrisc/cpu-qom.h b/target-openrisc/

[Qemu-devel] ppc: CPU reset must flush translation buffer

2012-05-20 Thread Benjamin Herrenschmidt
Without that, reset from SLOF crashes in full emulation. Reported-by: Thomas Huth Signed-off-by: Benjamin Herrenschmidt --- target-ppc/translate_init.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index ae0306

[Qemu-devel] [PATCH] Add a memory barrier to guest memory access functions

2012-05-20 Thread Benjamin Herrenschmidt
The emulated devices can run simultaneously with the guest, so we need to be careful with ordering of load and stores done by them to the guest system memory, which need to be observed in the right order by the guest operating system. This adds barriers to some standard guest memory access functio

[Qemu-devel] [PATCH 06/13 - UPDATED] ide/ahci: Use universal DMA helper functions

2012-05-20 Thread Benjamin Herrenschmidt
The AHCI device can provide both PCI and SysBus AHCI device emulations. For this reason, it wasn't previously converted to use the pci_dma_*() helper functions. Now that we have universal DMA helper functions, this converts AHCI to use them. The DMAContext is obtained from pci_dma_context() in t

Re: [Qemu-devel] [PATCH qom-next v2 1/3] xilinx_zynq: Use cpu_arm_init() to obtain ARMCPU

2012-05-20 Thread Peter Crosthwaite
Cant see it affecting the change pattern to the zynq boot though, so theres no blocker. Acked-by: Peter A.G. Crosthwaite On Sat, May 19, 2012 at 2:01 AM, Andreas Färber wrote: > Needed for arm_load_kernel(). > > Signed-off-by: Andreas Färber > --- >  hw/xilinx_zynq.c |    8 >  1 files

Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function

2012-05-20 Thread Benjamin Herrenschmidt
On Sat, 2012-05-19 at 09:24 +0200, Paolo Bonzini wrote: > I guess the C11/C++ guys required an isync barrier after either loads or > stores, because they need to order the load/store vs. code accessing > other memory. This is not needed in QEMU because all guest accesses go > through cpu_physical

Re: [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Gleb Natapov
On Sun, May 20, 2012 at 12:39:13PM -0400, Kevin O'Connor wrote: > On Sun, May 20, 2012 at 07:25:40PM +0300, Avi Kivity wrote: > > On 05/20/2012 07:16 PM, Kevin O'Connor wrote: > > > > Here we in agreement, and I was against patching till it was > > > > unavoidable, > > > > but than pci hotplug sta

Re: [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Kevin O'Connor
On Sun, May 20, 2012 at 07:25:40PM +0300, Avi Kivity wrote: > On 05/20/2012 07:16 PM, Kevin O'Connor wrote: > > > Here we in agreement, and I was against patching till it was unavoidable, > > > but than pci hotplug started using it, and afterwards processor > > > definitions, so no point in avoidin

Re: [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Avi Kivity
On 05/20/2012 07:16 PM, Kevin O'Connor wrote: > > Here we in agreement, and I was against patching till it was unavoidable, > > but than pci hotplug started using it, and afterwards processor > > definitions, so no point in avoiding it now by using inferior methods. > > I agree as well. > > What's

Re: [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Kevin O'Connor
On Sun, May 20, 2012 at 06:15:44PM +0300, Gleb Natapov wrote: > On Sun, May 20, 2012 at 05:46:46PM +0300, Avi Kivity wrote: > > On 05/20/2012 05:43 PM, Gleb Natapov wrote: > > > > > > > > Or it can be a fixed address in low memory, or a scratch register in > > > > hardware. > > > > > > > Both wil

Re: [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Kevin O'Connor
On Sun, May 20, 2012 at 04:39:01PM +0300, Avi Kivity wrote: > What about > > If (Fcfg(...)) { > Method()... > } > > ? > > (i.e.. define the method conditionally at runtime) As Gleb points out, this wont work. AML defines a static device/method/variable tree heirarchy. Only the ret

Re: [Qemu-devel] [RFC][PATCH v2 00/11] uq/master: irqfd-based interrupt injection for virtio/vhost

2012-05-20 Thread Michael S. Tsirkin
On Thu, May 17, 2012 at 10:32:28AM -0300, Jan Kiszka wrote: > After this series, to only reasons to still use qemu-kvm for production > purposes will be PCI device assignment Yay! By the way, there are probably not many reasons to keep the assignment code out of qemu.git. It duplicates a ton of c

Re: [Qemu-devel] [PATCH] PPC: mpc8544ds: Span initial TLB entry over as much RAM as we need

2012-05-20 Thread Alexander Graf
On 20.05.2012, at 15:58, Andreas Färber wrote: > Am 19.05.2012 00:53, schrieb Alexander Graf: >> The initial TLB entry is supposed to help us run the guest -kernel payload. >> This means the guest needs to be able to access its own memory, the initrd >> memory and the device tree. >> >> So far

Re: [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Gleb Natapov
On Sun, May 20, 2012 at 05:46:46PM +0300, Avi Kivity wrote: > On 05/20/2012 05:43 PM, Gleb Natapov wrote: > > > > > > Or it can be a fixed address in low memory, or a scratch register in > > > hardware. > > > > > Both will work (fixed addresses are better be avoided and who needs > > another PV d

Re: [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Avi Kivity
On 05/20/2012 05:43 PM, Gleb Natapov wrote: > > > > Or it can be a fixed address in low memory, or a scratch register in > > hardware. > > > Both will work (fixed addresses are better be avoided and who needs > another PV device), but I do not see how either of them is better then > patching. Wha

Re: [Qemu-devel] [RFC][PATCH v2 00/11] uq/master: irqfd-based interrupt injection for virtio/vhost

2012-05-20 Thread Avi Kivity
On 05/20/2012 05:42 PM, Michael S. Tsirkin wrote: > On Thu, May 17, 2012 at 10:32:28AM -0300, Jan Kiszka wrote: > > After this series, to only reasons to still use qemu-kvm for production > > purposes will be PCI device assignment > > Yay! > > By the way, there are probably not many reasons to keep

Re: [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Gleb Natapov
On Sun, May 20, 2012 at 05:34:56PM +0300, Avi Kivity wrote: > On 05/20/2012 04:57 PM, Gleb Natapov wrote: > > On Sun, May 20, 2012 at 04:39:01PM +0300, Avi Kivity wrote: > > > On 05/20/2012 03:59 PM, Gleb Natapov wrote: > > > > > > > > > > > > > > > > > > Do we actually have to patch the DSDT? Or

Re: [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Avi Kivity
On 05/20/2012 04:57 PM, Gleb Natapov wrote: > On Sun, May 20, 2012 at 04:39:01PM +0300, Avi Kivity wrote: > > On 05/20/2012 03:59 PM, Gleb Natapov wrote: > > > > > > > > > > > > > > > > Do we actually have to patch the DSDT? Or can _S3 etc be made > > > > > > > > into > > > > > > > > functions i

Re: [Qemu-devel] [RFC][PATCH v2 00/11] uq/master: irqfd-based interrupt injection for virtio/vhost

2012-05-20 Thread Avi Kivity
On 05/17/2012 04:32 PM, Jan Kiszka wrote: > [ changes in v2: rebase over uq/master ] > > This series is another major milestone of merging qemu-kvm into > upstream. It implements the required interfaces and logic to directly > inject MSI-X interrupts generated by the vhost-net kernel module into >

Re: [Qemu-devel] [PATCH 01/15] Openrisc: add target stub

2012-05-20 Thread Andreas Färber
Am 18.05.2012 04:56, schrieb 陳韋任: >>> This is a mix of two ways of doing the same thing. You should only use >>> VMState for new code. >>> >> >> did you mean I should not use QEMUFile? > > I guess what Andreas means is there are two ways to do cpu_save/cpu_load, > the one you wrote is the old st

Re: [Qemu-devel] [PATCH 01/15] Openrisc: add target stub

2012-05-20 Thread Andreas Färber
Am 19.05.2012 10:51, schrieb Blue Swirl: > On Thu, May 17, 2012 at 8:35 AM, Jia Liu wrote: >> + >> +typedef struct CPUOPENRISCState CPUOPENRISCState; >> +struct CPUOPENRISCState { >> +target_ulong gpr[32]; /* General registers */ >> +uint32_t sr;/* Supervisor register */ >> +

Re: [Qemu-devel] Is it possible to retrieve pre-process information in QEMU?

2012-05-20 Thread Mulyadi Santosa
Hi... On Thu, May 17, 2012 at 10:09 AM, 陳韋任 wrote: > Hi all, > >  I would like to know if I can retrieve pre-process information in QEMU > system mode. For example, I want to know each process's page fault ratio. > Is there a way to do that? logically, it's possible, but you need to locate the t

Re: [Qemu-devel] [PATCH] PPC: mpc8544ds: Span initial TLB entry over as much RAM as we need

2012-05-20 Thread Andreas Färber
Am 19.05.2012 00:53, schrieb Alexander Graf: > The initial TLB entry is supposed to help us run the guest -kernel payload. > This means the guest needs to be able to access its own memory, the initrd > memory and the device tree. > > So far we only statically reserved a TLB entry from [0;256M[. Th

Re: [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Gleb Natapov
On Sun, May 20, 2012 at 04:39:01PM +0300, Avi Kivity wrote: > On 05/20/2012 03:59 PM, Gleb Natapov wrote: > > > > > > > > > > > > > > Do we actually have to patch the DSDT? Or can _S3 etc be made > > > > > > > into > > > > > > > functions instead? (and talk to the bios, or even to fwcfg > > > >

Re: [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Avi Kivity
On 05/20/2012 03:59 PM, Gleb Natapov wrote: > > > > > > > > > > > > Do we actually have to patch the DSDT? Or can _S3 etc be made into > > > > > > functions instead? (and talk to the bios, or even to fwcfg > > > > > > directly?) > > > > > > > > > > > We better not talk to fwcfg after OSPM is st

Re: [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Gleb Natapov
On Sun, May 20, 2012 at 03:47:02PM +0300, Avi Kivity wrote: > On 05/20/2012 03:36 PM, Gleb Natapov wrote: > > On Sun, May 20, 2012 at 03:30:50PM +0300, Avi Kivity wrote: > > > On 05/20/2012 03:15 PM, Gleb Natapov wrote: > > > > On Sun, May 20, 2012 at 02:44:51PM +0300, Avi Kivity wrote: > > > > > O

Re: [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Avi Kivity
On 05/20/2012 03:36 PM, Gleb Natapov wrote: > On Sun, May 20, 2012 at 03:30:50PM +0300, Avi Kivity wrote: > > On 05/20/2012 03:15 PM, Gleb Natapov wrote: > > > On Sun, May 20, 2012 at 02:44:51PM +0300, Avi Kivity wrote: > > > > On 05/20/2012 12:03 PM, Gleb Natapov wrote: > > > > > QEMU may want to

Re: [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Gleb Natapov
On Sun, May 20, 2012 at 03:30:50PM +0300, Avi Kivity wrote: > On 05/20/2012 03:15 PM, Gleb Natapov wrote: > > On Sun, May 20, 2012 at 02:44:51PM +0300, Avi Kivity wrote: > > > On 05/20/2012 12:03 PM, Gleb Natapov wrote: > > > > QEMU may want to disable guest's S3/S4 support and it wants to > > > >

Re: [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Avi Kivity
On 05/20/2012 03:15 PM, Gleb Natapov wrote: > On Sun, May 20, 2012 at 02:44:51PM +0300, Avi Kivity wrote: > > On 05/20/2012 12:03 PM, Gleb Natapov wrote: > > > QEMU may want to disable guest's S3/S4 support and it wants to distinguish > > > between regular powerdown and S4 powerdown. To support tha

Re: [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Gleb Natapov
On Sun, May 20, 2012 at 02:44:51PM +0300, Avi Kivity wrote: > On 05/20/2012 12:03 PM, Gleb Natapov wrote: > > QEMU may want to disable guest's S3/S4 support and it wants to distinguish > > between regular powerdown and S4 powerdown. To support that new fw_cfg > > option was added that passes suppor

Re: [Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Avi Kivity
On 05/20/2012 12:03 PM, Gleb Natapov wrote: > QEMU may want to disable guest's S3/S4 support and it wants to distinguish > between regular powerdown and S4 powerdown. To support that new fw_cfg > option was added that passes supported system states and what value should > guest use to enter each st

Re: [Qemu-devel] [SeaBIOS] [PATCH 1/3] Fix aml_name_string() to recognize block name modifiers.

2012-05-20 Thread Gleb Natapov
On Sun, May 20, 2012 at 01:32:18PM +0300, Alon Levy wrote: > On Sun, May 20, 2012 at 12:03:38PM +0300, Gleb Natapov wrote: > > > > Signed-off-by: Gleb Natapov > > --- > > tools/acpi_extract.py |6 +- > > 1 files changed, 5 insertions(+), 1 deletions(-) > > > > diff --git a/tools/acpi_ex

Re: [Qemu-devel] [SeaBIOS] [PATCH 1/3] Fix aml_name_string() to recognize block name modifiers.

2012-05-20 Thread Alon Levy
On Sun, May 20, 2012 at 12:03:38PM +0300, Gleb Natapov wrote: > > Signed-off-by: Gleb Natapov > --- > tools/acpi_extract.py |6 +- > 1 files changed, 5 insertions(+), 1 deletions(-) > > diff --git a/tools/acpi_extract.py b/tools/acpi_extract.py > index 5f613e4..8038269 100755 > --- a/to

Re: [Qemu-devel] [PATCH v3] pci: call object_unparent() before free_qdev()

2012-05-20 Thread Michael S. Tsirkin
On Sun, May 20, 2012 at 05:57:45PM +0800, Amos Kong wrote: > Start VM with 8 multiple-function block devs, hot-removing > those block devs by 'device_del ...' would cause qemu abort. > > | (qemu) device_del virti0-0-0 > | (qemu) ** > |ERROR:qom/object.c:389:object_delete: assertion failed: (obj->r

Re: [Qemu-devel] [Qemu-ppc] [PATCH] booke_206_tlbwe: Discard invalid bits in MAS2

2012-05-20 Thread Alexander Graf
On 20.05.2012, at 12:15, Alexander Graf wrote: > > > On 09.05.2012, at 15:28, Fabien Chouteau wrote: > >> The size of EPN field in MAS2 depends on page size. This patch adds a >> mask to discard invalid bits in EPN field. >> >> Definition of EPN field from e500v2 RM: >> EPN Effective page

Re: [Qemu-devel] [PATCH] booke_206_tlbwe: Discard invalid bits in MAS2

2012-05-20 Thread Alexander Graf
On 09.05.2012, at 15:28, Fabien Chouteau wrote: > The size of EPN field in MAS2 depends on page size. This patch adds a > mask to discard invalid bits in EPN field. > > Definition of EPN field from e500v2 RM: > EPN Effective page number: Depending on page size, only the bits > associated with

[Qemu-devel] [PATCH v3] pci: call object_unparent() before free_qdev()

2012-05-20 Thread Amos Kong
Start VM with 8 multiple-function block devs, hot-removing those block devs by 'device_del ...' would cause qemu abort. | (qemu) device_del virti0-0-0 | (qemu) ** |ERROR:qom/object.c:389:object_delete: assertion failed: (obj->ref == 0) It's a regression introduced by commit 57c9fafe The whole PC

[Qemu-devel] [PATCH 3/3] Get system state configuration from QEMU and patch DSDT with it.

2012-05-20 Thread Gleb Natapov
QEMU may want to disable guest's S3/S4 support and it wants to distinguish between regular powerdown and S4 powerdown. To support that new fw_cfg option was added that passes supported system states and what value should guest use to enter each state. States are passed in 6 byte array. Each byte re

[Qemu-devel] [PATCH 2/3] Add ACPI_EXTRACT_PKG_START macro parsing

2012-05-20 Thread Gleb Natapov
It allows to extract the beginning of a Package object content. Signed-off-by: Gleb Natapov --- tools/acpi_extract.py | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/tools/acpi_extract.py b/tools/acpi_extract.py index 8038269..167a322 100755 --- a/tools/acpi_

[Qemu-devel] [PATCH 1/3] Fix aml_name_string() to recognize block name modifiers.

2012-05-20 Thread Gleb Natapov
Signed-off-by: Gleb Natapov --- tools/acpi_extract.py |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/tools/acpi_extract.py b/tools/acpi_extract.py index 5f613e4..8038269 100755 --- a/tools/acpi_extract.py +++ b/tools/acpi_extract.py @@ -121,7 +121,11 @@ def aml_nam

[Qemu-devel] [PATCH 1/2] Make pointer to fw_cfg device global.

2012-05-20 Thread Gleb Natapov
There can be only one fw_cfg device, so saving global reference to it removes the need to pass its pointer around. Signed-off-by: Gleb Natapov --- hw/fw_cfg.c | 110 +++-- hw/fw_cfg.h | 15 +++ hw/loader.c | 10 + hw/

[Qemu-devel] [PATCH 2/2] Add PIIX4 properties to control PM system states.

2012-05-20 Thread Gleb Natapov
This patch adds two things. First it allows QEMU to distinguish between regular powerdown and S4 powerdown. Later separate QMP notification will be added for S4 powerdown. Second it allows S3/S4 states to be disabled from QEMU command line. Some guests known to be broken with regards to power manag