[Qemu-devel] [PATCH] scsi-disk: fix bug in scsi_block_new_request() introduced by commit 137745c

2014-06-08 Thread Ulrich Obergfell
This patch fixes a bug in scsi_block_new_request() that was introduced by commit 137745c5c60f083ec982fe9e861e8c16ebca1ba8. If the host cache is used - i.e. if BDRV_O_NOCACHE is _not_ set - the 'break' statement needs to be executed to 'fall back' to SG_IO. Signed-off-by: Ulric

Re: [Qemu-devel] [PATCH v2] We should check the virtio_load return code

2012-03-01 Thread Ulrich Obergfell
n to reporduce the crash with migration: > 1) run a guest with -device virtio-blk-pci,drive=drive_name,scsi=on > 2) run destination with >-device virtio-blk-pci,drive=drive_name,scsi=off ... -incoming ... > 3) migrate from 1 to 2. > > Signed-off-by: Ulrich Obergfell > Signed-off-by: Orit Wasserman ...

[Qemu-devel] [PATCH v5 3/5] hpet 'driftfix': add fields to HPETTimer and VMStateDescription

2011-05-20 Thread Ulrich Obergfell
The new fields in HPETTimer are covered by a separate VMStateDescription which is a subsection of 'vmstate_hpet_timer'. They are only migrated if -global hpet.driftfix=on Signed-off-by: Ulrich Obergfell --- hw/hpet.c | 42 ++ 1 files c

[Qemu-devel] [PATCH v5 2/5] hpet 'driftfix': add driftfix property to HPETState and DeviceInfo

2011-05-20 Thread Ulrich Obergfell
driftfix is a 'bit type' property. Compensation of delayed callbacks and coalesced interrupts can be enabled with the command line option -global hpet.driftfix=on driftfix is 'off' (disabled) by default. Signed-off-by: Ulrich Obergfell --- hw/hpet.c |3 +++

[Qemu-devel] [PATCH v5 1/5] hpet 'driftfix': add hooks required to detect coalesced interrupts (x86 apic only)

2011-05-20 Thread Ulrich Obergfell
place the stubs with apic_get_irq_delivered() and apic_reset_irq_delivered(). This change can be replaced if a generic feedback infrastructure to track coalesced IRQs for periodic, clock providing devices becomes available. Signed-off-by: Ulrich Obergfell --- hw/apic.c |4 ++

[Qemu-devel] [PATCH v5 5/5] hpet 'driftfix': add code in hpet_timer() to compensate delayed callbacks and coalesced interrupts

2011-05-20 Thread Ulrich Obergfell
ng virtual machine time intermittently pass slower and faster than real time (depending on the guest's time keeping algorithm). Compensation is disabled by default and can be enabled for guests where this behaviour may be acceptable. Signed-off-by: Ulrich Obergfell --- h

[Qemu-devel] [PATCH v5 4/5] hpet 'driftfix': add code in update_irq() to detect coalesced interrupts (x86 apic only)

2011-05-20 Thread Ulrich Obergfell
ck coalesced IRQs for periodic, clock providing devices becomes available. Signed-off-by: Ulrich Obergfell --- hw/hpet.c | 13 +++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/hpet.c b/hw/hpet.c index dba9370..0428290 100644 --- a/hw/hpet.c +++ b/hw/hpet.c @@ -1

[Qemu-devel] [PATCH v5 0/5] hpet 'driftfix': alleviate time drift with HPET periodic timers

2011-05-20 Thread Ulrich Obergfell
/gmane.comp.emulators.kvm.devel/69328 Changes since version 4: Added comments to patch part 3 and part 5. No changes in the actual code. Please review and please comment. Regards, Uli Ulrich Obergfell (5): hpet 'driftfix': add hooks required to detect coalesced interrupts (x86 apic on

Re: [Qemu-devel] [PATCH v4 5/5] hpet 'driftfix': add code in hpet_timer() to compensate delayed callbacks and coalesced interrupts

2011-05-12 Thread Ulrich Obergfell
Hi Zachary, 1. re.: >> +static void hpet_timer_driftfix_reset(HPETTimer *t) >> +{ >> +if (t->state->driftfix&& timer_is_periodic(t)) { >> +t->ticks_not_accounted = t->prev_period = t->period; >> > > This is rather confusing. Clearly, ticks_not_accounted isn't actually > ticks n

[Qemu-devel] [PATCH v4 4/5] hpet 'driftfix': add code in update_irq() to detect coalesced interrupts (x86 apic only)

2011-05-09 Thread Ulrich Obergfell
ck coalesced IRQs for periodic, clock providing devices becomes available. Signed-off-by: Ulrich Obergfell --- hw/hpet.c | 13 +++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/hpet.c b/hw/hpet.c index 7ab6e62..e57c654 100644 --- a/hw/hpet.c +++ b/hw/hpet.c @@ -1

[Qemu-devel] [PATCH v4 5/5] hpet 'driftfix': add code in hpet_timer() to compensate delayed callbacks and coalesced interrupts

2011-05-09 Thread Ulrich Obergfell
ng virtual machine time intermittently pass slower and faster than real time (depending on the guest's time keeping algorithm). Compensation is disabled by default and can be enabled for guests where this behaviour may be acceptable. Signed-off-by: Ulrich Obergfell --- h

[Qemu-devel] [PATCH v4 2/5] hpet 'driftfix': add driftfix property to HPETState and DeviceInfo

2011-05-09 Thread Ulrich Obergfell
driftfix is a 'bit type' property. Compensation of delayed callbacks and coalesced interrupts can be enabled with the command line option -global hpet.driftfix=on driftfix is 'off' (disabled) by default. Signed-off-by: Ulrich Obergfell --- hw/hpet.c |3 +++

[Qemu-devel] [PATCH v4 3/5] hpet 'driftfix': add fields to HPETTimer and VMStateDescription

2011-05-09 Thread Ulrich Obergfell
The new fields in HPETTimer are covered by a separate VMStateDescription which is a subsection of 'vmstate_hpet_timer'. They are only migrated if -global hpet.driftfix=on Signed-off-by: Ulrich Obergfell --- hw/hpet.c | 33 + 1 files changed, 33

[Qemu-devel] [PATCH v4 1/5] hpet 'driftfix': add hooks required to detect coalesced interrupts (x86 apic only)

2011-05-09 Thread Ulrich Obergfell
place the stubs with apic_get_irq_delivered() and apic_reset_irq_delivered(). This change can be replaced if a generic feedback infrastructure to track coalesced IRQs for periodic, clock providing devices becomes available. Signed-off-by: Ulrich Obergfell --- hw/apic.c |4 ++

[Qemu-devel] [PATCH v4 0/5] hpet 'driftfix': alleviate time drift with HPET periodic timers

2011-05-09 Thread Ulrich Obergfell
in the Timer N Configuration and Capabilities Register. Please review and please comment. Regards, Uli Ulrich Obergfell (5): hpet 'driftfix': add hooks required to detect coalesced interrupts (x86 apic only) hpet 'driftfix': add driftfix property to HPETSta

Re: [Qemu-devel] [PATCH v3 5/5] hpet 'driftfix': add code in hpet_timer() to compensate delayed callbacks and coalesced interrupts

2011-05-05 Thread Ulrich Obergfell
Hi Marcelo, > Other than that, shouldnt reset accounting variables to init state on > write to GLOBAL_ENABLE_CFG / writes to main counter? I'd suggest to initialize/reset the driftfix-related fields in the 'HPETTimer' structure (including the backlog of unaccounted ticks) in the following situa

Re: [Qemu-devel] [PATCH v3 5/5] hpet 'driftfix': add code in hpet_timer() to compensate delayed callbacks and coalesced interrupts

2011-05-04 Thread Ulrich Obergfell
Hi Marcelo, > Whats prev_period for, since in practice the period will not change > between interrupts (OS programs comparator once, or perhaps twice > during bootup) ? 'prev_period' is needed if a guest o/s changes the comparator period 'on the fly' (without stopping and restarting the timer).

Re: [Qemu-devel] [PATCH v3 1/5] hpet 'driftfix': add hooks required to detect coalesced interrupts (x86 apic only)

2011-04-29 Thread Ulrich Obergfell
> On 2011-04-28 20:51, Blue Swirl wrote: >> On Thu, Apr 28, 2011 at 5:24 PM, Ulrich Obergfell wrote: >>> 'target_get_irq_delivered' and 'target_reset_irq_delivered' contain >>> entry addresses of functions that are utilized by update_irq() to >>

[Qemu-devel] [PATCH v3 5/5] hpet 'driftfix': add code in hpet_timer() to compensate delayed callbacks and coalesced interrupts

2011-04-28 Thread Ulrich Obergfell
ng virtual machine time intermittently pass slower and faster than real time (depending on the guest's time keeping algorithm). Compensation is disabled by default and can be enabled for guests where this behaviour may be acceptable. Signed-off-by: Ulrich Obergfell --- h

[Qemu-devel] [PATCH v3 2/5] hpet 'driftfix': add driftfix property to HPETState and DeviceInfo

2011-04-28 Thread Ulrich Obergfell
driftfix is a 'bit type' property. Compensation of delayed callbacks and coalesced interrupts can be enabled with the command line option -global hpet.driftfix=on driftfix is 'off' (disabled) by default. Signed-off-by: Ulrich Obergfell --- hw/hpet.c |3 +++

[Qemu-devel] [PATCH v3 4/5] hpet 'driftfix': add code in update_irq() to detect coalesced interrupts (x86 apic only)

2011-04-28 Thread Ulrich Obergfell
ck coalesced IRQs for periodic, clock providing devices becomes available. Signed-off-by: Ulrich Obergfell --- hw/hpet.c | 15 +-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/hw/hpet.c b/hw/hpet.c index 7ab6e62..35466ae 100644 --- a/hw/hpet.c +++ b/hw/hpet

[Qemu-devel] [PATCH v3 3/5] hpet 'driftfix': add fields to HPETTimer and VMStateDescription

2011-04-28 Thread Ulrich Obergfell
The new fields in HPETTimer are covered by a separate VMStateDescription which is a subsection of 'vmstate_hpet_timer'. They are only migrated if -global hpet.driftfix=on Signed-off-by: Ulrich Obergfell --- hw/hpet.c | 33 + 1 files changed, 33

[Qemu-devel] [PATCH v3 1/5] hpet 'driftfix': add hooks required to detect coalesced interrupts (x86 apic only)

2011-04-28 Thread Ulrich Obergfell
rastructure to track coalesced IRQs for periodic, clock providing devices becomes available. Signed-off-by: Ulrich Obergfell --- hw/apic.c |4 sysemu.h |3 +++ vl.c |3 +++ 3 files changed, 10 insertions(+), 0 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index a45b57f..eb0

[Qemu-devel] [PATCH v3 0/5] hpet 'driftfix': alleviate time drift with HPET periodic timers

2011-04-28 Thread Ulrich Obergfell
please comment. Regards, Uli Ulrich Obergfell (5): hpet 'driftfix': add hooks required to detect coalesced interrupts (x86 apic only) hpet 'driftfix': add driftfix property to HPETState and DeviceInfo hpet 'driftfix': add fields to HPETTimer and VMStateDescr

Re: [Qemu-devel] [PATCH v2 3/5] hpet 'driftfix': add fields to HPETTimer and VMStateDescription

2011-04-11 Thread Ulrich Obergfell
>> vmstate_hpet_timer = { >> VMSTATE_UINT64(fsb, HPETTimer), >> VMSTATE_UINT64(period, HPETTimer), >> VMSTATE_UINT8(wrap_flag, HPETTimer), >> + VMSTATE_UINT64_V(saved_period, HPETTimer, 3), >> + VMSTATE_UINT64_V(ticks_not_accounted, HPETTimer, 3), >> + VMSTATE_UINT32_

Re: [Qemu-devel] [PATCH v2 3/5] hpet 'driftfix': add fields to HPETTimer and VMStateDescription

2011-04-11 Thread Ulrich Obergfell
>> typedef struct HPETState { >> @@ -248,7 +253,7 @@ static int hpet_post_load(void *opaque, int >> version_id) >> >> static const VMStateDescription vmstate_hpet_timer = { >> .name = "hpet_timer", >> - .version_id = 1, >> + .version_id = 3, > > Why jump from 1 to 3? > >> .minimum

[Qemu-devel] [PATCH v2 5/5] hpet 'driftfix': add code in hpet_timer() to compensate delayed callbacks and coalesced interrupts

2011-04-08 Thread Ulrich Obergfell
guest's time keeping algorithm). Compensation is disabled by default and can be enabled for guests where this behaviour is acceptable. Signed-off-by: Ulrich Obergfell --- hw/hpet.c | 58 +- 1 files changed, 57 insertions(+), 1 deletions(-)

[Qemu-devel] [PATCH v2 4/5] hpet 'driftfix': add code in update_irq() to detect coalesced interrupts (x86 apic only)

2011-04-08 Thread Ulrich Obergfell
update_irq() uses a similar method as in 'rtc_td_hack' to detect coalesced interrupts. The function entry addresses are retrieved from 'target_get_irq_delivered' and 'target_reset_irq_delivered'. Signed-off-by: Ulrich Obergfell --- hw/hpet.c | 15 ++

[Qemu-devel] [PATCH v2 1/5] hpet 'driftfix': add hooks required to detect coalesced interrupts (x86 apic only)

2011-04-08 Thread Ulrich Obergfell
'target_get_irq_delivered' and 'target_reset_irq_delivered' contain entry addresses of functions that are utilized by update_irq() to detect coalesced interrupts. apic code loads these pointers during initialization. Signed-off-by: Ulrich Obergfell --- hw/apic.c |4 ++

[Qemu-devel] [PATCH v2 0/5] hpet 'driftfix': alleviate time drift with HPET periodic timers

2011-04-08 Thread Ulrich Obergfell
ect' when the guest o/s modifies the comparator register value. Please review and please comment. Regards, Uli Ulrich Obergfell (5): hpet 'driftfix': add hooks required to detect coalesced interrupts (x86 apic only) hpet 'driftfix': add driftfix property to HPETSt

[Qemu-devel] [PATCH v2 3/5] hpet 'driftfix': add fields to HPETTimer and VMStateDescription

2011-04-08 Thread Ulrich Obergfell
Signed-off-by: Ulrich Obergfell --- hw/hpet.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/hw/hpet.c b/hw/hpet.c index 45847ed..c150da5 100644 --- a/hw/hpet.c +++ b/hw/hpet.c @@ -55,6 +55,11 @@ typedef struct HPETTimer { /* timers */ uint8_t

[Qemu-devel] [PATCH v2 2/5] hpet 'driftfix': add driftfix property to HPETState and DeviceInfo

2011-04-08 Thread Ulrich Obergfell
driftfix is a 'bit type' property. Compensation of delayed callbacks and coalesced interrupts can be enabled with the command line option -global hpet.driftfix=on driftfix is 'off' (disabled) by default. Signed-off-by: Ulrich Obergfell --- hw/hpet.c |3 +++

[Qemu-devel] [PATCH v2] severe memory leak caused by broken palette_destroy() function

2011-03-25 Thread Ulrich Obergfell
e == NULL) { 73 qemu_free(palette); 74 } 75 } Version 2 of the patch calls qemu_free() unconditionally. Signed-off-by: Ulrich Obergfell diff -up ./ui/vnc-palette.c.orig0 ./ui/vnc-palette.c --- ./ui/vnc-palette.c.orig02011-03-15 03:53:22.0 +0100 +++ ./ui/vn

[Qemu-devel] Re: [PATCH 3/3] alleviate time drift with HPET periodic timers

2011-03-22 Thread Ulrich Obergfell
>> Part 3 of the patch implements the following options for the >> 'configure' script. >> >> --disable-hpet-driftfix >> --enable-hpet-driftfix > > I see no benefit in this configurability. Just make the driftfix > unconditionally available, runtime-disabled by default for now until it > matured a

[Qemu-devel] Re: [PATCH 1/3] alleviate time drift with HPET periodic timers

2011-03-22 Thread Ulrich Obergfell
>> Part 1 of the patch implements the following QEMU command line option. >> >> -hpet [device=none|present][,driftfix=none|slew] > > Just define driftfix as property of the hpet device. That way it can be > controlled both globally (-global hpet.driftfix=...) and per hpet block > (once we support

[Qemu-devel] vnc: severe memory leak caused by broken palette_destroy() function

2011-03-21 Thread Ulrich Obergfell
lette' was NULL. In order to be closer to the original code, the proposed patch corrects the 'if' statement. Signed-off-by: Ulrich Obergfell diff -up ./ui/vnc-palette.c.orig0 ./ui/vnc-palette.c --- ./ui/vnc-palette.c.orig02011-03-15 03:53:22.0 +0100 +++ ./ui/v

Re: [Qemu-devel] [PATCH] vnc: segmentation fault caused by incorrect 'bytes' count calculated in tight_compress_data()

2011-03-21 Thread Ulrich Obergfell
> Hi Ulrich, > Looks a lot like "vnc: tight: Fix crash after 2GB of output", right ? > > -- > Corentin Chary > http://xf.iksaif.net Hi Corentin, yes, this appears to be the same issue as: http://lists.gnu.org/archive/html/qemu-devel/2011-03/msg02044.html You posted your patch only a few minut

[Qemu-devel] [PATCH] vnc: segmentation fault caused by incorrect 'bytes' count calculated in tight_compress_data()

2011-03-21 Thread Ulrich Obergfell
("%lx\n", bytes); } $ cc t.c -o t $ ./t 10001 The patch changes the type of 'previous_out' to 'uLong' which is the same as the type of 'zstream->total_out'. Signed-off-by: Ulrich Obergfell diff -up ./ui/vnc-enc-tight.c.orig0

[Qemu-devel] [PATCH 3/3] alleviate time drift with HPET periodic timers

2011-03-18 Thread Ulrich Obergfell
Part 3 of the patch implements the following options for the 'configure' script. --disable-hpet-driftfix --enable-hpet-driftfix Signed-off-by: Ulrich Obergfell diff -up ./configure.orig3 ./configure --- ./configure.orig3 2011-02-18 22:48:06.0 +0100 +++ ./configure 2011-0

[Qemu-devel] [PATCH 1/3] alleviate time drift with HPET periodic timers

2011-03-18 Thread Ulrich Obergfell
Part 1 of the patch implements the following QEMU command line option. -hpet [device=none|present][,driftfix=none|slew] Signed-off-by: Ulrich Obergfell diff -up ./qemu-config.c.orig1 ./qemu-config.c --- ./qemu-config.c.orig1 2011-02-18 22:48:06.0 +0100 +++ ./qemu-config.c

[Qemu-devel] [PATCH 2/3] alleviate time drift with HPET periodic timers

2011-03-18 Thread Ulrich Obergfell
interrupt per interval. If further interrupts are lost while compensation is still in progress, the rate is increased. A limit is imposed on the rate and on the 'backlog' of lost interrupts that are to be injected. Signed-off-by: Ulrich Obergfell diff -up ./hw/apic.c.orig2 ./hw/apic.

[Qemu-devel] [PATCH 0/3] alleviate time drift with HPET periodic timers

2011-03-18 Thread Ulrich Obergfell
Hi, By the beginning of February I posted an RFC regarding an approach to alleviate time drift with HPET periodic timers. Ref.: http://article.gmane.org/gmane.comp.emulators.kvm.devel/67346 http://lists.gnu.org/archive/html/qemu-devel/2011-02/msg00327.html During the discussion it became

Re: [Qemu-devel] Re: [RFC: 0/2] patch for QEMU HPET periodic timer emulation to alleviate time drift

2011-02-07 Thread Ulrich Obergfell
On 02/03/2011 9:07 PM, Anthony Liguori wrote: > On 02/03/2011 09:28 AM, Jan Kiszka wrote: >> On 2011-02-03 14:43, Ulrich Obergfell wrote: ... >>> This is an RFC through which I would like to get feedback on how the >>> idea of a patch to compensate those lost i

Re: [Qemu-devel] Re: [RFC: 0/2] patch for QEMU HPET periodic timer emulation to alleviate time drift

2011-02-04 Thread Ulrich Obergfell
Anthony, in reply to: > My point is that there's really low hanging fruit and while for some > curious reason I don't actually see this patch, I believe that a patch > like this probably can help us quite a lot in the short term. I've sent the patch in two separate emails: - code part 1 (intro