Re: [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid

2012-10-11 Thread M. Mohan Kumar
Stefan Weil writes: We need to change fsuid and fsgid in 9p server side when 9p client wants to create a file with given uid and gid. In my case setfsuid and setfsgid never return -1 even if a normal user tries to change fsuid. I am running F17 and glibc is 2.15-56.fc17 IMHO setfsuid/setfsgid

Re: [Qemu-devel] [PATCH] hw/qxl: warn on sync io usage

2012-10-11 Thread Alon Levy
> Hi, > > > +static void sync_io_warning(PCIQXLDevice *qxl, uint32_t io_port) > > +{ > > +fprintf(stderr, "qxl-%d: WARNING: sync io used, see (RHBZ > > 747011)", > > +qxl->id); > > +fprintf(stderr, "qxl-%d: WARNING: virt-viewer/remote-viewer > > can hang\n", > > +qx

[Qemu-devel] how to configurate rbd disk for qemu-kvm. it error in my case

2012-10-11 Thread yue-kvm
this is my conf dumU.xml -- error log 2012-10-11 15:08:36.758+: starting up LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin HOME=/root USER=root LOGNAME=root QEMU_AUDIO_DRV=none /usr/libexec/qemu-kvm

Re: [Qemu-devel] [PATCH v2] virtio-blk: add default serial id

2012-10-11 Thread Stefan Hajnoczi
On Wed, Oct 10, 2012 at 10:07:01AM +0800, Dave Young wrote: > On 10/09/2012 04:31 PM, Stefan Hajnoczi wrote: > > > On Tue, Oct 09, 2012 at 10:27:26AM +0800, Dave Young wrote: > >> On 10/05/2012 04:14 PM, Stefan Hajnoczi wrote: > >> > >>> On Sun, Sep 23, 2012 at 10:37:09AM +0800, Dave Young wrote:

Re: [Qemu-devel] [PATCH v3 19/23] memory: per-AddressSpace dispatch

2012-10-11 Thread Avi Kivity
On 10/11/2012 05:38 AM, liu ping fan wrote: >> >> +void address_space_init_dispatch(AddressSpace *as) >> +{ >> +AddressSpaceDispatch *d = g_new(AddressSpaceDispatch, 1); >> + >> +d->phys_map = (PhysPageEntry) { .ptr = PHYS_MAP_NODE_NIL, .is_leaf = 0 >> }; >> +d->listener = (MemoryList

Re: [Qemu-devel] [PATCH v3 23/23] pci: honor PCI_COMMAND_MASTER

2012-10-11 Thread Avi Kivity
On 10/11/2012 05:38 AM, liu ping fan wrote: > On Wed, Oct 10, 2012 at 12:32 AM, Avi Kivity wrote: >> Currently we ignore PCI_COMMAND_MASTER completely: DMA succeeds even when >> the bit is clear. >> >> Honor PCI_COMMAND_MASTER by inserting a memory region into the device's >> bus master address sp

Re: [Qemu-devel] [PATCH v3 19/23] memory: per-AddressSpace dispatch

2012-10-11 Thread liu ping fan
On Thu, Oct 11, 2012 at 4:31 PM, Avi Kivity wrote: > On 10/11/2012 05:38 AM, liu ping fan wrote: >>> >>> +void address_space_init_dispatch(AddressSpace *as) >>> +{ >>> +AddressSpaceDispatch *d = g_new(AddressSpaceDispatch, 1); >>> + >>> +d->phys_map = (PhysPageEntry) { .ptr = PHYS_MAP_NOD

Re: [Qemu-devel] qemu sdl - usb-kbd: warning: key event queue full

2012-10-11 Thread Peter Maydell
On 11 October 2012 06:13, Sriram Sundararajan wrote: > I am invoking my overo image with qemu-linaro (1.2.0) with sdl as display. > > qemu-system-arm -M overo -m 512 -drive > if=sd,cache=writeback,file=myovero.img -clock unix -sdl -device > usb-kbd -device usb-mouse > > After a few keystro

Re: [Qemu-devel] [PATCH v3 23/23] pci: honor PCI_COMMAND_MASTER

2012-10-11 Thread liu ping fan
On Thu, Oct 11, 2012 at 4:34 PM, Avi Kivity wrote: > On 10/11/2012 05:38 AM, liu ping fan wrote: >> On Wed, Oct 10, 2012 at 12:32 AM, Avi Kivity wrote: >>> Currently we ignore PCI_COMMAND_MASTER completely: DMA succeeds even when >>> the bit is clear. >>> >>> Honor PCI_COMMAND_MASTER by inserting

Re: [Qemu-devel] [PATCH v3 19/23] memory: per-AddressSpace dispatch

2012-10-11 Thread Avi Kivity
On 10/11/2012 10:45 AM, liu ping fan wrote: > On Thu, Oct 11, 2012 at 4:31 PM, Avi Kivity wrote: >> On 10/11/2012 05:38 AM, liu ping fan wrote: +void address_space_init_dispatch(AddressSpace *as) +{ +AddressSpaceDispatch *d = g_new(AddressSpaceDispatch, 1); + +

Re: [Qemu-devel] [PATCH v3 23/23] pci: honor PCI_COMMAND_MASTER

2012-10-11 Thread Avi Kivity
On 10/11/2012 10:49 AM, liu ping fan wrote: > On Thu, Oct 11, 2012 at 4:34 PM, Avi Kivity wrote: >> On 10/11/2012 05:38 AM, liu ping fan wrote: >>> On Wed, Oct 10, 2012 at 12:32 AM, Avi Kivity wrote: Currently we ignore PCI_COMMAND_MASTER completely: DMA succeeds even when the bit is cl

Re: [Qemu-devel] Using PCI config space to indicate config location

2012-10-11 Thread Michael S. Tsirkin
On Thu, Oct 11, 2012 at 11:48:22AM +1030, Rusty Russell wrote: > "Michael S. Tsirkin" writes: > > On Mon, Oct 08, 2012 at 12:51:25PM +1030, Rusty Russell wrote: > >> Note before anyone gets confused; we were talking about using the PCI > >> config space to indicate what BAR(s) the virtio stuff is

Re: [Qemu-devel] [PATCH 0/6] Misc PCI cleanups

2012-10-11 Thread Michael S. Tsirkin
On Wed, Oct 10, 2012 at 01:31:52PM -0600, Alex Williamson wrote: > On Tue, 2012-10-09 at 09:09 +0200, Jan Kiszka wrote: > > On 2012-10-08 23:11, Alex Williamson wrote: > > > On Mon, 2012-10-08 at 23:40 +0200, Michael S. Tsirkin wrote: > > >> On Mon, Oct 08, 2012 at 01:27:33PM -0600, Alex Williamson

Re: [Qemu-devel] [PATCH v2 21/21] q35: add acpi-based pci hotplug.

2012-10-11 Thread Michael S. Tsirkin
On Mon, Oct 08, 2012 at 11:30:39PM -0400, Jason Baron wrote: > From: Jason Baron > > Add piix style acpi hotplug to q35. > > Signed-off-by: Jason Baron Something I don't understand here: this only handles hotplug of devices behind the root, no? Don't we need support for hotplug/hot remove of d

Re: [Qemu-devel] [PATCH v2 2/3] monitor: Enable adding an inherited fd to an fd set

2012-10-11 Thread Kevin Wolf
Am 10.10.2012 16:20, schrieb Corey Bryant: > qmp_add_fd() gets an fd that was received over a socket with > SCM_RIGHTS and adds it to an fd set. This patch adds support > that will enable adding an fd that was inherited on the > command line to an fd set. > > This patch also prevents removal of a

[Qemu-devel] [PATCH 3/3] uhci: Raise interrupt when requested even for non active tds

2012-10-11 Thread Gerd Hoffmann
From: Hans de Goede According to the spec we must raise an interrupt when one is requested even for non active tds. Linux depends on this, for bulk transfers it runs an inactivity timer to work around a bug in early uhci revisions, when we take longer then 200 ms to process a packet, this timer

Re: [Qemu-devel] [PATCH 0/3] vga: add mmio bar

2012-10-11 Thread Gerd Hoffmann
On 09/27/12 09:47, Gerd Hoffmann wrote: > Hi, > > This patch series adds a mmio bar to the standard vga. It also drops > a file into docs/specs/ describing the mmio bar and the other properties > of the qemu standard vga and does a little cleanup by removing > CONFIG_BOCHS_VBE. Ping? cheers,

[Qemu-devel] [PATCH 2/3] usb-redir: Don't make migration fail in none seamless case

2012-10-11 Thread Gerd Hoffmann
From: Hans de Goede Instead simple disconnect the device like host redirection does on migration. Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoffmann --- hw/usb/redirect.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/hw/usb/redirect.c b/hw/usb/red

[Qemu-devel] [0/8] Pending pseries patches

2012-10-11 Thread David Gibson
Hi Alex, Here's another patch of pending pseries patches. 1/8 is what I hope is finally a correct version of the patch to extend FPU state for recent CPUs. The rest is basically preliminary cleanups before adding support for in-kernel XICS emulation. The actual support for the in-kernel XICS is

[Qemu-devel] [PATCH 6/8] pseries: Return the token when we register an RTAS call

2012-10-11 Thread David Gibson
From: Michael Ellerman The kernel will soon be able to service some RTAS calls. However the choice of tokens will still be up to userspace. To support this have spapr_rtas_register() return the token that is allocated for an RTAS call, that allows the calling code to tell the kernel what the toke

[Qemu-devel] [PATCH 8/8] pseries: Add tracepoints to the XICS interrupt controller

2012-10-11 Thread David Gibson
This patch adds tracing / debugging calls to the XICS interrupt controller implementation used on the pseries machine. Signed-off-by: Ben Herrenschmidt Signed-off-by: David Gibson --- hw/xics.c| 23 --- trace-events | 13 + 2 files changed, 33 insertions(

[Qemu-devel] [PATCH 2/8] pseries: Clean up inconsistent variable name in xics.c

2012-10-11 Thread David Gibson
Throughout xics.c 'nr' is used to refer to a global interrupt number, and 'server' is used to refer to an interrupt server number (i.e. CPU number). Except in icp_set_mfrr(), where 'nr' is used as a server number. Fix this confusing inconsistency. Signed-off-by: David Gibson --- hw/xics.c |

[Qemu-devel] [PATCH 7/8] pseries: Allow RTAS tokens without a qemu handler

2012-10-11 Thread David Gibson
From: Ben Herrenschmidt Kernel-based RTAS calls will not have a qemu handler, but will still be registered in qemu in order to be assigned a token number and appear in the device-tree. Let's test for the name being NULL rather than the handler when deciding to skip an entry while building the de

[Qemu-devel] [PATCH 4/8] pseries: Cleanup duplications of ics_valid_irq() code

2012-10-11 Thread David Gibson
A couple of places in xics.c open-coded the same logic as is already implemented in ics_valid_irq(). This patch fixes the code duplication. Signed-off-by: David Gibson --- hw/xics.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/xics.c b/hw/xics.c index db01fe3.

[Qemu-devel] [PATCH 5/8] pseries: Move XICS initialization before cpu initialization

2012-10-11 Thread David Gibson
From: Ben Herrenschmidt Currently, the pseries machine initializes the cpus, then the XICS interrupt controller. However, to support the upcoming in-kernel XICS implementation we will need to initialize the irq controller before the vcpus. This patch makes the necesssary rearrangement. This me

[Qemu-devel] [PATCH 1/8] target-ppc: Extend FPU state for newer POWER CPUs

2012-10-11 Thread David Gibson
This patch adds some extra FPU state to CPUPPCState. Specifically, fpscr is extended to a target_ulong bits, since some recent (64 bit) CPUs now have more status bits than fit inside 32 bits. Also, we add the 32 VSR registers present on CPUs with VSX (these extend the standard FP regs, which toge

[Qemu-devel] [PATCH 1/3] usb-redir: Change usbredir_open_chardev into usbredir_create_parser

2012-10-11 Thread Gerd Hoffmann
From: Hans de Goede As we need to create the parser at more places. Signed-off-by: Hans de Goede Signed-off-by: Gerd Hoffmann --- hw/usb/redirect.c | 11 +-- 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index b10241a..5e0f98d 1

Re: [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid

2012-10-11 Thread Paolo Bonzini
Il 11/10/2012 09:25, M. Mohan Kumar ha scritto: > Also as per the man page: >When glibc determines that the argument is not a valid user ID, >it will return -1 and set errno to EINVAL >without attempting the system call. > > If it mean a nonexistent id by 'not a valid use

[Qemu-devel] [PATCH 3/8] pseries: Use #define for XICS base irq number

2012-10-11 Thread David Gibson
From: Ben Herrenschmidt Currently the lowest "real" irq number for the XICS irq controller (as opposed to numbers reserved for IPIs and other special purposes) is hard coded as 16 in two places - in xics_system_init() and in spapr.c. As well as being generally bad practice, we're going to need t

Re: [Qemu-devel] Block I/O outside the QEMU global mutex was "Re: [RFC PATCH 00/17] Support for multiple "AIO contexts""

2012-10-11 Thread Kevin Wolf
Am 09.10.2012 17:02, schrieb Anthony Liguori: > Stefan Hajnoczi writes: > >> On Mon, Oct 08, 2012 at 03:00:04PM +0200, Paolo Bonzini wrote: >>> Another important step would be to add bdrv_drain. Kevin pointed out to >>> me that only ->file and ->backing_hd need to be drained. Well, there >>> ma

[Qemu-devel] [PULL 0/3] usb patch queue

2012-10-11 Thread Gerd Hoffmann
Hi, Pretty small this time with just a few bugfixes. please pull, Gerd The following changes since commit b4ae3cfa57b8c1bdbbd7b7d420971e9171203ade: ssi: Add slave autoconnect helper (2012-10-10 11:13:32 +1000) are available in the git repository at: git://git.kraxel.org/qemu usb.67 Ha

Re: [Qemu-devel] [PATCH] Add nvram to default boot device list

2012-10-11 Thread Alexander Graf
On 11.10.2012, at 04:04, Avik Sil wrote: > This patch adds nvram specified boot device into qemu default > boot_devices list. This helps firmware to boot from nvram specified > boot device if no -boot option is specified. Did you check that no other user of the boot device list gets confused by

[Qemu-devel] [Bug 1065232] Re: qemu-system-arm Crashes on startup on OS X 10.8.2

2012-10-11 Thread Paolo Bonzini
** Changed in: qemu Status: New => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1065232 Title: qemu-system-arm Crashes on startup on OS X 10.8.2 Status in QEMU: Invalid Bug desc

Re: [Qemu-devel] [PATCH 4/6] alpha-linux-user: Fix sigaction

2012-10-11 Thread Riku Voipio
Hi, This patch doesn't compile for me on ubuntu 12.04 x86_64 host: CClinux-user/signal.o /home/voipio/test/qemu/linux-user/signal.c: In function ‘do_sigaction’: /home/voipio/test/qemu/linux-user/signal.c:620:9: error: passing argument 1 of ‘memcpy’ discards ‘const’ qualifier from pointer t

Re: [Qemu-devel] [PATCH 24/25] qmp: add NBD server commands

2012-10-11 Thread Paolo Bonzini
Il 10/10/2012 22:41, Eric Blake ha scritto: > On 10/10/2012 08:03 AM, Paolo Bonzini wrote: >> Adding an NBD server inside QEMU is trivial, since all the logic is >> in nbd.c and can be shared easily between qemu-nbd and QEMU itself. >> The main difference is that qemu-nbd serves a single unnamed ex

Re: [Qemu-devel] [PATCH 24/25] qmp: add NBD server commands

2012-10-11 Thread Eric Blake
On 10/11/2012 07:06 AM, Paolo Bonzini wrote: > Il 10/10/2012 22:41, Eric Blake ha scritto: >> On 10/10/2012 08:03 AM, Paolo Bonzini wrote: >>> Adding an NBD server inside QEMU is trivial, since all the logic is >>> in nbd.c and can be shared easily between qemu-nbd and QEMU itself. >>> The main dif

Re: [Qemu-devel] [PATCH 24/25] qmp: add NBD server commands

2012-10-11 Thread Paolo Bonzini
Il 11/10/2012 15:14, Eric Blake ha scritto: +## +# @nbd-server-add: +# +# Export a device to QEMU's embedded NBD server. +# +# @device: Block device to be exported +# +# @writable: Whether clients should be able to write to the device via the +# NBD

[Qemu-devel] [RFC v1 0/7] IOMMU support

2012-10-11 Thread Avi Kivity
These patches add IOMMU support to the memory core. IOMMUs can be added anywhere in the memory hierarchy, and may be arranged in series. Avi Kivity (7): memory: fix address space initialization/destruction memory: limit sections in the radix tree to the actual address space size memory:

[Qemu-devel] [RFC v1 2/7] memory: limit sections in the radix tree to the actual address space size

2012-10-11 Thread Avi Kivity
The radix tree is statically sized to fit TARGET_PHYS_ADDR_SPACE_BITS. If a larger memory region is registered, it will overflow. Fix by limiting any section in the radix tree to the supported size. This problem was not observed earlier since artificial regions (containers and aliases) are elimin

[Qemu-devel] [RFC v1 4/7] pci: switch iommu to using the memory API

2012-10-11 Thread Avi Kivity
Instead of requesting a DMAContext from the bus implementation, use a MemoryRegion. This can be initialized using memory_region_init_iommu() (or memory_region_init_alias() for simple, static translations). Add a destructor, since setups that have per-device translations will need to return a diff

[Qemu-devel] [RFC v1 5/7] i440fx: add an iommu

2012-10-11 Thread Avi Kivity
This iommu encrypts addresses on the device bus to avoid divuling information to hackers equipped with bus analyzers. Following 3DES, addresses are encrypted multiple times. A XOR cypher is employed for efficiency. Signed-off-by: Avi Kivity --- hw/piix_pci.c | 74 ++

Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used

2012-10-11 Thread Michael S. Tsirkin
On Thu, Oct 11, 2012 at 03:27:03PM +0200, Avi Kivity wrote: > vhost doesn't support guest iommus yet, indicate it to the user > by gently depositing a core on their disk. > > Signed-off-by: Avi Kivity Actually there is no problem. virtio bypasses an IOMMU, so vhost works fine by writing into gue

Re: [Qemu-devel] [RFC v1 1/7] memory: fix address space initialization/destruction

2012-10-11 Thread Paolo Bonzini
Il 11/10/2012 15:26, Avi Kivity ha scritto: > A couple of fields were left uninitialized. This was not observed earlier > because all address spaces were statically allocated. Also free allocation > for those fields. Patch is obvious, but there are at least two alternatives: 1) using memset 2) u

[Qemu-devel] Silent filesystem/qcow2 corruptions with qemu-kvm-1.0 and 1.1.1

2012-10-11 Thread Tiziano Müller
Hi everyone We have a couple of VMs, each with QCow2-files as disk images and we are seeing random filesystem/qcow2 corruptions of the VM filesystems. We have two types of corruptions: * if the guest OS uses XFS, we get corruption errors originating most of the time in xfs_da_do_buf inside the VM

Re: [Qemu-devel] [RFC v1 1/7] memory: fix address space initialization/destruction

2012-10-11 Thread Avi Kivity
On 10/11/2012 03:31 PM, Paolo Bonzini wrote: > Il 11/10/2012 15:26, Avi Kivity ha scritto: >> A couple of fields were left uninitialized. This was not observed earlier >> because all address spaces were statically allocated. Also free allocation >> for those fields. > > Patch is obvious, but the

Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used

2012-10-11 Thread Avi Kivity
On 10/11/2012 03:31 PM, Michael S. Tsirkin wrote: > On Thu, Oct 11, 2012 at 03:27:03PM +0200, Avi Kivity wrote: >> vhost doesn't support guest iommus yet, indicate it to the user >> by gently depositing a core on their disk. >> >> Signed-off-by: Avi Kivity > > Actually there is no problem. virti

Re: [Qemu-devel] [PATCH 1/3] linux-user: implement FS_IOC_GETFLAGS ioctl

2012-10-11 Thread Riku Voipio
Hi Alexander, On 21 August 2012 16:47, Peter Maydell wrote: >> +#define TARGET_FS_IOC_GETFLAGS TARGET_IORU('f', 1) > > This and the SETFLAGS one in the next patch fail the consistency > check that an x86_64-on-x86_64 linux-user binary performs: > > cam-vm-266:precise:qemu$ ./x86_64-linux-user/qem

[Qemu-devel] [RFC v1 1/7] memory: fix address space initialization/destruction

2012-10-11 Thread Avi Kivity
A couple of fields were left uninitialized. This was not observed earlier because all address spaces were statically allocated. Also free allocation for those fields. Signed-off-by: Avi Kivity --- memory.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/memory.c b/memory.c index 2f68d67

Re: [Qemu-devel] [PATCH 0/6] Misc PCI cleanups

2012-10-11 Thread Alex Williamson
On Thu, 2012-10-11 at 12:37 +0200, Michael S. Tsirkin wrote: > On Wed, Oct 10, 2012 at 01:31:52PM -0600, Alex Williamson wrote: > > On Tue, 2012-10-09 at 09:09 +0200, Jan Kiszka wrote: > > > On 2012-10-08 23:11, Alex Williamson wrote: > > > > On Mon, 2012-10-08 at 23:40 +0200, Michael S. Tsirkin wr

Re: [Qemu-devel] [RFC v1 3/7] memory: iommu support

2012-10-11 Thread Paolo Bonzini
Il 11/10/2012 15:26, Avi Kivity ha scritto: > +struct MemoryRegionIOMMUOps { > +/* Returns a TLB entry that contains a given address. */ > +IOMMUTLBEntry (*translate)(MemoryRegion *iommu, target_phys_addr_t addr, > + bool is_write); > +}; Do map/unmap still ma

Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used

2012-10-11 Thread Michael S. Tsirkin
On Thu, Oct 11, 2012 at 03:34:54PM +0200, Avi Kivity wrote: > On 10/11/2012 03:31 PM, Michael S. Tsirkin wrote: > > On Thu, Oct 11, 2012 at 03:27:03PM +0200, Avi Kivity wrote: > >> vhost doesn't support guest iommus yet, indicate it to the user > >> by gently depositing a core on their disk. > >>

Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used

2012-10-11 Thread Avi Kivity
On 10/11/2012 03:44 PM, Michael S. Tsirkin wrote: > On Thu, Oct 11, 2012 at 03:34:54PM +0200, Avi Kivity wrote: >> On 10/11/2012 03:31 PM, Michael S. Tsirkin wrote: >> > On Thu, Oct 11, 2012 at 03:27:03PM +0200, Avi Kivity wrote: >> >> vhost doesn't support guest iommus yet, indicate it to the user

Re: [Qemu-devel] [RFC v1 3/7] memory: iommu support

2012-10-11 Thread Avi Kivity
On 10/11/2012 03:42 PM, Paolo Bonzini wrote: > Il 11/10/2012 15:26, Avi Kivity ha scritto: >> +struct MemoryRegionIOMMUOps { >> +/* Returns a TLB entry that contains a given address. */ >> +IOMMUTLBEntry (*translate)(MemoryRegion *iommu, target_phys_addr_t addr, >> +

[Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used

2012-10-11 Thread Avi Kivity
vhost doesn't support guest iommus yet, indicate it to the user by gently depositing a core on their disk. Signed-off-by: Avi Kivity --- hw/vhost.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/vhost.c b/hw/vhost.c index 0b4ac3f..cd5d9f5 100644 --- a/hw/vhost.c +++ b/hw/vhost.c @@ -45

Re: [Qemu-devel] [PATCH 0/6] Misc PCI cleanups

2012-10-11 Thread Michael S. Tsirkin
On Thu, Oct 11, 2012 at 07:38:54AM -0600, Alex Williamson wrote: > On Thu, 2012-10-11 at 12:37 +0200, Michael S. Tsirkin wrote: > > On Wed, Oct 10, 2012 at 01:31:52PM -0600, Alex Williamson wrote: > > > On Tue, 2012-10-09 at 09:09 +0200, Jan Kiszka wrote: > > > > On 2012-10-08 23:11, Alex Williamso

Re: [Qemu-devel] [PATCH 1/3] linux-user: implement FS_IOC_GETFLAGS ioctl

2012-10-11 Thread Alexander Graf
On 11.10.2012, at 15:36, Riku Voipio wrote: > Hi Alexander, > > On 21 August 2012 16:47, Peter Maydell wrote: >>> +#define TARGET_FS_IOC_GETFLAGS TARGET_IORU('f', 1) >> >> This and the SETFLAGS one in the next patch fail the consistency >> check that an x86_64-on-x86_64 linux-user binary perfo

[Qemu-devel] [RFC v1 3/7] memory: iommu support

2012-10-11 Thread Avi Kivity
Add a new memory region type that translates addresses it is given, then forwards them to a target address space. This is similar to an alias, except that the mapping is more flexible than a linear translation and trucation, and also less efficient since the translation happens at runtime. The im

Re: [Qemu-devel] [RFC v1 4/7] pci: switch iommu to using the memory API

2012-10-11 Thread Paolo Bonzini
Il 11/10/2012 15:27, Avi Kivity ha scritto: > -static int spapr_tce_translate(DMAContext *dma, > - dma_addr_t addr, > - target_phys_addr_t *paddr, > - target_phys_addr_t *len, > -

Re: [Qemu-devel] [RFC v1 3/7] memory: iommu support

2012-10-11 Thread Paolo Bonzini
Il 11/10/2012 15:45, Avi Kivity ha scritto: >>> >> +struct MemoryRegionIOMMUOps { >>> >> +/* Returns a TLB entry that contains a given address. */ >>> >> +IOMMUTLBEntry (*translate)(MemoryRegion *iommu, target_phys_addr_t >>> >> addr, >>> >> + bool is_write);

Re: [Qemu-devel] [RFC v1 4/7] pci: switch iommu to using the memory API

2012-10-11 Thread Avi Kivity
On 10/11/2012 03:53 PM, Paolo Bonzini wrote: > Il 11/10/2012 15:27, Avi Kivity ha scritto: >> -static int spapr_tce_translate(DMAContext *dma, >> - dma_addr_t addr, >> - target_phys_addr_t *paddr, >> - target_

Re: [Qemu-devel] [RFC v1 3/7] memory: iommu support

2012-10-11 Thread Avi Kivity
On 10/11/2012 03:54 PM, Paolo Bonzini wrote: > Il 11/10/2012 15:45, Avi Kivity ha scritto: >> +struct MemoryRegionIOMMUOps { >> +/* Returns a TLB entry that contains a given address. */ >> +IOMMUTLBEntry (*translate)(MemoryRegion *iommu, target_phys_addr_t >> addr,

Re: [Qemu-devel] [PATCH 0/6] Misc PCI cleanups

2012-10-11 Thread Michael S. Tsirkin
On Mon, Oct 08, 2012 at 05:54:58PM -0600, Alex Williamson wrote: > On Tue, 2012-10-09 at 00:44 +0200, Michael S. Tsirkin wrote: > > On Mon, Oct 08, 2012 at 04:09:48PM -0600, Alex Williamson wrote: > > > On Mon, 2012-10-08 at 23:50 +0200, Michael S. Tsirkin wrote: > > > > On Mon, Oct 08, 2012 at 03:

Re: [Qemu-devel] [PATCH 0/6] Misc PCI cleanups

2012-10-11 Thread Alex Williamson
On Thu, 2012-10-11 at 15:49 +0200, Michael S. Tsirkin wrote: > On Thu, Oct 11, 2012 at 07:38:54AM -0600, Alex Williamson wrote: > > On Thu, 2012-10-11 at 12:37 +0200, Michael S. Tsirkin wrote: > > > On Wed, Oct 10, 2012 at 01:31:52PM -0600, Alex Williamson wrote: > > > > On Tue, 2012-10-09 at 09:09

[Qemu-devel] [RFC v1 6/7] vfio: abort if an emulated iommu is used

2012-10-11 Thread Avi Kivity
vfio doesn't support guest iommus yet, indicate it to the user by gently depositing a core on their disk. Signed-off-by: Avi Kivity --- hw/vfio_pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index e9399a1..f935d00 100644 --- a/hw/vfio_pci.c +++ b/hw/vfi

Re: [Qemu-devel] [PATCH v2 21/21] q35: add acpi-based pci hotplug.

2012-10-11 Thread Jason Baron
On Thu, Oct 11, 2012 at 12:57:06PM +0200, Michael S. Tsirkin wrote: > On Mon, Oct 08, 2012 at 11:30:39PM -0400, Jason Baron wrote: > > From: Jason Baron > > > > Add piix style acpi hotplug to q35. > > > > Signed-off-by: Jason Baron > > Something I don't understand here: this only handles hotpl

Re: [Qemu-devel] [PATCH v2 2/3] monitor: Enable adding an inherited fd to an fd set

2012-10-11 Thread Corey Bryant
On 10/10/2012 06:01 PM, Eric Blake wrote: On 10/10/2012 08:20 AM, Corey Bryant wrote: qmp_add_fd() gets an fd that was received over a socket with SCM_RIGHTS and adds it to an fd set. This patch adds support that will enable adding an fd that was inherited on the command line to an fd set. T

Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used

2012-10-11 Thread Michael S. Tsirkin
On Thu, Oct 11, 2012 at 03:44:10PM +0200, Avi Kivity wrote: > On 10/11/2012 03:44 PM, Michael S. Tsirkin wrote: > > On Thu, Oct 11, 2012 at 03:34:54PM +0200, Avi Kivity wrote: > >> On 10/11/2012 03:31 PM, Michael S. Tsirkin wrote: > >> > On Thu, Oct 11, 2012 at 03:27:03PM +0200, Avi Kivity wrote: >

Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used

2012-10-11 Thread Avi Kivity
On 10/11/2012 04:35 PM, Michael S. Tsirkin wrote: >> No, qemu should configure virtio devices to bypass the iommu, even if it >> is on. > > Okay so there will be some API that virtio devices should call > to achieve this? The iommu should probably call pci_device_bypasses_iommu() to check for su

Re: [Qemu-devel] [PATCH v2 1/3] monitor: Allow add-fd to any specified fd set

2012-10-11 Thread Corey Bryant
On 10/10/2012 05:49 PM, Eric Blake wrote: On 10/10/2012 08:20 AM, Corey Bryant wrote: The first call to add an fd to an fd set was previously not allowed to choose the fd set ID. The ID was generated as the first available and ensuing calls could add more fds by specifying the fd set ID. Thi

Re: [Qemu-devel] [PATCH v2 18/21] q35: Fix irr initialization for slots 25..31

2012-10-11 Thread Michael S. Tsirkin
On Mon, Oct 08, 2012 at 11:30:37PM -0400, Jason Baron wrote: > From: Isaku Yamahata > > This was totally off: The CC registers are 16 bit (stored as little > endian), their offsets run in reverse order, and D26IR as well as D25IR > have 4 bytes offset to their successors. > > Reported-by: Jan Ki

Re: [Qemu-devel] [PATCH v2 16/21] q35: smbus: Remove PCI_STATUS_SIG_SYSTEM_ERROR and PCI_STATUS_DETECTED_PARITY from w1cmask

2012-10-11 Thread Michael S. Tsirkin
On Mon, Oct 08, 2012 at 11:30:36PM -0400, Jason Baron wrote: > From: Jan Kiszka > > Both bits are added to the write-1-to-clear mask by default. As the > smbus device does not allow writes at all, we have to remove it from > that mask, also to avoid triggering a runtime assertion. > > Signed-off

Re: [Qemu-devel] [RFC v1 3/7] memory: iommu support

2012-10-11 Thread Avi Kivity
On 10/11/2012 03:26 PM, Avi Kivity wrote: > Add a new memory region type that translates addresses it is given, > then forwards them to a target address space. This is similar to > an alias, except that the mapping is more flexible than a linear > translation and trucation, and also less efficient

Re: [Qemu-devel] [PATCH v2 21/21] q35: add acpi-based pci hotplug.

2012-10-11 Thread Michael S. Tsirkin
On Thu, Oct 11, 2012 at 10:21:22AM -0400, Jason Baron wrote: > On Thu, Oct 11, 2012 at 12:57:06PM +0200, Michael S. Tsirkin wrote: > > On Mon, Oct 08, 2012 at 11:30:39PM -0400, Jason Baron wrote: > > > From: Jason Baron > > > > > > Add piix style acpi hotplug to q35. > > > > > > Signed-off-by: J

Re: [Qemu-devel] [PATCH v2 3/3] qemu-config: Add new -add-fd command line option

2012-10-11 Thread Corey Bryant
On 10/10/2012 06:31 PM, Eric Blake wrote: On 10/10/2012 08:20 AM, Corey Bryant wrote: This option can be used for passing file descriptors on the command line. It mirrors the existing add-fd QMP command which allows an fd to be passed to QEMU via SCM_RIGHTS and added to an fd set. This can b

Re: [Qemu-devel] [PATCH 4/7] savevm: Add VMSTATE_ helpers for target_phys_addr_t

2012-10-11 Thread Peter Maydell
On 11 October 2012 02:57, David Gibson wrote: > Actually, turns out I had another use of these helpers. That was to > store the real page address from the ppcmeb_tlb_t structure. That > structure is used to represent TLB entries on a number of different > embedded chips, which don't all have the

Re: [Qemu-devel] [PATCH v2 2/3] monitor: Enable adding an inherited fd to an fd set

2012-10-11 Thread Corey Bryant
On 10/11/2012 07:25 AM, Kevin Wolf wrote: Am 10.10.2012 16:20, schrieb Corey Bryant: qmp_add_fd() gets an fd that was received over a socket with SCM_RIGHTS and adds it to an fd set. This patch adds support that will enable adding an fd that was inherited on the command line to an fd set. Th

Re: [Qemu-devel] [PATCH v2 21/21] q35: add acpi-based pci hotplug.

2012-10-11 Thread Paolo Bonzini
Il 11/10/2012 16:46, Michael S. Tsirkin ha scritto: > Yes. Reason I ask is because q35 is adding bridges by default now. > Would it be possible to only add them if requested on command line by user > instead? Can you just use shpc or pcie hotplug on those bridges? > I realize some guests expect d

Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used

2012-10-11 Thread Michael S. Tsirkin
On Thu, Oct 11, 2012 at 04:35:23PM +0200, Avi Kivity wrote: > On 10/11/2012 04:35 PM, Michael S. Tsirkin wrote: > > >> No, qemu should configure virtio devices to bypass the iommu, even if it > >> is on. > > > > Okay so there will be some API that virtio devices should call > > to achieve this? >

Re: [Qemu-devel] [PATCH v2 21/21] q35: add acpi-based pci hotplug.

2012-10-11 Thread Jason Baron
On Thu, Oct 11, 2012 at 04:46:56PM +0200, Michael S. Tsirkin wrote: > On Thu, Oct 11, 2012 at 10:21:22AM -0400, Jason Baron wrote: > > On Thu, Oct 11, 2012 at 12:57:06PM +0200, Michael S. Tsirkin wrote: > > > On Mon, Oct 08, 2012 at 11:30:39PM -0400, Jason Baron wrote: > > > > From: Jason Baron >

Re: [Qemu-devel] [PATCH 2/2] block: in commit, determine base image from the top image

2012-10-11 Thread Eric Blake
On 10/09/2012 11:56 PM, Jeff Cody wrote: > This simplifies some code and error checking, and also fixes a bug. > > bdrv_find_backing_image() should only be passed absolute filenames, > or filenames relative to the chain. In the QMP message handler for > block commit, when looking up the base do s

Re: [Qemu-devel] [feature request] qemu-bridge-helper

2012-10-11 Thread Corey Bryant
On 10/10/2012 11:05 AM, Mario De Chenno wrote: It could be possible to add a sort of "ifname=" option to the qemu-bridge-helper program, so qemu could give a recognizable name to the tap interface the helper creates? Thanks all, Mairo De Chenno I don't see why not. If ifname is not specified

Re: [Qemu-devel] [PATCH v2 21/21] q35: add acpi-based pci hotplug.

2012-10-11 Thread Jason Baron
On Thu, Oct 11, 2012 at 04:54:53PM +0200, Paolo Bonzini wrote: > Il 11/10/2012 16:46, Michael S. Tsirkin ha scritto: > > Yes. Reason I ask is because q35 is adding bridges by default now. > > Would it be possible to only add them if requested on command line by user > > instead? > > Can you just u

Re: [Qemu-devel] [PATCH 12/30] QAPI: add command for live block commit, 'block-commit'

2012-10-11 Thread Eric Blake
On 09/28/2012 11:56 AM, Kevin Wolf wrote: > From: Jeff Cody > > The command for live block commit is added, which has the following > arguments: > > +/* default top_bs is the active layer */ > +top_bs = bs; > + > +if (top) { > +if (strcmp(bs->filename, top) != 0) { > +

Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used

2012-10-11 Thread Avi Kivity
On 10/11/2012 05:34 PM, Michael S. Tsirkin wrote: > On Thu, Oct 11, 2012 at 04:35:23PM +0200, Avi Kivity wrote: >> On 10/11/2012 04:35 PM, Michael S. Tsirkin wrote: >> >> >> No, qemu should configure virtio devices to bypass the iommu, even if it >> >> is on. >> > >> > Okay so there will be some

Re: [Qemu-devel] [PATCH v2 3/3] qemu-config: Add new -add-fd command line option

2012-10-11 Thread Eric Blake
On 10/11/2012 08:45 AM, Corey Bryant wrote: >> Another missing validation check is for duplicate use. With the monitor >> command, you ALWAYS have a unique fd (thanks to SCM_RIGHTS). But with >> the command line, I can type 'qemu -add-fd fd=4,set=1 -add-fd >> fd=4,set=2'. Oops - I've now corrup

Re: [Qemu-devel] [libvirt] [PATCH v2 3/3] qemu-config: Add new -add-fd command line option

2012-10-11 Thread Eric Blake
On 10/10/2012 04:31 PM, Eric Blake wrote: > Another missing validation check is for duplicate use. With the monitor > command, you ALWAYS have a unique fd (thanks to SCM_RIGHTS). But with > the command line, I can type 'qemu -add-fd fd=4,set=1 -add-fd > fd=4,set=2'. Oops - I've now corrupted yo

Re: [Qemu-devel] [libvirt] [PATCH v2 3/3] qemu-config: Add new -add-fd command line option

2012-10-11 Thread Eric Blake
On 10/11/2012 10:04 AM, Eric Blake wrote: > Another idea: a hybrid approach - the _first_ -add-fd 4 directly adds 4 > to the set, all other -add-fd 4 end up adding dup(4) instead (well, > fcntl(F_DUPFD_CLOEXEC), but you get the picture). That is, do the > duplicate scanning, and if there is no dup

[Qemu-devel] slower live-migration with XBZRLE

2012-10-11 Thread Vasilis Liaskovitis
Hi, I am testing XBZRLE compression with qemu-1.2 for live migration of large VM and/or memory-intensive workloads. I have a 4GB guest that runs the memory r/w load generator from the original patchset, see docs/xbzrle.txt or http://lists.gnu.org/archive/html/qemu-devel/2012-07/msg01207.html I ha

Re: [Qemu-devel] [PATCH v2 3/3] qemu-config: Add new -add-fd command line option

2012-10-11 Thread Corey Bryant
On 10/11/2012 11:55 AM, Eric Blake wrote: On 10/11/2012 08:45 AM, Corey Bryant wrote: Another missing validation check is for duplicate use. With the monitor command, you ALWAYS have a unique fd (thanks to SCM_RIGHTS). But with the command line, I can type 'qemu -add-fd fd=4,set=1 -add-fd f

Re: [Qemu-devel] [libvirt] [PATCH v2 3/3] qemu-config: Add new -add-fd command line option

2012-10-11 Thread Corey Bryant
On 10/11/2012 12:04 PM, Eric Blake wrote: On 10/10/2012 04:31 PM, Eric Blake wrote: Another missing validation check is for duplicate use. With the monitor command, you ALWAYS have a unique fd (thanks to SCM_RIGHTS). But with the command line, I can type 'qemu -add-fd fd=4,set=1 -add-fd fd=

[Qemu-devel] [Bug 921208] Re: win7/x64 installer hangs on startup with 0x0000005d.

2012-10-11 Thread Clemens Kolbitsch
We have been discussing this issue on the QEMU mailing list. It is of CPU definition, but none of the current configurations allow QEMU to boot Windows7 64bit WITHOUT KVM. The issue behind it is that the TCG (code generator) might not fully support all CPU bits required by Win7. There is a patch t

[Qemu-devel] [PATCH 3/6] alpha-linux-user: Fix sigaltstack structure definition

2012-10-11 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/alpha/target_signal.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/linux-user/alpha/target_signal.h b/linux-user/alpha/target_signal.h index 94f15f6..d3822da 100644 --- a/linux-user/alpha/target_signal.h +++ b/linux-use

[Qemu-devel] [PATCH 6/6] linux-user: Fix siginfo handling

2012-10-11 Thread Richard Henderson
Compare signal numbers in the proper domain. Convert all of the fields for SIGIO and SIGCHLD. Signed-off-by: Richard Henderson --- linux-user/qemu.h| 3 +++ linux-user/signal.c | 59 +++- linux-user/syscall.c | 2 +- 3 files changed, 44 inse

[Qemu-devel] [Bug 921208] Re: win7/x64 installer hangs on startup with 0x0000005d.

2012-10-11 Thread Valerio Angelini
have you tried with "-cpu kvm64,+nx" ? The additional parameter enables the No eXecute (NX) bit. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/921208 Title: win7/x64 installer hangs on startup wit

[Qemu-devel] [PATCH 1/6] linux-user: Perform more checks on iovec lists

2012-10-11 Thread Richard Henderson
Validate count between 0 and IOV_MAX. Limit total length of operation in the same way the kernel does. Signed-off-by: Richard Henderson --- linux-user/syscall.c | 162 --- 1 file changed, 102 insertions(+), 60 deletions(-) diff --git a/linux-user

Re: [Qemu-devel] [RFC v1 7/7] vhost: abort if an emulated iommu is used

2012-10-11 Thread Alex Williamson
On Thu, 2012-10-11 at 17:48 +0200, Avi Kivity wrote: > On 10/11/2012 05:34 PM, Michael S. Tsirkin wrote: > > On Thu, Oct 11, 2012 at 04:35:23PM +0200, Avi Kivity wrote: > >> On 10/11/2012 04:35 PM, Michael S. Tsirkin wrote: > >> > >> >> No, qemu should configure virtio devices to bypass the iommu,

[Qemu-devel] [PATCH 2/6] linux-user: Implement gethostname

2012-10-11 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall.c | 13 + 1 file changed, 13 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 8708b31..462d11b 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8864,6 +8864,19 @@ abi_long do_syscall(v

[Qemu-devel] [PATCH 5/6] alpha-linux-user: Fix sigaction

2012-10-11 Thread Richard Henderson
Unconditional bswap replaced by __get_user/__put_user. Signed-off-by: Richard Henderson --- linux-user/signal.c | 22 -- linux-user/syscall_defs.h | 2 +- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 15

Re: [Qemu-devel] [PATCH 2/6] linux-user: Implement gethostname

2012-10-11 Thread Peter Maydell
On 11 October 2012 20:22, Richard Henderson wrote: > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell -- PMM

[Qemu-devel] [PATCH v3 0/6] linux-user improvements

2012-10-11 Thread Richard Henderson
Changes v2-v3: * Add patch 4, rewriting __get_user. Patch 5 triggers warnings about "assignment of read-only variable" without it. * Rebase vs master, which includes the cpu_alpha_init fix. Patch set available at git://repo.or.cz/qemu/rth.git axp-next r~ Richard Henderson (6): li

  1   2   >