[Qemu-devel] [PATCH v8 00/14] Ehnahced SSI bus support + M25P80 SPI flash + Xilinx SPI controller

2012-10-03 Thread Peter Crosthwaite
This series reworks the SSI bus framework for SPI and add some new SPI controllers and devices: Patches 1-4 reworks SSI to add chip-select support to SPI devices and allow for multiple SPI devices attached to the same bus. Patches 5-6 fix the SPI setup in the stellaris machine model. Patch 7 i

[Qemu-devel] [PATCH v8 01/14] ssi: Support for multiple attached devices

2012-10-03 Thread Peter Crosthwaite
From: Peter A. G. Crosthwaite Removed assertion that only one device is attached to the SSI bus. When multiple devices are attached, all slaves have their transfer function called for transfers. Each device is responsible for knowing whether or not its CS is active, and if not returning 0. The r

[Qemu-devel] [PATCH v8 03/14] ssi: Added create_slave_no_init()

2012-10-03 Thread Peter Crosthwaite
From: Peter A. G. Crosthwaite Slave creation function that can be used to create an SSI slave without qdev_init() being called. This give machine models a chance to set properties. Signed-off-by: Peter A. G. Crosthwaite --- hw/ssi.c |9 +++-- hw/ssi.h |1 + 2 files changed, 8 inse

[Qemu-devel] [PATCH v8 05/14] hw/stellaris: Removed gpio_out init array.

2012-10-03 Thread Peter Crosthwaite
From: Peter A. G. Crosthwaite stellaris_init() defines arrays of qemu_irq to decides what each of the GPIO pins are connected to. This is ok for inputs (as an input can only have one source) but is flawed for outputs as an output can connect to any number of sinks. Removed the gpio_out array comp

[Qemu-devel] [PATCH v8 06/14] stellaris: Removed SSI mux

2012-10-03 Thread Peter Crosthwaite
From: Peter A. G. Crosthwaite Removed the explicit SSI mux and wired the CS line directly up to the SSI devices. Signed-off-by: Peter A. G. Crosthwaite --- hw/ssd0323.c |1 + hw/ssi-sd.c|1 + hw/stellaris.c | 98 ++-- 3 files

[Qemu-devel] [PATCH v8 08/14] m25p80: Initial implementation of SPI flash device

2012-10-03 Thread Peter Crosthwaite
From: Peter A. G. Crosthwaite Added device model for m25p80 style SPI flash family. Signed-off-by: Peter A. G. Crosthwaite --- changed from v7: Debug print on select as well as deselect Fixed data bit reversal changed from v6: Addressed Blue Swirl review Constified TypeInfo Added missing break

[Qemu-devel] [PATCH v8 13/14] MAINTAINERS: Added maintainerships for SSI

2012-10-03 Thread Peter Crosthwaite
From: Peter A. G. Crosthwaite Added maintainership for SSI, M25P80 and the Xilinx SPI controllers. Signed-off-by: Peter A. G. Crosthwaite --- MAINTAINERS |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 29aac4f..e25794b 100644 ---

[Qemu-devel] [PATCH v8 14/14] ssi: Add slave autoconnect helper

2012-10-03 Thread Peter Crosthwaite
Added helper function to automatically connect SPI slaves based on the QOM child nodes of a device. A SSI master device can call this routine to automatically hook-up all child nodes to its SPI bus. Signed-off-by: Peter Crosthwaite --- hw/ssi.c | 33 +

[Qemu-devel] [PATCH v8 10/14] petalogix-ml605: added SPI controller with n25q128

2012-10-03 Thread Peter Crosthwaite
From: Peter A. G. Crosthwaite Added SPI controller to the reference design, with two n25q128 spi-flashes connected. Signed-off-by: Peter A. G. Crosthwaite --- Changed since v7: Increased number of spi flashes to 4 Fixed spi controller qdev name and property names (see prev patch) Changed since

[Qemu-devel] [PATCH v8 07/14] hw: Added generic FIFO API.

2012-10-03 Thread Peter Crosthwaite
From: Peter A. G. Crosthwaite Added a FIFO API that can be used to create and operate byte FIFOs. Signed-off-by: Peter A. G. Crosthwaite --- hw/Makefile.objs |1 + hw/fifo.c| 78 ++ hw/fifo.h| 47 +

[Qemu-devel] [PATCH v8 02/14] ssi: Implemented CS behaviour

2012-10-03 Thread Peter Crosthwaite
From: Peter A. G. Crosthwaite Added default CS behaviour for SSI slaves. SSI devices can set a property to enable CS behaviour which will create a GPIO on the device which is the CS. Tristating of the bus on SSI transfers is implemented. Signed-off-by: Peter A. G. Crosthwaite --- Changed since

[Qemu-devel] [PATCH v8 12/14] xilinx_zynq: Added SPI controllers + flashes

2012-10-03 Thread Peter Crosthwaite
From: Peter A. G. Crosthwaite Added the two SPI controllers to the zynq machine model. Attached two SPI flash devices to each controller. Signed-off-by: Peter A. G. Crosthwaite --- changed from v7: Increased number of spi flashes pre controller to 4 changed from v6: removed (char*) cast to qdev

[Qemu-devel] [PATCH v8 04/14] qdev: allow multiple qdev_init_gpio_in() calls

2012-10-03 Thread Peter Crosthwaite
From: Peter A. G. Crosthwaite Allow multiple qdev_init_gpio_in() calls for the one device. The first call will define GPIOs 0-N-1, the next GPIOs N- ... . Allows different GPIOs to be handled with different handlers. Needed when two levels of the QOM class heirachy both define GPIO functionality,

[Qemu-devel] [PATCH v8 11/14] xilinx_spips: Xilinx Zynq SPI cntrlr device model

2012-10-03 Thread Peter Crosthwaite
From: Peter A. G. Crosthwaite Added device model for the Xilinx Zynq SPI controller (SPIPS). Signed-off-by: Peter A. G. Crosthwaite --- Changed from v7: Fixed &->&& logic on if condition is cs_select logic Fixed MODE_SEL bit field definition Changed from v6: Addressed Blue Swirl review s/interu

[Qemu-devel] [PATCH v8 09/14] xilinx_spi: Initial impl. of Xilinx SPI controller

2012-10-03 Thread Peter Crosthwaite
From: Peter A. G. Crosthwaite Device model for xilinx XPS SPI controller (v2.0) Signed-off-by: Peter A. G. Crosthwaite --- changed from v7: Fixed device name: s/xilinx,spi/xlnx.xps-spi Fixed num-ss-bits property name: s/num-cs/num-ss-bits changed from v4 (Near total rewrite): removed timer dela

Re: [Qemu-devel] [PATCH] kvm: Set default accelerator to "kvm" if the host supports it

2012-10-03 Thread Jan Kiszka
On 2012-10-01 18:20, Anthony Liguori wrote: > Jan Kiszka writes: > >> If we built a target for a host that supports KVM in principle, set the >> default accelerator to KVM as well. This also means the start of QEMU >> will fail to start if KVM support turns out to be unavailable at >> runtime. >>

Re: [Qemu-devel] [PATCH] kvm: Set default accelerator to "kvm" if the host supports it

2012-10-03 Thread Jan Kiszka
On 2012-10-03 08:58, Michael Tokarev wrote: > On 02.10.2012 11:46, Markus Armbruster wrote: >> "Daniel P. Berrange" writes: > >>> IMHO, default to KVM, fallback to TCG is the most friendly default >>> behaviour. >> >> Friendly perhaps, generating an infinite series of questions "why is my >> gues

[Qemu-devel] [PATCH] hw: Add missing 'static' attribute for QEMUMachine

2012-10-03 Thread Stefan Weil
It was missing for leon3 and mips_fulong2e. Signed-off-by: Stefan Weil --- hw/leon3.c |2 +- hw/mips/mips_fulong2e.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/leon3.c b/hw/leon3.c index 878d3aa..7a9729d 100644 --- a/hw/leon3.c +++ b/hw/leon3.c

[Qemu-devel] [PATCH 0/3] vmware_vga: Cleanup and allow simple drivers to work without the fifo

2012-10-03 Thread BALATON Zoltan
Resending it again as I got no comments and seems to have been ignored so far. These patches simplify the vmware_vga by removing duplicated info from its local state and make it work with more guest drivers (in particular with the very simple OpenStep VMWareFB driver) that do not use the fifo w

[Qemu-devel] [PATCH 1/3 v2] vmware_vga: Cleanup and remove duplicated info from local state

2012-10-03 Thread BALATON Zoltan
Removed info from vmsvga_state that is available from elsewhere and thus was duplicated here unnecessarily. Also includes some coding style fixes suggested by checkpatch.pl. Signed-off-by: BALATON Zoltan --- console.h | 20 ++ hw/vmware_vga.c | 196 +++--

[Qemu-devel] [PATCH 2/3 v2] vmware_vga: Return a value for FB_SIZE before the device is enabled

2012-10-03 Thread BALATON Zoltan
According to the documentation drivers using this device should read FB_SIZE before enabling the device to know what memory to map. This would not work if we return 0 before enabled. Signed-off-by: BALATON Zoltan --- hw/vmware_vga.c | 13 - 1 file changed, 8 insertions(+), 5 delet

[Qemu-devel] [PATCH 3/3 v2] vmware_vga: Allow simple drivers to work without using the fifo

2012-10-03 Thread BALATON Zoltan
Postpone stopping the dirty log to the point where the command fifo is configured to allow drivers which don't use the fifo to work too. (Without this the picture rendered into the vram never got to the screen and the DIRECT_VRAM option meant to support this case was removed a year ago.) Signed-o

Re: [Qemu-devel] [PATCH 1/3 v2] vmware_vga: Cleanup and remove duplicated info from local state

2012-10-03 Thread Paolo Bonzini
Il 03/10/2012 11:30, BALATON Zoltan ha scritto: > Removed info from vmsvga_state that is available from elsewhere and > thus was duplicated here unnecessarily. Also includes some coding > style fixes suggested by checkpatch.pl. Coding style fixes ideally would be in a separate patch. A couple nit

Re: [Qemu-devel] [PATCH 2/3 v2] vmware_vga: Return a value for FB_SIZE before the device is enabled

2012-10-03 Thread Paolo Bonzini
Il 03/10/2012 11:30, BALATON Zoltan ha scritto: > According to the documentation drivers using this device should read > FB_SIZE before enabling the device to know what memory to map. This > would not work if we return 0 before enabled. > > Signed-off-by: BALATON Zoltan > --- > hw/vmware_vga.c |

Re: [Qemu-devel] [PATCH 3/3 v2] vmware_vga: Allow simple drivers to work without using the fifo

2012-10-03 Thread Paolo Bonzini
Il 03/10/2012 11:31, BALATON Zoltan ha scritto: > Postpone stopping the dirty log to the point where the command fifo is > configured to allow drivers which don't use the fifo to work too. > (Without this the picture rendered into the vram never got to the > screen and the DIRECT_VRAM option meant

Re: [Qemu-devel] [PATCH 2/6] pci-assign: Add support for no-route

2012-10-03 Thread Paolo Bonzini
Il 02/10/2012 22:12, Alex Williamson ha scritto: > On Tue, 2012-10-02 at 14:55 -0500, Anthony Liguori wrote: >> Alex Williamson writes: >> >>> In the event that a pci-assign device is added to a chipset that >>> hasn't yet implemented the INTx routing interface, exit gracefully >>> instead of kill

Re: [Qemu-devel] qemu-kvm: remove "boot=on|off" drive parameter compatibility

2012-10-03 Thread Gleb Natapov
On Mon, Oct 01, 2012 at 03:26:05PM +0200, Jan Kiszka wrote: > On 2012-10-01 15:19, Anthony Liguori wrote: > > Jan Kiszka writes: > > > >> On 2012-10-01 11:31, Marcelo Tosatti wrote: > >> > >> It's not just about default configs. We need to validate if the > >> migration formats are truly compatib

Re: [Qemu-devel] qemu-kvm: remove "boot=on|off" drive parameter compatibility

2012-10-03 Thread Jan Kiszka
On 2012-10-03 11:55, Gleb Natapov wrote: > On Mon, Oct 01, 2012 at 03:26:05PM +0200, Jan Kiszka wrote: >> On 2012-10-01 15:19, Anthony Liguori wrote: >>> Jan Kiszka writes: >>> On 2012-10-01 11:31, Marcelo Tosatti wrote: It's not just about default configs. We need to validate if th

Re: [Qemu-devel] qemu-kvm: remove "boot=on|off" drive parameter compatibility

2012-10-03 Thread Gleb Natapov
On Wed, Oct 03, 2012 at 12:06:57PM +0200, Jan Kiszka wrote: > On 2012-10-03 11:55, Gleb Natapov wrote: > > On Mon, Oct 01, 2012 at 03:26:05PM +0200, Jan Kiszka wrote: > >> On 2012-10-01 15:19, Anthony Liguori wrote: > >>> Jan Kiszka writes: > >>> > On 2012-10-01 11:31, Marcelo Tosatti wrote:

Re: [Qemu-devel] [PATCH] net: consolidate NetClientState header files into one

2012-10-03 Thread Paolo Bonzini
Il 17/09/2012 18:43, Paolo Bonzini ha scritto: > This patch doesn't seem much useful alone, I must admit. However, > it makes sense as part of the upcoming directory reorganization, > where I want to have include/net/tap.h as the net<->hw interface > for tap. Then having both net/tap.h and includ

[Qemu-devel] [patch 4/6] Use global properties to emulate -no-kvm-pit-reinjection

2012-10-03 Thread Marcelo Tosatti
Commit 80019541e9c13fab476bee35edcef3e11646222c from qemu-kvm.git. From: Jan Kiszka Use global properties to emulate -no-kvm-pit-reinjection Signed-off-by: Marcelo Tosatti Index: qemu-compat-kvm/vl.c === --- qemu-compat-kvm.orig/

[Qemu-devel] [patch 6/6] Emulate qemu-kvms -tdf option

2012-10-03 Thread Marcelo Tosatti
Commit d527b774878defc27f317cdde19b5c54fd0d5666 from qemu-kvm.git. From: Jan Kiszka Add a warning that there is no effect anymore. Signed-off-by: Marcelo Tosatti Index: qemu-compat-kvm/vl.c === --- qemu-compat-kvm.orig/vl.c +++ q

[Qemu-devel] [patch 5/6] Emulate qemu-kvms drive parameter boot=on|off

2012-10-03 Thread Marcelo Tosatti
Commit 841280b6c224ea2c6edc2f5afc2add513c85181d from qemu-kvm.git. From: Jan Kiszka We do not want to maintain this option forever. It will be removed after a grace period of a few releases. So warn the user that this option has no effect and will become invalid soon. Signed-off-by: Marcelo Tos

[Qemu-devel] [patch 0/6] qemu-kvm compat

2012-10-03 Thread Marcelo Tosatti
As discussed on yesterdays qemu call, follows qemu-kvm compat patches for qemu: - command line compatibility - allow configurable ram size for cirrus

[Qemu-devel] [patch 1/6] cirrus_vga: allow configurable vram size

2012-10-03 Thread Marcelo Tosatti
Allow RAM size to be configurable for cirrus, to allow migration compatibility from qemu-kvm. Signed-off-by: Marcelo Tosatti Index: qemu-compat-kvm/hw/cirrus_vga.c === --- qemu-compat-kvm.orig/hw/cirrus_vga.c +++ qemu-compat-kvm/hw

[Qemu-devel] [patch 3/6] Use machine options to emulate -no-kvm-pit

2012-10-03 Thread Marcelo Tosatti
Commit e81dda195556e72f8cd294998296c1051aab30a8 from qemu-kvm.git. From: Jan Kiszka Leave the related command line option in place, just issuing a warning that it has no function anymore. Signed-off-by: Marcelo Tosatti Index: qemu-compat-kvm/vl.c ==

Re: [Qemu-devel] qemu-kvm: remove "boot=on|off" drive parameter compatibility

2012-10-03 Thread Lucas Meneghel Rodrigues
On 10/03/2012 06:55 AM, Gleb Natapov wrote: On Mon, Oct 01, 2012 at 03:26:05PM +0200, Jan Kiszka wrote: On 2012-10-01 15:19, Anthony Liguori wrote: Jan Kiszka writes: On 2012-10-01 11:31, Marcelo Tosatti wrote: It's not just about default configs. We need to validate if the migration format

[Qemu-devel] [patch 2/6] Use machine options to emulate -no-kvm-irqchip

2012-10-03 Thread Marcelo Tosatti
Commit 3ad763fcba5bd0ec5a79d4a9b6baeef119dd4a3d from qemu-kvm.git. From: Jan Kiszka Upstream is moving towards this mechanism, so start using it in qemu-kvm already to configure the specific defaults: kvm enabled on, just like in-kernel irqchips. Signed-off-by: Marcelo Tosatti Index: qemu

[Qemu-devel] [PATCH 0/2] e500: creating CCSR region and registering bar0

2012-10-03 Thread Bharat Bhushan
From: Bharat Bhushan The CCSR memory region is exported to pci device. The MSI interrupt generation is the main reason to export the CCSR region to PCI device. This put the requirement to move mpic under CCSR region, but logically all devices should be under CCSR. So First patch creates the CCSR

[Qemu-devel] [PATCH 1/2] e500: Adding CCSR memory region

2012-10-03 Thread Bharat Bhushan
All devices are also placed under CCSR memory region. The CCSR memory region is exported to pci device. The MSI interrupt generation is the main reason to export the CCSR region to PCI device. This put the requirement to move mpic under CCSR region, but logically all devices should be under CCSR. S

[Qemu-devel] [PATCH 2/2] Adding BAR0 for e500 PCI controller

2012-10-03 Thread Bharat Bhushan
PCI Root complex have TYPE-1 configuration header while PCI endpoint have type-0 configuration header. The type-1 configuration header have a BAR (BAR0). In Freescale PCI controller BAR0 is used for mapping pci address space to CCSR address space. This can used for 2 purposes: 1) for MSI interrupt

Re: [Qemu-devel] [PATCH 1/2] e500: Adding CCSR memory region

2012-10-03 Thread Alexander Graf
On 03.10.2012, at 13:49, Bharat Bhushan wrote: > All devices are also placed under CCSR memory region. > The CCSR memory region is exported to pci device. The MSI interrupt > generation is the main reason to export the CCSR region to PCI device. > This put the requirement to move mpic under CCSR

Re: [Qemu-devel] [PATCH 2/2] Adding BAR0 for e500 PCI controller

2012-10-03 Thread Alexander Graf
On 03.10.2012, at 13:50, Bharat Bhushan wrote: > PCI Root complex have TYPE-1 configuration header while PCI endpoint > have type-0 configuration header. The type-1 configuration header have > a BAR (BAR0). In Freescale PCI controller BAR0 is used for mapping pci > address space to CCSR address s

Re: [Qemu-devel] [PATCH 1/2] e500: Adding CCSR memory region

2012-10-03 Thread Bhushan Bharat-R65777
> -Original Message- > From: Alexander Graf [mailto:ag...@suse.de] > Sent: Wednesday, October 03, 2012 5:39 PM > To: Bhushan Bharat-R65777 > Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; Bhushan Bharat-R65777 > Subject: Re: [PATCH 1/2] e500: Adding CCSR memory region > > > On 03.10.20

Re: [Qemu-devel] [PATCH V5 5/5] libqblock test example

2012-10-03 Thread wenchao xia
>> +const uint64_t *qb_get_virt_size(const QBlockStaticInfo *info) >> +{ >> +return info->member_addr->virt_size; > >Please change this to: > > QBlockStaticInfoAddr addrs; > qb_setup_info_addr(info, &addrs); > return *addrs->virt_size; > >and similarly for the others. > >QBlockStati

Re: [Qemu-devel] [PATCH 1/2] e500: Adding CCSR memory region

2012-10-03 Thread Alexander Graf
On 03.10.2012, at 14:16, Bhushan Bharat-R65777 wrote: > > >> -Original Message- >> From: Alexander Graf [mailto:ag...@suse.de] >> Sent: Wednesday, October 03, 2012 5:39 PM >> To: Bhushan Bharat-R65777 >> Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; Bhushan Bharat-R65777 >> Subject: R

Re: [Qemu-devel] [PATCH V5 5/5] libqblock test example

2012-10-03 Thread Paolo Bonzini
Il 03/10/2012 13:31, wenchao xia ha scritto: >>> +const uint64_t *qb_get_virt_size(const QBlockStaticInfo *info) >>> +{ >>> +return info->member_addr->virt_size; >> >> Please change this to: >> >> QBlockStaticInfoAddr addrs; >> qb_setup_info_addr(info, &addrs); >> return *addrs->vir

Re: [Qemu-devel] [PATCH 2/6] pci-assign: Add support for no-route

2012-10-03 Thread Anthony Liguori
Paolo Bonzini writes: > Il 02/10/2012 22:12, Alex Williamson ha scritto: >> On Tue, 2012-10-02 at 14:55 -0500, Anthony Liguori wrote: >>> Alex Williamson writes: >>> In the event that a pci-assign device is added to a chipset that hasn't yet implemented the INTx routing interface, exit

Re: [Qemu-devel] [PATCH 2/2] Adding BAR0 for e500 PCI controller

2012-10-03 Thread Bhushan Bharat-R65777
> -Original Message- > From: Alexander Graf [mailto:ag...@suse.de] > Sent: Wednesday, October 03, 2012 5:41 PM > To: Bhushan Bharat-R65777 > Cc: qemu-devel qemu-devel; qemu-...@nongnu.org List; Bhushan Bharat-R65777; > Avi > Kivity > Subject: Re: [PATCH 2/2] Adding BAR0 for e500 PCI cont

Re: [Qemu-devel] [PATCH] cadence_ttc: Fix 'clear on read' behavior

2012-10-03 Thread Peter Maydell
On 3 October 2012 14:09, Peter Crosthwaite wrote: > Ping! > > Should this go via arm-devs or create a zynq-specific queue? I'm happy to put it in arm-devs if that's easier. -- PMM

Re: [Qemu-devel] qemu-kvm: remove "boot=on|off" drive parameter compatibility

2012-10-03 Thread Paolo Bonzini
Il 03/10/2012 12:57, Lucas Meneghel Rodrigues ha scritto: > Yep, I did send patches with the testdev device present on qemu-kvm.git > to qemu.git a while ago, but there were many comments on the review, I > ended up not implementing everything that was asked and the patches were > archived. > > If

Re: [Qemu-devel] qemu-kvm: remove "boot=on|off" drive parameter compatibility

2012-10-03 Thread Gleb Natapov
On Wed, Oct 03, 2012 at 03:19:56PM +0200, Paolo Bonzini wrote: > Il 03/10/2012 12:57, Lucas Meneghel Rodrigues ha scritto: > > Yep, I did send patches with the testdev device present on qemu-kvm.git > > to qemu.git a while ago, but there were many comments on the review, I > > ended up not implemen

[Qemu-devel] [RFC 09/18] target-i386: cpu: move cpuid_apic_id initialization to cpu_x86_register()

2012-10-03 Thread Eduardo Habkost
The problem here is: - The CPU object can't define its APIC ID itself, it has to be defined by the creator of the CPU object - The object instance_init() function can't get extra arguments - I don't want to add a APIC ID argument to x86_cpu_realize(), as it should eventually become a Obje

Re: [Qemu-devel] [PATCH] cadence_ttc: Fix 'clear on read' behavior

2012-10-03 Thread Peter Crosthwaite
Ping! Should this go via arm-devs or create a zynq-specific queue? Regards, Peter On Thu, Sep 27, 2012 at 11:18 AM, Peter Crosthwaite wrote: > From: Soren Brinkmann > > A missing call to qemu_set_irq() when reading the IRQ register > required SW to write to the IRQ register to acknowledge an >

[Qemu-devel] [RFC 01/18] pc: create "PC" device class

2012-10-03 Thread Eduardo Habkost
We can make it a child of a generic "machine" class later, but right now a "PC" class is needed to allow global-properties to control some details of CPU creation on the PC code. Signed-off-by: Eduardo Habkost --- hw/pc.c | 18 ++ hw/pc.h | 6 ++ 2 files changed, 24 insertio

[Qemu-devel] [RFC 15/18] pc: set fw_cfg data based on APIC ID calculation (v2)

2012-10-03 Thread Eduardo Habkost
This changes FW_CFG_MAX_CPUS and FW_CFG_NUMA to use apic_id_for_cpu(), so the NUMA table can be based on the APIC IDs, instead of CPU index (SeaBIOS knows nothing about CPU indexes, just APIC IDs). Changes v1 -> v2: - Get PC object as argument - Add more detailed comments explaining the reason f

[Qemu-devel] [RFC 07/18] kvm: create kvm_arch_vcpu_id() function

2012-10-03 Thread Eduardo Habkost
This will allow each architecture to define how the VCPU ID is set on the KVM_CREATE_VCPU ioctl call. Signed-off-by: Eduardo Habkost --- kvm-all.c | 2 +- kvm.h | 3 +++ target-i386/kvm.c | 5 + target-ppc/kvm.c | 5 + target-s390x/kvm.c | 5 + 5 files change

[Qemu-devel] [RFC 05/18] cpus.h: include qemu-stdio.h

2012-10-03 Thread Eduardo Habkost
Needed for the definition of fprint_function. This is not necessary right now, but it will be necessary if code that doesn't include cpu-common.h includes cpus.h. Signed-off-by: Eduardo Habkost --- cpus.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpus.h b/cpus.h index 81bd817..b7c37

[Qemu-devel] [RFC 18/18] pc: generate APIC IDs according to CPU topology (v3)

2012-10-03 Thread Eduardo Habkost
This keeps compatibility on machine-types pc-1.2 and older, and prints a warning in case the requested configuration won't get the correct topology. At first I was going to use object_property_add() on PC instance_init function, but this wouldn't allow us to use global properties to set it[1]. So

[Qemu-devel] [RFC 13/18] pc: set explicit APIC ID for CPUs

2012-10-03 Thread Eduardo Habkost
The current behavior (setting APIC ID = CPU index) is kept, but this will allow the PC code to set the proper CPU topology, later. Signed-off-by: Eduardo Habkost --- hw/pc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index a8788de..c64c218 10064

[Qemu-devel] [RFC 08/18] target-i386: kvm: set vcpu_id to APIC ID instead of CPU index (v2)

2012-10-03 Thread Eduardo Habkost
The CPU ID in KVM is supposed to be the APIC ID, so change the KVM_CREATE_VCPU call to match it. The current behavior didn't break anything yet because today the APIC ID is assumed to be == the CPU index, but this won't be true in the future. Chagnes v1 -> v2: - Change only i386 code (kvm_arch_vc

[Qemu-devel] [RFC 14/18] pc: create apic_id_for_cpu() function (v3)

2012-10-03 Thread Eduardo Habkost
Currently we need a way to calculate the Initial APIC ID using only the CPU index (without needing a CPU object), as the NUMA fw_cfg data is APIC-ID-based, and may include data for hotplug CPUs (that don't exist yet), up to max_cpus. Changes v2 -> v3: - Move the whole code to hw/pc.c, now only t

Re: [Qemu-devel] [PATCH] hw: Add missing 'static' attribute for QEMUMachine

2012-10-03 Thread Andreas Färber
Am 03.10.2012 11:19, schrieb Stefan Weil: > It was missing for leon3 and mips_fulong2e. > > Signed-off-by: Stefan Weil Reviewed-by: Andreas Färber /-F -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

[Qemu-devel] [RFC 11/18] target-i386: cpu_x86_init: allow APIC ID to be set by caller

2012-10-03 Thread Eduardo Habkost
This allows callers of cpu_x86_init() to override the APIC ID, in case it needs to build a specific cores/threads topology. Because *-user doesn't have any concept of CPU topology, we do not require every caller to specify an APIC ID. So a negative value will indicate that the CPU index can be use

[Qemu-devel] [RFC 03/18] pc: add PC object argument to some init functions

2012-10-03 Thread Eduardo Habkost
Add an extra argument to: - pc_memory_init() - bochs_bios_init() - pc_cpus_init() - pc_new_cpu() Signed-off-by: Eduardo Habkost --- hw/pc.c | 13 +++-- hw/pc.h | 5 +++-- hw/pc_piix.c | 4 ++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/hw/pc.c b/hw/

[Qemu-devel] [RFC 02/18] pc: create PC object on pc_init1()

2012-10-03 Thread Eduardo Habkost
It would be interesting to make the generic machine intialization code create a machine object instead, but changing the machine initialization function signature is a nightmare, so by now I am creating the object inside pc_init1(). The object is not used for anything by now, but it will be used d

[Qemu-devel] [RFC 17/18] target-i386: topology & APIC ID utility functions (v2)

2012-10-03 Thread Eduardo Habkost
Changes v2 -> v3: - Add documentation pointers to the code - Rename bits_for_count() to bitwidth_for_count() - Remove unused apicid_*_id() functions Changes v1 -> v2: - Support 32-bit APIC IDs (in case x2APIC is going to be used) - Coding style changes - Use TARGET_I386_TOPOLOGY_H instead of

[Qemu-devel] [RFC v2 00/18] Fix APIC-ID-based CPU topology

2012-10-03 Thread Eduardo Habkost
Bug description: The CPU APIC IDs generated by QEMU are broken if the number of cores-per-socket or threads-per-core are not powers of 2, as the bits on the APIC ID do not correspond to what's expected to reflect the CPU sockets/cores/threads topology[1]. [1] http://software.intel.com/en-us/arti

[Qemu-devel] [RFC 10/18] target-i386: cpu: add apic_id argument to cpu_x86_register()

2012-10-03 Thread Eduardo Habkost
It's not up to the CPU object to decide its APIC ID, but to the CPU object creator (that knows about the CPU sockets, cores, and threads topology). This keeps the current APIC ID == CPU index behavior, by now. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c| 4 ++-- target-i386/cpu.h

Re: [Qemu-devel] [PATCH 1/1] kvmclock: fix guest stop notification

2012-10-03 Thread Marcelo Tosatti
On Sun, Sep 30, 2012 at 09:50:07PM -0400, Amos Kong wrote: > - Original Message - > > On Thu, Sep 20, 2012 at 09:46:41AM -0300, Marcelo Tosatti wrote: > > > On Thu, Sep 20, 2012 at 01:55:20PM +0530, Amit Shah wrote: > > > > Commit f349c12c0434e29c79ecde89029320c4002f7253 added the guest > >

[Qemu-devel] [PULL] Xen tree 2012-10-03

2012-10-03 Thread Stefano Stabellini
Hi Anthony, please pull from the following tree based on e744c06fca438dc08271e626034e632a270c91c8: git://xenbits.xen.org/people/sstabellini/qemu-dm.git xen-2012-10-03 Anthony PERARD (6): xen: Fix, no unplug of pt device by platform device. QMP, Introduce xen-set-global-dirty-log comm

[Qemu-devel] [PATCH] s390: avoid reaching into memory core internals

2012-10-03 Thread Avi Kivity
use cpu_physical_memory_is_io() instead. Signed-off-by: Avi Kivity --- target-s390x/misc_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-s390x/misc_helper.c b/target-s390x/misc_helper.c index e9b3cae..2da4c90 100644 --- a/target-s390x/misc_helper.c +++ b/targe

[Qemu-devel] [RFC 16/18] tests: support target-specific unit tests

2012-10-03 Thread Eduardo Habkost
To make unit tests that depend on target-specific files, use check-unit--y and test-obj--y. Signed-off-by: Eduardo Habkost --- tests/Makefile | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index 26a67ce..ce4f6f2 100644 --- a/

[Qemu-devel] [RFC 12/18] fw_cfg: remove FW_CFG_MAX_CPUS from fw_cfg_init()

2012-10-03 Thread Eduardo Habkost
PC will not use max_cpus for that field, so move it outside the common code so it can use a different value on PC. Signed-off-by: Eduardo Habkost --- hw/fw_cfg.c | 1 - hw/pc.c | 2 +- hw/ppc_newworld.c | 1 + hw/ppc_oldworld.c | 1 + hw/sun4m.c| 3 +++ hw/sun4u.c

[Qemu-devel] [RFC 06/18] hw/apic.c: rename bit functions to not conflict with bitops.h (v2)

2012-10-03 Thread Eduardo Habkost
Changes v1 -> v2: - Coding style change: break too-long line Signed-off-by: Eduardo Habkost --- hw/apic.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index 38e..e1f633a 100644 --- a/hw/apic.c +++ b/hw/apic.c

[Qemu-devel] [RFC 04/18] move I/O-related definitions from qemu-common.h to a new header (qemu-stdio.h)

2012-10-03 Thread Eduardo Habkost
This will help reduce the qemu-common.h dependency hell. Signed-off-by: Eduardo Habkost --- qemu-common.h | 57 ++ qemu-stdio.h | 73 +++ 2 files changed, 75 insertions(+), 55 deletions(-) creat

Re: [Qemu-devel] a user here - pci-assign

2012-10-03 Thread lejeczek
I cannot tell anything about upsteam, I'm going to try it out now, but in general I tend to stay as close to distro/yum version as possible, so for 6.3 rhel it is tedious way of grabbing and compiling everything that is needed where it seems RHEL stands it the reservation that VGA pass-though i

[Qemu-devel] [PATCH 01/18] error: add error_set_errno and error_setg_errno

2012-10-03 Thread Paolo Bonzini
These functions help maintaining homogeneous formatting of error messages that include strerror values. Signed-off-by: Paolo Bonzini --- error.c | 28 error.h | 9 + 2 file modificati, 37 inserzioni(+) diff --git a/error.c b/error.c index 1f05fc4..128d88c 1

[Qemu-devel] [PATCH 05/18] migration: avoid using error_is_set

2012-10-03 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- migration-tcp.c | 8 +--- migration.c | 13 +++-- 2 file modificati, 12 inserzioni(+), 9 rimozioni(-) diff --git a/migration-tcp.c b/migration-tcp.c index a15c2b8..78337a3 100644 --- a/migration-tcp.c +++ b/migration-tcp.c @@ -71,14 +71,16 @@ sta

[Qemu-devel] [PATCH 15/18] qemu-sockets: add error propagation to inet_connect_addr

2012-10-03 Thread Paolo Bonzini
perror and fprintf can be removed because all clients can now consume Errors properly. However, we need to change the non-blocking connect handlers to take an Error, in order to improve error handling for migration with the TCP protocol. Signed-off-by: Paolo Bonzini --- qemu-sockets.c | 15

[Qemu-devel] [PATCH 10/18] qemu-char: ask and print error information from qemu-sockets

2012-10-03 Thread Paolo Bonzini
Before: $ qemu-system-x86_64 -monitor tcp:localhost:6000 (starts despite error) $ qemu-system-x86_64 -monitor tcp:foo.bar:12345 getaddrinfo(foo.bar,12345): Name or service not known chardev: opening backend "socket" failed $ qemu-system-x86_64 -monitor tcp:localhost:443,s

[Qemu-devel] [PATCH 17/18] qemu-sockets: add error propagation to inet_parse

2012-10-03 Thread Paolo Bonzini
Reviewed-by: Luiz Capitulino Signed-off-by: Paolo Bonzini --- qemu-sockets.c | 41 + 1 file modificato, 21 inserzioni(+), 20 rimozioni(-) diff --git a/qemu-sockets.c b/qemu-sockets.c index 6f13121..55669e9 100644 --- a/qemu-sockets.c +++ b/qemu-sockets.c

Re: [Qemu-devel] [patch 2/6] Use machine options to emulate -no-kvm-irqchip

2012-10-03 Thread Anthony Liguori
Marcelo Tosatti writes: > Commit 3ad763fcba5bd0ec5a79d4a9b6baeef119dd4a3d from qemu-kvm.git. > > From: Jan Kiszka > > Upstream is moving towards this mechanism, so start using it in qemu-kvm > already to configure the specific defaults: kvm enabled on, just like > in-kernel irqchips. > > Si

Re: [Qemu-devel] [patch 3/6] Use machine options to emulate -no-kvm-pit

2012-10-03 Thread Anthony Liguori
Marcelo Tosatti writes: > Commit e81dda195556e72f8cd294998296c1051aab30a8 from qemu-kvm.git. > > From: Jan Kiszka > > Leave the related command line option in place, just > issuing a warning that it has no function anymore. > > Signed-off-by: Marcelo Tosatti Reviewed-by: Anthony Liguori Rega

Re: [Qemu-devel] [patch 4/6] Use global properties to emulate -no-kvm-pit-reinjection

2012-10-03 Thread Anthony Liguori
Marcelo Tosatti writes: > Commit 80019541e9c13fab476bee35edcef3e11646222c from qemu-kvm.git. > > From: Jan Kiszka > > Use global properties to emulate -no-kvm-pit-reinjection > > Signed-off-by: Marcelo Tosatti Reviewed-by: Anthony Liguori Regards, Anthony Liguori > > Index: qemu-compat-kvm

Re: [Qemu-devel] [patch 5/6] Emulate qemu-kvms drive parameter boot=on|off

2012-10-03 Thread Anthony Liguori
Marcelo Tosatti writes: > Commit 841280b6c224ea2c6edc2f5afc2add513c85181d from qemu-kvm.git. > > From: Jan Kiszka > > We do not want to maintain this option forever. It will be removed after > a grace period of a few releases. So warn the user that this option has > no effect and will become inv

Re: [Qemu-devel] [patch 6/6] Emulate qemu-kvms -tdf option

2012-10-03 Thread Anthony Liguori
Marcelo Tosatti writes: > Commit d527b774878defc27f317cdde19b5c54fd0d5666 from qemu-kvm.git. > > From: Jan Kiszka > > Add a warning that there is no effect anymore. > > Signed-off-by: Marcelo Tosatti Reviewed-by: Anthony Liguori Regards, Anthony Liguori > > Index: qemu-compat-kvm/vl.c > ==

Re: [Qemu-devel] [patch 0/6] qemu-kvm compat

2012-10-03 Thread Anthony Liguori
Marcelo Tosatti writes: > As discussed on yesterdays qemu call, follows qemu-kvm compat patches > for qemu: > > - command line compatibility > - allow configurable ram size for cirrus Whole thing looks good. I'll apply it directly to get it into qemu.git faster. Thanks. Regards, An

Re: [Qemu-devel] a user here - pci-assign

2012-10-03 Thread Alex Williamson
On Wed, 2012-10-03 at 15:30 +0100, lejeczek wrote: > I cannot tell anything about upsteam, I'm going to try it > out now, but in general I tend to stay as close to > distro/yum version as possible, > so for 6.3 rhel it is tedious way of grabbing and compiling > everything that is needed > where

Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class

2012-10-03 Thread Eduardo Habkost
On Wed, Oct 03, 2012 at 04:38:10PM +0200, Paolo Bonzini wrote: > Il 03/10/2012 15:28, Eduardo Habkost ha scritto: > > We can make it a child of a generic "machine" class later, but right now > > a "PC" class is needed to allow global-properties to control some > > details of CPU creation on the PC

Re: [Qemu-devel] [RFC 02/18] pc: create PC object on pc_init1()

2012-10-03 Thread Paolo Bonzini
Il 03/10/2012 15:28, Eduardo Habkost ha scritto: > It would be interesting to make the generic machine intialization code > create a machine object instead, but changing the machine initialization > function signature is a nightmare, so by now I am creating the object > inside pc_init1(). > > The

Re: [Qemu-devel] [patch 1/6] cirrus_vga: allow configurable vram size

2012-10-03 Thread Anthony Liguori
Marcelo Tosatti writes: > Allow RAM size to be configurable for cirrus, to allow migration > compatibility from qemu-kvm. > > Signed-off-by: Marcelo Tosatti Reviewed-by: Anthony Liguori Regards, Anthony Liguori > > Index: qemu-compat-kvm/hw/cirrus_vga.c > ==

Re: [Qemu-devel] [RFC 01/18] pc: create "PC" device class

2012-10-03 Thread Paolo Bonzini
Il 03/10/2012 16:48, Eduardo Habkost ha scritto: >> > >> > Does it need to be a Device, or can it be a normal Object (or for >> > clarity a derivative of TYPE_CONTAINER)? > It needs to be a Device because that's the only way to use global > properties, today. > > I have some experimental patches

Re: [Qemu-devel] [RFC 02/18] pc: create PC object on pc_init1()

2012-10-03 Thread Eduardo Habkost
On Wed, Oct 03, 2012 at 04:40:06PM +0200, Paolo Bonzini wrote: > Il 03/10/2012 15:28, Eduardo Habkost ha scritto: > > It would be interesting to make the generic machine intialization code > > create a machine object instead, but changing the machine initialization > > function signature is a night

Re: [Qemu-devel] [RFC 02/18] pc: create PC object on pc_init1()

2012-10-03 Thread Paolo Bonzini
Il 03/10/2012 16:53, Eduardo Habkost ha scritto: >> > >> > Can you add a hook to QEMUMachine so that this object is created by >> > qdev_get_machine() and ends up at /machine? > Oh, I didn't know there was an existing "machine" object already, I > didn't know qdev_get_machine(). > > Shouldn't /ma

[Qemu-devel] [PATCH 16/18] qemu-sockets: add error propagation to inet_dgram_opts

2012-10-03 Thread Paolo Bonzini
Before: $ qemu-system-x86_64 -monitor udp:localhost:631@localhost:631 inet_dgram_opts: bind(ipv4,127.0.0.1,631): OK inet_dgram_opts failed chardev: opening backend "udp" failed After: $ x86_64-softmmu/qemu-system-x86_64 -monitor udp:localhost:631@localhost:631 qemu-system

[Qemu-devel] [PATCH 12/18] qemu-ga: ask and print error information from qemu-sockets

2012-10-03 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- qga/channel-posix.c | 8 +--- 1 file modificato, 5 inserzioni(+), 3 rimozioni(-) diff --git a/qga/channel-posix.c b/qga/channel-posix.c index e22eee6..d152827 100644 --- a/qga/channel-posix.c +++ b/qga/channel-posix.c @@ -181,9 +181,11 @@ static gboolean ga_c

[Qemu-devel] [PATCH 04/18] qemu-sockets: add nonblocking connect for Unix sockets

2012-10-03 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- qemu-char.c| 2 +- qemu-sockets.c | 78 +- qemu_socket.h | 6 - 3 file modificati, 72 inserzioni(+), 14 rimozioni(-) diff --git a/qemu-char.c b/qemu-char.c index 3cc6cb5..8ebd582 100644 --- a/qemu

Re: [Qemu-devel] [PATCH 07/23] target-i386: convert cpuid features into properties

2012-10-03 Thread Eduardo Habkost
On Tue, Oct 02, 2012 at 05:38:45PM -0300, Eduardo Habkost wrote: > (Now replying on the right thread, to keep the discussion in the right > place. I don't know how I ended up replying to a pre-historic version of > the patch, sorry.) > > On Tue, Oct 02, 2012 at 05:36:59PM +0200, Igor Mammedov wrot

Re: [Qemu-devel] [patch 2/6] Use machine options to emulate -no-kvm-irqchip

2012-10-03 Thread Marcelo Tosatti
On Wed, Oct 03, 2012 at 09:40:17AM -0500, Anthony Liguori wrote: > Marcelo Tosatti writes: > > > Commit 3ad763fcba5bd0ec5a79d4a9b6baeef119dd4a3d from qemu-kvm.git. > > > > From: Jan Kiszka > > > > Upstream is moving towards this mechanism, so start using it in qemu-kvm > > already to config

  1   2   3   >