Zero-copy block driver?

2011-01-28 Thread Darko Petrović
Hi everyone, Could you please tell me if it is possible to use a block driver that completely avoids the guest kernel and copies block data directly to/from the given buffer in the guest userspace? If yes, how to activate it? If not... why not? :) Thanks! Darko -- To unsubscribe from this lis

Re: [PATCH v2 4/6] KVM-GST: KVM Steal time registration

2011-01-28 Thread Rik van Riel
On 01/28/2011 02:52 PM, Glauber Costa wrote: Register steal time within KVM. Everytime we sample the steal time information, we update a local variable that tells what was the last time read. We then account the difference. Signed-off-by: Glauber Costa CC: Rik van Riel CC: Jeremy Fitzhardinge CC

Re: [PATCH] release kvmclock page on reset

2011-01-28 Thread Glauber Costa
On Fri, 2011-01-28 at 22:09 +0100, Jan Kiszka wrote: > On 2011-01-28 20:48, Glauber Costa wrote: > > Up to know, we were relying on guest cooperation to turn off kvmclock. > > I just realized that even though this is fine and nice, a more robust > > method is to (also) turn it off on vcpu_reset on

Re: [PATCH v2 3/6] KVM-GST: KVM Steal time accounting

2011-01-28 Thread Rik van Riel
On 01/28/2011 02:52 PM, Glauber Costa wrote: This patch accounts steal time time in kernel/sched. I kept it from last proposal, because I still see advantages in it: Doing it here will give us easier access from scheduler variables such as the cpu rq. The next patch shows an example of usage for

Re: [PATCH v2 2/6] KVM-HV: KVM Steal time implementation

2011-01-28 Thread Rik van Riel
On 01/28/2011 02:52 PM, Glauber Costa wrote: To implement steal time, we need the hypervisor to pass the guest information about how much time was spent running other processes outside the VM. This is per-vcpu, and using the kvmclock structure for that is an abuse we decided not to make. In this

Re: [PATCH v2 1/6] KVM-HDR: KVM Steal time implementation

2011-01-28 Thread Rik van Riel
On 01/28/2011 02:52 PM, Glauber Costa wrote: To implement steal time, we need the hypervisor to pass the guest information about how much time was spent running other processes outside the VM. This is per-vcpu, and using the kvmclock structure for that is an abuse we decided not to make. In this

Re: [PATCH v2 3/6] KVM-GST: KVM Steal time accounting

2011-01-28 Thread Glauber Costa
On Fri, 2011-01-28 at 17:16 -0800, Jeremy Fitzhardinge wrote: > On 01/28/2011 11:52 AM, Glauber Costa wrote: > > This patch accounts steal time time in kernel/sched. > > I kept it from last proposal, because I still see advantages > > in it: Doing it here will give us easier access from scheduler >

Re: [PATCH v2 3/6] KVM-GST: KVM Steal time accounting

2011-01-28 Thread Jeremy Fitzhardinge
On 01/28/2011 11:52 AM, Glauber Costa wrote: > This patch accounts steal time time in kernel/sched. > I kept it from last proposal, because I still see advantages > in it: Doing it here will give us easier access from scheduler > variables such as the cpu rq. The next patch shows an example of > us

[PATCH] remember used harness after reboot v3

2011-01-28 Thread Lucas Meneghel Rodrigues
From: Jan Stancek If autotest client is run with custom harness, its name is stored in state file. This allows autotest to continue (e.g. after reboot) with harness that was specified on first run. If "--harness" option is present on command line, this option is used regardless of what is stored

Re: Network performance with small packets

2011-01-28 Thread Steve Dobbelstein
ste...@us.ibm.com wrote on 01/28/2011 12:29:37 PM: > > On Thu, 2011-01-27 at 22:05 +0200, Michael S. Tsirkin wrote: > > > One simple theory is that guest net stack became faster > > > and so the host can't keep up. > > > > Yes, that's what I think here. Some qdisc code has been changed > > recentl

Re: [PATCH] release kvmclock page on reset

2011-01-28 Thread Jan Kiszka
On 2011-01-28 20:48, Glauber Costa wrote: > Up to know, we were relying on guest cooperation to turn off kvmclock. > I just realized that even though this is fine and nice, a more robust > method is to (also) turn it off on vcpu_reset on the hypervisor side. > This will protect us against reboots,

Google Summer of Code 2011

2011-01-28 Thread Luiz Capitulino
Hi there, GSoC 2011 has been announced[1]. As we were pretty successful last year, I think we should participate again. I've already created a wiki page: http://wiki.qemu.org/Google_Summer_of_Code_2011 We should now populate it with projects and people willing to be mentors should say so (or ju

[PATCH v2 4/6] KVM-GST: KVM Steal time registration

2011-01-28 Thread Glauber Costa
Register steal time within KVM. Everytime we sample the steal time information, we update a local variable that tells what was the last time read. We then account the difference. Signed-off-by: Glauber Costa CC: Rik van Riel CC: Jeremy Fitzhardinge CC: Peter Zijlstra CC: Avi Kivity --- arch/

[PATCH v2 5/6] KVM-GST: adjust scheduler cpu power

2011-01-28 Thread Glauber Costa
This is a first proposal for using steal time information to influence the scheduler. There are a lot of optimizations and fine grained adjustments to be done, but it is working reasonably so far for me (mostly) With this patch (and some host pinnings to demonstrate the situation), two vcpus with

[PATCH v2 2/6] KVM-HV: KVM Steal time implementation

2011-01-28 Thread Glauber Costa
To implement steal time, we need the hypervisor to pass the guest information about how much time was spent running other processes outside the VM. This is per-vcpu, and using the kvmclock structure for that is an abuse we decided not to make. In this patchset, I am introducing a new msr, KVM_MSR_

[PATCH v2 6/6] Describe KVM_MSR_STEAL_TIME

2011-01-28 Thread Glauber Costa
This patch adds documentation about usage of the newly introduced KVM_MSR_STEAL_TIME. Signed-off-by: Glauber Costa --- Documentation/kvm/msr.txt | 32 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/Documentation/kvm/msr.txt b/Documentation/kvm/

[PATCH v2 1/6] KVM-HDR: KVM Steal time implementation

2011-01-28 Thread Glauber Costa
To implement steal time, we need the hypervisor to pass the guest information about how much time was spent running other processes outside the VM. This is per-vcpu, and using the kvmclock structure for that is an abuse we decided not to make. In this patchset, I am introducing a new msr, KVM_MSR_

[PATCH v2 0/6] KVM Steal time, new submission

2011-01-28 Thread Glauber Costa
Gentlemen, If I may please steal a little bit of your time, for the revision of this patchset, this is appreciated. This version only includes the steal time part, using a new MSR+cpuid to register it. It also includes some documentation, describing the ABI. Mostly inspired by the kvmclock one.

[PATCH v2 3/6] KVM-GST: KVM Steal time accounting

2011-01-28 Thread Glauber Costa
This patch accounts steal time time in kernel/sched. I kept it from last proposal, because I still see advantages in it: Doing it here will give us easier access from scheduler variables such as the cpu rq. The next patch shows an example of usage for it. Since functions like account_idle_time() c

[PATCH] release kvmclock page on reset

2011-01-28 Thread Glauber Costa
Up to know, we were relying on guest cooperation to turn off kvmclock. I just realized that even though this is fine and nice, a more robust method is to (also) turn it off on vcpu_reset on the hypervisor side. This will protect us against reboots, and we don't expect the guest to reset its cpu dur

Re: Network performance with small packets

2011-01-28 Thread Steve Dobbelstein
mashi...@linux.vnet.ibm.com wrote on 01/27/2011 02:15:05 PM: > On Thu, 2011-01-27 at 22:05 +0200, Michael S. Tsirkin wrote: > > One simple theory is that guest net stack became faster > > and so the host can't keep up. > > Yes, that's what I think here. Some qdisc code has been changed > recently.

Re: [Qemu-devel] [PATCHv8 12/16] Add bootindex parameter to net/block/fd device

2011-01-28 Thread Markus Armbruster
Gleb Natapov writes: > On Fri, Jan 28, 2011 at 02:29:50PM +0100, Markus Armbruster wrote: >> Gleb Natapov writes: >> >> > If bootindex is specified on command line a string that describes device >> > in firmware readable way is added into sorted list. Later this list will >> > be passed into fi

Re: [PATCH 0/29] nVMX: Nested VMX, v8

2011-01-28 Thread Nadav Har'El
On Fri, Jan 28, 2011, Juerg Haefliger wrote about "Re: [PATCH 0/29] nVMX: Nested VMX, v8": > This branch doesn't even compile: >... > drivers/staging/smbfs/dir.c:286: error: static declaration of > ג€˜smbfs_dentry_operationsג€™ follows non-static declaration >... Thanks, I'll look as soon as pos

Re: Graphics pass-through

2011-01-28 Thread Alex Williamson
On Fri, 2011-01-28 at 18:29 +0100, André Weidemann wrote: > Hi Alex, > > On 28.01.2011 01:45, Alex Williamson wrote: > > >> Do you mind sharing these patches? > > > > Attached. > > Thank you for attaching the patch. Unfortunately it does not apply to > current clone of the qemu-kvm git reposito

Re: Graphics pass-through

2011-01-28 Thread André Weidemann
Hi Alex, On 28.01.2011 01:45, Alex Williamson wrote: Do you mind sharing these patches? Attached. Thank you for attaching the patch. Unfortunately it does not apply to current clone of the qemu-kvm git repository. The file hw/vfio.c does not exist in the public repository, but your patch

Re: Qemu-img create problem

2011-01-28 Thread Stefan Hajnoczi
On Fri, Jan 28, 2011 at 1:13 PM, Himanshu Chauhan wrote: > I just cloned qemu-kvm, built and installed it. But the qemu-img fails > to create any disk image above 1G. The problem as I see is use of > ssize_t for image size. When size is >2G, the check "if (sval < 0)" > succeeds and I get the error

Re: [Qemu-devel] [PATCHv8 12/16] Add bootindex parameter to net/block/fd device

2011-01-28 Thread Gleb Natapov
On Fri, Jan 28, 2011 at 02:29:50PM +0100, Markus Armbruster wrote: > Gleb Natapov writes: > > > If bootindex is specified on command line a string that describes device > > in firmware readable way is added into sorted list. Later this list will > > be passed into firmware to control boot order.

Re: IO_PAGE_FAULT while booting.

2011-01-28 Thread Joerg Roedel
On Fri, Jan 28, 2011 at 03:31:17PM +, Prasad Joshi wrote: >On Fri, Jan 28, 2011 at 3:15 PM, Joerg Roedel wrote: > > On Thu, Jan 27, 2011 at 06:43:19PM +, Prasad Joshi wrote: > >AMD-Vi: Event logged [IO_PAGE_FAULT device=02:00.0 domain=0x0002 > >address=0xbb447000 flags=0

Re: [Qemu-devel] Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-28 Thread Paolo Bonzini
On 01/28/2011 04:31 PM, Yoshiaki Tamura wrote: That's the hack I was imaging:) So your original patch is also a hack? :) Maybe this is just an issue of preference, but I'm not sure adding "kemari:" to be intuitive. If there were similar extensions having the same problem, I would have agreed

Re: [Qemu-devel] Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-28 Thread Yoshiaki Tamura
2011/1/29 Paolo Bonzini : > On 01/28/2011 04:05 PM, Yoshiaki Tamura wrote: >> >> Having a scheme like "kemari:tcp:host:port" looks quite >> challenging to me.  We can of course add some quick hacks for it, >> but adding a nice layered architecture should be more >> appropriate.  Similar to protocol

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-01-28 Thread Christoph Lameter
On Fri, 28 Jan 2011, KAMEZAWA Hiroyuki wrote: > > > I see it as a tradeoff of when to check? add_to_page_cache or when we > > > are want more free memory (due to allocation). It is OK to wakeup > > > kswapd while allocating memory, somehow for this purpose (global page > > > cache), add_to_page_ca

Re: [Qemu-devel] Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-28 Thread Paolo Bonzini
On 01/28/2011 04:05 PM, Yoshiaki Tamura wrote: Having a scheme like "kemari:tcp:host:port" looks quite challenging to me. We can of course add some quick hacks for it, but adding a nice layered architecture should be more appropriate. Similar to protocols and formats in block layer? At the same

Re: [Qemu-devel] Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-28 Thread Yoshiaki Tamura
2011/1/28 Paolo Bonzini : > On 01/28/2011 02:53 PM, Yoshiaki Tamura wrote: >>> >>> >  1) I am not sure what would happen with -incoming exec; >> >> Nothing happens if used with other protocols, but I assume you're >> mentioning that it's not clear from the code, which makes sense. > > I assume noth

Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-28 Thread Paolo Bonzini
On 01/28/2011 02:53 PM, Yoshiaki Tamura wrote: > 1) I am not sure what would happen with -incoming exec; Nothing happens if used with other protocols, but I assume you're mentioning that it's not clear from the code, which makes sense. I assume nothing just because the code for other protoco

Re: [PATCH 15/19] savevm: introduce qemu_savevm_trans_{begin,commit}.

2011-01-28 Thread Yoshiaki Tamura
2011/1/28 Paolo Bonzini : > On 01/28/2011 08:21 AM, Yoshiaki Tamura wrote: >> >> +int qemu_savevm_trans_begin(Monitor *mon, QEMUFile *f, int init) >> +{ >> +    SaveStateEntry *se; >> +    int skipped = 0; >> + >> +    QTAILQ_FOREACH(se,&savevm_handlers, entry) { >> +        int len, stage, ret; >>

Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-28 Thread Yoshiaki Tamura
2011/1/28 Paolo Bonzini : > On 01/28/2011 08:21 AM, Yoshiaki Tamura wrote: >> >> +    /* check ft_mode option  */ >> +    p = strstr(uri, "ft_mode"); >> +    if (p&&  !strcmp(p, "ft_mode")) { >> +        ft_mode = FT_INIT; >> +    } >> + > > This works for TCP mode, but: > > 1) I am not sure what w

Re: [Qemu-devel] [PATCHv8 12/16] Add bootindex parameter to net/block/fd device

2011-01-28 Thread Markus Armbruster
Gleb Natapov writes: > If bootindex is specified on command line a string that describes device > in firmware readable way is added into sorted list. Later this list will > be passed into firmware to control boot order. > > Signed-off-by: Gleb Natapov Out of curiosity: what about qdev "scsi-gen

Re: [PATCH 15/19] savevm: introduce qemu_savevm_trans_{begin,commit}.

2011-01-28 Thread Paolo Bonzini
On 01/28/2011 08:21 AM, Yoshiaki Tamura wrote: +int qemu_savevm_trans_begin(Monitor *mon, QEMUFile *f, int init) +{ +SaveStateEntry *se; +int skipped = 0; + +QTAILQ_FOREACH(se,&savevm_handlers, entry) { +int len, stage, ret; + +if (se->save_live_state == NULL) { +

Qemu-img create problem

2011-01-28 Thread Himanshu Chauhan
Hi, I just cloned qemu-kvm, built and installed it. But the qemu-img fails to create any disk image above 1G. The problem as I see is use of ssize_t for image size. When size is >2G, the check "if (sval < 0)" succeeds and I get the error: qemu-img: Invalid image size specified! You may use k, M,

Re: [PATCH] sheepdog: support creating images on remote hosts

2011-01-28 Thread Kevin Wolf
Am 27.01.2011 17:33, schrieb MORITA Kazutaka: > This patch parses the input filename in sd_create(), and enables us > specifying a target server to create sheepdog images. > > Signed-off-by: MORITA Kazutaka Thanks, applied to the block branch. Kevin -- To unsubscribe from this list: send the li

Re: [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-28 Thread Paolo Bonzini
On 01/28/2011 08:21 AM, Yoshiaki Tamura wrote: +/* check ft_mode option */ +p = strstr(uri, "ft_mode"); +if (p&& !strcmp(p, "ft_mode")) { +ft_mode = FT_INIT; +} + This works for TCP mode, but: 1) I am not sure what would happen with -incoming exec; 2) it is tricky!

Re: Network performance with small packets

2011-01-28 Thread Michael S. Tsirkin
On Thu, Jan 27, 2011 at 01:30:38PM -0800, Shirley Ma wrote: > On Thu, 2011-01-27 at 13:02 -0800, David Miller wrote: > > > Interesting. Could this is be a variant of the now famuous > > bufferbloat then? > > > > Sigh, bufferbloat is the new global warming... :-/ > > Yep, some places become colde

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-01-28 Thread Balbir Singh
* KAMEZAWA Hiroyuki [2011-01-28 17:17:44]: > On Fri, 28 Jan 2011 13:49:28 +0530 > Balbir Singh wrote: > > > * KAMEZAWA Hiroyuki [2011-01-28 16:56:05]: > > > > BTW, it seems this doesn't work when some apps use huge shmem. > > > How to handle the issue ? > > > > > > > Could you elaborate furt

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-01-28 Thread Balbir Singh
* MinChan Kim [2011-01-28 16:24:19]: > > > > But the assumption for LRU order to change happens only if the page > > cannot be successfully freed, which means it is in some way active.. > > and needs to be moved no? > > 1. holded page by someone > 2. mapped pages > 3. active pages > > 1 is rare

KVM and ptp

2011-01-28 Thread Antoine Roly
Hi all, I have to set up a virtual network environment, with +/- 15 virtual hosts and synchronize some of those virtual machines with ptp (precision time protocol). PTP was developed to provide very precise time coordination of LAN connected computers. The aim is to be a lot more precise than

Re: [PATCH 14/19] block: insert event-tap to bdrv_aio_writev(), bdrv_aio_flush() and bdrv_flush().

2011-01-28 Thread Kevin Wolf
Am 28.01.2011 08:21, schrieb Yoshiaki Tamura: > event-tap function is called only when it is on, and requests were > sent from device emulators. > > Signed-off-by: Yoshiaki Tamura Acked-by: Kevin Wolf -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to

Re: [PATCH 0/29] nVMX: Nested VMX, v8

2011-01-28 Thread Juerg Haefliger
Hi Nadav, > Hi, > > This is the eighth iteration of the nested VMX patch set. This iteration > solves a number of bugs and issues that bothered the reviewers. Some more > issues raised in the previous review remain open, but don't worry - I *am* > working to resolve all of them. > > The biggest i

Re: [PATCH 13/22] Set up signalfd under !CONFIG_IOTHREAD

2011-01-28 Thread Paolo Bonzini
On 01/27/2011 02:09 PM, Jan Kiszka wrote: Will be required for SIGBUS handling. For obvious reasons, this will remain a nop on Windows hosts. Signed-off-by: Jan Kiszka --- Makefile.objs |2 +- cpus.c| 117 +++-- 2 files changed

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-01-28 Thread KAMEZAWA Hiroyuki
On Fri, 28 Jan 2011 13:49:28 +0530 Balbir Singh wrote: > * KAMEZAWA Hiroyuki [2011-01-28 16:56:05]: > > BTW, it seems this doesn't work when some apps use huge shmem. > > How to handle the issue ? > > > > Could you elaborate further? > == static inline unsigned long zone_unmapped_file_pages

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-01-28 Thread Balbir Singh
* KAMEZAWA Hiroyuki [2011-01-28 16:56:05]: > On Fri, 28 Jan 2011 16:24:19 +0900 > Minchan Kim wrote: > > > On Fri, Jan 28, 2011 at 3:48 PM, Balbir Singh > > wrote: > > > * MinChan Kim [2011-01-28 14:44:50]: > > > > > >> On Fri, Jan 28, 2011 at 11:56 AM, Balbir Singh > > >> wrote: > > >> > O

Re: [PATCH 12/22] kvm: Call qemu_kvm_eat_signals also under !CONFIG_IOTHREAD

2011-01-28 Thread Paolo Bonzini
On 01/27/2011 02:09 PM, Jan Kiszka wrote: Move qemu_kvm_eat_signals around and call it also when the IO-thread is not used. Do not yet process SIGBUS, will be armed in a separate step. Signed-off-by: Jan Kiszka --- cpus.c | 88 ---

Re: [PATCH 10/22] kvm: Set up signal mask also for !CONFIG_IOTHREAD

2011-01-28 Thread Paolo Bonzini
On 01/27/2011 02:09 PM, Jan Kiszka wrote: Block SIG_IPI, unblock it during KVM_RUN, just like in io-thread mode. It's unused so far, but this infrastructure will be required for self-IPIs and to process SIGBUS plus, in KVM mode, SIGIO and SIGALRM. As Windows doesn't support signal services, we ne

Re: [PATCH 3/3] Provide control over unmapped pages (v4)

2011-01-28 Thread KAMEZAWA Hiroyuki
On Fri, 28 Jan 2011 16:24:19 +0900 Minchan Kim wrote: > On Fri, Jan 28, 2011 at 3:48 PM, Balbir Singh > wrote: > > * MinChan Kim [2011-01-28 14:44:50]: > > > >> On Fri, Jan 28, 2011 at 11:56 AM, Balbir Singh > >> wrote: > >> > On Thu, Jan 27, 2011 at 4:42 AM, Minchan Kim > >> > wrote: > >>