[Qemu-devel] linux-user: improved fake /proc/self/stat

2012-01-02 Thread Fabio Erculiani
Hi all, this is a patch on top of "[PATCH 4/5] linux-user: fake /proc/self/stat" (sorry I couldn't find the git repo bound to this patchwork) that also implements PID and binary name reading them from the fake TSS. The pid was just a "why not" while the binary name is required (as well as the backe

[Qemu-devel] [PATCH 2/2] virtio-mmio: fix features negotiation bug

2012-01-02 Thread Ying-Shiuan Pan
virtio-mmio: fix features negotiation problem virtio-mmio should invoke virtio_set_features() when it gets VIRTIO_MMIO_GUESTFEATURES command, since some devices (at least, virtio-net) register their own set_features method and setup their features in that. Signed-off-by: Ying-Shiuan Pan --- hw/

[Qemu-devel] [PATCH 1/2] virtio-mmio: fix switch-case in virtio_mmio_write()

2012-01-02 Thread Ying-Shiuan Pan
virtio-mmio: fix switch-case in virtio_mmio_write() The switch-case in virtio_mmio_write() forgets to break when it finishes a case statement. Signed-off-by: Ying-Shiuan Pan --- hw/virtio-mmio.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/virtio-mmio.c b/hw/vir

[Qemu-devel] [PATCH 0/2] virtio-mmio: fix 2 bugs

2012-01-02 Thread Ying-Shiuan Pan
Hi, all I'm not sure if it is appropriate to put patches here because virtio-mmio is actually not in official repository yet. In case that someone else wants to test virtio-mmio as I did, I decide to send them out. Currently, I've successfully tested virtio-blk, virtio-net, and virtio-balloon. Y

Re: [Qemu-devel] virtio-net with virtio-mmio

2012-01-02 Thread Ying-Shiuan Pan
2012/1/3 Stefan Hajnoczi : > On Mon, Jan 2, 2012 at 5:19 AM, Ying-Shiuan Pan > wrote: >> 2011/12/30 Stefan Hajnoczi >>> >>> On Wed, Dec 28, 2011 at 06:16:42PM +0800, Ying-Shiuan Pan wrote: >>> > I'm very interested in virtio-mmio Peter Maydell did for QEMU, >>> > (http://lists.nongnu.org/archive/

[Qemu-devel] [PATCH 4/4] linux-user: Implement signal handling for mips64

2012-01-02 Thread khansa
From: Khansa Butt This patch includes sigcontext for mips64 suggested by Andreas Färber and sa_flags byte swap fix by Richard Henderson setup_frame() and do_sigreturn need non RT syscall numbers which do not exist in linux 64 bit syscalls. so both function should have different implementation

[Qemu-devel] [PATCH v4 4/4] linux-user: Implement signal handling for mips64

2012-01-02 Thread khansa
From: Khansa Butt This patch includes sigcontext for mips64 suggested by Andreas Färber and sa_flags byte swap fix by Richard Henderson setup_frame() and do_sigreturn need non RT syscall numbers which do not exist in linux 64 bit syscalls. so both function should have different implementation

[Qemu-devel] [PATCH v4 2/4] target-mips: Enable 64 bit user mode

2012-01-02 Thread khansa
From: Khansa Butt MIPS_HFLAG_UX is included in env->hflags so that the address computation for LD instruction does not get treated as 32 bit code, see gen_op_addr_add() in translate.c. Signed-off-by: Khansa Butt --- target-mips/translate.c |3 +++ 1 files changed, 3 insertions(+), 0 delet

[Qemu-devel] [PATCH 1/4] linux-user: Add support for MIPS64

2012-01-02 Thread khansa
From: Khansa Butt This patch incorporates 1)default configs for mips64 2)updated target-list with mips64-linux-user 3)syscall differences: Linux 64-bit syscalls have different number range and because of n64 ABI, 8 argument registers are suffient for do_syscall() 4)define TARGET_QEMU_ESIGRETURN

[Qemu-devel] [PATCH 3/4] target-mips: Fix FPU reset

2012-01-02 Thread khansa
From: Khansa Butt in translate_init.c fpu_init() initializes active_fpu for given cpu model afterwards cpu_reset() resets all the members upto breakpoints due to this whatever the value of cpu_model->CR1_fcr0 was , the value of env->active_fpu.fcr0 is zero now. This patch resolve this issue so t

[Qemu-devel] [PATCH v4 3/4] target-mips: Fix FPU reset

2012-01-02 Thread khansa
From: Khansa Butt in translate_init.c fpu_init() initializes active_fpu for given cpu model afterwards cpu_reset() resets all the members upto breakpoints due to this whatever the value of cpu_model->CR1_fcr0 was , the value of env->active_fpu.fcr0 is zero now. This patch resolve this issue so t

[Qemu-devel] [PATCH v4 1/4] linux-user: Add support for MIPS64

2012-01-02 Thread khansa
From: Khansa Butt This patch incorporates 1)default configs for mips64 2)updated target-list with mips64-linux-user 3)syscall differences: Linux 64-bit syscalls have different number range and because of n64 ABI, 8 argument registers are suffient for do_syscall() 4)define TARGET_QEMU_ESIGRETURN

[Qemu-devel] [PATCH v4 0/4] MIPS64 user mode emulation in QEMU

2012-01-02 Thread khansa
From: Khansa Butt [sorry version missed in previous set] This is the team work of Ehsan-ul-Haq, Abdul Qadeer, Abdul Waheed, Khansa Butt from HPCN Lab KICS UET Lahore. In previous patch set we were including Cavium specific instructions along with Cavium specifc registers in UME. Because of these

[Qemu-devel] [PATCH 2/4] target-mips: Enable 64 bit user mode

2012-01-02 Thread khansa
From: Khansa Butt MIPS_HFLAG_UX is included in env->hflags so that the address computation for LD instruction does not get treated as 32 bit code, see gen_op_addr_add() in translate.c. Signed-off-by: Khansa Butt --- target-mips/translate.c |3 +++ 1 files changed, 3 insertions(+), 0 delet

[Qemu-devel] [PATCH v4 0/4] MIPS64 user mode emulation in QEMU

2012-01-02 Thread khansa
From: Khansa Butt This is the team work of Ehsan-ul-Haq, Abdul Qadeer, Abdul Waheed, Khansa Butt from HPCN Lab KICS UET Lahore. In previous patch set we were including Cavium specific instructions along with Cavium specifc registers in UME. Because of these register fields we had to bump the cpu

[Qemu-devel] [PATCH 09/30] qdev: move qdev->info to class

2012-01-02 Thread Anthony Liguori
Right now, DeviceInfo acts as the class for qdev. In order to switch to a proper ObjectClass derivative, we need to ween all of the callers off of interacting directly with the info pointer. Signed-off-by: Anthony Liguori --- hw/acpi_piix4.c|4 +- hw/cirrus_vga.c|2 +- h

[Qemu-devel] [PATCH 10/30] qdev: don't access name through info

2012-01-02 Thread Anthony Liguori
We already have a QOM interface for this so let's use it. Signed-off-by: Anthony Liguori --- hw/e1000.c |2 +- hw/eepro100.c |2 +- hw/etraxfs_eth.c|2 +- hw/hda-audio.c |2 +- hw/intel-hda.c |2 +- hw/lan9118.c|

[Qemu-devel] [PATCH 01/30] macio: convert to qdev

2012-01-02 Thread Anthony Liguori
This is a "shallow", half hearted, and untested conversion. Signed-off-by: Anthony Liguori --- hw/macio.c | 43 ++- 1 files changed, 30 insertions(+), 13 deletions(-) diff --git a/hw/macio.c b/hw/macio.c index cc6ae40..357e0ea 100644 --- a/hw/macio.c ++

[Qemu-devel] [PATCH 15/30] isa: convert to QEMU Object Model

2012-01-02 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/applesmc.c| 18 -- hw/cs4231a.c | 20 +--- hw/debugcon.c| 16 +++- hw/fdc.c | 24 +++- hw/gus.c | 20 +--- hw/i8254.c | 22 ++

Re: [Qemu-devel] [PATCH 24/27] grackle: remove broken pci device

2012-01-02 Thread Anthony Liguori
On 01/02/2012 04:41 PM, Andreas Färber wrote: Am 20.12.2011 17:51, schrieb Anthony Liguori: I have no idea what's going on here, but this is broken and cannot possibly work because: 1) It's qdev name conflicts with a device that sits on SysBus 2) The PCI constructor expects a SysBus device

[Qemu-devel] [PATCH 30/30] virtio-s390: convert to QEMU Object Model

2012-01-02 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/s390-virtio-bus.c | 91 +++--- 1 files changed, 64 insertions(+), 27 deletions(-) diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c index a047bbf..3bce5e4 100644 --- a/hw/s390-virtio-bus.c +++ b/hw/s390-vi

[Qemu-devel] [PATCH 20/30] i2c: smbus: convert to QEMU Object Model

2012-01-02 Thread Anthony Liguori
This converts two types because smbus is implemented as a subclass of i2c. It's extremely difficult to convert these two independently. Signed-off-by: Anthony Liguori --- hw/ds1338.c | 21 + hw/i2c.c | 83 +--- hw/i2

[Qemu-devel] [PATCH 07/30] qom: add the base Object class (v2)

2012-01-02 Thread Anthony Liguori
This class provides the main building block for QEMU Object Model and is extensively documented in the header file. It is largely inspired by GObject. Signed-off-by: Anthony Liguori --- v1 -> v2 - remove printf() in type registration - fix typo in comment (Paolo) - make Interface private - m

[Qemu-devel] [PATCH 17/30] ccid: convert to QEMU Object Model

2012-01-02 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/ccid-card-emulated.c | 27 ++-- hw/ccid-card-passthru.c | 27 ++-- hw/ccid.h | 28 +++-- hw/usb-ccid.c | 76 +++ 4 files changed, 109 insertions(+)

[Qemu-devel] [PATCH 14/30] qdev: prepare source tree for code conversion

2012-01-02 Thread Anthony Liguori
These are various small stylistic changes which help make things more consistent such that the automated conversion script can be simpler. It's not necessary to agree or disagree with these style changes because all of this code is going to be rewritten by the patch monkey script anyway. Signed-o

[Qemu-devel] [PATCH 16/30] usb: convert to QEMU Object Model

2012-01-02 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/usb-bt.c | 33 ++ hw/usb-bus.c| 179 +++ hw/usb-ccid.c | 38 +++- hw/usb-desc.c | 18 +++--- hw/usb-hid.c| 108 -- hw/usb-hub.c|

[Qemu-devel] [PATCH 05/30] pseries: Remove hcalls callback

2012-01-02 Thread Anthony Liguori
From: David Gibson For forgotten historical reasons, PAPR hypercalls for specific virtual IO devices (oh which there are quite a number) are registered via a callback in the VIOsPAPRDeviceInfo structure. This is kind of ugly, so this patch instead registers hypercalls from device_init() function

[Qemu-devel] qom: add QEMU Object Model type hierarchy to qdev (v2)

2012-01-02 Thread Anthony Liguori
This is series 2/4 of the QOM refactoring. These series are divided up based on the major scripted code conversions. This series makes qdev a proper Object and converts qdev's type inheritance to QOM inheritance. The first half of the series are manual cleanups/refactorings. The second half is

[Qemu-devel] [PATCH 27/30] unin_pci: remove phantom qdev devices in unin_pci

2012-01-02 Thread Anthony Liguori
Same problem as with grackle. This code can't possibly work. Signed-off-by: Anthony Liguori --- hw/unin_pci.c | 77 - 1 files changed, 0 insertions(+), 77 deletions(-) diff --git a/hw/unin_pci.c b/hw/unin_pci.c index 14d9914..b3365fe 10

[Qemu-devel] [PATCH 11/30] qdev: use a wrapper to access reset and promote reset to a class method

2012-01-02 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/intel-hda.c |4 +--- hw/lsi53c895a.c |2 +- hw/qdev.c | 22 +- hw/qdev.h |8 4 files changed, 27 insertions(+), 9 deletions(-) diff --git a/hw/intel-hda.c b/hw/intel-hda.c index 8cb92d3..6e1c5de 100644

[Qemu-devel] [PATCH 23/30] scsi: convert to QEMU Object Model

2012-01-02 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/scsi-bus.c | 95 +++- hw/scsi-disk.c| 159 - hw/scsi-generic.c | 29 ++ hw/scsi.h | 31 ++ 4 files changed, 201 insertions(+), 113 deletions

[Qemu-devel] [PATCH 19/30] i2c: rename i2c_slave -> I2CSlave

2012-01-02 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/ds1338.c | 10 +- hw/hw.h |4 ++-- hw/i2c.c | 30 +++--- hw/i2c.h | 18 ++ hw/lm832x.c | 10 +- hw/max7310.c | 10 +- hw/pxa2xx.c | 10 +- hw/smbus.

[Qemu-devel] [PATCH 21/30] hda-codec: convert to QEMU Object Model

2012-01-02 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/hda-audio.c | 58 ++- hw/intel-hda.c | 31 + hw/intel-hda.h | 26 3 files changed, 71 insertions(+), 44 deletions(-) diff --git a/hw/hda-audio.c b/

[Qemu-devel] [PATCH 18/30] ssi: convert to QEMU Object Model

2012-01-02 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/ads7846.c | 17 - hw/max111x.c | 34 -- hw/spitz.c | 39 +++ hw/ssd0323.c | 17 - hw/ssi-sd.c| 17 - hw/ssi.c |

[Qemu-devel] [PATCH 08/30] qdev: integrate with QEMU Object Model (v2)

2012-01-02 Thread Anthony Liguori
This is a very shallow integration. We register a TYPE_DEVICE but only use QOM as basically a memory allocator. This will make all devices show up as QOM objects but they will all carry the TYPE_DEVICE. Signed-off-by: Anthony Liguori --- v1 -> v2 - update for new location of object.h --- hw/q

[Qemu-devel] [PATCH 22/30] ide: convert to QEMU Object Model

2012-01-02 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/ide/internal.h | 20 ++--- hw/ide/qdev.c | 111 + 2 files changed, 82 insertions(+), 49 deletions(-) diff --git a/hw/ide/internal.h b/hw/ide/internal.h index 00b28df..c808a0d 100644 --- a/hw/ide/

[Qemu-devel] [PATCH 26/30] grackle: remove broken pci device

2012-01-02 Thread Anthony Liguori
I have no idea what's going on here, but this is broken and cannot possibly work because: 1) It's qdev name conflicts with a device that sits on SysBus 2) The PCI constructor expects a SysBus device... but's it's a PCIDevice If you do qdev_create("grackle"), the code expects to get the SysBus

[Qemu-devel] [PATCH 24/30] spapr: convert to QEMU Object Model (v2)

2012-01-02 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- v1 -> v2 - use QOM to check for the default console --- hw/spapr_llan.c | 37 +++-- hw/spapr_vio.c | 47 --- hw/spapr_vio.h | 35 ++- hw/spapr

[Qemu-devel] [PATCH 13/30] qdev: add class_init to DeviceInfo

2012-01-02 Thread Anthony Liguori
Since we are still dynamically creating TypeInfo, we need to chain the class_init function in order to be able to make use of it within subclasses of TYPE_DEVICE. This will disappear once we register TypeInfos directly. Signed-off-by: Anthony Liguori --- hw/qdev.c |4 hw/qdev.h |5

[Qemu-devel] [PATCH 25/30] virtio-serial: convert to QEMU Object Model

2012-01-02 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/virtio-console.c| 73 ++ hw/virtio-serial-bus.c | 66 +++--- hw/virtio-serial.h | 81 ++-- 3 files changed, 129 insertions(+), 91

[Qemu-devel] [PATCH 04/30] ppc_prep: convert host bridge to qdev

2012-01-02 Thread Anthony Liguori
Untested beyond compile. But it's a very simple conversion. Signed-off-by: Anthony Liguori --- hw/prep_pci.c | 38 +++--- 1 files changed, 27 insertions(+), 11 deletions(-) diff --git a/hw/prep_pci.c b/hw/prep_pci.c index ea9fb69..16c036f 100644 --- a/hw/prep_

[Qemu-devel] [PATCH 03/30] ppc: remove ppc440 bamboo board support

2012-01-02 Thread Anthony Liguori
This board never worked with TCG. It hasn't been updated since 0.13.0. I'm fairly sure hardware doesn't exist anymore that you can run the KVM support with. So let's remove it. It can always be restored later if there is interest again. Signed-off-by: Anthony Liguori --- Makefile.target|

Re: [Qemu-devel] [PATCH 01/27] qom: add the base Object class

2012-01-02 Thread Anthony Liguori
On 01/02/2012 11:59 AM, Paolo Bonzini wrote: On 12/20/2011 05:51 PM, Anthony Liguori wrote: hw/object.c | 469 + hw/object.h | 427 +++ A couple more remarks: 1) Please put it outside hw/ D

Re: [Qemu-devel] KVM call agenda for Tuesday 3

2012-01-02 Thread Anthony Liguori
On 01/02/2012 09:54 AM, Peter Maydell wrote: On 2 January 2012 13:46, Andreas Färber wrote: * when can we expect to be able to model SoCs rather than CPUs? Will this affect command line usage - are we going to have '-device ti-tms570' rather than '-cpu cortex-r4' then, or -cpu overriding the co

Re: [Qemu-devel] KVM call agenda for Tuesday 3

2012-01-02 Thread Anthony Liguori
On 01/02/2012 08:11 AM, Paolo Bonzini wrote: On 01/02/2012 02:46 PM, Andreas Färber wrote: QOM: If Anthony is available, I'd be interested in hearing an update on the roadmap. In particular, * when can we expect to be able to model SoCs rather than CPUs? Will this affect command line usage - are

Re: [Qemu-devel] KVM call agenda for Tuesday 3

2012-01-02 Thread Anthony Liguori
On 01/02/2012 07:46 AM, Andreas Färber wrote: Am 02.01.2012 13:09, schrieb Juan Quintela: First of all, Happy New Year to everybody (even for the people whose calendar is different O:-) +1 Please send in any agenda items you are interested in covering. QOM: If Anthony is available, I'd be

[Qemu-devel] [PATCH 06/30] pci: call reset unconditionally

2012-01-02 Thread Anthony Liguori
Because now all PCI devices are converted to qdev. Signed-off-by: Anthony Liguori --- hw/pci.c |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 399227f..fd575ac 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -159,11 +159,8 @@ void pci_device_deass

Re: [Qemu-devel] [PATCH 01/27] qom: add the base Object class

2012-01-02 Thread Anthony Liguori
On 01/02/2012 05:01 PM, Andreas Färber wrote: Am 22.12.2011 20:57, schrieb Anthony Liguori: On 12/22/2011 12:00 PM, Kevin O'Connor wrote: On Thu, Dec 22, 2011 at 11:41:08AM -0600, Anthony Liguori wrote: On 12/22/2011 11:25 AM, Kevin O'Connor wrote: Why not declare types with something like th

Re: [Qemu-devel] [PATCH 10/27] not-for-upstream: disable non-qdev pci devices

2012-01-02 Thread Anthony Liguori
On 01/02/2012 04:55 PM, Andreas Färber wrote: Am 20.12.2011 17:51, schrieb Anthony Liguori: Obviously, this isn't an acceptable approach. We need to convert these devices to qdev. --- hw/macio.c |5 + hw/openpic.c|5 + hw/ppc4xx_pci.c |5 + hw/prep_pci.c

[Qemu-devel] [PATCH 12/30] qdev: add a interface to register subclasses

2012-01-02 Thread Anthony Liguori
In order to introduce inheritance while still using the qdev registration interfaces, we need to be able to use a parent other than TYPE_DEVICE. Add a new interface that allows this. Signed-off-by: Anthony Liguori --- hw/qdev.c |9 +++-- hw/qdev.h |1 + 2 files changed, 8 insertions

[Qemu-devel] [PATCH 02/30] openpic: remove dead code to make a PCI device version

2012-01-02 Thread Anthony Liguori
bus is always NULL so the code in this if clause is dead (and therefore untested). Signed-off-by: Anthony Liguori --- hw/openpic.c | 30 +++--- hw/openpic.h |2 +- hw/ppc_newworld.c |2 +- 3 files changed, 5 insertions(+), 29 deletions(-) diff --git a

Re: [Qemu-devel] [PATCH 01/27] qom: add the base Object class

2012-01-02 Thread Andreas Färber
Am 22.12.2011 20:57, schrieb Anthony Liguori: > On 12/22/2011 12:00 PM, Kevin O'Connor wrote: >> On Thu, Dec 22, 2011 at 11:41:08AM -0600, Anthony Liguori wrote: >>> On 12/22/2011 11:25 AM, Kevin O'Connor wrote: Why not declare types with something like the following: TypeInfo my_dev

Re: [Qemu-devel] [PATCH 10/27] not-for-upstream: disable non-qdev pci devices

2012-01-02 Thread Andreas Färber
Am 20.12.2011 17:51, schrieb Anthony Liguori: > Obviously, this isn't an acceptable approach. We need to convert these > devices > to qdev. > --- > hw/macio.c |5 + > hw/openpic.c|5 + > hw/ppc4xx_pci.c |5 + > hw/prep_pci.c |5 + > 4 files changed, 20

Re: [Qemu-devel] [PATCH 25/27] unin_pci: remove phantom qdev devices in unin_pci

2012-01-02 Thread Andreas Färber
Am 20.12.2011 17:51, schrieb Anthony Liguori: > Same problem as with grackle. This code can't possibly work. Nack. Cf. grackle, it does work (-M mac99). Solution should be renaming, not breaking. Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennife

Re: [Qemu-devel] [PATCH 24/27] grackle: remove broken pci device

2012-01-02 Thread Andreas Färber
Am 20.12.2011 17:51, schrieb Anthony Liguori: > I have no idea what's going on here, but this is broken and cannot possibly > work because: > > 1) It's qdev name conflicts with a device that sits on SysBus > > 2) The PCI constructor expects a SysBus device... but's it's a PCIDevice > > If you

Re: [Qemu-devel] coroutine bug?, was Re: [PATCH] sheepdog: use coroutines

2012-01-02 Thread Stefan Hajnoczi
On Mon, Jan 2, 2012 at 3:39 PM, Christoph Hellwig wrote: > On Fri, Dec 30, 2011 at 10:35:01AM +, Stefan Hajnoczi wrote: >> If you can reproduce this bug and suspect coroutines are involved then I > > It's entirely reproducable. > > I've played around a bit and switched from the ucontext to the

Re: [Qemu-devel] [PATCH 00/16] Kill old-style I/O dispatch

2012-01-02 Thread Richard Henderson
On 01/03/2012 03:33 AM, Avi Kivity wrote: > Avi Kivity (16): > memory: move endianness compensation to memory core > exec: make phys_page_find() return a temporary > memory: move mmio access to functions > memory: remove MemoryRegion::backend_registered > Fix wrong region_offset when over

Re: [Qemu-devel] [PATCH 08/16] Convert IO_MEM_{RAM, ROM, UNASSIGNED, NOTDIRTY} to MemoryRegions

2012-01-02 Thread Richard Henderson
On 01/03/2012 03:33 AM, Avi Kivity wrote: > -if (is_ram_rom_romd(pd)) { > +if (!is_ram_rom_romd(pd)) { Should be merged with a previous patch. r~

Re: [Qemu-devel] [PATCH 06/16] Avoid range comparisons on io index types

2012-01-02 Thread Richard Henderson
On 01/03/2012 03:33 AM, Avi Kivity wrote: > -if ((pd & ~TARGET_PAGE_MASK) > IO_MEM_ROM && !(pd & IO_MEM_ROMD)) { > +if (!is_ram_rom(pd) && !(pd & IO_MEM_ROMD)) { > /* IO memory case (romd handled later) */ Perhaps (!is_ram_rom_romd(pd))? At least that's what I see from DeMorgan's

[Qemu-devel] [PATCH v2 14/15] virtio-9p: move init function to virtio-9p-device.h

2012-01-02 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/9pfs/virtio-9p-device.h |2 ++ hw/virtio.h|6 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/9pfs/virtio-9p-device.h b/hw/9pfs/virtio-9p-device.h index 7f2a4eb..28b0012 100644 --- a/hw/9pfs/virtio-9p-device.h ++

[Qemu-devel] [PATCH 0/8] qemu-queue cleanups

2012-01-02 Thread Paolo Bonzini
These patches simplify the jungle of lists provided by qemu-queue from 4 to 3. QCIRCLEQ is dropped, since it provides no real advantage over QTAILQ. QSIMPLEQ is simplified to no longer permit insertion at the tail, with the advantage that it is more suited for simple free lists. Stefan, these ar

[Qemu-devel] [PATCH v2 06/15] virtio-9p: move property declarations to header file

2012-01-02 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/9pfs/virtio-9p-device.h |5 + hw/virtio-pci.c|4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/9pfs/virtio-9p-device.h b/hw/9pfs/virtio-9p-device.h index 65789db..7f2a4eb 100644 --- a/hw/9pfs/virtio-9p-device.h +

[Qemu-devel] [PATCH 4/8] ccid: switch to QTAILQ

2012-01-02 Thread Paolo Bonzini
CCID emulation needs to insert at tail. Use a QTAILQ, even though the double links are strictly not necessary. Signed-off-by: Paolo Bonzini --- hw/ccid-card-emulated.c | 24 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/hw/ccid-card-emulated.c b/hw/

[Qemu-devel] [PATCH v2 11/15] virtio-net: move init function to virtio-net.h

2012-01-02 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/virtio-net.h |3 +++ hw/virtio.h |3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/virtio-net.h b/hw/virtio-net.h index ee55a85..96cd8b1 100644 --- a/hw/virtio-net.h +++ b/hw/virtio-net.h @@ -168,6 +168,9 @@ struct virtio_net

[Qemu-devel] [PATCH v2 03/15] virtio-serial: move property declarations to header file

2012-01-02 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/s390-virtio-bus.c |3 +-- hw/virtio-pci.c |4 +--- hw/virtio-serial.h |5 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c index 80b11e5..282688a 100644 --- a/hw/s390-virtio-bus.

[Qemu-devel] [PATCH v2 08/15] virtio-blk: move property declarations to header file

2012-01-02 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/s390-virtio-bus.c |2 +- hw/virtio-blk.h |5 + hw/virtio-pci.c |3 +-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c index cf7cfef..71720b9 100644 --- a/hw/s390-virtio-bus.c

[Qemu-devel] [PATCH 3/8] qed: switch to QTAILQ

2012-01-02 Thread Paolo Bonzini
QED needs to insert at tail. Use a QTAILQ, even though the double links are strictly not necessary. Signed-off-by: Paolo Bonzini --- block/qed.c | 20 ++-- block/qed.h |4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/block/qed.c b/block/qed.c index

[Qemu-devel] [PATCH v2 12/15] virtio-serial: move init function to virtio-serial.h

2012-01-02 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/virtio-serial.h |7 +-- hw/virtio.h|3 --- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/virtio-serial.h b/hw/virtio-serial.h index 2e1a428..8469956 100644 --- a/hw/virtio-serial.h +++ b/hw/virtio-serial.h @@ -45,10 +45,1

[Qemu-devel] [PATCH v2 04/15] virtio-9p: use CONFIG_VIRTFS, not CONFIG_LINUX

2012-01-02 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/virtio-pci.h |2 +- hw/virtio.h |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/virtio-pci.h b/hw/virtio-pci.h index e0df6ef..2edd249 100644 --- a/hw/virtio-pci.h +++ b/hw/virtio-pci.h @@ -34,7 +34,7 @@ typedef struct {

[Qemu-devel] [PATCH 6/8] qemu-queue: drop QCIRCLEQ

2012-01-02 Thread Paolo Bonzini
The main advantage of circular lists (the fact that the head node has the same memory layout as any other node, so you do not need conditionals) is completely negated by the implementation in qemu-queue.h. Not surprisingly, nobody uses QCIRCLEQ. While this might change if RCU is ever adopted by QE

[Qemu-devel] [PATCH 2/8] block-migration: switch to QTAILQ

2012-01-02 Thread Paolo Bonzini
Block migration needs to insert at tail. Use a QTAILQ, even though the double links are strictly not necessary. Signed-off-by: Paolo Bonzini --- block-migration.c | 44 ++-- 1 files changed, 22 insertions(+), 22 deletions(-) diff --git a/block-migratio

[Qemu-devel] [PATCH v2 07/15] virtio-blk: define VirtIOBlkConf

2012-01-02 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/s390-virtio-bus.c |4 ++-- hw/s390-virtio-bus.h |3 ++- hw/virtio-blk.c | 13 ++--- hw/virtio-blk.h |5 + hw/virtio-pci.c |4 ++-- hw/virtio-pci.h |3 ++- hw/virtio.h |3 ++- 7 files changed, 21

[Qemu-devel] [PATCH 5/8] qemu-queue: really simplify QSIMPLEQ

2012-01-02 Thread Paolo Bonzini
QSIMPLEQ is still relatively heavyweight when used as a free list, compared to a simple singly-linked list. One disadvantage is that it requires an initializer macro, unlike for example QLIST. The patch removes the double links so that there is a "really really simple" queue type. Signed-off-by:

[Qemu-devel] [PATCH v2 05/15] virtio-9p: remove PCI dependencies from hw/9pfs/

2012-01-02 Thread Paolo Bonzini
Also move the 9p.h file to 9pfs/virtio-9p-device.h, for consistency with the corresponding .c file. Signed-off-by: Paolo Bonzini --- hw/9pfs/virtio-9p-device.c | 36 + hw/{9p.h => 9pfs/virtio-9p-device.h} |4 +- hw/9pfs/virtio-9p.c

[Qemu-devel] [PATCH v2 15/15] virtio-blk: move init function to virtio-blk.h

2012-01-02 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/virtio-blk.h |7 +-- hw/virtio.h |7 --- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/hw/virtio-blk.h b/hw/virtio-blk.h index 518e1cc..70d939a 100644 --- a/hw/virtio-blk.h +++ b/hw/virtio-blk.h @@ -97,11 +97,14 @@ struct vi

[Qemu-devel] [PATCH 7/8] coroutine: switch to QSIMPLEQ

2012-01-02 Thread Paolo Bonzini
QSIMPLEQ is now the best candidate for a free list, use it. Signed-off-by: Paolo Bonzini --- coroutine-ucontext.c | 10 +- qemu-coroutine-int.h |2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/coroutine-ucontext.c b/coroutine-ucontext.c index 3d01075..65b0bb7 1

[Qemu-devel] [PATCH v2 09/15] virtio-blk: move BlockConf into VirtIOBlkConf

2012-01-02 Thread Paolo Bonzini
Also call blockdev_mark_auto_del from virtio_blk_exit, rather than just virtio_blk_exit_pci. Signed-off-by: Paolo Bonzini --- hw/s390-virtio-bus.c |4 +--- hw/s390-virtio-bus.h |1 - hw/virtio-blk.c | 17 + hw/virtio-blk.h |2 ++ hw/virtio-pci.c |

[Qemu-devel] [PATCH 8/8] block: use QSIMPLEQ for the AIO free list

2012-01-02 Thread Paolo Bonzini
QSIMPLEQ is equivalent to an open-coded free list, use it. Signed-off-by: Paolo Bonzini --- block.c |9 - block_int.h |4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/block.c b/block.c index 3f072f6..10e80d7 100644 --- a/block.c +++ b/block.c @@ -3242,9

[Qemu-devel] [PATCH v2 02/15] virtio-net: move NICConf into virtio_net_conf

2012-01-02 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/s390-virtio-bus.c |3 +-- hw/s390-virtio-bus.h |1 - hw/virtio-net.c | 13 ++--- hw/virtio-net.h |2 ++ hw/virtio-pci.c |3 +-- hw/virtio-pci.h |1 - hw/virtio.h |3 +-- 7 files changed, 11 insertio

[Qemu-devel] [PATCH 1/8] notifier: switch to QLIST

2012-01-02 Thread Paolo Bonzini
Notifiers do not need to access both ends of the list, and using a QLIST also simplifies the API. Signed-off-by: Paolo Bonzini --- I do plan to exploit the simplified API in a future patch... input.c |2 +- migration.c |2 +- notify.c | 10 +- notify.h |

[Qemu-devel] [PATCH v2 10/15] virtio: move conf fields into an anonymous union

2012-01-02 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/s390-virtio-bus.h |8 +--- hw/virtio-pci.h | 10 ++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/hw/s390-virtio-bus.h b/hw/s390-virtio-bus.h index 414fd22..b9f711d 100644 --- a/hw/s390-virtio-bus.h +++ b/hw/s390-virtio-

[Qemu-devel] [PATCH v2 13/15] virtio-balloon: move init function to virtio-balloon.h

2012-01-02 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/virtio-balloon.h |3 +++ hw/virtio-pci.h |1 + hw/virtio.h |2 -- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/virtio-balloon.h b/hw/virtio-balloon.h index 73300dd..cde2e67 100644 --- a/hw/virtio-balloon.h +++ b/hw/v

[Qemu-devel] [PATCH v2 01/15] virtio-net: move property declarations to header file

2012-01-02 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/s390-virtio-bus.c |6 +- hw/virtio-net.h | 41 ++--- hw/virtio-pci.c |7 +-- 3 files changed, 24 insertions(+), 30 deletions(-) diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c index c4b9a

[Qemu-devel] [PATCH v2 00/15] virtio: device configuration and headers cleanup

2012-01-02 Thread Paolo Bonzini
This series cleans up device configuration in virtio: 1) all properties (features and not) are moved to a single macro DEFINE_VIRTIO_XYZ_PROPERTIES. This makes the definitions uniform across all three virtio backends. 2) all configuration is moved to a single struct, which embeds the NICConf/Blo

Re: [Qemu-devel] [PATCH 01/27] qom: add the base Object class

2012-01-02 Thread Paolo Bonzini
On 12/20/2011 05:51 PM, Anthony Liguori wrote: hw/object.c | 469 + hw/object.h | 427 +++ A couple more remarks: 1) Please put it outside hw/ 2) Why do you need a list for the inte

Re: [Qemu-devel] [PATCH 0/2][RFC] postcopy migration: Linux char device for postcopy

2012-01-02 Thread Paolo Bonzini
On 01/02/2012 06:05 PM, Andrea Arcangeli wrote: On Thu, Dec 29, 2011 at 06:01:45PM +0200, Avi Kivity wrote: On 12/29/2011 06:00 PM, Avi Kivity wrote: The NFS client has exactly the same issue, if you mount it with the intr option. In fact you could use the NFS client as a trivial umem/cuse pro

Re: [Qemu-devel] [PATCH] Fix wrong region_offset when overlaying a page with another

2012-01-02 Thread Andreas Färber
Am 01.01.2012 18:23, schrieb Avi Kivity: > cpu_register_physical_memory_log() does not update region_offset > if a page was previously registered for the same address. This > could cause mmio accesses going to the wrong place, by using the > old region_offset. > > Signed-off-by: Avi Kivity Line

[Qemu-devel] [PATCH 01/16] memory: move endianness compensation to memory core

2012-01-02 Thread Avi Kivity
Instead of doing device endianness compensation in cpu_register_io_memory(), do it in the memory core. Signed-off-by: Avi Kivity --- exec-obsolete.h |2 +- exec.c | 142 --- memory.c| 37 -- 3 files changed,

[Qemu-devel] [PATCH 02/16] exec: make phys_page_find() return a temporary

2012-01-02 Thread Avi Kivity
Instead of returning a PhysPageDesc pointer, return a temporary. This lets us move away from actually storing PhysPageDesc's, and instead sythesising them when needed. Signed-off-by: Avi Kivity --- exec.c | 148 +--- 1 files changed, 4

[Qemu-devel] [PATCH 11/16] Convert IO_MEM_SUBPAGE_RAM to be a MemoryRegion

2012-01-02 Thread Avi Kivity
Signed-off-by: Avi Kivity --- cpu-common.h |1 - exec.c | 72 +++-- 2 files changed, 24 insertions(+), 49 deletions(-) diff --git a/cpu-common.h b/cpu-common.h index fd787b9..98dddfe 100644 --- a/cpu-common.h +++ b/cpu-common.h @@ -

[Qemu-devel] [PATCH 06/16] Avoid range comparisons on io index types

2012-01-02 Thread Avi Kivity
The code sometimes uses range comparisons on io indexes (e.g. index =< IO_MEM_ROM). Avoid these as they make moving to objects harder. Signed-off-by: Avi Kivity --- exec-all.h |2 +- exec.c | 37 - memory.c |3 ++- soft

Re: [Qemu-devel] [PATCH 00/21][RFC] postcopy live migration

2012-01-02 Thread Stefan Hajnoczi
On Mon, Jan 2, 2012 at 9:28 AM, Dor Laor wrote: > At the end of the day, it's performance testing using various scenarios that > can educate us whether post-copy worth the extra complexity over slowing > down the guest on the source. True. It's certainly an interesting patch series to benchmark

[Qemu-devel] [PATCH 13/16] Direct dispatch through MemoryRegion

2012-01-02 Thread Avi Kivity
Now that all mmio goes through MemoryRegions, we can convert io_mem_opaque to be a MemoryRegion pointer, and remove the thunks that convert from old-style CPU{Read,Write}MemoryFunc to MemoryRegionOps. Signed-off-by: Avi Kivity --- exec-all.h |4 +- exec-obsolete.h |5 +- exec.c

Re: [Qemu-devel] virtio-net with virtio-mmio

2012-01-02 Thread Stefan Hajnoczi
On Mon, Jan 2, 2012 at 5:19 AM, Ying-Shiuan Pan wrote: > 2011/12/30 Stefan Hajnoczi >> >> On Wed, Dec 28, 2011 at 06:16:42PM +0800, Ying-Shiuan Pan wrote: >> > I'm very interested in virtio-mmio Peter Maydell did for QEMU, >> > (http://lists.nongnu.org/archive/html/qemu-devel/2011-11/msg01870.htm

[Qemu-devel] [PATCH 10/16] Convert the subpage wrapper to be a MemoryRegion

2012-01-02 Thread Avi Kivity
Signed-off-by: Avi Kivity --- exec.c | 70 --- 1 files changed, 18 insertions(+), 52 deletions(-) diff --git a/exec.c b/exec.c index c8c839a..fb8c23e 100644 --- a/exec.c +++ b/exec.c @@ -2472,6 +2472,7 @@ static inline void tlb_set_di

[Qemu-devel] [PATCH 07/16] Uninline get_page_addr_code()

2012-01-02 Thread Avi Kivity
Its use of IO_MEM_ROM and friends will later cause #include loops; and it is too large to merit inlining. Signed-off-by: Avi Kivity --- exec-all.h | 26 +- exec.c | 26 ++ 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/exe

[Qemu-devel] [PATCH 03/16] memory: move mmio access to functions

2012-01-02 Thread Avi Kivity
Currently mmio access goes directly to the io_mem_{read,write} arrays. In preparation for eliminating them, add indirection via a function. Signed-off-by: Avi Kivity --- exec-all.h |7 - exec.c | 54 ++-- memory.c

[Qemu-devel] [PATCH 05/16] Fix wrong region_offset when overlaying a page with another

2012-01-02 Thread Avi Kivity
cpu_register_physical_memory_log() does not update region_offset if a page was previously registered for the same address. This could cause mmio accesses going to the wrong place, by using the old region_offset. Signed-off-by: Avi Kivity --- exec.c |1 + 1 files changed, 1 insertions(+), 0

Re: [Qemu-devel] [PATCH 0/2][RFC] postcopy migration: Linux char device for postcopy

2012-01-02 Thread Andrea Arcangeli
On Thu, Dec 29, 2011 at 06:01:45PM +0200, Avi Kivity wrote: > On 12/29/2011 06:00 PM, Avi Kivity wrote: > > The NFS client has exactly the same issue, if you mount it with the intr > > option. In fact you could use the NFS client as a trivial umem/cuse > > prototype. > > Actually, NFS can return

[Qemu-devel] [PATCH 09/16] Switch cpu_register_physical_memory_log() to use MemoryRegions

2012-01-02 Thread Avi Kivity
Still internally using ram_addr. Signed-off-by: Avi Kivity --- exec-obsolete.h | 24 +++- exec.c | 24 +++- memory.c| 44 3 files changed, 38 insertions(+), 54 deletions(-) diff --git a/e

  1   2   >