Carlo Marcelo Arenas Belon | 1 Jan 2008 02:27
Picon

Re: [PATCH] kvm/qemu: Fix ia64 build broken.

On Fri, Dec 21, 2007 at 10:58:23PM +0800, Zhang, Xiantao wrote:
> Due to last merge with Qemu upstream, some interfaces are changed, and
> leads to build fail

kvm-58 as released doesn't build in ia64 either because of the tpr/vapic
changes that were done at release date as shown by :

gcc  -Wl,-G0 -Wl,-T,/house/cmarenas/kvm-58/qemu/ia64.ld -L
/house/cmarenas/kvm-58/qemu/../libkvm  -g -o qemu-system-ia64 vl.o osdep.o
monitor.o pci.o loader.o isa_mmio.o migration.o block-raw-posix.o lsi53c895a.o
usb-ohci.o eeprom93xx.o eepro100.o ne2000.o pcnet.o rtl8139.o hypercall.o
ide.o pckbd.o ps2.o vga.o sb16.o es1370.o dma.o fdc.o mc146818rtc.o serial.o
i8259.o ipf.o cirrus_vga.o parallel.o acpi.o piix_pci.o usb-uhci.o
/house/cmarenas/kvm-58/qemu/smbus_eeprom.o ../libqemu_common.a libqemu.a
/house/cmarenas/kvm-58/qemu/../libkvm/libkvm.a  -lm -lz -lkvm   -lrt -lpthread
-lutil
libqemu.a(kvm-tpr-opt.o): In function `kvm_tpr_opt_setup':
/house/cmarenas/kvm-58/qemu/kvm-tpr-opt.c:287: undefined reference to
`kvm_enable_tpr_access_reporting'
libqemu.a(kvm-tpr-opt.o): In function `enable_vapic':
/house/cmarenas/kvm-58/qemu/kvm-tpr-opt.c:221: undefined reference to
`kvm_enable_vapic'

Xiantao, are there any plans to merge into qemu all changes required to get
host/guest support for ia64?, if for nothing else that could help with
problems due to qemu merges.

Avi, how would you like patches to fix build issues in ia64 to be handled?,
should be expected that kvm releases build for ia64? is there any system that
could be used as part of a compile farm / testing for ia64?
(Continue reading)

Avi Kivity | 1 Jan 2008 10:04

Re: [PATCH] kvm/qemu: Fix ia64 build broken.

Carlo Marcelo Arenas Belon wrote:
> Avi, how would you like patches to fix build issues in ia64 to be handled?,
> should be expected that kvm releases build for ia64? is there any system that
> could be used as part of a compile farm / testing for ia64?
>
>   

In theory every commit should compile and build on ia64.  I still don't 
have an ia64 cross compiler so that doesn't work in practice.

> if nothing is available hp's testdrive have some itanium systems that could be
> used at least to validate the userspace part builds (as I did) :
>
>   http://www.testdrive.hp.com/systems/itanium.shtml
>   

I prefer a cross compiler, but if that turns out to difficult to set up, 
this can be a good substitute.

--

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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Zhang, Xiantao | 1 Jan 2008 16:31
Picon
Favicon

Re: [PATCH] kvm/qemu: Fix ia64 build broken.

Carlo Marcelo Arenas Belon wrote:

Thank you for reporting this issue. I will fix it later. 

> libqemu.a(kvm-tpr-opt.o): In function `enable_vapic':
> /house/cmarenas/kvm-58/qemu/kvm-tpr-opt.c:221: undefined reference to
> `kvm_enable_vapic'
> 
> Xiantao, are there any plans to merge into qemu all changes required
> to get host/guest support for ia64?, if for nothing else that could
> help with problems due to qemu merges.

Yes, we indeed have plan to push the changes to upstream  for qemu/ia64
support. But you know, the current change mostly works on kvm
infrastructure, so we more time to identify them out, and to see which
changes can benefits qemu, and to decide the final push.  Qemu/ia64
support should be support from the long run. :-)

> Avi, how would you like patches to fix build issues in ia64 to be
> handled?, should be expected that kvm releases build for ia64? is
> there any system that could be used as part of a compile farm /
> testing for ia64? 
> 
> if nothing is available hp's testdrive have some itanium systems that
> could be used at least to validate the userspace part builds (as I
> did) : 
Good choice!  But seems still be complex to maintainer. I will find the
method to setup cross-compile, and hope it will help Avi to validate
them. 
Xiantao
(Continue reading)

Avi Kivity | 1 Jan 2008 16:35

[PATCH 02/54] KVM: Remove gpa_to_hpa()

Converting last uses along the way.

Signed-off-by: Avi Kivity <avi@...>
---
 drivers/kvm/kvm.h |    1 -
 drivers/kvm/mmu.c |   21 +++------------------
 2 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index 31315bc..1fd8158 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
 <at>  <at>  -375,7 +375,6  <at>  <at>  int kvm_init(void *opaque, unsigned int vcpu_size,
 		  struct module *module);
 void kvm_exit(void);

-hpa_t gpa_to_hpa(struct kvm *kvm, gpa_t gpa);
 #define HPA_MSB ((sizeof(hpa_t) * 8) - 1)
 #define HPA_ERR_MASK ((hpa_t)1 << HPA_MSB)
 static inline int is_error_hpa(hpa_t hpa) { return hpa >> HPA_MSB; }
diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c
index 6aa0319..9b75b10 100644
--- a/drivers/kvm/mmu.c
+++ b/drivers/kvm/mmu.c
 <at>  <at>  -868,26 +868,13  <at>  <at>  static void page_header_update_slot(struct kvm *kvm, void *pte, gfn_t gfn)
 	__set_bit(slot, &page_head->slot_bitmap);
 }

-hpa_t gpa_to_hpa(struct kvm *kvm, gpa_t gpa)
-{
(Continue reading)

Avi Kivity | 1 Jan 2008 16:35

[PATCH 01/54] KVM: MMU: Remove gva_to_hpa()

No longer used.

Signed-off-by: Avi Kivity <avi <at> qumranet.com>
---
 drivers/kvm/kvm.h |    1 -
 drivers/kvm/mmu.c |    9 ---------
 2 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index eda82cd..31315bc 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
 <at>  <at>  -379,7 +379,6  <at>  <at>  hpa_t gpa_to_hpa(struct kvm *kvm, gpa_t gpa);
 #define HPA_MSB ((sizeof(hpa_t) * 8) - 1)
 #define HPA_ERR_MASK ((hpa_t)1 << HPA_MSB)
 static inline int is_error_hpa(hpa_t hpa) { return hpa >> HPA_MSB; }
-hpa_t gva_to_hpa(struct kvm_vcpu *vcpu, gva_t gva);
 struct page *gva_to_page(struct kvm_vcpu *vcpu, gva_t gva);

 extern struct page *bad_page;
diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c
index 1965185..6aa0319 100644
--- a/drivers/kvm/mmu.c
+++ b/drivers/kvm/mmu.c
 <at>  <at>  -881,15 +881,6  <at>  <at>  hpa_t gpa_to_hpa(struct kvm *kvm, gpa_t gpa)
 	return hpa;
 }

-hpa_t gva_to_hpa(struct kvm_vcpu *vcpu, gva_t gva)
-{
(Continue reading)

Avi Kivity | 1 Jan 2008 16:35

[PATCH 04/54] KVM: MMU: Rename 'release_page'

Rename the awkwardly named variable.

Signed-off-by: Avi Kivity <avi@...>
---
 drivers/kvm/mmu.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c
index 86896da..0cb6580 100644
--- a/drivers/kvm/mmu.c
+++ b/drivers/kvm/mmu.c
 <at>  <at>  -430,18 +430,18  <at>  <at>  static void rmap_remove(struct kvm *kvm, u64 *spte)
 	struct kvm_rmap_desc *desc;
 	struct kvm_rmap_desc *prev_desc;
 	struct kvm_mmu_page *sp;
-	struct page *release_page;
+	struct page *page;
 	unsigned long *rmapp;
 	int i;

 	if (!is_rmap_pte(*spte))
 		return;
 	sp = page_header(__pa(spte));
-	release_page = pfn_to_page((*spte & PT64_BASE_ADDR_MASK) >> PAGE_SHIFT);
+	page = pfn_to_page((*spte & PT64_BASE_ADDR_MASK) >> PAGE_SHIFT);
 	if (is_writeble_pte(*spte))
-		kvm_release_page_dirty(release_page);
+		kvm_release_page_dirty(page);
 	else
-		kvm_release_page_clean(release_page);
(Continue reading)

Avi Kivity | 1 Jan 2008 16:35

[PATCH 00/54] KVM patch queue review for 2.6.25 merge window (part IV)

Fourth set of kvm updates scheduled for the 2.6.25 merge window.  Please
review.  Diffstat below is for this batch only.

 arch/x86/Kconfig          |    4 +
 drivers/kvm/Kconfig       |    4 +-
 drivers/kvm/i8259.c       |    1 +
 drivers/kvm/ioapic.c      |   36 ++--
 drivers/kvm/iodev.h       |   63 +++++
 drivers/kvm/irq.h         |   21 ++-
 drivers/kvm/kvm.h         |   79 +------
 drivers/kvm/kvm_main.c    |  129 ++++-------
 drivers/kvm/lapic.c       |   25 ++-
 drivers/kvm/mmu.c         |  482 +++++++++++++++++++++-----------------
 drivers/kvm/paging_tmpl.h |  202 +++++++---------
 drivers/kvm/svm.c         |   99 +++-----
 drivers/kvm/svm.h         |    1 +
 drivers/kvm/types.h       |   41 ++++
 drivers/kvm/vmx.c         |   86 ++-----
 drivers/kvm/x86.c         |  469 ++++++++++++++++++++++++++++++++++---
 drivers/kvm/x86.h         |   41 +++-
 drivers/kvm/x86_emulate.c |  568 +++++++++++++++++++++++++--------------------
 drivers/kvm/x86_emulate.h |    5 +-
 include/asm-x86/kvm.h     |   21 ++
 include/linux/Kbuild      |    2 +-
 include/linux/kvm.h       |    6 +
 kernel/fork.c             |    1 +
 23 files changed, 1444 insertions(+), 942 deletions(-)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
(Continue reading)

Avi Kivity | 1 Jan 2008 16:35

[PATCH 06/54] KVM: Enhance guest cpuid management

From: Dan Kenigsberg <danken@...>

The current cpuid management suffers from several problems, which inhibit
passing through the host feature set to the guest:

 - No way to tell which features the host supports

  While some features can be supported with no changes to kvm, others
  need explicit support.  That means kvm needs to vet the feature set
  before it is passed to the guest.

 - No support for indexed or stateful cpuid entries

  Some cpuid entries depend on ecx as well as on eax, or on internal
  state in the processor (running cpuid multiple times with the same
  input returns different output).  The current cpuid machinery only
  supports keying on eax.

 - No support for save/restore/migrate

  The internal state above needs to be exposed to userspace so it can
  be saved or migrated.

This patch adds extended cpuid support by means of three new ioctls:

 - KVM_GET_SUPPORTED_CPUID: get all cpuid entries the host (and kvm)
   supports

 - KVM_SET_CPUID2: sets the vcpu's cpuid table

(Continue reading)

Avi Kivity | 1 Jan 2008 16:35

[PATCH 05/54] KVM: Disallow fork() and similar games when using a VM

We don't want the meaning of guest userspace changing under our feet.

Signed-off-by: Avi Kivity <avi@...>
---
 drivers/kvm/kvm.h      |    1 +
 drivers/kvm/kvm_main.c |    9 +++++++++
 kernel/fork.c          |    1 +
 3 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index 1fd8158..be18620 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
 <at>  <at>  -305,6 +305,7  <at>  <at>  struct kvm_vm_stat {

 struct kvm {
 	struct mutex lock; /* protects everything except vcpus */
+	struct mm_struct *mm; /* userspace tied to this vm */
 	int naliases;
 	struct kvm_mem_alias aliases[KVM_ALIAS_SLOTS];
 	int nmemslots;
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 411b2bd..a9e1c77 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
 <at>  <at>  -165,6 +165,8  <at>  <at>  static struct kvm *kvm_create_vm(void)
 	if (IS_ERR(kvm))
 		goto out;

+	kvm->mm = current->mm;
(Continue reading)

Avi Kivity | 1 Jan 2008 16:35

[PATCH 10/54] KVM: x86 emulator: address size and operand size overrides are sticky

Current implementation is to toggle, which is incorrect.  Patch ported from
corresponding Xen code.

Signed-off-by: Avi Kivity <avi@...>
---
 drivers/kvm/x86_emulate.c |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 9f8d59a..3be506a 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
 <at>  <at>  -758,6 +758,7  <at>  <at>  x86_decode_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
 	struct decode_cache *c = &ctxt->decode;
 	int rc = 0;
 	int mode = ctxt->mode;
+	int def_op_bytes, def_ad_bytes;

 	/* Shadow copy of register state. Committed on successful emulation. */

 <at>  <at>  -768,34 +769,38  <at>  <at>  x86_decode_insn(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
 	switch (mode) {
 	case X86EMUL_MODE_REAL:
 	case X86EMUL_MODE_PROT16:
-		c->op_bytes = c->ad_bytes = 2;
+		def_op_bytes = def_ad_bytes = 2;
 		break;
 	case X86EMUL_MODE_PROT32:
-		c->op_bytes = c->ad_bytes = 4;
+		def_op_bytes = def_ad_bytes = 4;
(Continue reading)


Gmane