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

2011-09-26 Thread Blue Swirl
Add a monitor command 'info mtree' to show the memory hierarchy much like /proc/iomem in Linux. Signed-off-by: Blue Swirl --- The alias addresses are unbiased (PPC): -fffe : system 800a-800a : alias vga.chain4 @vga.vram - 8088-808f : macio 808e0

Re: [Qemu-devel] [PATCH V9 5/5] Add a TPM Passthrough backend driver implementation

2011-09-26 Thread Stefan Berger
On 09/26/2011 03:20 PM, Michael S. Tsirkin wrote: On Mon, Sep 26, 2011 at 12:35:14PM -0400, Stefan Berger wrote: > 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

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

2011-09-26 Thread Peter Maydell
On 26 September 2011 20:52, Avi Kivity wrote: > Why do floating point ops need helpers?  At least if all the edge cases > match? (i.e. NaNs and denormals) The answer is that the edge cases basically never match. No CPU architecture does handling of NaNs and input denormals and output denormals an

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

2011-09-26 Thread Avi Kivity
On 09/26/2011 10:53 PM, Richard Henderson wrote: On 09/26/2011 12:52 PM, Avi Kivity wrote: > Why do floating point ops need helpers? Because TCG doesn't do any native floating point. Well, it could be made to do it. -- I have a truly marvellous patch that fixes the bug which this signature

Re: [Qemu-devel] [PATCH V9 5/5] Add a TPM Passthrough backend driver implementation

2011-09-26 Thread Michael S. Tsirkin
On Mon, Sep 26, 2011 at 04:12:19PM -0400, Stefan Berger wrote: > >It's usually a good idea to allow passing the fd through > >a unix file descriptor or command line. net has some code > >for that, that can be generalized. Good for security > >separation. It does not have to be part of this patch th

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

2011-09-26 Thread Avi Kivity
On 09/26/2011 11:19 PM, Peter Maydell wrote: On 26 September 2011 20:52, Avi Kivity wrote: > Why do floating point ops need helpers? At least if all the edge cases > match? (i.e. NaNs and denormals) The answer is that the edge cases basically never match. Surely they do when host == target

Re: [Qemu-devel] RFC [v2]: vfio / device assignment -- layout of device fd files

2011-09-26 Thread Alex Williamson
On Mon, 2011-09-26 at 15:03 -0500, Stuart Yoder wrote: > > > > The other obvious possibility is a pure ioctl interface. To match what > > this proposal is trying to describe, plus the runtime interfaces, we'd > > need something like: > > > > /* :0 - PCI devices, :1 - Devices path device, 63:2 - re

[Qemu-devel] [PATCH v3 0/6]: block: Add I/O status support

2011-09-26 Thread Luiz Capitulino
This series adds support to the block layer to keep track of devices' I/O status. That information is also made available in QMP and HMP. The goal here is to allow management applications that miss the BLOCK_IO_ERROR event to able to query the VM to determine if any device has caused the VM to sto

[Qemu-devel] [PATCH 3/6] ide: Support I/O status

2011-09-26 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- hw/ide/core.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 4e76fc7..9ec1310 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -528,6 +528,7 @@ static int ide_handle_rw_error(IDEState *s, int error,

[Qemu-devel] [PATCH 2/6] virtio: Support I/O status

2011-09-26 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- hw/virtio-blk.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index daa8e42..bd63a85 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -78,6 +78,7 @@ static int virtio_blk_handle_rw_error(VirtIOBl

[Qemu-devel] [PATCH 6/6] HMP: Print 'io-status' information

2011-09-26 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- block.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index 7053c80..061b4cc 100644 --- a/block.c +++ b/block.c @@ -1866,6 +1866,11 @@ static void bdrv_print_dict(QObject *obj, void *opaque) monitor_print

[Qemu-devel] [PATCH 5/6] QMP: query-status: Add 'io-status' key

2011-09-26 Thread Luiz Capitulino
Contains the I/O status for the given device. The key is only present if the device supports it and the VM is configured to stop on errors. Please, check the documentation being added in this commit for more information. Signed-off-by: Luiz Capitulino --- block.c | 12 qm

[Qemu-devel] [PATCH 4/6] scsi: Support I/O status

2011-09-26 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- hw/scsi-disk.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index e843f71..a980a53 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -228,6 +228,7 @@ static int scsi_handle_rw_error(SCSIDiskReq *r, i

[Qemu-devel] [PATCH 1/6] block: Keep track of devices' I/O status

2011-09-26 Thread Luiz Capitulino
This commit adds support to the BlockDriverState type to keep track of devices' I/O status. There are three possible status: BDRV_IOS_OK (no error), BDRV_IOS_ENOSPC (no space error) and BDRV_IOS_FAILED (any other error). The distinction between no space and other errors is important because a mana

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

2011-09-26 Thread Scott Wood
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 wrote: >>> On 24.09.2011, at 09:41, Blue Swirl wrote: On Mon, Sep 19, 2011 at 4:12 PM, Scott Wood wrote: > The goal with the spin table stuf

Re: [Qemu-devel] [PATCH V9 1/5] Support for TPM command line options

2011-09-26 Thread Stefan Berger
On 09/26/2011 03:03 PM, Michael S. Tsirkin wrote: On Mon, Sep 26, 2011 at 12:35:10PM -0400, Stefan Berger wrote: +void tpm_display_backend_drivers(FILE *out) +{ +int i; + +fprintf(out, "Supported TPM types (choose only one):\n"); + +for (i = 0; bes[i] != NULL; i++) { +fprintf

Re: [Qemu-devel] RFC [v2]: vfio / device assignment -- layout of device fd files

2011-09-26 Thread Scott Wood
On 09/26/2011 01:34 PM, Alex Williamson wrote: > The other obvious possibility is a pure ioctl interface. To match what > this proposal is trying to describe, plus the runtime interfaces, we'd > need something like: > > /* :0 - PCI devices, :1 - Devices path device, 63:2 - reserved */ > #define V

[Qemu-devel] virtqueue corruption in emulation mode?

2011-09-26 Thread Sinha, Ani
Hi Guys : 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 corrupt. Either qemu crashes while performing virtqueue

Re: [Qemu-devel] RFC [v2]: vfio / device assignment -- layout of device fd files

2011-09-26 Thread Scott Wood
On 09/26/2011 02:57 PM, Stuart Yoder wrote: > On Mon, Sep 26, 2011 at 2:51 AM, David Gibson >> Um, not to put too fine a point on it, this is madness. >> >> Yes, it's very flexible and can thereby cover a very wide range of >> cases. But it's much, much too complex. Userspace has to parse a >> co

Re: [Qemu-devel] RFC [v2]: vfio / device assignment -- layout of device fd files

2011-09-26 Thread Alex Williamson
On Mon, 2011-09-26 at 18:59 -0500, Scott Wood wrote: > On 09/26/2011 01:34 PM, Alex Williamson wrote: > > The other obvious possibility is a pure ioctl interface. To match what > > this proposal is trying to describe, plus the runtime interfaces, we'd > > need something like: > > > > /* :0 - PCI

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-26 Thread Ray Wang
On 9/26/2011 5:46 PM, Peter Maydell wrote: On 26 September 2011 07:22, Ray Wang wrote: diff --git a/hw/gt64xxx.c b/hw/gt64xxx.c index 1c34253..d0a31d2 100644 --- a/hw/gt64xxx.c +++ b/hw/gt64xxx.c @@ -312,7 +312,7 @@ static void gt64120_writel (void *opaque, target_phys_addr_t addr, uint32

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

2011-09-26 Thread David Gibson
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 submodule + binary > >update in this fashion. > > Sure you can.

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

2011-09-26 Thread Stefan Berger
On 09/26/2011 03:09 PM, Michael S. Tsirkin wrote: On Mon, Sep 26, 2011 at 12:35:11PM -0400, Stefan Berger wrote: +static int tpm_tis_init(ISADevice *dev) +{ +TPMState *s = DO_UPCAST(TPMState, busdev, dev); +TPMTISState *tis =&s->s.tis; +int iomemtype, rc; + +qemu_mutex_init(&s->s

Re: [Qemu-devel] Add new frontend target

2011-09-26 Thread 陳韋任
Hi, Xin > I would like to add a new frontend target to QEMU. What sort of things do I > need to be aware of ? I would like to hear some suggestions. http://lists.gnu.org/archive/html/qemu-devel/2011-09/msg00695.html See if you can learn something from it. HTH. Regards, chenwj -- Wei-Ren C

Re: [Qemu-devel] [PATCH V9 5/5] Add a TPM Passthrough backend driver implementation

2011-09-26 Thread Stefan Berger
On 09/26/2011 04:24 PM, Michael S. Tsirkin wrote: On Mon, Sep 26, 2011 at 04:12:19PM -0400, Stefan Berger wrote: +if (tpm_passthrough_test_tpmdev(tb->s.tpm_pt->tpm_fd)) { +fprintf(stderr, +"'%s' is not a TPM device.\n", +tb->s.tpm_pt->tpm_dev); +

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

2011-09-26 Thread 陳韋任
O.K., now I have to make sure it's guest virtual or guest physical. Correct me if I am wrong. > >> - now you change the mapping of the code page that contains second piece > >> of code; > > > > ?change the mapping of the guest page which contains second piece of > > guest binary. Mapping guest

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

2011-09-26 Thread 陳韋任
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 memory mapping chang

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

2011-09-26 Thread Zhi Yong Wu
On Fri, Sep 23, 2011 at 11:57 PM, Stefan Hajnoczi 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 drivers > (e.g.  qcow2, qed, vm

[Qemu-devel] [PATCH 0/7] MIPS64 user mode emulation in QEMU with Cavium specific instruction support

2011-09-26 Thread khansa
From: Khansa Butt This is the team work of Ehsan-ul-Haq, Abdul Qadeer, Abdul Waheed, Khansa Butt from HPCN Lab KICS UET Lahore. This Patch series add support of MIPS64 user mode emulation in QEMU. Along with we implemented Cavium specific instructions which We will use in SME (in sysem mode emu

[Qemu-devel] [PATCH 1/7] linux-user:Support for MIPS64 user mode emulation in QEMU

2011-09-26 Thread khansa
From: Khansa Butt Signed-off-by: Khansa Butt --- configure |1 + default-configs/mips64-linux-user.mak |1 + linux-user/main.c | 21 +++-- linux-user/mips64/syscall.h |2 ++ linux-user/signal.c

[Qemu-devel] [PATCH 2/7] target-mips:enabling of 64 bit user mode and floating point operations

2011-09-26 Thread khansa
From: Khansa Butt Signed-off-by: Khansa Butt --- target-mips/translate.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index d5b1c76..0550333 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -127

[Qemu-devel] [PATCH 3/7] linux-user:Signal handling for MIPS64

2011-09-26 Thread khansa
From: Khansa Butt Signed-off-by: Khansa Butt --- linux-user/signal.c | 438 +-- 1 files changed, 426 insertions(+), 12 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 59c3c88..f5f8bba 100644 --- a/linux-user/signal.c +

[Qemu-devel] [PATCH 4/7] target-mips:Octeon cpu definition

2011-09-26 Thread khansa
From: Khansa Butt Signed-off-by: Khansa Butt --- target-mips/mips-defs.h |2 ++ target-mips/translate_init.c | 24 2 files changed, 26 insertions(+), 0 deletions(-) diff --git a/target-mips/mips-defs.h b/target-mips/mips-defs.h index bf094a3..e1ec2b2 100644

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

2011-09-26 Thread khansa
From: Ehsan-ul-Haq, Abdul Qadeer, Abdul Waheed, Khansa Butt Signed-off-by: Khansa Butt --- target-mips/cpu.h |7 + target-mips/helper.h|5 + target-mips/machine.c | 12 ++ target-mips/op_helper.c | 72 target-mips/translate.c | 424

[Qemu-devel] [PATCH 6/7] Addition of Cavium instructions in disassembler

2011-09-26 Thread khansa
From: Khansa Butt Signed-off-by: Khansa Butt --- mips-dis.c | 53 + 1 files changed, 53 insertions(+), 0 deletions(-) diff --git a/mips-dis.c b/mips-dis.c index e3a6e0b..96ab1e8 100644 --- a/mips-dis.c +++ b/mips-dis.c @@ -300,6 +300,7 @@

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

2011-09-26 Thread 陳韋任
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 only be called from softmmu_template.h (i.e.

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

2011-09-26 Thread Andi Kleen
Peter Maydell 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 it in exactly > the same way as anybody else. (In particular x86 is pretty crazy, Can

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

2011-09-26 Thread Michael S. Tsirkin
On Mon, Sep 26, 2011 at 09:48:31PM -0400, Stefan Berger wrote: > >>+ > >>+rc = tpm_tis_do_startup_tpm(s); > >>+if (rc != 0) { > >>+goto err_exit; > >>+} > >>+ > >>+return 0; > >>+ > >>+ err_exit: > >Missing cleanup? > > > True. Fixed. > I had previously looked around in othe

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

2011-09-26 Thread Zhi Yong Wu
2011/9/26 Lluís Vilanova : > 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 read/wr

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

2011-09-26 Thread Zhi Yong Wu
2011/9/26 Lluís Vilanova : > 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 slot: Invalid

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

2011-09-26 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->

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

2011-09-26 Thread Alexander Graf
Am 27.09.2011 um 03:01 schrieb David Gibson : > 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 submodule +

<    1   2