Re: [kvm-devel] [RFC] linuxboot Option ROM for Linux kernel booting

2008-04-22 Thread Anthony Liguori
Nguyen Anh Quynh wrote: Hi, I am thinking about comibing this ROM with the extboot. Both two ROM are about booting, so I think that is reasonable. So we will have only 1 ROM that supports both external boot and Linux boot. Is that desirable or not? I think so. Regards, Anthony

[kvm-devel] [PATCH] Make virtio devices multi-function

2008-04-22 Thread Anthony Liguori
drivers. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/hw/pci.h b/qemu/hw/pci.h index 60e4094..df3a878 100644 --- a/qemu/hw/pci.h +++ b/qemu/hw/pci.h @@ -33,7 +33,7 @@ typedef struct PCIIORegion { #define PCI_ROM_SLOT 6 #define PCI_NUM_REGIONS 7 -#define PCI_DEVICES_MAX

Re: [kvm-devel] [PATCH] Make virtio devices multi-function

2008-04-22 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: This patch changes virtio devices to be multi-function devices whenever possible. This increases the number of virtio devices we can support now by a factor of 8. With this patch, I've been able to launch a guest with either 220 disks or 220

Re: [kvm-devel] [Qemu-devel] Re: [PATCH 1/3] Refactor AIO interface to allow other AIO implementations

2008-04-22 Thread Anthony Liguori
in that order (allowing for reordering when worthwhile by the elevator)? There's no guarantee that any sort of order will be preserved by AIO requests. The same is true with writes. This is what fdsync is for, to guarantee ordering. Regards, Anthony Liguori

Re: [kvm-devel] [RFC] linuxboot Option ROM for Linux kernel booting

2008-04-22 Thread Anthony Liguori
architectures. With a C version, it seems more reasonable now to do that. Make sure you remove all the old linux boot code too within QEMU along with the -hda checks. Regards, Anthony Liguori Thanks, Quynh # diffstat linuxboot1.diff Makefile | 13 - linuxboot/Makefile | 40

Re: [kvm-devel] [PATCH] Make virtio devices multi-function

2008-04-22 Thread Anthony Liguori
Ryan Harper wrote: * Anthony Liguori [EMAIL PROTECTED] [2008-04-22 09:16]: This patch changes virtio devices to be multi-function devices whenever possible. This increases the number of virtio devices we can support now by a factor of 8. With this patch, I've been able to launch a guest

Re: [kvm-devel] [PATCH] Make virtio devices multi-function

2008-04-22 Thread Anthony Liguori
the overall number of exits. We could easily support a very large number of devices this way. But again, what do we want to target for now? Regards, Anthony Liguori - This SF.net email is sponsored by the 2008 JavaOne(SM

Re: [kvm-devel] [PATCH] Make virtio devices multi-function

2008-04-22 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: I think we need to decide what we want to target in terms of upper limits. With a bridge or two, we can probably easily do 128. If we really want to push things, I think we should do a PCI based virtio controller. I doubt a large number of PCI

Re: [kvm-devel] [PATCH] Make virtio devices multi-function

2008-04-22 Thread Anthony Liguori
the most practical. 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

Re: [kvm-devel] [PATCH] Make virtio devices multi-function

2008-04-22 Thread Anthony Liguori
Marcelo Tosatti wrote: On Tue, Apr 22, 2008 at 05:32:45PM +0300, Avi Kivity wrote: Anthony Liguori wrote: This patch changes virtio devices to be multi-function devices whenever possible. This increases the number of virtio devices we can support now by a factor of 8

[kvm-devel] [PATCH] Make virtio devices multi-function (v2)

2008-04-22 Thread Anthony Liguori
continues to work just as well as it does now. Once you exceed the number of PCI slots, you need an OS that can do hotplug of individual PCI functions if you care about doing hotplug. I think this is a pretty reasonable trade-off. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu

Re: [kvm-devel] [RFC PATCH] virtio: change config to guest endian.

2008-04-22 Thread Anthony Liguori
, IMHO. You couldn't use the vringfd direct ring mapping optimization in KVM for PPC without teaching the kernel to access a vring in LE format. I'm pretty sure the later would get rejected on LKML anyway for vringfd as a generic mechanism. Regards, Anthony Liguori

Re: [kvm-devel] 32-bit binaries failing in 64 bit guests after using vmport

2008-04-21 Thread Anthony Liguori
functions to deal with the in-kernel APIC. It turns out, vmmouse was horribly broken with SMP guests too. See commit 9949bd84ac4dfdfc60b2974557819637b8719911 Author: Anthony Liguori [EMAIL PROTECTED] Date: Thu Apr 3 18:37:16 2008 -0500 commit 5208ce19dca268f84a2b9441c2fbb6129161e44c Author

Re: [kvm-devel] KVM console dying

2008-04-21 Thread Anthony Liguori
safe so if the IO thread is running simultaneously, very bad things could happen. Is this with standard KVM or your lock break-up patches? Regards, Anthony Liguori - This SF.net email is sponsored by the 2008 JavaOne(SM

Re: [kvm-devel] [Qemu-devel] [PATCH 1/5] PCI DMA API (v3)

2008-04-19 Thread Anthony Liguori
Blue Swirl wrote: On 4/17/08, Anthony Liguori [EMAIL PROTECTED] wrote: Yes, the vector version of packet receive is tough. I'll take a look at your patch. Basically, you need to associate a set of RX vectors with each VLANClientState and then when it comes time to deliver a packet

Re: [kvm-devel] Extboot Option ROM rewritten in C - v3

2008-04-18 Thread Anthony Liguori
why you want to do this? The thinking is to eliminate the need to hijack the boot sector when using the -kernel option. However, the linux boot stuff in extboot has been broken since hpa rewrote the boot code. It can be removed for now and I'll eventually revisit it. Regards, Anthony

Re: [kvm-devel] Extboot Option ROM rewritten in C - v3

2008-04-18 Thread Anthony Liguori
disk access. Regards, Anthony Liguori -hpa - 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

Re: [kvm-devel] [PATCH] gfxboot VMX workaround v2

2008-04-18 Thread Anthony Liguori
updating eip correctly? Regards, Anthony Liguori + case 0xe6: /* out imm8, al */ + case 0xe7: /* out imm8, ax/eax */ { + struct kvm_io_device *pio_dev; + + pio_dev = vcpu_find_pio_dev(ctxt-vcpu, c-src.val

Re: [kvm-devel] [PATCH 3/6] KVM: MMU: Add EPT support

2008-04-18 Thread Anthony Liguori
; 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://ad.doubleclick.net/clk

Re: [kvm-devel] [PATCH 3/3] Implement linux-aio backend

2008-04-18 Thread Anthony Liguori
Marcelo Tosatti wrote: On Thu, Apr 17, 2008 at 02:26:52PM -0500, Anthony Liguori wrote: This patch introduces a Linux-aio backend that is disabled by default. To use this backend effectively, the user should disable caching and select it with the appropriate -aio option. For instance

Re: [kvm-devel] Extboot Option ROM rewritten in C - v3

2008-04-18 Thread Anthony Liguori
Nguyen Anh Quynh wrote: You no longer have to specify a -hda option when using -kernel. Without -hda, how can we load disk image? Or you mean you only want to test the kernel? Right. You may be booting from NFS, iSCSI, or something like that. Regards, Anthony Liguori Thanks

Re: [kvm-devel] [Qemu-devel] Re: [PATCH 1/3] Refactor AIO interface to allow other AIO implementations

2008-04-18 Thread Anthony Liguori
. We can add selection criteria later but semantically, not specifying an explicit -aio option allows QEMU to choose whichever one it thinks is best. Regards, Anthony Liguori - This SF.net email is sponsored by the 2008

Re: [kvm-devel] [PATCH] gfxboot VMX workaround v2

2008-04-18 Thread Anthony Liguori
Guillaume Thouvenin wrote: On Fri, 18 Apr 2008 08:23:07 -0500 Anthony Liguori [EMAIL PROTECTED] wrote: This doesn't seem right. You should have been able to break out of the emulator long before encountering an out instruction. The next instruction you encounter should be a mov

Re: [kvm-devel] [PATCH 3/6] KVM: MMU: Add EPT support

2008-04-18 Thread Anthony Liguori
Yang, Sheng wrote: On Friday 18 April 2008 21:30:14 Anthony Liguori wrote: Yang, Sheng wrote: @@ -1048,17 +1071,18 @@ static void mmu_set_spte(struct kvm_vcpu *vcpu, u64 *shadow_pte, * whether the guest actually used the pte (in order to detect * demand paging

[kvm-devel] [PATCH 1/3] Refactor AIO interface to allow other AIO implementations

2008-04-17 Thread Anthony Liguori
. This patch adds a command line option (-aio) to select the AIO implementation to be used. It avoids code motion to allow for easy review. The next patch separates out the posix-aio implementation. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/block-aio.h b/block-aio.h new file

[kvm-devel] [PATCH 2/3] Split out posix-aio code

2008-04-17 Thread Anthony Liguori
This patch moves the posix-aio code into a separate file. It's strictly code motion, no new functionality is introduced. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/Makefile b/Makefile index a8df278..916f071 100644 --- a/Makefile +++ b/Makefile @@ -139,7 +139,7

[kvm-devel] [PATCH 3/3] Implement linux-aio backend

2008-04-17 Thread Anthony Liguori
wait with linux-aio. At some point, signals were added to signal completion. More recently, and eventfd interface was added. This patch relies on the later. We try hard to detect whether the right support is available in configure to avoid compile failures. Signed-off-by: Anthony Liguori [EMAIL

Re: [kvm-devel] [PATCH 1/3] Refactor AIO interface to allow other AIO implementations

2008-04-17 Thread Anthony Liguori
Daniel P. Berrange wrote: On Thu, Apr 17, 2008 at 02:26:50PM -0500, Anthony Liguori wrote: Posix AIO, especially as used by QEMU, is not very efficient for disk IO. This patch introduces an AIO abstract to allow multiple AIO implements to be used. We can't simply replace posix-aio

Re: [kvm-devel] [PATCH 1/3] Refactor AIO interface to allow other AIO implementations

2008-04-17 Thread Anthony Liguori
of the host page cache. It's not necessary an easy decision either way. For libvirt, I'd recommend just never using -aio linux. We'll have a better AIO option in the near future (based on Rusty's vringfd work) and I'd like to detect and enable that by default. Regards, Anthony Liguori Dan

Re: [kvm-devel] [Qemu-devel] [PATCH 1/5] PCI DMA API (v3)

2008-04-17 Thread Anthony Liguori
the initial readv() to one of the clients RX buffers and then copy that RX buffer to the rest of the clients if necessary. Regards, Anthony Liguori IMHO the read/write functions should be a property of the bus so that they are hidden from the device, for pcnet it does not matter as we have to do

Re: [kvm-devel] [patch 2/2] QEMU: decrease console refresh rate with -nographic

2008-04-16 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: What about aio completions? The only race-free way to handle both posix aio completion and fd readiness is signals AFAIK. We poll aio completion after the select don't we? Worst case scenario we miss a signal and wait to poll after the next

Re: [kvm-devel] Extboot Option ROM rewritten in C - v2

2008-04-16 Thread Anthony Liguori
if you can boot Windows with this version. I'll test it out. Please send it to the list as a patch against kvm-userspace. Regards, Anthony Liguori Thanks, Quynh --- This code is an attempt to rewrite the current extboot option rom in C. The new code now minimize the assembly code, so

Re: [kvm-devel] Extboot Option ROM rewritten in C - v2

2008-04-16 Thread Anthony Liguori
Anthony Liguori wrote: A couple general comments. I'd feel a lot more comfortable with the int13 handler returning an int and the asm stub code uses that result to determine how to set CF. You set CF deep within the function stack and there's no guarantee that GCC isn't going to stomp

Re: [kvm-devel] Extboot Option ROM rewritten in C - v2

2008-04-16 Thread Anthony Liguori
want to raise int18 when we get a command we don't understand. We should just not change any of the register state. There are a number of extended commands that look for a magic value to determine whether the command exists or not. Regards, Anthony Liguori Nguyen Anh Quynh wrote: Hi Anthony

Re: [kvm-devel] [Qemu-devel] [PATCH 1/5] PCI DMA API (v3)

2008-04-16 Thread Anthony Liguori
Blue Swirl wrote: On 4/16/08, Anthony Liguori [EMAIL PROTECTED] wrote: This patch introduces a DMA API and plumbs support through the DMA layer. We use a mostly opaque structure, IOVector to represent a scatter/gather list of physical memory. Associated with each IOVector is a read

Re: [kvm-devel] [PATCH] add virtio disk geometry feature

2008-04-16 Thread Anthony Liguori
is 4 so the endianness conversion will do the wrong thing. Magic endianness conversion based on read size is looking pretty evil to me... Perhaps we need explicit *_val[8,16,32,64]? Regards, Anthony Liguori - This SF.net

[kvm-devel] [RFC] Multiple QEMU AIO implementations

2008-04-16 Thread Anthony Liguori
-aio, and for older guests, just fall back to unix aio. We can also introduce a linux-aio and use that when possible. Regards, Anthony Liguori qemu-block-aio-unix.patch Description: application/mbox - This SF.net email

Re: [kvm-devel] [patch 2/2] QEMU: decrease console refresh rate with -nographic

2008-04-15 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: BTW, when we set O_ASYNC on the tap fd, we're eliminating O_NONBLOCK. This means that we have to poll loop select() when readv()'ing packets instead of just reading until hitting AGAIN. This means at least an extra syscall per packet. I didn't

Re: [kvm-devel] [patch 2/2] QEMU: decrease console refresh rate with -nographic

2008-04-15 Thread Anthony Liguori
should break out of the select() on signal delivery. 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 2/2] QEMU: decrease console refresh rate with -nographic

2008-04-15 Thread Anthony Liguori
Marcelo Tosatti wrote: On Tue, Apr 15, 2008 at 05:45:28PM +0300, Avi Kivity wrote: Anthony Liguori wrote: Why did we ever need sigtimedwait() anyway? Even if we were select()ing within the VCPU context, we should break out of the select() on signal delivery. select

Re: [kvm-devel] [patch 2/2] QEMU: decrease console refresh rate with -nographic

2008-04-15 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: With the IO thread, we don't have to worry about lost signals like we do in a VCPU thread so it's fine to just use select() and install signal handlers IIUC. What about aio completions? The only race-free way to handle both posix aio completion

[kvm-devel] [PATCH 2/5] virtio for QEMU (v3)

2008-04-15 Thread Anthony Liguori
the proper access functions to manipulate guest memory. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/Makefile.target b/Makefile.target index 8470164..3e9f7b1 100644 --- a/Makefile.target +++ b/Makefile.target @@ -534,6 +534,9 @@ OBJS += pcnet.o OBJS += rtl8139.o OBJS += e1000.o

[kvm-devel] [PATCH 3/5] virtio network driver (v3)

2008-04-15 Thread Anthony Liguori
-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/Makefile.target b/Makefile.target index 3e9f7b1..ea632fa 100644 --- a/Makefile.target +++ b/Makefile.target @@ -535,7 +535,7 @@ OBJS += rtl8139.o OBJS += e1000.o # virtio devices -OBJS += virtio.o +OBJS += virtio.o virtio-net.o ifeq

[kvm-devel] [PATCH 4/5] virtio block driver (v3)

2008-04-15 Thread Anthony Liguori
This patch implements the virtio block driver backend. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/Makefile.target b/Makefile.target index ea632fa..4d695c7 100644 --- a/Makefile.target +++ b/Makefile.target @@ -535,7 +535,7 @@ OBJS += rtl8139.o OBJS += e1000.o # virtio

[kvm-devel] [PATCH 5/5] virtio balloon driver (v3)

2008-04-15 Thread Anthony Liguori
when using this driver. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/Makefile.target b/Makefile.target index 4d695c7..dead372 100644 --- a/Makefile.target +++ b/Makefile.target @@ -535,7 +535,7 @@ OBJS += rtl8139.o OBJS += e1000.o # virtio devices -OBJS += virtio.o virtio-net.o

[kvm-devel] [PATCH 1/5] PCI DMA API (v3)

2008-04-15 Thread Anthony Liguori
of the data while providing an easy mechanism to short-cut the zero-copy case in the block/net backends. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/Makefile b/Makefile index adb50a8..a8df278 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ recurse-all: $(patsubst %,subdir

Re: [kvm-devel] [PATCH 1 of 4] Add make sync to sync need kernel headers to kvm-userspace

2008-04-14 Thread Anthony Liguori
in kernel/ already does this. Why not just add PPC support there. Regards, Anthony Liguori Signed-off-by: Jerone Young [EMAIL PROTECTED] diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ rpmrelease = devel .PHONY: kernel user libkvm qemu bios vgabios extboot

Re: [kvm-devel] [PATCH 1 of 4] Add make sync to sync need kernel headers to kvm-userspace

2008-04-14 Thread Anthony Liguori
headers locally without the need of compiled kernel source. Please just keep a copy of the kernel headers in the userspace tree so it can be built standalone. This is what make sync in kernel/ does FWIW and what we distribute for releases. Regards, Anthony Liguori

Re: [kvm-devel] [PATCH 1 of 4] Add make sync to sync need kernel headers to kvm-userspace

2008-04-14 Thread Anthony Liguori
split libkvm into it's own library and remove the dependency of kernel headers from libkvm consumers, this will stop being a problem in practice. Regards, Anthony Liguori - This SF.net email is sponsored by the 2008

Re: [kvm-devel] [PATCH] wrong pa calculation fix (extboot)

2008-04-14 Thread Anthony Liguori
Nguyen Anh Quynh wrote: On 4/14/08, Anthony Liguori [EMAIL PROTECTED] wrote: Nguyen Anh Quynh wrote: In practice, this check isn't actually necessary since a guest always has at least 1MB of memory. Agreed. But it needs to be fixed, anyway. Or we can remove it. Please

Re: [kvm-devel] [PATCH] wrong pa calculation fix (extboot)

2008-04-14 Thread Anthony Liguori
; + target_ulong pa = cmd-xfer.segment * 16 + cmd-xfer.offset; /* possible buffer overflow */ if ((pa + cmd-xfer.nb_sectors * 512) phys_ram_size) In practice, this check isn't actually necessary since a guest always has at least 1MB of memory. Regards, Anthony Liguori

Re: [kvm-devel] [PATCH] wrong pa calculation fix (extboot)

2008-04-14 Thread Anthony Liguori
Nguyen Anh Quynh wrote: On 4/14/08, Anthony Liguori [EMAIL PROTECTED] wrote: In practice, this check isn't actually necessary since a guest always has at least 1MB of memory. Agreed. But it needs to be fixed, anyway. Or we can remove it. I should mention, the reason

Re: [kvm-devel] [patch 2/2] QEMU: decrease console refresh rate with -nographic

2008-04-14 Thread Anthony Liguori
. 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://ad.doubleclick.net/clk

Re: [kvm-devel] Extboot Option Rom rewritten in C

2008-04-14 Thread Anthony Liguori
the Windows issues, this is definitely the right way to go. Regards, Anthony Liguori See the code in attachment. The new code consists of a very small assembly file boot.S, which merely interfaces with the C code. signrom is modified to work with the new binary image. - To compile code, just run

Re: [kvm-devel] Extboot Option Rom rewritten in C

2008-04-14 Thread Anthony Liguori
Nguyen Anh Quynh wrote: On 4/15/08, Anthony Liguori [EMAIL PROTECTED] wrote: Hi Nguyen, Nguyen Anh Quynh wrote: Hi Anthony, I spot a bug and few dead code in the extboot option rom. Perhaps the reason they are there is because less people want to look at assembly code

Re: [kvm-devel] disappointing speed with virtio_blk

2008-04-13 Thread Anthony Liguori
, Anthony Liguori I ran bonnie++ -r 512 -s 2048 -u nobody -d /tmp: Version 1.03 --Sequential Output-- --Sequential Input- --Random- -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- MachineSize K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec

Re: [kvm-devel] how to automate installation of kvm guests

2008-04-11 Thread Anthony Liguori
-disable and http://kvm.qumranet.com/kvmwiki/KVMTest Regards, Anthony Liguori Thank you very much in advanced, Regards Miguel - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss

Re: [kvm-devel] [patch 1/2] QEMU: use SIGARLM for alarm timers, enable SIGIO on qemu_set_fd_handler2()

2008-04-11 Thread Anthony Liguori
With the IO thread, shouldn't we be striving to perform the select()s within the IO thread itself to completely avoid the need to use SIGIO at all? Regards, Anthony Liguori Marcelo Tosatti wrote: From: Anders Melchiorsen [EMAIL PROTECTED] Without I/O signals, qemu is relying on periodic

Re: [kvm-devel] Crash when booting from SCSI disk using Grub

2008-04-11 Thread Anthony Liguori
problem. What guest are you trying to install? Regards, Anthony Liguori exception 13 (33) rax rbx 0800 rcx rdx 00e0 rsi 7d98 rdi 0008f788 rsp 2018 rbp 0001 r8 r9

Re: [kvm-devel] [PATCH] kvm-userspace: fix compilation breakage when in-kernel pit is not detected

2008-04-10 Thread Anthony Liguori
returned 1 exit status This patch fixes this little issue. A better solution is to wrap qemu_kvm_put_in_kernel in an #ifdef KVM_CAP_PIT so that if it isn't defined, it always returns 0. gcc will then do the right thing. Regards, Anthony Liguori Signed-off-by: Joerg Roedel [EMAIL PROTECTED

Re: [kvm-devel] virtio with 2.6.25-rc8: problem with /dev/vda

2008-04-09 Thread Anthony Liguori
, it'll all get built by default so users won't have to deal with this sort of thing. Regards, Anthony Liguori Thanks, Jun - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's

Re: [kvm-devel] [PATCH] gfxboot VMX workaround v2

2008-04-08 Thread Anthony Liguori
Guillaume Thouvenin wrote: On Mon, 07 Apr 2008 11:05:06 -0500 Anthony Liguori [EMAIL PROTECTED] wrote: Perhaps a viable way to fix this upstream would be to catch the vmentry failure, look to see if SS.CPL != CS.CPL, and if so, invoke x86_emulate() in a loop until SS.CPL == CS.CPL

Re: [kvm-devel] [PATCH] gfxboot VMX workaround v2

2008-04-07 Thread Anthony Liguori
to x86_emulate (if they aren't already there). Regards, Anthony Liguori Alex - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference

Re: [kvm-devel] [PATCH] gfxboot VMX workaround v2

2008-04-07 Thread Anthony Liguori
Alexander Graf wrote: On Apr 7, 2008, at 6:05 PM, Anthony Liguori wrote: Alexander Graf wrote: Hi, this is an improved version of the patch I sent several weeks ago to this list. Functionally nothing changed; it still hacks into gfxboot and patches it to work on Intel CPUs on the fly

Re: [kvm-devel] [PATCH] gfxboot VMX workaround v2

2008-04-07 Thread Anthony Liguori
Alexander Graf wrote: On Apr 7, 2008, at 6:51 PM, Anthony Liguori wrote: Alexander Graf wrote: On Apr 7, 2008, at 6:05 PM, Anthony Liguori wrote: Alexander Graf wrote: Hi, this is an improved version of the patch I sent several weeks ago to this list. Functionally nothing changed

Re: [kvm-devel] [Qemu-devel] [PATCH 2/6] PCI DMA API (v2)

2008-04-06 Thread Anthony Liguori
andrzej zaborowski wrote: On 06/04/2008, Anthony Liguori [EMAIL PROTECTED] wrote: Blue Swirl wrote: To support Sparc IOMMU and DMA controller I need a way to call a series of different translation functions depending on the bus where we are. For the byte swapping case the memcpy

Re: [kvm-devel] performance tuning, problem with paravirtualized clock

2008-04-06 Thread Anthony Liguori
is Intel's version of NPT). Can you be specific about your guest configurations? Are you using -smp 8? Regards, Anthony Liguori anyways keep up the good work! cheers! nik - This SF.net email is sponsored by the 2008 JavaOne

Re: [kvm-devel] performance tuning, problem with paravirtualized clock

2008-04-06 Thread Anthony Liguori
Nikola Ciprich wrote: Hi Anthony! Anthony Liguori wrote: I would think you should get about 70% of native with what you've done about. I've not seen instabilities with CONFIG_KVM_CLOCK myself. Setting up a hugetlbfs mount and using -mem-path may give you a bit of a bump too but I'd

Re: [kvm-devel] performance tuning, problem with paravirtualized clock

2008-04-06 Thread Anthony Liguori
Nikola Ciprich wrote: Anthony Liguori wrote: You won't see a gain with tmpfs. Make sure you reserve huge pages first. For a 1GB guest, you'll need something like: echo 540 /proc/sys/vm/nr_hugepages When you create a VM, you need a bit more memory than 1GB for per-guest overhead

Re: [kvm-devel] extboot usage?

2008-04-05 Thread Anthony Liguori
Jun Koi wrote: On 4/4/08, Anthony Liguori [EMAIL PROTECTED] wrote: Jun Koi wrote: On 4/4/08, Laurent Vivier [EMAIL PROTECTED] wrote: Le vendredi 04 avril 2008 à 18:29 +0900, Jun Koi a écrit : On 4/3/08, Anthony Liguori [EMAIL PROTECTED] wrote

Re: [kvm-devel] problem using kvm-guest-drivers

2008-04-05 Thread Anthony Liguori
device appear. What am I doing wrong? Oh and I'm using kvm-64 with 2.6.24 for host. Make sure you have virtio_pci loaded in the guest. Regards, Anthony Liguori Thanks a lot in advance for any hints. BR nik

Re: [kvm-devel] extboot usage?

2008-04-04 Thread Anthony Liguori
Jun Koi wrote: On 4/4/08, Laurent Vivier [EMAIL PROTECTED] wrote: Le vendredi 04 avril 2008 à 18:29 +0900, Jun Koi a écrit : On 4/3/08, Anthony Liguori [EMAIL PROTECTED] wrote: Jun Koi wrote: Hi, Could someone please post some concret examples on how

[kvm-devel] [PATCH] Fix external module install for new host kernels

2008-04-04 Thread Anthony Liguori
KVM kernel modules are now located in arch/x86/kvm so make sure to rename those too. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/kernel/Makefile b/kernel/Makefile index fb053eb..c30c8b2 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -61,7 +61,8 @@ sync: install

Re: [kvm-devel] [Qemu-devel] [PATCH 3/6] virtio for QEMU

2008-04-04 Thread Anthony Liguori
, len)); +} + Oh, this bit is different because you need to do offsetof(Type, member) and vq-vring.desc[i] is not a type. It only works when you're doing an array with member[X]. Regards, Anthony Liguori - This SF.net

[kvm-devel] [PATCH 2/6] PCI DMA API (v2)

2008-04-04 Thread Anthony Liguori
added comments and provided an API for using IOVectors with the network and block layers. It's not optimized at the moment as enabling true zero-copy will require more patches at a later time. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/Makefile.target b/Makefile.target index

[kvm-devel] [PATCH 1/6] Use ram_addr_t for cpu_get_physical_page_desc (v2)

2008-04-04 Thread Anthony Liguori
uint32_t is the wrong type to use to represent physical addresses. This patch is unchanged since v1. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/cpu-all.h b/cpu-all.h index 2a2b197..9e5d33b 100644 --- a/cpu-all.h +++ b/cpu-all.h @@ -834,7 +834,7 @@ typedef uint32_t

[kvm-devel] [PATCH 4/6] virtio network driver (v2)

2008-04-04 Thread Anthony Liguori
-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/Makefile.target b/Makefile.target index 6815ba8..3ea40d1 100644 --- a/Makefile.target +++ b/Makefile.target @@ -535,7 +535,7 @@ OBJS += rtl8139.o OBJS += e1000.o # virtio devices -OBJS += virtio.o +OBJS += virtio.o virtio-net.o ifeq

[kvm-devel] [PATCH 6/6] virtio balloon driver (v2)

2008-04-04 Thread Anthony Liguori
when using this driver. Since v1, I've updated the patch based on the IOVector refactoring and fixed an endianness bug in the config space. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/Makefile.target b/Makefile.target index f9fe660..86a0bf5 100644 --- a/Makefile.target +++ b

[kvm-devel] [PATCH 3/6] virtio for QEMU (v2)

2008-04-04 Thread Anthony Liguori
the proper access functions to manipulate guest memory. Since v1, I've updated the patch based on the IOVector refactoring. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/Makefile.target b/Makefile.target index 94f3e58..6815ba8 100644 --- a/Makefile.target +++ b/Makefile.target

[kvm-devel] [PATCH 5/6] virtio block driver (v2)

2008-04-04 Thread Anthony Liguori
This patch implements the virtio block driver backend. Since v1, I've updated the patch based on the IOVector refactoring and fixed an endianness bug in the config space. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/Makefile.target b/Makefile.target index 3ea40d1..f9fe660

Re: [kvm-devel] extboot usage?

2008-04-03 Thread Anthony Liguori
Jun Koi wrote: Hi, Could someone please post some concret examples on how to use extboot? I looked around, but saw nothing. Just append boot=on to your -drive parameter. Regards, Anthony Liguori Thanks, Jun

[kvm-devel] [PATCH] Fix vmmouse with -smp

2008-04-03 Thread Anthony Liguori
The vmport code is very broken for SMP guests. It uses a global CPUState that's initialized multiple times? At any rate, since it needs to know CPU registers for the current CPU in a PIO handler, it needs to use cpu_single_env. This patch makes vmmouse when using -smp 1 Signed-off-by: Anthony

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-02 Thread Anthony Liguori
hack_module.awk to add the refcount back. This has the dependency on mmu notifiers so step 1 can conceivably be merged in the absence of mmu notifiers. Regards, Anthony Liguori 3. Export follow_page() or something based on fast_gup(), and use it btw, if we change the method we use to read

Re: [kvm-devel] How guest virtual address is translated to physical address?

2008-04-02 Thread Anthony Liguori
that it's page table is, in fact, installed but it's really the shadow page table that's in the hardware register. Regards, Anthony Liguori Thanks for your help, Guillaume - Check out the new SourceForge.net

[kvm-devel] [PATCH] Don't assume struct page for x86 MMU

2008-04-02 Thread Anthony Liguori
make those things pretty straight forward. Since we're only introducing new common symbols, I don't think it will break the non-x86 architectures but I haven't tested those. I've tested Intel, AMD, NPT, and hugetlbfs with Windows and Linux guests. Signed-off-by: Anthony Liguori [EMAIL PROTECTED

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-01 Thread Anthony Liguori
. Bonus points if it can validate that there isn't a valid Linux driver loaded for the given PCI device. Regards, Anthony Liguori There are some issues with refcounting, but Andrea has some tricks to deal

[kvm-devel] [PATCH] Fix endianness for virtio-blk config space

2008-04-01 Thread Anthony Liguori
The virtio config space is little endian. Make sure that in virtio-blk we store the values in little endian format. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/hw/virtio-blk.c b/qemu/hw/virtio-blk.c index 0f55d2a..492bd7f 100644 --- a/qemu/hw/virtio-blk.c +++ b/qemu/hw

Re: [kvm-devel] booting from virtio-blk

2008-04-01 Thread Anthony Liguori
conversion applied. The other option would have been to provide config_get() and config_get8/16/32/64() the later performing endian conversion. Regards, Anthony Liguori Attached is a boot log of a PowerPC guest booting from virtio-blk root. ramdisk_image is the standard ~4MB image provided with DENX

Re: [kvm-devel] booting from virtio-blk

2008-04-01 Thread Anthony Liguori
Hollis Blanchard wrote: On Tue, 2008-04-01 at 09:46 -0500, Anthony Liguori wrote: Thanks Anthony, you've saved me a lot of debug time! Rusty, doing 64-bit PCI config space accesses with ioread8() definitely violates the principle of least surprises, and would have taken me a long time

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-01 Thread Anthony Liguori
Andrea Arcangeli wrote: On Tue, Apr 01, 2008 at 10:20:49AM -0500, Anthony Liguori wrote: Which is apparently entirely unnecessary as we already have /sys/bus/pci/.../region. It's just a matter of checking if a vma is VM_IO and then dealing with the subsequent reference counting issues

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-01 Thread Anthony Liguori
to be equivalent to /dev/mem access but it's really a special case. Unless you have an IOMMU, you would not do PCI pass-through if you cared at all about security/reliability. Regards, Anthony Liguori - Check out the new

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-01 Thread Anthony Liguori
dealing with IO memory. Regards, Anthony Liguori - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk

Re: [kvm-devel] [kvm-ppc-devel] booting from virtio-blk

2008-04-01 Thread Anthony Liguori
Benjamin Herrenschmidt wrote: On Tue, 2008-04-01 at 12:09 -0500, Anthony Liguori wrote: It's the unfortunate side-effect of using PCI config space without passing it's semantics through to the virtio devices. Right now, you do a config_get which is basically a memcpy. If we didn't do

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-01 Thread Anthony Liguori
Andrea Arcangeli wrote: On Tue, Apr 01, 2008 at 01:21:37PM -0500, Anthony Liguori wrote: return a page, not a HPA. I haven't looked too deeply yet, but my suspicion is that to properly support mapping in VM_IO pages will require some general refactoring since we always assume

[kvm-devel] [PATCH 1/2] Refactor in-kernel PIT to a separate device

2008-03-31 Thread Anthony Liguori
This patch refactors the in-kernel PIT to be a logically separate device. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/qemu/hw/i8254.c b/qemu/hw/i8254.c index e215f8b..bcd9dba 100644 --- a/qemu/hw/i8254.c +++ b/qemu/hw/i8254.c @@ -30,6 +30,9 @@ //#define DEBUG_PIT +#define

Re: [kvm-devel] [Qemu-devel] [PATCH 2/6] PCI DMA API

2008-03-30 Thread Anthony Liguori
Paul Brook wrote: On Saturday 29 March 2008, Anthony Liguori wrote: This patch introduces a PCI DMA API and some generic code to support other DMA APIs. Two types are introduced: PhysIOVector and IOVector. A DMA API maps a PhysIOVector, which is composed of target_phys_addr_t

Re: [kvm-devel] [Qemu-devel] [PATCH 2/6] PCI DMA API

2008-03-30 Thread Anthony Liguori
Blue Swirl wrote: On 3/30/08, Anthony Liguori [EMAIL PROTECTED] wrote: This patch introduces a PCI DMA API and some generic code to support other DMA APIs. Two types are introduced: PhysIOVector and IOVector. A DMA API maps a PhysIOVector, which is composed of target_phys_addr_t

Re: [kvm-devel] [PATCH 2/6] PCI DMA API

2008-03-30 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: This patch introduces a PCI DMA API and some generic code to support other DMA APIs. Two types are introduced: PhysIOVector and IOVector. A DMA API maps a PhysIOVector, which is composed of target_phys_addr_t, into an IOVector, which is composed

Re: [kvm-devel] [Qemu-devel] [PATCH 2/6] PCI DMA API

2008-03-30 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: This looks like it wouldn't scale to handle the Sparc systems. There we want to make more translation steps from DVMA addresses to physical in DMA controller and IOMMU and only in the final stage to void *. To handle this, probably there should

Re: [kvm-devel] [Qemu-devel] [PATCH 4/6] virtio network driver

2008-03-30 Thread Anthony Liguori
Paul Brook wrote: On Saturday 29 March 2008, Anthony Liguori wrote: +if ((elem = virtqueue_pop(n-rx_vq)) == NULL) { + /* wait until the guest adds some rx bufs */ + n-can_receive = 0; + return; +} Setting can_receive to zero *after* dropping a packet

<    1   2   3   4   5   6   7   8   9   >