* [PULL] lguest fixes
@ 2009-03-09 3:25 Rusty Russell
0 siblings, 0 replies; 5+ messages in thread
From: Rusty Russell @ 2009-03-09 3:25 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel, lguest
The following changes since commit 7a203f3b089be4410fe065dd9927027eade94557:
Linus Torvalds (1):
Merge branch 'for-linus' of git://git.kernel.org/.../drzeus/mmc
are available in the git repository at:
ssh://master.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus.git master
Rusty Russell (2):
lguest: fix crash 'unhandled trap 13 at <native_read_msr_safe>'
lguest: fix for CONFIG_SPARSE_IRQ=y
arch/x86/lguest/boot.c | 21 ++++++++++++++-------
drivers/lguest/lguest_device.c | 6 ++++++
2 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
index 92f1c6f..960a8d9 100644
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@ -343,6 +343,11 @@ static void lguest_cpuid(unsigned int *ax, unsigned int *bx,
* flush_tlb_user() for both user and kernel mappings unless
* the Page Global Enable (PGE) feature bit is set. */
*dx |= 0x00002000;
+ /* We also lie, and say we're family id 5. 6 or greater
+ * leads to a rdmsr in early_init_intel which we can't handle.
+ * Family ID is returned as bits 8-12 in ax. */
+ *ax &= 0xFFFFF0FF;
+ *ax |= 0x00000500;
break;
case 0x80000000:
/* Futureproof this a little: if they ask how much extended
@@ -589,19 +594,21 @@ static void __init lguest_init_IRQ(void)
/* Some systems map "vectors" to interrupts weirdly. Lguest has
* a straightforward 1 to 1 mapping, so force that here. */
__get_cpu_var(vector_irq)[vector] = i;
- if (vector != SYSCALL_VECTOR) {
- set_intr_gate(vector,
- interrupt[vector-FIRST_EXTERNAL_VECTOR]);
- set_irq_chip_and_handler_name(i, &lguest_irq_controller,
- handle_level_irq,
- "level");
- }
+ if (vector != SYSCALL_VECTOR)
+ set_intr_gate(vector, interrupt[i]);
}
/* This call is required to set up for 4k stacks, where we have
* separate stacks for hard and soft interrupts. */
irq_ctx_init(smp_processor_id());
}
+void lguest_setup_irq(unsigned int irq)
+{
+ irq_to_desc_alloc_cpu(irq, 0);
+ set_irq_chip_and_handler_name(irq, &lguest_irq_controller,
+ handle_level_irq, "level");
+}
+
/*
* Time.
*
diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c
index b4d44e5..8132533 100644
--- a/drivers/lguest/lguest_device.c
+++ b/drivers/lguest/lguest_device.c
@@ -212,6 +212,9 @@ static void lg_notify(struct virtqueue *vq)
hcall(LHCALL_NOTIFY, lvq->config.pfn << PAGE_SHIFT, 0, 0);
}
+/* An extern declaration inside a C file is bad form. Don't do it. */
+extern void lguest_setup_irq(unsigned int irq);
+
/* This routine finds the first virtqueue described in the configuration of
* this device and sets it up.
*
@@ -266,6 +269,9 @@ static struct virtqueue *lg_find_vq(struct virtio_device *vdev,
goto unmap;
}
+ /* Make sure the interrupt is allocated. */
+ lguest_setup_irq(lvq->config.irq);
+
/* Tell the interrupt for this virtqueue to go to the virtio_ring
* interrupt handler. */
/* FIXME: We used to have a flag for the Host to tell us we could use
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PULL] lguest fixes
@ 2015-02-24 1:33 Rusty Russell
0 siblings, 0 replies; 5+ messages in thread
From: Rusty Russell @ 2015-02-24 1:33 UTC (permalink / raw)
To: Linus Torvalds; +Cc: lkml, Randy Dunlap
The following changes since commit b2b89ebfc0f0287e20516a5443d93af309b800cf:
Merge tag 'locks-v3.20-2' of git://git.samba.org/jlayton/linux (2015-02-18 10:21:47 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux.git tags/fixes-for-linus
for you to fetch changes up to f476893459318cb2eff3ecd2a05d4ceacf82e73e:
lguest: update help text. (2015-02-19 14:44:32 +1030)
----------------------------------------------------------------
Lguest weird config build fix, and update to the documentation.
Thanks,
Rusty.
----------------------------------------------------------------
Rusty Russell (2):
lguest: now depends on PCI
lguest: update help text.
arch/x86/lguest/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread* [PULL] lguest fixes
@ 2010-12-16 7:33 Rusty Russell
0 siblings, 0 replies; 5+ messages in thread
From: Rusty Russell @ 2010-12-16 7:33 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel, lguest, x86
[ The arch/x86/kernel/head_32.S changes are to expose a couple of symbols ]
The following changes since commit b0c3844d8af6b9f3f18f31e1b0502fbefa2166be:
Linux 2.6.37-rc6 (2010-12-15 17:24:48 -0800)
are available in the git repository at:
ssh://master.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus.git master
Rusty Russell (3):
lguest: fix crash lguest_time_init
lguest: restore boot speed
lguest: populate initial_page_table
arch/x86/kernel/head_32.S | 4 +-
arch/x86/lguest/boot.c | 16 +++---
arch/x86/lguest/i386_head.S | 105 +++++++++++++++++++++++++++++++++++++++++++
3 files changed, 115 insertions(+), 10 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread* [PULL] lguest fixes
@ 2009-01-30 1:16 Rusty Russell
0 siblings, 0 replies; 5+ messages in thread
From: Rusty Russell @ 2009-01-30 1:16 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel, Atsushi SAKAI, Tim Ansell, Mark Wallis
The following changes since commit 18e352e4a73465349711a9324767e1b2453383e2:
Linus Torvalds (1):
Linux 2.6.29-rc3
are available in the git repository at:
ssh://master.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus.git master
Atsushi SAKAI (1):
lguest: typos fix
Mark Wallis (1):
lguest: Fix a memory leak with the lg object during launcher close
Tim 'mithro' Ansell (1):
lguest: disable the FORTIFY for lguest.
Documentation/lguest/Makefile | 2 +-
arch/x86/lguest/boot.c | 4 ++--
drivers/lguest/core.c | 2 +-
drivers/lguest/lguest_user.c | 5 ++---
4 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/Documentation/lguest/Makefile b/Documentation/lguest/Makefile
index 725eef8..1f4f9e8 100644
--- a/Documentation/lguest/Makefile
+++ b/Documentation/lguest/Makefile
@@ -1,5 +1,5 @@
# This creates the demonstration utility "lguest" which runs a Linux guest.
-CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 -I../../include -I../../arch/x86/include
+CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 -I../../include -I../../arch/x86/include -U_FORTIFY_SOURCE
LDLIBS:=-lz
all: lguest
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
index a7ed208..92f1c6f 100644
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@ -931,7 +931,7 @@ static void lguest_restart(char *reason)
* that we can fit comfortably.
*
* First we need assembly templates of each of the patchable Guest operations,
- * and these are in lguest_asm.S. */
+ * and these are in i386_head.S. */
/*G:060 We construct a table from the assembler templates: */
static const struct lguest_insns
@@ -1093,7 +1093,7 @@ __init void lguest_init(void)
acpi_ht = 0;
#endif
- /* We set the perferred console to "hvc". This is the "hypervisor
+ /* We set the preferred console to "hvc". This is the "hypervisor
* virtual console" driver written by the PowerPC people, which we also
* adapted for lguest's use. */
add_preferred_console("hvc", 0, NULL);
diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c
index 90663e0..60156df 100644
--- a/drivers/lguest/core.c
+++ b/drivers/lguest/core.c
@@ -224,7 +224,7 @@ int run_guest(struct lg_cpu *cpu, unsigned long __user *user)
break;
/* If the Guest asked to be stopped, we sleep. The Guest's
- * clock timer or LHCALL_BREAK from the Waker will wake us. */
+ * clock timer or LHREQ_BREAK from the Waker will wake us. */
if (cpu->halted) {
set_current_state(TASK_INTERRUPTIBLE);
schedule();
diff --git a/drivers/lguest/lguest_user.c b/drivers/lguest/lguest_user.c
index 34bc017..b8ee103 100644
--- a/drivers/lguest/lguest_user.c
+++ b/drivers/lguest/lguest_user.c
@@ -307,9 +307,8 @@ static int close(struct inode *inode, struct file *file)
* kmalloc()ed string, either of which is ok to hand to kfree(). */
if (!IS_ERR(lg->dead))
kfree(lg->dead);
- /* We clear the entire structure, which also marks it as free for the
- * next user. */
- memset(lg, 0, sizeof(*lg));
+ /* Free the memory allocated to the lguest_struct */
+ kfree(lg);
/* Release lock and exit. */
mutex_unlock(&lguest_lock);
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PULL] lguest fixes
@ 2008-03-10 22:56 Rusty Russell
0 siblings, 0 replies; 5+ messages in thread
From: Rusty Russell @ 2008-03-10 22:56 UTC (permalink / raw)
To: Linus Torvalds; +Cc: lguest, linux-kernel, Eugene Teo, Paul Bolle
The following changes since commit cdeeeae056a429e729ae9e914fa8142ee45bee93:
Linus Torvalds (1):
Linux 2.6.25-rc5
are available in the git repository at:
ssh://master.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus.git master
Eugene Teo (1):
lguest: make sure cpu is initialized before accessing it
Paul Bolle (1):
lguest: Do not append space to guests kernel command line
Rusty Russell (3):
lguest: fix __get_vm_area usage.
lguest: Sanitize the lguest clock.
lguest: Revert 1ce70c4fac3c3954bd48c035f448793867592bc0, fix real problem.
Documentation/lguest/lguest.c | 7 +++-
arch/x86/lguest/boot.c | 55 ++++++++++++++++------------------------
drivers/lguest/core.c | 15 +++++++++-
drivers/lguest/lguest_user.c | 15 ++++++-----
drivers/lguest/page_tables.c | 2 +-
5 files changed, 49 insertions(+), 45 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-02-24 1:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-09 3:25 [PULL] lguest fixes Rusty Russell
-- strict thread matches above, loose matches on Subject: below --
2015-02-24 1:33 Rusty Russell
2010-12-16 7:33 Rusty Russell
2009-01-30 1:16 Rusty Russell
2008-03-10 22:56 Rusty Russell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox