Re: [kvm-devel] [ANNOUNCE] kvm-guest-drivers-windows-2

2008-05-15 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: FWIW, virtio-net is much better with my patches applied. The can_receive patches? Again, I'm not opposed to them in principle, I just think that if they help that this points at a virtio deficiency. Virtio should never leave the rx queue empty

Re: [kvm-devel] pinning, tsc and apic

2008-05-15 Thread Anthony Liguori
Chris Wright wrote: * Anthony Liguori ([EMAIL PROTECTED]) wrote: From a quick look, I suspect that the number of wildly off TSC calibrations correspond to the VMs that are misbehaving. I think this may mean that we have to re-examine the tsc delta computation. 10_serial.log:time.c

Re: [kvm-devel] [ANNOUNCE] kvm-guest-drivers-windows-2

2008-05-15 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: Avi Kivity wrote: Anthony Liguori wrote: FWIW, virtio-net is much better with my patches applied. The can_receive patches? Again, I'm not opposed to them in principle, I just think that if they help that this points at a virtio deficiency. Virtio

Re: [kvm-devel] [Qemu-devel] Re: [PATCH] Add support for a configuration file

2008-05-14 Thread Anthony Liguori
update the patch. Regards, Anthony Liguori mynetworkcard.class=ne2000pci mynetworkcard.bus=1 # pci bus selection mynetworkcard.macaddr=00:01:02:03:04:05 mynetworkcard.vlan=1 I will strongly support configuration file formats having this property. Regards, Fabrice

Re: [kvm-devel] [Qemu-devel] Re: [PATCH] Add support for a configuration file

2008-05-14 Thread Anthony Liguori
, Anthony Liguori Thoughts? Paul - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01

Re: [kvm-devel] [Qemu-devel] Re: [PATCH] Add support for a configuration file

2008-05-14 Thread Anthony Liguori
than all of QEMU itself. Regards, Anthony Liguori - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01

Re: [kvm-devel] [ANNOUNCE] kvm-guest-drivers-windows-2

2008-05-14 Thread Anthony Liguori
, the performance improvement with virtio-net is about 2x. We were loosing about 20-30% throughput because of the delays in handling incoming packets. Regards, Anthony LIguori It's work in progress, doing zero copy in the guest, adding TSO, using virtio'd tap will drastically boot performance

Re: [kvm-devel] pinning, tsc and apic

2008-05-14 Thread Anthony Liguori
. 9_serial.log:time.c: Detected 2184.754 MHz processor. Regards, Anthony Liguori So can you try setting KVM_MAX_PIT_INTR_INTERVAL to a lower value? HZ/10 or something. You can confirm this theory by booting the guests with apic=debug

[kvm-devel] [PATCH 3/4] Use fragmented send for virtio

2008-05-13 Thread Anthony Liguori
This patch converts virtio-net to use the new fragmented send interface. We should have always supported this. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c index 85cc9d2..93bca1d 100644 --- a/qemu/hw/virtio-net.c +++ b/qemu/hw/virtio

[kvm-devel] [PATCH 2/4] Add fd_readv handler to tap

2008-05-13 Thread Anthony Liguori
This allows fragmented packets to be sent with no additional copies over the tap interface. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/vl.c b/qemu/vl.c index 1f0a6ac..7900b76 100644 --- a/qemu/vl.c +++ b/qemu/vl.c @@ -4086,6 +4086,19 @@ static void tap_receive(void

[kvm-devel] [PATCH 1/4] Add method to send fragmented packets

2008-05-13 Thread Anthony Liguori
We need to be able to send fragmented packets in KVM to avoid an extra copy in the TX path. This patch adds a qemu_sendv_packet() function to send fragemented packets. It also provides backwards compatibility for old clients that don't support the new interface. Signed-off-by: Anthony Liguori

[kvm-devel] [PATCH] Add support for a configuration file

2008-05-13 Thread Anthony Liguori
/images/linux.img # Redirect disk writes to a temporary image snapshot # Make the graphical display available on port 5902 vnc=:2 With: qemu-system-x86_64 -config foo.qemu Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu-doc.texi b/qemu-doc.texi index cca483c..4861fc0 100644

Re: [kvm-devel] [PATCH] Add support for a configuration file

2008-05-13 Thread Anthony Liguori
Anthony Liguori wrote: I think this is pretty useful as-is. I think it also gives us a reasonable way to move forward that will keep everyone pretty happy. Here's a short example: qemu-system-x86_64 -hda ~/images/linux.img -snapshot -vnc :2 Would become `foo.qemu': # Main disk

Re: [kvm-devel] [PATCH] qemu-kvm: Consolidate kvm_eat_signals

2008-05-12 Thread Anthony Liguori
of the select. Regards, Anthony Liguori Oh. There used to be a bug where we didn't check for a pending signal before the first guest entry, so this would add a lot of latency (effectively making the bug window much larger). That was only closed in 2.6.24 (by 7e66f350

Re: [kvm-devel] [PATCH] qemu-kvm: Consolidate kvm_eat_signals

2008-05-12 Thread Anthony Liguori
to break us out of the select. sigtimedwait() (or just sigwait, now) doesn't require the signal to be delivered, so it's faster. Yeah, sigtimedwait() is probably the right thing to do since we have to use a signal for IPI. Regards, Anthony Liguori If there's nothing to select, why call select

Re: [kvm-devel] pinning, tsc and apic

2008-05-12 Thread Anthony Liguori
for the timer to happen on a different pcpu as the current vcpu's but it wasn't obvious to me that it would cause problems. Eddie, et al: Care to elaborate on what the TODO was trying to address? Regards, Anthony Liguori Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx

Re: [kvm-devel] [PATCH 5/5] Stop dropping so many RX packets in tap (v3)

2008-05-11 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: Normally, tap always reads packets and simply lets the client drop them if it cannot receive them. For virtio-net, this results in massive packet loss and about an 80% performance loss in TCP throughput. This patch modifies qemu_send_packet

Re: [kvm-devel] [PATCH 5/5] Stop dropping so many RX packets in tap (v3)

2008-05-11 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: How about the other way round: when the vlan consumer detects it can no longer receive packets, it tells that to the vlan. When all vlan consumers can no longer receive, tell the producer to stop producing. For the tap producer, this is simply

Re: [kvm-devel] [PATCH 1/5] Support more than 3.5GB with virtio (v3)

2008-05-09 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: We're pretty sloppy in virtio right now about phys_ram_base assumptions. This patch is an incremental step between what we have today and a full blown DMA API. I backported the DMA API but the performance impact was not acceptable to me

Re: [kvm-devel] [PATCH] qemu-kvm: fix guest resetting

2008-05-09 Thread Anthony Liguori
to a casual reader why it's necessary. In fact, I'd be much more inclined to see a wrapper around pthread_cond_wait() so that we never explicitly had to set cpu_single_env. Regards, Anthony Liguori } void qemu_system_shutdown_request(void

Re: [kvm-devel] [PATCH] Fix e1000 can_receive handler

2008-05-08 Thread Anthony Liguori
Aurelien Jarno wrote: On Wed, May 07, 2008 at 04:40:58PM -0500, Anthony Liguori wrote: The current logic of the can_receive handler is to allow packets whenever the receiver is disabled or when there are descriptors available in the ring. I think the logic ought to be to allow packets

Re: [kvm-devel] [PATCH] Fix e1000 can_receive handler

2008-05-08 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: Aurelien Jarno wrote: On Wed, May 07, 2008 at 04:40:58PM -0500, Anthony Liguori wrote: The current logic of the can_receive handler is to allow packets whenever the receiver is disabled or when there are descriptors available in the ring. I

[kvm-devel] [PATCH 2/3] virtio-net save/restore support

2008-05-08 Thread Anthony Liguori
The only interesting bit here is that we have to ensure that we rearm the timer if necessary. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c index d15c2f4..5fe66ac 100644 --- a/qemu/hw/virtio-net.c +++ b/qemu/hw/virtio-net.c @@ -207,9

[kvm-devel] [PATCH 3/3] virtio-blk save/restore support

2008-05-08 Thread Anthony Liguori
No additional state needs to be saved. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/hw/virtio-blk.c b/qemu/hw/virtio-blk.c index 048285a..148cb75 100644 --- a/qemu/hw/virtio-blk.c +++ b/qemu/hw/virtio-blk.c @@ -162,11 +162,30 @@ static uint32_t virtio_blk_get_features

[kvm-devel] [PATCH 1/3] Virtio save/restore support (v2)

2008-05-08 Thread Anthony Liguori
will submit a patch in the near future that addresses that problem. Since v1, I fixed the Signed-off-by line. Sorry about that. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/hw/virtio.c b/qemu/hw/virtio.c index a4c9d10..440cc69 100644 --- a/qemu/hw/virtio.c +++ b/qemu/hw

Re: [kvm-devel] qemu/kvm: support for pci passthrough

2008-05-08 Thread Anthony Liguori
like the two below. Nope, it uses the existing Linux VT-d support and requires patches to the existing code. It can't live entirely within the external module. Regards, Anthony Liguori 2. PV dma - good only for Linux guests. Some locking issues needs to be solved + get into mainline

Re: [kvm-devel] strange problem with virtio on guest with over 3648M RAM

2008-05-07 Thread Anthony Liguori
:), is there anyone else that have experienced the same problems or are there people running virtio on guest with more ram where everything is working ok? It's a know bug. I have a fix for it locally that I'll send out today. Regards, Anthony Liguori This problem could be local to ubuntu

[kvm-devel] [PATCH 1/6] Add support for eventfd() (v3)

2008-05-07 Thread Anthony Liguori
This patch adds compatibility code so that we can make use of eventfd() within QEMU. eventfd() is a pretty useful mechanism as it allows multiple notifications to be batched in a single system call. We emulate eventfd() using a standard pipe(). Signed-off-by: Anthony Liguori [EMAIL PROTECTED

[kvm-devel] [PATCH 5/6] Interrupt io thread in qemu_set_fd_handler2 (v3)

2008-05-07 Thread Anthony Liguori
The select() in the IO thread may wait a long time before rebuilding the fd set. Whenever we do something that changes the fd set, we should interrupt the IO thread. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/vl.c b/qemu/vl.c index 1192759..e9f0ca4 100644 --- a/qemu/vl.c

[kvm-devel] [PATCH 6/6] Only select once per-main_loop iteration (v3)

2008-05-07 Thread Anthony Liguori
is very large. This patch changes main_loop_wait to only select once before doing the various other things in the main loop. This generally improves responsiveness of things like SDL but also improves individual file descriptor throughput quite dramatically. Signed-off-by: Anthony Liguori [EMAIL

[kvm-devel] [PATCH 4/6] Use signalfd() in io-thread (v3)

2008-05-07 Thread Anthony Liguori
in main_loop_wait() (which is the case with qemu_kvm_aio_wait()). Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c index 7134e56..492c3c4 100644 --- a/qemu/qemu-kvm.c +++ b/qemu/qemu-kvm.c @@ -17,6 +17,7 @@ int kvm_pit = 1; #include sysemu.h #include qemu

[kvm-devel] [PATCH 3/6] Add support for signalfd() (v3)

2008-05-07 Thread Anthony Liguori
sigwaitinfo() to emulate it. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/kvm-compatfd.c b/qemu/kvm-compatfd.c index 1b030ba..b1311e2 100644 --- a/qemu/kvm-compatfd.c +++ b/qemu/kvm-compatfd.c @@ -15,6 +15,97 @@ #include qemu-kvm.h #include sys/syscall.h +#include

[kvm-devel] [PATCH 1/5] Support more than 3.5GB with virtio (v3)

2008-05-07 Thread Anthony Liguori
with this particular patch. Since we're no longer assuming guest physical memory is contiguous, we need a more complex way to validate the memory regions than just checking if it's within ram_size. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/hw/virtio.c b/qemu/hw/virtio.c index 6a50001

[kvm-devel] [PATCH 2/5] Validate the SG list layouts in virtio

2008-05-07 Thread Anthony Liguori
We should check that the first element is the size we expect instead of just casting blindly. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/hw/virtio-blk.c b/qemu/hw/virtio-blk.c index 3af36db..048285a 100644 --- a/qemu/hw/virtio-blk.c +++ b/qemu/hw/virtio-blk.c @@ -56,8

[kvm-devel] [PATCH 3/5] Revert virtio tap hack (v3)

2008-05-07 Thread Anthony Liguori
which is apparently a significant problem with the tap implementation in QEMU. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/hw/pc.h b/qemu/hw/pc.h index 73e3918..c284bf1 100644 --- a/qemu/hw/pc.h +++ b/qemu/hw/pc.h @@ -155,7 +155,6 @@ void isa_ne2000_init(int base, qemu_irq

[kvm-devel] [PATCH 5/5] Stop dropping so many RX packets in tap (v3)

2008-05-07 Thread Anthony Liguori
. This patch also modifies the tap code to only read from the tap fd if at least one client on the VLAN is able to receive a packet. Finally, this patch changes the tap code to drain all possible packets from the tap device when the tap fd is readable. Signed-off-by: Anthony Liguori [EMAIL

[kvm-devel] [PATCH 4/5] Make virtio-net can_receive more accurate (v3)

2008-05-07 Thread Anthony Liguori
). This particular change makes RX performance very consistent. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c index 8d26832..5538979 100644 --- a/qemu/hw/virtio-net.c +++ b/qemu/hw/virtio-net.c @@ -14,6 +14,7 @@ #include virtio.h #include net.h

Re: [kvm-devel] [RFC] [VTD][patch 1/3] vt-d support for pci passthrough: kvm-vtd--kernel.patch

2008-05-07 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: What should be done for unmodified guest where there is no PV driver in the guest? Would a call to mlock() from qemu/hw/pci-passthrough.c/add_pci_passthrough_device() a reasonable thing to do? Yup. The idea is to ensure that the memory

Re: [kvm-devel] [RFC][PATCH] svm.c: tsc unsigned delta calculation

2008-05-07 Thread Anthony Liguori
work out better for you.. Do you have Gerd's kvm-clock most recent patch applied? Regards, Anthony Liguori This check makes sense to me in that we only need to ensure that we don't go backwards which means that unless the new cpu is behind the current vcpu's host_tsc, we can skip a new delta

[kvm-devel] [PATCH] Make sure to restore cpu_single_env when after cond_wait

2008-05-07 Thread Anthony Liguori
I discovered this while testing virtio save/restore this evening. After sleeping, cpu_single_env can change so we have to make sure to restore it. This applies on top of my IO thread series. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c index

Re: [kvm-devel] Protected mode transitions and big real mode... still an issue

2008-05-06 Thread Anthony Liguori
Guillaume Thouvenin wrote: On Mon, 5 May 2008 16:29:21 +0300 Mohammed Gamal [EMAIL PROTECTED] wrote: On Mon, May 5, 2008 at 3:57 PM, Anthony Liguori [EMAIL PROTECTED] wrote: WinXP fails to boot with your patch applied too. FWIW, Ubuntu 8.04 has a fixed version of gfxboot

Re: [kvm-devel] [PATCH 1/4] Replace SIGUSR1 in io-thread with eventfd() (v2)

2008-05-06 Thread Anthony Liguori
Marcelo Tosatti wrote: Looks good (the whole series). Needs some good testing of course... Have you tested migration/loadvm? No, but I will before resubmitting (which should be sometime tomorrow). Regards, Anthony Liguori On Mon, May 05, 2008 at 08:47:12AM -0500, Anthony Liguori wrote

Re: [kvm-devel] [RFC] [VTD][patch 1/3] vt-d support for pci passthrough: kvm-vtd--kernel.patch

2008-05-06 Thread Anthony Liguori
, mapping everything should be fine. mlock() really gives us the right semantics. Semantically, a PV API that supports DMA window registration simply mlock()s the DMA regions on behalf of the guest. No special logic should be needed. Regards, Anthony Liguori

Re: [kvm-devel] [RFC] [VTD][patch 3/3] vt-d support for pci passthrough: kvm-intel-iommu.patch

2008-05-06 Thread Anthony Liguori
) +int domain_init(struct dmar_domain *domain, int guest_width) { I think it's already been mentioned, but these are pretty terrible names if you're exporting these symbols. Linux supports other IOMMUs so VT-d should not be hogging the iommu_* namespace. Regards, Anthony Liguori

Re: [kvm-devel] [RFC] [VTD][patch 2/3] vt-d support for pci passthrough: kvm-vtd-user.patch

2008-05-06 Thread Anthony Liguori
reason. Userspace can enforce the requirement that memory remains present via mlock(). This allows us to implement a PV API for DMA registration without the IOMMU code having any particular knowledge of it. Regards, Anthony Liguori

Re: [kvm-devel] [RFC] [VTD][patch 1/3] vt-d support for pci passthrough: kvm-vtd--kernel.patch

2008-05-06 Thread Anthony Liguori
of course but that doesn't mean reclaimation isn't useful. Regards, Anthony Liguori Allen - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time

Re: [kvm-devel] Protected mode transitions and big real mode... still an issue

2008-05-05 Thread Anthony Liguori
? WinXP fails to boot with your patch applied too. FWIW, Ubuntu 8.04 has a fixed version of gfxboot that doesn't do nasty things with SS on privileged mode transitions. Regards, Anthony Liguori Regards, Guillaume

[kvm-devel] [PATCH 4/4] Only select once per-main_loop iteration (v2)

2008-05-05 Thread Anthony Liguori
is very large. This patch changes main_loop_wait to only select once before doing the various other things in the main loop. This generally improves responsiveness of things like SDL but also improves individual file descriptor throughput quite dramatically. Signed-off-by: Anthony Liguori [EMAIL

[kvm-devel] [PATCH 2/4] Use signalfd() in io-thread (v2)

2008-05-05 Thread Anthony Liguori
(). I've tested Windows and Linux guests with SMP without seeing an obvious regressions. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/kvm-compatfd.c b/qemu/kvm-compatfd.c index 1b030ba..3c2be28 100644 --- a/qemu/kvm-compatfd.c +++ b/qemu/kvm-compatfd.c @@ -15,6 +15,100

[kvm-devel] [PATCH 3/4] Interrupt io thread in qemu_set_fd_handler2 (v2)

2008-05-05 Thread Anthony Liguori
The select() in the IO thread may wait a long time before rebuilding the fd set. Whenever we do something that changes the fd set, we should interrupt the IO thread. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/vl.c b/qemu/vl.c index 1192759..e9f0ca4 100644 --- a/qemu/vl.c

[kvm-devel] [PATCH 1/4] Replace SIGUSR1 in io-thread with eventfd() (v2)

2008-05-05 Thread Anthony Liguori
() instead. The benefit of using eventfd is that multiple notifications will be batched into a signal IO event. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/Makefile.target b/qemu/Makefile.target index 2316c92..db6912e 100644 --- a/qemu/Makefile.target +++ b/qemu

Re: [kvm-devel] [patch 0/3] QEMU/KVM: add support for 128 PCI slots (v2)

2008-05-05 Thread Anthony Liguori
as long as we don't have indirect scatter gather lists. Regards, Anthony Liguori - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100

Re: [kvm-devel] [PATCH] Use pipe() to simulate signalfd() (v2)

2008-05-04 Thread Anthony Liguori
that it will break us out of select() but I that makes things a bit more subtle than I'd like. I personally prefer using pipe() within the same thread although I'm willing to also do the separate thread. Regards, Anthony LIguori We can move signalfd emulation into a separate file in order

Re: [kvm-devel] [PATCH] Use pipe() to simulate signalfd() (v2)

2008-05-04 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: We can keep the signals blocked, but run the signalfd emulation in a separate thread (where it can dequeue signals using sigwait as an added bonus). This will reduce the differences between the two modes at the expense of increased signalfd

[kvm-devel] [PATCH 1/3] Use signalfd() in io-thread

2008-05-04 Thread Anthony Liguori
. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/Makefile.target b/qemu/Makefile.target index 2316c92..db6912e 100644 --- a/qemu/Makefile.target +++ b/qemu/Makefile.target @@ -203,7 +203,7 @@ CPPFLAGS+=-I$(SRC_PATH)/tcg/sparc endif ifeq ($(USE_KVM), 1) -LIBOBJS+=qemu-kvm.o

[kvm-devel] [PATCH 3/3] Stop dropping so many RX packets in tap (v2)

2008-05-04 Thread Anthony Liguori
. This patch also modifies the tap code to only read from the tap fd if at least one client on the VLAN is able to receive a packet. Finally, this patch changes the tap code to drain all possible packets from the tap device when the tap fd is readable. Signed-off-by: Anthony Liguori [EMAIL

[kvm-devel] [PATCH 3/3] Only select once per-main_loop iteration

2008-05-04 Thread Anthony Liguori
is very large. This patch changes main_loop_wait to only select once before doing the various other things in the main loop. This generally improves responsiveness of things like SDL but also improves individual file descriptor throughput quite dramatically. Signed-off-by: Anthony Liguori [EMAIL

[kvm-devel] [PATCH 2/3] Interrupt io thread in qemu_set_fd_handler2

2008-05-04 Thread Anthony Liguori
The select() in the IO thread may wait a long time before rebuilding the fd set. Whenever we do something that changes the fd set, we should interrupt the IO thread. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/vl.c b/qemu/vl.c index 1192759..e9f0ca4 100644 --- a/qemu/vl.c

[kvm-devel] [PATCH 2/3] Make virtio-net can_receive more accurate (v2)

2008-05-04 Thread Anthony Liguori
). This particular change makes RX performance very consistent. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c index 8d26832..5538979 100644 --- a/qemu/hw/virtio-net.c +++ b/qemu/hw/virtio-net.c @@ -14,6 +14,7 @@ #include virtio.h #include net.h

[kvm-devel] [PATCH 1/3] Revert virtio tap hack (v2)

2008-05-04 Thread Anthony Liguori
into upstream QEMU significantly easier. Since v1, we're just rebasing on the new io thread patch set. This series depends on my IO thread series. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/hw/pc.h b/qemu/hw/pc.h index 57d2123..f5157bd 100644 --- a/qemu/hw/pc.h +++ b/qemu/hw/pc.h

Re: [kvm-devel] [PATCH 3/3] Stop dropping so many RX packets in tap (v2)

2008-05-04 Thread Anthony Liguori
Dor Laor wrote: On Sun, 2008-05-04 at 15:21 -0500, Anthony Liguori wrote: Patchset looks good and reduces some nasty hacks. It probably also improves other devices like e1000 et al. Yeah, we just need to make sure they have proper can_receive handlers. I took a quick look

[kvm-devel] [PATCH 2/4] Revert virtio tap hack

2008-05-03 Thread Anthony Liguori
into upstream QEMU significantly easier. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/hw/pc.h b/qemu/hw/pc.h index 57d2123..f5157bd 100644 --- a/qemu/hw/pc.h +++ b/qemu/hw/pc.h @@ -154,7 +154,6 @@ void isa_ne2000_init(int base, qemu_irq irq, NICInfo *nd); /* virtio-net.c

[kvm-devel] [PATCH 1/4] Only select once per-main_loop iteration

2008-05-03 Thread Anthony Liguori
-timerfd.patch. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c index 0c7f49f..31c7ca7 100644 --- a/qemu/qemu-kvm.c +++ b/qemu/qemu-kvm.c @@ -401,24 +401,6 @@ void qemu_kvm_notify_work(void) pthread_kill(io_thread, SIGUSR1); } -static int

[kvm-devel] [PATCH 4/4] Stop dropping so many RX packets in tap

2008-05-03 Thread Anthony Liguori
. This patch also modifies the tap code to only read from the tap fd if at least one client on the VLAN is able to receive a packet. Finally, this patch changes the tap code to drain all possible packets from the tap device when the tap fd is readable. Signed-off-by: Anthony Liguori [EMAIL

[kvm-devel] [PATCH 3/4] Make virtio-net can_receive more accurate

2008-05-03 Thread Anthony Liguori
). This particular change makes RX performance very consistent. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c index 8d26832..5538979 100644 --- a/qemu/hw/virtio-net.c +++ b/qemu/hw/virtio-net.c @@ -14,6 +14,7 @@ #include virtio.h #include net.h

Re: [kvm-devel] [PATCH 2/4] Revert virtio tap hack

2008-05-03 Thread Anthony Liguori
Anthony Liguori wrote: While it has served us well, it is long overdue that we eliminate the virtio-net tap hack. It turns out that zero-copy has very little impact on performance. The tap hack was gaining such a significant performance boost not because of zero-copy, but because it avoided

Re: [kvm-devel] Feedback and errors

2008-05-02 Thread Anthony Liguori
of benchmarking. There are ways to share a disk without using a clustered filesystem. If a higher level management tool wants to enforce a policy (like libvirt), then let it. We should not be enforcing policies within QEMU though. Regards, Anthony Liguori

Re: [kvm-devel] Feedback and errors

2008-05-02 Thread Anthony Liguori
parameter. Regards, Anthony Liguori - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http

[kvm-devel] [PATCH] Use pipe() to simulate signalfd() (v2)

2008-05-02 Thread Anthony Liguori
. I've tested Windows and Linux guests with SMP without seeing an obvious regressions. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c index 9a9bf59..0c7f49f 100644 --- a/qemu/qemu-kvm.c +++ b/qemu/qemu-kvm.c @@ -12,6 +12,9 @@ int kvm_allowed = 1; int

Re: [kvm-devel] [PATCH] Handle vma regions with no backing page (v2)

2008-04-30 Thread Anthony Liguori
Muli Ben-Yehuda wrote: On Tue, Apr 29, 2008 at 02:09:20PM -0500, Anthony Liguori wrote: This patch allows VMA's that contain no backing page to be used for guest memory. This is a drop-in replacement for Ben-Ami's first page in his direct mmio series. Here, we continue to allow mmio

Re: [kvm-devel] [PATCH] Handle vma regions with no backing page (v2)

2008-04-30 Thread Anthony Liguori
Andrea Arcangeli wrote: On Tue, Apr 29, 2008 at 06:12:51PM -0500, Anthony Liguori wrote: IIUC PPC correctly, all IO pages have corresponding struct pages. This means that get_user_pages() would succeed and you can reference count them? In this case, we would never take the VM_PFNMAP

Re: [kvm-devel] cirrusfb division by zero

2008-04-30 Thread Anthony Liguori
is not a bad idea but what was the guest doing when this happened? Was it in the process of transitioning from one mode to another? Regards, Anthony Liguori vbetool post corrupts both SDL and VNC displays when using cirrusfb, but seems a separate problem. diff --git a/qemu/hw/cirrus_vga.c

[kvm-devel] [PATCH] Don't leak EPT identity page table

2008-04-30 Thread Anthony Liguori
In vmx.c:alloc_identity_pagetable() we grab a reference to the EPT identity page table via gfn_to_page(). We never release this reference though. This patch releases the reference to this page on VM destruction. I haven't tested this with EPT. Signed-off-by: Anthony Liguori [EMAIL PROTECTED

[kvm-devel] [PATCH] Handle vma regions with no backing page (v3)

2008-04-30 Thread Anthony Liguori
at using VM_PFNMAP instead of VM_IO and changed the BUG_ON to a return of bad_page. Since v2, I've incorporated comments from Avi about returning bad_page instead of NULL and fixed a typo spotted by Muli. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/virt/kvm/kvm_main.c b/virt/kvm

[kvm-devel] [PATCH] Handle vma regions with no backing page

2008-04-29 Thread Anthony Liguori
This patch allows VMA's that contain no backing page to be used for guest memory. This is a drop-in replacement for Ben-Ami's first page in his direct mmio series. Here, we continue to allow mmio pages to be represented in the rmap. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git

Re: [kvm-devel] [PATCH] Handle vma regions with no backing page

2008-04-29 Thread Anthony Liguori
Andrea Arcangeli wrote: On Tue, Apr 29, 2008 at 09:32:09AM -0500, Anthony Liguori wrote: +vma = find_vma(current-mm, addr); +if (vma == NULL) { +get_page(bad_page); +return page_to_pfn(bad_page); +} Here

[kvm-devel] [PATCH][RFC] Use pipe() to simulate signalfd()

2008-04-29 Thread Anthony Liguori
haven't tested this enough yet so please don't apply it. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c index 9a9bf59..46d7425 100644 --- a/qemu/qemu-kvm.c +++ b/qemu/qemu-kvm.c @@ -7,6 +7,9 @@ */ #include config.h #include config-host.h

Re: [kvm-devel] Protected mode transitions and big real mode... still an issue

2008-04-29 Thread Anthony Liguori
not updating guest state correctly. My guess would be that load_segment_descriptor is not updating the values within the VMCS. Regards, Anthony Liguori - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't

Re: [kvm-devel] Protected mode transitions and big real mode... still an issue

2008-04-29 Thread Anthony Liguori
Laurent Vivier wrote: Le mardi 29 avril 2008 à 11:41 -0500, Anthony Liguori a écrit : Guillaume Thouvenin wrote: Hello, This patch should solve the problem observed during protected mode transitions that appears for example during the installation of openSuse-10.3. Unfortunately

[kvm-devel] [PATCH] Handle vma regions with no backing page (v2)

2008-04-29 Thread Anthony Liguori
at using VM_PFNMAP instead of VM_IO and changed the BUG_ON to a return of bad_page. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 1d7991a..64e5efe 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -532,6 +532,7 @@ pfn_t

Re: [kvm-devel] [PATCH] Handle vma regions with no backing page (v2)

2008-04-29 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: This patch allows VMA's that contain no backing page to be used for guest memory. This is a drop-in replacement for Ben-Ami's first page in his direct mmio series. Here, we continue to allow mmio pages to be represented in the rmap

Re: [kvm-devel] [PATCH][RFC] Use pipe() to simulate signalfd()

2008-04-29 Thread Anthony Liguori
Marcelo Tosatti wrote: Hi Anthony, How is -no-kvm-irqchip working with the patch? Seems to work fine. What is your expectation? On Tue, Apr 29, 2008 at 09:28:14AM -0500, Anthony Liguori wrote: This patch eliminates the use of sigtimedwait() in the IO thread. To avoid the signal

Re: [kvm-devel] [PATCH] Handle vma regions with no backing page (v2)

2008-04-29 Thread Anthony Liguori
. It's easy to detect failure, but not always easy to handle it. So I think we should replace it with a rate limited printk and returning bad_page. That way the guest can't exploit it and we'll still hopefully get printk()s to track down instances of things going bad. Regards, Anthony

Re: [kvm-devel] [PATCH] Handle vma regions with no backing page (v2)

2008-04-29 Thread Anthony Liguori
, we'll be able to build that mapping on the fly (enforcing mlock allocation limits). Regards, Anthony Liguori - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's

Re: [kvm-devel] [PATCH][RFC] Use pipe() to simulate signalfd()

2008-04-29 Thread Anthony Liguori
what problems are caused by the IO thread verses time. Regards, Anthony Liguori - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use

Re: [kvm-devel] [PATCH][RFC] Use pipe() to simulate signalfd()

2008-04-29 Thread Anthony Liguori
. -no-kvm-pit doesn't make a difference (the guest is normally using the pm-timer). Regards, Anthony Liguori - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's

Re: [kvm-devel] [PATCH][RFC] Use pipe() to simulate signalfd()

2008-04-29 Thread Anthony Liguori
getting that many signals, the pipe will get full. No point in designing for something that isn't likely to happen in practice. Regards, Anthony Liguori No, they're independent of the patch. The symptom is that the guest tends to hang during boot for prolonged periods of time. It tends

Re: [kvm-devel] [PATCH] [RFC] try to reduce kvm impact in core qemu code.

2008-04-29 Thread Anthony Liguori
env- directly. Regards, Anthony Liguori - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http

[kvm-devel] fork() within a VM with MMU notifiers

2008-04-28 Thread Anthony Liguori
valid. Just avoiding destroying the VM in the -release() method won't fix this use-case I don't think. In general, I think we need to think a little more about how fork() is handled with respect to mmu notifiers. Regards, Anthony Liguori

Re: [kvm-devel] [PATCH] Fix QEMU vcpu thread race with apic_reset

2008-04-28 Thread Anthony Liguori
()). Regards, Anthony Liguori It wedges up in kvm_init_new_ap() if I attempt acquire qemu_mutex. Quite obvious after I looked at the call trace and discovered kvm_qemu_init() locking on exit. I see other various functions that unlock and then lock; I really don't want to wade into this mess

[kvm-devel] [PATCH] Don't race while creating a VCPU

2008-04-28 Thread Anthony Liguori
lets the VCPU create code that runs in the IO thread to wait for a VCPU to initialize. The second condition lets the VCPU thread wait for the machine to fully initialize before running. An added benefit of this patch is it makes the dependencies now explicit. Signed-off-by: Anthony Liguori [EMAIL

Re: [kvm-devel] Real Mode Improvement on Intel Hosts - GSoC Project

2008-04-26 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: The second stage is to use a loop of x86_emulate() to run all 16-bit code (instead of using vm86 mode). This will allow us to support guests that use big real mode. Why do that unconditionally, instead of only when in a big-real-mode state

Re: [kvm-devel] [PATCH] Fix QEMU vcpu thread race with apic_reset

2008-04-26 Thread Anthony Liguori
reason a while () is usually needed is that cond_signal may not wake up the right thread so it's necessary to check whether you really have something to do. Not really a problem here but the former race is. A condvar is definitely the right thing to use here. Regards, Anthony Liguori

Re: [kvm-devel] mmu notifier #v14

2008-04-26 Thread Anthony Liguori
anything else ever call mmu_notifier_unregister that would implicitly destroy the VM? Regards, Anthony Liguori - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event

Re: [kvm-devel] mmu notifier #v14

2008-04-26 Thread Anthony Liguori
Andrea Arcangeli wrote: On Sat, Apr 26, 2008 at 01:59:23PM -0500, Anthony Liguori wrote: +static void kvm_unmap_spte(struct kvm *kvm, u64 *spte) +{ + struct page *page = pfn_to_page((*spte PT64_BASE_ADDR_MASK) PAGE_SHIFT); + get_page(page); You should not assume

Re: [kvm-devel] Real Mode Improvement on Intel Hosts - GSoC Project

2008-04-24 Thread Anthony Liguori
big real mode. The best place to start is probably to try out some of the patches on the list, and get familiar with the GFXBOOT assembly routines. There's a #kvm in FreeNode, that's a good place to start if you're having trouble getting started. Regards, Anthony Liguori Regards, Mohammed

Re: [kvm-devel] [PATCH 0/2] Batch writes to MMIO

2008-04-23 Thread Anthony Liguori
Laurent Vivier wrote: Le mercredi 23 avril 2008 à 19:25 +0300, Avi Kivity a écrit : Laurent Vivier wrote: Le mercredi 23 avril 2008 à 10:10 -0500, Anthony Liguori a écrit : [...] The ne2k is pretty mmio heavy. You should be able to observe a boost with something like

Re: [kvm-devel] [PATCH 1/2] kvm: Batch writes to MMIO

2008-04-23 Thread Anthony Liguori
, MMIO based IRQ acknowledgement. You need a white list not only for performances purposes but also for correctness. Regards, Anthony Liguori - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss

Re: [kvm-devel] [PATCH] [RESEND] Make make sync in kernel dir work for multiple archs

2008-04-23 Thread Anthony Liguori
look right. ARCH_DIR is going to equal 'x86' so this is going to break things on x86 sinc ethe filter will return an empty string. Regards, Anthony Liguori +UNIFDEF_FILES = include/linux/kvm.h \ + include/linux/kvm_para.h \ + include/asm-$(ARCH_DIR)/kvm.h

Re: [kvm-devel] What kernel options do I need to properly enable virtio net driver

2008-04-22 Thread Anthony Liguori
Jerone Young wrote: What I am asking is do I have all the proper options in my kernel config set to use it? Yes. You just need CONFIG_VIRTIO_NET and CONFIG_VIRTIO_PCI. The remaining options will be automatically selected. Regards, Anthony Liguori On Mon, 2008-04-21 at 17:13 -0500

  1   2   3   4   5   6   7   8   9   >