[Qemu-devel] [PATCH 3/4] xen: introduce an event channel for buffered io event notifications

2011-11-15 Thread stefano.stabellini
From: Stefano Stabellini Use the newly introduced HVM_PARAM_BUFIOREQ_EVTCHN to receive notifications for buffered io events. After the first notification is received leave the event channel masked and setup a timer to process the rest of the batch. Once we have completed processing the batch, unm

[Qemu-devel] [PATCH 4/4] qemu_calculate_timeout: increase minimum timeout to 1h

2011-11-15 Thread stefano.stabellini
From: Stefano Stabellini There is no reason why the minimum timeout should be 1sec, it could easily be 1h and we would safe lots of cpu cycles. Signed-off-by: Stefano Stabellini --- qemu-timer.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu-timer.c b/qemu-timer

[Qemu-devel] [PATCH 1/4] xen: introduce mc146818rtcxen

2011-11-15 Thread stefano.stabellini
From: Stefano Stabellini Xen doesn't need full RTC emulation in Qemu because the RTC is already emulated by the hypervisor. In particular we want to avoid the timers initialization so that Qemu doesn't need to wake up needlessly. Signed-off-by: Stefano Stabellini --- hw/mc146818rtc.c | 36 ++

[Qemu-devel] [PATCH 2/4] xen: do not initialize the interval timer emulator

2011-11-15 Thread stefano.stabellini
From: Stefano Stabellini PIT is emulated by the hypervisor so we don't need to emulate it in Qemu: this patch prevents Qemu from waking up needlessly at PIT_FREQ on Xen. Signed-off-by: Stefano Stabellini --- hw/pc.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a

[Qemu-devel] [PATCH 4/4] xen-mapcache: Fix rlimit set size.

2011-09-09 Thread stefano.stabellini
From: Anthony PERARD Previously, the address space soft limit was set mcache_max_size. So, before the mcache_max_size was reached by the mapcache, QEMU was killed for overuse of the virtual address space. This patch fix that by setting the soft limit the maximum than can have QEMU. So the soft a

[Qemu-devel] [PATCH 1/4] Introduce a new 'connected' xendev op called when Connected.

2011-09-09 Thread stefano.stabellini
From: John Haxby Rename the existing xendev 'connect' op to 'initialised' and introduce a new 'connected' op. This new op, if defined, is called when the backend is connected. Note that since there is no state transition this may be called more than once. Signed-off-by: John Haxby Signed-off-

[Qemu-devel] [PATCH 3/4] xen: use uint64_t instead of target_ulong in cpu_ioreq_move

2011-09-09 Thread stefano.stabellini
From: Stefano Stabellini cpu_ioreq_move might move 8 bytes at a time so we must make sure that the temporary variable can hold 8 bytes. Signed-off-by: Stefano Stabellini --- xen-all.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/xen-all.c b/xen-all.c index 9eaeac1.

[Qemu-devel] [PATCH 2/4] Move the xenfb pointer handler to the connected method

2011-09-09 Thread stefano.stabellini
From: John Haxby Ensure that we read "request-abs-pointer" after the frontend has written it. This means that we will correctly set up an ansolute or relative pointer handler correctly. Signed-off-by: John Haxby Signed-off-by: Stefano Stabellini --- hw/xenfb.c | 21 - 1

[Qemu-devel] [PATCH] MAINTAINERS: add entry for Xen

2011-07-29 Thread stefano.stabellini
From: Stefano Stabellini Signed-off-by: Stefano Stabellini --- MAINTAINERS | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 6115e4e..273a6a7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -143,6 +143,16 @@ L: k...@vger.kernel.org

[Qemu-devel] [PATCH RESEND 3/3] xen: use uint64_t instead of target_ulong in cpu_ioreq_move

2011-07-28 Thread stefano.stabellini
From: Stefano Stabellini cpu_ioreq_move might move 8 bytes at a time so we must make sure that the temporary variable can hold 8 bytes. Signed-off-by: Stefano Stabellini --- xen-all.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/xen-all.c b/xen-all.c index 9eaeac1.

[Qemu-devel] [PATCH RESEND 1/3] Introduce a new 'connected' xendev op called when Connected.

2011-07-28 Thread stefano.stabellini
From: John Haxby Rename the existing xendev 'connect' op to 'initialised' and introduce a new 'connected' op. This new op, if defined, is called when the backend is connected. Note that since there is no state transition this may be called more than once. Signed-off-by: John Haxby Acked-by: S

[Qemu-devel] [PATCH RESEND 2/3] Move the xenfb pointer handler to the connected method

2011-07-28 Thread stefano.stabellini
From: John Haxby Ensure that we read "request-abs-pointer" after the frontend has written it. This means that we will correctly set up an ansolute or relative pointer handler correctly. Signed-off-by: John Haxby Acked-by: Stefano Stabellini --- hw/xenfb.c | 19 ++- 1 files

[Qemu-devel] [PATCH RESEND v3] xen: implement unplug protocol in xen_platform

2011-07-18 Thread stefano.stabellini
From: Stefano Stabellini The unplug protocol is necessary to support PV drivers in the guest: the drivers expect to be able to "unplug" emulated disks and nics before initializing the Xen PV interfaces. It is responsibility of the guest to make sure that the unplug is done before the emulated dev

[Qemu-devel] [PATCH][REPOST] xen: introduce xen_change_state_handler

2011-07-15 Thread stefano.stabellini
From: Anthony PERARD Remove the call to xenstore_record_dm_state from xen_main_loop_prepare that is HVM specific. Add a new vm_change_state_handler shared between xen_pv and xen_hvm machines to record the VM state to xenstore. Signed-off-by: Anthony PERARD Signed-off-by: Stefano Stabellini ---

[Qemu-devel] [PATCH v5] xen_console: support the new extended xenstore protocol

2011-06-30 Thread stefano.stabellini
From: Stefano Stabellini Since CS 21994 on xen-unstable.hg and CS 466608f3a32e1f9808acdf832a5843af37e5fcec on qemu-xen-unstable.git, few changes have been introduced to the PV console xenstore protocol, as described by the document docs/misc/console.txt under xen-unstable.hg. >From the Qemu poin

[Qemu-devel] [PATCH v4] xen_console: support the new extended xenstore protocol

2011-06-30 Thread stefano.stabellini
From: Stefano Stabellini Since CS 21994 on xen-unstable.hg and CS 466608f3a32e1f9808acdf832a5843af37e5fcec on qemu-xen-unstable.git, few changes have been introduced to the PV console xenstore protocol, as described by the document docs/misc/console.txt under xen-unstable.hg. >From the Qemu poin

[Qemu-devel] [PATCH v2] xen_disk: treat "aio" as "raw"

2011-06-30 Thread stefano.stabellini
From: Stefano Stabellini Sometimes the toolstack uses "aio" without an additional format identifier, in such cases use "raw". Updated in v2: - fix code style. Signed-off-by: Stefano Stabellini --- hw/xen_disk.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/xen

[Qemu-devel] [PATCH] xen: introduce xen_change_state_handler

2011-06-29 Thread stefano.stabellini
From: Anthony PERARD Remove the call to xenstore_record_dm_state from xen_main_loop_prepare that is HVM specific. Add a new vm_change_state_handler shared between xen_pv and xen_hvm machines to record the VM state to xenstore. Signed-off-by: Anthony PERARD Signed-off-by: Stefano Stabellini ---

[Qemu-devel] [PATCH v3] xen_console: support the new extended xenstore protocol

2011-06-29 Thread stefano.stabellini
From: Stefano Stabellini Since CS 21994 on xen-unstable.hg and CS 466608f3a32e1f9808acdf832a5843af37e5fcec on qemu-xen-unstable.git, few changes have been introduced to the PV console xenstore protocol, as described by the document docs/misc/console.txt under xen-unstable.hg. >From the Qemu poin

[Qemu-devel] [PATCH v2] xen_console: support the new extended xenstore protocol

2011-06-28 Thread stefano.stabellini
From: Stefano Stabellini Since CS 21994 on xen-unstable.hg and CS 466608f3a32e1f9808acdf832a5843af37e5fcec on qemu-xen-unstable.git, few changes have been introduced to the PV console xenstore protocol, as described by the document docs/misc/console.txt under xen-unstable.hg. >From the Qemu poin

[Qemu-devel] [PATCH] xen_console: support the new extended xenstore protocol

2011-06-28 Thread stefano.stabellini
From: Stefano Stabellini Since CS 21994 on xen-unstable.hg and CS 466608f3a32e1f9808acdf832a5843af37e5fcec on qemu-xen-unstable.git, few changes have been introduced to the PV console xenstore protocol, as described by the document docs/misc/console.txt under xen-unstable.hg. >From the Qemu poin

[Qemu-devel] [PATCH v3] xen: implement unplug protocol in xen_platform

2011-06-28 Thread stefano.stabellini
From: Stefano Stabellini The unplug protocol is necessary to support PV drivers in the guest: the drivers expect to be able to "unplug" emulated disks and nics before initializing the Xen PV interfaces. It is responsibility of the guest to make sure that the unplug is done before the emulated dev

[Qemu-devel] [PATCH v2] qemu_ram_ptr_length: take ram_addr_t as arguments

2011-06-27 Thread stefano.stabellini
From: Stefano Stabellini qemu_ram_ptr_length should take ram_addr_t as argument rather than target_phys_addr_t because is doing comparisons with RAMBlock addresses. cpu_physical_memory_map should create a ram_addr_t address to pass to qemu_ram_ptr_length from PhysPageDesc phys_offset. Remove co

[Qemu-devel] [PATCH v3] xen_disk: cope with missing xenstore "params" node

2011-06-27 Thread stefano.stabellini
From: Stefano Stabellini When disk is a cdrom and the drive is empty the "params" node in xenstore might be missing completely: cope with it instead of segfaulting. Updated in v2: - actually removed the strchr(blkdev->params, ':') that caused the segfault; - free all the allocated strings fro

[Qemu-devel] [PATCH v2 2/2] xen: add vkbd support for PV on HVM guests

2011-06-24 Thread stefano.stabellini
From: Stefano Stabellini Register the vkbd backend even when running as device emulator for HVM guests: it is useful because it doesn't need a frequent timer like usb. Check whether the XenInput DisplayState has been set in the initialise state, rather than the input state. In case the DisplaySt

[Qemu-devel] [PATCH v2] xen_disk: cope with missing xenstore "params" node

2011-06-24 Thread stefano.stabellini
From: Stefano Stabellini When disk is a cdrom and the drive is empty the "params" node in xenstore might be missing completely: cope with it instead of segfaulting. Updated in v2: - actually removed the strchr(blkdev->params, ':') that caused the segfault; - free all the allocated strings fro

[Qemu-devel] [PATCH] xen_console: fix memory leak

2011-06-24 Thread stefano.stabellini
From: Stefano Stabellini con_init leaks the string "type", fix it. Signed-off-by: Stefano Stabellini --- hw/xen_console.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/xen_console.c b/hw/xen_console.c index e88714f..519d5f5 100644 --- a/hw/xen_console.c +++

[Qemu-devel] [PATCH 2/2] xen: add vkbd support for PV on HVM guests

2011-06-24 Thread stefano.stabellini
From: Stefano Stabellini Register the vkbd backend even when running as device emulator for HVM guests: it is useful because it doesn't need a frequent timer like usb. Check whether the XenInput DisplayState has been set in the initialise state, rather than the input state. In case the DisplaySt

[Qemu-devel] [PATCH 1/2] xen: enable console and disk backend in HVM mode

2011-06-24 Thread stefano.stabellini
From: Stefano Stabellini Initialize the Xen console backend and the Xen disk backend even when running in HVM mode so that PV on HVM drivers can connect to them. Signed-off-by: Stefano Stabellini --- xen-all.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/xen-

[Qemu-devel] [PATCH] xen_disk: treat "aio" as "raw"

2011-06-24 Thread stefano.stabellini
From: Stefano Stabellini Sometimes the toolstack uses "aio" without an additional format identifier, in such cases use "raw". Signed-off-by: Stefano Stabellini --- hw/xen_disk.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/xen_disk.c b/hw/xen_disk.c index 801da5

[Qemu-devel] [PATCH] xen_disk: cope with missing xenstore "params" node

2011-06-24 Thread stefano.stabellini
From: Stefano Stabellini When disk is a cdrom and the drive is empty the "params" node in xenstore might be missing completely: cope with it instead of segfaulting. Signed-off-by: Stefano Stabellini --- hw/xen_disk.c | 16 +++- 1 files changed, 11 insertions(+), 5 deletions(-) d

[Qemu-devel] [PATCH] qemu_ram_ptr_length: take ram_addr_t as arguments

2011-06-24 Thread stefano.stabellini
From: Stefano Stabellini qemu_ram_ptr_length should take ram_addr_t as argument rather than target_phys_addr_t because is doing comparisons with RAMBlock addresses. cpu_physical_memory_map should create a ram_addr_t address to pass to qemu_ram_ptr_length from PhysPageDesc phys_offset. Remove co

[Qemu-devel] [PATCH 2/3] pci: export pci_unplug_device

2011-06-16 Thread stefano.stabellini
From: Stefano Stabellini pci_unplug_device is needed by the xen_platform device to perfom dynamic nic unplug. Signed-off-by: Stefano Stabellini --- hw/pci.c |2 +- hw/pci.h |1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 1d297d6..679e976 1

[Qemu-devel] [PATCH 3/3] xen: implement unplug protocol in xen_platform

2011-06-16 Thread stefano.stabellini
From: Stefano Stabellini The unplug protocol is necessary to support PV drivers in the guest: the drivers expect to be able to "unplug" emulated disks and nics before initializing the Xen PV interfaces. It is responsibility of the guest to make sure that the unplug is done before the emulated dev

[Qemu-devel] [PATCH RESEND 1/3] xen: Add the Xen platform pci device

2011-06-16 Thread stefano.stabellini
From: Steven Smith Introduce a new emulated PCI device, specific to fully virtualized Xen guests. The device is necessary for PV on HVM drivers to work. Signed-off-by: Steven Smith Signed-off-by: Anthony PERARD Signed-off-by: Stefano Stabellini --- Makefile.target |2 + hw/hw.h

[Qemu-devel] [PATCH] xen: avoid tracking the region 0xa0000 - 0xbffff

2011-06-03 Thread stefano.stabellini
From: Stefano Stabellini Xen can only do dirty bit tracking for one memory region, so we should explicitly avoid trying to track the legacy VGA region between 0xa and 0xb, rather than trying and failing. Signed-off-by: Stefano Stabellini --- xen-all.c |4 1 files changed, 4 in

[Qemu-devel] [PATCH] cirrus_vga: reset lfb_addr after a pci config write if the BAR is unmapped

2011-06-03 Thread stefano.stabellini
From: Stefano Stabellini If the cirrus_vga PCI BAR is unmapped than we should not only reset map_addr but also lfb_addr, otherwise we'll keep trying to map the old lfb_addr in map_linear_vram. Signed-off-by: Stefano Stabellini --- hw/cirrus_vga.c |5 - 1 files changed, 4 insertions(+),

[Qemu-devel] [PATCH v2 4/5] exec.c: refactor cpu_physical_memory_map

2011-05-19 Thread stefano.stabellini
From: Stefano Stabellini Introduce qemu_ram_ptr_length that takes an address and a size as parameters rather than just an address. Refactor cpu_physical_memory_map so that we call qemu_ram_ptr_length only once rather than calling qemu_get_ram_ptr one time per page. This is not only more efficien

[Qemu-devel] [PATCH v2 5/5] xen: mapcache performance improvements

2011-05-19 Thread stefano.stabellini
From: Stefano Stabellini Use qemu_invalidate_entry in cpu_physical_memory_unmap. Do not lock mapcache entries in qemu_get_ram_ptr if the address falls in the ramblock with offset == 0. We don't need to do that because the callers of qemu_get_ram_ptr either try to map an entire block, other from

[Qemu-devel] [PATCH v2 3/5] xen: remove xen_map_block and xen_unmap_block

2011-05-19 Thread stefano.stabellini
From: Stefano Stabellini Replace xen_map_block with qemu_map_cache with the appropriate locking and size parameters. Replace xen_unmap_block with qemu_invalidate_entry. Signed-off-by: Stefano Stabellini --- exec.c | 19 --- xen-mapcache-stub.c |4 xen-ma

[Qemu-devel] [PATCH v2 1/5] xen: fix qemu_map_cache with size != MCACHE_BUCKET_SIZE

2011-05-19 Thread stefano.stabellini
From: Stefano Stabellini Fix the implementation of qemu_map_cache: correctly support size arguments different from 0 or MCACHE_BUCKET_SIZE. The new implementation supports locked mapcache entries with size multiple of MCACHE_BUCKET_SIZE. qemu_invalidate_entry can correctly find and unmap these "l

[Qemu-devel] [PATCH v2 2/5] xen: remove qemu_map_cache_unlock

2011-05-19 Thread stefano.stabellini
From: Stefano Stabellini There is no need for qemu_map_cache_unlock, just use qemu_invalidate_entry instead. Signed-off-by: Stefano Stabellini --- exec.c |2 +- xen-mapcache-stub.c |4 xen-mapcache.c | 33 - xen-mapcache.h |

[Qemu-devel] [PATCH 5/5] xen: mapcache performance improvements

2011-05-18 Thread stefano.stabellini
From: Stefano Stabellini Use qemu_invalidate_entry in cpu_physical_memory_unmap. Do not lock mapcache entries in qemu_get_ram_ptr if the address falls in the ramblock with offset == 0. We don't need to do that because the callers of qemu_get_ram_ptr either try to map an entire block, other from

[Qemu-devel] [PATCH] xen: fix interrupt routing

2011-05-18 Thread stefano.stabellini
From: Stefano Stabellini Match the routing informations built by seabios: - remove i440fx_write_config_xen we don't need to intercept pci config writes to i440FX; - introduce piix3_write_config_xen we do need to intercept pci config write to the PCI-ISA bridge to update the PCI link routing; -

[Qemu-devel] [PATCH 4/5] exec.c: refactor cpu_physical_memory_map

2011-05-18 Thread stefano.stabellini
From: Stefano Stabellini Introduce qemu_ram_ptr_length that takes an address and a size as parameters rather than just an address. Refactor cpu_physical_memory_map so that we call qemu_ram_ptr_length only once rather than calling qemu_get_ram_ptr one time per page. This is not only more efficien

[Qemu-devel] [PATCH 3/5] xen: remove xen_map_block and xen_unmap_block

2011-05-18 Thread stefano.stabellini
From: Stefano Stabellini Replace xen_map_block with qemu_map_cache with the appropriate locking and size parameters. Replace xen_unmap_block with qemu_invalidate_entry. Signed-off-by: Stefano Stabellini --- exec.c | 18 +++--- xen-mapcache-stub.c |4 xen-map

[Qemu-devel] [PATCH 1/5] xen: fix qemu_map_cache with size != MCACHE_BUCKET_SIZE

2011-05-18 Thread stefano.stabellini
From: Stefano Stabellini Fix the implementation of qemu_map_cache: correctly support size arguments different from 0 or MCACHE_BUCKET_SIZE. The new implementation supports locked mapcache entries with size multiple of MCACHE_BUCKET_SIZE. qemu_invalidate_entry can correctly find and unmap these "l

[Qemu-devel] [PATCH 2/5] xen: remove qemu_map_cache_unlock

2011-05-18 Thread stefano.stabellini
From: Stefano Stabellini There is no need for qemu_map_cache_unlock, just use qemu_invalidate_entry instead. Signed-off-by: Stefano Stabellini --- exec.c |2 +- xen-mapcache-stub.c |4 xen-mapcache.c | 33 - xen-mapcache.h |