Re: [Qemu-devel] [PATCH 00/16] QEMU vhost-scsi support

2012-04-19 Thread Zhi Yong Wu
I have pushed the rebased QEMU codes and tcm_vhost codes to my git tree. Perhaps some one is interested in playing with it. 1.) my kernel git g...@github.com:wuzhy/linux.git tcm_vhost https://github.com/wuzhy/linux/commits/tcm_vhost 2.) my QEMU git g...@github.com:wuzhy/qemu.git vhost-scsi https:/

Re: [Qemu-devel] [PATCH 00/16] QEMU vhost-scsi support

2012-04-19 Thread Nicholas A. Bellinger
On Thu, 2012-04-19 at 07:30 -0500, Anthony Liguori wrote: > Hi, > Hi Anthony, > As I've mentioned before in the past, I will apply vhost-* without an > extremely > compelling argument for it. > > The reason we ultimately settled on vhost-net is that in the absence of a > fundamental change i

Re: [Qemu-devel] [PATCH v1 1/3] xilinx_zynq: added smp support

2012-04-19 Thread Peter Crosthwaite
Ping! I realise there were issues with the other patches in this series, but this one on its own is self contained and valuable in its own right. Can we get a review accordingly? Regards, Peter On Wed, Apr 11, 2012 at 3:50 AM, John Linn wrote: >> -Original Message- >> From: Peter A. G.

Re: [Qemu-devel] [RFC PATCH 2/2] target-arm: introduce Exynos4210 SD host controller model

2012-04-19 Thread Peter Crosthwaite
"target-arm:" is probably non the correct subject prefix for this patch. target-arm generally means you are patching the arm CPU stuff? Peter On Wed, Apr 18, 2012 at 6:43 PM, Igor Mitsyanko wrote: > Exynos4210 SD/MMC host controller is based on SD association standart host > controller ver. 2.00

[Qemu-devel] [PATCH] Limit ptimer rate to something achievable

2012-04-19 Thread Peter Chubb
If a guest sets very short timeouts, and asks for a timer to be reloaded on timeout, QEMU can go to 100%CPU utilisation and become unresponsive, as it is spending all its time generating timeout interrupts. On real hardware this doesn't matter, as the interrupts are just coalesced, and the effec

[Qemu-devel] [PATCH 02/13] usb-xhci: Use PCI DMA helper functions

2012-04-19 Thread David Gibson
Shortly before 1.0, we added helper functions / wrappers for doing PCI DMA from individual devices. This makes what's going on clearer and means that when we add IOMMU support somewhere in the future, only the general PCI code will have to change, not every device that uses PCI DMA. However, usb-

[Qemu-devel] [PATCH 05/13] usb-ohci: Use universal DMA helper functions

2012-04-19 Thread David Gibson
The OHCI device emulation can provide both PCI and SysBus OHCI implementations. Because of this, it was not previously converted to use the PCI DMA helper functions. This patch converts it to use the new universal DMA helper functions. In the PCI case, it obtains its DMAContext from pci_dma_conte

[Qemu-devel] [PATCH 10/13] iommu: Add facility to cancel in-use dma memory maps

2012-04-19 Thread David Gibson
One new complication raised by IOMMU support over only handling DMA directly to physical addresses is handling dma_memory_map() case (replacing cpu_physical_memory_map()) when the IOMMU translation the IOVAs covered by such a map are invalidated or changed while the map is active. This should neve

[Qemu-devel] [PATCH 03/13] Implement cpu_physical_memory_zero()

2012-04-19 Thread David Gibson
This patch adds cpu_physical_memory_zero() function. This is equivalent to calling cpu_physical_memory_write() with a buffer full of zeroes, but avoids actually allocating such a buffer along the way. Signed-off-by: David Gibson --- cpu-common.h |1 + exec.c | 53 +++

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

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

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

2012-04-19 Thread David Gibson
The USB UHCI and EHCI drivers were converted some time ago to use the pci_dma_*() helper functions. However, this conversion was not complete because in some places both these drivers do DMA via the usb_packet_map() function in usb-libhw.c. That function directly used cpu_physical_memory_map().

[Qemu-devel] [PATCH 04/13] iommu: Add universal DMA helper functions

2012-04-19 Thread David Gibson
Not that long ago, every device implementation using DMA directly accessed guest memory using cpu_physical_memory_*(). This meant that adding support for a guest visible IOMMU would require changing every one of these devices to go through IOMMU translation. Shortly before qemu 1.0, I made a star

[Qemu-devel] [PATCH 01/13] Better support for dma_addr_t variables

2012-04-19 Thread David Gibson
A while back, we introduced the dma_addr_t type, which is supposed to be used for bus visible memory addresses. At present, this is an alias for target_phys_addr_t, but this will change when we eventually add support for guest visible IOMMUs. There are some instances of target_phys_addr_t in the

[Qemu-devel] [PATCH 06/13] iommu: Make sglists and dma_bdrv helpers use new universal DMA helpers

2012-04-19 Thread David Gibson
dma-helpers.c contains a number of helper functions for doing scatter/gather DMA, and various block device related DMA. Currently, these directly access guest memory using cpu_physical_memory_*(), assuming no IOMMU translation. This patch updates this code to use the new universal DMA helper func

[Qemu-devel] [PATCH v8 4/4] use inet_listen()/inet_connect() to support ipv6 migration

2012-04-19 Thread Amos Kong
Use help functions in qemu-socket.c for tcp migration, which already support ipv6 addresses. Currently errp will be set to UNDEFINED_ERROR when migration fails, qemu would output "migration failed: ...", and current user can see a message("An undefined error has occurred") in monitor. This patch

[Qemu-devel] [PATCH v8 2/4] sockets: change inet_connect() to support nonblock socket

2012-04-19 Thread Amos Kong
Add a bool argument to inet_connect() to assign if set socket to block/nonblock, and delete original argument 'socktype' that is unused. Add a new argument to inet_connect()/inet_connect_opts(), to pass back connect error by error class. Retry to connect when -EINTR is got. Connect's successful fo

[Qemu-devel] [PATCH 12/13] iommu: Allow PCI to use IOMMU infrastructure

2012-04-19 Thread David Gibson
This patch adds some hooks to let PCI devices and busses use the new IOMMU infrastructure. When IOMMU support is enabled, each PCI device now contains a DMAContext * which is used by the pci_dma_*() wrapper functions. By default, the contexts are initialized to NULL, assuming no IOMMU. However th

[Qemu-devel] [PATCH 13/13] pseries: Implement IOMMU and DMA for PAPR PCI devices

2012-04-19 Thread David Gibson
Currently the pseries machine emulation does not support DMA for emulated PCI devices, because the PAPR spec always requires a (guest visible, paravirtualized) IOMMU which was not implemented. Now that we have infrastructure for IOMMU emulation, we can correct this and allow PCI DMA for pseries.

Re: [Qemu-devel] [PATCH v3] qemu-img: let 'qemu-img convert' flush data

2012-04-19 Thread Liu Yuan
On 04/13/2012 05:17 PM, Liu Yuan wrote: > From: Liu Yuan > > The 'qemu-img convert -h' advertise that the default cache mode is > 'writeback', while in fact it is 'unsafe'. > > This patch 1) fix the help manual and 2) let bdrv_close() call bdrv_flush() > > 2) is needed because some backend sto

Re: [Qemu-devel] qemu physical address

2012-04-19 Thread Xin Tong
On Thu, Apr 19, 2012 at 6:56 PM, Xin Tong wrote: > On Thu, Apr 19, 2012 at 1:03 PM, Blue Swirl wrote: >> On Thu, Apr 19, 2012 at 01:55, Xin Tong wrote: >>> but should not the address be within 1 - 4G-1 even with PAE. is not >>> the PAE just using 64bits addresses as supposed to 32 bit ? what doe

[Qemu-devel] [PATCH 11/13] pseries: Convert sPAPR TCEs to use generic IOMMU infrastructure

2012-04-19 Thread David Gibson
The pseries platform already contains an IOMMU implementation, since it is essential for the platform's paravirtualized VIO devices. This IOMMU support is currently built into the implementation of the VIO "bus" and the various VIO devices. This patch converts this code to make use of the new com

[Qemu-devel] [PATCH 09/13] iommu: Introduce IOMMU emulation infrastructure

2012-04-19 Thread David Gibson
This patch adds the basic infrastructure necessary to emulate an IOMMU visible to the guest. The DMAContext structure is extended with information and a callback describing the translation, and the various DMA functions used by devices will now perform IOMMU translation using this callback. Cc: M

[Qemu-devel] [RFC 0/13] Support for guest visible IOMMUs

2012-04-19 Thread David Gibson
Here is the latest update of my series of patches adding infrastructure to allow the emulation of guest visible IOMMUs. I think this is conceptually ready to go, but I'm sending it as an RFC for now because it needs a bit more testing and review, particularly of the invalidation paths. I believe

Re: [Qemu-devel] [PATCH 3/4] Switch from array based resource allocation to list

2012-04-19 Thread Kevin O'Connor
On Thu, Apr 19, 2012 at 07:00:41PM +1200, Alexey Korolev wrote: > Here is the whole series of patches including 64bit support. Thanks. [...] > [Patch 5] > Track-alignment-explicitly > Almost the same as the previous, just changed priority from r->align to > r->sum when setting start address of r

Re: [Qemu-devel] [PATCH v3] Exynos4210 IRQ Gate improvement

2012-04-19 Thread Evgeny Voevodin
On 17.04.2012 09:41, Evgeny Voevodin wrote: This patch introdices new functionality of exynos4210 IRQ gate. Now it has n_in inputs and one output. Exynos SOC creates NCPU instances of IRQ gate with 2 inputs each instead of creating one gate with 4 inputs and 2 outputs. This device could be used

[Qemu-devel] [Bug 959992] Re: segfault in apic_report_irq_delivered when booting tinycore_3.3.iso

2012-04-19 Thread Roy Tam
still happens in v1.0-2147-g51006bb. always reproducible with ttylinux 14.0 iso. ** Attachment added: "screenshot" https://bugs.launchpad.net/qemu/+bug/959992/+attachment/3095081/+files/ttylinux14-qemugit.png -- You received this bug notification because you are a member of qemu- devel-ml, w

Re: [Qemu-devel] [PATCH 1/2 v5-test] add function DMA_set_return and DMA_set_channel_async in dma.c

2012-04-19 Thread Zhi Hui Li
+ +void DMA_set_return(int nret, int nchan) +{ +struct dma_regs *r; +struct dma_cont *d; +int icont, ichan; + +icont = nchan> 3; +ichan = nchan& 3; +d = dma_controllers; +r =&d[icont].regs[ichan]; +r->now[COUNT] = nret; +assert(r->channel_is_asynchronous); +

[Qemu-devel] [PATCH v3 4/4] petalogix-ml605: added spi controller with m25p80

2012-04-19 Thread Peter A. G. Crosthwaite
Added spi controller to the reference design, with a single cs line and a m25p80 style spi-flash connected Signed-off-by: Peter A. G. Crosthwaite --- changed from v2: changed spi -> ssi added two spi flashes to machine model instead of one default-configs/microblaze-softmmu.mak |1 + defa

[Qemu-devel] [PATCH v3 3/4] xilinx_spi: initial version

2012-04-19 Thread Peter A. G. Crosthwaite
device model for xilinx XPS SPI controller (v2.0) Signed-off-by: Peter A. G. Crosthwaite --- changed from v2: converted spi api to ssi api changed from v1: converted spi api to modified txrx style Makefile.target |1 + hw/xilinx_spi.c | 453 +

[Qemu-devel] [PATCH v3 2/4] m25p80: initial verion

2012-04-19 Thread Peter A. G. Crosthwaite
Added device model for m25p80 SPI flash Signed-off-by: Peter A. G. Crosthwaite --- changed from v2: updated for SSI slave interface used async io (suggested - Stefan Hajnoczi) changed from v1: converted spi api to modified txrx style factored out lots of common code and inlined overly short singl

[Qemu-devel] [PATCH v3 1/4] SSI: Built in multiple device support

2012-04-19 Thread Peter A. G. Crosthwaite
Added support for multiple devices attached to a single SSI bus (Previously SSI masters with multiple slaves were emulated as multiple point to point SSI busses) Signed-off-by: Peter A. G. Crosthwaite --- changed from v2: This patch is new (totally rewitten replacement of (1/4) from v2) hw/spit

[Qemu-devel] [PATCH v3 0/4] Ehnahced SSI bus support + M25P80 SPI flash + Xilinx SPI controller

2012-04-19 Thread Peter A. G. Crosthwaite
Patch 1 Enhances SSI bus support to properly support multiple attached devices. An api is provided for SSI/SPI masters to select a particular device attached to the bus. Patch 2 is a device model for the m25p80 style SPI flash chip. Patch 3 is the Xilinx XPS SPI contoller. Its a sysbus device

Re: [Qemu-devel] [PATCH v7 4/4] use inet_listen()/inet_connect() to support ipv6 migration

2012-04-19 Thread Michael Roth
On Thu, Apr 19, 2012 at 03:11:54PM +0800, Amos Kong wrote: > Use help functions in qemu-socket.c for tcp migration, > which already support ipv6 addresses. > > Currently errp will be set to UNDEFINED_ERROR when migration fails, > qemu would output "migration failed: ...", and current user can > se

Re: [Qemu-devel] [PATCH v7 2/4] sockets: change inet_connect() to support nonblock socket

2012-04-19 Thread Michael Roth
On Thu, Apr 19, 2012 at 03:11:34PM +0800, Amos Kong wrote: > Add a bool argument to inet_connect() to assign if set socket > to block/nonblock, and delete original argument 'socktype' > that is unused. > Add a new argument to inet_connect()/inet_connect_opts(), > to pass back connect error by error

[Qemu-devel] [PATCH] Add .gitignore for tests/

2012-04-19 Thread David Gibson
The new autotests in tests/ generate a number of files, both executable and source, which are not caught by the existing .gitignore files. This patch adds a new .gitignore in tests/ which covers these. Signed-off-by: David Gibson --- tests/.gitignore | 13 + 1 file changed, 13 ins

Re: [Qemu-devel] [PATCH v7 1/4] qerror: add five qerror strings

2012-04-19 Thread Michael Roth
On Thu, Apr 19, 2012 at 03:11:25PM +0800, Amos Kong wrote: > Add five new qerror strings, they are about listen/connect socket: > QERR_SOCKET_CONNECT_IN_PROGRESS > QERR_SOCKET_CONNECT_FAILED > QERR_SOCKET_LISTEN_FAILED > QERR_SOCKET_BIND_FAILED > QERR_SOCKET_CREATE_FAILED > > Signed-off-

Re: [Qemu-devel] [PATCH 00/15] QOM'ify x86 CPU, part 2: properties

2012-04-19 Thread Michael Roth
On Wed, Apr 18, 2012 at 01:11:04AM +0200, Andreas Färber wrote: > Hello, > > This series introduces some QOM properties for X86CPU, so that our built-in > init code exercises the same code paths as QMP, as suggested by Eduardo: > * "family", > * "model", > * "stepping" and > * "model-id" (rather t

Re: [Qemu-devel] [PATCH 11/15] target-i386: Add property getter for CPU model-id

2012-04-19 Thread Michael Roth
On Thu, Apr 19, 2012 at 06:47:57PM -0600, Eric Blake wrote: > On 04/19/2012 06:41 PM, Michael Roth wrote: > > >> +char *value; > >> +int i; > >> + > >> +value = g_malloc(48 + 1); > >> +for (i = 0; i < 48; i++) { > >> +value[i] = env->cpuid_model[i >> 2] >> (8 * (i & 3)); >

Re: [Qemu-devel] [PATCH 11/15] target-i386: Add property getter for CPU model-id

2012-04-19 Thread Eric Blake
On 04/19/2012 06:41 PM, Michael Roth wrote: >> +char *value; >> +int i; >> + >> +value = g_malloc(48 + 1); >> +for (i = 0; i < 48; i++) { >> +value[i] = env->cpuid_model[i >> 2] >> (8 * (i & 3)); > > setter code is a bit difficult to parse but I think we need value[i] &= 0

Re: [Qemu-devel] [PATCH 11/15] target-i386: Add property getter for CPU model-id

2012-04-19 Thread Michael Roth
On Wed, Apr 18, 2012 at 01:11:15AM +0200, Andreas Färber wrote: > Signed-off-by: Andreas Färber > --- > target-i386/cpu.c | 17 - > 1 files changed, 16 insertions(+), 1 deletions(-) > > diff --git a/target-i386/cpu.c b/target-i386/cpu.c > index 0c98fcc..cc4f566 100644 > --- a/t

Re: [Qemu-devel] [PATCH 00/16] QEMU vhost-scsi support

2012-04-19 Thread Anthony Liguori
Hi Nicholas, On 04/19/2012 06:53 PM, Nicholas A. Bellinger wrote: On Thu, 2012-04-19 at 07:30 -0500, Anthony Liguori wrote: However, for storage, be it scsi or direct access, the same problem really doesn't exist. There isn't an obvious benefit to being in the kernel. In the modern Linux v3

Re: [Qemu-devel] [PATCH 09/15] target-i386: Add property getter for CPU model

2012-04-19 Thread Michael Roth
On Wed, Apr 18, 2012 at 01:11:13AM +0200, Andreas Färber wrote: > Signed-off-by: Andreas Färber > --- > target-i386/cpu.c | 14 +- > 1 files changed, 13 insertions(+), 1 deletions(-) > > diff --git a/target-i386/cpu.c b/target-i386/cpu.c > index 21041b5..2beb3ab 100644 > --- a/targ

Re: [Qemu-devel] SD card subsystem synchronous I/O

2012-04-19 Thread andrzej zaborowski
On 18 April 2012 14:35, Stefan Hajnoczi wrote: > Recently there have been new SD card emulation patches so I want to > raise the issue of synchronous I/O while there is focus on the SD > subsystem.  Maybe some of the people who are improving the SD > subsystem will be able to help. > > sd_blk_read

Re: [Qemu-devel] [PATCH v9 01/10] Add cache handling functions

2012-04-19 Thread Amos Kong
On Thu, Apr 12, 2012 at 2:49 AM, Orit Wasserman wrote: > Add LRU page cache mechanism. > The page are accessed by their address. > > Signed-off-by: Orit Wasserman > Signed-off-by: Benoit Hudzia > Signed-off-by: Petter Svard > Signed-off-by: Aidan Shribman > --- > arch_init.c | 220 > +++

[Qemu-devel] Fault Tolerance (Kemari) Status?

2012-04-19 Thread Aaron Stover (Celestech)
Hi, I'm curious as to the current status of the fault tolerance features of QEMU? From reading what I could find on the wiki, it appears as though the code was ready to be merged into version 0.14 but it does appear to have happened. Is there an ongoing effort to get the code merged into the

Re: [Qemu-devel] qemu physical address

2012-04-19 Thread Xin Tong
On Thu, Apr 19, 2012 at 1:03 PM, Blue Swirl wrote: > On Thu, Apr 19, 2012 at 01:55, Xin Tong wrote: >> but should not the address be within 1 - 4G-1 even with PAE. is not >> the PAE just using 64bits addresses as supposed to 32 bit ? what does >> the physical address bigger than 4G mean ?  is not

Re: [Qemu-devel] [PATCH 14/20] qcow2: Factor out count_cow_clusters

2012-04-19 Thread Marcelo Tosatti
On Thu, Apr 19, 2012 at 05:14:20PM -0300, Marcelo Tosatti wrote: > > There is one intended change in functionality in this patch, which is > > that it allocates new clusters even when it could satisfy the first part > > of the request with already allocated clusters. In order to check if > > there

Re: [Qemu-devel] [PATCH 04/15] target-i386: Add "family" property to X86CPU

2012-04-19 Thread Michael Roth
On Wed, Apr 18, 2012 at 01:11:08AM +0200, Andreas Färber wrote: > Add the property early in the initfn so that it can be used in helpers > such as mce_init(). > > Signed-off-by: Andreas Färber > --- > target-i386/cpu.c | 38 +- > 1 files changed, 33 insertio

Re: [Qemu-devel] [PATCH 3/4] sparc: fix qtest

2012-04-19 Thread Peter Maydell
On 19 April 2012 21:27, Blue Swirl wrote: > @@ -119,7 +120,9 @@ CPUSPARCState *cpu_sparc_init(const char *cpu_model) >     cpu = SPARC_CPU(object_new(TYPE_SPARC_CPU)); >     env = &cpu->env; > > -    gen_intermediate_code_init(env); > +    if (!qtest_enabled()) { > +        gen_intermediate_code_i

Re: [Qemu-devel] [PATCH 4/4] qtest: add m48t59 tests for Sparc

2012-04-19 Thread Blue Swirl
On Thu, Apr 19, 2012 at 20:27, Blue Swirl wrote: > Add simple m48t59 qtests, enable test only for Sparc32 > and Sparc64. On PPC, the device is behind PCI bus. > > Signed-off-by: Blue Swirl > --- >  tests/Makefile      |    3 + >  tests/m48t59-test.c |  259 > +

[Qemu-devel] [PATCH 4/4] qtest: add m48t59 tests for Sparc

2012-04-19 Thread Blue Swirl
Add simple m48t59 qtests, enable test only for Sparc32 and Sparc64. On PPC, the device is behind PCI bus. Signed-off-by: Blue Swirl --- tests/Makefile |3 + tests/m48t59-test.c | 259 +++ 2 files changed, 262 insertions(+) create mode 10

[Qemu-devel] [PATCH 2/4] qtest: add dummy functions for user emulators

2012-04-19 Thread Blue Swirl
Allow qtest to be used also in files used for user emulators by introducing dummy functions. Signed-off-by: Blue Swirl --- qtest.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/qtest.h b/qtest.h index 1478343..723a4f9 100644 --- a/qtest.h +++ b/qtest.h @@ -16,6 +16,7

[Qemu-devel] [PATCH 3/4] sparc: fix qtest

2012-04-19 Thread Blue Swirl
Skip TCG init for qtest. Signed-off-by: Blue Swirl --- target-sparc/cpu.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target-sparc/cpu.c b/target-sparc/cpu.c index 24f90f1..6720837 100644 --- a/target-sparc/cpu.c +++ b/target-sparc/cpu.c @@ -17,6 +17,7 @@ * Licen

[Qemu-devel] [PATCH 1/4] qtest: add register fuzzing to RTC test

2012-04-19 Thread Blue Swirl
Reviewed-by: Anthony Liguori Signed-off-by: Blue Swirl --- tests/rtc-test.c | 17 + 1 file changed, 17 insertions(+) diff --git a/tests/rtc-test.c b/tests/rtc-test.c index 983a980..f23ac3a 100644 --- a/tests/rtc-test.c +++ b/tests/rtc-test.c @@ -240,6 +240,22 @@ static void al

[Qemu-devel] [PATCH] qemu-char: Fix crash when switching consoles

2012-04-19 Thread Stefan Weil
qemu-system-arm (and other system emulations) crashes with SDL when the user switches consoles (Alt-Ctrl-F4). We already check for NULL pointers in qemu_chr_fe_ioctl, qemu_chr_be_can_write and other functions, so do this also for s->chr_read in qemu_chr_be_write. This fixes the crash. Signed-off-

Re: [Qemu-devel] [PATCH 14/20] qcow2: Factor out count_cow_clusters

2012-04-19 Thread Marcelo Tosatti
On Thu, Apr 19, 2012 at 09:38:29AM +0200, Kevin Wolf wrote: > Am 19.04.2012 04:44, schrieb Marcelo Tosatti: > > On Mon, Mar 12, 2012 at 04:19:45PM +0100, Kevin Wolf wrote: > >> Signed-off-by: Kevin Wolf > >> Reviewed-by: Stefan Hajnoczi > >> --- > >> block/qcow2-cluster.c | 55 > >> ++

Re: [Qemu-devel] [PATCH 2/2] Expose tsc deadline timer cpuid to guest

2012-04-19 Thread Eduardo Habkost
Jan/Avi: ping? I would like to get this ABI detail clarified so it can be implemented the right way on Qemu and KVM. My proposal is to simply add tsc-deadline to the data returned by GET_SUPPORTED_CPUID, making KVM_CAP_TSC_DEADLINE_TIMER unnecessary. On Fri, Mar 23, 2012 at 02:17:52PM +, Li

Re: [Qemu-devel] [PATCH 0/3] fix zero-length packets in usb-host

2012-04-19 Thread Johannes Stezenbach
Hi, On Thu, Apr 19, 2012 at 01:54:33PM +0200, Gerd Hoffmann wrote: > Largely based on a patch from Johannes Stezenbach. Splitted it up, > improved patch descriptions and added one related ehci bugfix. > > Johannes, does this series fix your firmware update issue? The series looks good to me, bu

Re: [Qemu-devel] [PATCH 11/14] tcg-sparc: Mask shift immediates to avoid illegal insns.

2012-04-19 Thread Max Filippov
On Thu, Apr 19, 2012 at 5:33 PM, Richard Henderson wrote: > The xtensa-test image generates a sra_i32 with count 0x40. Richard, what is that xtensa-test image that you refer? > Whether this is accident of tcg constant propagation or > originating directly from the instruction stream is immateria

Re: [Qemu-devel] [RFC 0/2]: qemu-ga: drop automatic reaper

2012-04-19 Thread Luiz Capitulino
On Thu, 19 Apr 2012 13:57:48 -0500 Michael Roth wrote: > On Thu, Apr 19, 2012 at 02:36:53PM -0300, Luiz Capitulino wrote: > > Michael, > > > > I'm going to revive this topic one more time. I was working on v2 of my > > fixes > > to the suspend race bugs and really thought that the real problem

Re: [Qemu-devel] [PATCH] linux-user: Fix undefined HOST_LONG_SIZE on PPC hosts

2012-04-19 Thread Stefan Weil
Am 19.04.2012 16:47, schrieb Peter Maydell: On 19 April 2012 15:23, Alexander Graf wrote: On my PPC host, HOST_LONG_SIZE is not defined even after running configure. Use the normal C way of determining the long size instead. #elif defined(HOST_PPC) -return HOST_LONG_SIZE; +

Re: [Qemu-devel] [RFC 0/2]: qemu-ga: drop automatic reaper

2012-04-19 Thread Michael Roth
On Thu, Apr 19, 2012 at 02:36:53PM -0300, Luiz Capitulino wrote: > Michael, > > I'm going to revive this topic one more time. I was working on v2 of my fixes > to the suspend race bugs and really thought that the real problem is that the > code shouldn't be that complex. > > Basically, this serie

Re: [Qemu-devel] [PATCH 00/15] QOM'ify x86 CPU, part 2: properties

2012-04-19 Thread Eduardo Habkost
On Wed, Apr 18, 2012 at 01:11:04AM +0200, Andreas Färber wrote: > Hello, > > This series introduces some QOM properties for X86CPU, so that our built-in > init code exercises the same code paths as QMP, as suggested by Eduardo: > * "family", > * "model", > * "stepping" and > * "model-id" (rather t

Re: [Qemu-devel] [PATCH] qtest: Fix tv_usec != long

2012-04-19 Thread Richard Henderson
On 04/19/2012 12:04 PM, Blue Swirl wrote: >> > -tv.tv_sec, tv.tv_usec); >> > +tv.tv_sec, (long) tv.tv_usec); > Instead of the casts, can't we fix FMT_timeval? > Without truly ugly configure detection, I sincerely doubt it. r~

Re: [Qemu-devel] [RFC PATCH 7/9] Implement memslot command-line option and memslot hmp command

2012-04-19 Thread Vasilis Liaskovitis
Hi, On Thu, Apr 19, 2012 at 05:22:52PM +0300, Avi Kivity wrote: > On 04/19/2012 05:08 PM, Vasilis Liaskovitis wrote: > > Implement -memslot qemu-kvm command line option to define hotplug-able > > memory > > slots. > > Syntax: "-memslot id=name,start=addr,size=sz,node=nodeid" > > > > e.g. "-me

Re: [Qemu-devel] [RFC PATCH 0/9] ACPI memory hotplug

2012-04-19 Thread Vasilis Liaskovitis
Hi, On Thu, Apr 19, 2012 at 09:49:31AM -0500, Anthony Liguori wrote: > On 04/19/2012 09:08 AM, Vasilis Liaskovitis wrote: > >This is a prototype for ACPI memory hotplug on x86_64 target. Based on some > >earlier work and comments from Gleb. > > > >Memslot devices are modeled with a new qemu comman

[Qemu-devel] [RFC 2/2] qemu-ga: shutdown: fix zombies

2012-04-19 Thread Luiz Capitulino
Last commit dropped qemu-ga's SIGCHLD handler, used to automatic reap terminated children processes. This introduced a bug to qmp_guest_shutdown(): it will generate zombies. This problem probably doesn't matter in the success case, as the VM will shutdown anyway, but let's do the right thing and r

[Qemu-devel] [RFC 1/2] qemu-ga: suspend: collect child exit status

2012-04-19 Thread Luiz Capitulino
Currently, qemu-ga has a SIGCHLD handler that automatically reaps terminated children processes. However, if a function is interested in the exit status of a terminated child, it has to play tricks like bios_supports_mode() does, it double forks and get the child's exit status via pipe. This is to

[Qemu-devel] [RFC 0/2]: qemu-ga: drop automatic reaper

2012-04-19 Thread Luiz Capitulino
Michael, I'm going to revive this topic one more time. I was working on v2 of my fixes to the suspend race bugs and really thought that the real problem is that the code shouldn't be that complex. Basically, this series drops the automatic reaper and adds waitpid() calls & related logic to the su

Re: [Qemu-devel] [PATCH 1/2] qemu-ga: generate missing stubs for fsfreeze

2012-04-19 Thread Michael Roth
On Thu, Apr 19, 2012 at 11:56:28AM -0500, Richard Henderson wrote: > On 04/19/2012 11:05 AM, Michael Roth wrote: > > When linux-specific commands (including guest-fsfreeze-*) were consolidated > > under defined(__linux__), we forgot to account for the case where > > defined(__linux__) && !defined(F

Re: [Qemu-devel] [PATCH 14/14] tcg-sparc: Fix and enable direct TB chaining.

2012-04-19 Thread Blue Swirl
On Thu, Apr 19, 2012 at 13:33, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- >  exec-all.h             |    9 ++--- >  tcg/sparc/tcg-target.c |   19 --- >  2 files changed, 22 insertions(+), 6 deletions(-) > > diff --git a/exec-all.h b/exec-all.h > index

Re: [Qemu-devel] [PATCH 00/14] tcg-sparc improvments, v3

2012-04-19 Thread Blue Swirl
On Thu, Apr 19, 2012 at 13:33, Richard Henderson wrote: > Changes v2->v3: >  * Patch 3, undo disassembly errors spotted by Blue. >  * Patch 8, update for changes in mainline. The patches still have some problems: checkpatch 05 WARNING: suspect code indent for conditional statements (4, 7) #395: F

Re: [Qemu-devel] [PATCH] qtest: Fix tv_usec != long

2012-04-19 Thread Blue Swirl
On Thu, Apr 19, 2012 at 12:09, Richard Henderson wrote: > Sparc Debian 5.0.8 does not define __suseconds_t as long, > but FMT_timeval expects %ld. > > Signed-off-by: Richard Henderson > Cc: Anthony Liguori > Cc: Paolo Bonzini > --- >  qtest.c |    8 >  1 files changed, 4 insertions(+),

Re: [Qemu-devel] qemu physical address

2012-04-19 Thread Blue Swirl
On Thu, Apr 19, 2012 at 01:55, Xin Tong wrote: > but should not the address be within 1 - 4G-1 even with PAE. is not > the PAE just using 64bits addresses as supposed to 32 bit ? what does > the physical address bigger than 4G mean ?  is not the physical > address starting from 0 from the prospect

Re: [Qemu-devel] [PATCH 1/2] qemu-ga: generate missing stubs for fsfreeze

2012-04-19 Thread Richard Henderson
On 04/19/2012 11:05 AM, Michael Roth wrote: > When linux-specific commands (including guest-fsfreeze-*) were consolidated > under defined(__linux__), we forgot to account for the case where > defined(__linux__) && !defined(FIFREEZE). As a result stubs are no longer > being generated on linux hosts

[Qemu-devel] [PATCH 02/14] tcg-sparc: Fix ADDX opcode.

2012-04-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.c index 0e71618..358a70c 100644 --- a/tcg/sparc/tcg-target.c +++ b/tcg/sparc/tcg-target.c @@ -242,7 +242,7 @@ static

[Qemu-devel] [PATCH 15/16] SCSI emulation: should tell the guest that we actually support thin provisioning

2012-04-19 Thread Paolo Bonzini
From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg [Actually, we should report it only if discard_granularity is nonzero. Older SBC drafts assigned 0 to thin provisioning and 1 to thick (resource-provisioned, they call it). Newer drafts assign respectively 1 and 2 - Paolo] Signed-off-by: P

[Qemu-devel] [PATCH 1/7] nbd: avoid out of bounds access to recv_coroutine array

2012-04-19 Thread Paolo Bonzini
This can happen with a buggy or malicious server. Reported-by: Michael Tokarev Signed-off-by: Paolo Bonzini --- block/nbd.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/block/nbd.c b/block/nbd.c index 161b299..9972cdb 100644 --- a/block/nbd.c +++ b/block/nbd.c @@

[Qemu-devel] usb patch queue status

2012-04-19 Thread Gerd Hoffmann
Hi, I think I've grabbed all pending usb patches now. If you have submitted an usb patch you should have either a reply in your inbox or the patch included in the queue. Current state of the usb patch queue can be checked here: pull: git://git.kraxel.org/qemu usb.47 cgit: http://www.kraxel.or

Re: [Qemu-devel] [PATCH] qom: Refine container_get() to allow using a custom root

2012-04-19 Thread Andreas Färber
Am 19.04.2012 17:43, schrieb Anthony Liguori: > On 04/19/2012 10:19 AM, Andreas Färber wrote: >> Am 05.04.2012 13:30, schrieb Paolo Bonzini: >>> Il 05/04/2012 13:21, Andreas Färber ha scritto: Specify the root to search from as argument. This avoids hardcoding "/machine" in some places an

[Qemu-devel] [PATCH 08/14] tcg-sparc: Do not use a global register for AREG0.

2012-04-19 Thread Richard Henderson
Use of "env" as a macro means constraining include file ordering a bit. Signed-off-by: Richard Henderson --- dyngen-exec.h| 17 +++-- target-m68k/op_helper.c |2 +- target-unicore32/op_helper.c |2 +- target-xtensa/op_helper.c|4 ++-- xtensa-sem

[Qemu-devel] [PULL 0/7] NBD patches for 1.1

2012-04-19 Thread Paolo Bonzini
Anthony, the following changes since commit e6f5d0be730a41bacb10edba19d1369ec2949486: Merge branch 'w64' of git://qemu.weilnetz.de/qemu (2012-04-15 19:56:06 +) are available in the git repository at: git://github.com/bonzini/qemu.git nbd-next for you to fetch changes up to 00a07bfd8fe

[Qemu-devel] [PATCH 1/2] qemu-ga: generate missing stubs for fsfreeze

2012-04-19 Thread Michael Roth
When linux-specific commands (including guest-fsfreeze-*) were consolidated under defined(__linux__), we forgot to account for the case where defined(__linux__) && !defined(FIFREEZE). As a result stubs are no longer being generated on linux hosts that don't have FIFREEZE support. Fix this. Tested-

[Qemu-devel] [PATCH 2/2] qemu-ga: fix help output

2012-04-19 Thread Michael Roth
Reviewed-by: Luiz Capitulino Signed-off-by: Michael Roth --- qemu-ga.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/qemu-ga.c b/qemu-ga.c index d6f786e..74a1b02 100644 --- a/qemu-ga.c +++ b/qemu-ga.c @@ -117,12 +117,13 @@ static gboolean register_signal_handlers

[Qemu-devel] [PULL] qemu-ga build fix and minor fix-up of help output

2012-04-19 Thread Michael Roth
The following changes since commit 51006bbc45bc74977ae538190a53df2af534acb9: Merge remote-tracking branch 'origin/master' into staging (2012-04-18 10:06:09 -0500) are available in the git repository at: git://github.com/mdroth/qemu.git qga-pull-4-19-12 Michael Roth (2): qemu-ga: gene

[Qemu-devel] [PATCH 05/16] scsi: add missing test for cancelled request

2012-04-19 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/scsi-disk.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 9949786..792e9d0 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -171,7 +171,9 @@ static void scsi_dma_complete(void *opaque, int ret

[Qemu-devel] [PATCH 09/16] scsi: force unit access on VERIFY

2012-04-19 Thread Paolo Bonzini
Also DMA data from the host, to avoid that the host reports an underrun. Signed-off-by: Paolo Bonzini --- hw/scsi-disk.c | 27 +++ 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 7e6e17d..09c2715 100644 --- a/hw/scsi-

[Qemu-devel] [PATCH 13/16] scsi: advertise DPOFUA

2012-04-19 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/scsi-disk.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 2d9ac2d..fca31fa 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -1093,14 +1093,15 @@ static int scsi_disk_emulate_mode_sense(SCSIDisk

[Qemu-devel] [PATCH 4/7] nbd: consistently return negative errno values

2012-04-19 Thread Paolo Bonzini
In the next patch we need to look at the return code of nbd_wr_sync. To avoid percolating the socket_error() ugliness all around, let's handle errors by returning negative errno values. Signed-off-by: Paolo Bonzini --- block/nbd.c | 13 +++-- nbd.c | 159 +---

Re: [Qemu-devel] [PATCH] linux-user: Fix undefined HOST_LONG_SIZE on PPC hosts

2012-04-19 Thread Peter Maydell
On 19 April 2012 16:12, Alexander Graf wrote: > On 04/19/2012 04:47 PM, Peter Maydell wrote: >> HOST_LONG_SIZE was removed by Stefan in commit 9c6ecf; >> it looks like this PPC-only use was accidentally omitted. >> For consistency with that commit and how we handle TYPE_LONG >> in this function, i

[Qemu-devel] [PATCH 16/16] scsi: add SANITIZE command

2012-04-19 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/scsi-bus.c |1 + hw/scsi-defs.h |1 + 2 files changed, 2 insertions(+) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index d847396..dbdb99c 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -1200,6 +1200,7 @@ static const char *scsi_command_name(uint8_t

[Qemu-devel] [RFC PATCH 5/9] acpi_piix4: Implement memory device hotplug registers

2012-04-19 Thread Vasilis Liaskovitis
A 32-byte register is used to present up to 256 hotplug-able memory devices to BIOS and OSPM. Hot-add and hot-remove functions trigger an ACPI hotplug event through these. Only reads are allowed from these registers (from BIOS/OSPM perspective). "memslot id add" will immediately populate the ne

[Qemu-devel] [PATCH 2/7] nbd: consistently use ssize_t

2012-04-19 Thread Paolo Bonzini
GCC (pedantically, but correctly) considers that a negative ssize_t may become positive when casted to int. This may cause uninitialized variable warnings when a function returns such a negative ssize_t and is inlined. Propagate ssize_t return types to avoid this. Signed-off-by: Paolo Bonzini --

Re: [Qemu-devel] [PATCH 1/2] qemu-ga: generate missing stubs for fsfreeze

2012-04-19 Thread Michael Roth
On Tue, Apr 17, 2012 at 12:07:38PM -0500, Michael Roth wrote: > When linux-specific commands (including guest-fsfreeze-*) were consolidated > under defined(__linux__), we forgot to account for the case where > defined(__linux__) && !defined(FIFREEZE). As a result stubs are no longer > being generat

Re: [Qemu-devel] [PATCH 09/14] qdev: connect some links and move type to object

2012-04-19 Thread Paolo Bonzini
Il 19/04/2012 16:46, Andreas Färber ha scritto: > I suggested /unassigned because of no explicit parenting. Either the > unstable /unassigned tree There is /machine/unattached, not /unattached. > or qdev_get_machine() for the real device > hierarchy. It's a device bus so it should be in one of th

[Qemu-devel] [PATCH 14/14] tcg-sparc: Fix and enable direct TB chaining.

2012-04-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- exec-all.h |9 ++--- tcg/sparc/tcg-target.c | 19 --- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/exec-all.h b/exec-all.h index 6bcc075..ece4226 100644 --- a/exec-all.h +++ b/exec-all.h @@ -121,9 +121,

Re: [Qemu-devel] [PATCH] qom: Refine container_get() to allow using a custom root

2012-04-19 Thread Anthony Liguori
On 04/19/2012 10:19 AM, Andreas Färber wrote: Am 05.04.2012 13:30, schrieb Paolo Bonzini: Il 05/04/2012 13:21, Andreas Färber ha scritto: Specify the root to search from as argument. This avoids hardcoding "/machine" in some places and makes it more flexible. Signed-off-by: Andreas Färber Cc:

[Qemu-devel] [PATCH 01/16] scsi: fix memory leak

2012-04-19 Thread Paolo Bonzini
scsibus_get_dev_path is leaking id if it is not NULL. Fix it. Reported-by: Laszlo Ersek Signed-off-by: Paolo Bonzini --- hw/scsi-bus.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index 8e76c5d..d847396 100644 --- a/hw/scsi-bus.c +

Re: [Qemu-devel] [PATCH] qemu-ga: generate missing stubs for fsfreeze

2012-04-19 Thread Alexander Graf
On 04/19/2012 05:40 PM, Michael Roth wrote: On Thu, Apr 19, 2012 at 04:12:47PM +0200, Alexander Graf wrote: On 04/17/2012 05:28 PM, Andreas Färber wrote: Am 14.04.2012 04:07, schrieb Michael Roth: When linux-specific commands (including guest-fsfreeze-*) were consolidated under defined(__linux

[Qemu-devel] [PATCH 14/16] SCSI emulation: Support unmap via WRITE_SAME_10.

2012-04-19 Thread Paolo Bonzini
From: Ronnie Sahlberg This was added in SBC r26 in place of the reserved bits that were present up to that version. It is the same as WRITE_SAME_16 as far as QEMU is concerned. Signed-off-by: Ronnie Sahlberg Signed-off-by: Paolo Bonzini --- hw/scsi-disk.c |5 +++-- 1 file changed, 3 inse

  1   2   3   >