[Qemu-devel] [PATCH 1/2] scsi bus: introduce hotplug() and hot_unplug() interfaces for SCSI bus

2012-06-19 Thread Cong Meng
Add two interfaces hotplug() and hot_unplug() to scsi bus info. The embody scsi bus can implement these two interfaces to signal the HBA driver of guest kernel to add/remove the scsi device in question. Signed-off-by: Cong Meng Signed-off-by: Sen Wang --- hw/scsi-bus.c | 16 +++-

[Qemu-devel] [PATCH 2/2] virtio-scsi: Implement hotplug support for virtio-scsi

2012-06-19 Thread Cong Meng
Implement the hotplug() and hot_unplug() interfaces in virtio-scsi, by signal the virtio_scsi.ko in guest kernel via event virtual queue. The counterpart patch of virtio_scsi.ko will be sent soon in another thread. Signed-off-by: Cong Meng Signed-off-by: Sen Wang --- hw/virtio-scsi.c | 72 ++

[Qemu-devel] [PATCH 0/2] Hotplug support for virtio-scsi

2012-06-19 Thread Cong Meng
These patches implement the hotplug support for virtio-scsi. When a new device attaches/detaches to virtio-scsi bus via device_add/device_del commands, the HBA driver in guest kernel will be signaled to add/remove the scsi device. Cong Meng (2): scsi bus: introduce hotplug() and hot_unplug() int

Re: [Qemu-devel] [PATCH v5 11/16] target-or32: Add a IIS dummy board

2012-06-19 Thread Max Filippov
On 06/18/2012 05:02 AM, Jia Liu wrote: > Add a dummy board for IIS. > > Signed-off-by: Jia Liu [...] > +if (nd_table[0].vlan) { > +isa_ne2000_init(isa_bus, 0x9200, 4,&nd_table[0]); > +} I have noticed that the kernel you provided expects OpenCores ethernet device. We have a

Re: [Qemu-devel] [PATCH 07/13] usb: Convert usb_packet_{map, unmap} to universal DMA helpers

2012-06-19 Thread Gerd Hoffmann
Hi, >> Like with any other device, it's hard ... what would happen on real >> hardware is that the USB controller will get a target abort, which will >> result in the controller reporting an error (typically in the PCI status >> register) and stopping. Not that hard, code to cancel in-flight tr

[Qemu-devel] [PATCH v3 3/6] hmp: rename arguments

2012-06-19 Thread Amos Kong
Rename 'string' to 'keys', rename 'hold_time' to 'hold-time'. Signed-off-by: Amos Kong --- hmp-commands.hx |2 +- monitor.c | 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index 30243b6..e336251 100644 --- a/hmp-co

[Qemu-devel] [PATCH v3 5/6] qapi: convert sendkey

2012-06-19 Thread Amos Kong
Convert 'sendkey' to use QAPI. do_sendkey() depends on some variables/functions in monitor.c, so reserve qmp_sendkey() to monitor.c key_defs[] in monitor.c is the mapping of key name to keycode, Keys' order in the enmu and key_defs[] is same. Signed-off-by: Amos Kong --- hmp-commands.hx |2

[Qemu-devel] [PATCH v3 1/6] fix doc of using raw values with sendkey

2012-06-19 Thread Amos Kong
(qemu) sendkey a (qemu) sendkey 0x1e (qemu) sendkey #0x1e unknown key: '#0x1e' The last command doesn't work, '#' is not requested before raw values. And the raw value in decimal format is also not supported. Signed-off-by: Amos Kong --- hmp-commands.hx |6 +++--- 1 files changed, 3 insert

[Qemu-devel] [PATCH v3 6/6] ps2: output warning when event queue full

2012-06-19 Thread Amos Kong
Event would be ignored if ps2 queue is full, this patch added a warning in ignore path. Signed-off-by: Amos Kong --- hw/ps2.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/ps2.c b/hw/ps2.c index f93cd24..799c36b 100644 --- a/hw/ps2.c +++ b/hw/ps2.c @@ -137,8 +137

[Qemu-devel] [PATCH v3 4/6] qapi: generate list struct and visit_list for enum

2012-06-19 Thread Amos Kong
Currently, if define an 'enum' and use it in one command's data, List struct for enum could not be generated, but it's used in qmp function. For example: KeyCodesList could not be generated. >>> qapi-schema.json: { 'enum': 'KeyCodes', 'data': [ 'shift', 'alt' ... ] } { 'command': 'sendkey', 'd

[Qemu-devel] [PATCH v3 2/6] monitor: rename keyname '<' to 'less'

2012-06-19 Thread Amos Kong
There are many maps of keycode 0x56 in pc-bios/keymaps/* pc-bios/keymaps/common:less 0x56 pc-bios/keymaps/common:greater 0x56 shift pc-bios/keymaps/common:bar 0x56 altgr pc-bios/keymaps/common:brokenbar 0x56 shift altgr This patch just renames '<' to 'less', QAPI would add new variable by

[Qemu-devel] [PATCH v3 0/6] convert sendkey to qapi

2012-06-19 Thread Amos Kong
This series converted 'sendkey' command to qapi. The raw value in hexadecimal format is not supported by 'sendkey' of qmp. Amos Kong (6): fix doc of using raw values with sendkey monitor: rename keyname '<' to 'less' hmp: rename arguments qapi: generate list struct and visit_list for enum

[Qemu-devel] [PATCH] target-i386: Use QEMU instead of Qemu

2012-06-19 Thread Stefan Weil
This new 'QEmu' was recently added. Replace it by the official all upper case 'QEMU'. Signed-off-by: Stefan Weil --- Hopefully those 'Qemu' and 'QEmu' variants will stop as soon as my patch for checkpatch.pl was applied. target-i386/cpu.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-

Re: [Qemu-devel] [PATCH 07/13] usb: Convert usb_packet_{map, unmap} to universal DMA helpers

2012-06-19 Thread Benjamin Herrenschmidt
On Wed, 2012-06-20 at 13:14 +1000, David Gibson wrote: > So, in fact the original comment is a bit out of date. With the > current version of this series, then a guest attempt to invalidate > will be delayed until the unmap occurs. No, this code was dropped, including the tracking of the maps, f

Re: [Qemu-devel] [PATCH 07/13] usb: Convert usb_packet_{map, unmap} to universal DMA helpers

2012-06-19 Thread David Gibson
On Wed, Jun 20, 2012 at 06:23:58AM +1000, Benjamin Herrenschmidt wrote: > On Tue, 2012-06-19 at 15:42 +0200, Gerd Hoffmann wrote: > > Well, that isn't guaranteed ... > > > > > - otherwise the guest > > > might invalidate IOMMU mappings while they are still in use by the device > > > code. > > > >

Re: [Qemu-devel] [PATCHv3 12/14] unicore32-softmmu: Add puv3 dma support

2012-06-19 Thread Guan Xuetao
On Mon, 2012-06-18 at 19:59 +, Blue Swirl wrote: [snip] > > + > > +#define PUV3_DMA_CH_NR (6) > > +#define PUV3_DMA_CH_MASK(0xff) > > +#define PUV3_DMA_CH(offset) ((offset) >> 8) > > + > > +typedef struct { > > +SysBusDevice busdev; > > +MemoryRegion iomem; > > +

Re: [Qemu-devel] [PATCHv3 11/14] unicore32-softmmu: Add puv3 pm support

2012-06-19 Thread Guan Xuetao
On Mon, 2012-06-18 at 20:05 +, Blue Swirl wrote: [snip] > > +static void puv3_pm_write(void *opaque, target_phys_addr_t offset, > > +uint64_t value, unsigned size) > > +{ > > +PUV3PMState *s = (PUV3PMState *) opaque; > > + > > +switch (offset) { > > +case 0x0: > > +s

Re: [Qemu-devel] [PATCHv3 07/14] unicore32-softmmu: Add puv3 soc/board support

2012-06-19 Thread Guan Xuetao
On Mon, 2012-06-18 at 20:02 +, Blue Swirl wrote: [snip] > > diff --git a/hw/puv3.h b/hw/puv3.h > > new file mode 100644 > > index 000..bcfc978 > > --- /dev/null > > +++ b/hw/puv3.h > > @@ -0,0 +1,49 @@ > > +/* > > + * Misc PKUnity SoC declarations > > + * > > + * Copyright (C) 2010-2012 Gua

Re: [Qemu-devel] [PATCH 14/16] cadence_gem: avoid stack-writing buffer-overrun

2012-06-19 Thread Peter Crosthwaite
I re-sent this yesterday to trivial. May end up getting queued for merge twice. On Tue, Jun 19, 2012 at 11:31 PM, Peter Maydell wrote: > From: Jim Meyering > > Use sizeof(rxbuf)-size (not sizeof(rxbuf-size)) as the number > of bytes to clear.  The latter would always clear 4 or 8 > bytes, possi

Re: [Qemu-devel] [PATCH v2 1/2] arm_boot: Assume Linux boot flow when -dtb given

2012-06-19 Thread Peter Crosthwaite
It matches my flow in the real hardware. Heres the scenario where we need this (FYI applies to both microblaze and arm): User creates a Linux elf that includes a built in dtb. Slave mode bootloader boots the real hardware with the elf (my actual real JTAG bootloader work with elfs). However QEMU

Re: [Qemu-devel] [PATCHv3 02/14] unicore32-softmmu: Add coprocessor 0(sysctrl) and 1(ocd) instruction support

2012-06-19 Thread Guan Xuetao
On Mon, 2012-06-18 at 19:51 +, Blue Swirl wrote: > On Mon, Jun 18, 2012 at 9:24 AM, Guan Xuetao wrote: > > Coprocessor 0 is system control coprocessor, and we need get/set its > > contents. > > Also, all cache/tlb ops shoule be implemented here, but just ignored with > > no harm. > > > > Cop

Re: [Qemu-devel] [PATCH] hw/cadence_gem: Make rx_desc_addr and tx_desc_addr uint32_t

2012-06-19 Thread Peter Crosthwaite
On Wed, May 23, 2012 at 3:02 AM, Peter Maydell wrote: > Make the state fields rx_desc_addr and tx_desc_addr uint32_t; > this matches the VMStateDescription, and also conforms to how > hardware works: the registers don't magically become larger > if the device is attached to a CPU with a larger phy

Re: [Qemu-devel] Cant Upload tests to Wiki

2012-06-19 Thread Peter Crosthwaite
On Tue, Jun 19, 2012 at 11:57 PM, Anthony Liguori wrote: > On 06/19/2012 01:18 AM, Peter Crosthwaite wrote: >> >> Hi, >> >> I'm trying to upload my little endian Microblaze test vector to the >> wiki, but the file upload restrictions are for images only and file >> size<  2MB. Can we relax these s

[Qemu-devel] [Patch V10 3/5] i.MX31: Timers

2012-06-19 Thread Peter Chubb
Implement the timers on the Freescale i.MX31 SoC. This is not a complete implementation, but gives enough for Linux to boot and run. In particular external triggers, which are not useful under QEMU, are not implemented. Signed-off-by: Philip O'Sullivan Signed-off-by: Peter Chubb --- hw/arm/M

[Qemu-devel] [Patch V10 4/5] i.MX31: Interrupt Controller

2012-06-19 Thread Peter Chubb
Implement the Freescale i.MX31 advanced vectored interrupt controller, at least to the extent it is used by Linux 3.x Vectors are not implemented. Signed-off-by: Philip O'Sullivan Signed-off-by: Peter Chubb Reviewed-by: Peter Maydell --- hw/arm/Makefile.objs |2 hw/imx_avic.c|

[Qemu-devel] [Patch V10 1/5] i.MX: UART support

2012-06-19 Thread Peter Chubb
Implement the Freescale i.MX UART. This uart is used in a variety of SoCs, including some by Motorola, as well as in the Freescale i.MX series. This patch gives only a `bare-bones' implementation, enough to run Linux or OKL4, but that's about it. Signed-off-by: Philip O'Sullivan Signed-off-by

[Qemu-devel] [Patch V10 2/5] i.MX31: Clock Control Module

2012-06-19 Thread Peter Chubb
For Linux to be able to work out how fast its clocks are going, so that timer ticks come approximately at the right time, it needs to be able to query the clock control module (CCM). This is the start of a CCM implementation. It currently knows only about the MCU, HSP and IPG clocks --- i.e., t

[Qemu-devel] [Patch V10 5/5] i.MX31: KZM-ARM11-01 evaluation board

2012-06-19 Thread Peter Chubb
Board support for Kyoto Micro's KZM-ARM11-01, an evaluation board built around the Freescale i.MX31. Signed-off-by: Philip O'Sullivan Signed-off-by: Peter Chubb --- MAINTAINERS |6 + hw/arm/Makefile.objs |1 hw/kzm.c | 154 +++

[Qemu-devel] [Patch V10 0/5] i.MX31: Add initial support

2012-06-19 Thread Peter Chubb
Changes since V9: Added MAINTAINERS entry, rebased (and tested) against git tip. Peter C -- Dr Peter Chubb peter.chubb AT nicta.com.au http://www.ssrg.nicta.com.au Software Systems Research Group/NICTA

Re: [Qemu-devel] [PATCH v5 12/16] target-or32: Add system instructions

2012-06-19 Thread Jia Liu
Hi Blue, On Wed, Jun 20, 2012 at 2:25 AM, Blue Swirl wrote: > On Tue, Jun 19, 2012 at 8:02 AM, Jia Liu wrote: >> Hi Blue, >> >> Thank you for review. >> Is this code OK? >> >> void HELPER(mtspr)(CPUOpenRISCState * env, >>                   target_ulong ra, target_ulong rb, target_ulong offset) >

Re: [Qemu-devel] vm state save/restore question

2012-06-19 Thread Alexander Graf
On 20.06.2012, at 01:52, Benjamin Herrenschmidt wrote: > On Wed, 2012-06-20 at 01:30 +0200, Alexander Graf wrote: >>> We support the paravirtualized -M pseries in full emu as well, in which >>> case the hashed page table is handled by qemu itself who implements the >>> H_ENTER & co hypercalls. So

Re: [Qemu-devel] vm state save/restore question

2012-06-19 Thread Benjamin Herrenschmidt
On Wed, 2012-06-20 at 01:30 +0200, Alexander Graf wrote: > > We support the paravirtualized -M pseries in full emu as well, in which > > case the hashed page table is handled by qemu itself who implements the > > H_ENTER & co hypercalls. So it's very similar, except that qemu doesn't > > have to as

Re: [Qemu-devel] vm state save/restore question

2012-06-19 Thread Alexander Graf
On 20.06.2012, at 01:28, Benjamin Herrenschmidt wrote: > On Wed, 2012-06-20 at 01:11 +0200, Juan Quintela wrote: >> >>> I am confident I can come up with something as far as the kernel and >>> qemu <-> kernel interface goes. I need to get my head around the details >>> on how to implement that t

Re: [Qemu-devel] vm state save/restore question

2012-06-19 Thread Benjamin Herrenschmidt
On Wed, 2012-06-20 at 01:11 +0200, Juan Quintela wrote: > > > I am confident I can come up with something as far as the kernel and > > qemu <-> kernel interface goes. I need to get my head around the details > > on how to implement that two stage save process in qemu though and the > > correspondi

[Qemu-devel] [PATCH v2] Fixes related to processing of qemu's -numa option

2012-06-19 Thread Chegu Vinod
From: root Changes since v1: - Use bitmap functions that are already in qemu (instead of cpu_set_t macro's) - Added a check for endvalue >= max_cpus. - Fix to address the round-robbing assignment (for the case when cpu's are not explicitly specified) Note: Continuing t

Re: [Qemu-devel] vm state save/restore question

2012-06-19 Thread Juan Quintela
Benjamin Herrenschmidt wrote: > On Wed, 2012-06-20 at 00:55 +0200, Juan Quintela wrote: >> >> This was going to be my question. >> >> If we can do something like: send hash register, and get a bitmap of >> the >> ones that get changed, we should be good. Perhaps we need something >> "interestin

Re: [Qemu-devel] vm state save/restore question

2012-06-19 Thread Benjamin Herrenschmidt
On Wed, 2012-06-20 at 00:55 +0200, Juan Quintela wrote: > > This was going to be my question. > > If we can do something like: send hash register, and get a bitmap of > the > ones that get changed, we should be good. Perhaps we need something > "interesting" like removing old entries (no clue if

Re: [Qemu-devel] vm state save/restore question

2012-06-19 Thread Juan Quintela
Alexander Graf wrote: > On 19.06.2012, at 22:30, Benjamin Herrenschmidt wrote: > >> On Tue, 2012-06-19 at 16:59 +0200, Juan Quintela wrote: > - The hash table (mentioned above). This is just a big chunk of >>> memory > (it will routinely be 16M), so I really don't want to start >>> iterati

Re: [Qemu-devel] vm state save/restore question

2012-06-19 Thread Benjamin Herrenschmidt
On Wed, 2012-06-20 at 00:27 +0200, Alexander Graf wrote: > > > I need to understand better how do that vs. qemu save/restore > though. IE. That means > > we can't just save the hash as a bulk and reload it, but we'd have > to save bits of > > it at a time or something like that no ? Or do we save

Re: [Qemu-devel] vm state save/restore question

2012-06-19 Thread Alexander Graf
On 19.06.2012, at 23:51, Benjamin Herrenschmidt wrote: > On Tue, 2012-06-19 at 23:48 +0200, Alexander Graf wrote: >>> We could keep track manually maybe using some kind of dirty bitmap of >>> changes to the hash table but that would add overhead to things like >>> H_ENTER. >> >> Only during migr

[Qemu-devel] [PATCH 08/17] net: Remove VLANState

2012-06-19 Thread zwu . kernel
From: Stefan Hajnoczi VLANState is no longer used and can be removed. Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- hw/dp8393x.c|1 - hw/exynos4_boards.c |2 +- hw/highbank.c |2 +- hw/integratorcp.c |2 +- hw/mcf5208.c|2 +- hw/mcf_

Re: [Qemu-devel] [PATCH] tci: don't write zero for reloc in tci_out_label

2012-06-19 Thread Peter Maydell
On 19 June 2012 22:52, Scott Wood wrote: > On 06/19/2012 12:53 AM, Stefan Weil wrote: >> I saw from git history that ppc once had the same bug. >> The sparc backend (and maybe others) might still have it. > > SPARC looks wrong; the others look OK as far as I can tell from a quick > glance, without

Re: [Qemu-devel] [PATCH] tci: don't write zero for reloc in tci_out_label

2012-06-19 Thread Scott Wood
On 06/19/2012 12:53 AM, Stefan Weil wrote: > Am 19.06.2012 04:31, schrieb Scott Wood: >> If tci_out_label is called in the context of tcg_gen_code_search_pc, we >> could be overwriting an already patched relocation with zero -- and not >> repatch it because the set_label is past search_pc, causing

Re: [Qemu-devel] vm state save/restore question

2012-06-19 Thread Benjamin Herrenschmidt
On Tue, 2012-06-19 at 23:48 +0200, Alexander Graf wrote: > > We could keep track manually maybe using some kind of dirty bitmap of > > changes to the hash table but that would add overhead to things like > > H_ENTER. > > Only during migration, right? True. It will be an "interesting" user/kernel

Re: [Qemu-devel] vm state save/restore question

2012-06-19 Thread Alexander Graf
On 19.06.2012, at 23:13, Benjamin Herrenschmidt wrote: > On Tue, 2012-06-19 at 23:00 +0200, Alexander Graf wrote: >> How is the problem different from RAM? It's a 16MB region that can be >> accessed by the guest even during transfer time, so it can get dirty >> during the migration. But we onl

Re: [Qemu-devel] [PATCH 00/31] PPC: mpc8544ds: Create device tree dynamically

2012-06-19 Thread Andreas Färber
Am 19.06.2012 21:14, schrieb Alexander Graf: > v1 -> v2: > > - rename cell64 -> u64 > - don't treat memory as single u64 > - remove commit id from patch description > - NEW: PPC: e500: Use new MPIC dt format > PPC: e500: Use new SOC dt format > PPC: e500: Define addresses

[Qemu-devel] [PATCH 23/31] PPC: e500: dt: use target_phys_addr_t for ramsize

2012-06-19 Thread Alexander Graf
We're passing the ram size as uint32_t, capping it to 32 bits atm. Change to target_phys_addr_t (uint64_t) to make sure we have all the bits. Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c

[Qemu-devel] [PATCH 05/31] dt: add helper for phandle enumeration

2012-06-19 Thread Alexander Graf
This patch adds a helper to search for a node's phandle by its path. This is especially useful when the phandle is part of an array, not just a single cell in which case qemu_devtree_setprop_phandle would be the easy choice. Signed-off-by: Alexander Graf --- device_tree.c | 16 +++-

[Qemu-devel] [PATCH 25/31] Revert "dt: temporarily disable subtree creation failure check"

2012-06-19 Thread Alexander Graf
This reverts commit "dt: temporarily disable subtree creation failure check" which was meant as a temporary solution to keep external and dynamic device tree construction intact. Now that we switched to fully dynamic dt construction, it's no longer necessary. Signed-off-by: Alexander Graf ---

[Qemu-devel] [PATCH 15/31] PPC: e500: dt: create /soc8544 node dynamically

2012-06-19 Thread Alexander Graf
Signed-off-by: Alexander Graf --- v2 -> v3: - use snprintf - use new multi-cell setting api --- hw/ppce500_mpc8544ds.c | 17 + pc-bios/mpc8544ds.dts |9 - 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8

Re: [Qemu-devel] vm state save/restore question

2012-06-19 Thread Benjamin Herrenschmidt
On Tue, 2012-06-19 at 23:00 +0200, Alexander Graf wrote: > How is the problem different from RAM? It's a 16MB region that can be > accessed by the guest even during transfer time, so it can get dirty > during the migration. But we only need to really transfer the last > small delta at the end of th

[Qemu-devel] [PATCH 28/31] PPC: e500: Define addresses as always 64bit

2012-06-19 Thread Alexander Graf
Every time we use an address constant, it needs to potentially fit into a 64bit physical address space. So let's define things accordingly. Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c | 34 +- 1 files changed, 17 insertions(+), 17 deletions(-) diff

[Qemu-devel] [PATCH 22/31] PPC: e500: dt: use 64bit cell helper

2012-06-19 Thread Alexander Graf
We have a nice 64bit helper to ease the device tree generation and make the code more readable when creating 64bit 2-cell parameters. Use it when generating the device tree. Signed-off-by: Alexander Graf --- v1 -> v2: - rename cell64 -> u64 - don't treat memory as single u64 --- hw/ppce50

[Qemu-devel] [PATCH 00/31] PPC: mpc8544ds: Create device tree dynamically

2012-06-19 Thread Alexander Graf
Today we have two separate places where we keep information which device is where: - hw/ppce500_mpc8544ds.c to instantiate all devices - pc-bios/mpc8544ds.dtb as device tree to tell the guest about devices Every time we split crucial information, things can go terribly wrong. If you update on

[Qemu-devel] [PATCH 13/31] PPC: e500: dt: create / node dynamically

2012-06-19 Thread Alexander Graf
Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c |8 pc-bios/mpc8544ds.dtb | Bin 1904 -> 1810 bytes pc-bios/mpc8544ds.dts |5 - 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index 54e7ec7..28c7c8c 10

Re: [Qemu-devel] [PATCH 21/31] dt: Add -machine dumpdtb option to dump the current dtb

2012-06-19 Thread Alexander Graf
On 19.06.2012, at 22:51, Peter Maydell wrote: > On 19 June 2012 20:15, Alexander Graf wrote: >> Now that we are dynamically creating the dtb, it's really useful to >> be able to dump the created blob for debugging. > >> @@ -300,6 +302,22 @@ static int mpc8544_load_device_tree(CPUPPCState *env,

[Qemu-devel] [PATCH 07/31] dt: add helper for phandle allocation

2012-06-19 Thread Alexander Graf
Phandle references work by having 2 pieces: - a "phandle" 1-cell property in the device tree node - a reference to the same value in a property we want to point to the other node To generate the 1-cell property, we need an allocation mechanism that gives us a unique number space. This pat

Re: [Qemu-devel] vm state save/restore question

2012-06-19 Thread Alexander Graf
On 19.06.2012, at 22:30, Benjamin Herrenschmidt wrote: > On Tue, 2012-06-19 at 16:59 +0200, Juan Quintela wrote: - The hash table (mentioned above). This is just a big chunk of >> memory (it will routinely be 16M), so I really don't want to start >> iterating all elements, just a b

[Qemu-devel] [PATCH 03/31] dt: add helper for phandle references

2012-06-19 Thread Alexander Graf
Phandles are the fancy device tree name for "pointer to another node". To create a phandle property, we most likely want to reference to the node we're pointing to by its path. So create a helper that allows us to do so. Signed-off-by: Alexander Graf --- v2 -> v3: - rename "string" to target

Re: [Qemu-devel] [PATCH 1/2] ppc64: Rudimentary Support for extra page sizes on server CPUs

2012-06-19 Thread Alexander Graf
On 19.06.2012, at 07:56, Benjamin Herrenschmidt wrote: > More recent Power server chips (i.e. based on the 64 bit hash MMU) > support more than just the traditional 4k and 16M page sizes. This > can get quite complicated, because which page sizes are supported, > which combinations are supported

Re: [Qemu-devel] [PATCH] spapr_vscsi: Error handling fixes

2012-06-19 Thread Alexander Graf
On 19.06.2012, at 08:02, Benjamin Herrenschmidt wrote: > We were incorrectly g_free'ing an object that isn't allocated > in one error path and failed to release it completely in another > > This fixes qemu crashes with some cases of IO errors. > > Signed-off-by: Benjamin Herrenschmidt Thanks,

Re: [Qemu-devel] [PATCH v3] spapr: Add "memop" hypercall

2012-06-19 Thread Alexander Graf
On 19.06.2012, at 08:21, Benjamin Herrenschmidt wrote: > This adds a qemu-specific hypervisor call to the pseries machine > which allows to do what amounts to memmove, memcpy and xor over > regions of physical memory such as the framebuffer. > > This is the simplest way to get usable framebuffer

[Qemu-devel] [PATCH 19/31] PPC: e500: dt: create pci node dynamically

2012-06-19 Thread Alexander Graf
Signed-off-by: Alexander Graf --- v2 -> v3: - use snprintf - use new multi-cell setting api --- hw/ppce500_mpc8544ds.c | 50 pc-bios/mpc8544ds.dtb | Bin 1810 -> 72 bytes pc-bios/mpc8544ds.dts | 46

Re: [Qemu-devel] [PATCH 21/31] dt: Add -machine dumpdtb option to dump the current dtb

2012-06-19 Thread Peter Maydell
On 19 June 2012 20:15, Alexander Graf wrote: > Now that we are dynamically creating the dtb, it's really useful to > be able to dump the created blob for debugging. > @@ -300,6 +302,22 @@ static int mpc8544_load_device_tree(CPUPPCState *env, >     qemu_devtree_setprop_cell(fdt, pci, "#address-cel

Re: [Qemu-devel] [PATCH] Fixes related to processing of qemu's -numa option

2012-06-19 Thread Stefan Weil
qemu-devel was no longer cc'ed, let us add it again. Cheers, Stefan Am 19.06.2012 22:35, schrieb Eduardo Habkost: On Tue, Jun 19, 2012 at 04:33:35AM -0700, Chegu Vinod wrote: [...] +#include Did you check whether this and the macros you're using are available on POSIX and ming

Re: [Qemu-devel] [PATCH] spapr_vscsi: Error handling fixes

2012-06-19 Thread Benjamin Herrenschmidt
On Tue, 2012-06-19 at 22:20 +0200, Alexander Graf wrote: > So do you want to resend? I can just fix it on the fly too. If you can then sure, please do :-) Cheers, Ben.

[Qemu-devel] [PATCH 10/31] PPC: e500: dt: create memory node dynamically

2012-06-19 Thread Alexander Graf
Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c |8 pc-bios/mpc8544ds.dtb | Bin 2028 -> 1972 bytes pc-bios/mpc8544ds.dts |5 - 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index 506ddf3..3ec9013 10

[Qemu-devel] [PATCH 06/31] dt: add helper for empty dt creation

2012-06-19 Thread Alexander Graf
We want to get rid of the concept of loading an external device tree and instead generate our own. However, to do this we need to also create a device tree template programatically. This patch adds a helper to create an empty device tree in memory. Signed-off-by: Alexander Graf Reviewed-by: Pete

[Qemu-devel] [PATCH 16/31] PPC: e500: dt: create serial nodes dynamically

2012-06-19 Thread Alexander Graf
Signed-off-by: Alexander Graf --- v2 -> v3: - use snprintf - use new multi-cell setting api --- hw/ppce500_mpc8544ds.c | 35 +++ pc-bios/mpc8544ds.dts | 26 -- 2 files changed, 35 insertions(+), 26 deletions(-) diff --git a/hw/p

[Qemu-devel] [PATCH 26/31] PPC: e500: Use new MPIC dt format

2012-06-19 Thread Alexander Graf
Due to popular demand, we're updating the way we generate the MPIC node and interrupt lines based on what the current state of art is. Requested-by: Scott Wood Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c | 33 ++--- 1 files changed, 18 insertions(+), 1

[Qemu-devel] [PATCH 02/31] dt: add helpers for multi-cell adds

2012-06-19 Thread Alexander Graf
We have device tree helpers that allow us to create single cell (u32) wide properties. However, when creating properties that contain an array of cells, we need to jump through hoops, manually passing in an array with converted endianness. To ease the pain of this, create a generic macro helper th

[Qemu-devel] [PATCH 20/31] PPC: e500: dt: start with empty device tree

2012-06-19 Thread Alexander Graf
Now that all of the device tree bits are generated during runtime, we can get rid of the device tree blob and instead start from scratch with an empty device tree. Signed-off-by: Alexander Graf --- Makefile |1 - hw/ppce500_mpc8544ds.c |8 +--- pc-bios/mpc8544ds.dtb |

[Qemu-devel] [PATCH 01/31] dt: allow add_subnode to create root subnodes

2012-06-19 Thread Alexander Graf
Our subnode creation helper can't handle creation of root subnodes, like "/memory". Fix this by allowing the parent node to be an empty string, indicating the root node. Signed-off-by: Alexander Graf Reviewed-by: Peter Crosthwaite --- device_tree.c |7 ++- 1 files changed, 6 insertions(

Re: [Qemu-devel] vm state save/restore question

2012-06-19 Thread Benjamin Herrenschmidt
On Tue, 2012-06-19 at 16:59 +0200, Juan Quintela wrote: > >> - The hash table (mentioned above). This is just a big chunk of > memory > >> (it will routinely be 16M), so I really don't want to start > iterating > >> all elements, just a bulk load will do, and the size might actually > be > >> varia

[Qemu-devel] [PATCH 12/31] PPC: e500: dt: create /hypervisor node dynamically

2012-06-19 Thread Alexander Graf
Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c |1 + pc-bios/mpc8544ds.dtb | Bin 1924 -> 1904 bytes pc-bios/mpc8544ds.dts |3 --- 3 files changed, 1 insertions(+), 3 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index c046206..54e7ec7 100644 ---

[Qemu-devel] [PATCH 24/31] PPC: e500: enable manual loading of dtb blob

2012-06-19 Thread Alexander Graf
We want to be able to override the automatically created device tree by using the -dtb option. Implement this for the mpc8544ds machine. Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c | 26 ++ 1 files changed, 22 insertions(+), 4 deletions(-) diff --git a/hw/

Re: [Qemu-devel] [PATCH 07/13] usb: Convert usb_packet_{map, unmap} to universal DMA helpers

2012-06-19 Thread Benjamin Herrenschmidt
On Tue, 2012-06-19 at 15:42 +0200, Gerd Hoffmann wrote: > Well, that isn't guaranteed ... > > > - otherwise the guest > > might invalidate IOMMU mappings while they are still in use by the device > > code. > > Guest tearing down mapping while usb packets using them are still in > flight would be

[Qemu-devel] [PATCH 31/31] PPC: e500: Refactor serial dt generation

2012-06-19 Thread Alexander Graf
When generating serial port device tree nodes, we duplicate quite a bit of code, because there are 2 of them in the mpc8544ds board we emulate. Shove the generating code into a function, so we duplicate less code. Signed-off-by: Alexander Graf --- v2 -> v3: - use snprintf --- hw/ppce500_mp

[Qemu-devel] [PATCH 08/31] dt: add helper for 64bit cell adds

2012-06-19 Thread Alexander Graf
Some times in the device tree, we find an array of 2 u32 cells that really are a single u64 value. This patch adds a helper to make the creation of these easy. Signed-off-by: Alexander Graf Reviewed-by: Peter Crosthwaite --- v1 -> v2: - rename cell64 -> u64 --- device_tree.c |7 +++

Re: [Qemu-devel] [PATCH] spapr_vscsi: Error handling fixes

2012-06-19 Thread Alexander Graf
On 19.06.2012, at 22:18, Benjamin Herrenschmidt wrote: > On Tue, 2012-06-19 at 13:31 +0200, Andreas Färber wrote: >> Tab alert. :) > > Argh :-) Gotta get an emacs config for use with qemu :-) So do you want to resend? I can just fix it on the fly too. Alex

[Qemu-devel] [PATCH 04/31] dt: temporarily disable subtree creation failure check

2012-06-19 Thread Alexander Graf
Usually we want to know when creating a subtree fails. However, while introducing this patch set we have to modify the device tree and some times have the code to create a subtree in both the binary tree and the dynamically created tree. So ignore failures about this for now and enable them once w

Re: [Qemu-devel] [PATCH] spapr_vscsi: Error handling fixes

2012-06-19 Thread Benjamin Herrenschmidt
On Tue, 2012-06-19 at 13:31 +0200, Andreas Färber wrote: > Tab alert. :) Argh :-) Gotta get an emacs config for use with qemu :-) Cheers, Ben.

[Qemu-devel] [PATCH 29/31] PPC: e500: Extend address/size of / to 64bit

2012-06-19 Thread Alexander Graf
We want to be able to support >= 4GB of RAM. To do so, we need to be able to tell the guest OS how much RAM it has. However, that information today is capped to 32bit. So let's extend the offset and size fields to 64bit, so we can fit in big addresses and even one day - if we wish to do so - map d

[Qemu-devel] [PATCH 30/31] dt: Add global option to set phandle start offset

2012-06-19 Thread Alexander Graf
If anyone outside of QEMU wants to mess with a QEMU generated device tree, he needs to know which range phandles are valid in. So let's expose a machine option that an external program can use to set the start allocate id for phandles in QEMU. Signed-off-by: Alexander Graf --- v2 -> v3: - ad

[Qemu-devel] [PATCH 21/31] dt: Add -machine dumpdtb option to dump the current dtb

2012-06-19 Thread Alexander Graf
Now that we are dynamically creating the dtb, it's really useful to be able to dump the created blob for debugging. This patch implements a -machine dumpdtb= option for e500 that dumps the dtb exactly in the form the guest would get it to disk. It can then be analyzed by dtc to get information abo

[Qemu-devel] [PATCH 18/31] PPC: e500: dt: create global-utils node dynamically

2012-06-19 Thread Alexander Graf
Signed-off-by: Alexander Graf --- v2 -> v3: - use snprintf - use new multi-cell setting api --- hw/ppce500_mpc8544ds.c |9 + pc-bios/mpc8544ds.dts |6 -- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c inde

[Qemu-devel] [PATCH 27/31] PPC: e500: Use new SOC dt format

2012-06-19 Thread Alexander Graf
Due to popular demand, let's clean up the soc node a bit and use more recent dt notions. Requested-by: Scott Wood Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c |9 - 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544

[Qemu-devel] [Bug 1014681] Re: BSOD with newer host kernels (x64) and W2k8S guest (x64)

2012-06-19 Thread Arndt Kritzner
** Attachment added: "Minidump of BSOD with e1000 + ide" https://bugs.launchpad.net/qemu/+bug/1014681/+attachment/3196480/+files/Mini061912-01.dmp -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/101

[Qemu-devel] [PATCH 09/31] PPC: e500: require libfdt

2012-06-19 Thread Alexander Graf
Now that we're moving all of the device tree generation from an external pre-execution generated blob to runtime generation using libfdt, we absolutely must have libfdt around. This requirement was there before already, as the only way to not require libfdt with e500 was to not use -kernel, which

[Qemu-devel] [PATCH v4 2/2] Change driftfix default value to slew

2012-06-19 Thread Crístian Viana
Windows 2008+ is very sensitive to missed ticks. The RTC is used by default as the time source. If driftfix is not enabled, Windows is prone to blue screening. Signed-off-by: Crístian Viana --- Anthony, Could you please try to reproduce the segfault again (as you stated in http://article.gmane.o

[Qemu-devel] [PATCH v4 1/2] Force driftfix=none on previous machines

2012-06-19 Thread Crístian Viana
The current value for the -rtc driftfix option is 'none'. This patch makes sure that the old machines configuration will work the same way even after that option changes its default value. Signed-off-by: Crístian Viana --- There's a scenario when things don't work the way I expected: when I set

Re: [Qemu-devel] [PATCH v12 13/13] Add XBZRLE statistics

2012-06-19 Thread Eric Blake
On 06/19/2012 09:43 AM, Orit Wasserman wrote: > Signed-off-by: Benoit Hudzia > Signed-off-by: Petter Svard > Signed-off-by: Aidan Shribman > Signed-off-by: Orit Wasserman > --- > +++ b/qapi-schema.json > @@ -263,7 +263,28 @@ > # Since: 0.14.0. > ## > { 'type': 'MigrationStats', > - 'data':

[Qemu-devel] [PATCH 17/31] PPC: e500: dt: create mpic node dynamically

2012-06-19 Thread Alexander Graf
Signed-off-by: Alexander Graf --- v2 -> v3: - use snprintf - use new multi-cell setting api --- hw/ppce500_mpc8544ds.c | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index c68e994..5c2b6ab 100644 ---

[Qemu-devel] [PATCH 11/31] PPC: e500: dt: create /cpus node dynamically

2012-06-19 Thread Alexander Graf
Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c |5 + pc-bios/mpc8544ds.dtb | Bin 1972 -> 1924 bytes pc-bios/mpc8544ds.dts |5 - 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index 3ec9013..c046206 10064

[Qemu-devel] [PATCH 14/31] PPC: e500: dt: create /chosen node dynamically

2012-06-19 Thread Alexander Graf
Signed-off-by: Alexander Graf --- hw/ppce500_mpc8544ds.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index 28c7c8c..a078e24 100644 --- a/hw/ppce500_mpc8544ds.c +++ b/hw/ppce500_mpc8544ds.c @@ -101,6 +101,7 @@ static int

Re: [Qemu-devel] [PATCH v12 12/13] Add set_cachesize command

2012-06-19 Thread Eric Blake
On 06/19/2012 09:43 AM, Orit Wasserman wrote: > Change XBZRLE cache size in bytes (the size should be a power of 2). > If XBZRLE cache size is too small there will be many cache miss. > > Signed-off-by: Benoit Hudzia > Signed-off-by: Petter Svard > Signed-off-by: Aidan Shribman > Signed-off-by:

Re: [Qemu-devel] [PATCH 00/31] PPC: mpc8544ds: Create device tree dynamically

2012-06-19 Thread Alexander Graf
On 19.06.2012, at 20:39, Blue Swirl wrote: > On Tue, Jun 19, 2012 at 12:54 PM, Alexander Graf wrote: >> >> On 07.06.2012, at 23:09, Blue Swirl wrote: >> >>> On Tue, Jun 5, 2012 at 11:52 PM, Alexander Graf wrote: Today we have two separate places where we keep information which device >>>

[Qemu-devel] [Bug 1015226] [NEW] arm realview pbx hung

2012-06-19 Thread ken_ma
Public bug reported: host(pc):ubuntu 10.1 qemu:qemu-1.1.0-1 target:realview-pbx-a9 kernel:2.6.34.10 gcc:4.4.6 command line, and output as follow: - majun@majun-Lenovo-Product:~/qemu$ qemu-system-arm -M realview-pbx-a9 -kernel ~/emb_linux/trunk/bsp/versatil

Re: [Qemu-devel] [RFC] [PATCHv2 2/2] Adding basic calls to libseccomp in vl.c

2012-06-19 Thread Blue Swirl
On Tue, Jun 19, 2012 at 11:04 AM, Avi Kivity wrote: > On 06/16/2012 09:46 AM, Blue Swirl wrote: >> On Fri, Jun 15, 2012 at 9:36 PM, Paul Moore wrote: >>> On Friday, June 15, 2012 09:23:46 PM Blue Swirl wrote: On Fri, Jun 15, 2012 at 9:02 PM, Paul Moore wrote: > On Friday, June 15, 2012

Re: [Qemu-devel] [PATCH v12 11/13] Add XBZRLE to ram_save_block and ram_save_live

2012-06-19 Thread Eric Blake
On 06/19/2012 09:43 AM, Orit Wasserman wrote: > In the outgoing migration check to see if the page is cached and > changed than send compressed page by using save_xbrle_page function. > In the incoming migration check to see if RAM_SAVE_FLAG_XBRLE is set > and decompress the page (by using load_xbr

  1   2   3   >