Re: [Qemu-devel] Help writing a trivial device

2011-09-27 Thread Zhi Yong Wu
2011/9/26 Lluís Vilanova vilan...@ac.upc.edu: Stefan Hajnoczi writes: On Mon, Sep 26, 2011 at 12:23:21AM +0200, Lluís Vilanova wrote: 1) Cannot start QEMU with KVM when the device is enabled: kvm_set_phys_mem: error registering slot: Invalid argument 2) The driver never gets called on a

Re: [Qemu-devel] Help writing a trivial device

2011-09-27 Thread Zhi Yong Wu
2011/9/26 Lluís Vilanova vilan...@ac.upc.edu: Hi. I started writing a trivial device on QEMU that should get called on every read and write on the memory it provides. The problems are that: 1) Cannot start QEMU with KVM when the device is enabled:       kvm_set_phys_mem: error registering

Re: [Qemu-devel] Help writing a trivial device

2011-09-27 Thread Avi Kivity
On 09/26/2011 03:54 PM, Lluís Vilanova wrote: It is the second bar that generates the problems with KVM: s-data_ptr = g_malloc(s-size); memory_region_init_ram_ptr(s-data,s-dev.qdev, backdoor.data, s-size, s-data_ptr); pci_register_bar(s-dev, 1,

Re: [Qemu-devel] [Qemu-ppc] [PATCH 50/58] pseries: Update SLOF firmware image

2011-09-27 Thread Alexander Graf
Am 27.09.2011 um 03:01 schrieb David Gibson d...@au1.ibm.com: On Sat, Sep 24, 2011 at 02:45:20PM +0200, Paolo Bonzini wrote: On 09/20/2011 05:40 AM, David Gibson wrote: Ah, yes, here's the point. Updating git.qemu.org is not within my power, so I can't myself construct a commit doing a

Re: [Qemu-devel] When the tlb_fill will be called from generated code?

2011-09-27 Thread Jan Kiszka
On 2011-09-27 06:15, 陳韋任 wrote: Hi, all The comment above tlb_fill says: /* try to fill the TLB and return an exception if error. If retaddr is NULL, it means that the function was called in C code (i.e. not from generated code or from helper.c) */ I see tlb_fill

Re: [Qemu-devel] [PATCH] tcg: Remove stack protection from helper functions

2011-09-27 Thread Peter Maydell
On 27 September 2011 05:29, Andi Kleen a...@firstfloor.org wrote: Peter Maydell peter.mayd...@linaro.org writes: The answer is that the edge cases basically never match. No CPU architecture does handling of NaNs and input denormals and output denormals and underflow checks and all the rest of

Re: [Qemu-devel] Help writing a trivial device

2011-09-27 Thread Stefan Hajnoczi
On Mon, Sep 26, 2011 at 08:03:12PM +0200, Lluís Vilanova wrote: #if 1 /* KVM doesn't like it */ s-data_ptr = g_malloc(s-size); memory_region_init_ram_ptr(s-data, s-dev.qdev, backdoor.data, s-size, s-data_ptr);

Re: [Qemu-devel] virtqueue corruption in emulation mode?

2011-09-27 Thread Stefan Hajnoczi
On Mon, Sep 26, 2011 at 07:16:56PM -0500, Sinha, Ani wrote: I am using the virtqueue (virtqueue_pop, virtqueue_push etc) in the emulated mode (non-kvm mode) from an IO thread (a separate thread different from main QEMU thread). What I am observing is that the virtqueue memory seems to get

Re: [Qemu-devel] Using iPXE with older qemu releases?

2011-09-27 Thread Stefan Hajnoczi
On Mon, Sep 26, 2011 at 02:22:21PM -0500, Kenton Cabiness wrote: Is there a way to point an older qemu release (currently running qemu-kvm-0.12.1.2-2.16) to iPXE products? We have built iPXE and installed the files and tested by changing the symbolic links in /usr/share/qemu-kvm (RH6.1

[Qemu-devel] [PATCH] tracetool: Omit useless QEMU_*_ENABLED() check

2011-09-27 Thread Stefan Hajnoczi
SystemTap provides a semaphore that can optionally be tested before executing a trace event. The purpose of this mechanism is to skip expensive tracing code when the trace event is disabled. For example, some applications may have trace events that format or convert strings for trace events.

Re: [Qemu-devel] [PATCH] fix qemu build with nas installed

2011-09-27 Thread Christoph Egger
On 09/21/11 12:16, Stefan Hajnoczi wrote: On Wed, Sep 21, 2011 at 10:34 AM, Christoph Egger christoph.eg...@amd.com wrote: When NAS (http://nas.sf.net) is installed then there is an existing audio/audio.h. Then when compiling qemu, #include audio/audio.h takes the one from NAS and causes the

Re: [Qemu-devel] [FYI] Soft feature freeze for 1.0 is 10/15 (three weeks away)

2011-09-27 Thread Avi Kivity
On 09/26/2011 09:07 PM, Blue Swirl wrote: The default address is used for early serial printk in OpenBIOS, so it should still work. Ok, so drop the extra mapping, but init the dynamic mapping to 0x80013000. That should work. It's already there (macio.c): if (macio_state-escc_mem)

Re: [Qemu-devel] [RFC] Generic image streaming

2011-09-27 Thread Stefan Hajnoczi
On Tue, Sep 27, 2011 at 11:26:45AM +0800, Zhi Yong Wu wrote: On Fri, Sep 23, 2011 at 11:57 PM, Stefan Hajnoczi stefa...@linux.vnet.ibm.com wrote: Here is my generic image streaming branch, which aims to provide a way to copy the contents of a backing file into an image file of a running

[Qemu-devel] [RFC][PATCH] Drop global lock during TCG code execution

2011-09-27 Thread Jan Kiszka
This finally allows TCG to benefit from the iothread introduction: Drop the global mutex while running pure TCG CPU code. Reacquire the lock when entering MMIO or PIO emulation, or when leaving the TCG loop. We have to revert a few optimization for the current TCG threading model, namely kicking

Re: [Qemu-devel] [PATCH] tracetool: Omit useless QEMU_*_ENABLED() check

2011-09-27 Thread Masami Hiramatsu
(2011/09/27 17:00), Stefan Hajnoczi wrote: SystemTap provides a semaphore that can optionally be tested before executing a trace event. The purpose of this mechanism is to skip expensive tracing code when the trace event is disabled. For example, some applications may have trace events that

Re: [Qemu-devel] [FYI] Soft feature freeze for 1.0 is 10/15 (three weeks away)

2011-09-27 Thread Avi Kivity
On 09/27/2011 11:33 AM, Avi Kivity wrote: On 09/26/2011 09:07 PM, Blue Swirl wrote: The default address is used for early serial printk in OpenBIOS, so it should still work. Ok, so drop the extra mapping, but init the dynamic mapping to 0x80013000. That should work. It's already

Re: [Qemu-devel] [RFC] Generic image streaming

2011-09-27 Thread Zhi Yong Wu
On Fri, Sep 23, 2011 at 11:57 PM, Stefan Hajnoczi stefa...@linux.vnet.ibm.com wrote: Here is my generic image streaming branch, which aims to provide a way to copy the contents of a backing file into an image file of a running guest without requiring specific support in the various block

Re: [Qemu-devel] [PATCH v3] memory: simple memory tree printer

2011-09-27 Thread Avi Kivity
On 09/26/2011 11:03 PM, Blue Swirl wrote: Add a monitor command 'info mtree' to show the memory hierarchy much like /proc/iomem in Linux. Thanks, applied. + +#ifdef TARGET_I386 +QTAILQ_INIT(ml_head); +mon_printf(f, I/O\n); +mtree_print_mr(mon_printf, f, address_space_io.root, 0,

[Qemu-devel] [PULL] VirtFS update

2011-09-27 Thread Aneesh Kumar K.V
The following changes since commit d85a1302a91912c52cdc3fe459b313848a8a0792: Merge remote-tracking branch 'kwolf/for-anthony' into staging (2011-09-22 10:31:26 -0500) are available in the git repository at: git://repo.or.cz/qemu/v9fs.git for-upstream-5 Aneesh Kumar K.V (8):

Re: [Qemu-devel] LPC2011 Virtualization Micro Conf

2011-09-27 Thread Jes Sorensen
Hi, For those who are interested, I have posted the notes from the 2011 Linux Plumbers Virtualization micro conference here: http://wiki.linuxplumbersconf.org/2011:virtualization Slides can be found by clicking on the presentation and going onto the Plumbers abstracts. Cheers, Jes

[Qemu-devel] [PATCH] slirp: Fix packet expiration

2011-09-27 Thread Thomas Huth
The two new variables arp_requested and expiration_date in the mbuf structure have been added after the variable-sized m_dat_ array. The variables have to be added before the m_dat_ array instead. Without this patch, the expiration_date gets clobbered by code that accesses the m_dat_ array. I

[Qemu-devel] [PATCH] ppc/e500_pci: Fix an array overflow issue

2011-09-27 Thread Liu Yu
Signed-off-by: Liu Yu yu@freescale.com --- hw/ppce500_pci.c | 26 -- 1 files changed, 16 insertions(+), 10 deletions(-) diff --git a/hw/ppce500_pci.c b/hw/ppce500_pci.c index 2db365d..3e24e85 100644 --- a/hw/ppce500_pci.c +++ b/hw/ppce500_pci.c @@ -108,15 +108,18 @@

Re: [Qemu-devel] [PATCH] slirp: Fix packet expiration

2011-09-27 Thread Jan Kiszka
On 2011-09-27 11:20, Thomas Huth wrote: The two new variables arp_requested and expiration_date in the mbuf structure have been added after the variable-sized m_dat_ array. The variables have to be added before the m_dat_ array instead. Without this patch, the expiration_date gets clobbered

Re: [Qemu-devel] [PATCH] slirp: Fix packet expiration

2011-09-27 Thread Fabien Chouteau
On 27/09/2011 11:20, Thomas Huth wrote: The two new variables arp_requested and expiration_date in the mbuf structure have been added after the variable-sized m_dat_ array. The variables have to be added before the m_dat_ array instead. Without this patch, the expiration_date gets clobbered

Re: [Qemu-devel] [PATCH] slirp: Fix packet expiration

2011-09-27 Thread Jan Kiszka
On 2011-09-27 12:56, Fabien Chouteau wrote: On 27/09/2011 11:20, Thomas Huth wrote: The two new variables arp_requested and expiration_date in the mbuf structure have been added after the variable-sized m_dat_ array. The variables have to be added before the m_dat_ array instead. Without

Re: [Qemu-devel] When the tlb_fill will be called from generated code?

2011-09-27 Thread 陳韋任
Hi, Jan You can find the answer yourself: Load qemu into gdb, set a breakpoint on that function and let it run. If you want to catch only the retaddr == NULL case, make the breakpoint conditional. Thanks for your tip. I see when retaddr != NULL, then the calling sequence of tlb_fill might

Re: [Qemu-devel] [PATCH] Changed the type of val argument of the function gt64120_writel() from uint32_t to uint64_t, so change the corresponding bswap32() to bswap64().

2011-09-27 Thread Peter Maydell
On 27 September 2011 02:20, Ray Wang rayw...@linux.vnet.ibm.com wrote: On 9/26/2011 5:46 PM, Peter Maydell wrote: I don't know this device, but this looks a bit suspicious. If you do a bswap64() on the value for a 32-bit write this will put the data into the high 32 bits and zeros into the low

[Qemu-devel] [PATCH qemu] e1000: CTRL.RST emulation

2011-09-27 Thread Michael S. Tsirkin
e1000 spec says CTRL.RST write should have the same effect as bus reset, except that is preserves PCI Config. Reset device registers and interrupts. Fix suggested by Andy Gospodarek a...@greyhouse.net Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/e1000.c | 97

Re: [Qemu-devel] When the tlb_fill will be called from generated code?

2011-09-27 Thread Max Filippov
I am not sure when/where __stl_mmu/__ldl_mmu are used. I do set They are called from the places in TBs where tcg_gen_qemu_{ld,st}{8,16,32,64}{u,s} were injected. breakpoint on __stl_mmu/__ldl_mmu, but the backtrace can only show something like, #0  __stl_mmu (addr=196608, val=0, mmu_idx=0)

Re: [Qemu-devel] [PATCH qemu] e1000: CTRL.RST emulation

2011-09-27 Thread Peter Maydell
On 27 September 2011 12:25, Michael S. Tsirkin m...@redhat.com wrote: e1000 spec says CTRL.RST write should have the same effect as bus reset, except that is preserves PCI Config. Reset device registers and interrupts. Fix suggested by Andy Gospodarek a...@greyhouse.net Doesn't this have the

Re: [Qemu-devel] [RFC] Generic image streaming

2011-09-27 Thread Stefan Hajnoczi
On Mon, Sep 26, 2011 at 3:21 PM, Stefan Hajnoczi stefa...@linux.vnet.ibm.com wrote: On Mon, Sep 26, 2011 at 09:35:01AM -0300, Marcelo Tosatti wrote: On Fri, Sep 23, 2011 at 04:57:26PM +0100, Stefan Hajnoczi wrote: Here is my generic image streaming branch, which aims to provide a way to copy

Re: [Qemu-devel] [PATCH] pseries: Refactor spapr irq allocation

2011-09-27 Thread Alexander Graf
On 16.09.2011, at 08:49, David Gibson wrote: Paulo Bonzini changed the original spapr code, which manually assigned irq numbers for each virtual device, to allocate them automatically from the device initialization. That allowed spapr virtual devices to be constructed with -device, which is

Re: [Qemu-devel] [PATCH qemu] e1000: CTRL.RST emulation

2011-09-27 Thread Michael S. Tsirkin
On Tue, Sep 27, 2011 at 12:50:21PM +0100, Peter Maydell wrote: On 27 September 2011 12:25, Michael S. Tsirkin m...@redhat.com wrote: e1000 spec says CTRL.RST write should have the same effect as bus reset, except that is preserves PCI Config. Reset device registers and interrupts. Fix

Re: [Qemu-devel] [PATCH v3] memory: simple memory tree printer

2011-09-27 Thread Jan Kiszka
On 2011-09-26 22:03, Blue Swirl wrote: Add a monitor command 'info mtree' to show the memory hierarchy much like /proc/iomem in Linux. Signed-off-by: Blue Swirl blauwir...@gmail.com --- The alias addresses are unbiased (PPC): -fffe : system 800a-800a : alias

Re: [Qemu-devel] [PATCH qemu] e1000: CTRL.RST emulation

2011-09-27 Thread Peter Maydell
On 27 September 2011 13:32, Michael S. Tsirkin m...@redhat.com wrote: On Tue, Sep 27, 2011 at 12:50:21PM +0100, Peter Maydell wrote: On 27 September 2011 12:25, Michael S. Tsirkin m...@redhat.com wrote: e1000 spec says CTRL.RST write should have the same effect as bus reset, except that is

[Qemu-devel] [PATCH] linux-user: implement reboot syscall

2011-09-27 Thread Alexander Graf
For OBS, we're running a full cross-guest inside of a VM. When a build is done there, we reboot the guest as shutdown mechanism. Unfortunately, reboot is not implemented in linux-user. So this mechanism fails, spilling unpretty warnings. This patch implements sys_reboot() emulation.

Re: [Qemu-devel] [PATCH] ppc/e500_pci: Fix an array overflow issue

2011-09-27 Thread Alexander Graf
On 27.09.2011, at 10:17, Liu Yu wrote: Signed-off-by: Liu Yu yu@freescale.com Patch description missing. Also, please always CC qemu-...@nongnu.org for patches concerning ppc. --- hw/ppce500_pci.c | 26 -- 1 files changed, 16 insertions(+), 10 deletions(-)

[Qemu-devel] [PATCH 1/2] e1000: minor reset code refactoring

2011-09-27 Thread Michael S. Tsirkin
Move reset callback to start of file to make it easier to reuse it elsewhere in code. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/e1000.c | 92 ++-- 1 files changed, 46 insertions(+), 46 deletions(-) diff --git a/hw/e1000.c

[Qemu-devel] [PATCH 0/2] e1000: reset handling

2011-09-27 Thread Michael S. Tsirkin
Here's a fix for e1000 reset as suggested by Andy Gospodarek and Anthony PERARD, written in a way that doesn't require forward declarations, and with reset clearing interrupts. Changes from v1: - value written was stored in CTRL register so it will be non 0 after reset. Notes: some internal

[Qemu-devel] [PATCH 2/2] e1000: CTRL.RST emulation

2011-09-27 Thread Michael S. Tsirkin
e1000 spec says CTRL.RST write should have the same effect as bus reset, except that is preserves PCI Config. Reset device registers and interrupts. Fix suggested by Andy Gospodarek a...@greyhouse.net Similar fix proposed by Anthony PERARD anthony.per...@citrix.com Signed-off-by: Michael S.

[Qemu-devel] [PATCH 1/3] memory: Print region priority

2011-09-27 Thread Jan Kiszka
Useful to discover eclipses. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- PS: Current memory/master requires an obvious build fix (central definition of some types), but I assume you already have a patch in your tree. memory.c |6 -- 1 files changed, 4 insertions(+), 2

[Qemu-devel] [PATCH 2/3] memory: Do not print empty PIO root

2011-09-27 Thread Jan Kiszka
Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- memory.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/memory.c b/memory.c index 4c190e5..24c5abd 100644 --- a/memory.c +++ b/memory.c @@ -1414,7 +1414,10 @@ void mtree_info(fprintf_function mon_printf, void

[Qemu-devel] [PATCH 3/3] memory: Print regions in ascending order

2011-09-27 Thread Jan Kiszka
Makes reading the output more user friendly. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- memory.c | 37 +++-- 1 files changed, 31 insertions(+), 6 deletions(-) diff --git a/memory.c b/memory.c index 24c5abd..6ff78cb 100644 --- a/memory.c +++ b/memory.c

Re: [Qemu-devel] How to run realview-pbx-a9 image in qemu

2011-09-27 Thread loody
hi: 2011/7/12 Xiao Jiang jgq...@gmail.com: David Gilbert wrote: On 12 July 2011 07:04, Xiao Jiang jgq...@gmail.com wrote: It looks like I am not in luck, qemu still can't run successfully. I recompiled the qemu from linaro qemu tree and executed below instructions in order. 1. open

Re: [Qemu-devel] Help writing a trivial device

2011-09-27 Thread Lluís Vilanova
Stefan Hajnoczi writes: On Mon, Sep 26, 2011 at 08:03:12PM +0200, Lluís Vilanova wrote: #if 1 /* KVM doesn't like it */ s- data_ptr = g_malloc(s-size); memory_region_init_ram_ptr(s-data, s-dev.qdev, backdoor.data, s- size,

Re: [Qemu-devel] Help writing a trivial device

2011-09-27 Thread Lluís Vilanova
Zhi Yong Wu writes: 2011/9/26 Lluís Vilanova vilan...@ac.upc.edu: The testing system is a Linux 2.6.32, with this: int fd = open(/sys/devices/pci:00/00:00:004.00/resource0, O_RDWR); void *addr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); printf(- %ld\n,

Re: [Qemu-devel] [PATCH qemu] e1000: CTRL.RST emulation

2011-09-27 Thread Michael S. Tsirkin
On Tue, Sep 27, 2011 at 01:39:17PM +0100, Peter Maydell wrote: On 27 September 2011 13:32, Michael S. Tsirkin m...@redhat.com wrote: On Tue, Sep 27, 2011 at 12:50:21PM +0100, Peter Maydell wrote: On 27 September 2011 12:25, Michael S. Tsirkin m...@redhat.com wrote: e1000 spec says CTRL.RST

[Qemu-devel] [PATCH] Add stdio char device on windows

2011-09-27 Thread Fabien Chouteau
Simple implementation of an stdio char device on Windows. Signed-off-by: Fabien Chouteau chout...@adacore.com --- qemu-char.c | 195 ++- 1 files changed, 193 insertions(+), 2 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index

Re: [Qemu-devel] How to run realview-pbx-a9 image in qemu

2011-09-27 Thread David Gilbert
On 27 September 2011 14:01, loody milo...@gmail.com wrote: hi: snip Would you mind to let me know which configs you use to compile for a9 running on qemu? Kernel configs? I mostly use prebuilt kernels from the Linaro images. Dave

Re: [Qemu-devel] The reason behind block linking constraint?

2011-09-27 Thread Rob Landley
On 09/26/2011 10:13 PM, 陳韋任 wrote: Hi, Rob Is it just because we cannot optimize block linking which crosses page boundary, or there are some correctness/safety issues should be considered? If we link a TB with another TB from the different page, then the second TB may disappear when the

Re: [Qemu-devel] [PATCH] Add stdio char device on windows

2011-09-27 Thread Paolo Bonzini
On 09/27/2011 03:14 PM, Fabien Chouteau wrote: +/* Some terminal emulator returns \r\n for Enter, just pass \n */ +if (win_stdio_buf == '\r') { +continue; +} Does the \r actually do any damage? +static void qemu_chr_set_echo_win_stdio(CharDriverState *chr,

Re: [Qemu-devel] How to run realview-pbx-a9 image in qemu

2011-09-27 Thread loody
hi dave: 2011/9/27 David Gilbert david.gilb...@linaro.org: On 27 September 2011 14:01, loody milo...@gmail.com wrote: hi: snip Would you mind to let me know which configs you use to compile for a9 running on qemu? Kernel configs?  I mostly use prebuilt kernels from the Linaro images.

Re: [Qemu-devel] KVM call agenda for September 26

2011-09-27 Thread Juan Quintela
Juan Quintela quint...@redhat.com wrote: Hi Please send in any agenda items you are interested in covering. Thanks, Juan. As there are no agenda for today, call gets cancelled. Happy hacking, Juan.

[Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO

2011-09-27 Thread Jan Kiszka
Move qemu_eventfd unmodified to oslib-posix and use it for signaling POSIX AIO completions. If native eventfd suport is available, this avoids multiple read accesses to drain multiple pending signals. As before we use a pipe if eventfd is not supported. Signed-off-by: Jan Kiszka

Re: [Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO

2011-09-27 Thread Anthony Liguori
On 09/27/2011 08:56 AM, Jan Kiszka wrote: Move qemu_eventfd unmodified to oslib-posix and use it for signaling POSIX AIO completions. If native eventfd suport is available, this avoids multiple read accesses to drain multiple pending signals. As before we use a pipe if eventfd is not supported.

Re: [Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO

2011-09-27 Thread Avi Kivity
On 09/27/2011 05:07 PM, Anthony Liguori wrote: You don't expect to handle EAGAIN with eventfd() whereas you have to handle it with pipe(). Moreover, the eventfd() counter is not lossy (practically speaking) whereas if you use pipe() as a counter, it will be lossy in practice. This is why

Re: [Qemu-devel] [PATCH] Add stdio char device on windows

2011-09-27 Thread Fabien Chouteau
On 27/09/2011 15:31, Paolo Bonzini wrote: On 09/27/2011 03:14 PM, Fabien Chouteau wrote: +/* Some terminal emulator returns \r\n for Enter, just pass \n */ +if (win_stdio_buf == '\r') { +continue; +} Does the \r actually do any damage? It's just more

Re: [Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO

2011-09-27 Thread Anthony Liguori
On 09/27/2011 09:11 AM, Avi Kivity wrote: On 09/27/2011 05:07 PM, Anthony Liguori wrote: You don't expect to handle EAGAIN with eventfd() whereas you have to handle it with pipe(). Moreover, the eventfd() counter is not lossy (practically speaking) whereas if you use pipe() as a counter, it

Re: [Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO

2011-09-27 Thread Avi Kivity
On 09/27/2011 05:19 PM, Anthony Liguori wrote: qemu_event_create() qemu_event_signal() qemu_event_wait() qemu_event_poll_add() // registers in main loop qemu_event_poll_del() See hw/event_notifier.[ch]. Precisely. -- error compiling committee.c: too many arguments to function

Re: [Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO

2011-09-27 Thread Jan Kiszka
On 2011-09-27 16:19, Anthony Liguori wrote: On 09/27/2011 09:11 AM, Avi Kivity wrote: On 09/27/2011 05:07 PM, Anthony Liguori wrote: You don't expect to handle EAGAIN with eventfd() whereas you have to handle it with pipe(). Moreover, the eventfd() counter is not lossy (practically

[Qemu-devel] [PATCH] event_notifier: move to top-level directory

2011-09-27 Thread Avi Kivity
Has no business in hw/. Signed-off-by: Avi Kivity a...@redhat.com --- hw/event_notifier.c = event_notifier.c |1 - hw/event_notifier.h = event_notifier.h |0 2 files changed, 0 insertions(+), 1 deletions(-) rename hw/event_notifier.c = event_notifier.c (98%) rename hw/event_notifier.h

Re: [Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO

2011-09-27 Thread Jan Kiszka
On 2011-09-27 16:07, Anthony Liguori wrote: On 09/27/2011 08:56 AM, Jan Kiszka wrote: Move qemu_eventfd unmodified to oslib-posix and use it for signaling POSIX AIO completions. If native eventfd suport is available, this avoids multiple read accesses to drain multiple pending signals. As

Re: [Qemu-devel] [PATCH qemu] e1000: CTRL.RST emulation

2011-09-27 Thread Anthony Liguori
On 09/27/2011 06:50 AM, Peter Maydell wrote: On 27 September 2011 12:25, Michael S. Tsirkinm...@redhat.com wrote: e1000 spec says CTRL.RST write should have the same effect as bus reset, except that is preserves PCI Config. Reset device registers and interrupts. Fix suggested by Andy

Re: [Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO

2011-09-27 Thread Avi Kivity
On 09/27/2011 05:29 PM, Jan Kiszka wrote: Moreover, the eventfd() counter is not lossy (practically speaking) whereas if you use pipe() as a counter, it will be lossy in practice. This is why posix aio uses pipe() and not eventfd(). I don't get this yet. eventfd is lossy by default. It

Re: [Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO

2011-09-27 Thread Anthony Liguori
On 09/27/2011 09:29 AM, Jan Kiszka wrote: On 2011-09-27 16:07, Anthony Liguori wrote: On 09/27/2011 08:56 AM, Jan Kiszka wrote: Move qemu_eventfd unmodified to oslib-posix and use it for signaling POSIX AIO completions. If native eventfd suport is available, this avoids multiple read accesses

Re: [Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO

2011-09-27 Thread Jan Kiszka
On 2011-09-27 16:34, Avi Kivity wrote: On 09/27/2011 05:29 PM, Jan Kiszka wrote: Moreover, the eventfd() counter is not lossy (practically speaking) whereas if you use pipe() as a counter, it will be lossy in practice. This is why posix aio uses pipe() and not eventfd(). I don't get

Re: [Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO

2011-09-27 Thread Anthony Liguori
On 09/27/2011 09:22 AM, Jan Kiszka wrote: On 2011-09-27 16:19, Anthony Liguori wrote: On 09/27/2011 09:11 AM, Avi Kivity wrote: On 09/27/2011 05:07 PM, Anthony Liguori wrote: You don't expect to handle EAGAIN with eventfd() whereas you have to handle it with pipe(). Moreover, the eventfd()

Re: [Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO

2011-09-27 Thread Paolo Bonzini
On 09/27/2011 04:07 PM, Anthony Liguori wrote: I think it's a bit dangerous to implement eventfd() in terms of pipe(). You don't expect to handle EAGAIN with eventfd() whereas you have to handle it with pipe(). Moreover, the eventfd() counter is not lossy (practically speaking) whereas if you

Re: [Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO

2011-09-27 Thread Avi Kivity
On 09/27/2011 05:36 PM, Jan Kiszka wrote: On 2011-09-27 16:34, Avi Kivity wrote: On 09/27/2011 05:29 PM, Jan Kiszka wrote: Moreover, the eventfd() counter is not lossy (practically speaking) whereas if you use pipe() as a counter, it will be lossy in practice. This is why posix aio

Re: [Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO

2011-09-27 Thread Jan Kiszka
On 2011-09-27 16:42, Avi Kivity wrote: On 09/27/2011 05:36 PM, Jan Kiszka wrote: On 2011-09-27 16:34, Avi Kivity wrote: On 09/27/2011 05:29 PM, Jan Kiszka wrote: Moreover, the eventfd() counter is not lossy (practically speaking) whereas if you use pipe() as a counter, it will be

Re: [Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO

2011-09-27 Thread Avi Kivity
On 09/27/2011 05:45 PM, Jan Kiszka wrote: I don't disagree that there is still room for improving the existing interface, generalizing to qemu_event. But that's not in the scope of this patch. Why not use event_notify.c? -- error compiling committee.c: too many arguments to function

Re: [Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO

2011-09-27 Thread Jan Kiszka
On 2011-09-27 16:48, Avi Kivity wrote: On 09/27/2011 05:45 PM, Jan Kiszka wrote: I don't disagree that there is still room for improving the existing interface, generalizing to qemu_event. But that's not in the scope of this patch. Why not use event_notify.c? It doesn't solve the wrapping

[Qemu-devel] [PATCH V10 2/5] Add TPM (frontend) hardware interface (TPM TIS) to Qemu

2011-09-27 Thread Stefan Berger
This patch adds the main code of the TPM frontend driver, the TPM TIS interface, to Qemu. The code is largely based on the previous implementation for Xen but has been significantly extended to meet the standard's requirements, such as the support for changing of localities and all the

[Qemu-devel] [PATCH V10 3/5] Add a debug register

2011-09-27 Thread Stefan Berger
This patch uses the possibility to add a vendor-specific register and adds a debug register useful for dumping the TIS's internal state. This register is only active in a debug build (#define DEBUG_TIS). v9: - prefixing all function with tpm_tis_ and all constants with TPM_TIS_ v3: - all

[Qemu-devel] [PATCH V10 4/5] Build the TPM frontend code

2011-09-27 Thread Stefan Berger
Build the TPM frontend code that has been added so far. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- Makefile.target |1 + configure | 11 +++ 2 files changed, 12 insertions(+) Index: qemu-git.pt/Makefile.target

[Qemu-devel] [PATCH V10 1/5] Support for TPM command line options

2011-09-27 Thread Stefan Berger
This patch adds support for TPM command line options. The command line options supported here are ./qemu-... -tpmdev passthrough,path=path to TPM device,id=id -device tpm-tis,tpmdev=id and ./qemu-... -tpmdev ? where the latter works similar to -soundhw ? and shows a list of

[Qemu-devel] [PATCH V10 5/5] Add a TPM Passthrough backend driver implementation

2011-09-27 Thread Stefan Berger
From Andreas Niederl's original posting with adaptations where necessary: This patch is based of off version 9 of Stefan Berger's patch series Qemu Trusted Platform Module (TPM) integration and adds a new backend driver for it. This patch adds a passthrough backend driver for passing commands

[Qemu-devel] [PATCH V10 0/5] Qemu Trusted Platform Module (TPM) integration

2011-09-27 Thread Stefan Berger
The following series of patches adds TPM (Trusted Platform Module) support to Qemu. An emulator for the TIS (TPM Interface Spec) interface is added that provides the basis for accessing a 'backend' implementing the actual TPM functionality. The TIS emulator serves as a 'frontend' enabling for

Re: [Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO

2011-09-27 Thread Avi Kivity
On 09/27/2011 05:50 PM, Jan Kiszka wrote: On 2011-09-27 16:48, Avi Kivity wrote: On 09/27/2011 05:45 PM, Jan Kiszka wrote: I don't disagree that there is still room for improving the existing interface, generalizing to qemu_event. But that's not in the scope of this patch. Why not

Re: [Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO

2011-09-27 Thread Anthony Liguori
On 09/27/2011 09:54 AM, Avi Kivity wrote: On 09/27/2011 05:50 PM, Jan Kiszka wrote: On 2011-09-27 16:48, Avi Kivity wrote: On 09/27/2011 05:45 PM, Jan Kiszka wrote: I don't disagree that there is still room for improving the existing interface, generalizing to qemu_event. But that's not in

Re: [Qemu-devel] [PATCH] Use qemu_eventfd for POSIX AIO

2011-09-27 Thread Jan Kiszka
On 2011-09-27 16:54, Avi Kivity wrote: On 09/27/2011 05:50 PM, Jan Kiszka wrote: On 2011-09-27 16:48, Avi Kivity wrote: On 09/27/2011 05:45 PM, Jan Kiszka wrote: I don't disagree that there is still room for improving the existing interface, generalizing to qemu_event. But that's not in

[Qemu-devel] Try to integrate the Xen PCI Passthrough code into linux: have pci_regs conflict with libpci.

2011-09-27 Thread Anthony PERARD
Hi, I'm trying to integrate the Xen PCI Passthrough code into Qemu. But we use libpci, and it's not friendly with pci_regs.h. So can I replace pci_regs by the libpci one? Should I avoid to include both? (by having a hook the libpci functions) Or do you have any other suggestions? Thanks,

Re: [Qemu-devel] [PATCH 5/7] target-mips:Support for Cavium specific instructions

2011-09-27 Thread Richard Henderson
On 09/26/2011 09:17 PM, kha...@kics.edu.pk wrote: +switch (opc) { +case OPC_SEQI: +tcg_gen_setcondi_tl(TCG_COND_LT, cpu_gpr[rt], t0, 1); +opn = seqi; +break; +case OPC_SNEI: +tcg_gen_setcondi_tl(TCG_COND_GT, cpu_gpr[rt], t0, 0); +opn =

Re: [Qemu-devel] [PATCH] event_notifier: move to top-level directory

2011-09-27 Thread Stefan Hajnoczi
On Tue, Sep 27, 2011 at 3:26 PM, Avi Kivity a...@redhat.com wrote: Has no business in hw/. Signed-off-by: Avi Kivity a...@redhat.com ---  hw/event_notifier.c = event_notifier.c |    1 -  hw/event_notifier.h = event_notifier.h |    0  2 files changed, 0 insertions(+), 1 deletions(-)  rename

Re: [Qemu-devel] Try to integrate the Xen PCI Passthrough code into linux: have pci_regs conflict with libpci.

2011-09-27 Thread Michael S. Tsirkin
On Tue, Sep 27, 2011 at 04:02:23PM +0100, Anthony PERARD wrote: Hi, I'm trying to integrate the Xen PCI Passthrough code into Qemu. But we use libpci, and it's not friendly with pci_regs.h. So can I replace pci_regs by the libpci one? I prefer sticking to pci_regs in linux. Should I

Re: [Qemu-devel] [PATCH] target-i386: Remove redundant word mask in port out instructions

2011-09-27 Thread Richard Henderson
On 09/26/2011 10:20 AM, Jan Kiszka wrote: T0 was already masked to 16 bits when loading it. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Reviewed-by: Richard Henderson r...@twiddle.net r~

Re: [Qemu-devel] [PATCH] event_notifier: move to top-level directory

2011-09-27 Thread Jan Kiszka
On 2011-09-27 17:17, Stefan Hajnoczi wrote: On Tue, Sep 27, 2011 at 3:26 PM, Avi Kivity a...@redhat.com wrote: Has no business in hw/. Signed-off-by: Avi Kivity a...@redhat.com --- hw/event_notifier.c = event_notifier.c |1 - hw/event_notifier.h = event_notifier.h |0 2 files

Re: [Qemu-devel] [PATCH 0/6] Alpha system emulation, v11

2011-09-27 Thread Richard Henderson
Ping. r~ On 09/22/2011 09:04 AM, Edgar E. Iglesias wrote: On Thu, Sep 22, 2011 at 08:30:43AM -0700, Richard Henderson wrote: Changes v10 - v11: * Fixes for icount, based on feedback from Peter and Edgar. * Re-based against master. The patch set is also available at

Re: [Qemu-devel] [PATCH 2/2] e1000: CTRL.RST emulation

2011-09-27 Thread Andy Gospodarek
On Tue, Sep 27, 2011 at 8:58 AM, Michael S. Tsirkin m...@redhat.com wrote: e1000 spec says CTRL.RST write should have the same effect as bus reset, except that is preserves PCI Config. Reset device registers and interrupts. Fix suggested by Andy Gospodarek a...@greyhouse.net Similar fix

[Qemu-devel] [PATCH V2] Add stdio char device on windows

2011-09-27 Thread Fabien Chouteau
Simple implementation of an stdio char device on Windows. Signed-off-by: Fabien Chouteau chout...@adacore.com --- qemu-char.c | 199 ++- 1 files changed, 197 insertions(+), 2 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index

Re: [Qemu-devel] [PATCH 24/58] PPC: E500: Add PV spinning code

2011-09-27 Thread Blue Swirl
On Mon, Sep 26, 2011 at 11:19 PM, Scott Wood scottw...@freescale.com wrote: On 09/24/2011 05:00 AM, Alexander Graf wrote: On 24.09.2011, at 10:44, Blue Swirl wrote: On Sat, Sep 24, 2011 at 8:03 AM, Alexander Graf ag...@suse.de wrote: On 24.09.2011, at 09:41, Blue Swirl wrote: On Mon, Sep 19,

Re: [Qemu-devel] [PATCH 24/58] PPC: E500: Add PV spinning code

2011-09-27 Thread Alexander Graf
On 27.09.2011, at 17:50, Blue Swirl wrote: On Mon, Sep 26, 2011 at 11:19 PM, Scott Wood scottw...@freescale.com wrote: On 09/24/2011 05:00 AM, Alexander Graf wrote: On 24.09.2011, at 10:44, Blue Swirl wrote: On Sat, Sep 24, 2011 at 8:03 AM, Alexander Graf ag...@suse.de wrote: On 24.09.2011,

[Qemu-devel] [PATCH] Move filedescriptor parsing code from net.c into qemu_parse_fd()

2011-09-27 Thread Stefan Berger
Move the parsing of a filedescriptor into a common function qemu_parse_fd(). Have the code in net.c call this function. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- net.c |8 ++-- qemu-char.c | 12 qemu-char.h |2 ++ 3 files changed, 16

Re: [Qemu-devel] [PATCH] event_notifier: move to top-level directory

2011-09-27 Thread Anthony Liguori
On 09/27/2011 10:28 AM, Jan Kiszka wrote: On 2011-09-27 17:17, Stefan Hajnoczi wrote: On Tue, Sep 27, 2011 at 3:26 PM, Avi Kivitya...@redhat.com wrote: Has no business in hw/. Signed-off-by: Avi Kivitya...@redhat.com --- hw/event_notifier.c = event_notifier.c |1 -

Re: [Qemu-devel] [Xen-devel] Re: Try to integrate the Xen PCI Passthrough code into linux: have pci_regs conflict with libpci.

2011-09-27 Thread Anthony PERARD
On Tue, Sep 27, 2011 at 16:20, Michael S. Tsirkin m...@redhat.com wrote: On Tue, Sep 27, 2011 at 04:02:23PM +0100, Anthony PERARD wrote: Hi, I'm trying to integrate the Xen PCI Passthrough code into Qemu. But we use libpci, and it's not friendly with pci_regs.h. So can I replace pci_regs by

[Qemu-devel] [PATCH 01/12] qemu-timer: remove active_timers array

2011-09-27 Thread Paolo Bonzini
Embed the list in the QEMUClock instead. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- qemu-timer.c | 59 +++-- 1 files changed, 28 insertions(+), 31 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index ad1fc8b..acf7a15 100644

Re: [Qemu-devel] [PATCH 1/5] qemu-char: make qemu_chr_event public

2011-09-27 Thread Hans de Goede
Hi, On 08/12/2011 03:57 PM, Anthony Liguori wrote: On 08/11/2011 07:25 AM, Hans de Goede wrote: Make qemu_chr_event public so that it can be used by chardev code which lives outside of qemu-char.c Normally, qemu_chr_generic_open() would be used to do this. Of course, there is no

Re: [Qemu-devel] [PATCH] event_notifier: move to top-level directory

2011-09-27 Thread Paolo Bonzini
On 09/27/2011 06:05 PM, Anthony Liguori wrote: Actually, for posix-aio, we can just switch to using g_idle_add(). g_idle_add() uses g_source_attach which is thread safe. g_idle_add() gives you a thread safe mechanism to defer a piece of work to the main loop which is really what we want here.

Re: [Qemu-devel] [FYI] Soft feature freeze for 1.0 is 10/15 (three weeks away)

2011-09-27 Thread Blue Swirl
On Tue, Sep 27, 2011 at 8:57 AM, Avi Kivity a...@redhat.com wrote: On 09/27/2011 11:33 AM, Avi Kivity wrote: On 09/26/2011 09:07 PM, Blue Swirl wrote:  The default address is used for early serial printk in OpenBIOS, so it  should still work.  Ok, so drop the extra mapping, but init

Re: [Qemu-devel] [FYI] Soft feature freeze for 1.0 is 10/15 (three weeks away)

2011-09-27 Thread Avi Kivity
On 09/27/2011 07:39 PM, Blue Swirl wrote: Well, it's not that easy. As the other mapping is part of an ordinary BAR, you need to setup the device (at least PCI_COMMAND and PCI_BASE_ADDRESS_0) so it responds to memory requests, and also enable the bridge. We could hack it by having a

  1   2   >