Avi Kivity | 1 Sep 2011 10:05
Picon
Favicon

Re: [PATCH] kvm_unit_tests: vm.c - Retrieve RAM size from fwcfg

On 09/01/2011 12:11 AM, Lucas Meneghel Rodrigues wrote:
> Rather than letting the test dev do it.

> +
> +unsigned fwcfg_get_ram_size(void)
> +{
> +    return fwcfg_get_u64(FW_CFG_RAM_SIZE);
> +}

Should return a 64-bit type here.

--

-- 
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Paolo Bonzini | 1 Sep 2011 11:44
Picon
Favicon
Gravatar

Re: [PATCH] hw: Add test device for unittests execution v2

On 08/31/2011 11:06 PM, Lucas Meneghel Rodrigues wrote:
> +    CharDriverState *chr;

I think it's unused, no?

Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Jan Kiszka | 1 Sep 2011 13:27
Picon

Re: [PATCH 0/4 v9] MSI-X MMIO support for KVM

On 2011-02-22 19:08, Marcelo Tosatti wrote:
> On Fri, Feb 18, 2011 at 04:53:09PM +0800, Sheng Yang wrote:
>> Sorry for the long delay, just come back from vacation...
>>
>> Change from v8:
>> 1. Update struct kvm_run to contain MSI-X routing update exit specific
>> information.
>> 2. Fix a mmio_nr counting bug.
>>
>> Notice this patchset still based on 2.6.37 due to a block bug on assigned
>> device in the upstream now.
>>
>> Sheng Yang (4):
>>   KVM: Move struct kvm_io_device to kvm_host.h
>>   KVM: Add kvm_io_ext_data to IO handler
>>   KVM: Emulate MSI-X table in kernel
>>   KVM: Add documents for MSI-X MMIO API
> 
> Looks good to me.

What happened to this series and [1]? Forgotten because Sheng switched
his job?

I just realized that MSI-X per-vector masking for assigned devices is
not only slow (takes user space exits) but just simply broken (masking
bit is not evaluated and applied to the device).

BTW, the same is also true for that optional per-vector masking of
legacy MSI. Are there devices in the field that actually support this? I
haven't found one so far and tend to consider this feature not worth
(Continue reading)

Zhi Yong Wu | 1 Sep 2011 13:44
Picon

[PATCH v6 0/4] The intro of QEMU block I/O throttling

The main goal of the patch is to effectively cap the disk I/O speed or counts of one single VM.It is only one
draft, so it unavoidably has some drawbacks, if you catch them, please let me know.

The patch will mainly introduce one block I/O throttling algorithm, one timer and one block queue for each
I/O limits enabled drive.

When a block request is coming in, the throttling algorithm will check if its I/O rate or counts exceed the
limits; if yes, then it will enqueue to the block queue; The timer will handle the I/O requests in it.

Some available features follow as below:
(1) global bps limit.
   -drive bps=xxx            in bytes/s
(2) only read bps limit
   -drive bps_rd=xxx         in bytes/s
(3) only write bps limit
   -drive bps_wr=xxx         in bytes/s
(4) global iops limit
   -drive iops=xxx           in ios/s
(5) only read iops limit
   -drive iops_rd=xxx        in ios/s
(6) only write iops limit
   -drive iops_wr=xxx        in ios/s
(7) the combination of some limits.
   -drive bps=xxx,iops=xxx

Known Limitations:
(1) #1 can not coexist with #2, #3
(2) #4 can not coexist with #5, #6
(3) When bps/iops limits are specified to a small value such as 511 bytes/s, this VM will hang up. We are
considering how to handle this senario.
(Continue reading)

Zhi Yong Wu | 1 Sep 2011 13:44
Picon

[PATCH v6 1/4] block: add the command line support

Signed-off-by: Zhi Yong Wu <wuzhy <at> linux.vnet.ibm.com>
---
 block.c         |    8 ++++++++
 block_int.h     |   21 +++++++++++++++++++++
 blockdev.c      |   29 +++++++++++++++++++++++++++++
 qemu-config.c   |   24 ++++++++++++++++++++++++
 qemu-options.hx |    1 +
 5 files changed, 83 insertions(+), 0 deletions(-)

diff --git a/block.c b/block.c
index 03a21d8..17ee3df 100644
--- a/block.c
+++ b/block.c
 <at>  <at>  -1453,6 +1453,14  <at>  <at>  void bdrv_get_geometry_hint(BlockDriverState *bs,
     *psecs = bs->secs;
 }

+/* throttling disk io limits */
+void bdrv_set_io_limits(BlockDriverState *bs,
+                            BlockIOLimit *io_limits)
+{
+    bs->io_limits = *io_limits;
+    bs->io_limits_enabled = bdrv_io_limits_enabled(bs);
+}
+
 /* Recognize floppy formats */
 typedef struct FDFormat {
     FDriveType drive;
diff --git a/block_int.h b/block_int.h
index 8a72b80..e7bda5b 100644
(Continue reading)

Zhi Yong Wu | 1 Sep 2011 13:44
Picon

[PATCH v6 2/4] block: add the block queue support

Signed-off-by: Zhi Yong Wu <wuzhy <at> linux.vnet.ibm.com>
---
 Makefile.objs     |    2 +-
 block/blk-queue.c |  226 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 block/blk-queue.h |   63 +++++++++++++++
 3 files changed, 290 insertions(+), 1 deletions(-)
 create mode 100644 block/blk-queue.c
 create mode 100644 block/blk-queue.h

diff --git a/Makefile.objs b/Makefile.objs
index d1f3e5d..96a7323 100644
--- a/Makefile.objs
+++ b/Makefile.objs
 <at>  <at>  -33,7 +33,7  <at>  <at>  block-nested-y += raw.o cow.o qcow.o vdi.o vmdk.o cloop.o dmg.o bochs.o vpc.o vv
 block-nested-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o qcow2-cache.o
 block-nested-y += qed.o qed-gencb.o qed-l2-cache.o qed-table.o qed-cluster.o
 block-nested-y += qed-check.o
-block-nested-y += parallels.o nbd.o blkdebug.o sheepdog.o blkverify.o
+block-nested-y += parallels.o nbd.o blkdebug.o sheepdog.o blkverify.o blk-queue.o
 block-nested-$(CONFIG_WIN32) += raw-win32.o
 block-nested-$(CONFIG_POSIX) += raw-posix.o
 block-nested-$(CONFIG_CURL) += curl.o
diff --git a/block/blk-queue.c b/block/blk-queue.c
new file mode 100644
index 0000000..eac824c
--- /dev/null
+++ b/block/blk-queue.c
 <at>  <at>  -0,0 +1,226  <at>  <at> 
+/*
+ * QEMU System Emulator queue definition for block layer
(Continue reading)

Zhi Yong Wu | 1 Sep 2011 13:44
Picon

[PATCH v6 3/4] block: add block timer and block throttling algorithm

Note:
     1.) When bps/iops limits are specified to a small value such as 511 bytes/s, this VM will hang up. We are
considering how to handle this senario.
     2.) When "dd" command is issued in guest, if its option bs is set to a large value such as "bs=1024K", the
result speed will slightly bigger than the limits.

For these problems, if you have nice thought, pls let us know.:)

Signed-off-by: Zhi Yong Wu <wuzhy <at> linux.vnet.ibm.com>
---
 block.c     |  290 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 block.h     |    5 +
 block_int.h |    9 ++
 3 files changed, 296 insertions(+), 8 deletions(-)

diff --git a/block.c b/block.c
index 17ee3df..680f1e7 100644
--- a/block.c
+++ b/block.c
 <at>  <at>  -30,6 +30,9  <at>  <at> 
 #include "qemu-objects.h"
 #include "qemu-coroutine.h"

+#include "qemu-timer.h"
+#include "block/blk-queue.h"
+
 #ifdef CONFIG_BSD
 #include <sys/types.h>
 #include <sys/stat.h>
 <at>  <at>  -72,6 +75,13  <at>  <at>  static int coroutine_fn bdrv_co_writev_em(BlockDriverState *bs,
(Continue reading)

Zhi Yong Wu | 1 Sep 2011 13:44
Picon

[PATCH v6 4/4] qmp/hmp: add block_set_io_throttle

The patch introduce one new command block_set_io_throttle; For its usage syntax, if you have better idea,
pls let me know.

Signed-off-by: Zhi Yong Wu <wuzhy <at> linux.vnet.ibm.com>
---
 block.c         |   26 +++++++++++++++++++-
 block.h         |    1 -
 blockdev.c      |   69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 blockdev.h      |    2 +
 hmp-commands.hx |   15 ++++++++++++
 qerror.c        |    4 +++
 qerror.h        |    3 ++
 qmp-commands.hx |   52 ++++++++++++++++++++++++++++++++++++++++-
 8 files changed, 168 insertions(+), 4 deletions(-)

diff --git a/block.c b/block.c
index 680f1e7..42f1ecc 100644
--- a/block.c
+++ b/block.c
 <at>  <at>  -1945,6 +1945,16  <at>  <at>  static void bdrv_print_dict(QObject *obj, void *opaque)
                             qdict_get_bool(qdict, "ro"),
                             qdict_get_str(qdict, "drv"),
                             qdict_get_bool(qdict, "encrypted"));
+
+        monitor_printf(mon, " bps=%" PRId64 " bps_rd=%" PRId64
+                            " bps_wr=%" PRId64 " iops=%" PRId64
+                            " iops_rd=%" PRId64 " iops_wr=%" PRId64,
+                            qdict_get_int(qdict, "bps"),
+                            qdict_get_int(qdict, "bps_rd"),
+                            qdict_get_int(qdict, "bps_wr"),
(Continue reading)

Stefan Hajnoczi | 1 Sep 2011 15:02
Picon
Gravatar

Re: [PATCH v6 2/4] block: add the block queue support

On Thu, Sep 1, 2011 at 12:44 PM, Zhi Yong Wu <wuzhy <at> linux.vnet.ibm.com> wrote:
> +struct BlockIORequest {
> +    QTAILQ_ENTRY(BlockIORequest) entry;
> +    BlockDriverState *bs;
> +    BlockRequestHandler *handler;
> +    int64_t sector_num;
> +    QEMUIOVector *qiov;
> +    int nb_sectors;
> +    BlockDriverCompletionFunc *cb;
> +    void *opaque;
> +    BlockDriverAIOCB *acb;
> +};
> +
> +struct BlockQueue {
> +    QTAILQ_HEAD(requests, BlockIORequest) requests;
> +    BlockIORequest *request;
> +    bool flushing;
> +};
> +
> +struct BlockQueueAIOCB {
> +    BlockDriverAIOCB common;
> +    BlockDriverCompletionFunc *real_cb;
> +    BlockDriverAIOCB *real_acb;
> +    void *opaque;
> +    BlockIORequest *request;
> +};

Now it's pretty easy to merge BlockIORequest and BlockQueueAIOCB into
one struct.  That way we don't need to duplicate fields or link
structures together:
(Continue reading)

Steffen Gebert | 1 Sep 2011 16:35
Picon
Favicon

Nested KVM: Inner VM fails to execute /init

Hi all,

I started playing with nested KVMs, but the inner VM doesn't boot. It 
fails after grub's "Starting up ..." with
 > Failed to execute /init
 > Kernel panic - not syncing: No init found. Try passing init= option
 > to kernel. See Linux Documentation/init.txt for guidance.
 > Pid: 1, comm: init Not tainted 2.6.38-11-virtual #48-Ubuntu

 > Call trace is panic <- init_post <- kernel_init <-
 > kernel_thread_helper <- kernel_init <- kernel_thread_helper

Outer VM uses kernel from kvm's git repository and latest libvirt 
release (0.9.4) on Ubuntu 10.04. The inner VM uses Ubuntu's standard 
kernel + kvm.

I'm using kvm_intel (arch amd64), loaded kvm_intel with nested=1 and 
created a custom emulator script, which passes "-enable-nesting -cpu 
host" to the kvm command. I also tried "-cpu qemu64,+vmx".

Do you have a clue, why /init cannot be executed? I extracted the initrd 
image of inner VM and it looks okay. /init is executable and a readable 
shell script.

Inner and outer VMs have been built with ubuntu-vm-builder.
> ubuntu-vm-builder kvm natty --domain innervm3 --hostname innervm3 --dest innervm3 --mem 128 --addpkg
acpid --addpkg openssh-server --addpkg avahi-daemon --libvirt qemu:///system
The output is exactly the same for both runs (thus no errors are printed 
out).

(Continue reading)


Gmane