Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions qkernel/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ mod interrupt;
pub mod kernel_def;
pub mod rdma_def;
mod syscalls;
pub mod qkernel;

#[global_allocator]
pub static VCPU_ALLOCATOR: GlobalVcpuAllocator = GlobalVcpuAllocator::New();
Expand Down
15 changes: 15 additions & 0 deletions qkernel/src/qkernel.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright (c) 2021 Quark Container Authors / 2018 The gVisor Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

pub mod arch;
16 changes: 16 additions & 0 deletions qkernel/src/qkernel/arch.rs
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this qkernel/src/qkernel/xyz.rs file structure / naming, seems redundant. Is the second "qkernel" hierarchy necessary?

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright (c) 2021 Quark Container Authors / 2018 The gVisor Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#[cfg(target_arch = "x86_64")]
#[path = "./x86_64/mod.rs"]
pub mod __arch;
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use crate::qlib::kernel::SignalDef;
use crate::qlib::mutex::*;
use alloc::sync::Arc;
use core::sync::atomic::AtomicUsize;
use core::sync::atomic::AtomicU64;
use core::sync::atomic::Ordering;

use super::super::super::super::cpuid::*;
use super::super::super::asm::*;
use super::super::super::SignalDef::*;
use super::super::super::FP_STATE;
use crate::qlib::cpuid::*;
use crate::asm::*;
use SignalDef::*;
use FP_STATE;

// System-related constants for x86.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,24 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use super::super::super::super::addr::*;
use super::super::super::super::common::*;
use super::super::super::super::limits::*;
use super::super::super::super::linux_def::*;
use super::super::super::kernel_util::*;
use super::super::super::memmgr::arch::*;
use super::super::super::SignalDef::*;
use super::arch_def::*;
use addr::*;
use crate::kernel_util;
use crate::qlib::addr;
use crate::qlib::common;
use crate::qlib::kernel::memmgr;
use crate::qlib::kernel::SignalDef;
use crate::qlib::limits;
use crate::qlib::linux_def;

use common::*;
use limits::*;
use linux_def::*;
use kernel_util::*;
use memmgr::arch::*;
use SignalDef::*;
use arch_def::*;

use super::arch_def;

// These constants come directly from Linux.

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
pub mod arch_def;

pub mod context;
pub mod signal;
7 changes: 4 additions & 3 deletions qlib/kernel/arch/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#[cfg(target_arch = "x86_64")]
#[path = "./x86_64/mod.rs"]
pub mod __arch;

//
// TODO - Arm next
//
#[cfg(target_arch = "aarch64")]
#[path = "./aarch64/mod.rs"]
pub mod __arch;
Expand Down
122 changes: 0 additions & 122 deletions qlib/kernel/arch/x86_64/signal.rs

This file was deleted.