On Tue, May 21, 2013 at 6:57 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Using phys_page_find to translate an AddressSpace to a MemoryRegionSection
is unwieldy. It requires to pass the page index rather than the address,
and later memory_region_section_addr has to be called. Replace
On Thu, May 23, 2013 at 5:59 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 23/05/2013 09:09, liu ping fan ha scritto:
void address_space_rw(AddressSpace *as, hwaddr addr, uint8_t *buf,
int len, bool is_write)
{
-AddressSpaceDispatch *d = as-dispatch
[...]
+static PhysPageTable *cur_pgtbl;
+static PhysPageTable *next_pgtbl;
You shouldn't need cur_pgtbl. Instead, each AddressSpaceDispatch should
have a pointer to its own cur_pgtbl. In the commit hook you can then
take a lock, unref the old table, assign cur_pgtbl = next_pgtbl and ref
On Tue, May 21, 2013 at 9:57 PM, Stefan Hajnoczi stefa...@redhat.com wrote:
On Tue, May 07, 2013 at 01:46:55PM +0800, Liu Ping Fan wrote:
From: Liu Ping Fan pingf...@linux.vnet.ibm.com
Hub ports will run on multi-threads, so use lock to protect them.
Signed-off-by: Liu Ping Fan pingf
On Mon, May 27, 2013 at 7:54 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 26/05/2013 15:02, liu ping fan ha scritto:
[...]
+static PhysPageTable *cur_pgtbl;
+static PhysPageTable *next_pgtbl;
You shouldn't need cur_pgtbl. Instead, each AddressSpaceDispatch should
have a pointer to its
From: Liu Ping Fan pingf...@linux.vnet.ibm.com
This series aim to make mmio dispatch lockless.
Based on Paolo's tree git://github.com/bonzini/qemu.git, branch iommu
For seqlock and rcu, I think Paolo will post them out later.
rfcv1-v1:
use seqlock to protect reader against writer (thanks
From: Liu Ping Fan pingf...@linux.vnet.ibm.com
The secions like phys_section_unassigned always has fixed address
in phys_sections, make them declared as macro, so we can use them
when having more than one phys_sections, ie, more than one dispatch
context.
Signed-off-by: Liu Ping Fan pingf
From: Liu Ping Fan pingf...@linux.vnet.ibm.com
All of AddressSpaceDispatch's roots are part of dispatch context,
along with cur_map_nodes, cur_phys_sections, and we should walk
through AddressSpaceDispatchs in the same dispatch context, ie
the same memory topology. Concenter the roots, so we can
From: Liu Ping Fan pingf...@linux.vnet.ibm.com
Currently, phys_node_map and phys_sections are shared by all
of the AddressSpaceDispatch. When updating mem topology, all
AddressSpaceDispatch will rebuild dispatch tables sequentially
on them. In order to use rcu-style, introducing next_node_map
From: Liu Ping Fan pingf...@linux.vnet.ibm.com
We can do the tcg listener's logic in core memory listener. And this
will help us concentrate the rcu updater.
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
exec.c | 19 +--
1 files changed, 5 insertions(+), 14
From: Liu Ping Fan pingf...@linux.vnet.ibm.com
When adopting rcu style, for tcg code, need to fix two kind of path:
-tlb_set_page() will cache translation info.
-instruction emualation path
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
Not sure about tcg code, so I took
From: Liu Ping Fan pingf...@linux.vnet.ibm.com
Using seqlock to load dispatch context atomic. The dispatch
context consist of: cur_map_nodes, cur_sections, cur_roots.
Also during the dispatch, we should get the terminal, and dup
MemoryRegionSection. So after rcu unlock, the cur dispatch
context
On Wed, May 29, 2013 at 3:03 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 29/05/2013 04:11, Liu Ping Fan ha scritto:
From: Liu Ping Fan pingf...@linux.vnet.ibm.com
All of AddressSpaceDispatch's roots are part of dispatch context,
along with cur_map_nodes, cur_phys_sections, and we should
On Wed, May 29, 2013 at 3:22 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 29/05/2013 04:11, Liu Ping Fan ha scritto:
From: Liu Ping Fan pingf...@linux.vnet.ibm.com
When adopting rcu style, for tcg code, need to fix two kind of path:
-tlb_set_page() will cache translation info
On Wed, May 29, 2013 at 4:31 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 29/05/2013 09:48, liu ping fan ha scritto:
On Wed, May 29, 2013 at 3:03 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 29/05/2013 04:11, Liu Ping Fan ha scritto:
From: Liu Ping Fan pingf...@linux.vnet.ibm.com
All
Hi Peter,
Is it that sending zero page mostly service the first iteration, ie
bluk-stage? And for the subsequent iteration, dirty pages are normally
not zero.
Thanks
On Wed, Jun 5, 2013 at 2:09 PM, Peter Lieven p...@kamp.de wrote:
Am 05.06.2013 um 05:37 schrieb Alexey Kardashevskiy
On Sun, Sep 29, 2013 at 12:15 PM, Michael S. Tsirkin m...@redhat.com wrote:
On Sun, Sep 29, 2013 at 11:49:41AM +0800, liu ping fan wrote:
On Sun, Sep 29, 2013 at 3:56 AM, Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Sep 12, 2013 at 11:25:15AM +0800, Liu Ping Fan wrote:
On PC, IRQ2/8 can
On Sun, Sep 29, 2013 at 12:20 PM, Michael S. Tsirkin m...@redhat.com wrote:
On Sun, Sep 29, 2013 at 11:25:24AM +0800, liu ping fan wrote:
On Sun, Sep 29, 2013 at 3:52 AM, Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Sep 12, 2013 at 11:25:14AM +0800, Liu Ping Fan wrote:
According to hpet
On Mon, Sep 30, 2013 at 11:58 PM, Michael S. Tsirkin m...@redhat.com wrote:
On Mon, Sep 30, 2013 at 05:48:03PM +0200, Paolo Bonzini wrote:
Il 30/09/2013 11:30, Michael S. Tsirkin ha scritto:
I was really only talking about q35 here.
I thought it's ugly that users can control intcap
v4:
use stand compat property to fix hpet intcap
v3:
change hpet interrupt capablity on board's demand
Liu Ping Fan (5):
hpet: inverse polarity when pin above ISA_NUM_IRQS
hpet: enable to entitle more irq pins for hpet
PC: use qdev_xx to create hpet instead of sysbus_create_xx
PC: add
of this inversion inside the hpet logic.
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
hw/timer/hpet.c | 14 --
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
index fcd22ae..8429eb3 100644
--- a/hw/timer/hpet.c
+++ b/hw/timer/hpet.c
On q35, IRQ2/8 can be reserved for hpet timer 0/1. And pin 16~23
of ioapic can be dynamically assigned to hpet as guest chooses.
So we introduce intcap property to do that. (currently, its value
is IRQ2. Later, it should be set by board.)
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
For pc-piix-*, hpet's intcap is always hard coded as IRQ2.
For q35, if it is pc-q35-1.7 and earlier, we use IRQ2 for compat
reason, otherwise IRQ2, IRQ8, and IRQ16~23 are allowed.
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
hw/i386/pc.c | 21 -
hw/i386
sysbus_create_xx func does not allow us to set a device's extra
properties. While hpet need to set its compat property before
initialization, so we abandon the wrapper function, and spread
its logic inline
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
hw/i386/pc.c| 11
For guest bug compat, we need to limit hpet's intcap on IRQ2
for pc-q35-1.7 and earlier. We use hpet's compat property to
indicate the PC version.
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index c6042c7..90f1ea4 100644
--- a/hw
On Thu, Oct 10, 2013 at 5:11 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 10/10/2013 09:56, Liu Ping Fan ha scritto:
On q35, IRQ2/8 can be reserved for hpet timer 0/1. And pin 16~23
of ioapic can be dynamically assigned to hpet as guest chooses.
So we introduce intcap property to do
On Thu, Oct 10, 2013 at 7:41 PM, Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Oct 10, 2013 at 11:46:42AM +0200, Paolo Bonzini wrote:
Il 10/10/2013 11:41, Michael S. Tsirkin ha scritto:
Are you sure? This is not done for any other compat property.
Paolo
It's done if we use the
On Fri, Oct 11, 2013 at 4:38 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 11/10/2013 04:59, liu ping fan ha scritto:
On Thu, Oct 10, 2013 at 7:41 PM, Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Oct 10, 2013 at 11:46:42AM +0200, Paolo Bonzini wrote:
Il 10/10/2013 11:41, Michael S
On Mon, Oct 14, 2013 at 10:18 PM, Michael S. Tsirkin m...@redhat.com wrote:
On Fri, Oct 11, 2013 at 10:59:40AM +0800, liu ping fan wrote:
On Thu, Oct 10, 2013 at 7:41 PM, Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Oct 10, 2013 at 11:46:42AM +0200, Paolo Bonzini wrote:
Il 10/10/2013 11
property compat to tell PC version
v5:
use stand compat property to fix hpet intcap on pc-q35, while on pc-piix,
hard code intcap as IRQ2
v4:
use stand compat property to fix hpet intcap
v3:
change hpet interrupt capablity on board's demand
Liu Ping Fan (4):
hpet: inverse polarity when pin
sysbus_create_xx func does not allow us to set a device's extra
properties. While hpet need to set its compat property before
initialization, so we abandon the wrapper function, and spread
its logic inline
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
hw/i386/pc.c| 11
of this inversion inside the hpet logic.
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
hw/timer/hpet.c | 14 --
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
index fcd22ae..8429eb3 100644
--- a/hw/timer/hpet.c
+++ b/hw/timer/hpet.c
On q35, IRQ2/8 can be reserved for hpet timer 0/1. And pin 16~23
of ioapic can be dynamically assigned to hpet as guest chooses.
So we introduce intcap property to do that. (currently, its value
is IRQ2. Later, it should be set by board.)
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
For pc-piix-*, hpet's intcap is always hard coded as IRQ2.
For q35, if it is pc-q35-1.7 and earlier, we use IRQ2 for compat
reason, otherwise IRQ2, IRQ8, and IRQ16~23 are allowed.
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
hw/i386/pc.c | 20 +++-
hw/i386
On Thu, Oct 17, 2013 at 1:44 PM, Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Oct 17, 2013 at 11:16:05AM +0800, Liu Ping Fan wrote:
For pc-piix-*, hpet's intcap is always hard coded as IRQ2.
For q35, if it is pc-q35-1.7 and earlier, we use IRQ2 for compat
reason, otherwise IRQ2, IRQ8
interrupt capablity on board's demand
Liu Ping Fan (2):
hpet: inverse polarity when pin above ISA_NUM_IRQS
hpet: enable to entitle more irq pins for hpet
hw/i386/pc.c | 19 ---
hw/i386/pc_piix.c| 3 ++-
hw/i386/pc_q35.c | 21 +
hw/timer
of this inversion inside the hpet logic.
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
hw/timer/hpet.c | 14 --
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
index fcd22ae..8429eb3 100644
--- a/hw/timer/hpet.c
+++ b/hw/timer/hpet.c
finally have the following
value for intcap: For piix, hpet's intcap is hard coded as IRQ2.
For pc-q35-1.7 and earlier, we use IRQ2 for compat reason. Otherwise
IRQ2, IRQ8, and IRQ16~23 are allowed.
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
hw/i386/pc.c | 19
ping? Any further comment?
Thanks
On Fri, Oct 18, 2013 at 12:00 PM, Liu Ping Fan qemul...@gmail.com wrote:
v8:
make piix/q35 compat diverge
simplify the code, use hpet_irqs to pass intcap value
v7:
use macro to define intcap in pc.h
(as to 3/4 and 4/4, I am not sure about whether
This series make slirp drivern directly by glib, so we can clean up
the hooks for slrip in mainloop and stub
Liu Ping Fan (2):
slirp: introduce gsource event abstraction
slirp: make slirp event dispatch based on slirp instance
main-loop.c | 6 ---
net/slirp.c | 3
Introduce struct SlirpGSource. It will ease the usage of GSource
associated with a group of files, which are dynamically allocated
and release for slirp.
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
slirp/Makefile.objs | 2 +-
slirp/slirp_gsource.c | 94
Each slirp instance has its own GFuncs, so we can driver slirp by glib main
loop.
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
For easing the review, This patch does not obey coding guide. Will fix
it later
---
main-loop.c | 6 ---
net/slirp.c | 3 ++
slirp
Hi Stefan,
Do you think this series is ready to be merged?
I have some code to run hpet on a dedicated thread, and in theory it
will rely on this.
Thanks and regards,
Pingfan
On Thu, Aug 29, 2013 at 10:42 PM, Stefan Hajnoczi stefa...@redhat.com wrote:
v3:
* Squashed Paolo's fixes and added
v5:
use stand compat property to fix hpet intcap on pc-q35, while on pc-piix,
hard code intcap as IRQ2
v4:
use stand compat property to fix hpet intcap
v3:
change hpet interrupt capablity on board's demand
Liu Ping Fan (5):
hpet: inverse polarity when pin above ISA_NUM_IRQS
hpet
On PC, IRQ2/8 can be reserved for hpet timer 0/1. And pin 16~23
of ioapic can be dynamically assigned to hpet as guest chooses.
(Will enable them after introducing pc 1.6 compat)
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
hw/timer/hpet.c | 13 +++--
1 file changed, 11
Ping Fan pingf...@linux.vnet.ibm.com
---
hw/timer/hpet.c | 14 --
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
index fcd22ae..8429eb3 100644
--- a/hw/timer/hpet.c
+++ b/hw/timer/hpet.c
@@ -198,13 +198,23 @@ static void update_irq(struct
sysbus_create_xx func does not allow us to set a device's extra
properties. While hpet need to set its compat property before
initialization, so we abandon the wrapper function, and spread
its logic inline
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
hw/i386/pc.c | 11
For pc-piix-*, hpet's intcap is always hard coded as IRQ2. While
for pc-q35-*, we resort to compat property to fix it (a later patch).
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
hw/i386/pc.c | 12
hw/i386/pc_piix.c| 3 ++-
hw/i386/pc_q35.c | 2
For guest bug compat, we limit hpet's interrupt compatibility on
ioapic's IRQ2 for pc-q35-1.6. As to pc-35-1.7 and newer, IRQ2, IRQ8,
and IRQ16~23 are allowed.
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
hw/timer/hpet.c | 7 ++-
include/hw/i386/pc.h | 4
2 files
Implement the routing of PC's interrupt gpio to intc, and
retrieve the gsi.
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
hw/core/qdev.c | 8
hw/i386/kvm/i8259.c| 8 +++-
hw/i386/kvm/ioapic.c | 21 -
hw/i386/pc_q35.c | 4
patches for timers.
And it is just for discussion. And code is premature.
Liu Ping Fan (5):
irq: introduce route method in IRQState to get gsi
irq: implement route method of ioapic
irqfd: equip irqfd with polarity
hpet: deliver irq by irqfd when in dedicated thread mode
hpet: run
in
qemu, and forward irq directly to kernel where re-entrance is already
allowed.
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
hw/core/irq.c| 39 +++
include/hw/irq.h | 5 +
2 files changed, 44 insertions(+)
diff --git a/hw/core/irq.c b/hw
Equip irqfd with polarity, so it can emulate the low-active interrupt.
We take one extra bit in flags to pass this info to kernel and keep
the default value zero as high-active.
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
The kernel will extend this interface correspondingly
migration is not supported yet.
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
hw/timer/hpet.c | 31 ++-
1 file changed, 30 insertions(+), 1 deletion(-)
diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
index ae54b87..8e32e36 100644
--- a/hw/timer/hpet.c
Running hpet in iothread, there could be variable payload, which
will finally affect the accurate of timing. So we want to run
hpet on dedicated thread.
For hpet, almost of the things can run out of BQL, except interrupt.
We step around interrupt by using irqfd.
Signed-off-by: Liu Ping Fan pingf
Nowadays, irqfd can emulate trigger mode, but it can not emulate
trigger polarity. While in some cases, ioapic ioredtbl[x] expects
_low_ active. So equipping irqfd with the ability. Correspondingly,
resamplefd will have the same polarity as irqfd.
Signed-off-by: Liu Ping Fan pingf
On Thu, Sep 12, 2013 at 2:29 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 12/09/2013 05:25, Liu Ping Fan ha scritto:
v5:
use stand compat property to fix hpet intcap on pc-q35, while on pc-piix,
hard code intcap as IRQ2
v4:
use stand compat property to fix hpet intcap
v3
On Thu, Sep 12, 2013 at 4:17 PM, Stefan Hajnoczi stefa...@gmail.com wrote:
On Thu, Sep 12, 2013 at 11:10:01AM +0800, liu ping fan wrote:
Do you think this series is ready to be merged?
I have some code to run hpet on a dedicated thread, and in theory it
will rely on this.
Yes, it is ready
On Wed, Sep 18, 2013 at 9:54 PM, Stefan Hajnoczi stefa...@gmail.com wrote:
On Tue, Aug 27, 2013 at 11:20:59AM +0800, Liu Ping Fan wrote:
Saw the Alex's patches has been merged, rebase mine onto his.
v3:
1. rename seqlock_read_check as seqlock_read_retry
2. Document timerlist were
race issue for qemu_clock_enable(foo,disable)
Liu Ping Fan (2):
timer: protect timers_state's clock with seqlock
timer: make qemu_clock_enable sync between disable and timer's cb
Paolo Bonzini (2):
seqlock: introduce read-write seqlock
qemu-thread: add QemuEvent
cpus.c
This lets the read-side access run outside the BQL.
Signed-off-by: Paolo Bonzini pbonz...@redhat.com
---
include/qemu/seqlock.h | 72 ++
1 file changed, 72 insertions(+)
create mode 100644 include/qemu/seqlock.h
diff --git
Lock rule: private lock innermost, ie BQL-this lock
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
cpus.c | 36 ++--
1 file changed, 30 insertions(+), 6 deletions(-)
diff --git a/cpus.c b/cpus.c
index e566297..870a832 100644
--- a/cpus.c
+++ b/cpus.c
This lets the read-side access run outside the BQL.
Signed-off-by: Paolo Bonzini pbonz...@redhat.com
---
include/qemu/seqlock.h | 72 ++
1 file changed, 72 insertions(+)
create mode 100644 include/qemu/seqlock.h
diff --git
.
And the callers of qemu_clock_enable() should be sync by themselves,
not protected by this patch.
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
include/qemu/timer.h | 4
qemu-timer.c | 20 +++-
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git
This emulates Win32 manual-reset events using futexes or conditional
variables. Typical ways to use them are with multi-producer,
single-consumer data structures, to test for a complex condition whose
elements come from different threads:
for (;;) {
qemu_event_reset(ev);
...
This is useful when pci assignment happens on sPAPR.
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
This patch will apply on patches which enable xics in kernel.
---
hw/intc/xics.c| 5 +
hw/ppc/spapr_pci.c| 14 ++
include/hw/ppc/xics.h | 1 +
3 files
On Mon, Sep 23, 2013 at 4:02 AM, Alexander Graf ag...@suse.de wrote:
Am 22.09.2013 um 13:47 schrieb Liu Ping Fan qemul...@gmail.com:
This is useful when pci assignment happens on sPAPR.
This patch doesn't sound useful on its own to me, thus probably belongs in a
greater patch set.
Yes, I
On Mon, Sep 23, 2013 at 9:59 AM, Alexey Kardashevskiy a...@ozlabs.ru wrote:
On 09/22/2013 09:47 PM, Liu Ping Fan wrote:
This is useful when pci assignment happens on sPAPR.
I have almost the same patch in my queue already, it will enable irqfd for
both INTX and MSI, I am just waiting till
On Mon, Sep 23, 2013 at 2:21 PM, Jan Kiszka jan.kis...@siemens.com wrote:
On 2013-09-22 10:11, Liu Ping Fan wrote:
This lets the read-side access run outside the BQL.
In fact, not only BQL. Didn't the original commit provide a changlog
about the content of this patch? Otherwise, briefly
On Mon, Sep 23, 2013 at 2:26 PM, Jan Kiszka jan.kis...@siemens.com wrote:
On 2013-09-22 10:11, Liu Ping Fan wrote:
After disabling the QemuClock, we should make sure that no QemuTimers
are still in flight. To implement that with light overhead, we resort
to QemuEvent. The caller of disabling
On Mon, Sep 23, 2013 at 2:21 PM, Jan Kiszka jan.kis...@siemens.com wrote:
On 2013-09-22 10:11, Liu Ping Fan wrote:
QEMU_CLOCK_VIRTUAL may be read outside BQL. This will make its
foundation, i.e. timers_state exposed to race condition.
Using private lock to protect it.
After this patch
qemu_event_wait(tl-ev).
v2:
1. fix comment in commit and code
2. fix race issue for qemu_clock_enable(foo,disable)
Liu Ping Fan (2):
timer: protect timers_state's clock with seqlock
timer: make qemu_clock_enable sync between disable and timer's cb
Paolo Bonzini (2):
seqlock
.
And the callers of qemu_clock_enable() should be sync by themselves,
not protected by this patch.
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
include/qemu/timer.h | 6 ++
qemu-timer.c | 21 -
2 files changed, 26 insertions(+), 1 deletion(-)
diff --git
From: Paolo Bonzini pbonz...@redhat.com
Seqlock implementation for QEMU. Usage idiom
reader:
do{
start = seqlock_read_begin()
}while(seqlock_read_try(start))
writer:
seqlock_write_lock()
...
seqlock_write_unlock()
initialization:
seqlock_init(QemuSeqLock *sl, QemuMutex *mutex)
From: Paolo Bonzini pbonz...@redhat.com
This emulates Win32 manual-reset events using futexes or conditional
variables. Typical ways to use them are with multi-producer,
single-consumer data structures, to test for a complex condition whose
elements come from different threads:
for (;;) {
Hi, is hpet orphan? Or who can help me to merge this patch-set if my
patch is fine.
Thanks.
On Thu, Sep 12, 2013 at 11:25 AM, Liu Ping Fan qemul...@gmail.com wrote:
v5:
use stand compat property to fix hpet intcap on pc-q35, while on pc-piix,
hard code intcap as IRQ2
v4:
use stand
on the BQL
Lock rule: private lock innermost, ie BQL-this lock
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
cpus.c | 41 +
include/qemu/timer.h | 2 ++
2 files changed, 35 insertions(+), 8 deletions(-)
diff --git a/cpus.c b/cpus.c
On Wed, Sep 25, 2013 at 2:20 PM, Liu Ping Fan qemul...@gmail.com wrote:
From: Paolo Bonzini pbonz...@redhat.com
Seqlock implementation for QEMU. Usage idiom
reader:
do{
start = seqlock_read_begin()
}while(seqlock_read_try(start))
writer:
seqlock_write_lock
On Wed, Sep 25, 2013 at 2:20 PM, Liu Ping Fan qemul...@gmail.com wrote:
From: Paolo Bonzini pbonz...@redhat.com
This emulates Win32 manual-reset events using futexes or conditional
variables. Typical ways to use them are with multi-producer,
single-consumer data structures, to test
On Sun, Sep 29, 2013 at 3:52 AM, Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Sep 12, 2013 at 11:25:14AM +0800, Liu Ping Fan wrote:
According to hpet spec, hpet irq is high active. But according to
ICH spec, there is inversion before the input of ioapic. So the OS
will expect low active
On Sun, Sep 29, 2013 at 3:56 AM, Michael S. Tsirkin m...@redhat.com wrote:
On Thu, Sep 12, 2013 at 11:25:15AM +0800, Liu Ping Fan wrote:
On PC, IRQ2/8 can be reserved for hpet timer 0/1. And pin 16~23
of ioapic can be dynamically assigned to hpet as guest chooses.
(Will enable them after
On Mon, Jul 22, 2013 at 2:28 PM, Jan Kiszka jan.kis...@siemens.com wrote:
On 2013-07-22 06:38, liu ping fan wrote:
On Sun, Jul 21, 2013 at 5:53 PM, Alex Bligh a...@alex.org.uk wrote:
Liu,
--On 21 July 2013 16:42:57 +0800 Liu Ping Fan qemul...@gmail.com wrote:
Currently, the timers run
On Mon, Jul 22, 2013 at 6:18 PM, liu ping fan qemul...@gmail.com wrote:
On Mon, Jul 22, 2013 at 5:40 PM, Alex Bligh a...@alex.org.uk wrote:
Liu,
--On 22 July 2013 12:38:02 +0800 liu ping fan qemul...@gmail.com wrote:
I read your second series, and try to summary the main different between
On Sun, Jul 21, 2013 at 5:55 PM, Alex Bligh a...@alex.org.uk wrote:
--On 21 July 2013 16:43:03 +0800 Liu Ping Fan qemul...@gmail.com wrote:
diff --git a/aio-posix.c b/aio-posix.c
index b68eccd..29c2769 100644
--- a/aio-posix.c
+++ b/aio-posix.c
@@ -191,6 +191,8 @@ bool aio_poll(AioContext
On Tue, Jul 23, 2013 at 6:30 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 23/07/2013 04:53, liu ping fan ha scritto:
The scenior I can figure out is if adopting timeout of poll, then when
changing the deadline, we need to invoke poll, and set the new
timeout, right?
Yes, you need to call
On Wed, Jul 24, 2013 at 2:42 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 24/07/2013 03:28, liu ping fan ha scritto:
On Tue, Jul 23, 2013 at 6:30 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 23/07/2013 04:53, liu ping fan ha scritto:
The scenior I can figure out is if adopting timeout
[...]
http://social.msdn.microsoft.com/Forums/vstudio/en-US/e8a7cb1e-9edd-4ee3-982e-f66b7bf6ae44/improve-accuracy-waitforsingleobject
suggest that WaitFor{Single,Multiple}Objects can have pretty
appalling latency anyway (100ms!), and there's no evidence that's
limited by making one of the FDs
problem (Thanks for Jan and Stefan)
fix process=true when aio_poll run timers (Thanks for Alex)
Liu Ping Fan (5):
timer: protect timers_state with lock
timer: pick out timer list info from QemuClock
timer: make qemu_clock_enable sync between disable and timer's cb
timer: associate three
After disabling the QemuClock, we should make sure that no QemuTimers
are still in flight. To implement that, the caller of disabling will
wait until the last user's exit.
Note, the callers of qemu_clock_enable() should be sync by themselves,
not protected by this patch.
Signed-off-by: Liu Ping
lock innermost, ie BQL-this lock
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
cpus.c | 26 +-
1 file changed, 21 insertions(+), 5 deletions(-)
diff --git a/cpus.c b/cpus.c
index 61e86a8..4af81e9 100644
--- a/cpus.c
+++ b/cpus.c
@@ -112,7 +112,9 @@ typedef
-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
qemu-timer.c | 106 ++-
1 file changed, 68 insertions(+), 38 deletions(-)
diff --git a/qemu-timer.c b/qemu-timer.c
index 9500d12..5a42035 100644
--- a/qemu-timer.c
+++ b/qemu-timer.c
@@ -30,6
later, we will run timers in aio_poll.
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
-- issue to fix ---
Note: before this patch, there should be another one to fix the race
issue by qemu_mod_timer() and _run_timers().
---
async.c | 9
include/block/aio.h | 13
Stop call timers in main loop and let each mini event-loop
run its own timers.
Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com
---
aio-posix.c | 2 ++
include/qemu/timer.h | 4 ++--
main-loop.c | 2 --
qemu-timer.c | 15 ++-
4 files changed, 14
On Mon, Jul 29, 2013 at 2:26 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 29/07/2013 05:16, Liu Ping Fan ha scritto:
In kvm mode, vm_clock may be read on AioContexts outside BQL(next
patch). This will make timers_state --the foundation of vm_clock
exposed to race condition. Using private
On Mon, Jul 29, 2013 at 2:30 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 29/07/2013 05:16, Liu Ping Fan ha scritto:
After disabling the QemuClock, we should make sure that no QemuTimers
are still in flight. To implement that, the caller of disabling will
wait until the last user's exit
On Mon, Jul 29, 2013 at 2:32 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 29/07/2013 05:16, Liu Ping Fan ha scritto:
Currently, timers run on iothread inside QBL, this limits the usage
of timers in some case, e.g. virtio-blk-dataplane. In order to run
timers on private thread based
On Mon, Jul 29, 2013 at 9:11 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 29/07/2013 10:20, liu ping fan ha scritto:
Another issue is that deadline computation is not using the AioContext's
timer lists.
Sorry, can not catch the meaning. When AioContext has its own timer
lists
On Mon, Jul 29, 2013 at 7:21 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 29/07/2013 10:10, liu ping fan ha scritto:
On Mon, Jul 29, 2013 at 2:30 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 29/07/2013 05:16, Liu Ping Fan ha scritto:
After disabling the QemuClock, we should make sure
On Mon, Jul 29, 2013 at 5:22 PM, Stefan Hajnoczi stefa...@gmail.com wrote:
On Mon, Jul 29, 2013 at 11:16:03AM +0800, Liu Ping Fan wrote:
summary of the model:
Three qemu-wide clock source allowed in system. And each AioContext has
three corresponding timer list to run timer against
On Tue, Jul 30, 2013 at 5:17 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 30/07/2013 04:42, liu ping fan ha scritto:
On Mon, Jul 29, 2013 at 7:21 PM, Paolo Bonzini pbonz...@redhat.com wrote:
Il 29/07/2013 10:10, liu ping fan ha scritto:
On Mon, Jul 29, 2013 at 2:30 PM, Paolo Bonzini pbonz
1 - 100 of 750 matches
Mail list logo