[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

[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 g...@redhat.com --- hw/fw_cfg.c | 110 +++-- hw/fw_cfg.h | 15 +++ hw/loader.c |

[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 g...@redhat.com --- 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

[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 g...@redhat.com --- 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

[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

[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

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 chout...@adacore.com 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

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 ag...@suse.de wrote: On 09.05.2012, at 15:28, Fabien Chouteau chout...@adacore.com 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:

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-ref ==

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 g...@redhat.com --- 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

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 g...@redhat.com --- tools/acpi_extract.py |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git

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

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 supported

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 that new

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 distinguish

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 disable

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: On 05/20/2012

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 started since this is firmware

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 directly?) We

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[. This

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, 陳韋任 che...@iis.sinica.edu.tw 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

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 pro...@gmail.com wrote: + +typedef struct CPUOPENRISCState CPUOPENRISCState; +struct CPUOPENRISCState { +target_ulong gpr[32]; /* General registers */ +uint32_t sr;/* Supervisor register

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 style. For the

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 the

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 instead? (and talk to the bios, or

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 can _S3 etc be

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 the

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. What is your

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 device), but I do

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 afaer...@suse.de 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.

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

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 return

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 will work (fixed

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 the

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 avoiding it now

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 started using it,

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

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 peter.crosthwa...@petalogix.com On Sat, May 19, 2012 at 2:01 AM, Andreas Färber afaer...@suse.de wrote: Needed for arm_load_kernel(). Signed-off-by: Andreas Färber

[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

[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

[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 th...@linux.vnet.ibm.com Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org --- target-ppc/translate_init.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git

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 afaer...@suse.de wrote: Am 17.05.2012 10:35, schrieb Jia Liu: add the openrisc target stub and basic implementation. Signed-off-by: Jia Liu pro...@gmail.com --- diff --git

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